camera resolution on hires camera
-
I have run the hires camera as well as the voxl-tflite-server by using the commands
voxl-streamer -c tflite-overlay
and
voxl-streamer -c hires
However the resolution is much lower then 4K. I have navigated to the /etc/modalai/voxl-streamer.conf file
and changed the width x height of the hires and the tflite-overlay to 3840 x 2160 however the output still looks like its poor resolution even though the config file is changed. Can someone help me with this? I have tried to change the config on multiple voxls but the video feed is still low quality. -
@colerose You are still streaming at a 1Mbps bitrate. For high resolutions you will need to increase that to get a better picture.
-
This post is deleted! -
I have upped the bitrate and the resolution for the hires and the tflite-overlay in the voxl-streamer.conf file.
I've also upped the resolution to match the tflite-overlay and the hires in the voxl-camera-server.conf file. I'm still not really seeing an improvement in the output on voxl-portal.
Can someone please give me some recommended settings for a higher resolution? Its a hires camera so I would have assume that that would've shipped as the default with the payload.
This is my voxl-streamer.conf
{ "configuration": "tracking", "hires": { "input": { "interface": "mpa", "mpa-camera": "hires_preview" }, "output": { "stream": { "rotation": 0, "width": 1920, "height":1080, "decimator": 2, "bitrate": 10000000 } } }, "hires-logo": { "input": { "interface": "mpa", "mpa-camera": "hires_preview" }, "output": { "stream": { "rotation": 0, "width": 640, "height": 480, "decimator": 2, "bitrate":1000000 } }, "overlay": { "location": "/etc/modalai/modalai.png", "offset_x": -1, "offset_y": -1 } }, "stereo": { "input": { "interface": "mpa", "mpa-camera": "stereo" }, "output": { "stream": { "width": 640, "height": 960, "decimator": 2, "bitrate": 1000000 } } }, "tracking": { "input": { "interface": "mpa", "mpa-camera": "tracking" }, "output": { "stream": { "width": 640, "height": 480, "decimator": 2, "bitrate": 1000000 } } }, "dfs-disparity": { "input": { "interface": "mpa", "mpa-camera": "dfs_disparity" }, "output": { "stream": { "width": 640, "height": 480, "decimator": 2, "bitrate": 1000000 } } }, "qvio-overlay": { "input": { "interface": "mpa", "mpa-camera": "qvio_overlay" }, "output": { "stream": { "width": 640, "height": 544, "decimator": 2, "bitrate": 1000000 } } }, "tflite-overlay": { "input": { "interface": "mpa", "mpa-camera": "tflite" }, "output": { "stream": { "width":1920, "height": 1080, "decimator": 2, "bitrate": 10000000 } } }, "hdmi-mpa": { "input": { "interface": "mpa", "mpa-camera": "v4l2" }, "output": { "stream": { "width": 640, "height": 360, "decimator": 2, "bitrate": 1000000 } } }, "gphoto2-mpa": { "input": { "interface": "mpa", "mpa-camera": "gphoto2" }, "output": { "stream": { "width": 640, "height": 360, "decimator": 2, "bitrate": 1000000 } } }, "video-test": { "input": { "interface": "test", "frame": { "width": 1280, "height": 720, "format": "uyvy" } }, "output": { "stream": { "rotation": 0, "width": 640, "height": 360, "rate": 15, "bitrate": 1000000 } } }, "uvc-video": { "input": { "interface": "uvc", "device": "/dev/video0" }, "output": { "stream": { "rotation": 0, "width": 640, "height": 360, "rate": 15, "bitrate": 1000000 } } } }
and here is my voxl-camera-server.conf
{ "version": 0.2, "port_J2": { "name": "hires", "enabled": true, "type": "hires", "api": "hal3", "frame_rate": 30, "override_id": -1, "auto_exposure_mode": "isp", "preview": { "enabled": true, "width": 1920, "height": 1080, "format": "nv21" }, "video": { "enabled": false, "width": 1024, "height": 768, "format": "h265" }, "snapshot": { "enabled": false, "width": 1024, "height": 768, "format": "jpg" } }, "port_J3": { "name": "empty", "enabled": false }, "port_J4": { "name": "empty", "enabled": false } }
-
The default hires sensor that comes on the m500/flight deck is the M0025 which is a close range camera focused to around 2 feet meant for close up inspection. If you're seeing poor quality images past 2-3 feet then the issue could be that the lens isn't right for your application. If you're looking for a more medium to long range focused camera, we also have the M0024 based on the same IMX214 sensor.
-
I am seeing poor quality images up close as well. Is there a recommended change that I could make to the height, width, and bitrate in the voxl-camera-server.conf and voxl-streamer.conf files to get good resolution for close up objects?
-
If you're not seeing any good quality images it could be that the lens is out of focus, you can twist the outer plastic on the front of the camera to focus it. Could you upload some images that you're seeing so that I can take a look and possibly help more.
-
I usually test these things with Ethernet instead of a wireless connection to make sure that I have enough bandwidth on the link. I set the bitrate to 50000000 (50Mb). My current test setup has an IMX230 4K sensor instead of the IMX214 4K sensor but the results should be similar. I also use VLC on a Linux box on my local network (also with Ethernet) to view the video. Here are photos of my setup and the results of 640x360 vs 1920x1080. The 1080p is clearly better.
-
Thanks @Eric-Katzfey! I have been able to successfully increase the resolution on the hires camera by modifying the files as you described them below. However, once I do so, running the voxl-tflite-server and then running voxl-tflite-overlay no longer shows the detections. I can see the camera stream in a higher resolution on the Tflite tab in voxl-streamer (and by connecting through opencv) however there are no detections happening when running the voxl-tflite-server in debug mode and when viewing the streamer. Any idea why this might be happening?
-
That sounds more like an @Matt-Turi or @Alex-Gardner question.
-
You are not seeing any detections on the overlay because the tflite server expects our default input image size, then resizes it down to 300x300 for model execution. In order to run with 1920x1080p resolution, you must change line 287 of models.cpp to match:
mcv_init_resize_map(1920, 1080, model_img_width, model_img_height, &map); // This would for 1920px width, 1080px height
Then, as long as your skip_n_frames parameter is set to 0, voxl-streamer will be able to display the output correctly.
-
If you use the dev opkg repo, there is now a new version of voxl-tflite-server (v0.1.2) that will handle any input size, and color output with the hires cam by default.
-
Thanks @Matt-Turi! I'll give this a shot!
-
Hello @Alex-Gardner I'm currently using M0025 sensor which is by default with VOXL-Flight deck. I read your comment above that the sensor M0024 would be a better choice for medium to long range application. Is there a way to integrate M0024 sensor with the voxl-flight deck? I understand that the sensor size is a little big and it won't fit in the space that's being designed for the default sensor.
-
We don't sell any platforms with the M0024 sensor onboard by default. If you're just trying to use it for color fpv/more general inspection I'd suggest just VHB taping it to the front, if you're trying to use it for hyper-accurate detections you'll have to modify one of our platforms or design your own (as most of our platforms are meant to serve as reference designs and not full production hardware).