×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    23

    Exclamation N95 and getSnapShot encodings

    Hello there,

    I'm trying to get the best possible quality image using MMAPI on a N95. My goal is to obtain a grayscaled image without any loss. Then convert it by myself into jpeg. Even if I get a rgb image, there's no problem in converting to grayscale.

    My first attempt was to use:

    "encoding=jpeg&colors=yuv444&width=640&height=480&quality=100"
    but it seems that yuv is not suported for snapshots. It would be the best solution because from this I only should get Y channel and encode a single component jpeg.

    then I tried with several formats:

    1. encoding=png&colors=gray8&width=640&height=480

    2. encoding=png&colors=rgb888&width=640&height=480

    3. encoding=bmp&colors=rgb888&width=640&height=4803

    6. encoding=jpeg&width=640&height=480&quality=100

    Examining the images, one can see a lot of quality losses (even in bmp and png [bmp is supossed to be almost pure raw format]). It seems that images are captured as jpeg and the converted to the final format. In fact you can see the 8x8 pixels boxes containing the same losses in a jpeg at 100 of quality, than in a BMP rgb888.

    Can anoyone confirm this? And is this is the case, which is the point to get a (640x480x3 + bmpheaders.length) bytes bmp image is the pixels value are the same that in a compressed jpeg?

    Just another question: How can I get raw rgb bytes without any compression? Or even better if I can get only the luminance channel without doing any conversion by myself and letting the underlying processes doing it in it's 'standard' way.

    Regards

  2. #2
    Regular Contributor
    Join Date
    Jul 2003
    Posts
    89

    Re: N95 and getSnapShot encodings

    Have a look at this link (sub section Video Control) it will explain the behaviour of getSnapshot on S60 devices which might be able to answer some of the questions you have.

    http://www.forum.nokia.com/document/...D8F1EE772.html

  3. #3
    Registered User
    Join Date
    Oct 2005
    Posts
    23

    Post Re: N95 and getSnapShot encodings

    Hi, thanks a lot for your reply!

    I think I never read the last paragraph of getSnapShot section, where it says:

    "If a JPEG image is requested in a common size that is directly supported by the camera, then the image is captured directly to JPEG image by camera and no resizing or encoding are needed. In this case far less memory is used and image capturing is faster. It is thus strongly adviced that at least larger images (larger than 1mpix) are captured as JPEG images and in a common image size (e.g. 1600x1200 for 2mpix an so on). Supported common image sizes are dependent on product and platform version."

    So if the format is a common size directly supported by the camera I got a JPEG which will be converted to the especified format if encoding was defined?. Note that the doc talks about requesting a JPEG image, and I'm asking for BMP, PNG and getting an image converted from JPEG (without any doubt). To Nokia people: What's the point of asking for a BMP and obtain a BMP with JPEG losses?

    The doc previously says:
    "The images are generally first captured as raw image data and then encoded to selected image format." (RAW? Where, When, How?)
    ...
    "Snapshots are always taken with the next largest image size supported by the product. For example, if 460x345 is requested, then a 640x480 image is taken and resized down."

    So what does "common size directly supported by the camera" mean when the device is always taking the snapshots with the "next largest image size supported"?? Doesn't that mean that all the snapshots are first captured as JPEG?

    Regards

Similar Threads

  1. getSnapshot too slow on N95
    By sanjk0604 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 16
    Last Post: 2012-05-14, 14:15
  2. jsr234 camera getSnapShot() on Nokia N95
    By garyjamessilva in forum Mobile Java Media (Graphics & Sounds)
    Replies: 21
    Last Post: 2008-07-02, 15:14
  3. jsr135 highest supported camera resolutions for getSnapShot() on N95
    By garyjamessilva in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2007-05-30, 21:14

Posting Permissions

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