I'm looking to invert an image, such that black would become white.
I'm using the C++ OpenCV. The documentation seems to suggest that:
cv::subtract(cv::Scalar:all(255),src,dst);
would work. It doesn't, though it compiles.
I know I can go through pixel by pixel, but I am writing a application that processes live video and need to take advantage of whatever optimizations I can.
Any suggestions are appreciated! I feel like I'm missing something, because the subtract function doesn't appear to be overloaded from looking at the header file...