Package boofcv.factory.disparity
Class ConfigDisparitySGM
java.lang.Object
boofcv.factory.disparity.ConfigDisparitySGM
- All Implemented Interfaces:
Configuration
,Serializable
Configuration for
Semi Global Matching
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static enum
Allowed number of paths -
Field Summary
Modifier and TypeFieldDescriptionSpecifies how the image border is handled.The error can be computed using code taken from block matchingUsed if error type is CensusUsed if error type is HMIint
Minimum disparity that it will check.int
Number of disparity values considered.Which error model should it useint
Maximum allowed error for a single pixel.Number of paths it should consider.int
The penalty applied to a large change in disparity.int
The penalty applied to a small change in disparity.boolean
If subpixel should be used to find disparity or not.double
Tolerance for how similar optimal region is to other region.boolean
If true it will use block variants of errors.int
Tolerance for how difference the left to right associated values can be. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Checks to see if the configuration is valid.setTo
(ConfigDisparitySGM src) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface boofcv.struct.Configuration
serializeActiveFields, serializeInitialize
-
Field Details
-
disparityMin
public int disparityMinMinimum disparity that it will check. Must be ≥ 0 and < maxDisparity -
disparityRange
public int disparityRangeNumber of disparity values considered. Must be > 0. Maximum number is 255 for 8-bit disparity images. -
maxError
public int maxErrorMaximum allowed error for a single pixel. Set to a value less than 0 to disable. Has a range from 0 toSgmDisparityCost.MAX_COST
-
validateRtoL
public int validateRtoLTolerance for how difference the left to right associated values can be. Try 1. Disable with -1 -
texture
public double textureTolerance for how similar optimal region is to other region. Closer to zero is more tolerant. Try 0.1 for SAD or 0.7 for NCC. Disable with a value ≤ 0 -
subpixel
public boolean subpixelIf subpixel should be used to find disparity or not. If on then output disparity image needs to me GrayF32. If false then GrayU8. -
penaltySmallChange
public int penaltySmallChangeThe penalty applied to a small change in disparity. 0 ≤ x ≤SgmDisparityCost.MAX_COST
and must be less thanpenaltyLargeChange
. -
penaltyLargeChange
public int penaltyLargeChangeThe penalty applied to a large change in disparity. 0 ≤ x ≤SgmDisparityCost.MAX_COST
-
paths
Number of paths it should consider. 4 or 8 is most common. More paths slower it will run. -
errorType
Which error model should it use -
useBlocks
public boolean useBlocksIf true it will use block variants of errors. -
configCensus
Used if error type is Census -
configHMI
Used if error type is HMI -
configBlockMatch
The error can be computed using code taken from block matching -
border
Specifies how the image border is handled. In general you want to avoid an approach which would bias the error to prefer a region with lots of pixels outside the image border.
-
-
Constructor Details
-
ConfigDisparitySGM
public ConfigDisparitySGM()
-
-
Method Details
-
getBlockSize
-
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
-