Package boofcv.alg.transform.census
Class GCensusTransform
java.lang.Object
boofcv.alg.transform.census.GCensusTransform
The Census Transform [1] computes a bit mask for each pixel in the image. If a neighboring pixel is greater than the center pixel in a region that bit is set to 1. A 3x3 region 9radius=1) is encoded in 8-bits and a 5x5 region (radius=2) in 24-bits. To compute the error between two pixels simply compute the hamming distance. The hamming distance for an input can be computed using DescriptorDistance.hamming().
DEVELOPMENT NOTE: See if this can be speed up by only comparing each pixel with another once. Code will be complex
[1] Zabih, Ramin, and John Woodfill. "Non-parametric local transforms for computing visual correspondence." European conference on computer vision. Springer, Berlin, Heidelberg, 1994.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends ImageGray<T>>
voiddense3x3
(T input, GrayU8 output, @Nullable ImageBorder<T> border) static <T extends ImageGray<T>>
voiddense5x5
(T input, GrayS32 output, @Nullable ImageBorder<T> border) static <T extends ImageGray<T>>
voidsample_IU16
(T input, FastAccess<Point2D_I32> sample, InterleavedU16 output, @Nullable ImageBorder<T> border, @Nullable DogArray_I32 workSpace) static <T extends ImageGray<T>>
voidsample_S64
(T input, FastAccess<Point2D_I32> sample, GrayS64 output, @Nullable ImageBorder<T> border, @Nullable DogArray_I32 workSpace)
-
Constructor Details
-
GCensusTransform
public GCensusTransform()
-
-
Method Details
-
dense3x3
public static <T extends ImageGray<T>> void dense3x3(T input, GrayU8 output, @Nullable @Nullable ImageBorder<T> border) -
dense5x5
public static <T extends ImageGray<T>> void dense5x5(T input, GrayS32 output, @Nullable @Nullable ImageBorder<T> border) -
sample_S64
public static <T extends ImageGray<T>> void sample_S64(T input, FastAccess<Point2D_I32> sample, GrayS64 output, @Nullable @Nullable ImageBorder<T> border, @Nullable @Nullable DogArray_I32 workSpace) -
sample_IU16
public static <T extends ImageGray<T>> void sample_IU16(T input, FastAccess<Point2D_I32> sample, InterleavedU16 output, @Nullable @Nullable ImageBorder<T> border, @Nullable @Nullable DogArray_I32 workSpace)
-