android - Take snap shot from preview for realtime processing -


i working on camera2basic sample , try understand capturing routine. seems cameracapturesession.capturecallback listen mstate. if state_waiting_lock , afstate == null method capturestillpicture() executed, capturerequest.builder capturebuilder setup , cameracapturesession captures target mimagereader.getsurface capturebuilder.

afterwards imagereader posts new imagesaver(reader.acquirenextimage()) mbackgroundhandler, executes it's method run() write bytebuffer image plane fileoutputstream.

now listen state state_preview capture image data , safe in buffer realtime processing. compare preview previous captured result preview. experience android small. so, happy, if give me hints, how manage image buffering. how can work directly image data? think whole processing should work directly in main thread instead of background thread?!?


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -