Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
4834c0c8
Commit
4834c0c8
authored
Aug 13, 2014
by
Vlad Shakhuro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix win build errors
parent
95548c98
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
24 deletions
+10
-24
fcw_detect.cpp
modules/adas/tools/fcw_detect/fcw_detect.cpp
+1
-1
fcw_train.cpp
modules/adas/tools/fcw_train/fcw_train.cpp
+3
-3
xobjdetect.hpp
modules/xobjdetect/include/opencv2/xobjdetect.hpp
+1
-1
acffeature.cpp
modules/xobjdetect/src/acffeature.cpp
+2
-2
icfdetector.cpp
modules/xobjdetect/src/icfdetector.cpp
+3
-3
waldboost.cpp
modules/xobjdetect/src/waldboost.cpp
+0
-14
No files found.
modules/adas/tools/fcw_detect/fcw_detect.cpp
View file @
4834c0c8
...
@@ -86,7 +86,7 @@ int main(int argc, char *argv[])
...
@@ -86,7 +86,7 @@ int main(int argc, char *argv[])
fs
.
release
();
fs
.
release
();
vector
<
Rect
>
objects
;
vector
<
Rect
>
objects
;
Mat
img
=
imread
(
image_path
);
Mat
img
=
imread
(
image_path
);
detector
.
detect
(
img
,
objects
,
1.1
,
Size
(
40
,
40
),
detector
.
detect
(
img
,
objects
,
1.1
f
,
Size
(
40
,
40
),
Size
(
300
,
300
),
threshold
);
Size
(
300
,
300
),
threshold
);
imwrite
(
out_image_path
,
visualize
(
img
,
objects
));
imwrite
(
out_image_path
,
visualize
(
img
,
objects
));
}
}
modules/adas/tools/fcw_train/fcw_train.cpp
View file @
4834c0c8
...
@@ -73,9 +73,9 @@ int main(int argc, char *argv[])
...
@@ -73,9 +73,9 @@ int main(int argc, char *argv[])
string
model_filename
=
parser
.
get
<
string
>
(
"model_filename"
);
string
model_filename
=
parser
.
get
<
string
>
(
"model_filename"
);
ICFDetectorParams
params
;
ICFDetectorParams
params
;
params
.
feature_count
=
parser
.
get
<
size_t
>
(
"feature_count"
);
params
.
feature_count
=
int
(
parser
.
get
<
size_t
>
(
"feature_count"
)
);
params
.
weak_count
=
parser
.
get
<
size_t
>
(
"weak_count"
);
params
.
weak_count
=
int
(
parser
.
get
<
size_t
>
(
"weak_count"
)
);
params
.
bg_per_image
=
parser
.
get
<
size_t
>
(
"bg_per_image"
);
params
.
bg_per_image
=
int
(
parser
.
get
<
size_t
>
(
"bg_per_image"
)
);
string
model_size
=
parser
.
get
<
string
>
(
"model_size"
);
string
model_size
=
parser
.
get
<
string
>
(
"model_size"
);
if
(
!
read_model_size
(
model_size
.
c_str
(),
&
params
.
model_n_rows
,
if
(
!
read_model_size
(
model_size
.
c_str
(),
&
params
.
model_n_rows
,
...
...
modules/xobjdetect/include/opencv2/xobjdetect.hpp
View file @
4834c0c8
...
@@ -194,7 +194,7 @@ public:
...
@@ -194,7 +194,7 @@ public:
maxSize — max size of objects in pixels
maxSize — max size of objects in pixels
*/
*/
void
detect
(
const
Mat
&
image
,
std
::
vector
<
Rect
>&
objects
,
void
detect
(
const
Mat
&
image
,
std
::
vector
<
Rect
>&
objects
,
double
scaleFactor
,
Size
minSize
,
Size
maxSize
,
float
threshold
);
float
scaleFactor
,
Size
minSize
,
Size
maxSize
,
float
threshold
);
/* Write detector to FileStorage */
/* Write detector to FileStorage */
void
write
(
FileStorage
&
fs
)
const
;
void
write
(
FileStorage
&
fs
)
const
;
...
...
modules/xobjdetect/src/acffeature.cpp
View file @
4834c0c8
...
@@ -222,7 +222,7 @@ Ptr<FeatureEvaluator> createFeatureEvaluator(
...
@@ -222,7 +222,7 @@ Ptr<FeatureEvaluator> createFeatureEvaluator(
else
if
(
type
==
"icf"
)
else
if
(
type
==
"icf"
)
evaluator
=
new
ICFFeatureEvaluatorImpl
(
features
);
evaluator
=
new
ICFFeatureEvaluatorImpl
(
features
);
else
else
CV_
Assert
(
false
);
CV_
Error
(
CV_StsBadArg
,
"type value is either acf or icf"
);
return
Ptr
<
FeatureEvaluator
>
(
evaluator
);
return
Ptr
<
FeatureEvaluator
>
(
evaluator
);
}
}
...
@@ -264,7 +264,7 @@ vector<vector<int> > generateFeatures(Size window_size, const std::string& type,
...
@@ -264,7 +264,7 @@ vector<vector<int> > generateFeatures(Size window_size, const std::string& type,
}
}
}
}
else
else
CV_
Assert
(
false
);
CV_
Error
(
CV_StsBadArg
,
"type value is either acf or icf"
);
return
features
;
return
features
;
}
}
...
...
modules/xobjdetect/src/icfdetector.cpp
View file @
4834c0c8
...
@@ -191,7 +191,7 @@ void ICFDetector::read(const FileNode& node)
...
@@ -191,7 +191,7 @@ void ICFDetector::read(const FileNode& node)
}
}
void
ICFDetector
::
detect
(
const
Mat
&
img
,
vector
<
Rect
>&
objects
,
void
ICFDetector
::
detect
(
const
Mat
&
img
,
vector
<
Rect
>&
objects
,
double
scaleFactor
,
Size
minSize
,
Size
maxSize
,
float
threshold
)
float
scaleFactor
,
Size
minSize
,
Size
maxSize
,
float
threshold
)
{
{
float
scale_from
=
min
(
model_n_cols_
/
(
float
)
maxSize
.
width
,
float
scale_from
=
min
(
model_n_cols_
/
(
float
)
maxSize
.
width
,
model_n_rows_
/
(
float
)
maxSize
.
height
);
model_n_rows_
/
(
float
)
maxSize
.
height
);
...
@@ -205,9 +205,9 @@ void ICFDetector::detect(const Mat& img, vector<Rect>& objects,
...
@@ -205,9 +205,9 @@ void ICFDetector::detect(const Mat& img, vector<Rect>& objects,
for
(
float
scale
=
scale_from
;
scale
<
scale_to
+
0.001
;
scale
*=
scaleFactor
)
for
(
float
scale
=
scale_from
;
scale
<
scale_to
+
0.001
;
scale
*=
scaleFactor
)
{
{
cout
<<
"scale "
<<
scale
<<
endl
;
cout
<<
"scale "
<<
scale
<<
endl
;
int
new_width
=
i
mg
.
cols
*
scale
;
int
new_width
=
i
nt
(
img
.
cols
*
scale
)
;
new_width
-=
new_width
%
4
;
new_width
-=
new_width
%
4
;
int
new_height
=
i
mg
.
rows
*
scale
;
int
new_height
=
i
nt
(
img
.
rows
*
scale
)
;
new_height
-=
new_height
%
4
;
new_height
-=
new_height
%
4
;
resize
(
img
,
rescaled_image
,
Size
(
new_width
,
new_height
));
resize
(
img
,
rescaled_image
,
Size
(
new_width
,
new_height
));
...
...
modules/xobjdetect/src/waldboost.cpp
View file @
4834c0c8
...
@@ -92,20 +92,6 @@ static int count(const Mat_<int> &m, int elem)
...
@@ -92,20 +92,6 @@ static int count(const Mat_<int> &m, int elem)
return
res
;
return
res
;
}
}
void
write
(
FileStorage
&
fs
,
String
&
,
const
WaldBoost
&
waldboost
)
{
waldboost
.
write
(
fs
);
}
void
read
(
const
FileNode
&
node
,
WaldBoost
&
w
,
const
WaldBoost
&
default_value
)
{
if
(
node
.
empty
()
)
w
=
default_value
;
else
w
.
read
(
node
);
}
void
WaldBoostImpl
::
read
(
const
FileNode
&
node
)
void
WaldBoostImpl
::
read
(
const
FileNode
&
node
)
{
{
FileNode
params
=
node
[
"waldboost_params"
];
FileNode
params
=
node
[
"waldboost_params"
];
...
...
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