Package boofcv.struct.pyramid
Class ConfigDiscreteLevels
java.lang.Object
boofcv.struct.pyramid.ConfigDiscreteLevels
- All Implemented Interfaces:
Configuration,Serializable
Specifies number of layers in the pyramid. This can be done explicitly or based on the minimum allowed width
and height.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionintif not -1 then it specifies the minimum width/height of the highest level in the pyramidintif not -1 then it specifies the minimum width/height of the highest level in the pyramidintif not -1 then it specifies the number of levels in the pyramid -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks to see if the configuration is valid.intcomputeLayers(int width, int height) Compute the number of layers in a pyramid given the input image's shape.booleanReturns true if configured to have a fixed number of levels in the pyramidstatic ConfigDiscreteLevelslevels(int numLevels) Creates a configuration where the number of levels in the pyramid is specifiedstatic ConfigDiscreteLevelsminSize(int sideLength) Specifies that a pyramid should be created until the smallest size of width or height is the specified valuestatic ConfigDiscreteLevelsminSize(int minWidth, int minHeight) Creates a configuration where the minimum image size is specifiedsetTo(ConfigDiscreteLevels config) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface boofcv.struct.Configuration
serializeActiveFields, serializeInitialize
-
Field Details
-
numLevelsRequested
public int numLevelsRequestedif not -1 then it specifies the number of levels in the pyramid -
minWidth
public int minWidthif not -1 then it specifies the minimum width/height of the highest level in the pyramid -
minHeight
public int minHeightif not -1 then it specifies the minimum width/height of the highest level in the pyramid
-
-
Constructor Details
-
ConfigDiscreteLevels
public ConfigDiscreteLevels() -
ConfigDiscreteLevels
public ConfigDiscreteLevels(int numLevelsRequested, int minWidth, int minHeight)
-
-
Method Details
-
levels
Creates a configuration where the number of levels in the pyramid is specified -
minSize
Creates a configuration where the minimum image size is specified -
minSize
Specifies that a pyramid should be created until the smallest size of width or height is the specified value -
computeLayers
public int computeLayers(int width, int height) Compute the number of layers in a pyramid given the input image's shape.- Parameters:
width- Input image's widthheight- Input image's height- Returns:
- Number of layers
-
isFixedLevels
public boolean isFixedLevels()Returns true if configured to have a fixed number of levels in the pyramid -
setTo
-
checkValidity
public void checkValidity()Description copied from interface:ConfigurationChecks to see if the configuration is valid. If it is invalid, throw an exception explaining what is incorrect.- Specified by:
checkValidityin interfaceConfiguration
-
toString
-