Android Question DJI library : FPV view

freedom2000

Well-Known Member
Licensed User
Longtime User
Hi,

I wanted to mod the DJI drone example in order to display two video streams to test my google cardboard as a "poor man" FPV DJI Googles.

DJI google.jpg


I tried to display twice the video :

B4X:
    pnlCamera.AddView(camera.CreateVideoView, 0, 25%y, pnlCamera.Width/2, pnlCamera.Height/2)
    pnlCamera.AddView(camera.CreateVideoView, 50%x,25%y, pnlCamera.Width/2, pnlCamera.Height/2)

But does not work...

I tried to create a second camera :

B4X:
    camera.Initialize("camera", aircraft)
    camera2.Initialize("camera2", aircraft)
    pnlCamera.AddView(camera.CreateVideoView, 0, 25%y, pnlCamera.Width/2, pnlCamera.Height/2)
    pnlCamera.AddView(camera2.CreateVideoView, 50%x,25%y, pnlCamera.Width/2, pnlCamera.Height/2)

As you can see only right image is there...
googles.jpg


So please if you have an idea how I could do it... that's would be great !
Thanks in advance
 

aeropic

Active Member
Licensed User
Longtime User
Hi,

I tried this which is not working neither !

B4X:
Dim myview As View
    Dim myview2 As View
    myview = camera.CreateVideoView
    myview2 = myview
    pnlCamera.AddView(myview, 0, 0, pnlCamera.Width, pnlCamera.Height)
    pnl2Camera.AddView(myview2, 0, 0, pnl2Camera.Width, pnl2Camera.Height)
 
Upvote 0

freedom2000

Well-Known Member
Licensed User
Longtime User
Well I have searched but found only 7 posts with "fpv" keyword.
None seems relevant...

May be this one : fpv footage via webRTC ?

Nothing specific to fpv mode into the camera classes either


So I am lost in space :(
But it should be possible as a few app on the googlePlay succeeeded to do it ! this one for example : VR Drone
But unfortunately headtracking is not working with it... and would be much better if coded with B4A :cool:
 
Upvote 0

freedom2000

Well-Known Member
Licensed User
Longtime User
I finally found a "solution" :

instead of struggling to get a stereo image, why not trying to use a single image FPV goggles ?

Here is a Mac Gyver's way to get one :)

But trust me it really works great !

See my design on thingiverse : Poor man's FPV goggles (2D version)


side_view.jpg
 
Last edited:
Upvote 0
Top