Package boofcv.struct.sparse
Class SparseGradientSafe<T extends ImageGray<T>,G extends GradientValue>
java.lang.Object
boofcv.struct.sparse.SparseGradientSafe<T,G>
- All Implemented Interfaces:
SparseImageGradient<T,,G> SparseImageOperator<T>
public class SparseGradientSafe<T extends ImageGray<T>,G extends GradientValue>
extends Object
implements SparseImageGradient<T,G>
Wraps around other
SparseImageGradient classes and checks to see if
the image is in bounds or not. If it is out of bounds the return value is set to one.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncompute(int x, int y) Computes the gradient at the specified point.booleanisInBounds(int x, int y) Checks to see if the entire sample region is contained inside the image or not.voidSpecifies the image being processed.
-
Constructor Details
-
SparseGradientSafe
-
-
Method Details
-
setImage
Description copied from interface:SparseImageOperatorSpecifies the image being processed.- Specified by:
setImagein interfaceSparseImageOperator<T extends ImageGray<T>>- Parameters:
input- Image being processed
-
isInBounds
public boolean isInBounds(int x, int y) Description copied from interface:SparseImageOperatorChecks to see if the entire sample region is contained inside the image or not. Depending on the implementation it might be able to handle out of bounds pixels or not.- Specified by:
isInBoundsin interfaceSparseImageOperator<T extends ImageGray<T>>
-
compute
Description copied from interface:SparseImageGradientComputes the gradient at the specified point.- Specified by:
computein interfaceSparseImageGradient<T extends ImageGray<T>,G extends GradientValue> - Parameters:
x- x-axis pixel coordinatey- y-axis pixel coordinate- Returns:
- Gradient at that point.
-
getGradientType
- Specified by:
getGradientTypein interfaceSparseImageGradient<T extends ImageGray<T>,G extends GradientValue>
-