Reputation: 324
I want to capture the motion of a red paper on a white background in Linux using Python? I will be using OpenCV and an image library to create images at 30fps. Is there a way I can detetmine the position of the red paper (or a point on it) without going through every pixel in the image, since that would make it horribly slow. Or is there a better way of doing this altogether?
The code for reading the webcam is posted here.
Upvotes: 0
Views: 330
Reputation: 52646
Here is the full code, but for yellow paper. Change color range in line 18 for red color. And it works only if single yellow paper is present.
And here is another code for the same, but now it works even if more than one yellow paper is present. Again change it to red yourself.
Upvotes: 2