voxl-camer-server's hires snapshot produce huge files
-
I tried to use hires' snapshot to capture 4K images. But because the size of the image produced is huge, the disk filled up very quickly.
The size of jpeg file is around 48M. If I use imagemagic to convert it to png, the size reduced to 3.7M. I then use imagemagic again to convert it to jpeg, the size is only 740K.
Browsing through the code of hal3_camera_mgr.cpp, in WriteSnapshot() just writes the whole allocated buffer to file. Is there any variable indicates the real size of data produced by the camera module?
Thanks!
-
I found out this https://android.googlesource.com/platform/frameworks/av/+/master/services/camera/libcameraservice/device3/Camera3OutputStream.cpp#1337
Is function android::camera2::JpegProcessor::findJpegSize() available on voxl?
Thanks!
-
I extract the findJpegSize function, add to voxl-camera-server. Now it will produce the correct size snapshot.
Reading along? Create a free ModalAI Forum account to join in.
With an account you can reply, ask your own question, get an email when a ModalAI engineer answers, and mark the reply that solved it. Your place in each thread is saved between visits.
Questions about VOXL, Flight Core, ESCs and ModalAI drones are answered here by the engineers who build them.
Register Login