Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Commits
4ab650d1
Commit
4ab650d1
authored
Mar 30, 2013
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove gcd function from core headers
parent
c886afb5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
12 deletions
+16
-12
operations.hpp
modules/core/include/opencv2/core/operations.hpp
+1
-12
hog.cpp
modules/objdetect/src/hog.cpp
+13
-0
test_cascadeandhog.cpp
modules/objdetect/test/test_cascadeandhog.cpp
+2
-0
No files found.
modules/core/include/opencv2/core/operations.hpp
View file @
4ab650d1
...
@@ -1036,18 +1036,7 @@ inline FileNode FileStorage::getFirstTopLevelNode() const
...
@@ -1036,18 +1036,7 @@ inline FileNode FileStorage::getFirstTopLevelNode() const
//////////////////////////////////////// Various algorithms ////////////////////////////////////
//////////////////////////////////////// Various algorithms ////////////////////////////////////
template
<
typename
_Tp
>
static
inline
_Tp
gcd
(
_Tp
a
,
_Tp
b
)
{
if
(
a
<
b
)
std
::
swap
(
a
,
b
);
while
(
b
>
0
)
{
_Tp
r
=
a
%
b
;
a
=
b
;
b
=
r
;
}
return
a
;
}
// This function splits the input sequence or set into one or more equivalence classes and
// This function splits the input sequence or set into one or more equivalence classes and
// returns the vector of labels - 0-based class indexes for each element.
// returns the vector of labels - 0-based class indexes for each element.
...
...
modules/objdetect/src/hog.cpp
View file @
4ab650d1
...
@@ -1015,6 +1015,19 @@ Rect HOGCache::getWindow(const Size& imageSize, const Size& winStride, int idx)
...
@@ -1015,6 +1015,19 @@ Rect HOGCache::getWindow(const Size& imageSize, const Size& winStride, int idx)
return
Rect
(
x
*
winStride
.
width
,
y
*
winStride
.
height
,
winSize
.
width
,
winSize
.
height
);
return
Rect
(
x
*
winStride
.
width
,
y
*
winStride
.
height
,
winSize
.
width
,
winSize
.
height
);
}
}
static
inline
int
gcd
(
int
a
,
int
b
)
{
if
(
a
<
b
)
std
::
swap
(
a
,
b
);
while
(
b
>
0
)
{
int
r
=
a
%
b
;
a
=
b
;
b
=
r
;
}
return
a
;
}
void
HOGDescriptor
::
compute
(
const
Mat
&
img
,
std
::
vector
<
float
>&
descriptors
,
void
HOGDescriptor
::
compute
(
const
Mat
&
img
,
std
::
vector
<
float
>&
descriptors
,
Size
winStride
,
Size
padding
,
const
std
::
vector
<
Point
>&
locations
)
const
Size
winStride
,
Size
padding
,
const
std
::
vector
<
Point
>&
locations
)
const
{
{
...
...
modules/objdetect/test/test_cascadeandhog.cpp
View file @
4ab650d1
...
@@ -995,6 +995,8 @@ inline bool HOGDescriptorTester::is_failed() const
...
@@ -995,6 +995,8 @@ inline bool HOGDescriptorTester::is_failed() const
return
failed
;
return
failed
;
}
}
static
inline
int
gcd
(
int
a
,
int
b
)
{
return
(
a
%
b
==
0
)
?
b
:
gcd
(
b
,
a
%
b
);
}
void
HOGDescriptorTester
::
detect
(
const
Mat
&
img
,
void
HOGDescriptorTester
::
detect
(
const
Mat
&
img
,
vector
<
Point
>&
hits
,
vector
<
double
>&
weights
,
double
hitThreshold
,
vector
<
Point
>&
hits
,
vector
<
double
>&
weights
,
double
hitThreshold
,
Size
winStride
,
Size
padding
,
const
vector
<
Point
>&
locations
)
const
Size
winStride
,
Size
padding
,
const
vector
<
Point
>&
locations
)
const
...
...
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