I was about to order the NXTCam-v4, and I figured rather than risking the possibility of wasting $150, I'll just ask.
Does NXC have full compatibility with the NXTCam, and if so, how does the language work with the camera while on the brick? I know thats kind of a vague question, so what I'll clarify with a lot of little subquestions. I'm asking if the data is:
a) a series of still-images (sorta like frames but spaced out by more time or the same amount of time)
b) a video processed in real-time (as it is recorded)
c) a video processed after the fact (like a video file that gets processed a few seconds later?
d) Is there sound? if there is, how is that processed?
This may seem like a lot, but the questions have short answers.. relatively short.
how does NXTCam work with NXC?
Re: how does NXTCam work with NXC?
I don't have the V4, but I have the V3 and I've tinkered with its firmware so I think I can answer your questions:
There is a way to make the camera return actual pixel data but that's a slow process because you are limited by how quickly the data can be pulled by the NXT over the I2C connection.
So the main question is, what do you intend to do with it?
- Xander
No, the data returned with the standard firmware is a collection of coordinates of up to 8 tracked objects and their matched colour range. So for example, if you have light red to dark red (in RGB values) set as colour range 1, it will do pixel based matching on those colours and if they match, it will try to find the smallest enclosing square that matches those pixels. It can track up to 8 objects at any time and up to 8 colour rangesa) a series of still-images (sorta like frames but spaced out by more time or the same amount of time)
It is live, at about 30fps.b) a video processed in real-time (as it is recorded)
No, it doesn't store anything, the data is pulled from the camera chip and pulled into the ATMega for processing, it does process the info line by line.c) a video processed after the fact (like a video file that gets processed a few seconds later?
No sound.d) Is there sound? if there is, how is that processed?
There is a way to make the camera return actual pixel data but that's a slow process because you are limited by how quickly the data can be pulled by the NXT over the I2C connection.
So the main question is, what do you intend to do with it?
- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
-
- Posts: 20
- Joined: 16 Feb 2012, 22:59
Re: how does NXTCam work with NXC?
I know this sounds like a lazy use for it, but I live in a dorm, so at first, I am going to try to have the NXT do the relatively simple but annoying task of changing the garbage when I tell it to. I don't need the NXT to recognize when the garbage needs to be changed, (I'll do that by activating him) but there are a few objects I need him to be able to recognize...
there is:
1. the garbage can
2. the old garbage bag
3. the actual garbage (not the individual pieces, just the level at which the garbage reaches in the garbage can, so that the NXT can try to prevent some from falling out)
4. the old garbage bag
5. the new garbage bag
the biggest difficulty I can foresee is recognizing the garbage... Since there can be anywhere from 0 to like ∞ pieces of garbage, I feel like that may be more than 8
there is:
1. the garbage can
2. the old garbage bag
3. the actual garbage (not the individual pieces, just the level at which the garbage reaches in the garbage can, so that the NXT can try to prevent some from falling out)
4. the old garbage bag
5. the new garbage bag
the biggest difficulty I can foresee is recognizing the garbage... Since there can be anywhere from 0 to like ∞ pieces of garbage, I feel like that may be more than 8
First off, how can the program make the camera return the actual pixel data? And secondly,when you say that making the camera return pixel data is a 'slow process', how slow do you mean... for instance would it take minutes, seconds or miliseconds or some smaller denomination of time to get every pixel on the screen?There is a way to make the camera return actual pixel data but that's a slow process because you are limited by how quickly the data can be pulled by the NXT over the I2C connection.
Re: how does NXTCam work with NXC?
I don't think the NXTCam is suitable for what you intend to try and do with it. Unless you know what colour range your garbage is going to be, you won't be able to distinguish it from the rest of the data.
The process takes quite a number of seconds. Here's a demo Andy made a while back with the V3: http://www.youtube.com/watch?v=9ppNCzDb7lU
- Xander
The process takes quite a number of seconds. Here's a demo Andy made a while back with the V3: http://www.youtube.com/watch?v=9ppNCzDb7lU
- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
-
- Posts: 20
- Joined: 16 Feb 2012, 22:59
Re: how does NXTCam work with NXC?
is there some other NXT accessory that can do better what I intend to try and do with the cam?I don't think the NXTCam is suitable for what you intend to try and do with it.
hmm, I see what you mean, that IS a slow process... I can't predict the color range of the garbage, but I can say != the bag or the can or the wall behind it... but as for the problem of the slowness, is there a way I can add more 12C connections to the cam, so the data can be retrieved from all of them?
Who is online
Users browsing this forum: No registered users and 3 guests