Ask Your Question
0

[Android] Get camera frame but show no preview

asked 2016-07-03 11:36:32 -0600

przemulala gravatar image

updated 2016-07-03 11:38:35 -0600

Hi guys,

I'd like to process frames from front camera on my Android device. But I've seen that if I don't have JavaCameraView (it's defined in layout XML file) visible, OnCameraFrame() method of CameraBridgeViewBase.CvCameraViewListener2 (my Activity implements it) is not being called.

I've found same problem on StackOverflow, but the solution sadly doesn't work for me.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-07-05 14:27:50 -0600

przemulala gravatar image

I have found the answer that worked for me, so I'm sharing it with the community:

You can set your preview (in this case a CameraBridgeViewBase) transparent by setting the alpha value of the view, with 0 being completely invisible.

mOpenCvCameraView.setAlpha(0);

This should make your preview "disappear".

I have also posted it to above linked thread on a StackOverflow forum.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-07-03 11:36:32 -0600

Seen: 1,560 times

Last updated: Jul 05 '16