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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login