Log in

View Full Version : Drawing Circle Over Image Feed Java


theonlydvr
27-01-2014, 13:52
Hey all,

We're trying to draw a circle over the location of the ball on the image feed. I have begun work on a camera extension but ran into a problem when trying to get the variables needed (if a circle was found, radius length in pixels, x center, and y center). Is there a way that I can access those values from the SmartDashboard and use them in my extension?

Thanks,

Evan

byteit101
27-01-2014, 22:44
(assuming SFX and extending the camera viewer class, which is actually a bad idea that you should NOT DO)
in the registered method (don't forget to call super) snag the datacor eprovider and get the observable values from it (getObservable("path/to/vars")) which will automatically fire if you add change listeners

However, that is a bad idea. You really should create a moving shape control, which ironically is the next turorial we are going to put out so hold tight for a day or two.