diff --git a/docs/_modules/index.html b/docs/_modules/index.html index 114810d..6459472 100644 --- a/docs/_modules/index.html +++ b/docs/_modules/index.html @@ -1,7 +1,7 @@ - + @@ -10,9 +10,10 @@ + + - - + @@ -60,7 +61,7 @@

Quick search

- +
@@ -80,7 +81,7 @@

Navigation

\ No newline at end of file diff --git a/docs/_modules/simplestereo/_rigs.html b/docs/_modules/simplestereo/_rigs.html index 07f55e9..b34b2a2 100644 --- a/docs/_modules/simplestereo/_rigs.html +++ b/docs/_modules/simplestereo/_rigs.html @@ -1,7 +1,7 @@ - + @@ -10,9 +10,10 @@ + + - - + @@ -59,7 +60,7 @@

Source code for simplestereo._rigs

 
 
 
[docs]class StereoRig: - """ + """ Keep together and manage all parameters of a calibrated stereo rig. The essential E and fundamental F matrices are optional as they are not always available. @@ -170,7 +171,7 @@

Source code for simplestereo._rigs

 
 
[docs] @classmethod def fromFile(cls, filepath): - """ + """ Alternative initialization of StereoRig object from JSON file. Parameters @@ -201,7 +202,7 @@

Source code for simplestereo._rigs

         return cls(res1, res2, intrinsic1, intrinsic2, distCoeffs1, distCoeffs2, R, T, F, E, reprojectionError)
[docs] def save(self, filepath): - """ + """ Save configuration to JSON file. Save the current stereo rig configuration to a JSON file that can be loaded later. @@ -230,7 +231,7 @@

Source code for simplestereo._rigs

             json.dump(out, f, indent=4)
[docs] def getCenters(self): - """ + """ Calculate camera centers in world coordinates. Anyway first camera will always be centered in zero (returned anyway). @@ -248,7 +249,7 @@

Source code for simplestereo._rigs

         return C1, C2
[docs] def getBaseline(self): - """ + """ Calculate the norm of the vector from camera 1 to camera 2. Returns @@ -260,7 +261,7 @@

Source code for simplestereo._rigs

         return np.linalg.norm(C2) # No need to do C2 - C1 as C1 is always zero (origin of world system)
[docs] def getProjectionMatrices(self): - """ + """ Calculate the projection matrices of camera 1 and camera 2. Returns @@ -275,7 +276,7 @@

Source code for simplestereo._rigs

         return Po1, Po2
[docs] def getFundamentalMatrix(self): - """ + """ Returns the fundamental matrix F. If not set, F is computed from projection matrices using @@ -301,7 +302,7 @@

Source code for simplestereo._rigs

         return self.F
[docs] def getEssentialMatrix(self): - """ + """ Returns the essential matrix E. If not set, E is computed from the fundamental matrix F and the camera matrices. @@ -322,7 +323,7 @@

Source code for simplestereo._rigs

         return self.E
[docs] def undistortImages(self, img1, img2, changeCameras=False, alpha=1, destDims=None, centerPrincipalPoint=False): - """ + """ Undistort two given images of the stereo rig. This method wraps `cv2.getOptimalNewCameraMatrix()` followed @@ -378,7 +379,7 @@

Source code for simplestereo._rigs

           
         
 
[docs]class RectifiedStereoRig(StereoRig): - """ + """ Keep together and manage all parameters of a calibrated and rectified stereo rig. It includes all the parameters of StereoRig plus two rectifying homographies. Differently from OpenCV, @@ -442,7 +443,7 @@

Source code for simplestereo._rigs

 
 
[docs] @classmethod def fromFile(cls, filepath): - """ + """ Alternative initialization of StereoRigRectified object from JSON file. Parameters @@ -476,7 +477,7 @@

Source code for simplestereo._rigs

         return cls(Rcommon, rectHomography1, rectHomography2, res1, res2, intrinsic1, intrinsic2, distCoeffs1, distCoeffs2, R, T, F, E, reprojectionError)
[docs] def save(self, filepath): - """ + """ Save configuration to JSON file. Save the current stereo rig configuration to a JSON file that can be loaded later. @@ -508,7 +509,7 @@

Source code for simplestereo._rigs

             json.dump(out, f, indent=4)
[docs] def getRectifiedProjectionMatrices(self): - """ + """ Calculate the projection matrices of camera 1 and camera 2 after rectification. New projection matrices, after rectification, share the same orientation `Rcommon`, @@ -528,7 +529,7 @@

Source code for simplestereo._rigs

         return P1, P2  
[docs] def computeRectificationMaps(self, destDims=None, alpha=1): - """ + """ Compute the two maps to undistort and rectify the stereo pair. This method wraps ``cv2.initUndistortRectifyMap()`` plus a custom fitting algorithm to keep image within dimensions. @@ -580,7 +581,7 @@

Source code for simplestereo._rigs

         self.mapx2, self.mapy2 = cv2.initUndistortRectifyMap(self.intrinsic2, self.distCoeffs2, R2, self.K2, destDims, cv2.CV_32FC1)
[docs] def rectifyImages(self, img1, img2, interpolation=cv2.INTER_LINEAR): - """ + """ Undistort, rectify and apply affine transformation to a couple of images coming from the stereo rig. *img1* and *img2* must be provided as in calibration (es. img1 is the left image, img2 the right one). @@ -606,7 +607,7 @@

Source code for simplestereo._rigs

         return img1_rect, img2_rect
[docs] def get3DPoints(self, disparityMap): - """ + """ Get the 3D points in the space from the disparity map. If the calibration was done with real world units (e.g. millimeters), @@ -668,7 +669,7 @@

Source code for simplestereo._rigs

 
 
 
[docs]class StructuredLightRig(StereoRig): - """ + """ StereoRig child class with structured light methods. """ def __init__(self, r): @@ -691,7 +692,7 @@

Source code for simplestereo._rigs

         return StructuredLightRig(StereoRig.fromFile(self))
[docs] def triangulate(self, camPoints, projPoints): - """ + """ Given camera-projector correspondences, proceed with triangulation. @@ -739,7 +740,7 @@

Source code for simplestereo._rigs

         return finalPoints
[docs] def undistortCameraImage(self, imgObj): - """ + """ Undistort camera image. Parameters @@ -770,7 +771,7 @@

Quick search

- +
@@ -791,7 +792,7 @@

Navigation

\ No newline at end of file diff --git a/docs/_modules/simplestereo/active.html b/docs/_modules/simplestereo/active.html index d799cf4..7f4b602 100644 --- a/docs/_modules/simplestereo/active.html +++ b/docs/_modules/simplestereo/active.html @@ -1,7 +1,7 @@ - + @@ -10,9 +10,10 @@ + + - - + @@ -60,7 +61,7 @@

Source code for simplestereo.active

 
 
 
[docs]def generateGrayCodeImgs(targetDir, resolution): - """ + """ Generate Gray Codes and save it to PNG images. Starts from the couple of images *0.png* and *1.png* (one is the @@ -104,7 +105,7 @@

Source code for simplestereo.active

 
 
 def _getCentralPeak(length, period, shift=0):
-    """
+    """
     Get maximum intensity pixel position in a fringe with central stripe
     built from :func:`ss.active.buildFringe`.
     
@@ -124,7 +125,7 @@ 

Source code for simplestereo.active

     
 
 
[docs]def buildFringe(period, shift=0, dims=(1280,720), vertical=False, stripeColor=None, dtype=np.uint8): - """ + """ Build sinusoidal fringe image. Parameters @@ -188,7 +189,7 @@

Source code for simplestereo.active

 
 
 
[docs]def buildBinaryFringe(period=10, shift=0, dims=(1280,720), vertical=False, stripeColor=None, dtype=np.uint8): - """ + """ Build binary fringe image. Parameters @@ -253,7 +254,7 @@

Source code for simplestereo.active

     
 
 
[docs]def buildAnaglyphFringe(period=10, shift=0, dims=(1280,720), vertical=False, dtype=np.uint8): - """ + """ Build sinusoidal anaglyph fringe image. Assumes BGR images, using blue and red as complementary colors and @@ -309,7 +310,7 @@

Source code for simplestereo.active

     
     
 
[docs]def findCentralStripe(image, color='r', sensitivity=0.5, interpolation='linear'): - """ + """ Find coordinates of a colored stripe in the image. Search is done with subpixel accuracy only along the x-axis @@ -388,7 +389,7 @@

Source code for simplestereo.active

 ###### (c) Pasquale Lafiosca 2020 ######
 ########################################
 
[docs]class StereoFTP: - """ + """ Manager of the Stereo Fourier Transform Profilometry. Parameters @@ -442,7 +443,7 @@

Source code for simplestereo.active

     
 
[docs] @staticmethod def convertGrayscale(img): - """ + """ Convert to grayscale using max. This keeps highest BGR value over the central stripe @@ -469,7 +470,7 @@

Source code for simplestereo.active

         
     
     def _getProjectorMapping(self, z, interpolation = cv2.INTER_CUBIC):
-        """
+        """
         Find projector image points corresponding to each camera pixel
         after projection on reference plane to build coordinates and
         virtual reference image (as seen from camera)
@@ -532,7 +533,7 @@ 

Source code for simplestereo.active

     
     
     def _calculateCameraFrequency(self, objPoints):
-        """
+        """
         Estimate fc from system geometry, fp and object points value.
         
         Draw a plane at given z distance in front of the camera.
@@ -598,7 +599,7 @@ 

Source code for simplestereo.active

         return 1/Tc    
     
     def _triangulate(self, camPoints, p_x, roi):
-        """
+        """
         For each camera undistorted point (c_x, c_y) and corresponding 
         projector x-value p_x, find 3D point using Fundamental matrix.
         """
@@ -645,7 +646,7 @@ 

Source code for simplestereo.active

         
         
 
[docs] def getCloud(self, imgObj, radius_factor=0.5, roi=None, unwrappingMethod=None, plot=False): - """ + """ Process an image and get the point cloud. Parameters @@ -804,7 +805,7 @@

Source code for simplestereo.active

         ep = self.ep
         
         ### Find k values from central stripe
-        '''
+        '''
         # Calculate absolute phase shift [S. Zhang 2006 Novel method...]
         theta_shift = phaseUnwrapped[cam_indexes[:,1],cam_indexes[:,0]]
         theta_shift = np.mean(theta_shift)
@@ -881,7 +882,7 @@ 

Source code for simplestereo.active

     
 
 
[docs]class StereoFTPAnaglyph(StereoFTP): - """ + """ Manager of the Stereo Fourier Transform Profilometry using an anaglyph pattern build with :func:`buildAnaglyphFringe`. @@ -907,7 +908,7 @@

Source code for simplestereo.active

     
 
[docs] @staticmethod def convertGrayscale(img): - """ + """ Convert to grayscale using Guo et al., "Improved fourier transform profilometry for the automatic measurement of 3D object shapes", 1990. @@ -932,7 +933,7 @@

Source code for simplestereo.active

         
     
 
[docs] def getCloud(self, imgObj, radius_factor=0.5, roi=None, unwrappingMethod=None, plot=False): - """ + """ Process an anaglyph image and get the point cloud. The pattern expected to be projected on the object is the one @@ -1091,7 +1092,7 @@

Source code for simplestereo.active

         ep = self.ep
         
         ### Find k values from central stripe
-        '''
+        '''
         # Calculate absolute phase shift [S. Zhang 2006 Novel method...]
         theta_shift = phaseUnwrapped[cam_indexes[:,1],cam_indexes[:,0]]
         theta_shift = np.mean(theta_shift)
@@ -1167,7 +1168,7 @@ 

Source code for simplestereo.active

         return finalPoints.reshape(roi_h,roi_w,3)
[docs]class GrayCode: - """ + """ Wrapper for the Gray code method from OpenCV. Structured-light implementation using camera-projector @@ -1211,7 +1212,7 @@

Source code for simplestereo.active

     
         
 
[docs] def getCloud(self, images, roi=None): - """ + """ Perform the 3D point calculation from a list of images. Parameters @@ -1303,7 +1304,7 @@

Source code for simplestereo.active

     
     
 
[docs]class StereoFTP_Mapping(StereoFTP): - """ + """ Manager of the classic Stereo Fourier Transform Profilometry. Classic method (does not use a virtual reference plane) but it does @@ -1328,7 +1329,7 @@

Source code for simplestereo.active

     
     
 
[docs] def getCloud(self, imgObj, radius_factor=0.5, roi=None, unwrappingMethod=None, plot=False): - """ + """ Process an image and get the point cloud. Parameters @@ -1500,7 +1501,7 @@

Source code for simplestereo.active

 GrayCodeSingle = GrayCode
 
 
[docs]class GrayCodeDouble: - """ + """ Wrapper for the Gray code method from OpenCV. Conventional active stereo implementation, i.e. using two calibrated cameras and @@ -1545,7 +1546,7 @@

Source code for simplestereo.active

         #self.R_inv[3,3] = 1
         
 
[docs] def getCloud(self, images, roi1=None, roi2=None): - """ + """ Perform the 3D point calculation from a list of images. Parameters @@ -1648,7 +1649,7 @@

Source code for simplestereo.active

 
 
 
[docs]def computeROI(img, blackThreshold=10, extraMargin=0): - """ + """ Exclude black regions along borders. Usually the projector does not illuminate the whole image area. @@ -1740,7 +1741,7 @@

Source code for simplestereo.active

 ### TEMP FOR EXPERIMENTS
 ### Return phase shift and phase of object only (NO 3D)
 
[docs]class StereoFTP_PhaseOnly: - """ + """ Manager of the Stereo Fourier Transform Profilometry. Parameters @@ -1787,7 +1788,7 @@

Source code for simplestereo.active

     
 
[docs] @staticmethod def convertGrayscale(img): - """ + """ Convert to grayscale using max. This keeps highest BGR value over the central stripe @@ -1810,7 +1811,7 @@

Source code for simplestereo.active

     
     
     def _getProjectorMapping(self, z, interpolation = cv2.INTER_CUBIC):
-        """
+        """
         Find projector image points corresponding to each camera pixel
         after projection on reference plane to build coordinates and
         virtual reference image (as seen from camera)
@@ -1873,7 +1874,7 @@ 

Source code for simplestereo.active

     
     
     def _calculateCameraFrequency(self, objPoints):
-        """
+        """
         Estimate fc from system geometry, fp and object points value.
         
         Draw a plane at given z distance in front of the camera.
@@ -1939,7 +1940,7 @@ 

Source code for simplestereo.active

         return 1/Tc    
     
     def _triangulate(self, camPoints, p_x, roi):
