Real-time image processing Camera Android2 api

I am very new to android. I am trying to use the new Android Camera2 api to create a real-time image processing application. My application requires maintaining a good FPS speed. Following some examples, I was able to perform image processing inside the onImageAvailable (ImageReader reader) method, available with the ImageReader class. However, by doing this, I can only get a frame rate of about 5-7 FPS.

I saw that it is recommended to use RenderScript to handle YUV with Android camera2 api. Will I use RenderScript to get higher FPS rates? If so, please, can someone help me on how to implement this, as I am new to android. I find it difficult to understand the concepts of Allocation and RenderScript. Thank you in advance.

+4
source share
2 answers

, . (.. ), YUV (, jpeg). , n , n YUV. , YUV:

 byte[] intensity = new byte[width*height];
 intensity = Arrays.copyOfRange(data, 0, width*height);
+1

fps :

characteristics.get(CameraCharacteristics.CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES);

fps :

mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AE_TARGET_FPS_RANGE, bestFPSRange);

, , .

, LEGACY , , 30 1080p (S5, Z3 Compact, Huawei Mate S HTC One M9). , , - (LG G4), FULL-.

Renderscript , onImageAvailable. , LEGACY, API Camera2 , -, , 30 . , Renderscript , Surface .

, ... API, 30 . , , , .

0

Source: https://habr.com/ru/post/1627348/


All Articles