StereoVision source documentation¶
Utilities for 3d reconstruction using stereo cameras.
Modules:
stereo_cameras
- Camera interfacescalibration
- Tools for calibrating stereo camerasblockmatchers
- Blockmatching algorithm matcherspoint_cloud
- Point cloudsui_utils
- Utilities for user interactionexceptions
- Various exceptions
Import structure:
Camera interfaces¶
Camera calibration¶
Block matchers¶
Point clouds¶
Point cloud class generated from stereo image pairs.
Classes:
PointCloud
- Point cloud with RGB colors
-
class
stereovision.point_cloud.
PointCloud
(coordinates, colors)[source]¶ Bases:
object
3D point cloud generated from a stereo image pair.
Initialize point cloud with given coordinates and associated colors.
coordinates
andcolors
should be numpy arrays of the same length, in whichcoordinates
is made of three-dimensional point positions (X, Y, Z) andcolors
is made of three-dimensional spectral data, e.g. (R, G, B).-
ply_header
= 'ply\nformat ascii 1.0\nelement vertex {vertex_count}\nproperty float x\nproperty float y\nproperty float z\nproperty uchar red\nproperty uchar green\nproperty uchar blue\nend_header\n'¶ Header for exporting point cloud to PLY
-
User interface utilities¶
Exceptions¶
Various exceptions for working with stereovision.
Classes:
ChessboardNotFoundError
BadBlockMatcherArgumentError
StereoBMError
InvalidBMPresetError
InvalidSearchRangeError
InvalidWindowSizeError
StereoSGBMError
InvalidNumDisparitiesError
InvalidSADWindowSizeError
InvalidFirstDisparityChangePenaltyError
InvalidSecondDisparityChangePenaltyError
InvalidUniquenessRatioError
InvalidSpeckleWindowSizeError
InvalidSpeckleRangeError
-
exception
stereovision.exceptions.
ChessboardNotFoundError
[source]¶ Bases:
Exception
No chessboard could be found in searched image.
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
stereovision.exceptions.
BadBlockMatcherArgumentError
[source]¶ Bases:
Exception
Bad argument supplied for a
BlockMatcher
.-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
stereovision.exceptions.
StereoBMError
[source]¶ Bases:
stereovision.exceptions.BadBlockMatcherArgumentError
Bad argument supplied for a
StereoBM
.-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
stereovision.exceptions.
StereoSGBMError
[source]¶ Bases:
stereovision.exceptions.BadBlockMatcherArgumentError
Bad argument supplied for a
StereoSGBM
.-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
stereovision.exceptions.
InvalidBMPresetError
[source]¶ Bases:
stereovision.exceptions.StereoBMError
Invalid BM preset.
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
stereovision.exceptions.
InvalidSearchRangeError
[source]¶ Bases:
stereovision.exceptions.StereoBMError
Invalid search range.
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
stereovision.exceptions.
InvalidWindowSizeError
[source]¶ Bases:
stereovision.exceptions.StereoBMError
Invalid search range.
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
stereovision.exceptions.
InvalidNumDisparitiesError
[source]¶ Bases:
stereovision.exceptions.StereoSGBMError
Invalid number of disparities.
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
stereovision.exceptions.
InvalidSADWindowSizeError
[source]¶ Bases:
stereovision.exceptions.StereoSGBMError
Invalid search window size.
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
stereovision.exceptions.
InvalidFirstDisparityChangePenaltyError
[source]¶ Bases:
stereovision.exceptions.StereoSGBMError
Invalid first disparity change penalty.
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
stereovision.exceptions.
InvalidSecondDisparityChangePenaltyError
[source]¶ Bases:
stereovision.exceptions.StereoSGBMError
Invalid second disparity change penalty.
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
stereovision.exceptions.
InvalidUniquenessRatioError
[source]¶ Bases:
stereovision.exceptions.StereoSGBMError
Invalid uniqueness ratio.
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
stereovision.exceptions.
InvalidSpeckleWindowSizeError
[source]¶ Bases:
stereovision.exceptions.StereoSGBMError
Invalid speckle window size.
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
stereovision.exceptions.
InvalidSpeckleRangeError
[source]¶ Bases:
stereovision.exceptions.StereoSGBMError
Invalid speckle range.
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-