CMUcam?
Henrymou
Posts: 128
I am having trouble interfacing the CMUcam to my BS2, ok I don't know how to do it at all.
ANYONE know how i can find the distance of a black object, black-black, and "detect' it's presense?
PLEASE HELP!!!!!!!!
ANYONE know how i can find the distance of a black object, black-black, and "detect' it's presense?
PLEASE HELP!!!!!!!!
Comments
Here's two things to get you started:
1) you can't find the distance to an object with a CMUcam. It's NOT a distance sensor. Use another sensor, like a Shatp IR sensor or a PING)) sonar.
The only exception is that you can judge the distance to some known objects by seing how many pixels of the object color are in te field of view.
2) Black is just like any other color for the camera. look at example codes that either came with the camera, are on the Parallax website, or are posted for the many online projects you can google for. Then read the up on the TW and TC commands to see how they work.
You'll be tracking black in no time.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
search around here for laser and CMUCAM and you will bump into a link to a site that tells how.
As far couling to the BS2 - I havn't done it yet.
Let us know how.
At 17 frames per second, CMUcam can do the following:
The first line says it will track objects which are bright or colorful, black is neither bright nor colorful. Thier example object is typically a magenta ball, why a magenta ball? Because it's very colorful and not many objects are magenta, so the CMUCam can easily find it and keep track of it. Not only is black not colorful, but black objects are extremely common. As I look in my office, the black objects at BOE-BOT level are:
There is no way a CMUCam could track a black object unless you sterilize your environment (this means removing all black items from it's view except the object to be tracked).
Please stop generating multiple threads in multiple forums on the same subject, this is called cross-posting and is against forum guidelines. The guidelines are here: http://forums.parallax.com/showthread.php?p=467912
If you have any questions about the guidelines, we'll be happy to answer them for you.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Post Edited (Paul Baker (Parallax)) : 3/1/2007 11:10:59 PM GMT
I just wan to get the CMUcam to see the object when it enters the full screen, how do i transfer that data to a BS2?
So if you maintain a static scene, especially if you can set it to a neutral scene (everything is a solid color that isn't the same color as the object), you can use the color statistics to determine if the object is present in the scene.
This isn't a begginer's task, it requires some mathmatics to accomplish it. I understand you are facing a deadline, can you precisely explain what it is you are trying to do at this competition and how far away it is?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Post Edited (Paul Baker (Parallax)) : 3/2/2007 5:46:52 AM GMT
Do you understand how to get the CMUcam to do what you want? If not, are you asking one of us to figure that out for you? If you do know, could you write up a "pseudo-program", a description of specifically what you need to communicate to the CMUcam and what you would get back? We can certainly help you with the issue of getting the BS2 to talk to the CMUcam, but you're going to have to do most of the work yourself. Usually on these forums, people not only post their overall idea, but a description of what they've done so far, what works and what doesn't seem to work, and what seems to be going wrong.
If you truely don't even know how to get the CMUcam and BS2 to talk to each other, you'd better read the CMUcam manual and the PBasic Manual's sections on the SERIN/SEROUT statements. If those don't make sense, then you're going to have to go back and work through some of the Stamps in Class tutorials to get the basic concepts involved.
This is as far as I can help you on the theory of how to do it. If you don't understand what I have said, read the User manual carefully, and research the topic some. If you still don't understand, then this project should be reserved until you have a little more experience under your belt.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Post Edited (Paul Baker (Parallax)) : 3/2/2007 10:52:32 PM GMT