Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Sending Image from Camera to GRIP (http://www.chiefdelphi.com/forums/showthread.php?t=149440)

GRSICP 07-14-2016 04:12 PM

Sending Image from Camera to GRIP
 
Hi Everyone!

Our team did not use vision tracking this year so we are spending some time this summer figuring it out. We have learned how to process an image in GRIP and how to read the Network Tables in eclipse. However, we do not understand how to send an image from a live camera feed to GRIP. We are using a Logitech c270 HD Webcam and code in Java. Any tips or advice would be appreciated!

Thanks!
Greta
Team 5822 WolfByte

Jayd009 07-17-2016 12:35 PM

Re: Sending Image from Camera to GRIP
 
If you are running GRIP on the driver station laptop or roboRIO, you can add the camera by clicking on Add Webcam in the sources section of GRIP. This section is in the bottom left corner of the window.



If you are trying to run GRIP on a Raspberry Pi, you'll have to follow the steps in this guide.

GRSICP 07-19-2016 02:58 PM

Re: Sending Image from Camera to GRIP
 
We tried that but cannot add the USB camera feed from the rio. Is there another way to access it?

GoldenGollem 07-21-2016 10:08 PM

Re: Sending Image from Camera to GRIP
 
Quote:

Originally Posted by GRSICP (Post 1597539)
We tried that but cannot add the USB camera feed from the rio. Is there another way to access it?

Have you been able to access the camera via the RoboRio Webdashboard.

ahartnet 07-22-2016 12:10 PM

Re: Sending Image from Camera to GRIP
 
Quote:

Originally Posted by GRSICP (Post 1597539)
We tried that but cannot add the USB camera feed from the rio. Is there another way to access it?

A couple of things:

1) I don't believe GRIP can use the camera if you're also sending that information to the driver station. So if you have robot code opening up the camera, it'll hog it and grip will not be able to see it
2) So if your robot code would normally open webcamX, then your GRIP code should now open webcamX instead
3) My opinion is that running GRIP on the roboRIO is to slow for anything other than learning a little bit about vision processing. If you have the resources to get a Kangaroo PC (~$100) I would highly recommend that instead. Additionally, there are instructions for using a raspberry pi.
3a) some extra context: If I recall, robot code wants to use about 60% of the processor running fairly basic robot code. GRIP also wants about 60% of the processor if you have what I would consider a reasonable quality image for vision processing. In my experience, we couldn't reduce the delay to much less than 2-3 seconds running grip on the roboRIO, even with reducing the quality of the image substantially.

Good luck

GRSICP 07-24-2016 09:05 PM

Re: Sending Image from Camera to GRIP
 
Quote:

Have you been able to access the camera via the RoboRio Webdashboard.
Yes we have

Quote:

1) I don't believe GRIP can use the camera if you're also sending that information to the driver station. So if you have robot code opening up the camera, it'll hog it and grip will not be able to see it
2) So if your robot code would normally open webcamX, then your GRIP code should now open webcamX instead
3) My opinion is that running GRIP on the roboRIO is to slow for anything other than learning a little bit about vision processing. If you have the resources to get a Kangaroo PC (~$100) I would highly recommend that instead. Additionally, there are instructions for using a raspberry pi.
3a) some extra context: If I recall, robot code wants to use about 60% of the processor running fairly basic robot code. GRIP also wants about 60% of the processor if you have what I would consider a reasonable quality image for vision processing. In my experience, we couldn't reduce the delay to much less than 2-3 seconds running grip on the roboRIO, even with reducing the quality of the image substantially.
Thank you so much for the advice! Would you recommend a Kangaroo PC or a raspberry pi?

ahartnet 07-24-2016 10:19 PM

Re: Sending Image from Camera to GRIP
 
I haven't used the raspberry pi. The kangaroo worked great, but there are a couple of gotchas. Mainly that the kangaroo will use the other ethernet port from the 2016 radio. Meaning toy either need an extra router, or be ok only connecting wirelessly


All times are GMT -5. The time now is 08:20 AM.

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