언어 설정

Menu
Sites
Language
Camera preview scaling

Are there any ways to scale camera preview without artifacts in runtime?

Tried just resize image which hold camera`s preview video, but there are a lot of black frames and freezes during the scaling.

Responses

4 댓글
Alex Dem

Hi,
I not sure that this way is exist.
In dev-guide there is remark for camera_set_preview_resolution() api:
This function should be called before previewing (camera_start_preview()).
Hence you should stop preview before.
Alexey.

Alex Dem

But I think the way with resize of every frame , when you register camera_preview_cb using
camera_set_preview_cb (camera_h camera, camera_preview_cb callback, void *user_data)
should workd for your case.
I can't say for sure but as I remember on 2.2.1 in one app we have resized image in CB without any issues. camera_preview_cb should be the way in your case .
Alexey.

Mazhara

Thanks a lot for your advices!

Tried this approach. However using  media_packet_preview_cb or camera_preview callback  media package transformation is required  to set right colorspace and size. And using functions such as image_util_transform_run dramatically slows rendering. 

Olga

Alex Dem

Hi, 
On 2.2.1 (M0,M1 devices) we have used such approach:
https://developer.tizen.org/dev-guide/2.2.1/org.tizen.native.apireference/classTizen_1_1Media_1_1ICameraEventListener.html#a9641fee49e00e43e7aee067288be606c

and were able to perform some actions inside of OnCameraPreviewed consequentially (flip, rotate, convert pixel format from NV12 to RGB565LE,  and resize after). we have resized with Tizen::Media::ImageUtil::Resize() call .
It looked good.

But looks that due low performance of Kiran device similar approach is impossible now.
Alexey.