Skip to content Skip to sidebar Skip to footer

Parallel Processing With Camera2 Api Android And Opencvcamera2

I am developing an app where I want to process each frame from the camera and apply some Image processing algorithms on it. I am getting image feed from ImageReader inside onImageA

Solution 1:

Increase the maxImage count for your ImageReader, so that you can be processing multiple images at the same time. But in the end, your throughput has to be 30fps in order to not slow down preview; parallel processing only helps if it (say) takes 100 ms to do your processing, but you can run 3 processing threads side-by-side (so a frame completes every 33 ms).

Alternatively, you can skip processing frames if you can't keep up; just check if your processing is still underway, and if it is, release the Image immediately. Of course, that won't help if your only output is the processed frame.


Post a Comment for "Parallel Processing With Camera2 Api Android And Opencvcamera2"