Modify SmartDashboard image overlay

Hi all,

We recently discovered that you can overlay a transparent image on a camera feed using Smart Dashboard. I have looked through the API, and I didn’t see any code that lets you mess with the image directly. Our objective would be to swap a red crosshair with a green one that indicates a vision target has been identified. Is there an easy way to do this with swapping images, or must it be done in the vision pipeline?


How were you able to do this? As I was recently searching for a way to overlay a simple static image on the feed and have yet to find a simple solution - would really appreciate it if you could share how you did it. Also, is it possible to do the same thing on the Shuffleboard?

With regards to your question, in the past we’ve just had a separate Boolean indicator on the dashboard that was either green or red which worked pretty well.

In Smart Dashboard, you can go to the add tab, and select image. This brings up a blank image, you right click on it and select the path to whatever image you are using. It needs to have a transparent background so as to not obscure the camera feed, usually we have used a .png file. You can then drag and resize it on top of the camera feed window. Other threads I have researched have indicated that in shuffleboard you would need to create a custom widget, so it’s not as easy. @SamCarlberg might be able to tell you an easier method of doing it in shuffleboard. I know in the default camera stream widget you can bring up a centered crosshair, but you cannot modify it aside from the color. There is a github issue out there for a fix/upgrade to do this.

Nice solution:) Thank you very much!

@SamCarlberg could you please help on this matter?

Shuffleboard currently does not have built in support for something like this.

So nothing happens when I right click on the black image. Any ideas?

Are you in editable mode? Have you tried opening and closing the dashboard?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.