I have an application which can accept images as byte data in many different formats. Under the covers, the application uses both custom code and opencv conversion methods to convert those images into formats that we can use.
I am attempting to write some unit tests to add images into our library in many different formats to make sure that the application works and that the application performance isn’t negatively affected by the different formats.
To do this, I figured I would create a tool which can load a JPEG and then use opencv’s conversion methods to convert the image from the BGR format that opencv loads it in into all the different input formats we accept. Unfortunately, it seems that OpenCV provide support for converting into the RGB space, but not so much support in the other direction (say RGB to YUV_NV21).
Are there any other libraries or applications that I could use to do this?
It would be nice if I could do the conversions as part of the unit tests and just iterate over all the different formats, but if I need to generate the inputs ahead of time as binary data files, that would be ok too.
Thanks in advance.
EDIT: When I say image format, I don’t mean a compressed image format, like JPEG or PNG. I mean the different raw image formats, like RGB, RGBX, YUV (in all its different formulations) etc.
You may be interested in Intel’s IPP. It has plenty of color conversion routines. It’s not free, though.