@Namespace(value="cv::cuda") @Properties(inherit=opencv_cudastereo.class) public class StereoConstantSpaceBP extends StereoBeliefPropagation
The class implements algorithm described in \cite Yang2010 . StereoConstantSpaceBP supports both local minimum and global minimum data cost initialization algorithms. For more details, see the paper mentioned above. By default, a local algorithm is used. To enable a global algorithm, set use_local_init_data_cost to false .
StereoConstantSpaceBP uses a truncated linear model for the data cost and discontinuity terms:
\[DataCost = data \_ weight \cdot \min ( \lvert I_2-I_1 \rvert , max \_ data \_ term)\]
\[DiscTerm = \min (disc \_ single \_ jump \cdot \lvert f_1-f_2 \rvert , max \_ disc \_ term)\]
For more details, see \cite Yang2010 .
By default, StereoConstantSpaceBP uses floating-point arithmetics and the CV_32FC1 type for messages. But it can also use fixed-point arithmetics and the CV_16SC1 message type for better performance. To avoid an overflow in this case, the parameters must satisfy the following requirement:
\[10 \cdot 2^{levels-1} \cdot max \_ data \_ term < SHRT \_ MAX\]
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounterDISP_SCALE, DISP_SHIFT| Constructor and Description |
|---|
StereoConstantSpaceBP(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
estimateRecommendedParams(int width,
int height,
int[] ndisp,
int[] iters,
int[] levels,
int[] nr_plane) |
static void |
estimateRecommendedParams(int width,
int height,
IntBuffer ndisp,
IntBuffer iters,
IntBuffer levels,
IntBuffer nr_plane) |
static void |
estimateRecommendedParams(int width,
int height,
IntPointer ndisp,
IntPointer iters,
IntPointer levels,
IntPointer nr_plane)
\brief Uses a heuristic method to compute parameters (ndisp, iters, levelsand nrplane) for the specified
image size (widthand height).
|
int |
getNrPlane()
number of active disparity on the first level
|
boolean |
getUseLocalInitDataCost() |
void |
setNrPlane(int nr_plane) |
void |
setUseLocalInitDataCost(boolean use_local_init_data_cost) |
compute, compute, compute, compute, compute, compute, compute, compute, compute, estimateRecommendedParams, estimateRecommendedParams, estimateRecommendedParams, getDataWeight, getDiscSingleJump, getMaxDataTerm, getMaxDiscTerm, getMsgType, getNumIters, getNumLevels, setDataWeight, setDiscSingleJump, setMaxDataTerm, setMaxDiscTerm, setMsgType, setNumIters, setNumLevelscompute, compute, compute, getBlockSize, getDisp12MaxDiff, getMinDisparity, getNumDisparities, getSpeckleRange, getSpeckleWindowSize, setBlockSize, setDisp12MaxDiff, setMinDisparity, setNumDisparities, setSpeckleRange, setSpeckleWindowSizeclear, empty, getDefaultName, position, read, save, save, write, write, writeaddress, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zeropublic StereoConstantSpaceBP(Pointer p)
Pointer.Pointer(Pointer).public int getNrPlane()
public void setNrPlane(int nr_plane)
public void setUseLocalInitDataCost(@Cast(value="bool") boolean use_local_init_data_cost)
public static void estimateRecommendedParams(int width,
int height,
@ByRef
IntPointer ndisp,
@ByRef
IntPointer iters,
@ByRef
IntPointer levels,
@ByRef
IntPointer nr_plane)
public static void estimateRecommendedParams(int width,
int height,
@ByRef
IntBuffer ndisp,
@ByRef
IntBuffer iters,
@ByRef
IntBuffer levels,
@ByRef
IntBuffer nr_plane)
Copyright © 2020. All rights reserved.