how to remove background image and get fore image

后端 未结 6 1077
耶瑟儿~
耶瑟儿~ 2020-12-14 03:41

there are two images

alt text http://bbs.shoucangshidai.com/attachments/month_1001/1001211535bd7a644e95187acd.jpg alt text http://bbs.shoucangshidai.com/attachments/

6条回答
  •  囚心锁ツ
    2020-12-14 04:19

    Background vs Foreground detection is very subjective. The application scenario defines background or foreground. However in the application you detail, I guess you are implicitly saying that the person is the foreground. Using the above assumption, what you seek is a person detection algorithm. A possible solution is:

    1. Run a haar feature detector+ boosted cascade of weak classifiers (see the opencv wiki for details)
    2. Compute inter-frame motion (differences)
    3. If there is a +ve face detection for a frame, cluster motion pixels around the face (kNN algorithm)

    voila... you should have a simple person detector.

提交回复
热议问题