|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Laptop Based Imaging?
Anyone get it working with c++. It seems like the pages on this topic in the cookbook are yet to be completed.
It shouldn't be that hard, should it? Send image to laptop. Program does stuff with image. Program sends back information needed. Last edited by agartner01 : 08-02-2012 at 21:10. |
|
#2
|
|||||
|
|||||
|
Re: Laptop Based Imaging?
It's even easier than that. You don't have to do an explicit "send image to laptop" step. The Dashboard already gets images directly from the camera.
|
|
#3
|
|||
|
|||
|
Re: Laptop Based Imaging?
Documentation somewhere?
|
|
#4
|
|||
|
|||
|
Re: Laptop Based Imaging?
|
|
#5
|
||||
|
||||
|
Re: Laptop Based Imaging?
I have not looked at this yet but the process will go something like this... start with instructions to create a custom dashboard. You'll add the stuff from the example vision processing app into the custom dashboard. Then add a UDP VI and send the rectangle coordinates to the robot. Google an example of UDP code and implement code to receive the data on the robot. Last, use that data to point your shooter.
HTH |
|
#6
|
||||
|
||||
|
Re: Laptop Based Imaging?
Quote:
So you guys are processing the image on the laptop and sending rectangle coords back to the robot? What kind of frame rate do you get that way? We can only do 3-5 Hz doing all the processing on the robot. TIA |
|
#7
|
||||
|
||||
|
Re: Laptop Based Imaging?
We are getting 21-27 fps after processing, evolutionary selection, and sockets (7 threads, phew!). C# on a modest laptop
Last edited by ~Cory~ : 08-02-2012 at 23:56. Reason: derp'd |
|
#8
|
||||
|
||||
|
Re: Laptop Based Imaging?
We currently have our image processing set up this way. As Alan said, the Driver Station is already getting the image, so we use that one. Then we send the relevant numbers (x position of top target, distance) to the robot over one of the available UDP ports as described in 2.2.9. UDP 1130 to be specific.
The camera has an http server hosting the image, and the driver station and the cRio both request an image from this server. Or perhaps it's just the cRio, and then the cRio forwards it to the DS; I haven't looked at the code in a while. Last edited by Aren Siekmeier : 09-02-2012 at 00:05. |
|
#9
|
|||||
|
|||||
|
Re: Laptop Based Imaging?
Quote:
Quote:
|
|
#10
|
||||
|
||||
|
Re: Laptop Based Imaging?
Thanks for the info - multi-casting sends data from one net node to multiple nodes simultaneously. It sounds like the camera is not doing that, it just sends the image to whomever connects, one at a time. http://en.wikipedia.org/wiki/Multicasting |
|
#11
|
|||||
|
|||||
|
Re: Laptop Based Imaging?
I do know what that is. I just didn't know whether you were aware you were using a term with an established meaning.
|
|
#12
|
||||
|
||||
|
Re: Laptop Based Imaging?
Next time, just assume so ;o)
|
|
#13
|
|||
|
|||
|
Re: Laptop Based Imaging?
We are trying to use a hybrid of LabVIEW on the Data Dashboard and programming the cRIO with C++. Can anyone give some sample code (or point us in the right direction) to open and read from a UDP port in C?
Thanks, Shahrukh |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|