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
Modifier and TypeFieldDescriptionint
if not -1 then it specifies the minimum width/height of the highest level in the pyramidint
if not -1 then it specifies the minimum width/height of the highest level in the pyramidint
if not -1 then it specifies the number of levels in the pyramid -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Checks to see if the configuration is valid.int
computeLayers
(int width, int height) Compute the number of layers in a pyramid given the input image's shape.boolean
Returns true if configured to have a fixed number of levels in the pyramidstatic ConfigDiscreteLevels
levels
(int numLevels) Creates a configuration where the number of levels in the pyramid is specifiedstatic ConfigDiscreteLevels
minSize
(int sideLength) Specifies that a pyramid should be created until the smallest size of width or height is the specified valuestatic ConfigDiscreteLevels
minSize
(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, wait
Methods 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:Configuration
Checks to see if the configuration is valid. If it is invalid, throw an exception explaining what is incorrect.- Specified by:
checkValidity
in interfaceConfiguration
-
toString
-