public class RefineCornerSegmentFit
extends java.lang.Object
Given an image it assumes a corner of a square is contained inside. The square is assumed to be much darker than the white background. Local statistics are used to declare which pixels are part of the black square and interpolation is taken in account when performing non-linear optimization. Typically a subimage is passed in that only contains a local region around a single corner.
STEPS:
1) Local statistics of the square and background are found by first computing the mean then splitting pixels into two
groups which are above or below the mean.
2) The mean and standard deviation of each group is computed while removing outliers.
3) Using these statistics two binary images are computed using a threshold 1/2 between
the light and dark, and another one much closer to the light.
4) Using logical operators the edge region is found.
5) Points are extract from the edge and weighted based on how dark they are.
6) The corner is modeled as the intersection of two lines. An initial estimate is extracted
and optimized.
Noise is removed when thresholding by only keeping the largest island of pixels. The cost function being optimized minimizes the distance of a closest point on either line to a point.
| Modifier and Type | Class and Description |
|---|---|
static class |
RefineCornerSegmentFit.PointInfo
Location of a boundary point and its weight.
|
| Constructor and Description |
|---|
RefineCornerSegmentFit() |
public void process(boofcv.struct.image.ImageFloat32 image)
image - Image containing a single corner from a black squarepublic georegression.struct.point.Point2D_F64 getCorner()