def get(self, binary=False, masked=False, thresh=None):
    ret = 0
    if (self.available & (thresh == None)):
        if binary:
            if self.binary_available:
                ret = self.binary_image
            else:
                self.binary_image = self.color_select(color=self.color, binary=True)
                self.binary_available = True
                ret = self.binary_image
        else:
            ret = self.image
    else:
        self.image = self.color_select(color=self.color, binary=False)
        self.available = True
        if binary:
            self.binary_image = self.color_select(color=self.color, binary=True, thresh=None)
            self.binary_available = True
            ret = self.binary_image
        else:
            ret = self.image
    if masked:
        ret = self.caller.region_of_interest(ret)
    return ret
def get(self, binary=False, masked=False, thresh=None):
    ret = 0
    if (self.available & (thresh == None)):
        if binary:
            if self.binary_available:
                ret = self.binary_image
            else:
                self.binary_image = self.color_select(color=self.color, binary=True)
                self.binary_available = True
                ret = self.binary_image
        else:
            ret = self.image
    else:
        self.image = self.color_select(color=self.color, binary=False)
        self.available = True
        if binary:
            self.binary_image = self.color_select(color=self.color, binary=True, thresh=None)
            self.binary_available = True
            ret = self.binary_image
        else:
            ret = self.image
    if masked:
        ret = self.caller.region_of_interest(ret)
    return ret