Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 2088

How do I get the ROI coordinates based on my prediction?

$
0
0
I am using SVM to predict my ROI, I trained SVM and now in testing phases, it's giving me output with labels in the form of 1 and 0. I am trying that if SVM predicts `1` mean image contains eyebrow, now I want that it should be rectangle around the eyebrow because the algorithm is predicting based on the eyebrow. How can I do this? h_og = cv2.HOGDescriptor() histogram = h_og.compute(photo) arr.append(histogram) arr = np.float32(arr) result = svm.predict(arr) Now the result is in the form of number or label. How I can draw a rectangle on that ROI of testing image. Positive data: image with eyebrows Negative data: images not containing eyebrow Testing data: Full face of the person

Viewing all articles
Browse latest Browse all 2088

Trending Articles