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
8a3e8979
Commit
8a3e8979
authored
Nov 07, 2012
by
marina.kolpakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
min and max params become double
parent
e379771c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
objdetect.hpp
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
+6
-5
icf.cpp
modules/objdetect/src/icf.cpp
+2
-2
softcascade.cpp
modules/objdetect/src/softcascade.cpp
+3
-3
No files found.
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
View file @
8a3e8979
...
...
@@ -523,12 +523,12 @@ public:
// Param gray is an input 1-channel gray image.
// Param integrals is a vector of integrals. Hog-channels will be appended to it.
// Param bins is a number of hog-bins
void
appendHogBins
(
const
cv
::
Mat
gray
,
std
::
vector
<
cv
::
Mat
>&
integrals
,
int
bins
)
const
;
void
appendHogBins
(
const
cv
::
Mat
&
gray
,
std
::
vector
<
cv
::
Mat
>&
integrals
,
int
bins
)
const
;
// Converts 3-channel BGR input frame in Luv and appends each channel to the integrals.
// Param frame is an input 3-channel BGR colored image.
// Param integrals is a vector of integrals. Computed from the frame luv-channels will be appended to it.
void
appendLuvBins
(
const
cv
::
Mat
frame
,
std
::
vector
<
cv
::
Mat
>&
integrals
)
const
;
void
appendLuvBins
(
const
cv
::
Mat
&
frame
,
std
::
vector
<
cv
::
Mat
>&
integrals
)
const
;
private
:
int
shrinkage
;
...
...
@@ -539,7 +539,7 @@ public:
// Param minScale is a maximum scale relative to the original size of the image on which cascade will be applyed.
// Param scales is a number of scales from minScale to maxScale.
// Param rejfactor is used for NMS.
SCascade
(
const
float
minScale
=
0.4
f
,
const
float
maxScale
=
5.
f
,
const
int
scales
=
55
,
const
int
rejfactor
=
1
);
SCascade
(
const
double
minScale
=
0.4
,
const
double
maxScale
=
5.
,
const
int
scales
=
55
,
const
int
rejfactor
=
1
);
virtual
~
SCascade
();
...
...
@@ -564,8 +564,9 @@ private:
struct
Fields
;
Fields
*
fields
;
float
minScale
;
float
maxScale
;
double
minScale
;
double
maxScale
;
int
scales
;
int
rejfactor
;
};
...
...
modules/objdetect/src/icf.cpp
View file @
8a3e8979
...
...
@@ -44,7 +44,7 @@
cv
::
SCascade
::
Channels
::
Channels
(
int
shr
)
:
shrinkage
(
shr
)
{}
void
cv
::
SCascade
::
Channels
::
appendHogBins
(
const
cv
::
Mat
gray
,
std
::
vector
<
cv
::
Mat
>&
integrals
,
int
bins
)
const
void
cv
::
SCascade
::
Channels
::
appendHogBins
(
const
cv
::
Mat
&
gray
,
std
::
vector
<
cv
::
Mat
>&
integrals
,
int
bins
)
const
{
CV_Assert
(
gray
.
type
()
==
CV_8UC1
);
int
h
=
gray
.
rows
;
...
...
@@ -92,7 +92,7 @@ void cv::SCascade::Channels::appendHogBins(const cv::Mat gray, std::vector<cv::M
integrals
.
push_back
(
mag
);
}
void
cv
::
SCascade
::
Channels
::
appendLuvBins
(
const
cv
::
Mat
frame
,
std
::
vector
<
cv
::
Mat
>&
integrals
)
const
void
cv
::
SCascade
::
Channels
::
appendLuvBins
(
const
cv
::
Mat
&
frame
,
std
::
vector
<
cv
::
Mat
>&
integrals
)
const
{
CV_Assert
(
frame
.
type
()
==
CV_8UC3
);
CV_Assert
(
!
(
frame
.
cols
%
shrinkage
)
&&
!
(
frame
.
rows
%
shrinkage
));
...
...
modules/objdetect/src/softcascade.cpp
View file @
8a3e8979
...
...
@@ -296,10 +296,10 @@ struct cv::SCascade::Fields
void
calcLevels
(
const
cv
::
Size
&
curr
,
float
mins
,
float
maxs
,
int
total
)
{
if
(
frameSize
==
curr
&&
maxs
==
maxScale
&&
mins
==
minScale
&&
total
==
scales
)
return
;
CV_Assert
(
scales
>
1
);
frameSize
=
curr
;
maxScale
=
maxs
;
minScale
=
mins
;
scales
=
total
;
CV_Assert
(
scales
>
1
);
levels
.
clear
();
float
logFactor
=
(
log
(
maxScale
)
-
log
(
minScale
))
/
(
scales
-
1
);
...
...
@@ -415,7 +415,7 @@ struct cv::SCascade::Fields
}
};
cv
::
SCascade
::
SCascade
(
const
float
mins
,
const
float
maxs
,
const
int
nsc
,
const
int
rej
)
cv
::
SCascade
::
SCascade
(
const
double
mins
,
const
double
maxs
,
const
int
nsc
,
const
int
rej
)
:
fields
(
0
),
minScale
(
mins
),
maxScale
(
maxs
),
scales
(
nsc
),
rejfactor
(
rej
)
{}
cv
::
SCascade
::~
SCascade
()
{
delete
fields
;}
...
...
@@ -462,7 +462,7 @@ void cv::SCascade::detect(cv::InputArray _image, cv::InputArray _rois, std::vect
CV_Assert
(
image
.
type
()
==
CV_8UC3
);
Fields
&
fld
=
*
fields
;
fld
.
calcLevels
(
image
.
size
(),
minScale
,
maxScale
,
scales
);
fld
.
calcLevels
(
image
.
size
(),
(
float
)
minScale
,
(
float
)
maxScale
,
(
float
)
scales
);
objects
.
clear
();
...
...
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