We are now ready to apply all the concepts we learned so far by creating a car detection script that scans an image and draws rectangles around cars. Let's create a new Python script, detect_car_bow_svm_sliding_window.py, by copying our previous script, detect_car_bow_svm.py. (We covered the implementation of detect_car_bow_svm.py earlier, in the Detecting cars section.) Much of the new script's implementation will remain unchanged because we still want to train a BoW descriptor extractor and an SVM in almost the same way as we did previously. However, after the training is complete, we will process the test images in a new way. Rather than classifying each image in its entirety, we will decompose each image into ...
Detecting a car in a scene
Get Learning OpenCV 4 Computer Vision with Python 3 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.