Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Getting then manipulating camera images? (http://www.chiefdelphi.com/forums/showthread.php?t=113447)

LukeP 13-02-2013 20:50

Getting then manipulating camera images?
 
Can someone give me their opinion about the best or easiest way to get the image from the camera and then use it to gather information?

We'd prefer to get the image off the CRIO to modify it and stuff then send information back to the robot. So far the only way I've thought of has been using a FTP server for getting the image, but a mentor suggested I look at SmartDashboard, would that work for what we need? Or are there any other ways or suggestions?
I wouldn't mind processing the images on the robot with just the CRIO, but I'm not sure what that'd require or if the hardware in the CRIO would even allow it.

Last year we had problems with the CRIO stalling and I was told it was because it couldn't handle what we were trying to do? (It just doesn't make sense to me because we weren't doing anything major with it?) I wasn't programming it last year so could someone also give me some ideas of what the delays were? (It might have been just the program, the programmer did it in Labview and I don't know much about it.)

Anyways, sorry for the long post, thanks!

Ginto8 13-02-2013 22:09

Re: Getting then manipulating camera images?
 
Miss Daisy's code from last year is a great example of how to use SmartDashboard and OpenCV to process images and then send the data back to the robot.

As for where to do processing, I would definitely advocate doing it on the driver station laptop. You have much more processing power available and your processing is very unlikely to compromise the robot's operations -- it's much harder to lag a laptop than a cRIO. Also, your camera will only stream to one location, while if you're processing on the cRIO and also providing a stream to the dashboard, that's double the bandwidth usage. This can be minimized by having the camera send images to the cRIO with a lower frequency, but it can't be entirely eliminated if both are receiving images.

The image, by the way, is not on the cRIO. All images are streamed directly from the camera, and if you are processing on the laptop, the cRIO does not receive any images at all. SmartDashboard uses the FFMPEG library to retrieve the images from the camera, so you don't have to worry about that bit.

LukeP 14-02-2013 00:53

Re: Getting then manipulating camera images?
 
My original approach was to save the files from the camera to the CRIO, then getting them off the CRIO using an FTP server, and it seemed very inefficient.. But thats why I was saying it was saved to the CRIO.

But thanks for the quick reply and all the information.


All times are GMT -5. The time now is 10:11.

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