Unverified Commit 2af7e3d9 authored by Jesse Mapel's avatar Jesse Mapel Committed by GitHub
Browse files

Added ISIS outlier detection notebook (#505)

* Added ISIS outlier detection notebook

* Cleaned up notebook

* Fixed docs spacing

* Fixed docs typo
parent 9ae825e5
Loading
Loading
Loading
Loading
+61 −0
Original line number Diff line number Diff line
@@ -757,6 +757,67 @@ class NetworkEdge(Edge):
            session.expunge_all()
        return res

    def compute_homography(self, method='ransac', maskname='homography', **kwargs):
        """
        Estimate the homography and reprojective error on this edge of the graph.

        Parameters
        ----------
        method : {'ransac', 'lmeds', 'normal'}
                 The method that will be used when computing the homography.

        maskname : str
                   The column that the mask will be saved under in the masks dataframe.
                   If the column already exists, then the mask in that column will be overwritten.

        kwargs : dict
                 Extra arguments that will be passed to the homography computation.

        See Also
        --------
        autocnet.transformation.transformations.homography.compute_homography
        """
        matches = self.matches

        s_keypoints = matches[["source_x", "source_y"]].values.astype(np.float64)
        d_keypoints = matches[["destination_x", "destination_y"]].values.astype(np.float64)

        self['homography'], hmask = hm.compute_homography(s_keypoints, d_keypoints, method=method, **kwargs)

        self.masks[maskname] = hmask

    def compute_fundamental_matrix(self, method='ransac', maskname='fundamental', **kwargs):
        """
        Estimate the fundamental matrix (F) using the correspondences tagged to this
        edge.


        Parameters
        ----------
        method : {'ransac', 'lmeds', 'normal', '8point'}
                 The method that will be used when computing the homography.

        maskname : str
                   The column that the mask will be saved under in the masks dataframe.
                   If the column already exists, then the mask in that column will be overwritten.

        kwargs : dict
                 Extra arguments that will be passed to the fundamental matrix computation.

        See Also
        --------
        autocnet.transformation.transformations.fundamental_matrix.compute_fundamental_matrix

        """

        matches = self.matches

        s_keypoints = matches[["source_x", "source_y"]].values.astype(np.float64)
        d_keypoints = matches[["destination_x", "destination_y"]].values.astype(np.float64)
        self.fundamental_matrix, fmask = fm.compute_fundamental_matrix(s_keypoints, d_keypoints, method=method, **kwargs)

        self.masks[maskname] = fmask

    @property
    def weights(self):
        with self.parent.session_scope() as session:
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ Working With ISIS Control Networks
   :maxdepth: 1

    Ingesting from ISIS control network<isis_ingest/from_cnet.ipynb>
    Using outlier detection to check for bad measures<outlier_detection/outlier_detection.ipynb>


Working With Apollo Pan
+2449 −0

File added.

Preview size limit exceeded, changes collapsed.