Pedestrian detection
The following livescript uses MATLAB functionalities to simulate the pedestrian detection application. The pedestrian detection algorithm is implemented using Histogram of Oriented Gradients (HOG) and a linear Support Vector Machine (SVM).
Create a People Detector object with general Classification Model.
detector = vision.PeopleDetector('ClassificationModel', 'UprightPeople_96x48', 'ClassificationThreshold', 2.5);
Read the input image which can be RGB or grayscale.
If the input image if RGB transform if to grayscale.
Run the pedestrian detector on the grayscale image.
bboxes = step(detector, inImgUMatGray.getData());