简体   繁体   中英

Emgucv People Detection

I'm having problems with my person detection code. I'm using the Emgucv library, and it ends up picking up objects that have nothing to do with people ... Is something missing? How can I make it better?

                Rectangle[] regions;
                int indexx = 0;
                using (HOGDescriptor des = new HOGDescriptor())
                {
                    des.SetSVMDetector(HOGDescriptor.GetDefaultPeopleDetector());
                    regions = des.DetectMultiScale(currentFrame.Copy());
                }

                foreach (Rectangle rect in regions)
                {
                    indexx++;
                    currentFrame.Draw(rect, new Bgr(Color.Red), 2);
                }

                if (regions.Count() > 0)
                    currentFrame.Save("pedestre\\pedestre0" + indexx + ".jpg");

The people detection results may vary, depending on your testing/application environment. Your best bet may be training the algorithm to work best on your specific conditions.

If you want the algorithm to work on very specific conditions, like a specific, closed and controlled environment, your best bet is training your algorithm to work on this environment.

If you want your detection to work on more varied conditions, you may have to search for articles about people detection or image filtering on the conditions you will meet on your application real world uses. You can try to do some image pre-processing before you use the classifier - sometimes a simple histogram normalizatior, for example, improves your results enough to be good enough for your application.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM