For a research project involving Optical Camera Communication (OCC), I need to actively analyze video frames, which I am currently doing offline on my pc using python and opencv (I record the video with my smartphone, then process it afterwards). I want to process the video live by using the camera on my samsung galaxy a40. I am fairly new to android development, so I just want to create a basic application for capturing video and transmitting it to my pc for analysis. My application requires 1080p captures at 30 fps, or better.
I am currently using the Android Camerax API which provides the imageAnalysis use case, which gives me access to the raw images planes: I get an ImageProxy in YUV_420_888 format.
I am still familiarizing myself with the API but have been able to reproduce some basic applications based on online examples. I have 2 concrete questions left:
- What is the best way to serialize and transmit the images to my python application on pc? I was planning on creating a simple TCP connection using sockets, converting the image to bitmap and directly sending it like this. I am however not certain if this approach is very efficient, and I don't know how to convert the image and buffer it. Code examples are certainly welcome. A wired connection (USB cable to my pc) is also possible, but I didn't find any support for that.
- For my application, I need to manually set the ISO and shutter speed values of the camera. I found here how to set those values using the CaptureRequest object in the Camera2 API, but turned towards the CameraX API as I was struggling with this low-level API (as I said, I'm very new to this). Is there a way to set the ISO and shutter speed values in CameraX or do I need to use the Camera2 API?
Any ideas are welcome! Thanks in advance.
from Android Camerax video serialization and transmission + configuring camera parameters
No comments:
Post a Comment