I am working with an existing codebase that creates CVD images from a webcam before doing processing. My aim is to run marker detection on this image for augmented reality before the rest of the processing happens and I am planning to do this using ArUco. The problem is that ArUco takes in a OpenCV image in order to detect the markers.
I am thinking of manually creating this OpenCV image from the CVD image by manually accessing each pixel of the CVD image and sticking the RGB values into a new OpenCV image. I am not too familiar with working with C++ but surely there is a better way of doing this?
I use something like this. The type for myImage is a (custom) image type that stores the 3 bytes for each pixel of the image in consecutive bytes of memory, and myImage.data() is a pointer to the start of that memory. If your CVD image (which I’m not familiar with) is laid out in a similar way, you can do the same.