I´m working with OpenCV and I have an image which has red, black and white colours. Specifically it's a QR code sourronded by a red square. What I wanna do is to dismiss the QR code and just keep the red square. This is what i've been trying to do:
#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
using namespace std;
int main(){
Mat imagen, imagenThreshold, imagenThreshold2;
vector<Mat> canales;
imagen = imread("qr.ppm");
split(imagen,canales);
imshow("RGB", canales[2]);
return 0;
}
But after I run it, what I have left is the QR code WITHOUT the red square, exactly the opposite of what I want.
What am i doing wrong?
thanks