I really hope you guys could help me, because I couldn't find no solution for my task since 2 weeks now, neither by searching, nor by myself.
What I'm trying to do is to get the camera-preview-pictures in bitmap format, before they are drawn to the camera-preview's surfaceView!, then I want to manipulate the bitmap with computer-vision-algorithms, and eventually draw them on the camera-preview's surfaceView.
I'm able to get YuvImages from the camera-preview using the callback's onPreviewFrame()
method, further I'm able to manipulate them as needed and I'm able to draw pictures on a surfaceView using a thread. But I can't figure out how to combine those tasks.
The problem is that the preview's callback automatically draws it's pictures to its surfaceView, so when I get the pictures in the onPreviewFrame()
method, they were already drawn to the surfaceView. How to change this behaviour?
I could find no solution. I thought it might be a workaround simply not showing the preview's surfaceView, but another one, where the manipulated pictures are drawn on, but I couldn't get this solution working either...
I hope you guys could help me, because I'm already frustrated.