|
OpenCV 2.4.2 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opencv.calib3d.StereoBM
public class StereoBM
Class for computing stereo correspondence using the block matching algorithm.
The class is a C++ wrapper for the associated functions. In particular, :ocv:funcx:"StereoBM.operator()" is the wrapper for "cvFindStereoCorrespondenceBM".
Field Summary | |
---|---|
static int |
BASIC_PRESET
|
static int |
FISH_EYE_PRESET
|
static int |
NARROW_PRESET
|
protected long |
nativeObj
|
static int |
PREFILTER_NORMALIZED_RESPONSE
|
static int |
PREFILTER_XSOBEL
|
Constructor Summary | |
---|---|
|
StereoBM()
The constructors. |
|
StereoBM(int preset)
The constructors. |
|
StereoBM(int preset,
int ndisparities,
int SADWindowSize)
The constructors. |
protected |
StereoBM(long addr)
|
Method Summary | |
---|---|
void |
compute(Mat left,
Mat right,
Mat disparity)
Computes disparity using the BM algorithm for a rectified stereo pair. |
void |
compute(Mat left,
Mat right,
Mat disparity,
int disptype)
Computes disparity using the BM algorithm for a rectified stereo pair. |
protected void |
finalize()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BASIC_PRESET
public static final int FISH_EYE_PRESET
public static final int NARROW_PRESET
protected final long nativeObj
public static final int PREFILTER_NORMALIZED_RESPONSE
public static final int PREFILTER_XSOBEL
Constructor Detail |
---|
public StereoBM()
The constructors.
The constructors initialize StereoBM
state. You can then call
StereoBM.operator()
to compute disparity for a specific stereo
pair.
Note: In the C API you need to deallocate CvStereoBM
state when
it is not needed anymore using cvReleaseStereoBMState(&stereobm)
.
public StereoBM(int preset)
The constructors.
The constructors initialize StereoBM
state. You can then call
StereoBM.operator()
to compute disparity for a specific stereo
pair.
Note: In the C API you need to deallocate CvStereoBM
state when
it is not needed anymore using cvReleaseStereoBMState(&stereobm)
.
preset
- specifies the whole set of algorithm parameters, one of:
After constructing the class, you can override any parameters set by the preset.
public StereoBM(int preset, int ndisparities, int SADWindowSize)
The constructors.
The constructors initialize StereoBM
state. You can then call
StereoBM.operator()
to compute disparity for a specific stereo
pair.
Note: In the C API you need to deallocate CvStereoBM
state when
it is not needed anymore using cvReleaseStereoBMState(&stereobm)
.
preset
- specifies the whole set of algorithm parameters, one of:
After constructing the class, you can override any parameters set by the preset.
ndisparities
- the disparity search range. For each pixel algorithm will
find the best disparity from 0 (default minimum disparity) to
ndisparities
. The search range can then be shifted by changing
the minimum disparity.SADWindowSize
- the linear size of the blocks compared by the algorithm.
The size should be odd (as the block is centered at the current pixel).
Larger block size implies smoother, though less accurate disparity map.
Smaller block size gives more detailed disparity map, but there is higher
chance for algorithm to find a wrong correspondence.protected StereoBM(long addr)
Method Detail |
---|
public void compute(Mat left, Mat right, Mat disparity)
Computes disparity using the BM algorithm for a rectified stereo pair.
The method executes the BM algorithm on a rectified stereo pair. See the
stereo_match.cpp
OpenCV sample on how to prepare images and call
the method. Note that the method is not constant, thus you should not use the
same StereoBM
instance from within different threads
simultaneously. The function is parallelized with the TBB library.
left
- Left 8-bit single-channel image.right
- Right image of the same size and the same type as the left one.disparity
- Output disparity map. It has the same size as the input
images. When disptype==CV_16S
, the map is a 16-bit signed
single-channel image, containing disparity values scaled by 16. To get the
true disparity values from such fixed-point representation, you will need to
divide each disp
element by 16. If disptype==CV_32F
,
the disparity map will already contain the real disparity values on output.public void compute(Mat left, Mat right, Mat disparity, int disptype)
Computes disparity using the BM algorithm for a rectified stereo pair.
The method executes the BM algorithm on a rectified stereo pair. See the
stereo_match.cpp
OpenCV sample on how to prepare images and call
the method. Note that the method is not constant, thus you should not use the
same StereoBM
instance from within different threads
simultaneously. The function is parallelized with the TBB library.
left
- Left 8-bit single-channel image.right
- Right image of the same size and the same type as the left one.disparity
- Output disparity map. It has the same size as the input
images. When disptype==CV_16S
, the map is a 16-bit signed
single-channel image, containing disparity values scaled by 16. To get the
true disparity values from such fixed-point representation, you will need to
divide each disp
element by 16. If disptype==CV_32F
,
the disparity map will already contain the real disparity values on output.disptype
- Type of the output disparity map, CV_16S
(default) or CV_32F
.protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
|
Official OpenCV 2.4 Documentation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |