image-reader

Android Camera 2: ImageReader's Images Have no Stride Values

為{幸葍}努か 提交于 2020-06-29 04:44:40
问题 I've been trying to route the images from the camera to an ImageReader so that I can manipulate the images directly using the Camera2 API. When I have the capture session stream to a SurfaceView, the stream works just fine. When I then set the capture session stream to my ImageReader, I notice that the images are somehow invalid. In my ImageReader's OnImageAvailable callback function, I pull the next available Image and try to read it. This is where I have the problem. The Image isn't null

Why is Android's ImageReader class so slow?

假装没事ソ 提交于 2019-12-22 10:07:28
问题 I tried OpenCV for Android 3.4.1's brand new JavaCamera2View but it was too slow(~15fps for just showing camera view). When I tried the older JavaCameraView instead, it gave me good results(~30fps, which is the limit of my camera). I wondered the reason why Camera2 version was so slow and looked into the implementation. I commented out all processings and renderings of the image (just letting the camera draw to internal ImageReader object and then reading it off using acquireLastImage()