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
53b0df87
Commit
53b0df87
authored
Jan 31, 2013
by
cuda-geek
Committed by
OpenCV Buildbot
Jan 31, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #385 from etalanin:bug2607
parents
bf53ebd5
50c2f87a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletion
+26
-1
hog.cpp
modules/objdetect/src/hog.cpp
+1
-1
test_cascadeandhog.cpp
modules/objdetect/test/test_cascadeandhog.cpp
+25
-0
No files found.
modules/objdetect/src/hog.cpp
View file @
53b0df87
...
...
@@ -138,7 +138,7 @@ void HOGDescriptor::write(FileStorage& fs, const String& objName) const
<<
"gammaCorrection"
<<
gammaCorrection
<<
"nlevels"
<<
nlevels
;
if
(
!
svmDetector
.
empty
()
)
fs
<<
"SVMDetector"
<<
"[:"
<<
svmDetector
<<
"]"
;
fs
<<
"SVMDetector"
<<
svmDetector
;
fs
<<
"}"
;
}
...
...
modules/objdetect/test/test_cascadeandhog.cpp
View file @
53b0df87
...
...
@@ -461,5 +461,30 @@ int CV_HOGDetectorTest::detectMultiScale( int di, const Mat& img,
return
cvtest
::
TS
::
OK
;
}
//----------------------------------------------- HOGDetectorReadWriteTest -----------------------------------
TEST
(
Objdetect_HOGDetectorReadWrite
,
regression
)
{
// Inspired by bug #2607
Mat
img
;
img
=
imread
(
cvtest
::
TS
::
ptr
()
->
get_data_path
()
+
"/cascadeandhog/images/karen-and-rob.png"
);
ASSERT_FALSE
(
img
.
empty
());
HOGDescriptor
hog
;
hog
.
setSVMDetector
(
HOGDescriptor
::
getDefaultPeopleDetector
());
string
tempfilename
=
cv
::
tempfile
(
".xml"
);
FileStorage
fs
(
tempfilename
,
FileStorage
::
WRITE
);
hog
.
write
(
fs
,
"myHOG"
);
fs
.
open
(
tempfilename
,
FileStorage
::
READ
);
remove
(
tempfilename
.
c_str
());
FileNode
n
=
fs
[
"opencv_storage"
][
"myHOG"
];
ASSERT_NO_THROW
(
hog
.
read
(
n
));
}
TEST
(
Objdetect_CascadeDetector
,
regression
)
{
CV_CascadeDetectorTest
test
;
test
.
safe_run
();
}
TEST
(
Objdetect_HOGDetector
,
regression
)
{
CV_HOGDetectorTest
test
;
test
.
safe_run
();
}
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