언어 설정

Menu
Sites
Language
OnCameraCaptured - dimensions of preview...

Hello (using RD-PQ):

1. In app PreviewResolution is set to 960x720, Capture resolution is set to 8MPx (3264x2448).

im using function camera.Capture() and as result of image captured OnCameraCaptured function is called
 

void Example::OnCameraCaptured(Tizen::Base::ByteBuffer& capturedData, result r)
{
Image img;
img.Construct();
Bitmap*bmp = null;
bmp = img.DecodeN(capturedData, IMG_FORMAT_JPG , BITMAP_PIXEL_FORMAT_ARGB8888);
int width = bmp->GetWidth();
int height = bmp->GetHeight();
img.EncodeToFile(*bmp, IMG_FORMAT_PNG, path, true);
}
 

With and Height of captured image/bitmap is 960x720.. even if I use .DecodeN(capturedData, BITMAP_PIXEL_FORMAT_RGB565 , dim.width, dim.height);
Bitmap format doesn't matter...

Function GetCaptureResolution(); returns 3264x2448...

Short version: Capture resolution set to 3264x2448 but captured image resolution is preview image resolution.

So what is wrong?

 

2. There is Exposure, Brightness and Contrast in Native API.. we can check which features are available on RD-PQ Brightness and Contrast "should be" because MediaCapability::GetValue returns true as a value for them.

But.. only changing camera Brightness value with SetBrightness is changing the preview image (its brighter..). Changing Contrast value make no visible changes on the screen... so what's wrong?

Short version: Contrast camera feature is available but not changing image on preview.

Regards...

Tizen SDK 2.2b, RD-PQ with 2.2b

Edited by: Brock Boland on 17 3월, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

1 댓글
tizendevteam T
Help section url for Tizen https://developer.tizen.org/help/index.jsp?topic=%2Forg.tizen.native.apireference%2FclassTizen_1_1Media_1_1Camera.html 1) Please check the documentation of camera API setCaptureResolution(). Its mentioned that "In a zero-shutter-lag camera, the default preview format applies this feature correctly. The other preview formats are not guaranteed." So the behaviour what you see can happen for other preview formats, other than default preview format. i.e UYVY. Captured data is obtained from a different pipeline than preview data and the drivers support for one of the preview format. so behaviour is kept like this. 2) Use MediaCapability class with specific key to check if that capability is supported by device or not. https://developer.tizen.org/help/topic/org.tizen.native.apireference/classTizen_1_1Media_1_1MediaCapability.html?resultof=%22%6d%65%64%69%61%43%61%70%61%62%69%6c%69%74%79%22%20%22%6d%65%64%69%61%63%61%70%22%20 eg MediaCapability::GetValue(CAMERA_PRIMARY_SUPPORT_CONTRAST, Value); If the value returned is true, then it means primary camera supports contrast. If any problem is seen, if contrast is not varied, then please attach emulator logs by enabling platform logs and raise another issue. Please test on latest Tizen SDK 2.2.0 and verify. 3) While using OverlayPanel to display the buffer obtained in OnCameraPreviewed() or OnCameraCaptured(), make sure the format matches of overlayregion and preview format set for camera. If there is a missmatch, then copying of pixel will be done from some index which is not valid and it can result in crash. It cannot be blamed on the algorithm as the input passed by user itself is worng. eg:- a) if camera preview format set is PIXEL_FORMAT_YCbCr420_PLANAR , overlayregion's format at SetInputBuffer() should be given as BUFFER_PIXEL_FORMAT_YCbCr420_PLANAR b) if camera preview format set is PIXEL_FORMAT_NV12 , overlayregion's format at SetInputBuffer() should be BUFFER_PIXEL_FORMAT_UYVY All these are normal operations.