Results 1 to 3 of 3
  1. #1
    StateMachine is offline Member
    Join Date
    Dec 2011
    Posts
    22
    Rep Power
    0

    Question Is there no lossless camera picture format?

    Camera.Parameters uses:
    setPictureFormat (int pixel_format)

    where pixel_format can have the following values:
    ImageFormat.NV21
    ImageFormat.RGB_565
    ImageFormat.JPEG

    All of those formats seem to interpolate a single color value across multiple pixels. That is, the color of a certain pixel can change if the color of the pixel next to it changes. I want to automatically analyze image data, so this would introduce sever complications for me! I don't care what it looks like to human eyes. I want to identify and follow certain edges in photos.

    ImageFormat uses also NV16, YUY2, YV12 which also interpolate single color values over neighboring pixels.

    Doesn't Android support any lossless image format for cameras???
    Last edited by StateMachine; 12-31-2011 at 08:16 AM.

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default Re: Is there no lossless camera picture format?

    That is, the color of a certain pixel can change if the color of the pixel next to it changes.
    I'm not sure I follow this. Why would a pixel change?

    Related to this is what you mean by "lossless". Certainly the images will not contain all the colour information of physical reality, but the device takes a picture and then you have access to the raw image data, a scaled fully processed postview image, and a compressed jpeg image.

    Whatever the processing that is done or the formatting, the values of the pixels don't change unless you change them.

  3. #3
    StateMachine is offline Member
    Join Date
    Dec 2011
    Posts
    22
    Rep Power
    0

    Default Re: Is there no lossless camera picture format?

    It's called "interleaved U/V plane with 2x2 subsampling"

    I know about YUY2. It has three values to determine a certain color: Y, U and V.
    Y can be thought of as the light strength and Y-values alone is a monochrome black-and-white image.
    U and V can be thought of as 2 different colors, a bit like RGB-values represent 3 different colors. But while each pixel has its own Y-value, a U-value is always the same for two neighboring pixels. Same with V-values.

    Now imagine a white edge in a picture which I want to detect and follow. Imagine it crosses a background. Imagine that with a 24 bit RGB format, on one pixel line, the white edge pixel would be neighbor with a green background pixel. On the pixel line above it, a white edge pixel would be neighbor with a red background pixel. Then with YUY2 (or NV21 or RGB565) neither of the pixels on the white edge will be white. One will have its U- and V-values mixed with green, the other with red. That makes it harder for me to know if there actually is a white pixel involved there or not.

    Now, with a reasonable resolution, there will likely be plenty of white-white pixels somewhere around there for my purposes. But it still messes up the edges with randomly mixed white-green and white-red color noise which doesn't exist in the real world. Maybe I could simply double the horizontal resolution and treat every four bytes as one unique pixel, averaging the both Y-values? Hmmm...
    Last edited by StateMachine; 12-31-2011 at 09:32 AM.

Similar Threads

  1. Capture Video from ip camera
    By nesrine18 in forum Advanced Java
    Replies: 3
    Last Post: 03-12-2012, 09:08 PM
  2. IP Camera
    By BMWTouring in forum Advanced Java
    Replies: 0
    Last Post: 08-28-2011, 06:03 PM
  3. get Hardware camera sound
    By ilyas in forum Advanced Java
    Replies: 0
    Last Post: 12-10-2010, 08:53 AM
  4. camera pic
    By Aveekdtt in forum CLDC and MIDP
    Replies: 0
    Last Post: 01-10-2010, 01:52 AM
  5. Loading a camera
    By mrvigneshmca in forum Java Applets
    Replies: 0
    Last Post: 03-18-2009, 11:46 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •