|
Re: Detecting countours
The problem that people are trying to point out is that your CenterX1 will have to be EXACTLY that value for it to return true. It's not easy to move the robot to the exact pixel position you want, or at least it's typically not necessary to be that exact.
What MuskieProgramme correctly suggests is to give it an acceptable margin of error. In his example code, it will return true if CenterX1 is within 10 pixels of 237. Your acceptable error may be different.
__________________
|