Closed GoogleCodeExporter closed 9 years ago
Strange, I wonder why they use different types in C++ if they are supposed to
be the same type. I will be providing a setSVMDetector(FloatPointer) method in
the next release, but for the moment I suppose something like this should work:
HOGDescriptor hog = new HOGDescriptor();
FloatPointer f = HOGDescriptor.getDefaultPeopleDetector();
CvMat defaultSVM = CvMat.createHeader(f.capacity(), 1, CV_32FC1);
defaultSVM.data_fl(f);
hog.setSVMDetector(defaultSVM);
Let me know if this works! thanks
Original comment by samuel.a...@gmail.com
on 26 Nov 2011 at 11:27
Hi, Samuel,
I have tried your code.
it works somehow .
CvRect found = null;
hog.detectMultiScale(image, found, 0, cvSize(8, 8), cvSize(32, 32),1.05, 2);
But hog generally returns null found. sometimes it crashes if you increase the
upper limit of the window size.
I have run the peopledetect application from cpp sample,even the same input
images don't have the same results.
Original comment by lumin.zh...@gmail.com
on 29 Nov 2011 at 5:13
Well, this works just fine here:
CvRect found = new CvRect(null);
IplImage img = cvLoadImage("gaitsetA-gait2.jpg");
hog.detectMultiScale(img, found, 0, cvSize(8,8), cvSize(32,32), 1.05, 2);
System.out.println(found);
I get (67, 7; 71, 142) on this image
http://www.cbsr.ia.ac.cn/images/gaitsetA-gait2.jpg which looks about right.
Original comment by samuel.a...@gmail.com
on 12 Dec 2011 at 7:26
Hi Samuel,
Why is "found" in "hog.detectMultiScale" a single CvRect rather than a vector
of CvRect's, as is specified in the following link?
http://opencv.itseez.com/modules/gpu/doc/object_detection.html
Is there a way to get all CvRect's that are found by "hog.detectMultiScale" in
javacv?
Original comment by zan...@gmail.com
on 8 Jan 2012 at 6:36
Fixed in latest release!
@zanetu, a CvRect object is a Pointer, which can be a native array. Just check
Pointer.capacity() and use Pointer.position() functions as shown in the
README.txt file, and please post your questions on the mailing list next time,
thank you!
Original comment by samuel.a...@gmail.com
on 8 Jan 2012 at 3:50
Thanks a lot.
Sorry for the inconvenience that was caused. I'll post on the mailing
list next time.
Original comment by zan...@gmail.com
on 8 Jan 2012 at 8:44
Hi samule can you help me?
Original comment by elmarrhe...@gmail.com
on 30 Apr 2013 at 5:20
Hi samuel what is the code for this?.. Plese gave me the source code in java...
Original comment by elmarrhe...@gmail.com
on 30 Apr 2013 at 5:26
Attachments:
hi samuel ,
can you help me ? can u mail me the source code of human detection using hog in
java ?
thankx.
Original comment by AKKI...@gmail.com
on 13 Mar 2014 at 10:01
@elmarrhex @AKKI There's some C++ sample here:
https://github.com/Itseez/opencv/blob/2.4/samples/cpp/peopledetect.cpp
Please post your questions on the mailing list if possible, thanks!
Original comment by samuel.a...@gmail.com
on 16 Mar 2014 at 1:19
Original issue reported on code.google.com by
lumin.zh...@gmail.com
on 23 Nov 2011 at 8:31