Description
I have just tried upgrading my version of image from 0.23.14 to 0.24.0 and found my code having issues due to the removal of BGR from DynamicImage as per issue #1482. I am creating a new issue as this is now a closed request from a few months ago now.
I work with both Academic and Commercial organizations that make heavy use of OpenCV and machine learning algorithms. My role over many years has been to interface with their software to write efficient programs integrating with both other software and hardware. All of the organizations I work with still either use OpenCV as a base (and thus BGR), or their custom hardware produces imagery in BGR format.
As OpenCV uses the BGR format by default, the removal of this format from this library is rather... disappointing. I work with making real-time software and it is rather costly to be byte swapping entire 4K images twice (as I also would have to convert back) for high FPS video streams. On my personal machine with a Ryzen 3700X at 3.6GHz, running a benchmark on this conversion takes an average of 22.3ms which is much slower than just receiving frames from a 60 FPS video stream (16.6ms) and 2/3 of a 30 FPS video stream (33.3ms). The mobile devices I also have to work with are slower and nowhere near as efficient, and also wanting to conserve battery power depending on the device.
While I understand that keeping BGR as some additional code to maintain, the sacrifice of efficiency for this is unfortunate. In my area of industry BGR is still very much a normal format to be working with.
I am honestly in quite a bind - currently I have the choice to stick with older libraries as this update is quite a new version. I can't stay on old versions forever, and the organizations I am working with won't be changing format. I have found using this crate absolutely amazing over the years.