Class SinusoidalPattern


  • public class SinusoidalPattern
    extends StructuredLightPattern
    Class implementing Fourier transform profilometry (FTP) , phase-shifting profilometry (PSP) and Fourier-assisted phase-shifting profilometry (FAPS) based on CITE: faps. This class generates sinusoidal patterns that can be used with FTP, PSP and FAPS.
    • Constructor Detail

      • SinusoidalPattern

        protected SinusoidalPattern​(long addr)
    • Method Detail

      • create

        public static SinusoidalPattern create​(SinusoidalPattern_Params parameters)
        Constructor.
        Parameters:
        parameters - SinusoidalPattern parameters SinusoidalPattern::Params: width, height of the projector and patterns parameters.
        Returns:
        automatically generated
      • create

        public static SinusoidalPattern create()
        Constructor.
        Returns:
        automatically generated
      • computePhaseMap

        public void computePhaseMap​(List<Mat> patternImages,
                                    Mat wrappedPhaseMap,
                                    Mat shadowMask,
                                    Mat fundamental)
        Compute a wrapped phase map from sinusoidal patterns.
        Parameters:
        patternImages - Input data to compute the wrapped phase map.
        wrappedPhaseMap - Wrapped phase map obtained through one of the three methods.
        shadowMask - Mask used to discard shadow regions.
        fundamental - Fundamental matrix used to compute epipolar lines and ease the matching step.
      • computePhaseMap

        public void computePhaseMap​(List<Mat> patternImages,
                                    Mat wrappedPhaseMap,
                                    Mat shadowMask)
        Compute a wrapped phase map from sinusoidal patterns.
        Parameters:
        patternImages - Input data to compute the wrapped phase map.
        wrappedPhaseMap - Wrapped phase map obtained through one of the three methods.
        shadowMask - Mask used to discard shadow regions.
      • computePhaseMap

        public void computePhaseMap​(List<Mat> patternImages,
                                    Mat wrappedPhaseMap)
        Compute a wrapped phase map from sinusoidal patterns.
        Parameters:
        patternImages - Input data to compute the wrapped phase map.
        wrappedPhaseMap - Wrapped phase map obtained through one of the three methods.
      • unwrapPhaseMap

        public void unwrapPhaseMap​(Mat wrappedPhaseMap,
                                   Mat unwrappedPhaseMap,
                                   Size camSize,
                                   Mat shadowMask)
        Unwrap the wrapped phase map to remove phase ambiguities.
        Parameters:
        wrappedPhaseMap - The wrapped phase map computed from the pattern.
        unwrappedPhaseMap - The unwrapped phase map used to find correspondences between the two devices.
        camSize - Resolution of the camera.
        shadowMask - Mask used to discard shadow regions.
      • unwrapPhaseMap

        public void unwrapPhaseMap​(Mat wrappedPhaseMap,
                                   Mat unwrappedPhaseMap,
                                   Size camSize)
        Unwrap the wrapped phase map to remove phase ambiguities.
        Parameters:
        wrappedPhaseMap - The wrapped phase map computed from the pattern.
        unwrappedPhaseMap - The unwrapped phase map used to find correspondences between the two devices.
        camSize - Resolution of the camera.
      • findProCamMatches

        public void findProCamMatches​(Mat projUnwrappedPhaseMap,
                                      Mat camUnwrappedPhaseMap,
                                      List<Mat> matches)
        Find correspondences between the two devices thanks to unwrapped phase maps.
        Parameters:
        projUnwrappedPhaseMap - Projector's unwrapped phase map.
        camUnwrappedPhaseMap - Camera's unwrapped phase map.
        matches - Images used to display correspondences map.
      • computeDataModulationTerm

        public void computeDataModulationTerm​(List<Mat> patternImages,
                                              Mat dataModulationTerm,
                                              Mat shadowMask)
        compute the data modulation term.
        Parameters:
        patternImages - captured images with projected patterns.
        dataModulationTerm - Mat where the data modulation term is saved.
        shadowMask - Mask used to discard shadow regions.