Package boofcv.alg.transform.census
Class CensusTransform
- java.lang.Object
-
- boofcv.alg.transform.census.CensusTransform
-
public class CensusTransform extends java.lang.ObjectThe 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.
-
-
Constructor Summary
Constructors Constructor Description CensusTransform()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.ddogleg.struct.FastQueue<georegression.struct.point.Point2D_I32>createBlockSamples(int radius)static org.ddogleg.struct.FastQueue<georegression.struct.point.Point2D_I32>createBlockSamples(int radiusX, int radiusY)static org.ddogleg.struct.FastQueue<georegression.struct.point.Point2D_I32>createCircleSamples()static voiddense3x3(boofcv.struct.image.GrayF32 input, boofcv.struct.image.GrayU8 output, boofcv.struct.border.ImageBorder_F32 border)Census transform for local 3x3 region around each pixel.static voiddense3x3(boofcv.struct.image.GrayU16 input, boofcv.struct.image.GrayU8 output, boofcv.struct.border.ImageBorder_S32<boofcv.struct.image.GrayU16> border)Census transform for local 3x3 region around each pixel.static voiddense3x3(boofcv.struct.image.GrayU8 input, boofcv.struct.image.GrayU8 output, boofcv.struct.border.ImageBorder_S32<boofcv.struct.image.GrayU8> border)Census transform for local 3x3 region around each pixel.static voiddense5x5(boofcv.struct.image.GrayF32 input, boofcv.struct.image.GrayS32 output, boofcv.struct.border.ImageBorder_F32 border)Census transform for local 5x5 region around each pixel.static voiddense5x5(boofcv.struct.image.GrayU16 input, boofcv.struct.image.GrayS32 output, boofcv.struct.border.ImageBorder_S32<boofcv.struct.image.GrayU16> border)Census transform for local 5x5 region around each pixel.static voiddense5x5(boofcv.struct.image.GrayU8 input, boofcv.struct.image.GrayS32 output, boofcv.struct.border.ImageBorder_S32<boofcv.struct.image.GrayU8> border)Census transform for local 5x5 region around each pixel.static voidsample_IU16(boofcv.struct.image.GrayF32 input, org.ddogleg.struct.FastAccess<georegression.struct.point.Point2D_I32> sample, boofcv.struct.image.InterleavedU16 output, boofcv.struct.border.ImageBorder_F32 border, org.ddogleg.struct.GrowQueue_I32 workSpace)Census transform for an arbitrary region specified by the provided sample pointsstatic voidsample_IU16(boofcv.struct.image.GrayU16 input, org.ddogleg.struct.FastAccess<georegression.struct.point.Point2D_I32> sample, boofcv.struct.image.InterleavedU16 output, boofcv.struct.border.ImageBorder_S32<boofcv.struct.image.GrayU16> border, org.ddogleg.struct.GrowQueue_I32 workSpace)Census transform for an arbitrary region specified by the provided sample pointsstatic voidsample_IU16(boofcv.struct.image.GrayU8 input, org.ddogleg.struct.FastAccess<georegression.struct.point.Point2D_I32> sample, boofcv.struct.image.InterleavedU16 output, boofcv.struct.border.ImageBorder_S32<boofcv.struct.image.GrayU8> border, org.ddogleg.struct.GrowQueue_I32 workSpace)Census transform for an arbitrary region specified by the provided sample pointsstatic voidsample_S64(boofcv.struct.image.GrayF32 input, org.ddogleg.struct.FastAccess<georegression.struct.point.Point2D_I32> sample, boofcv.struct.image.GrayS64 output, boofcv.struct.border.ImageBorder_F32 border, org.ddogleg.struct.GrowQueue_I32 workSpace)Census transform for an arbitrary region specified by the provided sample pointsstatic voidsample_S64(boofcv.struct.image.GrayU16 input, org.ddogleg.struct.FastAccess<georegression.struct.point.Point2D_I32> sample, boofcv.struct.image.GrayS64 output, boofcv.struct.border.ImageBorder_S32<boofcv.struct.image.GrayU16> border, org.ddogleg.struct.GrowQueue_I32 workSpace)Census transform for an arbitrary region specified by the provided sample pointsstatic voidsample_S64(boofcv.struct.image.GrayU8 input, org.ddogleg.struct.FastAccess<georegression.struct.point.Point2D_I32> sample, boofcv.struct.image.GrayS64 output, boofcv.struct.border.ImageBorder_S32<boofcv.struct.image.GrayU8> border, org.ddogleg.struct.GrowQueue_I32 workSpace)Census transform for an arbitrary region specified by the provided sample points
-
-
-
Method Detail
-
createBlockSamples
public static org.ddogleg.struct.FastQueue<georegression.struct.point.Point2D_I32> createBlockSamples(int radius)
-
createBlockSamples
public static org.ddogleg.struct.FastQueue<georegression.struct.point.Point2D_I32> createBlockSamples(int radiusX, int radiusY)
-
createCircleSamples
public static org.ddogleg.struct.FastQueue<georegression.struct.point.Point2D_I32> createCircleSamples()
-
dense3x3
public static void dense3x3(boofcv.struct.image.GrayU8 input, boofcv.struct.image.GrayU8 output, @Nullable boofcv.struct.border.ImageBorder_S32<boofcv.struct.image.GrayU8> border)Census transform for local 3x3 region around each pixel.- Parameters:
input- Input imageoutput- Census transformed output imageborder- (Nullable) How the border is handled
-
dense3x3
public static void dense3x3(boofcv.struct.image.GrayU16 input, boofcv.struct.image.GrayU8 output, @Nullable boofcv.struct.border.ImageBorder_S32<boofcv.struct.image.GrayU16> border)Census transform for local 3x3 region around each pixel.- Parameters:
input- Input imageoutput- Census transformed output imageborder- (Nullable) How the border is handled
-
dense3x3
public static void dense3x3(boofcv.struct.image.GrayF32 input, boofcv.struct.image.GrayU8 output, @Nullable boofcv.struct.border.ImageBorder_F32 border)Census transform for local 3x3 region around each pixel.- Parameters:
input- Input imageoutput- Census transformed output imageborder- (Nullable) How the border is handled
-
dense5x5
public static void dense5x5(boofcv.struct.image.GrayU8 input, boofcv.struct.image.GrayS32 output, @Nullable boofcv.struct.border.ImageBorder_S32<boofcv.struct.image.GrayU8> border)Census transform for local 5x5 region around each pixel.- Parameters:
input- Input imageoutput- Census transformed output imageborder- (Nullable) How the border is handled
-
dense5x5
public static void dense5x5(boofcv.struct.image.GrayU16 input, boofcv.struct.image.GrayS32 output, @Nullable boofcv.struct.border.ImageBorder_S32<boofcv.struct.image.GrayU16> border)Census transform for local 5x5 region around each pixel.- Parameters:
input- Input imageoutput- Census transformed output imageborder- (Nullable) How the border is handled
-
dense5x5
public static void dense5x5(boofcv.struct.image.GrayF32 input, boofcv.struct.image.GrayS32 output, @Nullable boofcv.struct.border.ImageBorder_F32 border)Census transform for local 5x5 region around each pixel.- Parameters:
input- Input imageoutput- Census transformed output imageborder- (Nullable) How the border is handled
-
sample_S64
public static void sample_S64(boofcv.struct.image.GrayU8 input, org.ddogleg.struct.FastAccess<georegression.struct.point.Point2D_I32> sample, boofcv.struct.image.GrayS64 output, @Nullable boofcv.struct.border.ImageBorder_S32<boofcv.struct.image.GrayU8> border, @Nullable org.ddogleg.struct.GrowQueue_I32 workSpace)Census transform for an arbitrary region specified by the provided sample points- Parameters:
input- Input imagesample- Relative coordinates that are sampled when computing theoutput- Census transformed output imageborder- (Nullable) How the border is handled
-
sample_S64
public static void sample_S64(boofcv.struct.image.GrayU16 input, org.ddogleg.struct.FastAccess<georegression.struct.point.Point2D_I32> sample, boofcv.struct.image.GrayS64 output, @Nullable boofcv.struct.border.ImageBorder_S32<boofcv.struct.image.GrayU16> border, @Nullable org.ddogleg.struct.GrowQueue_I32 workSpace)Census transform for an arbitrary region specified by the provided sample points- Parameters:
input- Input imagesample- Relative coordinates that are sampled when computing theoutput- Census transformed output imageborder- (Nullable) How the border is handled
-
sample_S64
public static void sample_S64(boofcv.struct.image.GrayF32 input, org.ddogleg.struct.FastAccess<georegression.struct.point.Point2D_I32> sample, boofcv.struct.image.GrayS64 output, @Nullable boofcv.struct.border.ImageBorder_F32 border, @Nullable org.ddogleg.struct.GrowQueue_I32 workSpace)Census transform for an arbitrary region specified by the provided sample points- Parameters:
input- Input imagesample- Relative coordinates that are sampled when computing theoutput- Census transformed output imageborder- (Nullable) How the border is handled
-
sample_IU16
public static void sample_IU16(boofcv.struct.image.GrayU8 input, org.ddogleg.struct.FastAccess<georegression.struct.point.Point2D_I32> sample, boofcv.struct.image.InterleavedU16 output, @Nullable boofcv.struct.border.ImageBorder_S32<boofcv.struct.image.GrayU8> border, @Nullable org.ddogleg.struct.GrowQueue_I32 workSpace)Census transform for an arbitrary region specified by the provided sample points- Parameters:
input- Input imagesample- Relative coordinates that are sampled when computing theoutput- Census transformed output imageborder- (Nullable) How the border is handled
-
sample_IU16
public static void sample_IU16(boofcv.struct.image.GrayU16 input, org.ddogleg.struct.FastAccess<georegression.struct.point.Point2D_I32> sample, boofcv.struct.image.InterleavedU16 output, @Nullable boofcv.struct.border.ImageBorder_S32<boofcv.struct.image.GrayU16> border, @Nullable org.ddogleg.struct.GrowQueue_I32 workSpace)Census transform for an arbitrary region specified by the provided sample points- Parameters:
input- Input imagesample- Relative coordinates that are sampled when computing theoutput- Census transformed output imageborder- (Nullable) How the border is handled
-
sample_IU16
public static void sample_IU16(boofcv.struct.image.GrayF32 input, org.ddogleg.struct.FastAccess<georegression.struct.point.Point2D_I32> sample, boofcv.struct.image.InterleavedU16 output, @Nullable boofcv.struct.border.ImageBorder_F32 border, @Nullable org.ddogleg.struct.GrowQueue_I32 workSpace)Census transform for an arbitrary region specified by the provided sample points- Parameters:
input- Input imagesample- Relative coordinates that are sampled when computing theoutput- Census transformed output imageborder- (Nullable) How the border is handled
-
-