-        """
+        """
         For each camera undistorted point (c_x, c_y) and corresponding 
         projector x-value p_x, find 3D point using Fundamental matrix.
         """
@@ -1987,7 +1988,7 @@ 

Source code for simplestereo.active

         
     
 
[docs] def getPhase(self, imgObj, radius_factor=0.5, roi=None, plot=False): - """ + """ Process an image and get the point cloud. Parameters @@ -2128,7 +2129,7 @@

Quick search

- +
@@ -2149,7 +2150,7 @@

Navigation

\ No newline at end of file diff --git a/docs/_modules/simplestereo/calibration.html b/docs/_modules/simplestereo/calibration.html index 2ee50a5..37be49f 100644 --- a/docs/_modules/simplestereo/calibration.html +++ b/docs/_modules/simplestereo/calibration.html @@ -1,7 +1,7 @@ - + @@ -10,9 +10,10 @@ + + - - + @@ -62,7 +63,7 @@

Source code for simplestereo.calibration

 
 
 
[docs]def chessboardSingle(images, chessboardSize = DEFAULT_CHESSBOARD_SIZE, squareSize=1, showImages=False): - """ + """ Calibrate a single camera with a chessboard pattern. Parameters @@ -120,7 +121,7 @@

Source code for simplestereo.calibration

     
         
 
[docs]def chessboardStereo(images, chessboardSize = DEFAULT_CHESSBOARD_SIZE, squareSize=1): - """ + """ Performs stereo calibration between two cameras and returns a StereoRig object. First camera (generally left) will be put in world origin. @@ -202,7 +203,7 @@

Source code for simplestereo.calibration

 
 
[docs]def chessboardProCam(images, projectorResolution, chessboardSize = DEFAULT_CHESSBOARD_SIZE, squareSize=1, black_thr=40, white_thr=5, camIntrinsic=None, camDistCoeffs=None): - """ + """ Performs stereo calibration between a camera (reference) and a projector. Adapted from the code available (MIT licence) at https://github.com/kamino410/procam-calibration @@ -375,7 +376,7 @@

Source code for simplestereo.calibration

 
 
 def _getWhiteCenters(cam_corners_list, cam_int, cam_dist, chessboardSize, squareSize):
-    """
+    """
     From ordered camera chessboard corners and camera intrinsics, get
     world coordinate of the center of the white squares.
     
@@ -436,7 +437,7 @@ 

Source code for simplestereo.calibration

     
 
[docs]def chessboardProCamWhite(images, projectorResolution, chessboardSize = DEFAULT_CHESSBOARD_SIZE, squareSize=1, black_thr=40, white_thr=5, camIntrinsic=None, camDistCoeffs=None, extended=False): - """ + """ Performs stereo calibration between a camera (reference) and a projector. Requires a chessboard with *black* top-left square. @@ -645,7 +646,7 @@

Source code for simplestereo.calibration

 
 
[docs]def phaseShift(periods, projectorResolution, cameraImages, chessboardSize=DEFAULT_CHESSBOARD_SIZE, squareSize=1, camIntrinsic=None, camDistCoeffs=None): - """ + """ Calibrate camera and projector using phase shifting and the heterodyne principle [Reich 1997]. @@ -683,7 +684,7 @@

Source code for simplestereo.calibration

     
     # Internal functions
     def getPhase(imgPaths):
-        """
+        """
         Get ordered images and retrieve wrapped phase map.
         """
         I = []
@@ -697,7 +698,7 @@ 

Source code for simplestereo.calibration

         
     
     def unwrap(theta0, theta1, T0, T1):
-        """
+        """
         Given absolute phase `theta0`, wrapped phase `theta1` and their
         respective periods `T0` and `T1`, unwrap `theta1`.
         
@@ -708,7 +709,7 @@ 

Source code for simplestereo.calibration

     
     
     def getProjCoord(phase_x, phase_y):
-        """
+        """
         Return projector coordinate corresponding to absolute phase values.
         """
         px = projectorResolution[0]*phase_x/(2*np.pi)
@@ -813,7 +814,7 @@ 

Source code for simplestereo.calibration

 
 
[docs]def phaseShiftWhite(periods, projectorResolution, cameraImages, chessboardSize=DEFAULT_CHESSBOARD_SIZE, squareSize=1, camIntrinsic=None, camDistCoeffs=None, extended=False): - """ + """ Calibrate camera and projector using phase shifting and heterodyne principle [Reich 1997]. Using center of white squares instead of corners as targets. @@ -860,7 +861,7 @@

Source code for simplestereo.calibration

     
     # Internal functions
     def getPhase(imgPaths):
-        """
+        """
         Get ordered images and retrieve wrapped phase map.
         """
         I = []
@@ -874,7 +875,7 @@ 

Source code for simplestereo.calibration

         
     
     def unwrap(theta0, theta1, T0, T1):
-        """
+        """
         Given absolute phase `theta0`, wrapped phase `theta1` and their
         respective periods `T0` and `T1`, unwrap `theta1`.
         
@@ -885,7 +886,7 @@ 

Source code for simplestereo.calibration

     
     
     def getProjCoord(phase_x, phase_y):
-        """
+        """
         Return projector coordinate corresponding to absolute phase values.
         """
         px = projectorResolution[0]*phase_x/(2*np.pi)
@@ -983,7 +984,7 @@ 

Source code for simplestereo.calibration

     # Calibrate projector
     proj_rms, proj_int, proj_dist, proj_rvecs, proj_tvecs = cv2.calibrateCamera(
         proj_objps_list, proj_corners_list, projectorResolution, None, None, None, None)
-    '''
+    '''
     # Calibrate projector WITHOUT LENS DISTORTION
     proj_rms, proj_int, proj_dist, proj_rvecs, proj_tvecs = cv2.calibrateCamera(
         proj_objps_list, proj_corners_list, projectorResolution, None, None, None, None, flags=cv2.CALIB_FIX_K1+cv2.CALIB_FIX_K2+cv2.CALIB_FIX_K3+cv2.CALIB_ZERO_TANGENT_DIST)
@@ -1007,7 +1008,7 @@ 

Source code for simplestereo.calibration

 
 
 
[docs]def generateChessboardSVG(chessboardSize, filepath, squareSize=20, border=10): - """ + """ Write the desired chessboard to a SVG file. *chessboardSize* is expressed as (columns, rows) tuple, counting *internal line* columns and rows @@ -1039,7 +1040,7 @@

Source code for simplestereo.calibration

     
         
 
[docs]def getFundamentalMatrixFromProjections(P1,P2): - """ + """ Compute the fundamental matrix from two projection matrices. The algorithm is adapted from an original lesson of Cristina Turrini, UNIMI, Trento (09/04/2017). @@ -1089,7 +1090,7 @@

Quick search

- +
@@ -1110,7 +1111,7 @@

Navigation

\ No newline at end of file diff --git a/docs/_modules/simplestereo/passive.html b/docs/_modules/simplestereo/passive.html index 2c64595..2cbca00 100644 --- a/docs/_modules/simplestereo/passive.html +++ b/docs/_modules/simplestereo/passive.html @@ -1,7 +1,7 @@ - + @@ -10,9 +10,10 @@ + + - - + @@ -53,7 +54,7 @@

Source code for simplestereo.passive

 
 
 
[docs]class StereoASW(): - """ + """ Custom implementation of "Adaptive Support-Weight Approach for Correspondence Search", K. Yoon, I. Kweon, 2006. @@ -109,7 +110,7 @@

Source code for simplestereo.passive

         
     
 
[docs] def compute(self, img1, img2): - """ + """ Compute disparity map for BGR images. Parameters @@ -136,7 +137,7 @@

Source code for simplestereo.passive

 
 
 
[docs]class StereoGSW(): - """ + """ *Incomplete* implementation of "Local stereo matching using geodesic support weights", Asmaa Hosni, Michael Bleyer, Margrit Gelautz and Christoph Rhemann (2009). @@ -184,7 +185,7 @@

Source code for simplestereo.passive

         self.bins = bins
         
 
[docs] def compute(self, img1, img2): - """ + """ Compute disparity map for 3-color channel images. """ @@ -213,7 +214,7 @@

Quick search

- +
@@ -234,7 +235,7 @@

Navigation

\ No newline at end of file diff --git a/docs/_modules/simplestereo/points.html b/docs/_modules/simplestereo/points.html index 6e4e0d9..4934305 100644 --- a/docs/_modules/simplestereo/points.html +++ b/docs/_modules/simplestereo/points.html @@ -1,7 +1,7 @@ - + @@ -10,9 +10,10 @@ + + - - + @@ -47,7 +48,7 @@

Source code for simplestereo.points

 
 
 
[docs]def exportPLY(points3D, filepath, referenceImage=None, precision=6): - """ + """ Export raw point cloud to PLY file (ASCII). Parameters @@ -74,7 +75,7 @@

Source code for simplestereo.points

     with open(filepath, "w") as f:
         f.write("ply\nformat ascii 1.0\ncomment SimpleStereo point cloud export\n")
         # Store the original array shape for future use
-        f.write(f"comment Original array shape {'x'.join(str(d) for d in originalShape)}\n")
+        f.write(f"comment Original array shape {'x'.join(str(d) for d in originalShape)}\n")
         f.write("element vertex {}\n".format(n))
         f.write("property double x\nproperty double y\nproperty double z\n")
         
@@ -119,7 +120,7 @@ 

Source code for simplestereo.points

                             referenceImage[i], p=precision)) # Grayscale
[docs]def importPLY(filename, *properties): - """ + """ Import 3D coordinates from PLY file. Parameters @@ -161,7 +162,7 @@

Source code for simplestereo.points

 
 
 
[docs]def getAdimensional3DPoints(disparityMap): - """ + """ Get adimensional 3D points from the disparity map. This is the adimensional version of @@ -216,7 +217,7 @@

Source code for simplestereo.points

 
 
 
[docs]def distortPoints(points, distCoeff): - ''' + ''' Undistort relative coordinate points. Parameters @@ -274,7 +275,7 @@

Quick search

- +
@@ -295,7 +296,7 @@

Navigation

\ No newline at end of file diff --git a/docs/_modules/simplestereo/rectification.html b/docs/_modules/simplestereo/rectification.html index e037e97..d124e9e 100644 --- a/docs/_modules/simplestereo/rectification.html +++ b/docs/_modules/simplestereo/rectification.html @@ -1,7 +1,7 @@ - + @@ -10,9 +10,10 @@ + + - - + @@ -55,7 +56,7 @@

Source code for simplestereo.rectification

 
 
[docs]def getFittingMatrix(intrinsicMatrix1, intrinsicMatrix2, H1, H2, dims1, dims2, distCoeffs1=None, distCoeffs2=None, destDims=None, alpha=1): - """ + """ Compute affine tranformation to fit the rectified images into desidered dimensions. After rectification usually the image is no more into the original image bounds. @@ -162,7 +163,7 @@

Source code for simplestereo.rectification

     
 
 def _getCorners(H, intrinsicMatrix, dims, distCoeffs=None):
-    """
+    """
     Get points on the image borders after distortion correction and a rectification transformation.
     
     Parameters
@@ -196,7 +197,7 @@ 

Source code for simplestereo.rectification

 
 
 def _getCornersFromMatrix(M, dims):
-    """
+    """
     Calculate image corners from homography.
     
     Parameters
@@ -225,7 +226,7 @@ 

Source code for simplestereo.rectification

 
 
 
[docs]def stereoRectify(rig): - """ + """ Rectify the StereoRig object using the standard OpenCV algorithm. This function computes the new common camera orientation by averaging. @@ -261,7 +262,7 @@

Source code for simplestereo.rectification

 
 
 
[docs]def fusielloRectify(rig): - """ + """ Computes the two rectifying homographies and returns a RectifiedStereoRig. This method uses the algorithm illustrated in *A compact algorithm for rectification of stereo pair*, @@ -308,7 +309,7 @@

Source code for simplestereo.rectification

 
 
 def _lowLevelRectify(rig):
-    """
+    """
     Get basic rectification using Fusiello et al.
     for *internal* purposes only.
     
@@ -342,7 +343,7 @@ 

Source code for simplestereo.rectification

 
 
 
[docs]def loopRectify(rig): - """ + """ Computes the two rectifying homographies and returns a RectifiedStereoRig. This method is an implementation of the algorithm illustrated in @@ -527,7 +528,7 @@

Source code for simplestereo.rectification

 
 
 
[docs]def getBestXShearingTransformation(rectHomography, dims): - """ + """ Get best shear transformation (affine) over x axis that minimizes distortion. Applying a shearing transformation over the x axis does not affect rectification and allows to reduce @@ -576,7 +577,7 @@

Source code for simplestereo.rectification

 
 
 def directRectify(rig):
-    """
+    """
     Compute the analytical rectification homographies.
     
     Compute the 3x3 transformations to rectify a couple of stereo images
@@ -785,7 +786,7 @@ 

Quick search

- +
@@ -806,7 +807,7 @@

Navigation

\ No newline at end of file diff --git a/docs/_modules/simplestereo/utils.html b/docs/_modules/simplestereo/utils.html index 8859f99..0d8d13f 100644 --- a/docs/_modules/simplestereo/utils.html +++ b/docs/_modules/simplestereo/utils.html @@ -1,7 +1,7 @@ - + @@ -10,9 +10,10 @@ + + - - + @@ -50,7 +51,7 @@

Source code for simplestereo.utils

 
 
 
[docs]class Capture: - """Capture a video stream continuously. + """Capture a video stream continuously. Allows to capture a video stream in a separate thread and grab the current frame when needed, minimizing lags for streaming and webcams. @@ -112,7 +113,7 @@

Source code for simplestereo.utils

         self.__del__()
     
 
[docs] def start(self): - """ + """ Start the capture in a separate thread. No need to call this for video files. @@ -125,7 +126,7 @@

Source code for simplestereo.utils

         self.t.start()
[docs] def stop(self): - """ + """ Stop the capture. When finished, remember to call this method to **stop the capturing thread**. @@ -144,7 +145,7 @@

Source code for simplestereo.utils

             self.grab()
     
 
[docs] def get(self): - """ + """ Retrieve the current frame. Returns None if there is no frame (e.g. end of video file). @@ -155,7 +156,7 @@

Source code for simplestereo.utils

         return self.flip(self.frame, 1)
[docs] def setResolution(self, width, height): - """ + """ Set resolution of the camera. Do not call this for video files or when the thread is running. @@ -193,11 +194,11 @@

Source code for simplestereo.utils

         return retval
[docs] def getResolution(self): - """ Return current resolution as (width, height) tuple. """ + """ Return current resolution as (width, height) tuple. """ return self.video_capture.get(cv2.CAP_PROP_FRAME_WIDTH), self.video_capture.get(cv2.CAP_PROP_FRAME_HEIGHT)
[docs] def setFrameRate(self, fps): - """ + """ Set framerate of the camera. Do not call this for video files or when the thread is running. @@ -221,7 +222,7 @@

Source code for simplestereo.utils

 
 
 
[docs]def moveExtrinsicOriginToFirstCamera(R1,R2,t1,t2): - """ + """ Center extrinsic parameters world coordinate system into camera 1. Compute R (rotation from camera 1 to camera 2) and T (translation from camera 1 to camera 2) as used in OpenCV @@ -250,7 +251,7 @@

Source code for simplestereo.utils

     
 
 
[docs]def getCrossProductMatrix(v): - """ + """ Build the 3x3 antisymmetric matrix representing the cross product with v. In literature this is often indicated as [v]\ :subscript:`x`. @@ -272,7 +273,7 @@

Source code for simplestereo.utils

 
 
 
[docs]def drawCorrespondingEpipolarLines(img1, img2, F, x1=[], x2=[], color=(0,0,255), thickness=1): - """ + """ Draw epipolar lines passing by given coordinates in img1 or img1. The epipolar lines can be drawn on the images, knowing the @@ -360,7 +361,7 @@

Quick search

- +
@@ -381,7 +382,7 @@

Navigation

