boofcv.struct.sparse
Class SparseGradientSafe<T extends ImageGray,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,G extends GradientValue> extends java.lang.Object implements SparseImageGradient<T,G>
Wraps around otherSparseImageGradientclasses 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 Constructor and Description SparseGradientSafe(SparseImageGradient<T,G> wrap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Gcompute(int x, int y)Computes the gradient at the specified point.java.lang.Class<G>getGradientType()booleanisInBounds(int x, int y)Checks to see if the entire sample region is contained inside the image or not.voidsetImage(T input)Specifies the image being processed.
-
-
-
Constructor Detail
-
SparseGradientSafe
public SparseGradientSafe(SparseImageGradient<T,G> wrap)
-
-
Method Detail
-
setImage
public void setImage(T input)
Description copied from interface:SparseImageOperatorSpecifies the image being processed.- Specified by:
setImagein interfaceSparseImageOperator<T extends ImageGray>- 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>
-
compute
public G compute(int x, int y)
Description copied from interface:SparseImageGradientComputes the gradient at the specified point.- Specified by:
computein interfaceSparseImageGradient<T extends ImageGray,G extends GradientValue>- Parameters:
x- x-axis pixel coordinatey- y-axis pixel coordinate- Returns:
- Gradient at that point.
-
getGradientType
public java.lang.Class<G> getGradientType()
- Specified by:
getGradientTypein interfaceSparseImageGradient<T extends ImageGray,G extends GradientValue>
-
-
DataMelt 3.0 © DataMelt by jWork.ORG