Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
bob.ip.qualitymeasure
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
bob.ip.qualitymeasure
Commits
d20584e9
Commit
d20584e9
authored
Jul 13, 2017
by
David GEISSBUHLER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added python bindings for flags
parent
0ed34058
Pipeline
#11273
failed with stages
in 8 minutes and 22 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
bob/ip/qualitymeasure/main.cpp
bob/ip/qualitymeasure/main.cpp
+10
-6
No files found.
bob/ip/qualitymeasure/main.cpp
View file @
d20584e9
...
...
@@ -23,15 +23,19 @@ static PyObject* PyRemoveHighlights(PyObject*, PyObject* args, PyObject* kwargs)
BOB_TRY
static
const
char
*
const_kwlist
[]
=
{
"array"
,
"startEps"
,
0
};
static
const
char
*
const_kwlist
[]
=
{
"array"
,
"startEps"
,
"skip_diffuse"
,
"check_nan_inf"
,
0
};
static
char
**
kwlist
=
const_cast
<
char
**>
(
const_kwlist
);
PyBlitzArrayObject
*
array
;
double
epsilon
=
0.5
f
;
double
epsilon
=
0.5
f
;
bool
skip_diffuse
=
false
;
bool
check_nan_inf
=
false
;
if
(
!
PyArg_ParseTupleAndKeywords
(
args
,
kwargs
,
"O&|d"
,
kwlist
,
if
(
!
PyArg_ParseTupleAndKeywords
(
args
,
kwargs
,
"O&|d
ii
"
,
kwlist
,
&
PyBlitzArray_Converter
,
&
array
,
&
epsilon
))
return
0
;
&
epsilon
,
&
skip_diffuse
,
&
check_nan_inf
))
return
0
;
// check that the array has the expected properties
if
(
array
->
type_num
!=
NPY_FLOAT32
||
array
->
ndim
!=
3
){
...
...
@@ -57,7 +61,7 @@ static PyObject* PyRemoveHighlights(PyObject*, PyObject* args, PyObject* kwargs)
// call the C++ function
remove_highlights
(
img
,
diffuse_img
,
speckle_free_img
,
speckle_img
,
(
float
)
epsilon
,
false
,
false
);
(
float
)
epsilon
,
skip_diffuse
,
check_nan_inf
);
// convert the blitz array back to numpy and return it
PyObject
*
ret_tuple
=
PyTuple_New
(
3
);
...
...
@@ -88,7 +92,7 @@ static PyMethodDef module_methods[] = {
};
// module documentation
PyDoc_STRVAR
(
module_docstr
,
"
Exemplary Python Binding
s"
);
PyDoc_STRVAR
(
module_docstr
,
"
Tan Specular Highlight
s"
);
// module definition
#if PY_VERSION_HEX >= 0x03000000
...
...
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