×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    5

    How to get high quality image with camera

    I have written a program to capture high resolution and high quality still image with CCamera . But there is a big problem:

    My phone support Exif and Bitmap format.
    Exif format can support high resolution such as 5M pixels.
    Bitmap format DO NOT support 5M pixel resolution.

    So i capture image with Exif format and 5M pixels resolution.
    Unfortunately the image is very bad quality, the size of image file is only 100KB for a 5M pixel image.
    I capture a same image with NOKIA original camera application, it get a better quality and the file size is about 700K.

    Anyone can help me to solve this big problem? Thanks a lot.



    Test environment : N85
    iImageFormatsSupported:
    EFormatExif
    2592*1944 2048*1536 1600*1200 1280*960 1024*768 640*480
    EFormatFbsBitmapColor4K
    EFormatFbsBitmapColor64K
    EFormatFbsBitmapColor16M
    0*0 0*0 0*0 1280*960 1024*768 640*480

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,697

    Re: How to get high quality image with camera

    Uncompressed true color 5Mp bitmap requires at least 15 megabytes, which becomes 20 if padding is also used. That is why.
    Have you tried CCamera::SetJpegQuality already?

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    5

    Re: How to get high quality image with camera

    Quote Originally Posted by wizard_hu_ View Post
    Uncompressed true color 5Mp bitmap requires at least 15 megabytes, which becomes 20 if padding is also used. That is why.
    Have you tried CCamera::SetJpegQuality already?
    Yes, I have tried to use SetJpegQuality(100), but it seem not impact output Exif file quality.

    The following is taken from the document. It seems this function is not directed against a still image, but for video.
    Code:
    SetJpegQuality()
    virtual void SetJpegQuality(TInt aQuality)=0;
    Description
    Sets the quality value to use if jpeg is a supported image for video format.
    Ignored if jpeg is not a supported image for video format.
    Parameters
    TInt aQuality The quality value to use, clamped to the range 1 to 100.

  4. #4
    Nokia Developer Expert
    Join Date
    Dec 2003
    Posts
    148

    Re: How to get high quality image with camera

    Quote Originally Posted by hutao View Post
    It seems this function is not directed against a still image, but for video.
    Code:
    Sets the quality value to use if jpeg is a supported image for video format.
    Ignored if jpeg is not a supported image for video format.
    There seems to be a typo on the documentation. It should say "image OR video format". Typically JPEG is supported only for image capture, not for video capture.

    Most likely you are working with a device that has autofocus. Make sure that you achieve autofocus lock before capturing the image. Otherwise the image will be blurry.
    janza

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,697

    Re: How to get high quality image with camera

    Janza is right, the N85 has autofocus feature. To complete the suggestion: visit Tools, Docs & Code above, then select Documentation, Symbian C++, Multimedia. There you will find example code for using autofocus.

  6. #6
    Registered User
    Join Date
    Nov 2008
    Location
    Australia
    Posts
    88

    Re: How to get high quality image with camera

    Hi Huato

    From your original email it looks like you have printed some debug output and from what I can tell the first 3 image sizes are not available to your code as seen by your output - 0x0 0x0 0x0

    I would suggest your problem is you are using the camera in portrait mode and it must be in landscape mode to access the higher resolutions - this took me a while to figure out the hard way.

    Good luck.
    David4x

  7. #7
    Nokia Developer Expert
    Join Date
    Dec 2003
    Posts
    148

    Re: How to get high quality image with camera

    Quote Originally Posted by david4x View Post
    Hi Huato

    From your original email it looks like you have printed some debug output and from what I can tell the first 3 image sizes are not available to your code as seen by your output - 0x0 0x0 0x0

    I would suggest your problem is you are using the camera in portrait mode and it must be in landscape mode to access the higher resolutions - this took me a while to figure out the hard way.

    Good luck.
    The first three zero sizes mean that the enumerated sizes are not available as bitmap format. Those resolutions are available in Exif format according to debug output, so Huato's application is running in landscape UI mode. In case he was using portrait mode the biggest resolutions would not be supported for neither Exif nor bitmap format. The bigges resolutions are typically not available in bitmap format in neither UI orientation.
    janza

  8. #8
    Registered User
    Join Date
    Mar 2003
    Posts
    5

    Re: How to get high quality image with camera

    Quote Originally Posted by janza View Post
    The first three zero sizes mean that the enumerated sizes are not available as bitmap format. Those resolutions are available in Exif format according to debug output, so Huato's application is running in landscape UI mode. In case he was using portrait mode the biggest resolutions would not be supported for neither Exif nor bitmap format. The bigges resolutions are typically not available in bitmap format in neither UI orientation.
    janza is right, I have used landscape UI mode to initialize the CCamera instance.

    I do not think that kind of output file sizes because I did not use the AutoFocus. but because the JPEG codec.
    Even in the absence of focus, JPEG quality should not be a difference so far.

  9. #9
    Registered User
    Join Date
    Nov 2008
    Location
    Australia
    Posts
    88

    Re: How to get high quality image with camera

    Ok. You are aware that file size does not automatically correlate to resolution and the image content is also signficant? For example if you capture an image with all one colour (say al black or white) the file size also comes out quite small?

    I would suggest you open the EXIF data and confirm the captured resolution - the image will tell you if you really have a 5MP capture. You can use software such as Infranview to see this..
    HTML Code:
     http://www.irfanview.com/
    David4x

  10. #10
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,697

    Re: How to get high quality image with camera

    Note that having a burry image is practically is a compression in itself: the image is blurry because it is lack of details. And so the JPEG compression method (and any other compression which involves transformation into the frequency domain) will be able to compress it impressively.

Similar Threads

  1. Nokia N-Series Complete Model Line-Up
    By Dopod in forum General Development Questions
    Replies: 6
    Last Post: 2008-07-22, 20:16
  2. Opening a JPEG Image
    By ummarbhutta in forum Mobile Java Media (Graphics & Sounds)
    Replies: 8
    Last Post: 2007-02-15, 06:34
  3. how to cut some part of Image
    By mshouab in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2006-08-04, 09:05
  4. Camera Image Quality
    By ronald29 in forum Symbian Media (Closed)
    Replies: 7
    Last Post: 2006-07-21, 10:43
  5. Low image Quality - CCamera
    By eshlomi in forum Symbian
    Replies: 0
    Last Post: 2005-12-11, 10:39

Posting Permissions

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