Package boofcv.alg.weights
Class WeightPixelKernel_F32
java.lang.Object
boofcv.alg.weights.WeightPixelKernel_F32
- All Implemented Interfaces:
WeightPixel_F32
- Direct Known Subclasses:
WeightPixelGaussian_F32
Weight which uses the values contained in a
Kernel2D_F32. For performance reasons no checks are
done to see if a request has been made outside the kernel's radius. Those values should be zero.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the kernel's radius along the x-axisintReturns the kernel's radius along the y-axisfloatweight(int x, int y) Access the weight using coordinates.floatweightIndex(int index) Faster way to access the weight.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface boofcv.alg.weights.WeightPixel_F32
isOdd, setRadius
-
Field Details
-
kernel
-
-
Constructor Details
-
WeightPixelKernel_F32
public WeightPixelKernel_F32()
-
-
Method Details
-
weightIndex
public float weightIndex(int index) Description copied from interface:WeightPixel_F32Faster way to access the weight. Refers to the index in a row major matrix.
x = (index % widthX) - radiusX
y = (index / widthX) - radiusY
- Specified by:
weightIndexin interfaceWeightPixel_F32- Parameters:
index- index of grid element- Returns:
- the weight
-
weight
public float weight(int x, int y) Description copied from interface:WeightPixel_F32Access the weight using coordinates.- Specified by:
weightin interfaceWeightPixel_F32- Parameters:
x- x-coordinate: range = -radius to radius, inclusivey- y-coordinate: range = -radius to radius, inclusive- Returns:
- the weight
-
getRadiusX
public int getRadiusX()Description copied from interface:WeightPixel_F32Returns the kernel's radius along the x-axis- Specified by:
getRadiusXin interfaceWeightPixel_F32- Returns:
- Radius of kernel
-
getRadiusY
public int getRadiusY()Description copied from interface:WeightPixel_F32Returns the kernel's radius along the y-axis- Specified by:
getRadiusYin interfaceWeightPixel_F32- Returns:
- Radius of kernel
-