Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenCV Help #9

Open
Initiale opened this issue May 12, 2016 · 1 comment
Open

OpenCV Help #9

Initiale opened this issue May 12, 2016 · 1 comment

Comments

@Initiale
Copy link

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?

@Arksine
Copy link
Owner

Arksine commented May 12, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants