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
665bf430
Commit
665bf430
authored
Nov 08, 2012
by
marina.kolpakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix warnings under win
parent
8a3e8979
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
softcascade.cpp
modules/objdetect/src/softcascade.cpp
+6
-6
No files found.
modules/objdetect/src/softcascade.cpp
View file @
665bf430
...
@@ -134,7 +134,7 @@ struct Level
...
@@ -134,7 +134,7 @@ struct Level
{
{
scaling
[
0
]
=
((
relScale
>=
1.
f
)
?
1.
f
:
(
0.89
f
*
pow
(
relScale
,
1.099
f
/
log
(
2.
f
))))
/
(
relScale
*
relScale
);
scaling
[
0
]
=
((
relScale
>=
1.
f
)
?
1.
f
:
(
0.89
f
*
pow
(
relScale
,
1.099
f
/
log
(
2.
f
))))
/
(
relScale
*
relScale
);
scaling
[
1
]
=
1.
f
;
scaling
[
1
]
=
1.
f
;
scaleshift
=
relScale
*
(
1
<<
16
);
scaleshift
=
static_cast
<
int
>
(
relScale
*
(
1
<<
16
)
);
}
}
void
addDetection
(
const
int
x
,
const
int
y
,
float
confidence
,
std
::
vector
<
Detection
>&
detections
)
const
void
addDetection
(
const
int
x
,
const
int
y
,
float
confidence
,
std
::
vector
<
Detection
>&
detections
)
const
...
@@ -154,7 +154,7 @@ struct Level
...
@@ -154,7 +154,7 @@ struct Level
scaledRect
.
width
=
SSHIFT
(
scaleshift
*
scaledRect
.
width
);
scaledRect
.
width
=
SSHIFT
(
scaleshift
*
scaledRect
.
width
);
scaledRect
.
height
=
SSHIFT
(
scaleshift
*
scaledRect
.
height
);
scaledRect
.
height
=
SSHIFT
(
scaleshift
*
scaledRect
.
height
);
#undef SSHIFT
#undef SSHIFT
float
sarea
=
(
scaledRect
.
width
-
scaledRect
.
x
)
*
(
scaledRect
.
height
-
scaledRect
.
y
);
float
sarea
=
static_cast
<
float
>
((
scaledRect
.
width
-
scaledRect
.
x
)
*
(
scaledRect
.
height
-
scaledRect
.
y
)
);
// compensation areas rounding
// compensation areas rounding
return
(
sarea
==
0.0
f
)
?
threshold
:
(
threshold
*
scaling
[
idx
]
*
sarea
);
return
(
sarea
==
0.0
f
)
?
threshold
:
(
threshold
*
scaling
[
idx
]
*
sarea
);
...
@@ -197,7 +197,7 @@ struct ChannelStorage
...
@@ -197,7 +197,7 @@ struct ChannelStorage
int
c
=
ptr
[
area
.
height
*
step
+
area
.
width
];
int
c
=
ptr
[
area
.
height
*
step
+
area
.
width
];
int
d
=
ptr
[
area
.
height
*
step
+
area
.
x
];
int
d
=
ptr
[
area
.
height
*
step
+
area
.
x
];
return
(
a
-
b
+
c
-
d
);
return
static_cast
<
float
>
(
a
-
b
+
c
-
d
);
}
}
};
};
...
@@ -307,8 +307,8 @@ struct cv::SCascade::Fields
...
@@ -307,8 +307,8 @@ struct cv::SCascade::Fields
float
scale
=
minScale
;
float
scale
=
minScale
;
for
(
int
sc
=
0
;
sc
<
scales
;
++
sc
)
for
(
int
sc
=
0
;
sc
<
scales
;
++
sc
)
{
{
int
width
=
st
d
::
max
(
0.0
f
,
frameSize
.
width
-
(
origObjWidth
*
scale
));
int
width
=
st
atic_cast
<
int
>
(
std
::
max
(
0.0
f
,
frameSize
.
width
-
(
origObjWidth
*
scale
)
));
int
height
=
st
d
::
max
(
0.0
f
,
frameSize
.
height
-
(
origObjHeight
*
scale
));
int
height
=
st
atic_cast
<
int
>
(
std
::
max
(
0.0
f
,
frameSize
.
height
-
(
origObjHeight
*
scale
)
));
float
logScale
=
log
(
scale
);
float
logScale
=
log
(
scale
);
octIt_t
fit
=
fitOctave
(
logScale
);
octIt_t
fit
=
fitOctave
(
logScale
);
...
@@ -462,7 +462,7 @@ void cv::SCascade::detect(cv::InputArray _image, cv::InputArray _rois, std::vect
...
@@ -462,7 +462,7 @@ void cv::SCascade::detect(cv::InputArray _image, cv::InputArray _rois, std::vect
CV_Assert
(
image
.
type
()
==
CV_8UC3
);
CV_Assert
(
image
.
type
()
==
CV_8UC3
);
Fields
&
fld
=
*
fields
;
Fields
&
fld
=
*
fields
;
fld
.
calcLevels
(
image
.
size
(),(
float
)
minScale
,
(
float
)
maxScale
,
(
float
)
scales
);
fld
.
calcLevels
(
image
.
size
(),(
float
)
minScale
,
(
float
)
maxScale
,
scales
);
objects
.
clear
();
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