Package boofcv.alg.transform.pyramid
Class PyramidFloatGaussianScale<T extends ImageGray<T>>
java.lang.Object
boofcv.struct.pyramid.ImagePyramidBase<T>
boofcv.struct.pyramid.PyramidFloat<T>
boofcv.alg.transform.pyramid.PyramidFloatGaussianScale<T>
- All Implemented Interfaces:
ImagePyramid<T>
PyramidFloat in which each layer is constructed by 1) applying Gaussian blur to the previous layer, and then
2) re-sampling the blurred previous layer. The scaling factor between each level are floating point number.
Unlike PyramidDiscreteSampleBlur the scale factors can be arbitrary and are not limited to certain integer
values. The specified sigmas are the sigmas which are applied to each layer.
NOTE: This can be considered the theoretically correct way to construct an image pyramid with no sacrifices to improve speed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected InterpolatePixelS<T>protected double[]protected float[]protected TFields inherited from class boofcv.struct.pyramid.PyramidFloat
scaleFields inherited from class boofcv.struct.pyramid.ImagePyramidBase
bottomHeight, bottomWidth, layers, saveOriginalReference -
Constructor Summary
ConstructorsModifierConstructorDescriptionPyramidFloatGaussianScale(InterpolatePixelS<T> interpolate, double[] scales, double[] sigmaLayers, Class<T> imageType) Configures the pyramidprotected -
Method Summary
Modifier and TypeMethodDescriptionCreates a copy of the pyramids structure but not the pixel datadoublegetSampleOffset(int layer) Returns the sampling offset.doublegetSigma(int layer) Returns the scale-space scale for the specified layer.float[]voidConstructs the image pyramid given the input image.voidsetInterpolate(InterpolatePixelS<T> interpolate) Methods inherited from class boofcv.struct.pyramid.PyramidFloat
getNumLayers, getScale, setScaleFactorsMethods inherited from class boofcv.struct.pyramid.ImagePyramidBase
checkScales, getHeight, getImageType, getInputHeight, getInputWidth, getLayer, getWidth, initialize, isInitialized, isSaveOriginalReference, setFirstLayer, setSaveOriginalReference, setTo
-
Field Details
-
interpolate
-
tempImage
-
sigmaLayers
protected float[] sigmaLayers -
sigma
protected double[] sigma
-
-
Constructor Details
-
PyramidFloatGaussianScale
public PyramidFloatGaussianScale(InterpolatePixelS<T> interpolate, double[] scales, double[] sigmaLayers, Class<T> imageType) Configures the pyramid- Parameters:
interpolate- Interpolation function used to sub-sample.scales- Scales of each layer in the pyramid relative to the input imagesigmaLayers- Amount of blur applied to the previous layer while constructing the pyramid.imageType- Type of image it's processing
-
PyramidFloatGaussianScale
-
-
Method Details
-
process
Description copied from interface:ImagePyramidConstructs the image pyramid given the input image. -
getInterpolate
-
setInterpolate
-
getSampleOffset
public double getSampleOffset(int layer) Description copied from interface:ImagePyramidReturns the sampling offset. Both x and y axises are assumed to have the same offset. See comment in constructor above.- Parameters:
layer- Layer in the pyramid- Returns:
- Sampling offset in pixels.
-
getSigma
public double getSigma(int layer) Description copied from interface:ImagePyramidReturns the scale-space scale for the specified layer. This scale is equivalent amount of Gaussian blur applied to the input image. If Gaussian blur is not applied to each layer then an approximation should be returned.- Parameters:
layer- Layer in the pyramid- Returns:
- Equivalent sigma for Gaussian blur.
-
copyStructure
Description copied from interface:ImagePyramidCreates a copy of the pyramids structure but not the pixel data -
getSigmaLayers
public float[] getSigmaLayers()
-