Electronics > Electronics

Cam, object detection



i just deleted the whole text i wrote down here

i'll make the question alot shorter:

how can i make a cam look for a colour? just filter out the colour i want?
and how do i get the signal it gives me to a µc?

i dont think the signal will look like 0 2 5 0
                                                  0 3 5 9
                                                  1 6 8 0
                                                  5 9 8 0
numbers r intensities of the colour

and then filtered 0 0 0 0
                        0 0 0 0
                        0 1 0 0
                        0 0 0 0
and '1' representing the colour blob

i dont know what the signal looks like, so im basically walking in the dark :(

it's late over here atm, goeing to bed now.
hope u guys can help me.



--- Quote ---how can i make a cam look for a colour? just filter out the colour i want?
--- End quote ---
there are many ways to do it. the method id use is middle mass. just find the average X and Y
location of all pixels of that color in the matrix.
the location can then be used for your robot to decide what to do.

--- Quote ---how do i get the signal it gives me to a µc?
--- End quote ---
the camera sends the data over serial, and your µc can save the stream into a matrix

the actually data sent greatly depends on the camera.

you will see some start bit info
a stream of numbers (depends on camera resolution, amount of color, compression, etc.)
end bit info

the stream is the part that you record into the matrix.

find the camera you want to use, and read the datasheet. it should tell you what info it sends. you can probably also found source code to read in the datastream from the camera you want by searching for it.

here is some source code you might be interested in:

the cmucam manual here, on page 56:
has an example of the datastream. in this case, it is already processed data, so you dont (although you can set it up for this) see the image data itself.

lastly, search this forum for 'camera' as other people are doing cam vision too.

ps - ive only used the CMUcam with a microcontroller, and webcams that interface with a PC, for robots. ive never used a regular camera directly with a microcontroller . . . anyone else have thoughts?

just ran into this today

might be helpful

Computer Vision and the Spectronix RamCam


[0] Message Index

Go to full version