Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
4009fb64
Commit
4009fb64
authored
Aug 17, 2017
by
Vladislav Sovrasov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
structured light: wrap create method of the SinusoidalPattern class
parent
54d65f9d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
23 deletions
+25
-23
sinusoidalpattern.hpp
...ht/include/opencv2/structured_light/sinusoidalpattern.hpp
+12
-12
capsinpattern.cpp
modules/structured_light/samples/capsinpattern.cpp
+3
-3
sinusoidalpattern.cpp
modules/structured_light/src/sinusoidalpattern.cpp
+3
-4
test_faps.cpp
modules/structured_light/test/test_faps.cpp
+7
-4
No files found.
modules/structured_light/include/opencv2/structured_light/sinusoidalpattern.hpp
View file @
4009fb64
...
...
@@ -79,17 +79,17 @@ public:
* @param setMarkers Allow to set markers on the patterns.
* @param markersLocation vector used to store markers location on the patterns.
*/
struct
CV_EXPORTS
Params
struct
CV_EXPORTS
_W
Params
{
Params
();
int
width
;
int
height
;
int
nbrOfPeriods
;
float
shiftValue
;
int
methodId
;
int
nbrOfPixelsBetweenMarkers
;
bool
horizontal
;
bool
setMarkers
;
CV_WRAP
Params
();
CV_PROP_RW
int
width
;
CV_PROP_RW
int
height
;
CV_PROP_RW
int
nbrOfPeriods
;
CV_PROP_RW
float
shiftValue
;
CV_PROP_RW
int
methodId
;
CV_PROP_RW
int
nbrOfPixelsBetweenMarkers
;
CV_PROP_RW
bool
horizontal
;
CV_PROP_RW
bool
setMarkers
;
std
::
vector
<
Point2f
>
markersLocation
;
};
/**
...
...
@@ -97,8 +97,8 @@ public:
* @param parameters SinusoidalPattern parameters SinusoidalPattern::Params: width, height of the projector and patterns parameters.
*
*/
static
Ptr
<
SinusoidalPattern
>
create
(
const
SinusoidalPattern
::
Params
&
parameters
=
SinusoidalPattern
::
Params
()
);
CV_WRAP
static
Ptr
<
SinusoidalPattern
>
create
(
Ptr
<
SinusoidalPattern
::
Params
>
parameters
=
makePtr
<
SinusoidalPattern
::
Params
>
()
);
/**
* @brief Compute a wrapped phase map from sinusoidal patterns.
* @param patternImages Input data to compute the wrapped phase map.
...
...
modules/structured_light/samples/capsinpattern.cpp
View file @
4009fb64
...
...
@@ -103,7 +103,8 @@ int main(int argc, char **argv)
String
outputUnwrappedPhasePath
=
parser
.
get
<
String
>
(
9
);
String
reliabilitiesPath
=
parser
.
get
<
String
>
(
10
);
Ptr
<
structured_light
::
SinusoidalPattern
>
sinus
=
structured_light
::
SinusoidalPattern
::
create
(
params
);
Ptr
<
structured_light
::
SinusoidalPattern
>
sinus
=
structured_light
::
SinusoidalPattern
::
create
(
makePtr
<
structured_light
::
SinusoidalPattern
::
Params
>
(
params
));
Ptr
<
phase_unwrapping
::
HistogramPhaseUnwrapping
>
phaseUnwrapping
;
vector
<
Mat
>
patterns
;
...
...
@@ -332,4 +333,4 @@ int main(int argc, char **argv)
}
}
return
0
;
}
\ No newline at end of file
}
modules/structured_light/src/sinusoidalpattern.cpp
View file @
4009fb64
...
...
@@ -911,9 +911,9 @@ void SinusoidalPatternProfilometry_Impl::convertToAbsolutePhaseMap( InputArrayOf
computeCorrespondEpilines
(
params
.
markersLocation
,
2
,
fundamental
,
epilines
);
}
Ptr
<
SinusoidalPattern
>
SinusoidalPattern
::
create
(
const
SinusoidalPattern
::
Params
&
params
)
Ptr
<
SinusoidalPattern
>
SinusoidalPattern
::
create
(
Ptr
<
SinusoidalPattern
::
Params
>
params
)
{
return
makePtr
<
SinusoidalPatternProfilometry_Impl
>
(
params
);
return
makePtr
<
SinusoidalPatternProfilometry_Impl
>
(
*
params
);
}
}
}
}
\ No newline at end of file
modules/structured_light/test/test_faps.cpp
View file @
4009fb64
...
...
@@ -54,10 +54,13 @@ TEST( SinusoidalPattern, unwrapPhaseMap )
{
string
folder
=
cvtest
::
TS
::
ptr
()
->
get_data_path
()
+
"/"
+
STRUCTURED_LIGHT_DIR
+
"/"
+
FOLDER_DATA
+
"/"
;
structured_light
::
SinusoidalPattern
::
Params
paramsPsp
,
paramsFtp
,
paramsFaps
;
paramsFtp
.
methodId
=
0
;
paramsPsp
.
methodId
=
1
;
paramsFaps
.
methodId
=
2
;
Ptr
<
structured_light
::
SinusoidalPattern
::
Params
>
paramsPsp
,
paramsFtp
,
paramsFaps
;
paramsPsp
=
makePtr
<
structured_light
::
SinusoidalPattern
::
Params
>
();
paramsFtp
=
makePtr
<
structured_light
::
SinusoidalPattern
::
Params
>
();
paramsFaps
=
makePtr
<
structured_light
::
SinusoidalPattern
::
Params
>
();
paramsFtp
->
methodId
=
0
;
paramsPsp
->
methodId
=
1
;
paramsFaps
->
methodId
=
2
;
Ptr
<
structured_light
::
SinusoidalPattern
>
sinusPsp
=
structured_light
::
SinusoidalPattern
::
create
(
paramsPsp
);
Ptr
<
structured_light
::
SinusoidalPattern
>
sinusFtp
=
structured_light
::
SinusoidalPattern
::
create
(
paramsFtp
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment