Hi i wanted to eliminate gray color from my image, i just need black or white
So i used this code,but in beagle bone black and in some computers, code crashes but in my laptop it works fine what is happening?
code: typedef cv::Point3_<uint8_t> Pixel; for (Pixel &p : cv::Mat_<pixel>(frame)) { if(p.x<127 ||p.y<127 ||p.z<127 ) { p.x = 0; p.y = 0; p.z = 0; } }
my compilers gives me this error: OpenCV Error: Bad argument (The total number of matrix elements is not divisible by the new number of rows) in reshape