Package boofcv.alg
Class InputSanityCheck
java.lang.Object
boofcv.alg.InputSanityCheck
Operations for basic sanity checks on function arguments. Checks if the contract is being obeyed by the caller.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckIndexing(ImageBase imgA, ImageBase imgB) static voidcheckReshape(ImageBase<?> imgA, ImageBase<?> imgB) Throws exception if two images are the same instance.static <T extends ImageGray<T>>
TcheckReshape(T target, ImageGray testImage, Class<T> targetType) Checks to see if the target image is null or if it is a different size than the test image.static voidcheckReshapeB(ImageMultiBand<?> imgA, ImageMultiBand<?> imgB) Throws exception if two images are the same instance.static voidcheckSameShape(ImageBase<?> imgA, ImageBase<?> imgB) static voidcheckSameShape(ImageBase<?> imgA, ImageBase<?> imgB, ImageBase<?> imgC) static voidcheckSameShape(ImageBase<?> imgA, ImageBase<?> imgB, ImageBase<?> imgC, ImageBase<?> imgD) static voidcheckSameShape(ImageBase<?> imgA, ImageBase<?> imgB, ImageBase<?> imgC, ImageBase<?> imgD, ImageBase<?> imgE) static voidcheckSameShape(ImagePyramid<?> imgA, ImagePyramid<?> imgB) static voidcheckSameShapeB(ImageMultiBand<?> imgA, ImageMultiBand<?> imgB) static voidcheckSubimage(ImageBase image) Makes sure the input image is not a sub-imagedeclareOrReshape(@Nullable Planar<T> image, int width, int height, int numBands, Class<T> imageType) declareOrReshape(In input, Out output, Class<Out> typeOut) If the output has not been declared a new instance is declared.static <T extends ImageInterleaved<T>>
TdeclareOrReshape(T image, int width, int height, int numBands, Class<T> imageType) static <T extends ImageGray<T>>
TdeclareOrReshape(T image, int width, int height, Class<T> imageType) static <T extends ImageBase<T>>
TdeclareOrReshape(T input, T output) If the output has not been declared a new instance is declared.static <T extends ImageBase<T>>
TdeclareOutput(T input, T output) static voidreshapeOneIn(ImageBase<?> input, ImageBase<?> outputA) static voidreshapeOneIn(ImageBase<?> input, ImageBase<?> outputA, ImageBase<?> outputB) static voidreshapeOneIn(ImageBase<?> input, ImageBase<?> outputA, ImageBase<?> outputB, ImageBase<?> outputC) static voidreshapeOneIn(ImageBase<?> input, ImageBase<?> outputA, ImageBase<?> outputB, ImageBase<?> outputC, ImageBase<?> outputD)
-
Constructor Details
-
InputSanityCheck
public InputSanityCheck()
-
-
Method Details
-
checkReshape
public static <T extends ImageGray<T>> T checkReshape(T target, ImageGray testImage, Class<T> targetType) Checks to see if the target image is null or if it is a different size than the test image. If it is null then a new image is returned, otherwise target is reshaped and returned. -
declareOrReshape
If the output has not been declared a new instance is declared. If output is not null then it will be reshaped to match the input. -
declareOutput
-
declareOrReshape
-
declareOrReshape
public static <T extends ImageInterleaved<T>> T declareOrReshape(@Nullable T image, int width, int height, int numBands, Class<T> imageType) -
declareOrReshape
-
declareOrReshape
public static <In extends ImageGray,Out extends ImageGray> Out declareOrReshape(In input, @Nullable Out output, Class<Out> typeOut) If the output has not been declared a new instance is declared. If an instance of the output is provided its bounds are checked. -
checkReshape
Throws exception if two images are the same instance. Otherwise reshapes B to match A -
checkReshapeB
Throws exception if two images are the same instance. Otherwise reshapes B to match A -
checkSameShape
-
checkSameShapeB
-
checkSameShape
-
checkSameShape
-
checkSameShape
-
checkSameShape
-
reshapeOneIn
-
reshapeOneIn
-
reshapeOneIn
-
reshapeOneIn
-
checkSubimage
Makes sure the input image is not a sub-image -
checkIndexing
-