Class SinusoidalPattern
java.lang.Object
org.opencv.core.Algorithm
org.opencv.structured_light.StructuredLightPattern
org.opencv.structured_light.SinusoidalPattern
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.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SinusoidalPattern__fromPtr__(long addr) voidcomputeDataModulationTerm(List<Mat> patternImages, Mat dataModulationTerm, Mat shadowMask) compute the data modulation term.voidcomputePhaseMap(List<Mat> patternImages, Mat wrappedPhaseMap) Compute a wrapped phase map from sinusoidal patterns.voidcomputePhaseMap(List<Mat> patternImages, Mat wrappedPhaseMap, Mat shadowMask) Compute a wrapped phase map from sinusoidal patterns.voidCompute a wrapped phase map from sinusoidal patterns.static SinusoidalPatterncreate()Constructor.static SinusoidalPatterncreate(SinusoidalPattern_Params parameters) Constructor.protected voidfinalize()voidfindProCamMatches(Mat projUnwrappedPhaseMap, Mat camUnwrappedPhaseMap, List<Mat> matches) Find correspondences between the two devices thanks to unwrapped phase maps.voidunwrapPhaseMap(Mat wrappedPhaseMap, Mat unwrappedPhaseMap, Size camSize) Unwrap the wrapped phase map to remove phase ambiguities.voidunwrapPhaseMap(Mat wrappedPhaseMap, Mat unwrappedPhaseMap, Size camSize, Mat shadowMask) Unwrap the wrapped phase map to remove phase ambiguities.Methods inherited from class StructuredLightPattern
generateMethods inherited from class Algorithm
clear, empty, getDefaultName, getNativeObjAddr, save
-
Constructor Details
-
SinusoidalPattern
protected SinusoidalPattern(long addr)
-
-
Method Details
-
__fromPtr__
-
create
Constructor.- Parameters:
parameters- SinusoidalPattern parameters SinusoidalPattern::Params: width, height of the projector and patterns parameters.- Returns:
- automatically generated
-
create
-
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
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
-
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
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.
-
finalize
- Overrides:
finalizein classStructuredLightPattern- Throws:
Throwable
-