简体   繁体   中英

Hide camera preview in OpenCV android

I am building this application where I need to get video with the camera and process it with openCV as well as show a view with 3D graphics being renderered in it.I am using two fragments. One for previewing the camera. And one for the 3D graphics.The problem is the 3d graphics view has to be fullscreen. I don't want the camera preview at all. I can show them side by side using linear layout. But I cannot totally hide the preview and make the 3d scene take up the whole screen. Even using relative layout causes the camera preview to tear through the 3d graphics view.

Simply put it, if the camera preview is not being shown, the CvCameraViewListener2.onCameraFrame() method is not called. And without that I don't receive any new frames to process.

The problem got solved. I really don't know how it got solved though. I woke up the next day and tried running the project and it ran perfectly without requiring to change anything.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM