Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
92a89bce
Commit
92a89bce
authored
Jun 23, 2018
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow point and dpoint use for hough_transform stuff.
parent
746af7f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
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