def __call__(self, minimum_y_threshold=10, num_searches=4, negative_bound=10, postive_bound=10, thickness_above=0, thickness_below=0): from gamera.core import RGBPixel # Do analysis. result = lyric_extractor_helper.extract_lyric_ccs( self, minimum_y_threshold, num_searches, negative_bound, postive_bound, thickness_above, thickness_below) # Check color input. neumeColour = RGBPixel(0, 255, 0) lyricColour = RGBPixel(255, 0, 0) # Prepare output image. returnImage = self.to_rgb() # Do highlighting. for cc in set(result[0]) - set(result[1]): returnImage.highlight(cc, lyricColour) for cc in set(result[1]): returnImage.highlight(cc, neumeColour) return returnImage
def __call__(self, minimum_y_threshold=10, num_searches=4, negative_bound=10, postive_bound=10, thickness_above=0, thickness_below=0): result = lyric_extractor_helper.extract_lyric_ccs( self, minimum_y_threshold=10, num_searches=4, negative_bound=10, postive_bound=10, thickness_above=0, thickness_below=0) for cc in set(result[0]) - set(result[1]): cc.fill_white() return self
def __call__(self, minimum_y_threshold=10, num_searches=4, negative_bound=10, postive_bound=10, thickness_above=0, thickness_below=0): from gamera.core import RGBPixel # Do analysis. result = lyric_extractor_helper.extract_lyric_ccs(self, minimum_y_threshold, num_searches, negative_bound, postive_bound, thickness_above, thickness_below) # Check color input. neumeColour = RGBPixel(0, 255, 0) lyricColour = RGBPixel(255, 0, 0) # Prepare output image. returnImage = self.to_rgb() # Do highlighting. for cc in set(result[0]) - set(result[1]): returnImage.highlight(cc, lyricColour) for cc in set(result[1]): returnImage.highlight(cc, neumeColour) return returnImage
def __call__(self, minimum_y_threshold=10, num_searches=4, negative_bound=10, postive_bound=10, thickness_above=0, thickness_below=0): result = lyric_extractor_helper.extract_lyric_ccs(self, minimum_y_threshold=10, num_searches=4, negative_bound=10, postive_bound=10, thickness_above=0, thickness_below=0) for cc in set(result[0]) - set(result[1]): cc.fill_white() return self