This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from cv import * #bad practice, its just that am bit lazy | |
def GetThresholdedImage(img): | |
#returns thresholded image of the blue bottle | |
imgHSV = CreateImage(GetSize(img), 8, 3) | |
#converts a BGR image to HSV | |
CvtColor(img, imgHSV, CV_BGR2HSV) | |
imgThreshed = CreateImage(GetSize(img), 8, 1) | |
#InRangeS takes source, lowerbound color, upperbound color and destination | |
#It converts the pixel values lying within the range to 255 and stores it in |