OpenCV and Processing 6

To perform the same image loading task in OpenCV, we use the imread() function in the Imgcodecs module. The function was in the Highgui module before. The image loaded in the Mat data structure is in BGR format. We shall use the split and merge commands to align the proper channels. Finally, we use a byte array to transfer the pixels information to the pixels[] array of a PImage object.
Continue reading “OpenCV and Processing 6”