Dim hog As OCVHOGDescriptor
Dim imagen As OCVMat
imagen.Initialize
Dim found As OCVMatOfRect
Dim found_filtered As OCVMatOfDouble
found.Initialize
found_filtered.Initialize
mUtils.bitmapToMat(origBmp, imagen, True)
hog.Initialize3
'''hog.SVMDetector = hog.DefaultPeopleDetector
'''hog.detectMultiScale(img, found, 0, Size(8,8), Size(32,32), 1.05, 2);
Dim size1 As OCVSize
Dim size2 As OCVSize
size1.Set(Array As Double(8.0,8.0))
size2.Set(Array As Double(30.0,30.0))
'''hog.detectMultiScale1(imagen, found, found_filtered)
Log("width: " & imagen.width & " --- " & "height: " & imagen.height)
For j = 0 To 99
hog.detectMultiScale(imagen, found, found_filtered, 0.0, size1, size2, 1.05, 2.0, True)
Log("found.size: " & found.size)
Dim r() As OCVRect = found.toArray
LogColor("r.size: " & r.Length, Colors.Magenta)
Dim crl As OCVScalar
crl.Set(Array As Double(255,0,255))
For i = 0 To r.Length - 1
Dim rect As OCVRect = r(i)
mImgProc.rectangle2(imagen, r(i).tl, r(i).br, crl)
Next
Sleep(10)
Next
Dim copy As Bitmap
copy.InitializeMutable(imagen.width, imagen.height)
mUtils.matToBitmap1(imagen, copy)
FitImageToView(copy.Rotate(90), imgOriginal)