Hsv_img = cv2.cvtColor(img,cv2.COLOR_BGR2HSV)įrame_threshed = cv2.inRange(hsv_img, ORANGE_MIN, ORANGE_MAX)Ĭv2.imwrite('output2. So, I would like to add the same code implemented in new cv2 module, so users can compare the easiness and flexibility of new cv2 module. But there is change of only a single line. There are some false detections, but they are small, so you can choose biggest contour which is your lid.Īs Karl Philip told in his comment, it would be good to add new code. So change your code which converts RGB to HSV as follows: cv.CvtColor(frame, frameHSV, cv.CV_BGR2HSV) Problem 2: And also, OpenCV uses BGR format, not RGB. Please note that RGB & Hex/HTML values will differ between the PANTONE Color Finder and the PANTONE Color Bridge Guides due to different standards for print and digital use. So I took half of it, 11, and defined range for that. Problem 1 : Different applications use different scales for HSV.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |