|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
our own allternative code for the cmu camera
We had a lot of problems working with Kevin's tracking code for the CMUcam, so we decided to develop our own. we worked all night (literally) and came up with a program that works with our camera. the program itself tracks the green target and if it doesn't find it, it searches for it. if you also have any problems with Kevin's tracking code (sorry Kevin but we tried
), take a look at what we did, its worth a try.click here to go to our forum and download the code BTW, if you see any bugs or have any suggestions, we will be happy to hear what you have to say ![]() Last edited by Gili : 02-02-2006 at 15:37. |
|
#2
|
|||
|
|||
|
Re: our own allternative code for the cmu camera
I tried the link you posted and got a 3 K file called 1577camera.rar. Where do I go from here?
Quote:
|
|
#3
|
|||||
|
|||||
|
Re: our own allternative code for the cmu camera
I would STRONGLY suggest putting only function forward declarations in the .h file and putting the rest in a .c file...
|
|
#4
|
|||
|
|||
|
Re: our own allternative code for the cmu camera
Quote:
hi nheft! the file you downloaded is a rar file. open it with WinRaR (if you don't have it download from here ). after downloading, extract the files with winrar and follow the instructions in readme.txt. it should be pretty easy from there. if you still have any problems, feel free to ask any question and we will be happy to help . |
|
#5
|
|||
|
|||
|
Re: our own allternative code for the cmu camera
Quote:
ok, we added a .c and changed the .h as you recommended. thanks again! ps. we will be happy to hear more comments.. we are kind of C noobs so tell us what you think ![]() Last edited by Gili : 02-02-2006 at 16:52. Reason: fixed. |
|
#6
|
|||
|
|||
|
Re: our own allternative code for the cmu camera
Thank you
Quote:
|
|
#7
|
||||
|
||||
|
Re: our own allternative code for the cmu camera
Quote:
When is your regional?.....I hope to come, but there are no dates!!!!!! Jon Mittelman Team236 Mentor |
|
#8
|
|||
|
|||
|
Re: our own allternative code for the cmu camera
sorry...i don't know the dates yet...
when i will i'll post them we'll be glad to see you in Israel ![]() |
|
#9
|
||||
|
||||
|
Re: our own allternative code for the cmu camera
Quote:
You can find at at the end of this thread: http://www.chiefdelphi.com/forums/sh...0&page=2&pp=15 Good luck and here's hoping to see you guys in Tel Aviv! Jon Mittelman Team236 |
|
#10
|
|||
|
|||
|
Re: our own allternative code for the cmu camera
Ok I have been testing your code... but I have run into a problem!
At the beginning the camera goes wild and finds the light object... - as either the camera mount moves or the light moves, the camera follows it. If you cover up the camera, the xerror and yerror values turn 0... Camera stands still and nothing happens... as you uncover the camera it detects the light and does a little adjusting... BUT now here is where the problem comes in: - Cover up the camera. (xerror = 0, yerror = 0) - Now move the camera away from the light. - Uncover the camera. - The camera stands still! What if during the competion a robot blocks your camera, and your robot moves away (hence your camera moves away from light)... The camera won't respond until it is shown a glimps of the light. Maybe you should add a piece of code that after a certian amount of time (while xerror = 0 and yerror = 0) to restart the camera and do that wild scan again. Last edited by Calvin : 08-02-2006 at 21:43. |
|
#11
|
|||
|
|||
|
Re: our own allternative code for the cmu camera
Quote:
Code:
if (xerror != 0 && yerror != 0)
track();
I don't know why your camera doesn't perform that search but i know it should... This code works for us very well, but maybe we should add an 'else' after that 'if'. Anyway, are you sure you followed all of the instructions in the readme we made? Last edited by Gal : 09-02-2006 at 08:14. |
|
#12
|
|||
|
|||
|
Re: our own allternative code for the cmu camera
Alrighty I will play around somemore today...
|
|
#13
|
|||
|
|||
|
Re: our own allternative code for the cmu camera
Would you mind sticking one in a zip file online. On Mac OS X there is no standard unrar utility, and I can't find one that does not cost money.
|
|
#14
|
|||
|
|||
|
Re: our own allternative code for the cmu camera
Quote:
I uploaded the zipped file to our forum: http://www.avivrobotics.net/forum/viewtopic.php?p=27 |
|
#15
|
|||
|
|||
|
Re: our own allternative code for the cmu camera
I would suggest you try putting the camera into a place with no lights at all,
Does it restart search if no target is found? Anyways, with a bit modification I was able to have the code restart search (after 5 seconds ) if no target was found... for once we don't want it to restart just because something quickly got in it's way. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Out of the Box Camera Code | russell | Programming | 9 | 21-10-2009 05:28 |
| Problems Combining Camera Code and Driving Code | cmurdoch | Programming | 20 | 10-02-2007 16:34 |
| CMU Camera kills robot controller if not found. | Chris_Elston | Programming | 21 | 27-03-2006 14:30 |
| Team THRUST - Kevin's Code and Camera Code Combine | Chris_Elston | Programming | 3 | 31-01-2005 22:28 |
| CMUCam2 Camera Code - Are important parts commented out? | Mr. Lim | Programming | 4 | 14-01-2005 12:11 |