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.

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.

Documentation somewhere?

Hey Alan, is the camera multi-casting the image to both the cRIO and the dashboard?

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

We are getting 21-27 fps after processing, evolutionary selection, and sockets (7 threads, phew!). C# on a modest laptop

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.

I don’t know what you mean by multi-casting. I know the camera supports multiple simultaneous MJPEG connections. The Dashboard makes one such connection. Vision processing on the cRIO makes another. You could probably do a direct connection from a web browser to the camera and get a third stream going at the same time.

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.

I haven’t done any serious timing, but it looks close to full motion video. Definitely better than 10 frames per second. This is on an E11 Classmate.

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.

 ^^^

I do know what that is. I just didn’t know whether you were aware you were using a term with an established meaning.

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

Next time, just assume so ;o)

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