Easycam icon indicating copy to clipboard operation
Easycam copied to clipboard

OpenCV Help

Open Initiale opened this issue 8 years ago • 1 comments

hi, all compilation problem has been solved and i want to process camera image with opencv, anyone can help me to how i get image before reflect to surfaceview?

Initiale avatar May 12 '16 08:05 Initiale

If you want the raw pixel buffer, look at the getNextFrame function in easycapture.cpp. You'll find a pointer to a CaptureBuffer struct named curBuf. It contains a reference to the current frame after vDevice->processCapture() is called. curBuf->start is a pointer to the array of raw pixels, curBuf->length is the size of the array in bytes.

Obviously if you are doing some kind of processing you will want to create your own render pipeline, replacing the fRenderer->renderFrame call. getNextFrame is passed a handle to the surface (see the jobject surface parameter), so everything you need is there to process the raw pixels and render it to a Native Window.

Arksine avatar May 12 '16 12:05 Arksine