I have a matrix image in the format CV_8UC1, i.e. one byte per pixel of monochrome image data. I need to draw this matrix image using Cairo, i.e. to a Gtk drawing area. Speed is critical, as this image will update quickly and I need to redraw very fast.
What is the best/fastest way to draw this matrix image using Cairo? I’ve tried converting it to a Cairo surface, but I can’t find an OpenCV format that I can convert it to that the Cairo surface will accept.
For example, if I convert my matrix image to CV_32S and then create a surface with the format type CAIRO_FORMAT_RGB24, it will run but the image is very blue, indicating there’s a mismatch between data storage types.