imganalyser.py
def change_colorspace(self, new_colorspace):
        """Change the colorspace from RGB."""
        image = self.image

        old_colorspace = self.colorspace
        possible_spaces = ['HSV', 'LUV', 'HLS', 'YUV', 'YCrCb']
        if (new_colorspace in possible_spaces and
                new_colorspace != old_colorspace):
            converter = getattr(cv2, "COLOR_" + old_colorspace + "2"
                                + new_colorspace)
            self.colorspace = new_colorspace
            self.image = cv2.cvtColor(image, converter)
Change the colorspace from RGB.
Change the colorspace from RGB.
Change the colorspace from RGB .
def change_colorspace(self, new_colorspace):
        image = self.image
        old_colorspace = self.colorspace
        possible_spaces = ['HSV', 'LUV', 'HLS', 'YUV', 'YCrCb']
        if (new_colorspace in possible_spaces and
                new_colorspace != old_colorspace):
            converter = getattr(cv2, "COLOR_" + old_colorspace + "2"
                                + new_colorspace)
            self.colorspace = new_colorspace
            self.image = cv2.cvtColor(image, converter)
def change_colorspace ( self , new_colorspace ) : image = self . image old_colorspace = self . colorspace possible_spaces = [ 'HSV' , 'LUV' , 'HLS' , 'YUV' , 'YCrCb' ] if ( new_colorspace in possible_spaces and new_colorspace != old_colorspace ) : converter = getattr ( cv2 , "COLOR_" + old_colorspace + "2" + new_colorspace ) self . colorspace = new_colorspace self . image = cv2 . cvtColor ( image , converter )
Change the colorspace from RGB.
Change the colorspace from RGB .
"""Change the colorspace from RGB."""
self
new_colorspace