Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

Object Localization Using HoG (sklearn)

$
0
0
I am trying to localize number plate in an image. I am using HoG to extract the features and Linear SVM for the training purposes. I am using the sklearn library for the above purpose, however I can not find any function to detect or localize the number plate. Is there anyway I can do it ? Below is the code for prediction, etc: import cv2 from sklearn.externals import joblib from skimage.feature import hog import numpy as np clf = joblib.load('trained.pkl') img = cv2.imread('/home/taseer/Python/Image_Processing/Project/test/2.jpg',0) features = hog(img,orientations=9, pixels_per_cell=(14, 14), cells_per_block=(1, 1), visualise=False) pred = clf.predict(np.array(features)) print pred cv2.imshow("img", img) cv2.waitKey(0) cv2.destroyAllWindows()

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>