divyang4481 / accord

Automatically exported from code.google.com/p/accord
0 stars 0 forks source link

HaarObjectDetector MinSize doesn't have an effect on results #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Use HaarObjectDetector class to detect objects in an image
2. Set the MinSize property to something larger than the default
3. Observe that rectangles returned by the ProcessFrame method can be smaller 
than the value of MinSize

What is the expected output? What do you see instead?

I would expect that only rectangles (indicating objects discovered) that are 
larger than MinSize are returned by ProcessFrame.

What version of the product are you using? On what operating system?

2.8.1 on both Windows 7 & Windows 8

Please provide any additional information below.

Changing line 448 of HaarObjectDetector.cs from: 

"if (window.Width < minSize.Width && window.Height < minSize.Height &&
                    window.Width > maxSize.Width && window.Height > maxSize.Height)"

to:

"if ((window.Width < minSize.Width || window.Height < minSize.Height))"

Solves the issue for me, although I'm not sure if this is in line with the 
original intent

Original issue reported on code.google.com by timg...@gmail.com on 25 Jan 2013 at 1:56

GoogleCodeExporter commented 9 years ago

Original comment by cesarso...@gmail.com on 23 Feb 2013 at 12:53

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r457.

Original comment by cesarso...@gmail.com on 23 Feb 2013 at 4:10