Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   GRIP Overlaying Contours Onto Images (http://www.chiefdelphi.com/forums/showthread.php?t=142804)

Manusha4Lyfe 29-01-2016 22:49

GRIP Overlaying Contours Onto Images
 
I was wondering if it is possible to overlay contours detected in GRIP back over the original image feed :confused: . Thanks for your replies ;) ::ouch:: ::rtm::

dszlucha 30-01-2016 13:59

Re: GRIP Overlaying Contours Onto Images
 
Using the vision algorithm from the "Using GRIP for the 2016 game" tutorial I was able to do this by adding a Mask operator and hooking the output of the original or resized image to the mask input and the output of the HVL Threshold to the mask input of the mask operator. For whatever reason I couldn't set the output of Find or Filter Contours to the mask input of the Mask operator.

David

ThomasClark 31-01-2016 17:40

Re: GRIP Overlaying Contours Onto Images
 
Assuming you're trying to look at contours on the driver station while GRIP is deployed, I'm working on a SmartDashboard plugin for GRIP that should do something similar to this.

https://github.com/WPIRoboticsProjec...SmartDashboard

It gets feature data from NetworkTables and images from GRIP's "Publish Video" operation. Unlike SmartDashboard's built-in USB Camera viewer, it should work if GRIP is running on either the roboRIO or a coprocessor, since there's an option to set the address.

It doesn't have support for rendering contours yet, but it's on the way.

mhaeberli 08-03-2016 20:02

Re: GRIP Overlaying Contours Onto Images
 
Thomas,
What is the status on this? We'd love to give it a try.
Thanks,
Martin Haeberli
(de-)mentor, FRC 3045 Gear Gremlins (formerly SWAT)

ThomasClark 08-03-2016 20:04

Re: GRIP Overlaying Contours Onto Images
 
Quote:

Originally Posted by mhaeberli (Post 1553871)
Thomas,
What is the status on this? We'd love to give it a try.
Thanks,
Martin Haeberli
(de-)mentor, FRC 3045 Gear Gremlins (formerly SWAT)

It now supports rendering contours.

https://github.com/WPIRoboticsProjec...board/releases

mhaeberli 08-03-2016 21:02

Re: GRIP Overlaying Contours Onto Images
 
thx!

mhaeberli 08-03-2016 21:10

Re: GRIP Overlaying Contours Onto Images
 
One more question - where on my Mac would I find SmartDashboard/extensions ... ?

mhaeberli 08-03-2016 21:38

Re: GRIP Overlaying Contours Onto Images
 
Ok, found that - ~/SmartDashboard/extensions/ - of course!

mhaeberli 08-03-2016 23:42

Re: GRIP Overlaying Contours Onto Images
 
Next question - does it / can it work with SFX - SFX 2014?

ThomasClark 10-03-2016 13:24

Re: GRIP Overlaying Contours Onto Images
 
Quote:

Originally Posted by mhaeberli (Post 1554034)
Next question - does it / can it work with SFX - SFX 2014?

Probably not, unless someone writes an SFX port of the extension

mhaeberli 13-03-2016 00:21

Re: GRIP Overlaying Contours Onto Images
 
Any suggestions on debugging wuth the current SmartDashboard extension if overlays aren't showing up?

Also, is there a way to overlay, say a number (e.g., size) from GRIP, or, more generally, from NetworkTables, via GRIP's video out? That would be _very_ cool!

Thanks,

Martin Haeberli
(de-)mentor, FRC 3045 Gear Gremlins (formerly SWAT)

robert1356 14-03-2016 14:39

Re: GRIP Overlaying Contours Onto Images
 
Quote:

Originally Posted by mhaeberli (Post 1556063)
Any suggestions on debugging wuth the current SmartDashboard extension if overlays aren't showing up?

Simplest way is to add a call into the disabledPeriodic(), autonomousPeriodic() and teleopPeriodic() that calls a method for updating your GRIP information. Inside this method, you just read the parameters from the GRIP table and put them on the smart dashboard. Not as nice as an overlay, but works quite well.

I also have a boolean configured as a box (so it shows red/green) for "Is Image processing running" I do this by looking at the frame rate. If it's zero, it's not running, if it's non-zero, it is running. I always set the value to zero at the beginning of the robot code - sometimes values get stuck in the network tables - this makes sure that the tables have a zero if the image processing isn't running.

mhaeberli 14-03-2016 20:55

Re: GRIP Overlaying Contours Onto Images
 
nice!


All times are GMT -5. The time now is 04:16.

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