Edge detection on colored background using OpenCV
I use Python, but the main idea is the same. If you directly do cvtColor: bgr -> gray for img2, then you must fail. Because the gray becames difficulty to distinguish the regions: Related answers: How to detect colored patches in an image using OpenCV? Edge detection on colored background using OpenCV OpenCV C++/Obj-C: Detecting … Read more