I have a project where i want to detect a red rectangle marker in my image. For thresholding the color, i will use the CieLAB color space. Because converting the whole image is slow, my approach is to iterate through every pixel in a raster and compare only those pixels to initially find a region.
However, i can't find a way to efficiently convert a single color to a different color space in OpenCV. cvtColor is apparently quite slow with a 1-vector (and the vector feels unnecessary). I could develop my own color conversion algorithm, but i don't think this is trivial regarding border cases and code optimization in c++ (which i am rather new to).
This feels like a very basic thing to me, has anyone done this already?