Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
92a89bce
"tests/python/common/utils.py" did not exist on "015acfd2d868852d903ea03824ce7b308a556fcf"
Commit
92a89bce
authored
Jun 23, 2018
by
Davis King
Browse files
Allow point and dpoint use for hough_transform stuff.
parent
746af7f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
tools/python/src/image2.cpp
tools/python/src/image2.cpp
+12
-6
No files found.
tools/python/src/image2.cpp
View file @
92a89bce
...
...
@@ -40,9 +40,10 @@ numpy_image<T> py_equalize_histogram (
// ----------------------------------------------------------------------------------------
template
<
typename
T
>
line
ht_get_line
(
const
hough_transform
&
ht
,
const
point
&
p
const
dlib
::
vector
<
T
,
2
>
&
p
)
{
DLIB_CASSERT
(
get_rect
(
ht
).
contains
(
p
));
...
...
@@ -50,18 +51,20 @@ line ht_get_line (
return
line
(
temp
.
first
,
temp
.
second
);
}
template
<
typename
T
>
double
ht_get_line_angle_in_degrees
(
const
hough_transform
&
ht
,
const
point
&
p
const
dlib
::
vector
<
T
,
2
>
&
p
)
{
DLIB_CASSERT
(
get_rect
(
ht
).
contains
(
p
));
return
ht
.
get_line_angle_in_degrees
(
p
);
}
template
<
typename
T
>
py
::
tuple
ht_get_line_properties
(
const
hough_transform
&
ht
,
const
point
&
p
const
dlib
::
vector
<
T
,
2
>
&
p
)
{
DLIB_CASSERT
(
get_rect
(
ht
).
contains
(
p
));
...
...
@@ -191,7 +194,8 @@ ensures \n\
.
def
(
py
::
init
<
unsigned
long
>
(),
doc_constr
,
py
::
arg
(
"size_"
))
.
def_property_readonly
(
"size"
,
&
hough_transform
::
size
,
"returns the size of the Hough transforms generated by this object. In particular, this object creates Hough transform images that are size by size pixels in size."
)
.
def
(
"get_line"
,
&
ht_get_line
,
py
::
arg
(
"p"
),
.
def
(
"get_line"
,
&
ht_get_line
<
long
>
,
py
::
arg
(
"p"
))
.
def
(
"get_line"
,
&
ht_get_line
<
double
>
,
py
::
arg
(
"p"
),
"requires
\n
\
- rectangle(0,0,size-1,size-1).contains(p) == true
\n
\
(i.e. p must be a point inside the Hough accumulator array)
\n
\
...
...
@@ -209,7 +213,8 @@ ensures \n\
- The returned points are inside rectangle(0,0,size-1,size-1).
!*/
.
def
(
"get_line_angle_in_degrees"
,
&
ht_get_line_angle_in_degrees
,
py
::
arg
(
"p"
),
.
def
(
"get_line_angle_in_degrees"
,
&
ht_get_line_angle_in_degrees
<
long
>
,
py
::
arg
(
"p"
))
.
def
(
"get_line_angle_in_degrees"
,
&
ht_get_line_angle_in_degrees
<
double
>
,
py
::
arg
(
"p"
),
"requires
\n
\
- rectangle(0,0,size-1,size-1).contains(p) == true
\n
\
(i.e. p must be a point inside the Hough accumulator array)
\n
\
...
...
@@ -226,7 +231,8 @@ ensures \n\
!*/
.
def
(
"get_line_properties"
,
&
ht_get_line_properties
,
py
::
arg
(
"p"
),
.
def
(
"get_line_properties"
,
&
ht_get_line_properties
<
long
>
,
py
::
arg
(
"p"
))
.
def
(
"get_line_properties"
,
&
ht_get_line_properties
<
double
>
,
py
::
arg
(
"p"
),
"requires
\n
\
- rectangle(0,0,size-1,size-1).contains(p) == true
\n
\
(i.e. p must be a point inside the Hough accumulator array)
\n
\
...
...
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