This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to enable dual front camera (stereoscopic video) in Blaze OMAP 4430

Other Parts Discussed in Thread: 4430

Hi ,

I need to have stereoscopic video using my Blaze OMAP 4430  MDP (using dual front cameras).  Right now, it can take only right front camera.

I have heard it is done by S3D. I am using Jellybean OS for the blaze.  Please give me some input regarding this/

Thanks

Priyan O B.

Please help me to figure out a solution.

  • Hi,

    Please check this thread: https://e2e.ti.com/support/omap/int_omap/f/794/p/202298/718503.aspx#718503

    it shall answer your query.

    Regards,

    Boyko

  • Dear Boyko Kazakov,

    I tried to open the link you specified. It is opening to a page showing "Group Not Found". Please check it

    Thanks & Regards

    Priyan O B.

  • Here is the solution posted there:

    1. Set OMX camera in "dual" mode. The output of OMX Camera is a single frame with outputs of L and R cameras concatenated.

    2. Split this frame into L and R buffers

    3. Send the buffers to be encoded separately

  • Dear Boyko,

    Thanks for the reply. But I don't know how to do this. If you can give me some input either through any forum or by any documents then it will be a great help.

    I am using TI Blaze OMAP 4430.

    Regards

    Priyan O B.

  • Hi,

    You can familiarize yourself with Ducati through this article. http://omappedia.org/wiki/Ducati_For_Dummies

    If you need any assistance please feel free to post your query into the e2e forums.

    Regards,

    Boyko

  • Hi,


    Do I need to build Ducati firmware explicitly to enable stereoscopic vision? To set OMX Camera in dual mode, what utility shall I use?

    Thanks & Regards,

    Priyan O B.

  • Hi Boyko,

    I want to know whether the OMTB utility works for BLAZE OMAP 4430. Please reply.

    Thanks

    Priyan O B

  • Hi Priyan,

    The utility works, and the stereoscopic camera is working with the ICS, if you are using the latest ducati binary you should be able to use both camera output concentrated into a single frame.

    Regards,

    Boyko

  • Hi Boyko,

    Thanks for your reply. I am using Blaze board (OMAP 4430). Can you please send me the link of the same utility to download for linux (ubuntu). If possible, can you please send me some documents other than the web page you already gave me.

    Thanks

    Priyan.

  • Dear Boyko,

    I have already visited those pages. I have created the Jellybean android Image and flashes that image to it and the board is working fine too. What happens when I load my Camera app (installed along with Android) is that it only uses right front camera of the blaze board. I tried to hide both the front cameras using my finger. The display was affected only if I hid the right front camera which implies that app is reading from the right front camera only.

    There in the pages that you have given have no information regarding the either OMTB or stereo video.

    What I wanted is  if OMTB utility can be used to set the front cameras to Dual mode, then I need to download that utility. I could not find a source to download. If you are familiar with this please share the link with me.

    Regards,

    Priyan O B.

  • Priyan,

    From CameraHAL you can see that sensor ID=0 refers to back camera,  sensor ID=1 refers to front right camera. There is a special case of sensor ID=2 which refers to dual camera. So in an application, you can select sensor ID=2 and CameraHAL will output a single frame with L and R views stitched together. You will need to set some more parameters like Top-Bottom, Left-Right, resolution etc to be able to get a good output.

     

    Hope it helps.

    Mayank

  • Dear Mayank Mangala,

    Thanks for your kind reply.  I created an android camera application which tries to open the camera with a camera id of 2. Thus it got worked.

    Once again thank you both Mayank and Boyko. :)

    Thanks & Regards,

    Priyan O B.

  • Dear Mayank Mangala,

    We have already check the flow you ever mentioned. However, we face the other question when we try to implement 3D stereo camera in Android 4.1.1 and please tell us if any suggestion you have, thanks.

    1. How to solve the problem easily If we only have two cameras. (Back & Front ) You ever suggest cameraID=2 will open stereo camera but it's based on 3 cameras HW design. However, how do we do if only two cameras now?

    (NOTE. They all have individual MIPI, MCLK and power. So I think it can try to open in the same time in order to fill the left and right buffer. Am I correct? )

    2.  If  the above descriptions can't work properly.  How about make Ducati take responsible one and V4L (USB Cam)  is another one? We find Ducati will be back cam and V4L will be front cam for our codebase based on Android 4.1.1. But can we mix them together just like stereo camera? Preview in the same time and take snapshot individually and combined them at last.

    Please tell us you can,thanks.

    We will really appreciate your kindly help.

    Best Regards,

    Wolf

  • Hi priyan ob,

    i just tried the same scenario:

    - Blaze with OMAP 4430
    - Jelly Beans from http://omappedia.org/wiki/4AJ.2.5_OMAP4_Jelly_Bean_Release_Notes
    - Ducati from http://omappedia.org/wiki/Android:_Working_with_pre-built_binaries
    - Wrote a simple Camera App which uses Camera with ID 2

    Unfortunatly i dont get a picture and the app crashes. Logcat is as follows:

    I/CameraHal(  115): (4127a430)   hardware/ti/omap4xxx/camera/CameraHal_Module.cpp:639 camera_device_open - camera_device open
    D/DOMX    (  115): hardware/ti/domx/domx/omx_proxy_common/src/omx_proxy_common.c:1406   __PROXY_SetParameter()
    D/DOMX    (  115): ERROR: failed check:(eError == OMX_ErrorNone) || (eError == OMX_ErrorNoMore) - returning error: 0x80001001 - Error returned from OMX API in ducati
    D/DOMX    (  115): hardware/ti/domx/omx_proxy_component/omx_camera/src/omx_proxy_camera.c:476   CameraSetParam()
    D/DOMX    (  115): ERROR:  CameraSetParam: Error in SetParam 0x80001001
    E/CameraHal(  115): (4127a598)   hardware/ti/omap4xxx/camera/OMXCameraAdapter/OMXCameraAdapter.cpp:2679 setS3DFrameLayout - Error while setting S3D frame layout: 0x80001001
    E/CameraHal(  115): (4127a598)   hardware/ti/omap4xxx/camera/OMXCameraAdapter/OMXCameraAdapter.cpp:1193 setFormat - Error configuring stereo 3D frame layout
    E/CameraHal(  115): (4127a598)   hardware/ti/omap4xxx/camera/OMXCameraAdapter/OMXAlgo.cpp:1113 setSensorOrientation - Error while configuring format 0xffffffea
    E/CameraHal(  115): (4127a598)   hardware/ti/omap4xxx/camera/OMXCameraAdapter/OMXCameraAdapter.cpp:2853 getFrameSize - Error configuring Sensor Orientation ffffffea
    E/CameraHal(  115): (4127a598)   hardware/ti/omap4xxx/camera/CameraHal.cpp:1889 cameraPreviewInitialization - Error: CAMERA_QUERY_RESOLUTION_PREVIEW -22

    My question is: Did you have the same error and had to apply patches to Android and/or Ducati?

    Kind regards,

    Christian

  • Hi Christian,


    To enable stereoscopic vision, you need to set OMAP_ENHANCEMENT_S3D to true in Config.mk (device/ti/blaze).

    After this build your android.


    Now you need to create an android app in which it has to open the camera (ID=2). [use Camera.open(int ID) ].

    Regards,

    Priyan O B.