From the course: Computer Vision on the Raspberry Pi 4

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Object detection with a Raspberry Pi camera

Object detection with a Raspberry Pi camera

From the course: Computer Vision on the Raspberry Pi 4

Object detection with a Raspberry Pi camera

- [Instructor] This video demonstrates how the Raspberry Pi can be programmed to detect objects in camera images. Before I start coding, I'd like to review how object detection works. The application looks at one window of an image at a time, each window is split into the cells, and we use a HOGDescriptor to compute the histogram of oriented gradients for each cell. These histograms are concatenated to form the windows feature descriptor. Next, a support vector machine or SVM checks if the windows feature descriptor matches that of the toy car. If there's a match, the object is detected and the application draws a rectangle around the window. To obtain the HOGDescriptor, all set hog equal to the get descriptor function. This creates the same HOGDescriptor that we used earlier for object detection. To analyze images, the detector needs a trained SVM. In an earlier video, we saved the SVM to svm.xml. So I'll set svm equal…

Contents