|
Re: Printing to the DriverStation LCD
My suggestion would be to implement the same or similar steps in Vision Assistant and use that to measure the value of the various filters. It also helps with discovering what the various advanced functions do, since sometimes a picture is worth ...
As for the advanced filter about rectangle ratios, the example code for LV just does that in its own loop on up to ten particles using the bounding box. It doesn't make another call into IMAQ.
The example code is very similar to yours. It thresholds using HSL or L, then it does the convexHull, then it requests the particleAnalysis but only for area and bounding box. Then it sorts the particles by area and analyses them further. Using the original image, it requests the row and column averages for each of the major particles to measure if it was hollow. The position, aspect ratio, and coverage tests are done on those measurements.
Greg McKaskle
|