Reticle for camera

Okay so us here at team 2443 have figured out how to make the camera work. We just ran the CircleTrackerDemo and saw that it works just fine. We were wondering how the demo is able to draw on the camera image. The team wants to find a way to make a reticle for manual aiming.

The functions for drawing into the image are in the IMAQ palette. The code on the cRIO isn’t doing the drawing, though, because typically nobody watches the images. Instead, the info from the ellipse detection is shipped back to the dashboard, and the dashboard draws the annotations of the line and ellipses.

If you are using LV, open up your own dashboard template from the Getting Started window, and look at the top loop. It clears the annotations, then draws the lines in a subVI using polygons, and then draws the blue line. There is a whole palette for the shapes including text.

Greg McKaskle

you think there may be any possible way to get to it in java?

If you are writing your dashboard in Java, you have a couple choices.

The images from the cRIO are just a jpeg. There is a small header in front when it comes in the TCP port, but that is easily skipped and is there for identifying future image formats that may be used. So, you can use whatever Java libs you like to display the jpg. Then in the same drawing canvas, use line, circle, or possibly even pixel operations to draw your reticule. I’m not familiar enough with Java libs to help you with the exact drawing commands.

Presumably you are not using Imaq Vision on the dashboard PC, but if you happen to be, the C version of the Imaq libraries also contain the routines to overlay graphics on an image and display the result. I suspect it isn’t worth the effort to call those from Java.

Finally, the code is there in LV if you would like to look at it and consider making your dashboard in LV.

Greg McKaskle

If you are thinking of mounting a reticle on the lens, I think you will find that it will out of focus.