Drawing a Circle on a BinaryImage within a WPICameraExtension

We’re hoping to be able to draw a few circles on top of the video within a custom WPICameraExtension we are developing so that the aggregate result can be displayed on the SmartDashboard.

The BinaryImage Java class has methods to draw polygons and lines. We’re having trouble figuring out how to draw circles using these methods. If we could get ahold of the underlying IplImage we could use OpenCV to draw the circles.

Does anyone have any advice for us?

Thanks,

  • scott

See this post it has a attached WPIImageWrapper.java file which we have been using to gain access to the underlying IplImage associated with the WPIImage derived classes.

I’m not sure if you are going to want to draw on a binary image. You will probably want to convert it to a color image so you can use a different color when drawing your circles.

Thanks very much; this helps tremendously!