I want to change certain color to another through matrix calculation in real time camera preview. So, I need frame matrix and modify it. but i can't find the way to do this in camerax. Does ImageAnalysis can do this?
how to modify output frame of camerax preview? I'm not looking for colorfilter like grayscale or something. I want to change certain range of colors to some color in real time, for example change red-orange to light blue.
CameraX recommends editing preview/video output with the CameraEffect API. You will have to use OpenGL to edit the content of the stream, which is the most compatible/efficient way. ImageAnalysis
only provides CPU buffer which is suboptimal in terms of performance.
As for code samples, you can checkout the OverlayEffect class in CameraX's code base. The class will soon be released as part of CameraX API too. But since you want to do more than just overlay, you probably need to fork the class and update the code.