Class HOGParameters
Parameters for calculating a HOG Descriptor covering window-size, block-size etc.
This class should implement a meaningful Object.equals(Object) and hashCode()
on its properties as it may be used a CalculationPart. The interpolator) is not
considered.
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionHOGParameters(Interpolator interpolator) Creates with a particularInterpolator. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanvoidThrows an exception if an image of sizeextentcannot be described by these parameters.org.opencv.objdetect.HOGDescriptorcreateDescriptor(Extent imageSize) Creates an emptyHOGDescriptorto describe an image of a particular size.booleanThe block-size as per OpenCV implementation (identical default-size).The block-stride as per OpenCV implementation (identical default-size).The cell-size as per OpenCV implementation (identical default-size).The interpolator to use for scaling images.intThe number of bins in each histogram for a cell.The window-size as per OpenCV implementation.inthashCode()voidsetBlockSize(SizeXY blockSize) The block-size as per OpenCV implementation (identical default-size).voidsetBlockStride(SizeXY blockStride) The block-stride as per OpenCV implementation (identical default-size).voidsetCellSize(SizeXY cellSize) The cell-size as per OpenCV implementation (identical default-size).voidsetInterpolator(Interpolator interpolator) The interpolator to use for scaling images.voidsetNumberBins(int numberBins) The number of bins in each histogram for a cell.voidsetWindowSize(SizeXY windowSize) The window-size as per OpenCV implementation.intsizeDescriptor(Extent imageSize) Calculates the size of the descriptor will be for a given image.Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
HOGParameters
Creates with a particularInterpolator.- Parameters:
interpolator- the interpolator.
-
HOGParameters
public HOGParameters()
-
-
Method Details
-
sizeDescriptor
Calculates the size of the descriptor will be for a given image.It assumes the window is equal to the image-size.
- Parameters:
imageSize- the size of the image (and window).- Returns:
- the size of the descriptor needed.
-
createDescriptor
Creates an emptyHOGDescriptorto describe an image of a particular size.- Parameters:
imageSize- the size of the image.- Returns:
- the descriptor, not yet computed with meaningful values.
-
checkSize
Throws an exception if an image of sizeextentcannot be described by these parameters.- Parameters:
extent- the size of the image to check.- Throws:
FeatureCalculationException- if the image is inappropriately sized for these parameters.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getWindowSize
The window-size as per OpenCV implementation. If not specified, the window is set to be the same size as the (possibly resized) image. -
setWindowSize
The window-size as per OpenCV implementation. If not specified, the window is set to be the same size as the (possibly resized) image. -
getBlockSize
The block-size as per OpenCV implementation (identical default-size). -
setBlockSize
The block-size as per OpenCV implementation (identical default-size). -
getBlockStride
The block-stride as per OpenCV implementation (identical default-size). -
setBlockStride
The block-stride as per OpenCV implementation (identical default-size). -
getCellSize
The cell-size as per OpenCV implementation (identical default-size). -
setCellSize
The cell-size as per OpenCV implementation (identical default-size). -
getNumberBins
public int getNumberBins()The number of bins in each histogram for a cell. -
setNumberBins
public void setNumberBins(int numberBins) The number of bins in each histogram for a cell. -
getInterpolator
The interpolator to use for scaling images. -
setInterpolator
The interpolator to use for scaling images.
-