so since I am relatively new to programming I would need a little help with that problem. I am using SimpleCV with Python 2.7 on a Windows Computer. What I am trying to do is to get a (selfwritten) program to tell me the values of the pixels along a preset line, the most important thing here would be the color of each pixel.
I don't really know where to start since I only found examples where it was asked for the values of a single pixel.
What would probably also be important to know is that I don't want to do that with a picture but with a live video made with a webcame and the preset line will be the radius of an object I will track with the webcame.
So to sum it up: I want to track an object with my webcam and need a program to tell me the color (in numbers, so for example "255" for white) of each pixel along he radius line of the tracked object.
This is a prewritten code I am currently using for obejct tracking:
print __doc__
import SimpleCV
display = SimpleCV.Display()
cam = SimpleCV.Camera()
normaldisplay = True
while display.isNotDone():
if display.mouseRight:
normaldisplay = not(normaldisplay)
print "Display Mode:", "Normal" if normaldisplay else "Segmented"
img = cam.getImage().flipHorizontal()
dist = img.colorDistance(SimpleCV.Color.BLACK).dilate(2)
segmented = dist.stretch(200,255)
blobs = segmented.findBlobs()
if blobs:
circles = blobs.filter([b.isCircle(0.2) for b in blobs])
if circles:
img.drawCircle((circles[-1].x, circles[-1].y), circles[-1].radius(),SimpleCV.Color.BLUE,3)
if normaldisplay:
img.show()
else:
segmented.show()
here is a snapshot of the tracked object
I need the pixels color along the radius because I want to know how the light intensity decreases going from the center to the rim.
Does anybody maybe have an idea how to approach this problem? Thank you!