Closed gemblerz closed 4 years ago
"pixel_format" makes sense to me. I am going to make the change before merging this.
Sounds good - yeah, it's just to future proof it a bit more. Feel free to merge after updating it.
The bgr2rgb parameter is replaced with pixel_format,
[
{
"name": "Bottom Camera Video",
"match": {
"id": "image_bottom",
"type": "camera/video",
"orientation": "bottom",
"resolution": "800x600"
},
"handler": {
"type": "image",
"args": {
"url": "http://playback:8090/bottom/image.jpg",
"pixel_format": "rgb"
}
}
}
]
Nevertheless, the default is set to rgb
therefore no need to specify if rgb images needed.
As of now, bgr
and rgb
are the only conversions supported.
OpenCV provides BGR images natively. Some machine learning models are trained against RGB images and it will be much better if the data-shim supports bgr2rgb conversion for such models. Since open_data_source uses data-config.json, users need to declare
bgr2rgb: false
inargs
section inside the file. By default, I propose bgr2rgb conversion is enabled. An example is below,