Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Laptop Based Imaging? (http://www.chiefdelphi.com/forums/showthread.php?t=102315)

agartner01 08-02-2012 21:07

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.

Alan Anderson 08-02-2012 23:11

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.

agartner01 08-02-2012 23:32

Re: Laptop Based Imaging?
 
Documentation somewhere?

wireties 08-02-2012 23:43

Re: Laptop Based Imaging?
 
Quote:

Originally Posted by Alan Anderson (Post 1122822)
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.

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

~Cory~ 08-02-2012 23:55

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

Aren Siekmeier 08-02-2012 23:58

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.

Alan Anderson 09-02-2012 00:04

Re: Laptop Based Imaging?
 
Quote:

Originally Posted by wireties (Post 1122861)
Hey Alan, is the camera multi-casting the image to both the cRIO and the dashboard?

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.

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.
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.

wireties 09-02-2012 00:10

Re: Laptop Based Imaging?
 
Quote:

Originally Posted by Alan Anderson (Post 1122887)
I don't know what you mean by multi-casting.


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

agartner01 09-02-2012 00:12

Re: Laptop Based Imaging?
 
Quote:

Originally Posted by agartner01 (Post 1122848)
Documentation somewhere?

^^^

Alan Anderson 09-02-2012 00:15

Re: Laptop Based Imaging?
 
Quote:

Originally Posted by wireties (Post 1122892)
...multi-casting sends data from one net node to multiple nodes simultaneously.

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

wireties 09-02-2012 00:44

Re: Laptop Based Imaging?
 
Quote:

Originally Posted by agartner01 (Post 1122894)
^^^

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

wireties 09-02-2012 00:47

Re: Laptop Based Imaging?
 
Quote:

Originally Posted by Alan Anderson (Post 1122896)
I do know what that is. I just didn't know whether you were aware you were using a term with an established meaning.

Next time, just assume so ;o)

shahrukh 17-02-2012 09:09

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


All times are GMT -5. The time now is 12:30.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi