|
Re: Printing to the DriverStation LCD
I would love to see the result of each of the filtered steps so I can judge if each step buys anything. But I was unable to write each of the images out. If I set the color mode to HSL, binImage->Write will fault. If I stick with RGB, I was able to write out the images but only the original camera image showed something. All other images are total blackness. However, the filtering must have done something right because I did get back a list of reasonable targets. May be it's just a problem with writing the images.
Since you mentioned it, it seems the "Small Particle Removal" step and the "Particle Filter" step are doing similar things. The Particle Filter criteria is to make sure the particles have its width and height in a certain range. So if you have really small particles, the criteria will filter them out anyway.
I also played with an additional criteria IMAQ_MT_RATIO_OF_EQUIVALENT_RECT_SIDES, knowing that the target rectangle has an aspect ratio of 1.33 approx, I set the RATIO to between 1.0 to 2.0. But this filter doesn't seem working because I got a false particle with an aspect ratio way small even the inverse of it would be larger than 2.0 (forgot the exact number now). It would have been filtered out unless I misundertand what this filter does. (e.g. It doesn't say if the RECT is the BOUNDING_RECT) Too bad that this filter implements LongSide/ShortSide instead of Width/Height because it means a rectangle with the right aspect ratio but just turning 90-degree would pass the filter. Do you know if I interpreted this filter correctly?
__________________
Last edited by mikets : 05-02-2012 at 23:44.
|