This repository has been archived by the owner on Sep 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
ContourFilter
Kyle Corry edited this page Jan 8, 2019
·
2 revisions
Contour filters are used to identify contours (solid shapes) in an image and decide which ones may look like a target and which are just noise.
- StandardContourFilter: This is the recommended contour filter for most applications as it is the simplest.
- ConvexHullContourFilter: The convex hull contour filter takes into consideration the perimeter, solidity, vertexes, area, and dimensions of contours.
- area: The percent of the total area the target takes up. This helps filter out contours which are too small (noise) or too large (other objects).
- fullness: The percent of the contour's area to the bounding box of its area. Values closer to 0 are contours which are not rectangular (such as 2016's vision target).
- aspectRatio: The aspect ratio of the contours width / height. Giving a decent margin of error avoids having an actual target filtered out.
ContourFilter contourFilter = new StandardContourFilter(area, fullness, aspectRatio);
Developed by Kyle Corry along with FRC Team 5112, The Gongoliers.