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:
object3D point cloud generated from a stereo image pair.
Initialize point cloud with given coordinates and associated colors.
coordinatesandcolorsshould be numpy arrays of the same length, in whichcoordinatesis made of three-dimensional point positions (X, Y, Z) andcolorsis 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
InvalidBMPresetErrorInvalidSearchRangeErrorInvalidWindowSizeError
StereoSGBMError
InvalidNumDisparitiesErrorInvalidSADWindowSizeErrorInvalidFirstDisparityChangePenaltyErrorInvalidSecondDisparityChangePenaltyErrorInvalidUniquenessRatioErrorInvalidSpeckleWindowSizeErrorInvalidSpeckleRangeError
-
exception
stereovision.exceptions.ChessboardNotFoundError[source]¶ Bases:
ExceptionNo 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:
ExceptionBad 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.BadBlockMatcherArgumentErrorBad 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.BadBlockMatcherArgumentErrorBad 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.StereoBMErrorInvalid BM preset.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
stereovision.exceptions.InvalidSearchRangeError[source]¶ Bases:
stereovision.exceptions.StereoBMErrorInvalid search range.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
stereovision.exceptions.InvalidWindowSizeError[source]¶ Bases:
stereovision.exceptions.StereoBMErrorInvalid search range.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
stereovision.exceptions.InvalidNumDisparitiesError[source]¶ Bases:
stereovision.exceptions.StereoSGBMErrorInvalid 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.StereoSGBMErrorInvalid 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.StereoSGBMErrorInvalid 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.StereoSGBMErrorInvalid 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.StereoSGBMErrorInvalid uniqueness ratio.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
stereovision.exceptions.InvalidSpeckleWindowSizeError[source]¶ Bases:
stereovision.exceptions.StereoSGBMErrorInvalid 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.StereoSGBMErrorInvalid speckle range.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-