Test Digital Zoom of Camera Preview

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Test Digital Zoom of Camera Preview

Test Digital Zoom of Camera Preview

Test digital zoom with ipu for camera preview.

 

Board :sarbre-sd (imx6dq)
BSP   : android 13.4ga

2871_2871.pngflow1.png

In the above flow, one frame buffer is processed in four steps at camera preview.

Add the step to change the frame buffer before step 4 , the added step which  zoom one preview frame.

 

The figure below shows the crop function of ipu lib, we use this function scale the frame.

2872_2872.bmpcorp.bmp

 

Test result:

preview zoom levle 0:

2873_2873.jpgp0.jpg

 

preview zoom level max:

2874_2874.jpgp10.jpg

 

 

When taking pictures with 5M pixels and the zoom is over level 1, the picture size is not 2592x1944 but 2016x1512.

The underlying reason for it is that ipu crop function only supports the 2048x2048 maximum output .

 

Thumbnails of test result :

  2875_2875.pngpicx2.png

Labels (3)
Tags (2)
Attachments
Comments

hi:

       I am doing the work of digital zoom   on  the  imx6q board  using ov5640   , can you give me some help?

      The IPU driver should changed?How to modify to implent the digital zoom function?

  

Hi, 

     I have attached patch, it's for older version android.  You could see it to learn the way of zooming.

HI weiping.Liu:

thank you very much!

you mean i should deal the zoom function before the frame data

transfer to the display framebuffer?

hi  weiping liu:

    We now use the  imx6q-sabresd board(android4.4.2, the kernel version 3.0.35)。

   have you implemented digital zoom on this?

    我们现在用的是android4.4.2,imx6q-sabresd 板子,内核版本是3.0.35,请问,你在这上面实现过数码对焦吗?

  我们现在用的是android4.4.2,imx6q-sabresd 板子,内核版本是3.0.35,请问,你在这上面实现过数码变焦吗?

Hello Weiping Liu,

I am also implementing the same on the Sabresd board on the android lollipop , I am able to port changes as suggested , but have a issue with the 5MP i.e 2592*1944 frame , As you suggested I changed the frame size of the the output at the IPU  cropping level , but when the same comes to the JPEG , the Image is not storing properly, it is saved as a green color frame(picture). I Think that the code is failing at the  encoding section , ya here too I implemented the changes, with that too it fails. Wondering waht more changes may be required to implement the digital zoom correctly, can you help me on this ? . With other resolutions the zoom works fine.

All the changes I have mde is at the  HAL level.

The camera That I am using is ov5640_mipi.

Thanks

Karan

Karan,  Is the  frame of 5Mp normal in preview after IPU cropping? If the copped frame is ok when in preview , i think the issue may be caused by  error format or length input for encoding function.

Hello Weiping Liu,

Yes the length was in correct. I have resolved it . But I have another question,  does the same implementation work with respect to video ? for me the buffers are missing and recording is like 1 frame without zoom and another frame with zoom , its not proper.

Can you please suggest ?

Regards,

Karan

Hello karan bhagoji

    Do you have realization

Hello karan bhagoji

    Do you have realization digital zoom on android5.0? Would you like to share your changes on source code。 

    Did you make changes only in the Hal layer?I refer to code_only_preview.zip  to modify,but it does‘t work。

No ratings
Version history
Last update:
‎11-23-2012 02:21 AM
Updated by: