Operator to implement the tracing of connected contours and junctions. All contours are assumed chains or cycles with zero width, and so can be traced using 4/8-connected pixels. Junctions will be detected from end points touching multiple other end points, or touching a stronger contour with a significant jump in filter response. Extensively use the image grid to insure planarity of the network of edges and vertices, when projected onto the image plane. The recipe is:
1. Trace 4/8-connected pixels to enumerate disjoint chains and cycles. Prune contours that are either short or have no pixel stronger than a high hysteresis threshold.
2. Find junctions from end points touching internal pixels of some stronger chain/cycle. Break a stronger contour at a junction, only if there is a detectable jump in filter response. Next, merge end points touching other end points or junctions. Finally, create dummy end point for isolated cycles.
3. Insert subpixel accuracy into edges/vertices. Because of truncation errors, the mapping from edgel locations to integral grid locations may no longer be preserved, after this step.
4. Optionally reduce noisy zig-zags along the contours, and evenly space the contour points. The zig-zags are never more than 0.5 pixel, and happen when sub-pixel locations are noisy and so out-of-sync with the 4/8-connected tracing.
5. Optionally insert virtual border at the image boundary, to form closed region beyond the image boundary.
6. Insert depth/z values into edges/vertices, through interpolation of the range image, for example. For an intensity image, set this depth to a constant value, since the 3D edges/vertices all lie in the image plane.
Input: connected edge elements, with response strength, and subpixel location, describing isolated contours disjoint only at junction pixels. min_strength and min_length are used to prune weak or short edges. min_jump is used to prune weak junctions.
Output: planar network of linked edges and vertices.
Complexity: O(|edgels|) time and space. O(nlogn) time for quicksort if n=|chains| < 1000, to make sure that junctions are found from longer/stronger chains first.
Definition in file gevd_contour.h.
#include <vcl_vector.h>
#include <vbl/vbl_array_2d.h>
#include <vtol/vtol_vertex_2d_sptr.h>
#include <vtol/vtol_edge_2d_sptr.h>
#include <gevd/gevd_bufferxy.h>
Go to the source code of this file.
Classes | |
| class | gevd_contour |
1.4.4