Package org.opencv.structured_light
Class SinusoidalPattern
- java.lang.Object
-
- org.opencv.core.Algorithm
-
- org.opencv.structured_light.StructuredLightPattern
-
- org.opencv.structured_light.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 Summary
Constructors Modifier Constructor Description protected
SinusoidalPattern(long addr)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SinusoidalPattern
__fromPtr__(long addr)
void
computeDataModulationTerm(java.util.List<Mat> patternImages, Mat dataModulationTerm, Mat shadowMask)
compute the data modulation term.void
computePhaseMap(java.util.List<Mat> patternImages, Mat wrappedPhaseMap)
Compute a wrapped phase map from sinusoidal patterns.void
computePhaseMap(java.util.List<Mat> patternImages, Mat wrappedPhaseMap, Mat shadowMask)
Compute a wrapped phase map from sinusoidal patterns.void
computePhaseMap(java.util.List<Mat> patternImages, Mat wrappedPhaseMap, Mat shadowMask, Mat fundamental)
Compute a wrapped phase map from sinusoidal patterns.static SinusoidalPattern
create()
Constructor.static SinusoidalPattern
create(SinusoidalPattern_Params parameters)
Constructor.protected void
finalize()
void
findProCamMatches(Mat projUnwrappedPhaseMap, Mat camUnwrappedPhaseMap, java.util.List<Mat> matches)
Find correspondences between the two devices thanks to unwrapped phase maps.void
unwrapPhaseMap(Mat wrappedPhaseMap, Mat unwrappedPhaseMap, Size camSize)
Unwrap the wrapped phase map to remove phase ambiguities.void
unwrapPhaseMap(Mat wrappedPhaseMap, Mat unwrappedPhaseMap, Size camSize, Mat shadowMask)
Unwrap the wrapped phase map to remove phase ambiguities.-
Methods inherited from class org.opencv.structured_light.StructuredLightPattern
generate
-
Methods inherited from class org.opencv.core.Algorithm
clear, empty, getDefaultName, getNativeObjAddr, save
-
-
-
-
Method Detail
-
__fromPtr__
public static SinusoidalPattern __fromPtr__(long addr)
-
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(java.util.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(java.util.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(java.util.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, java.util.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(java.util.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
protected void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classStructuredLightPattern
- Throws:
java.lang.Throwable
-
-