dev_nut
dev_nut

Reputation: 2542

Object detection using a fish eye lens

I'm trying to use the hog detector in openCV, to detect 3 types of object from a video feed through a fish eye. The types are:

  1. People
  2. Books (when held by some person)
  3. Chairs

The snapshot of the video I have looks like this image from this website - enter image description here:

I setup the hog classifier using the default people detector and tried do first detect the people. I noticed when the people were of the size that you would expect from a non-fish eye lens (something you would get with a standard 35mm lens), they would get detected. If not the people would not get detected. This seemed logical as the classifier would expect people to be a standard size.

I was wondering how I could modify the classifier to detect people thorough a fish eye lens. The options I see are these:

  1. Undistort the fish eye effect and run the classifier - I do not like to do this, because currently, I'm not in a position to calibrate the camera and get the distortion coefficients
  2. Distort people images from a people image data set to around the distortion I would get through my video and re-train the classifier - I think this would work, but would like to understand would this not work as I think it work.

My question is:

  1. What would be a valid approach for this problem? Will #2 of my options work for all 3 types of objects (people, books and chairs).
  2. What is good classifier that can be trained to identify the 3 types of objects (cascade or hog or anything else - please suggest a library as well)? Will my #2 method of distorting and training with positive and negative examples be a good solution?

Upvotes: 1

Views: 2037

Answers (1)

Mike
Mike

Reputation: 56

Retraining the HOG cascade to the performance level of the cascade included with OpenCV would be a pretty involved process. You would also have to simulate the distortion of your specific lens to modify the training data.

For the quickest solution I would recommend your first option of distorting the image. If you are willing to put in the time and resources to retrain the classifier (which you may have to do depending on how you are detecting chairs and books) then there are some publicly available pedestrian datasets that will be useful.

1) http://www.vision.caltech.edu/Image_Datasets/CaltechPedestrians/

2) http://pascal.inrialpes.fr/data/human/

Its unlikely that you'll be able to find a chair cascade due to the variability in chair design. I would recommend you train your own cascade on the specific chairs you intend to detect. I don't know of any existing cascade for books and a quick google search didn't yield any promising results. A good resource for data if you intend on training your own cascade for books is ImageNet.

Upvotes: 2

Related Questions