\ No newline at end of file diff --git a/docs/_static/basic.css b/docs/_static/basic.css index 7577acb..bf18350 100644 --- a/docs/_static/basic.css +++ b/docs/_static/basic.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- basic theme. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -222,7 +222,7 @@ table.modindextable td { /* -- general body styles --------------------------------------------------- */ div.body { - min-width: 360px; + min-width: 450px; max-width: 800px; } @@ -237,6 +237,16 @@ a.headerlink { visibility: hidden; } +a.brackets:before, +span.brackets > a:before{ + content: "["; +} + +a.brackets:after, +span.brackets > a:after { + content: "]"; +} + h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, @@ -325,16 +335,12 @@ p.sidebar-title { font-weight: bold; } -nav.contents, -aside.topic, div.admonition, div.topic, blockquote { clear: left; } /* -- topics ---------------------------------------------------------------- */ -nav.contents, -aside.topic, div.topic { border: 1px solid #ccc; padding: 7px; @@ -373,8 +379,6 @@ div.body p.centered { div.sidebar > :last-child, aside.sidebar > :last-child, -nav.contents > :last-child, -aside.topic > :last-child, div.topic > :last-child, div.admonition > :last-child { margin-bottom: 0; @@ -382,8 +386,6 @@ div.admonition > :last-child { div.sidebar::after, aside.sidebar::after, -nav.contents::after, -aside.topic::after, div.topic::after, div.admonition::after, blockquote::after { @@ -426,6 +428,10 @@ table.docutils td, table.docutils th { border-bottom: 1px solid #aaa; } +table.footnote td, table.footnote th { + border: 0 !important; +} + th { text-align: left; padding-right: 5px; @@ -609,26 +615,19 @@ ul.simple p { margin-bottom: 0; } -aside.footnote > span, -div.citation > span { +dl.footnote > dt, +dl.citation > dt { float: left; + margin-right: 0.5em; } -aside.footnote > span:last-of-type, -div.citation > span:last-of-type { - padding-right: 0.5em; -} -aside.footnote > p { - margin-left: 2em; -} -div.citation > p { - margin-left: 4em; -} -aside.footnote > p:last-of-type, -div.citation > p:last-of-type { + +dl.footnote > dd, +dl.citation > dd { margin-bottom: 0em; } -aside.footnote > p:last-of-type:after, -div.citation > p:last-of-type:after { + +dl.footnote > dd:after, +dl.citation > dd:after { content: ""; clear: both; } @@ -645,6 +644,10 @@ dl.field-list > dt { padding-right: 5px; } +dl.field-list > dt:after { + content: ":"; +} + dl.field-list > dd { padding-left: 0.5em; margin-top: 0em; diff --git a/docs/_static/doctools.js b/docs/_static/doctools.js index d06a71d..e509e48 100644 --- a/docs/_static/doctools.js +++ b/docs/_static/doctools.js @@ -2,155 +2,325 @@ * doctools.js * ~~~~~~~~~~~ * - * Base JavaScript utilities for all Sphinx HTML documentation. + * Sphinx JavaScript utilities for all documentation. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ -"use strict"; - -const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ - "TEXTAREA", - "INPUT", - "SELECT", - "BUTTON", -]); - -const _ready = (callback) => { - if (document.readyState !== "loading") { - callback(); - } else { - document.addEventListener("DOMContentLoaded", callback); + +/** + * select a different prefix for underscore + */ +$u = _.noConflict(); + +/** + * make the code below compatible with browsers without + * an installed firebug like debugger +if (!window.console || !console.firebug) { + var names = ["log", "debug", "info", "warn", "error", "assert", "dir", + "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", + "profile", "profileEnd"]; + window.console = {}; + for (var i = 0; i < names.length; ++i) + window.console[names[i]] = function() {}; +} + */ + +/** + * small helper function to urldecode strings + * + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL + */ +jQuery.urldecode = function(x) { + if (!x) { + return x + } + return decodeURIComponent(x.replace(/\+/g, ' ')); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s === 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; } + return result; }; +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node, addItems) { + if (node.nodeType === 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && + !jQuery(node.parentNode).hasClass(className) && + !jQuery(node.parentNode).hasClass("nohighlight")) { + var span; + var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.className = className; + } + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + if (isInSVG) { + var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + var bbox = node.parentElement.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute('class', className); + addItems.push({ + "parent": node.parentNode, + "target": rect}); + } + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this, addItems); + }); + } + } + var addItems = []; + var result = this.each(function() { + highlight(this, addItems); + }); + for (var i = 0; i < addItems.length; ++i) { + jQuery(addItems[i].parent).before(addItems[i].target); + } + return result; +}; + +/* + * backward compatibility for jQuery.browser + * This will be supported until firefox bug is fixed. + */ +if (!jQuery.browser) { + jQuery.uaMatch = function(ua) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + jQuery.browser = {}; + jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; +} + /** * Small JavaScript module for the documentation. */ -const Documentation = { - init: () => { - Documentation.initDomainIndexTable(); - Documentation.initOnKeyListeners(); +var Documentation = { + + init : function() { + this.fixFirefoxAnchorBug(); + this.highlightSearchWords(); + this.initIndexTable(); + if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) { + this.initOnKeyListeners(); + } }, /** * i18n support */ - TRANSLATIONS: {}, - PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), - LOCALE: "unknown", + TRANSLATIONS : {}, + PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; }, + LOCALE : 'unknown', // gettext and ngettext don't access this so that the functions // can safely bound to a different name (_ = Documentation.gettext) - gettext: (string) => { - const translated = Documentation.TRANSLATIONS[string]; - switch (typeof translated) { - case "undefined": - return string; // no translation - case "string": - return translated; // translation exists - default: - return translated[0]; // (singular, plural) translation tuple exists - } + gettext : function(string) { + var translated = Documentation.TRANSLATIONS[string]; + if (typeof translated === 'undefined') + return string; + return (typeof translated === 'string') ? translated : translated[0]; }, - ngettext: (singular, plural, n) => { - const translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated !== "undefined") - return translated[Documentation.PLURAL_EXPR(n)]; - return n === 1 ? singular : plural; + ngettext : function(singular, plural, n) { + var translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated === 'undefined') + return (n == 1) ? singular : plural; + return translated[Documentation.PLURALEXPR(n)]; }, - addTranslations: (catalog) => { - Object.assign(Documentation.TRANSLATIONS, catalog.messages); - Documentation.PLURAL_EXPR = new Function( - "n", - `return (${catalog.plural_expr})` - ); - Documentation.LOCALE = catalog.locale; + addTranslations : function(catalog) { + for (var key in catalog.messages) + this.TRANSLATIONS[key] = catalog.messages[key]; + this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); + this.LOCALE = catalog.locale; }, /** - * helper function to focus on search bar + * add context elements like header anchor links */ - focusSearchBar: () => { - document.querySelectorAll("input[name=q]")[0]?.focus(); + addContextElements : function() { + $('div[id] > :header:first').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this headline')). + appendTo(this); + }); + $('dt[id]').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this definition')). + appendTo(this); + }); }, /** - * Initialise the domain index toggle buttons + * workaround a firefox stupidity + * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 */ - initDomainIndexTable: () => { - const toggler = (el) => { - const idNumber = el.id.substr(7); - const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); - if (el.src.substr(-9) === "minus.png") { - el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; - toggledRows.forEach((el) => (el.style.display = "none")); - } else { - el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; - toggledRows.forEach((el) => (el.style.display = "")); + fixFirefoxAnchorBug : function() { + if (document.location.hash && $.browser.mozilla) + window.setTimeout(function() { + document.location.href += ''; + }, 10); + }, + + /** + * highlight the search words provided in the url in the text + */ + highlightSearchWords : function() { + var params = $.getQueryParameters(); + var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; + if (terms.length) { + var body = $('div.body'); + if (!body.length) { + body = $('body'); } - }; + window.setTimeout(function() { + $.each(terms, function() { + body.highlightText(this.toLowerCase(), 'highlighted'); + }); + }, 10); + $('') + .appendTo($('#searchbox')); + } + }, + + /** + * init the domain index toggle buttons + */ + initIndexTable : function() { + var togglers = $('img.toggler').click(function() { + var src = $(this).attr('src'); + var idnum = $(this).attr('id').substr(7); + $('tr.cg-' + idnum).toggle(); + if (src.substr(-9) === 'minus.png') + $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); + else + $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); + }).css('display', ''); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { + togglers.click(); + } + }, - const togglerElements = document.querySelectorAll("img.toggler"); - togglerElements.forEach((el) => - el.addEventListener("click", (event) => toggler(event.currentTarget)) - ); - togglerElements.forEach((el) => (el.style.display = "")); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + /** + * helper function to hide the search marks again + */ + hideSearchWords : function() { + $('#searchbox .highlight-link').fadeOut(300); + $('span.highlighted').removeClass('highlighted'); + var url = new URL(window.location); + url.searchParams.delete('highlight'); + window.history.replaceState({}, '', url); }, - initOnKeyListeners: () => { - // only install a listener if it is really needed - if ( - !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && - !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS - ) - return; - - document.addEventListener("keydown", (event) => { - // bail for input elements - if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; - // bail with special keys - if (event.altKey || event.ctrlKey || event.metaKey) return; - - if (!event.shiftKey) { - switch (event.key) { - case "ArrowLeft": - if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; - - const prevLink = document.querySelector('link[rel="prev"]'); - if (prevLink && prevLink.href) { - window.location.href = prevLink.href; - event.preventDefault(); + /** + * make the url absolute + */ + makeURL : function(relativeURL) { + return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; + }, + + /** + * get the current relative url + */ + getCurrentURL : function() { + var path = document.location.pathname; + var parts = path.split(/\//); + $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { + if (this === '..') + parts.pop(); + }); + var url = parts.join('/'); + return path.substring(url.lastIndexOf('/') + 1, path.length - 1); + }, + + initOnKeyListeners: function() { + $(document).keydown(function(event) { + var activeElementType = document.activeElement.tagName; + // don't navigate when in search box, textarea, dropdown or button + if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' + && activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey + && !event.shiftKey) { + switch (event.keyCode) { + case 37: // left + var prevHref = $('link[rel="prev"]').prop('href'); + if (prevHref) { + window.location.href = prevHref; + return false; } break; - case "ArrowRight": - if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; - - const nextLink = document.querySelector('link[rel="next"]'); - if (nextLink && nextLink.href) { - window.location.href = nextLink.href; - event.preventDefault(); + case 39: // right + var nextHref = $('link[rel="next"]').prop('href'); + if (nextHref) { + window.location.href = nextHref; + return false; } break; } } - - // some keyboard layouts may need Shift to get / - switch (event.key) { - case "/": - if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; - Documentation.focusSearchBar(); - event.preventDefault(); - } }); - }, + } }; // quick alias for translations -const _ = Documentation.gettext; +_ = Documentation.gettext; -_ready(Documentation.init); +$(document).ready(function() { + Documentation.init(); +}); diff --git a/docs/_static/documentation_options.js b/docs/_static/documentation_options.js index 2db8a09..deb6527 100644 --- a/docs/_static/documentation_options.js +++ b/docs/_static/documentation_options.js @@ -1,14 +1,12 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), VERSION: '1', - LANGUAGE: 'en', + LANGUAGE: 'None', COLLAPSE_INDEX: false, BUILDER: 'html', FILE_SUFFIX: '.html', LINK_SUFFIX: '.html', HAS_SOURCE: true, SOURCELINK_SUFFIX: '.txt', - NAVIGATION_WITH_KEYS: false, - SHOW_SEARCH_SUMMARY: true, - ENABLE_SEARCH_SHORTCUTS: true, + NAVIGATION_WITH_KEYS: false }; \ No newline at end of file diff --git a/docs/_static/language_data.js b/docs/_static/language_data.js index 250f566..ebe2f03 100644 --- a/docs/_static/language_data.js +++ b/docs/_static/language_data.js @@ -5,12 +5,12 @@ * This script contains the language-specific data used by searchtools.js, * namely the list of stopwords, stemmer, scorer and splitter. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ -var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; +var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"]; /* Non-minified version is copied as a separate JS file, is available */ @@ -197,3 +197,101 @@ var Stemmer = function() { } } + + + +var splitChars = (function() { + var result = {}; + var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648, + 1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702, + 2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971, + 2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345, + 3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761, + 3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823, + 4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125, + 8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695, + 11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587, + 43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141]; + var i, j, start, end; + for (i = 0; i < singles.length; i++) { + result[singles[i]] = true; + } + var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709], + [722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161], + [1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568], + [1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807], + [1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047], + [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383], + [2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450], + [2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547], + [2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673], + [2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820], + [2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946], + [2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023], + [3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173], + [3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332], + [3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481], + [3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718], + [3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791], + [3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095], + [4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205], + [4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687], + [4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968], + [4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869], + [5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102], + [6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271], + [6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592], + [6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822], + [6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167], + [7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959], + [7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143], + [8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318], + [8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483], + [8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101], + [10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567], + [11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292], + [12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444], + [12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783], + [12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311], + [19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511], + [42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774], + [42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071], + [43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263], + [43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519], + [43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647], + [43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967], + [44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295], + [57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274], + [64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007], + [65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381], + [65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]]; + for (i = 0; i < ranges.length; i++) { + start = ranges[i][0]; + end = ranges[i][1]; + for (j = start; j <= end; j++) { + result[j] = true; + } + } + return result; +})(); + +function splitQuery(query) { + var result = []; + var start = -1; + for (var i = 0; i < query.length; i++) { + if (splitChars[query.charCodeAt(i)]) { + if (start !== -1) { + result.push(query.slice(start, i)); + start = -1; + } + } else if (start === -1) { + start = i; + } + } + if (start !== -1) { + result.push(query.slice(start)); + } + return result; +} + + diff --git a/docs/_static/nature.css b/docs/_static/nature.css index 0307a02..beb3a60 100644 --- a/docs/_static/nature.css +++ b/docs/_static/nature.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- nature theme. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -194,8 +194,6 @@ div.seealso { border: 1px solid #ff6; } -nav.contents, -aside.topic, div.topic { background-color: #eee; } diff --git a/docs/_static/pygments.css b/docs/_static/pygments.css index f227e5c..894becd 100644 --- a/docs/_static/pygments.css +++ b/docs/_static/pygments.css @@ -1,8 +1,8 @@ -pre { line-height: 125%; } -td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } -span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } -td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } -span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +pre { line-height: 125%; margin: 0; } +td.linenos pre { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; } +span.linenos { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; } +td.linenos pre.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; } .highlight .hll { background-color: #ffffcc } .highlight { background: #f8f8f8; } .highlight .c { color: #8f5902; font-style: italic } /* Comment */ @@ -54,8 +54,7 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: .highlight .nt { color: #204a87; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #000000 } /* Name.Variable */ .highlight .ow { color: #204a87; font-weight: bold } /* Operator.Word */ -.highlight .pm { color: #000000; font-weight: bold } /* Punctuation.Marker */ -.highlight .w { color: #f8f8f8 } /* Text.Whitespace */ +.highlight .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */ .highlight .mb { color: #0000cf; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */ diff --git a/docs/_static/searchtools.js b/docs/_static/searchtools.js index 97d56a7..2d77859 100644 --- a/docs/_static/searchtools.js +++ b/docs/_static/searchtools.js @@ -4,24 +4,22 @@ * * Sphinx JavaScript utilities for the full-text search. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ -"use strict"; -/** - * Simple result scoring code. - */ -if (typeof Scorer === "undefined") { +if (!Scorer) { + /** + * Simple result scoring code. + */ var Scorer = { // Implement the following function to further tweak the score for each result - // The function takes a result array [docname, title, anchor, descr, score, filename] + // The function takes a result array [filename, title, anchor, descr, score] // and returns the new score. /* - score: result => { - const [docname, title, anchor, descr, score, filename] = result - return score + score: function(result) { + return result[4]; }, */ @@ -30,11 +28,9 @@ if (typeof Scorer === "undefined") { // or matches in the last dotted part of the object name objPartialMatch: 6, // Additive scores depending on the priority of the object - objPrio: { - 0: 15, // used to be importantResults - 1: 5, // used to be objectResults - 2: -5, // used to be unimportantResults - }, + objPrio: {0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5}, // used to be unimportantResults // Used when the priority is not in the mapping. objPrioDefault: 0, @@ -43,495 +39,456 @@ if (typeof Scorer === "undefined") { partialTitle: 7, // query found in terms term: 5, - partialTerm: 2, + partialTerm: 2 }; } -const _removeChildren = (element) => { - while (element && element.lastChild) element.removeChild(element.lastChild); -}; - -/** - * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping - */ -const _escapeRegExp = (string) => - string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string - -const _displayItem = (item, searchTerms) => { - const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; - const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT; - const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; - const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; - const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; - - const [docName, title, anchor, descr, score, _filename] = item; - - let listItem = document.createElement("li"); - let requestUrl; - let linkUrl; - if (docBuilder === "dirhtml") { - // dirhtml builder - let dirname = docName + "/"; - if (dirname.match(/\/index\/$/)) - dirname = dirname.substring(0, dirname.length - 6); - else if (dirname === "index/") dirname = ""; - requestUrl = docUrlRoot + dirname; - linkUrl = requestUrl; - } else { - // normal html builders - requestUrl = docUrlRoot + docName + docFileSuffix; - linkUrl = docName + docLinkSuffix; +if (!splitQuery) { + function splitQuery(query) { + return query.split(/\s+/); } - let linkEl = listItem.appendChild(document.createElement("a")); - linkEl.href = linkUrl + anchor; - linkEl.dataset.score = score; - linkEl.innerHTML = title; - if (descr) - listItem.appendChild(document.createElement("span")).innerHTML = - " (" + descr + ")"; - else if (showSearchSummary) - fetch(requestUrl) - .then((responseData) => responseData.text()) - .then((data) => { - if (data) - listItem.appendChild( - Search.makeSearchSummary(data, searchTerms) - ); - }); - Search.output.appendChild(listItem); -}; -const _finishSearch = (resultCount) => { - Search.stopPulse(); - Search.title.innerText = _("Search Results"); - if (!resultCount) - Search.status.innerText = Documentation.gettext( - "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." - ); - else - Search.status.innerText = _( - `Search finished, found ${resultCount} page(s) matching the search query.` - ); -}; -const _displayNextItem = ( - results, - resultCount, - searchTerms -) => { - // results left, load the summary and display it - // this is intended to be dynamic (don't sub resultsCount) - if (results.length) { - _displayItem(results.pop(), searchTerms); - setTimeout( - () => _displayNextItem(results, resultCount, searchTerms), - 5 - ); - } - // search finished, update title and status message - else _finishSearch(resultCount); -}; - -/** - * Default splitQuery function. Can be overridden in ``sphinx.search`` with a - * custom function per language. - * - * The regular expression works by splitting the string on consecutive characters - * that are not Unicode letters, numbers, underscores, or emoji characters. - * This is the same as ``\W+`` in Python, preserving the surrogate pair area. - */ -if (typeof splitQuery === "undefined") { - var splitQuery = (query) => query - .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu) - .filter(term => term) // remove remaining empty strings } /** * Search Module */ -const Search = { - _index: null, - _queued_query: null, - _pulse_status: -1, - - htmlToText: (htmlString) => { - const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); - htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() }); - const docContent = htmlElement.querySelector('[role="main"]'); - if (docContent !== undefined) return docContent.textContent; - console.warn( - "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template." - ); - return ""; +var Search = { + + _index : null, + _queued_query : null, + _pulse_status : -1, + + htmlToText : function(htmlString) { + var virtualDocument = document.implementation.createHTMLDocument('virtual'); + var htmlElement = $(htmlString, virtualDocument); + htmlElement.find('.headerlink').remove(); + docContent = htmlElement.find('[role=main]')[0]; + if(docContent === undefined) { + console.warn("Content block not found. Sphinx search tries to obtain it " + + "via '[role=main]'. Could you check your theme or template."); + return ""; + } + return docContent.textContent || docContent.innerText; }, - init: () => { - const query = new URLSearchParams(window.location.search).get("q"); - document - .querySelectorAll('input[name="q"]') - .forEach((el) => (el.value = query)); - if (query) Search.performSearch(query); + init : function() { + var params = $.getQueryParameters(); + if (params.q) { + var query = params.q[0]; + $('input[name="q"]')[0].value = query; + this.performSearch(query); + } }, - loadIndex: (url) => - (document.body.appendChild(document.createElement("script")).src = url), + loadIndex : function(url) { + $.ajax({type: "GET", url: url, data: null, + dataType: "script", cache: true, + complete: function(jqxhr, textstatus) { + if (textstatus != "success") { + document.getElementById("searchindexloader").src = url; + } + }}); + }, - setIndex: (index) => { - Search._index = index; - if (Search._queued_query !== null) { - const query = Search._queued_query; - Search._queued_query = null; - Search.query(query); + setIndex : function(index) { + var q; + this._index = index; + if ((q = this._queued_query) !== null) { + this._queued_query = null; + Search.query(q); } }, - hasIndex: () => Search._index !== null, - - deferQuery: (query) => (Search._queued_query = query), + hasIndex : function() { + return this._index !== null; + }, - stopPulse: () => (Search._pulse_status = -1), + deferQuery : function(query) { + this._queued_query = query; + }, - startPulse: () => { - if (Search._pulse_status >= 0) return; + stopPulse : function() { + this._pulse_status = 0; + }, - const pulse = () => { + startPulse : function() { + if (this._pulse_status >= 0) + return; + function pulse() { + var i; Search._pulse_status = (Search._pulse_status + 1) % 4; - Search.dots.innerText = ".".repeat(Search._pulse_status); - if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); - }; + var dotString = ''; + for (i = 0; i < Search._pulse_status; i++) + dotString += '.'; + Search.dots.text(dotString); + if (Search._pulse_status > -1) + window.setTimeout(pulse, 500); + } pulse(); }, /** * perform a search for something (or wait until index is loaded) */ - performSearch: (query) => { + performSearch : function(query) { // create the required interface elements - const searchText = document.createElement("h2"); - searchText.textContent = _("Searching"); - const searchSummary = document.createElement("p"); - searchSummary.classList.add("search-summary"); - searchSummary.innerText = ""; - const searchList = document.createElement("ul"); - searchList.classList.add("search"); - - const out = document.getElementById("search-results"); - Search.title = out.appendChild(searchText); - Search.dots = Search.title.appendChild(document.createElement("span")); - Search.status = out.appendChild(searchSummary); - Search.output = out.appendChild(searchList); - - const searchProgress = document.getElementById("search-progress"); - // Some themes don't use the search progress node - if (searchProgress) { - searchProgress.innerText = _("Preparing search..."); - } - Search.startPulse(); + this.out = $('#search-results'); + this.title = $('

' + _('Searching') + '

').appendTo(this.out); + this.dots = $('').appendTo(this.title); + this.status = $('

 

').appendTo(this.out); + this.output = $('
- +
@@ -466,7 +467,7 @@

Navigation

\ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 9713d2d..c009e5f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,19 +1,20 @@ - + - + Welcome to SimpleStereo’s documentation! — SimpleStereo 1 documentation + + - - + @@ -41,7 +42,7 @@

Navigation

-

Welcome to SimpleStereo’s documentation!

+

Welcome to SimpleStereo’s documentation!

Contents:

- +
@@ -129,7 +130,7 @@

Navigation

\ No newline at end of file diff --git a/docs/modules.html b/docs/modules.html index 3ad3157..e1703f0 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -1,19 +1,20 @@ - + - + package — SimpleStereo 1 documentation + + - - + @@ -37,7 +38,7 @@

Navigation

-

package

+

package

- +
@@ -235,7 +128,7 @@

Navigation

\ No newline at end of file diff --git a/docs/py-modindex.html b/docs/py-modindex.html index 37e8d2b..53a2709 100644 --- a/docs/py-modindex.html +++ b/docs/py-modindex.html @@ -1,7 +1,7 @@ - + @@ -10,9 +10,10 @@ + + - - + @@ -113,7 +114,7 @@

Quick search

- +
@@ -133,7 +134,7 @@

Navigation

\ No newline at end of file diff --git a/docs/search.html b/docs/search.html index 307d6ba..b678c6d 100644 --- a/docs/search.html +++ b/docs/search.html @@ -1,7 +1,7 @@ - + @@ -11,11 +11,12 @@ + + - - + @@ -97,7 +98,7 @@

Navigation

\ No newline at end of file diff --git a/docs/searchindex.js b/docs/searchindex.js index 1c80eba..26ffc5b 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["index", "modules", "simplestereo"], "filenames": ["index.rst", "modules.rst", "simplestereo.rst"], "titles": ["Welcome to SimpleStereo\u2019s documentation!", "package", "simplestereo package"], "terms": {"packag": 0, "modul": [0, 1], "submodul": [0, 1], "_rig": [0, 1], "activ": [0, 1], "calibr": [0, 1], "passiv": [0, 1], "point": [0, 1], "rectif": [0, 1], "unwrap": [0, 1], "util": [0, 1], "index": [0, 2], "search": [0, 2], "page": 0, "simplestereo": 1, "content": 1, "rectifiedstereorig": [1, 2], "rcommon": [1, 2], "computerectificationmap": [1, 2], "fromfil": [1, 2], "get3dpoint": [1, 2], "getrectifiedprojectionmatric": [1, 2], "recthomography1": [1, 2], "recthomography2": [1, 2], "rectifyimag": [1, 2], "save": [1, 2], "stereorig": [1, 2], "e": [1, 2], "f": [1, 2], "r": [1, 2], "t": [1, 2], "distcoeffs1": [1, 2], "distcoeffs2": [1, 2], "getbaselin": [1, 2], "getcent": [1, 2], "getessentialmatrix": [1, 2], "getfundamentalmatrix": [1, 2], "getprojectionmatric": [1, 2], "intrinsic1": [1, 2], "intrinsic2": [1, 2], "undistortimag": [1, 2], "structuredlightrig": [1, 2], "triangul": [1, 2], "undistortcameraimag": [1, 2], "graycod": [1, 2], "getcloud": [1, 2], "graycodedoubl": [1, 2], "graycodesingl": [1, 2], "stereoftp": [1, 2], "convertgrayscal": [1, 2], "stereoftpanaglyph": [1, 2], "stereoftp_map": [1, 2], "stereoftp_phaseonli": [1, 2], "getphas": [1, 2], "buildanaglyphfring": [1, 2], "buildbinaryfring": [1, 2], "buildfring": [1, 2], "computeroi": [1, 2], "findcentralstrip": [1, 2], "generategraycodeimg": [1, 2], "chessboardprocam": [1, 2], "chessboardprocamwhit": [1, 2], "chessboardsingl": [1, 2], "chessboardstereo": [1, 2], "generatechessboardsvg": [1, 2], "getfundamentalmatrixfromproject": [1, 2], "phaseshift": [1, 2], "phaseshiftwhit": [1, 2], "stereoasw": [1, 2], "comput": [1, 2], "stereogsw": [1, 2], "distortpoint": [1, 2], "exportpli": [1, 2], "getadimensional3dpoint": [1, 2], "importpli": [1, 2], "fusiellorectifi": [1, 2], "getbestxshearingtransform": [1, 2], "getfittingmatrix": [1, 2], "looprectifi": [1, 2], "stereorectifi": [1, 2], "phaseunwrap": 1, "captur": [1, 2], "get": [1, 2], "getresolut": [1, 2], "setframer": [1, 2], "setresolut": [1, 2], "start": [1, 2], "stop": [1, 2], "drawcorrespondingepipolarlin": [1, 2], "getcrossproductmatrix": [1, 2], "moveextrinsicorigintofirstcamera": [1, 2], "initi": 2, "document": 2, "docstr": 2, "follow": 2, "numpi": 2, "style": 2, "wherev": 2, "possibl": 2, "see": 2, "http": 2, "numpydoc": 2, "readthedoc": 2, "io": 2, "en": 2, "latest": 2, "format": 2, "html": 2, "main": 2, "class": 2, "load": 2, "level": 2, "py": 2, "__init__": 2, "add": 2, "new": 2, "rig": 2, "uncalibr": 2, "stereo": 2, "arg": 2, "sourc": 2, "base": 2, "keep": 2, "togeth": 2, "manag": 2, "all": 2, "paramet": 2, "rectifi": 2, "It": 2, "includ": 2, "plu": 2, "two": 2, "homographi": 2, "differ": 2, "from": 2, "opencv": 2, "here": 2, "pixel": 2, "domain": 2, "ar": 2, "taken": 2, "input": 2, "ones": 2, "commonli": 2, "refer": 2, "literatur": 2, "transform": 2, "object": 2, "space": 2, "ndarrai": 2, "3x3": 2, "matric": 2, "repres": 2, "common": 2, "camera": 2, "orient": 2, "after": 2, "sequenc": 2, "A": 2, "altern": 2, "same": 2, "order": 2, "attribut": 2, "method": 2, "properti": 2, "destdim": 2, "none": 2, "alpha": 2, "1": 2, "map": 2, "undistort": 2, "pair": 2, "thi": 2, "wrap": 2, "cv2": 2, "initundistortrectifymap": 2, "custom": 2, "fit": 2, "algorithm": 2, "imag": 2, "within": 2, "dimens": 2, "modifi": 2, "origin": 2, "matrix": 2, "appli": 2, "affin": 2, "x": 2, "y": 2, "scale": 2, "translat": 2, "shear": 2, "axi": 2, "onli": 2, "without": 2, "lose": 2, "The": 2, "store": 2, "intern": 2, "i": 2, "call": 2, "constructor": 2, "default": 2, "can": 2, "later": 2, "chang": 2, "its": 2, "set": 2, "tupl": 2, "option": 2, "resolut": 2, "destin": 2, "width": 2, "height": 2, "first": 2, "float": 2, "between": 2, "0": 2, "both": 2, "If": 2, "corner": 2, "preserv": 2, "valid": 2, "rectangl": 2, "made": 2, "visibl": 2, "intermedi": 2, "valu": 2, "produc": 2, "result": 2, "middl": 2, "extrem": 2, "skew": 2, "posit": 2, "do": 2, "work": 2, "well": 2, "return": 2, "type": 2, "note": 2, "us": 2, "most": 2, "paper": 2, "provid": 2, "rotat": 2, "3d": 2, "librari": 2, "alwai": 2, "To": 2, "adapt": 2, "other": 2, "function": 2, "given": 2, "recthomographi": 2, "dot": 2, "cameramatrix": 2, "For": 2, "each": 2, "h": 2, "classmethod": 2, "filepath": 2, "stereorigrectifi": 2, "json": 2, "file": 2, "str": 2, "path": 2, "contain": 2, "an": 2, "disparitymap": 2, "dispar": 2, "wa": 2, "done": 2, "real": 2, "world": 2, "unit": 2, "g": 2, "millimet": 2, "output": 2, "would": 2, "left": 2, "dens": 2, "have": 2, "arrai": 2, "shape": 2, "3": 2, "where": 2, "coordin": 2, "z": 2, "associ": 2, "calcul": 2, "project": 2, "2": 2, "share": 2, "one": 2, "horizont": 2, "displac": 2, "baselin": 2, "intrins": 2, "depend": 2, "rigid": 2, "manipul": 2, "3x4": 2, "second": 2, "img1": 2, "img2": 2, "interpol": 2, "magicmock": 2, "id": 2, "140067398056736": 2, "coupl": 2, "come": 2, "must": 2, "right": 2, "remap": 2, "dure": 2, "befor": 2, "final": 2, "mat": 2, "int": 2, "interpolationflag": 2, "inter_nearest": 2, "inter_linear": 2, "inter_cub": 2, "img1_rect": 2, "img2_rect": 2, "configur": 2, "current": 2, "res1": 2, "res2": 2, "reprojectionerror": 2, "essenti": 2, "fundament": 2, "thei": 2, "avail": 2, "mai": 2, "need": 2, "list": 2, "form": 2, "fx": 2, "tx": 2, "fy": 2, "ty": 2, "distort": 2, "coeffici": 2, "4": 2, "5": 2, "8": 2, "12": 2, "14": 2, "element": 2, "1st": 2, "2nd": 2, "system": 2, "vector": 2, "total": 2, "reproject": 2, "error": 2, "convent": 2, "henc": 2, "extrins": 2, "ident": 2, "zero": 2, "your": 2, "place": 2, "you": 2, "convert": 2, "norm": 2, "length": 2, "center": 2, "anywai": 2, "ha": 2, "free": 2, "factor": 2, "changecamera": 2, "fals": 2, "centerprincipalpoint": 2, "getoptimalnewcameramatrix": 2, "otherwis": 2, "consid": 2, "when": 2, "bool": 2, "skip": 2, "true": 2, "minimum": 2, "unwant": 2, "so": 2, "even": 2, "remov": 2, "some": 2, "retain": 2, "extra": 2, "black": 2, "accept": 2, "too": 2, "princip": 2, "img1_undist": 2, "img2_undist": 2, "cameramatrixnew1": 2, "cameramatrixnew2": 2, "child": 2, "structur": 2, "light": 2, "campoint": 2, "projpoint": 2, "projector": 2, "correspond": 2, "proce": 2, "last": 2, "alreadi": 2, "imgobj": 2, "helper": 2, "black_thr": 2, "40": 2, "white_thr": 2, "wrapper": 2, "grai": 2, "code": 2, "implement": 2, "threshold": 2, "number": 2, "255": 2, "bright": 2, "requir": 2, "fulli": 2, "illumin": 2, "white": 2, "computeshadowmask": 2, "pattern": 2, "invers": 2, "getprojpixel": 2, "unaccur": 2, "especi": 2, "along": 2, "border": 2, "case": 2, "ignor": 2, "pass": 2, "narrow": 2, "roi": 2, "perform": 2, "acquir": 2, "like": 2, "structured_light_graycodepattern": 2, "ani": 2, "full": 2, "region": 2, "interest": 2, "upper": 2, "n": 2, "cloud": 2, "nan": 2, "invalid": 2, "locat": 2, "projr": 2, "roi1": 2, "roi2": 2, "dimension": 2, "onel": 2, "png": 2, "oner": 2, "twol": 2, "twor": 2, "As": 2, "alia": 2, "fring": 2, "period": 2, "shift": 2, "stripecolor": 2, "red": 2, "stripesensit": 2, "fourier": 2, "profilometri": 2, "fringedim": 2, "bgr": 2, "color": 2, "central": 2, "stripe": 2, "chosen": 2, "among": 2, "blue": 2, "green": 2, "also": 2, "b": 2, "sensit": 2, "find": 2, "detail": 2, "pasqual": 2, "lafiosca": 2, "et": 2, "al": 2, "autom": 2, "aircraft": 2, "dent": 2, "inspect": 2, "via": 2, "sensor": 2, "2022": 2, "doi": 2, "org": 2, "10": 2, "3390": 2, "s22020433": 2, "static": 2, "img": 2, "grayscal": 2, "max": 2, "highest": 2, "over": 2, "allow": 2, "fft": 2, "properli": 2, "gamma": 2, "correct": 2, "ve": 2, "tri": 2, "approach": 2, "simpl": 2, "best": 2, "radius_factor": 2, "unwrappingmethod": 2, "plot": 2, "process": 2, "radiu": 2, "band": 2, "filter": 2, "pointer": 2, "take": 2, "phase": 2, "argument": 2, "np": 2, "select": 2, "anaglyph": 2, "build": 2, "progress": 2, "guo": 2, "improv": 2, "automat": 2, "measur": 2, "1990": 2, "expect": 2, "func": 2, "classic": 2, "doe": 2, "virtual": 2, "plane": 2, "estim": 2, "dim": 2, "1280": 2, "720": 2, "vertic": 2, "dtype": 2, "140067397139808": 2, "sinusoid": 2, "assum": 2, "complementari": 2, "actual": 2, "extract": 2, "three": 2, "singl": 2, "scan": 2, "subtract": 2, "suppress": 2, "dc": 2, "compon": 2, "serv": 2, "purpos": 2, "obtain": 2, "ftp": 2, "rang": 2, "match": 2, "uint8": 2, "140067397079344": 2, "binari": 2, "integ": 2, "direct": 2, "drawn": 2, "140067397103680": 2, "blackthreshold": 2, "extramargin": 2, "exclud": 2, "usual": 2, "whole": 2, "area": 2, "attempt": 2, "insid": 2, "biggest": 2, "contour": 2, "safeti": 2, "margin": 2, "reduc": 2, "w": 2, "rewrit": 2, "complet": 2, "Not": 2, "suitabl": 2, "product": 2, "linear": 2, "subpixel": 2, "accuraci": 2, "scipi": 2, "interp1d": 2, "kind": 2, "miss": 2, "fill": 2, "nearest": 2, "targetdir": 2, "gener": 2, "Then": 2, "half": 2, "string": 2, "directori": 2, "creat": 2, "exist": 2, "count": 2, "circl": 2, "findcirclesgrid": 2, "refin": 2, "cornersubpix": 2, "chessboard": 2, "projectorresolut": 2, "chessboards": 2, "6": 2, "7": 2, "squares": 2, "camintrins": 2, "camdistcoeff": 2, "mit": 2, "licenc": 2, "github": 2, "com": 2, "kamino410": 2, "procam": 2, "daniel": 2, "moreno": 2, "gabriel": 2, "taubin": 2, "accur": 2, "robust": 2, "1109": 2, "3dimpvt": 2, "2012": 2, "77": 2, "put": 2, "per": 2, "normal": 2, "At": 2, "least": 2, "suggest": 2, "should": 2, "avoid": 2, "ambigu": 2, "squar": 2, "size": 2, "known": 2, "metric": 2, "min": 2, "iter": 2, "high": 2, "re": 2, "extend": 2, "top": 2, "condit": 2, "exact": 2, "col": 2, "row": 2, "perviewerror": 2, "view": 2, "rm": 2, "showimag": 2, "side": 2, "exampl": 2, "mm": 2, "reconstruct": 2, "show": 2, "check": 2, "detect": 2, "retval": 2, "calibratecamera": 2, "distcoeff": 2, "rvec": 2, "tvec": 2, "20": 2, "write": 2, "desir": 2, "svg": 2, "express": 2, "column": 2, "line": 2, "10x7": 2, "9": 2, "howev": 2, "exactli": 2, "softwar": 2, "p1": 2, "p2": 2, "lesson": 2, "cristina": 2, "turrini": 2, "unimi": 2, "trento": 2, "09": 2, "04": 2, "2017": 2, "cameraimag": 2, "heterodyn": 2, "principl": 2, "reich": 2, "1997": 2, "In": 2, "descend": 2, "1024": 2, "512": 2, "instead": 2, "target": 2, "defin": 2, "less": 2, "subject": 2, "nois": 2, "uncertanti": 2, "simpler": 2, "stereobm": 2, "stereosgbm": 2, "winsiz": 2, "35": 2, "maxdispar": 2, "16": 2, "mindispar": 2, "gammac": 2, "gammap": 2, "17": 2, "consist": 2, "support": 2, "weight": 2, "k": 2, "yoon": 2, "kweon": 2, "2006": 2, "window": 2, "odd": 2, "maximum": 2, "increas": 2, "influenc": 2, "proxim": 2, "non": 2, "occlud": 2, "assign": 2, "idea": 2, "occlus": 2, "local": 2, "geodes": 2, "asmaa": 2, "hosni": 2, "2009": 2, "enabl": 2, "run": 2, "time": 2, "roughli": 2, "doubl": 2, "version": 2, "written": 2, "everi": 2, "tradit": 2, "remain": 2, "boundari": 2, "prove": 2, "50": 2, "faster": 2, "signific": 2, "decreas": 2, "qualiti": 2, "veri": 2, "slow": 2, "384x288": 2, "than": 2, "sec": 2, "cpu": 2, "while": 2, "60": 2, "1007": 2, "s11554": 2, "012": 2, "0313": 2, "yk": 2, "smoother": 2, "could": 2, "respect": 2, "int16": 2, "11": 2, "fmax": 2, "120": 2, "bin": 2, "incomplet": 2, "michael": 2, "bleyer": 2, "margrit": 2, "gelautz": 2, "christoph": 2, "rhemann": 2, "cap": 2, "distanc": 2, "histogram": 2, "mutual": 2, "inform": 2, "warn": 2, "optim": 2, "clear": 2, "formula": 2, "sum": 2, "cost": 2, "subsequ": 2, "channel": 2, "rel": 2, "multipli": 2, "k1": 2, "k2": 2, "k3": 2, "k4": 2, "k5": 2, "k6": 2, "s1": 2, "s2": 2, "s3": 2, "s4": 2, "\u03c4x": 2, "\u03c4y": 2, "points3d": 2, "referenceimag": 2, "precis": 2, "export": 2, "raw": 2, "ply": 2, "ascii": 2, "absolut": 2, "either": 2, "decim": 2, "higher": 2, "caus": 2, "bigger": 2, "adimension": 2, "model": 2, "lead": 2, "incorrect": 2, "proport": 2, "filenam": 2, "import": 2, "data": 2, "read": 2, "dict": 2, "illustr": 2, "compact": 2, "fusiello": 2, "machin": 2, "vision": 2, "applic": 2, "2000": 2, "rectifiedstereorigobj": 2, "minim": 2, "affect": 2, "par": 2, "computi": 2, "cvpr": 2, "1999": 2, "loop": 2, "c": 2, "zhang": 2, "": 2, "tranform": 2, "account": 2, "intrinsicmatrix1": 2, "intrinsicmatrix2": 2, "h1": 2, "h2": 2, "dims1": 2, "dims2": 2, "desid": 2, "more": 2, "bound": 2, "One": 2, "flip": 2, "fail": 2, "epipol": 2, "close": 2, "recalcul": 2, "standard": 2, "averag": 2, "perspect": 2, "strategi": 2, "devic": 2, "flipi": 2, "video": 2, "stream": 2, "continu": 2, "separ": 2, "thread": 2, "grab": 2, "frame": 2, "lag": 2, "webcam": 2, "url": 2, "open": 2, "connect": 2, "protocol": 2, "usernam": 2, "password": 2, "script": 2, "param": 2, "rais": 2, "valueerror": 2, "cannot": 2, "insert": 2, "sleep": 2, "focal": 2, "retriev": 2, "end": 2, "fp": 2, "framer": 2, "successfulli": 2, "heigth": 2, "No": 2, "stai": 2, "updat": 2, "finish": 2, "rememb": 2, "x1": 2, "x2": 2, "thick": 2, "draw": 2, "epipolar": 2, "know": 2, "pleas": 2, "directli": 2, "v": 2, "antisymmetr": 2, "cross": 2, "often": 2, "indic": 2, "r1": 2, "r2": 2, "t1": 2, "t2": 2, "anywher": 2, "els": 2, "particularli": 2, "go": 2, "3x1": 2}, "objects": {"": [[2, 0, 0, "-", "simplestereo"]], "simplestereo": [[2, 0, 0, "-", "_rigs"], [2, 0, 0, "-", "active"], [2, 0, 0, "-", "calibration"], [2, 0, 0, "-", "passive"], [2, 0, 0, "-", "points"], [2, 0, 0, "-", "rectification"], [2, 0, 0, "-", "unwrapping"], [2, 0, 0, "-", "utils"]], "simplestereo._rigs": [[2, 1, 1, "", "RectifiedStereoRig"], [2, 1, 1, "", "StereoRig"], [2, 1, 1, "", "StructuredLightRig"]], "simplestereo._rigs.RectifiedStereoRig": [[2, 2, 1, "", "Rcommon"], [2, 3, 1, "", "computeRectificationMaps"], [2, 3, 1, "", "fromFile"], [2, 3, 1, "", "get3DPoints"], [2, 3, 1, "", "getRectifiedProjectionMatrices"], [2, 2, 1, "", "rectHomography1"], [2, 2, 1, "", "rectHomography2"], [2, 3, 1, "", "rectifyImages"], [2, 3, 1, "", "save"]], "simplestereo._rigs.StereoRig": [[2, 2, 1, "", "E"], [2, 2, 1, "", "F"], [2, 2, 1, "", "R"], [2, 2, 1, "", "T"], [2, 2, 1, "", "distCoeffs1"], [2, 2, 1, "", "distCoeffs2"], [2, 3, 1, "", "fromFile"], [2, 3, 1, "", "getBaseline"], [2, 3, 1, "", "getCenters"], [2, 3, 1, "", "getEssentialMatrix"], [2, 3, 1, "", "getFundamentalMatrix"], [2, 3, 1, "", "getProjectionMatrices"], [2, 2, 1, "", "intrinsic1"], [2, 2, 1, "", "intrinsic2"], [2, 3, 1, "", "save"], [2, 3, 1, "", "undistortImages"]], "simplestereo._rigs.StructuredLightRig": [[2, 3, 1, "", "fromFile"], [2, 3, 1, "", "triangulate"], [2, 3, 1, "", "undistortCameraImage"]], "simplestereo.active": [[2, 1, 1, "", "GrayCode"], [2, 1, 1, "", "GrayCodeDouble"], [2, 4, 1, "", "GrayCodeSingle"], [2, 1, 1, "", "StereoFTP"], [2, 1, 1, "", "StereoFTPAnaglyph"], [2, 1, 1, "", "StereoFTP_Mapping"], [2, 1, 1, "", "StereoFTP_PhaseOnly"], [2, 5, 1, "", "buildAnaglyphFringe"], [2, 5, 1, "", "buildBinaryFringe"], [2, 5, 1, "", "buildFringe"], [2, 5, 1, "", "computeROI"], [2, 5, 1, "", "findCentralStripe"], [2, 5, 1, "", "generateGrayCodeImgs"]], "simplestereo.active.GrayCode": [[2, 3, 1, "", "getCloud"]], "simplestereo.active.GrayCodeDouble": [[2, 3, 1, "", "getCloud"]], "simplestereo.active.StereoFTP": [[2, 3, 1, "", "convertGrayscale"], [2, 3, 1, "", "getCloud"]], "simplestereo.active.StereoFTPAnaglyph": [[2, 3, 1, "", "convertGrayscale"], [2, 3, 1, "", "getCloud"]], "simplestereo.active.StereoFTP_Mapping": [[2, 3, 1, "", "getCloud"]], "simplestereo.active.StereoFTP_PhaseOnly": [[2, 3, 1, "", "convertGrayscale"], [2, 3, 1, "", "getPhase"]], "simplestereo.calibration": [[2, 5, 1, "", "chessboardProCam"], [2, 5, 1, "", "chessboardProCamWhite"], [2, 5, 1, "", "chessboardSingle"], [2, 5, 1, "", "chessboardStereo"], [2, 5, 1, "", "generateChessboardSVG"], [2, 5, 1, "", "getFundamentalMatrixFromProjections"], [2, 5, 1, "", "phaseShift"], [2, 5, 1, "", "phaseShiftWhite"]], "simplestereo.passive": [[2, 1, 1, "", "StereoASW"], [2, 1, 1, "", "StereoGSW"]], "simplestereo.passive.StereoASW": [[2, 3, 1, "", "compute"]], "simplestereo.passive.StereoGSW": [[2, 3, 1, "", "compute"]], "simplestereo.points": [[2, 5, 1, "", "distortPoints"], [2, 5, 1, "", "exportPLY"], [2, 5, 1, "", "getAdimensional3DPoints"], [2, 5, 1, "", "importPLY"]], "simplestereo.rectification": [[2, 5, 1, "", "fusielloRectify"], [2, 5, 1, "", "getBestXShearingTransformation"], [2, 5, 1, "", "getFittingMatrix"], [2, 5, 1, "", "loopRectify"], [2, 5, 1, "", "stereoRectify"]], "simplestereo.utils": [[2, 1, 1, "", "Capture"], [2, 5, 1, "", "drawCorrespondingEpipolarLines"], [2, 5, 1, "", "getCrossProductMatrix"], [2, 5, 1, "", "moveExtrinsicOriginToFirstCamera"]], "simplestereo.utils.Capture": [[2, 3, 1, "", "get"], [2, 3, 1, "", "getResolution"], [2, 3, 1, "", "setFrameRate"], [2, 3, 1, "", "setResolution"], [2, 3, 1, "", "start"], [2, 3, 1, "", "stop"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:property", "3": "py:method", "4": "py:attribute", "5": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "property", "Python property"], "3": ["py", "method", "Python method"], "4": ["py", "attribute", "Python attribute"], "5": ["py", "function", "Python function"]}, "titleterms": {"welcom": 0, "simplestereo": [0, 2], "": 0, "document": 0, "content": [0, 2], "indic": 0, "tabl": 0, "packag": [1, 2], "modul": 2, "submodul": 2, "_rig": 2, "todo": 2, "activ": 2, "calibr": 2, "passiv": 2, "point": 2, "rectif": 2, "unwrap": 2, "phaseunwrap": 2, "util": 2}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.todo": 2, "sphinx.ext.viewcode": 1, "sphinx": 57}, "alltitles": {"Welcome to SimpleStereo\u2019s documentation!": [[0, "welcome-to-simplestereo-s-documentation"]], "Contents:": [[0, null]], "Indices and tables": [[0, "indices-and-tables"]], "package": [[1, "package"]], "simplestereo package": [[2, "simplestereo-package"]], "Module contents": [[2, "module-simplestereo"]], "simplestereo": [[2, "simplestereo"]], "Submodules": [[2, "submodules"]], "simplestereo._rigs module": [[2, "module-simplestereo._rigs"]], "_rigs": [[2, "rigs"]], "Todo": [[2, "id3"], [2, "id4"], [2, "id5"], [2, "id6"], [2, "id9"], [2, "id14"], [2, "id15"], [2, "id16"], [2, "id17"], [2, "id18"], [2, "id19"]], "simplestereo.active module": [[2, "module-simplestereo.active"]], "active": [[2, "active"]], "simplestereo.calibration module": [[2, "module-simplestereo.calibration"]], "calibration": [[2, "calibration"]], "simplestereo.passive module": [[2, "module-simplestereo.passive"]], "passive": [[2, "passive"]], "simplestereo.points module": [[2, "module-simplestereo.points"]], "points": [[2, "points"]], "simplestereo.rectification module": [[2, "module-simplestereo.rectification"]], "rectification": [[2, "rectification"]], "simplestereo.unwrapping module": [[2, "module-simplestereo.unwrapping"]], "phaseUnwrapping": [[2, "phaseunwrapping"]], "simplestereo.utils module": [[2, "module-simplestereo.utils"]], "utils": [[2, "utils"]]}, "indexentries": {"capture (class in simplestereo.utils)": [[2, "simplestereo.utils.Capture"]], "e (simplestereo._rigs.stereorig property)": [[2, "simplestereo._rigs.StereoRig.E"]], "f (simplestereo._rigs.stereorig property)": [[2, "simplestereo._rigs.StereoRig.F"]], "graycode (class in simplestereo.active)": [[2, "simplestereo.active.GrayCode"]], "graycodedouble (class in simplestereo.active)": [[2, "simplestereo.active.GrayCodeDouble"]], "graycodesingle (in module simplestereo.active)": [[2, "simplestereo.active.GrayCodeSingle"]], "r (simplestereo._rigs.stereorig property)": [[2, "simplestereo._rigs.StereoRig.R"]], "rcommon (simplestereo._rigs.rectifiedstereorig property)": [[2, "simplestereo._rigs.RectifiedStereoRig.Rcommon"]], "rectifiedstereorig (class in simplestereo._rigs)": [[2, "simplestereo._rigs.RectifiedStereoRig"]], "stereoasw (class in simplestereo.passive)": [[2, "simplestereo.passive.StereoASW"]], "stereoftp (class in simplestereo.active)": [[2, "simplestereo.active.StereoFTP"]], "stereoftpanaglyph (class in simplestereo.active)": [[2, "simplestereo.active.StereoFTPAnaglyph"]], "stereoftp_mapping (class in simplestereo.active)": [[2, "simplestereo.active.StereoFTP_Mapping"]], "stereoftp_phaseonly (class in simplestereo.active)": [[2, "simplestereo.active.StereoFTP_PhaseOnly"]], "stereogsw (class in simplestereo.passive)": [[2, "simplestereo.passive.StereoGSW"]], "stereorig (class in simplestereo._rigs)": [[2, "simplestereo._rigs.StereoRig"]], "structuredlightrig (class in simplestereo._rigs)": [[2, "simplestereo._rigs.StructuredLightRig"]], "t (simplestereo._rigs.stereorig property)": [[2, "simplestereo._rigs.StereoRig.T"]], "buildanaglyphfringe() (in module simplestereo.active)": [[2, "simplestereo.active.buildAnaglyphFringe"]], "buildbinaryfringe() (in module simplestereo.active)": [[2, "simplestereo.active.buildBinaryFringe"]], "buildfringe() (in module simplestereo.active)": [[2, "simplestereo.active.buildFringe"]], "chessboardprocam() (in module simplestereo.calibration)": [[2, "simplestereo.calibration.chessboardProCam"]], "chessboardprocamwhite() (in module simplestereo.calibration)": [[2, "simplestereo.calibration.chessboardProCamWhite"]], "chessboardsingle() (in module simplestereo.calibration)": [[2, "simplestereo.calibration.chessboardSingle"]], "chessboardstereo() (in module simplestereo.calibration)": [[2, "simplestereo.calibration.chessboardStereo"]], "compute() (simplestereo.passive.stereoasw method)": [[2, "simplestereo.passive.StereoASW.compute"]], "compute() (simplestereo.passive.stereogsw method)": [[2, "simplestereo.passive.StereoGSW.compute"]], "computeroi() (in module simplestereo.active)": [[2, "simplestereo.active.computeROI"]], "computerectificationmaps() (simplestereo._rigs.rectifiedstereorig method)": [[2, "simplestereo._rigs.RectifiedStereoRig.computeRectificationMaps"]], "convertgrayscale() (simplestereo.active.stereoftp static method)": [[2, "simplestereo.active.StereoFTP.convertGrayscale"]], "convertgrayscale() (simplestereo.active.stereoftpanaglyph static method)": [[2, "simplestereo.active.StereoFTPAnaglyph.convertGrayscale"]], "convertgrayscale() (simplestereo.active.stereoftp_phaseonly static method)": [[2, "simplestereo.active.StereoFTP_PhaseOnly.convertGrayscale"]], "distcoeffs1 (simplestereo._rigs.stereorig property)": [[2, "simplestereo._rigs.StereoRig.distCoeffs1"]], "distcoeffs2 (simplestereo._rigs.stereorig property)": [[2, "simplestereo._rigs.StereoRig.distCoeffs2"]], "distortpoints() (in module simplestereo.points)": [[2, "simplestereo.points.distortPoints"]], "drawcorrespondingepipolarlines() (in module simplestereo.utils)": [[2, "simplestereo.utils.drawCorrespondingEpipolarLines"]], "exportply() (in module simplestereo.points)": [[2, "simplestereo.points.exportPLY"]], "findcentralstripe() (in module simplestereo.active)": [[2, "simplestereo.active.findCentralStripe"]], "fromfile() (simplestereo._rigs.rectifiedstereorig class method)": [[2, "simplestereo._rigs.RectifiedStereoRig.fromFile"]], "fromfile() (simplestereo._rigs.stereorig class method)": [[2, "simplestereo._rigs.StereoRig.fromFile"]], "fromfile() (simplestereo._rigs.structuredlightrig method)": [[2, "simplestereo._rigs.StructuredLightRig.fromFile"]], "fusiellorectify() (in module simplestereo.rectification)": [[2, "simplestereo.rectification.fusielloRectify"]], "generatechessboardsvg() (in module simplestereo.calibration)": [[2, "simplestereo.calibration.generateChessboardSVG"]], "generategraycodeimgs() (in module simplestereo.active)": [[2, "simplestereo.active.generateGrayCodeImgs"]], "get() (simplestereo.utils.capture method)": [[2, "simplestereo.utils.Capture.get"]], "get3dpoints() (simplestereo._rigs.rectifiedstereorig method)": [[2, "simplestereo._rigs.RectifiedStereoRig.get3DPoints"]], "getadimensional3dpoints() (in module simplestereo.points)": [[2, "simplestereo.points.getAdimensional3DPoints"]], "getbaseline() (simplestereo._rigs.stereorig method)": [[2, "simplestereo._rigs.StereoRig.getBaseline"]], "getbestxshearingtransformation() (in module simplestereo.rectification)": [[2, "simplestereo.rectification.getBestXShearingTransformation"]], "getcenters() (simplestereo._rigs.stereorig method)": [[2, "simplestereo._rigs.StereoRig.getCenters"]], "getcloud() (simplestereo.active.graycode method)": [[2, "simplestereo.active.GrayCode.getCloud"]], "getcloud() (simplestereo.active.graycodedouble method)": [[2, "simplestereo.active.GrayCodeDouble.getCloud"]], "getcloud() (simplestereo.active.stereoftp method)": [[2, "simplestereo.active.StereoFTP.getCloud"]], "getcloud() (simplestereo.active.stereoftpanaglyph method)": [[2, "simplestereo.active.StereoFTPAnaglyph.getCloud"]], "getcloud() (simplestereo.active.stereoftp_mapping method)": [[2, "simplestereo.active.StereoFTP_Mapping.getCloud"]], "getcrossproductmatrix() (in module simplestereo.utils)": [[2, "simplestereo.utils.getCrossProductMatrix"]], "getessentialmatrix() (simplestereo._rigs.stereorig method)": [[2, "simplestereo._rigs.StereoRig.getEssentialMatrix"]], "getfittingmatrix() (in module simplestereo.rectification)": [[2, "simplestereo.rectification.getFittingMatrix"]], "getfundamentalmatrix() (simplestereo._rigs.stereorig method)": [[2, "simplestereo._rigs.StereoRig.getFundamentalMatrix"]], "getfundamentalmatrixfromprojections() (in module simplestereo.calibration)": [[2, "simplestereo.calibration.getFundamentalMatrixFromProjections"]], "getphase() (simplestereo.active.stereoftp_phaseonly method)": [[2, "simplestereo.active.StereoFTP_PhaseOnly.getPhase"]], "getprojectionmatrices() (simplestereo._rigs.stereorig method)": [[2, "simplestereo._rigs.StereoRig.getProjectionMatrices"]], "getrectifiedprojectionmatrices() (simplestereo._rigs.rectifiedstereorig method)": [[2, "simplestereo._rigs.RectifiedStereoRig.getRectifiedProjectionMatrices"]], "getresolution() (simplestereo.utils.capture method)": [[2, "simplestereo.utils.Capture.getResolution"]], "importply() (in module simplestereo.points)": [[2, "simplestereo.points.importPLY"]], "intrinsic1 (simplestereo._rigs.stereorig property)": [[2, "simplestereo._rigs.StereoRig.intrinsic1"]], "intrinsic2 (simplestereo._rigs.stereorig property)": [[2, "simplestereo._rigs.StereoRig.intrinsic2"]], "looprectify() (in module simplestereo.rectification)": [[2, "simplestereo.rectification.loopRectify"]], "module": [[2, "module-simplestereo"], [2, "module-simplestereo._rigs"], [2, "module-simplestereo.active"], [2, "module-simplestereo.calibration"], [2, "module-simplestereo.passive"], [2, "module-simplestereo.points"], [2, "module-simplestereo.rectification"], [2, "module-simplestereo.unwrapping"], [2, "module-simplestereo.utils"]], "moveextrinsicorigintofirstcamera() (in module simplestereo.utils)": [[2, "simplestereo.utils.moveExtrinsicOriginToFirstCamera"]], "phaseshift() (in module simplestereo.calibration)": [[2, "simplestereo.calibration.phaseShift"]], "phaseshiftwhite() (in module simplestereo.calibration)": [[2, "simplestereo.calibration.phaseShiftWhite"]], "recthomography1 (simplestereo._rigs.rectifiedstereorig property)": [[2, "simplestereo._rigs.RectifiedStereoRig.rectHomography1"]], "recthomography2 (simplestereo._rigs.rectifiedstereorig property)": [[2, "simplestereo._rigs.RectifiedStereoRig.rectHomography2"]], "rectifyimages() (simplestereo._rigs.rectifiedstereorig method)": [[2, "simplestereo._rigs.RectifiedStereoRig.rectifyImages"]], "save() (simplestereo._rigs.rectifiedstereorig method)": [[2, "simplestereo._rigs.RectifiedStereoRig.save"]], "save() (simplestereo._rigs.stereorig method)": [[2, "simplestereo._rigs.StereoRig.save"]], "setframerate() (simplestereo.utils.capture method)": [[2, "simplestereo.utils.Capture.setFrameRate"]], "setresolution() (simplestereo.utils.capture method)": [[2, "simplestereo.utils.Capture.setResolution"]], "simplestereo": [[2, "module-simplestereo"]], "simplestereo._rigs": [[2, "module-simplestereo._rigs"]], "simplestereo.active": [[2, "module-simplestereo.active"]], "simplestereo.calibration": [[2, "module-simplestereo.calibration"]], "simplestereo.passive": [[2, "module-simplestereo.passive"]], "simplestereo.points": [[2, "module-simplestereo.points"]], "simplestereo.rectification": [[2, "module-simplestereo.rectification"]], "simplestereo.unwrapping": [[2, "module-simplestereo.unwrapping"]], "simplestereo.utils": [[2, "module-simplestereo.utils"]], "start() (simplestereo.utils.capture method)": [[2, "simplestereo.utils.Capture.start"]], "stereorectify() (in module simplestereo.rectification)": [[2, "simplestereo.rectification.stereoRectify"]], "stop() (simplestereo.utils.capture method)": [[2, "simplestereo.utils.Capture.stop"]], "triangulate() (simplestereo._rigs.structuredlightrig method)": [[2, "simplestereo._rigs.StructuredLightRig.triangulate"]], "undistortcameraimage() (simplestereo._rigs.structuredlightrig method)": [[2, "simplestereo._rigs.StructuredLightRig.undistortCameraImage"]], "undistortimages() (simplestereo._rigs.stereorig method)": [[2, "simplestereo._rigs.StereoRig.undistortImages"]]}}) \ No newline at end of file +Search.setIndex({docnames:["index","modules","simplestereo"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.todo":2,"sphinx.ext.viewcode":1,sphinx:56},filenames:["index.rst","modules.rst","simplestereo.rst"],objects:{"":[[2,0,0,"-","simplestereo"]],"simplestereo._rigs":[[2,1,1,"","RectifiedStereoRig"],[2,1,1,"","StereoRig"],[2,1,1,"","StructuredLightRig"]],"simplestereo._rigs.RectifiedStereoRig":[[2,2,1,"","Rcommon"],[2,3,1,"","computeRectificationMaps"],[2,3,1,"","fromFile"],[2,3,1,"","get3DPoints"],[2,3,1,"","getRectifiedProjectionMatrices"],[2,2,1,"","rectHomography1"],[2,2,1,"","rectHomography2"],[2,3,1,"","rectifyImages"],[2,3,1,"","save"]],"simplestereo._rigs.StereoRig":[[2,2,1,"","E"],[2,2,1,"","F"],[2,2,1,"","R"],[2,2,1,"","T"],[2,2,1,"","distCoeffs1"],[2,2,1,"","distCoeffs2"],[2,3,1,"","fromFile"],[2,3,1,"","getBaseline"],[2,3,1,"","getCenters"],[2,3,1,"","getEssentialMatrix"],[2,3,1,"","getFundamentalMatrix"],[2,3,1,"","getProjectionMatrices"],[2,2,1,"","intrinsic1"],[2,2,1,"","intrinsic2"],[2,3,1,"","save"],[2,3,1,"","undistortImages"]],"simplestereo._rigs.StructuredLightRig":[[2,3,1,"","fromFile"],[2,3,1,"","triangulate"],[2,3,1,"","undistortCameraImage"]],"simplestereo.active":[[2,1,1,"","GrayCode"],[2,1,1,"","GrayCodeDouble"],[2,4,1,"","GrayCodeSingle"],[2,1,1,"","StereoFTP"],[2,1,1,"","StereoFTPAnaglyph"],[2,1,1,"","StereoFTP_Mapping"],[2,1,1,"","StereoFTP_PhaseOnly"],[2,5,1,"","buildAnaglyphFringe"],[2,5,1,"","buildBinaryFringe"],[2,5,1,"","buildFringe"],[2,5,1,"","computeROI"],[2,5,1,"","findCentralStripe"],[2,5,1,"","generateGrayCodeImgs"]],"simplestereo.active.GrayCode":[[2,3,1,"","getCloud"]],"simplestereo.active.GrayCodeDouble":[[2,3,1,"","getCloud"]],"simplestereo.active.StereoFTP":[[2,3,1,"","convertGrayscale"],[2,3,1,"","getCloud"]],"simplestereo.active.StereoFTPAnaglyph":[[2,3,1,"","convertGrayscale"],[2,3,1,"","getCloud"]],"simplestereo.active.StereoFTP_Mapping":[[2,3,1,"","getCloud"]],"simplestereo.active.StereoFTP_PhaseOnly":[[2,3,1,"","convertGrayscale"],[2,3,1,"","getPhase"]],"simplestereo.calibration":[[2,5,1,"","chessboardProCam"],[2,5,1,"","chessboardProCamWhite"],[2,5,1,"","chessboardSingle"],[2,5,1,"","chessboardStereo"],[2,5,1,"","generateChessboardSVG"],[2,5,1,"","getFundamentalMatrixFromProjections"],[2,5,1,"","phaseShift"],[2,5,1,"","phaseShiftWhite"]],"simplestereo.passive":[[2,1,1,"","StereoASW"],[2,1,1,"","StereoGSW"]],"simplestereo.passive.StereoASW":[[2,3,1,"","compute"]],"simplestereo.passive.StereoGSW":[[2,3,1,"","compute"]],"simplestereo.points":[[2,5,1,"","distortPoints"],[2,5,1,"","exportPLY"],[2,5,1,"","getAdimensional3DPoints"],[2,5,1,"","importPLY"]],"simplestereo.rectification":[[2,5,1,"","fusielloRectify"],[2,5,1,"","getBestXShearingTransformation"],[2,5,1,"","getFittingMatrix"],[2,5,1,"","loopRectify"],[2,5,1,"","stereoRectify"]],"simplestereo.utils":[[2,1,1,"","Capture"],[2,5,1,"","drawCorrespondingEpipolarLines"],[2,5,1,"","getCrossProductMatrix"],[2,5,1,"","moveExtrinsicOriginToFirstCamera"]],"simplestereo.utils.Capture":[[2,3,1,"","get"],[2,3,1,"","getResolution"],[2,3,1,"","setFrameRate"],[2,3,1,"","setResolution"],[2,3,1,"","start"],[2,3,1,"","stop"]],simplestereo:[[2,0,0,"-","_rigs"],[2,0,0,"-","active"],[2,0,0,"-","calibration"],[2,0,0,"-","passive"],[2,0,0,"-","points"],[2,0,0,"-","rectification"],[2,0,0,"-","unwrapping"],[2,0,0,"-","utils"]]},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","property","Python property"],"3":["py","method","Python method"],"4":["py","attribute","Python attribute"],"5":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:property","3":"py:method","4":"py:attribute","5":"py:function"},terms:{"0":2,"012":2,"0313":2,"04":2,"09":2,"1":2,"10":2,"1007":2,"1024":2,"10x7":2,"11":2,"1109":2,"12":2,"120":2,"1280":2,"139737846905152":2,"139737847192592":2,"139737847606336":2,"139737847878272":2,"14":2,"16":2,"17":2,"1990":2,"1997":2,"1999":2,"1st":2,"2":2,"20":2,"2000":2,"2006":2,"2009":2,"2012":2,"2017":2,"2022":2,"255":2,"2nd":2,"3":2,"3390":2,"35":2,"384x288":2,"3d":2,"3dimpvt":2,"3x1":2,"3x3":2,"3x4":2,"4":2,"40":2,"5":2,"50":2,"512":2,"6":2,"60":2,"7":2,"720":2,"77":2,"8":2,"9":2,"\u03c4x":2,"\u03c4y":2,"case":2,"class":2,"default":2,"do":2,"export":2,"final":2,"float":2,"function":2,"import":2,"int":2,"new":2,"return":2,"static":2,"true":2,"while":2,A:2,As:2,At:2,For:2,If:2,In:2,It:2,No:2,Not:2,One:2,The:2,Then:2,To:2,__init__:2,_rig:[0,1],absolut:2,accept:2,account:2,accur:2,accuraci:2,acquir:2,activ:[0,1],actual:2,adapt:2,add:2,adimension:2,affect:2,affin:2,after:2,aircraft:2,al:2,algorithm:2,alia:2,all:2,allow:2,along:2,alpha:2,alreadi:2,also:2,altern:2,alwai:2,ambigu:2,among:2,an:2,anaglyph:2,ani:2,antisymmetr:2,anywai:2,anywher:2,appli:2,applic:2,approach:2,ar:2,area:2,arg:2,argument:2,arrai:2,ascii:2,asmaa:2,assign:2,associ:2,assum:2,attempt:2,attribut:2,autom:2,automat:2,avail:2,averag:2,avoid:2,axi:2,b:2,band:2,base:2,baselin:2,befor:2,best:2,between:2,bgr:2,bigger:2,biggest:2,bin:2,binari:2,black:2,black_thr:2,blackthreshold:2,bleyer:2,blue:2,bool:2,border:2,both:2,bound:2,boundari:2,bright:2,build:2,buildanaglyphfring:2,buildbinaryfring:2,buildfring:2,c:2,calcul:2,calibr:[0,1],calibratecamera:2,call:2,camdistcoeff:2,camera:2,cameraimag:2,cameramatrix:2,cameramatrixnew1:2,cameramatrixnew2:2,camintrins:2,campoint:2,can:2,cannot:2,cap:2,captur:2,caus:2,center:2,centerprincipalpoint:2,central:2,chang:2,changecamera:2,channel:2,check:2,chessboard:2,chessboardprocam:2,chessboardprocamwhit:2,chessboards:2,chessboardsingl:2,chessboardstereo:2,child:2,chosen:2,christoph:2,circl:2,classic:2,classmethod:2,clear:2,close:2,cloud:2,code:2,coeffici:2,col:2,color:2,column:2,com:2,come:2,common:2,commonli:2,compact:2,complementari:2,complet:2,compon:2,comput:2,computerectificationmap:2,computeroi:2,computeshadowmask:2,computi:2,condit:2,configur:2,connect:2,consid:2,consist:2,constructor:2,contain:2,content:1,continu:2,contour:2,convent:2,convert:2,convertgrayscal:2,coordin:2,corner:2,cornersubpix:2,correct:2,correspond:2,cost:2,could:2,count:2,coupl:2,cpu:2,creat:2,cristina:2,cross:2,current:2,custom:2,cv2:2,cvpr:2,daniel:2,data:2,dc:2,decim:2,decreas:2,defin:2,dens:2,dent:2,depend:2,descend:2,desid:2,desir:2,destdim:2,destin:2,detail:2,detect:2,devic:2,dict:2,differ:2,dim:2,dimens:2,dimension:2,dims1:2,dims2:2,direct:2,directli:2,directori:2,dispar:2,disparitymap:2,displac:2,distanc:2,distcoeff:2,distcoeffs1:2,distcoeffs2:2,distort:2,distortpoint:2,docstr:2,document:2,doe:2,doi:2,domain:2,done:2,dot:2,doubl:2,draw:2,drawcorrespondingepipolarlin:2,drawn:2,dtype:2,dure:2,e:2,each:2,either:2,element:2,els:2,en:2,enabl:2,end:2,epipol:2,epipolar:2,error:2,es:2,especi:2,essenti:2,estim:2,et:2,even:2,everi:2,exact:2,exactli:2,exampl:2,exclud:2,exist:2,expect:2,exportpli:2,express:2,extend:2,extra:2,extract:2,extramargin:2,extrem:2,extrins:2,f:2,factor:2,fail:2,fals:2,faster:2,fft:2,file:2,filenam:2,filepath:2,fill:2,filter:2,find:2,findcentralstrip:2,findcirclesgrid:2,finish:2,first:2,fit:2,flip:2,flipi:2,fmax:2,focal:2,follow:2,form:2,format:2,formula:2,fourier:2,fp:2,frame:2,framer:2,free:2,fring:2,fringedim:2,from:2,fromfil:2,ftp:2,full:2,fulli:2,func:2,fundament:2,fusiello:2,fusiellorectifi:2,fx:2,fy:2,g:2,gabriel:2,gamma:2,gammac:2,gammap:2,gelautz:2,gener:2,generatechessboardsvg:2,generategraycodeimg:2,geodes:2,get3dpoint:2,get:2,getadimensional3dpoint:2,getbaselin:2,getbestxshearingtransform:2,getcent:2,getcloud:2,getcrossproductmatrix:2,getessentialmatrix:2,getfittingmatrix:2,getfundamentalmatrix:2,getfundamentalmatrixfromproject:2,getoptimalnewcameramatrix:2,getphas:2,getprojectionmatric:2,getprojpixel:2,getrectifiedprojectionmatric:2,getresolut:2,github:2,given:2,go:2,grab:2,grai:2,graycod:2,graycodedoubl:2,graycodesingl:2,grayscal:2,green:2,guo:2,h1:2,h2:2,h:2,ha:2,half:2,have:2,height:2,heigth:2,helper:2,henc:2,here:2,heterodyn:2,high:2,higher:2,highest:2,histogram:2,homographi:2,horizont:2,hosni:2,howev:2,html:2,http:2,i:2,id:2,idea:2,ident:2,ignor:2,illumin:2,illustr:2,imag:2,img1:2,img1_rect:2,img1_undist:2,img2:2,img2_rect:2,img2_undist:2,img:2,imgobj:2,implement:2,importpli:2,improv:2,includ:2,incomplet:2,incorrect:2,increas:2,index:[0,2],indic:2,influenc:2,inform:2,initi:2,initundistortrectifymap:2,input:2,insert:2,insid:2,inspect:2,instead:2,int16:2,integ:2,inter_cub:2,inter_linear:2,inter_nearest:2,interest:2,intermedi:2,intern:2,interp1d:2,interpol:2,interpolationflag:2,intrins:2,intrinsic1:2,intrinsic2:2,intrinsicmatrix1:2,intrinsicmatrix2:2,invalid:2,invers:2,io:2,iter:2,its:2,json:2,k1:2,k2:2,k3:2,k4:2,k5:2,k6:2,k:2,kamino410:2,keep:2,kind:2,know:2,known:2,kweon:2,lafiosca:2,lag:2,last:2,later:2,latest:2,lead:2,least:2,left:2,length:2,less:2,lesson:2,level:2,librari:2,licenc:2,light:2,like:2,line:2,linear:2,list:2,literatur:2,load:2,local:2,locat:2,loop:2,looprectifi:2,lose:2,machin:2,made:2,magicmock:2,mai:2,main:2,manag:2,manipul:2,map:2,margin:2,margrit:2,mat:2,match:2,matric:2,matrix:2,max:2,maxdispar:2,maximum:2,measur:2,method:2,metric:2,michael:2,middl:2,millimet:2,min:2,mindispar:2,minim:2,minimum:2,miss:2,mit:2,mm:2,model:2,modifi:2,modul:[0,1],more:2,moreno:2,most:2,moveextrinsicorigintofirstcamera:2,multipli:2,must:2,mutual:2,n:2,nan:2,narrow:2,ndarrai:2,nearest:2,need:2,nois:2,non:2,none:2,norm:2,normal:2,note:2,np:2,number:2,numpi:2,numpydoc:2,object:2,obtain:2,occlud:2,occlus:2,odd:2,often:2,one:2,onel:2,oner:2,ones:2,onli:2,open:2,opencv:2,optim:2,option:2,order:2,org:2,orient:2,origin:2,other:2,otherwis:2,output:2,over:2,p1:2,p2:2,packag:0,page:0,pair:2,paper:2,par:2,param:2,paramet:2,particularli:2,pasqual:2,pass:2,passiv:[0,1],password:2,path:2,pattern:2,per:2,perform:2,period:2,perspect:2,perviewerror:2,phase:2,phaseshift:2,phaseshiftwhit:2,phaseunwrap:1,pixel:2,place:2,plane:2,pleas:2,plot:2,plu:2,ply:2,png:2,point:[0,1],pointer:2,points3d:2,posit:2,possibl:2,precis:2,preserv:2,princip:2,principl:2,procam:2,proce:2,process:2,produc:2,product:2,profilometri:2,progress:2,project:2,projector:2,projectorresolut:2,projpoint:2,projr:2,properli:2,properti:2,proport:2,protocol:2,prove:2,provid:2,proxim:2,purpos:2,put:2,py:2,qualiti:2,r1:2,r2:2,r:2,radiu:2,radius_factor:2,rais:2,rang:2,raw:2,rcommon:2,re:2,read:2,readthedoc:2,real:2,recalcul:2,reconstruct:2,rectangl:2,recthomographi:2,recthomography1:2,recthomography2:2,rectif:[0,1],rectifi:2,rectifiedstereorig:2,rectifiedstereorigobj:2,rectifyimag:2,red:2,reduc:2,refer:2,referenceimag:2,refin:2,region:2,reich:2,rel:2,remain:2,remap:2,rememb:2,remov:2,repres:2,reproject:2,reprojectionerror:2,requir:2,res1:2,res2:2,resolut:2,respect:2,result:2,retain:2,retriev:2,retval:2,rewrit:2,rhemann:2,rig:2,right:2,rigid:2,rm:2,robust:2,roi1:2,roi2:2,roi:2,rotat:2,roughli:2,row:2,run:2,rvec:2,s11554:2,s1:2,s22020433:2,s2:2,s3:2,s4:2,s:2,safeti:2,same:2,save:2,scale:2,scan:2,scipi:2,script:2,search:[0,2],sec:2,second:2,see:2,select:2,sensit:2,sensor:2,separ:2,sequenc:2,serv:2,set:2,setframer:2,setresolut:2,shape:2,share:2,shear:2,shift:2,should:2,show:2,showimag:2,side:2,signific:2,simpl:2,simpler:2,simplestereo:1,singl:2,sinusoid:2,size:2,skew:2,skip:2,sleep:2,slow:2,smoother:2,so:2,softwar:2,some:2,sourc:2,space:2,squar:2,squares:2,stai:2,standard:2,start:2,stereo:2,stereoasw:2,stereobm:2,stereoftp:2,stereoftp_map:2,stereoftp_phaseonli:2,stereoftpanaglyph:2,stereogsw:2,stereorectifi:2,stereorig:2,stereorigrectifi:2,stereosgbm:2,stop:2,store:2,str:2,strategi:2,stream:2,string:2,stripe:2,stripecolor:2,stripesensit:2,structur:2,structured_light_graycodepattern:2,structuredlightrig:2,style:2,subject:2,submodul:[0,1],subpixel:2,subsequ:2,subtract:2,successfulli:2,suggest:2,suitabl:2,sum:2,support:2,suppress:2,svg:2,system:2,t1:2,t2:2,t:2,take:2,taken:2,target:2,targetdir:2,taubin:2,than:2,thei:2,thi:2,thick:2,thread:2,three:2,threshold:2,time:2,togeth:2,too:2,top:2,total:2,tradit:2,tranform:2,transform:2,translat:2,trento:2,tri:2,triangul:2,tupl:2,turrini:2,tvec:2,two:2,twol:2,twor:2,tx:2,ty:2,type:2,uint8:2,unaccur:2,uncalibr:2,uncertanti:2,undistort:2,undistortcameraimag:2,undistortimag:2,unimi:2,unit:2,unwant:2,unwrap:[0,1],unwrappingmethod:2,updat:2,upper:2,url:2,us:2,usernam:2,usual:2,util:[0,1],v:2,valid:2,valu:2,valueerror:2,ve:2,vector:2,veri:2,version:2,vertic:2,via:2,video:2,view:2,virtual:2,visibl:2,vision:2,w:2,wa:2,warn:2,webcam:2,weight:2,well:2,when:2,where:2,wherev:2,white:2,white_thr:2,whole:2,width:2,window:2,winsiz:2,within:2,without:2,work:2,world:2,would:2,wrap:2,wrapper:2,write:2,written:2,x1:2,x2:2,x:2,y:2,yk:2,yoon:2,you:2,your:2,z:2,zero:2,zhang:2},titles:["Welcome to SimpleStereo\u2019s documentation!","package","simplestereo package"],titleterms:{_rig:2,activ:2,calibr:2,content:[0,2],document:0,indic:0,modul:2,packag:[1,2],passiv:2,phaseunwrap:2,point:2,rectif:2,s:0,simplestereo:[0,2],submodul:2,tabl:0,todo:2,unwrap:2,util:2,welcom:0}}) \ No newline at end of file diff --git a/docs/simplestereo.html b/docs/simplestereo.html index 04628b0..f3a7f5a 100644 --- a/docs/simplestereo.html +++ b/docs/simplestereo.html @@ -1,19 +1,20 @@ - + - + simplestereo package — SimpleStereo 1 documentation + + - - + @@ -41,23 +42,23 @@

Navigation

-

simplestereo package

+

simplestereo package

-

Module contents

+

Module contents

-

simplestereo

+

simplestereo

Module initialization.

Documentation DOCSTRING follows numpy-style wherever possible. See https://numpydoc.readthedocs.io/en/latest/format.html

-

Submodules

+

Submodules

-

simplestereo._rigs module

+

simplestereo._rigs module

-

_rigs

+

_rigs

Main classes loaded at package level.

See :py:module:`__init__.py`.

-
class simplestereo._rigs.RectifiedStereoRig(Rcommon, rectHomography1, rectHomography2, *args)[source]
-

Bases: StereoRig

+

Bases: simplestereo._rigs.StereoRig

Keep together and manage all parameters of a calibrated and rectified stereo rig.

It includes all the parameters of StereoRig plus two rectifying homographies. Differently from OpenCV, here the rectifying homographies (pixel domain) are taken as input, the ones commonly referred in literature, and not the rectification transformation in the object space.

-
Parameters:
+
Parameters
-
Attributes:
+
Attributes
E
F
@@ -103,7 +103,11 @@

_rigs

Methods

- +
++++ @@ -157,7 +161,7 @@

_rigs¶ without losing rectification. The two new maps are stored internally. This method is called in the constructor with default parameters and can be called later to change its settings.

-
Parameters:
+
Parameters
-
Return type:
+
Return type

None

@@ -184,13 +188,13 @@

_rigsclassmethod fromFile(filepath)[source]

Alternative initialization of StereoRigRectified object from JSON file.

-
Parameters:
+
Parameters

filepath (str) – Path of the JSON file containing saved parameters of the stereo rig.

-
Returns:
+
Returns

An object of StereoRigRectified class.

-
Return type:
+
Return type

StereoRigRectified

@@ -204,14 +208,14 @@

_rigs¶ the output would be in the same units. The world origin will be in the left camera.

-
Parameters:
+
Parameters

disparityMap (numpy.ndarray) – A dense disparity map having same height and width of images.

-
Returns:
+
Returns

Array of points having shape (height,width,3), where at each y,x coordinates a (x,y,z) point is associated.

-
Return type:
+
Return type

numpy.ndarray

@@ -225,7 +229,7 @@

_rigs¶ have only one horizontal displacement (the baseline) and have new intrinsics that depends on all the rigid manipulation done after rectification.

-
Returns:
+
Returns

computeRectificationMaps([destDims, alpha])

Compute the two maps to undistort and rectify the stereo pair.

+
++++ @@ -388,13 +396,13 @@

_rigsclassmethod fromFile(filepath)[source]

Alternative initialization of StereoRig object from JSON file.

-
Parameters:
+
Parameters

filepath (str) – Path of the JSON file containing saved parameters of the stereo rig.

-
Returns:
+
Returns

An object of StereoRig class.

-
Return type:
+
Return type

StereoRig

@@ -405,10 +413,10 @@

_rigsgetBaseline()[source]

Calculate the norm of the vector from camera 1 to camera 2.

-
Returns:
+
Returns

Length of the baseline in world units.

-
Return type:
+
Return type

float

@@ -420,7 +428,7 @@

_rigs

Calculate camera centers in world coordinates.

Anyway first camera will always be centered in zero (returned anyway).

-
Returns:
+
Returns

fromFile(filepath)

Alternative initialization of StereoRig object from JSON file.

+
++++ @@ -602,13 +614,13 @@

_rigsfromFile()[source]

Alternative initialization of StereoRig object from JSON file.

-
Parameters:
+
Parameters

filepath (str) – Path of the JSON file containing saved parameters of the stereo rig.

-
Returns:
+
Returns

An object of StereoRig class.

-
Return type:
+
Return type

StereoRig

@@ -620,7 +632,7 @@

_rigs

Given camera-projector correspondences, proceed with triangulation.

-
Parameters:
+
Parameters
-
Return type:
+
Return type

3D coordinates with shape (-1, 1, 3).

@@ -641,10 +653,10 @@

_rigsundistortCameraImage(imgObj)[source]

Undistort camera image.

-
Parameters:
+
Parameters

imgObj (numpy.ndarray) – Camera image.

-
Return type:
+
Return type

Undistorted image.

@@ -652,16 +664,16 @@

_rigs

+
-

simplestereo.active module

+

simplestereo.active module

-

active

+

active

Contains classes to manage active stereo algorithms and helper functions. This module contains both conventional active stereo (2 cameras + projector) and structured-light (1 camera + projector) methods.

-
class simplestereo.active.GrayCode(rig, black_thr=40, white_thr=5)[source]
@@ -670,7 +682,7 @@

activeStructured-light implementation using camera-projector calibrated rig.

-
Parameters:
+
Parameters
  • rig (StereoRig) – A stereo rig object with camera in position 1 (world origin) and projector in position 2.

  • @@ -693,7 +705,11 @@

    activeroi.

    Methods

    -

fromFile()

Alternative initialization of StereoRig object from JSON file.

+
++++ @@ -705,7 +721,7 @@

activegetCloud(images, roi=None)[source]

Perform the 3D point calculation from a list of images.

-
Parameters:
+
Parameters
  • images (list or tuple) – A list of image paths acquired by the camera. Each set must be ordered like all the Gray code patterns @@ -715,10 +731,10 @@

    active

-
Returns:
+
Returns

Points with shape (n,1,3)

-
Return type:
+
Return type

numpy.ndarray

@@ -739,7 +755,7 @@

activeConventional active stereo implementation, i.e. using two calibrated cameras and one uncalibrated projector.

-
Parameters:
+
Parameters
  • rig (StereoRig) – A stereo rig object with two cameras.

  • projRes (tuple) – Projector resolution as (width, height).

  • @@ -762,7 +778,11 @@

    activeroi.

    Methods

    -

getCloud(images[, roi])

Perform the 3D point calculation from a list of images.

+
++++ @@ -774,7 +794,7 @@

activegetCloud(images, roi1=None, roi2=None)[source]

Perform the 3D point calculation from a list of images.

-
Parameters:
+
Parameters
-
Returns:
+
Returns

Points with shape (n,1,3)

-
Return type:
+
Return type

numpy.ndarray

@@ -802,7 +822,7 @@

active
simplestereo.active.GrayCodeSingle
-

alias of GrayCode

+

alias of simplestereo.active.GrayCode

@@ -811,7 +831,7 @@

active

Bases: object

Manager of the Stereo Fourier Transform Profilometry.

-
Parameters:
+
Parameters

getCloud(images[, roi1, roi2])

Perform the 3D point calculation from a list of images.

+
++++ @@ -849,13 +873,13 @@

activeThis keeps highest BGR value over the central stripe (e.g. (0,0,255) -> 255), allowing the FFT to work properly.

-
Parameters:
+
Parameters

image (numpy.ndarray) – BGR image.

-
Returns:
+
Returns

Grayscale image.

-
Return type:
+
Return type

numpy.ndarray

@@ -875,7 +899,7 @@

activegetCloud(imgObj, radius_factor=0.5, roi=None, unwrappingMethod=None, plot=False)[source]

Process an image and get the point cloud.

-
Parameters:
+
Parameters
  • imgObj (numpy.ndarray) – BGR image acquired by the camera.

  • radius_factor (float, optional) – Radius factor of the pass-band filter. Default to 0.5.

  • @@ -885,7 +909,7 @@

    active`np.unwrap`is used.

-
Returns:
+
Returns

convertGrayscale(img)

Convert to grayscale using max.

+
++++ @@ -939,13 +967,13 @@

active
-
Parameters:
+
Parameters

image (numpy.ndarray) – BGR image.

-
Returns:
+
Returns

Grayscale image as float.

-
Return type:
+
Return type

numpy.ndarray

@@ -962,7 +990,7 @@

activeThe pattern expected to be projected on the object is the one produced by :func:buildAnaglyphFringe.

-
Parameters:
+
Parameters
-
Returns:
+
Returns

convertGrayscale(img)

Convert to grayscale using Guo et al., "Improved fourier transform profilometry for the automatic measurement of 3D object shapes", 1990.

+
++++ @@ -1021,7 +1053,7 @@

activegetCloud(imgObj, radius_factor=0.5, roi=None, unwrappingMethod=None, plot=False)[source]

Process an image and get the point cloud.

-
Parameters:
+
Parameters
  • imgObj (numpy.ndarray) – BGR image acquired by the camera.

  • radius_factor (float, optional) – Radius factor of the pass-band filter. Default to 0.5.

  • @@ -1031,7 +1063,7 @@

    active`np.unwrap`is used.

-
Returns:
+
Returns

convertGrayscale(img)

Convert to grayscale using max.

+
++++ @@ -1080,13 +1116,13 @@

activeThis keeps highest BGR value over the central stripe (e.g. (0,0,255) -> 255), allowing the FFT to work properly.

-
Parameters:
+
Parameters

image (numpy.ndarray) – BGR image.

-
Returns:
+
Returns

Grayscale image.

-
Return type:
+
Return type

numpy.ndarray

@@ -1101,7 +1137,7 @@

activegetPhase(imgObj, radius_factor=0.5, roi=None, plot=False)[source]

Process an image and get the point cloud.

-
Parameters:
+
Parameters
  • imgObj (numpy.ndarray) – BGR image acquired by the camera.

  • radius_factor (float, optional) – Radius factor of the pass-band filter. Default to 0.5.

  • @@ -1109,7 +1145,7 @@

    active

-
Returns:
+
Returns

convertGrayscale(img)

Convert to grayscale using max.

+
++++ @@ -1613,16 +1653,16 @@

passivecompute(img1, img2)[source]

Compute disparity map for BGR images.

-
Parameters:
+
Parameters
  • img1 (cv2.Mat) – A couple of OpenCV images (left and right, respectively) of same shape.

  • img2 (cv2.Mat) – A couple of OpenCV images (left and right, respectively) of same shape.

-
Returns:
+
Returns

A disparity map of the same width and height of the images.

-
Return type:
+
Return type

numpy.ndarray (np.int16)

@@ -1637,7 +1677,7 @@

passive -
Parameters:
+
Parameters

compute(img1, img2)

Compute disparity map for BGR images.

+
++++ @@ -1672,29 +1716,29 @@

passive -

simplestereo.points module

+

simplestereo.points module

-

points

+

points

Functions to manage point clouds.

-
simplestereo.points.distortPoints(points, distCoeff)[source]

Undistort relative coordinate points.

-
Parameters:
+
Parameters
  • points (list) – List of lists (or tuples) of x,y points in relative coordinates (already multiplied by the inverse intrinsic matrix and undistorted).

  • distCoeff (list) – List of 4, 5 or 8 elements (see OpenCV).

-
Returns:
+
Returns

List of lists of distorted x,y points in relative coordinates

-
Return type:
+
Return type

list

@@ -1711,7 +1755,7 @@

pointssimplestereo.points.exportPLY(points3D, filepath, referenceImage=None, precision=6)[source]

Export raw point cloud to PLY file (ASCII).

-
Parameters:
+
Parameters
+
-

simplestereo.rectification module

+

simplestereo.rectification module

-

rectification

+

rectification

Contains different rectification algorithms.

-
simplestereo.rectification.fusielloRectify(rig)[source]
@@ -1795,13 +1839,13 @@

rectification -
Parameters:
+
Parameters

rig (StereoRig) – An object of the StereoRig class. Camera must be position 1 (origin), projector in position 2.

-
Returns:
+
Returns

rectifiedStereoRigObj – An object of the RectifiedStereoRig class containing the rectifying homographies.

-
Return type:
+
Return type

RectifiedStereoRig

@@ -1815,16 +1859,16 @@

rectification -
Parameters:
+
Parameters
  • rectHomography (numpy.ndarray) – A 3x3 rectification homography.

  • dims (tuple) – Resolution of destination image as (width, height) tuple.

-
Returns:
+
Returns

S – A 3x3 shearing (x axis) transform.

-
Return type:
+
Return type

numpy.ndarray

@@ -1844,7 +1888,7 @@

rectification -
Parameters:
+
Parameters
+
-

simplestereo.unwrapping module

+

simplestereo.unwrapping module

-

phaseUnwrapping

+

phaseUnwrapping

Contains different phase unwrapping strategies.

-

simplestereo.utils module

+

simplestereo.utils module

-

utils

+

utils

This module provides general utilities.

-
class simplestereo.utils.Capture(device=0, flipY=False)[source]
@@ -1938,14 +1982,14 @@

utils minimizing lags for streaming and webcams. It supports webcams, URL streaming and video files.

-
Parameters:
+
Parameters
  • device (int or str) – Id of the opened video capturing device (i.e. a camera index). If there is a single camera connected, usually it will be 0 (default 0). Also the string containing full URL of the video stream (e.g. protocol://username:password@script?params) or a path to a video file.

  • flipY (bool) – If True, output image is flipped on the Y-axis. Default to False.

-
Raises:
+
Raises

compute(img1, img2)

Compute disparity map for 3-color channel images.

+
++++ @@ -2000,13 +2048,13 @@

utils

Do not call this for video files or when the thread is running. It works only for supported cameras.

-
Parameters:
+
Parameters

fps (int) – Frames per second.

-
Returns:
+
Returns

True if the framerate was set successfully, False otherwise.

-
Return type:
+
Return type

bool

@@ -2019,16 +2067,16 @@

utils

Do not call this for video files or when the thread is running. It works only for supported cameras.

-
Parameters:
+
Parameters
  • width (int) – Width and height to be set in pixels.

  • heigth (int) – Width and height to be set in pixels.

-
Returns:
+
Returns

True if the resolution was set successfully, False otherwise.

-
Return type:
+
Return type

bool

@@ -2063,7 +2111,7 @@

utils be modified directly. Distortion is not taken into account.

-
Parameters:
+
Parameters
-
Return type:
+
Return type

None

@@ -2090,13 +2138,13 @@

utils

Build the 3x3 antisymmetric matrix representing the cross product with v.

In literature this is often indicated as [v]x.

-
Parameters:
+
Parameters

v (numpy.ndarray or list) – A 3-dimensional vector.

-
Returns:
+
Returns

A 3x3 matrix representing the cross product with the input vector.

-
Return type:
+
Return type

numpy.ndarray

@@ -2110,7 +2158,7 @@

utils from extrinsic of two cameras centered anywhere else. This is particularly useful when the world coordinate system is not centered into the first camera.

-
Parameters:
+
Parameters
-
Returns:
+
Returns

+ @@ -2149,122 +2198,26 @@

Table of Contents

  • Submodules
  • simplestereo._rigs module
  • simplestereo.active module
  • simplestereo.calibration module
  • simplestereo.passive module
  • simplestereo.points module
  • simplestereo.rectification module
  • simplestereo.unwrapping module @@ -2313,7 +2254,7 @@

    Quick search

    - +
    @@ -2336,7 +2277,7 @@

    Navigation

    \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 4a95fa7..c1b7705 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = SimpleStereo -version = 1.0.5.1 +version = 1.0.6.0 description = Stereo vision made simple long_description = file: README.md long_description_content_type = text/markdown
  • get()

    Retrieve the current frame.