colorMax = HSBColor(histo_tool.get_hue_max(), histo_tool.get_saturation_max(), histo_tool.get_brigthness_max()) if options_verbose: print("### Maximum : ") print(colorMax) print "Temperature : %2f" % colorMax.temperature() print "Brightness : %2f" % colorMax.brightness() #Select the HSBColor to use between colorAverage or colorMax colorToUse = colorMax ##FaceDetect detector = ImageElementDetect(imagePath, False) # print("Nb faces : " + detector.countFaces()) # hasFaces = detector.hasFaces() # hasFaces = False # Get mood emotion_levels = ["HAPPY", "JAZZ", "EMO", "NEUTRAL", "SAD", "FACES"] ### Hot == temperature 1 ### Cold == temperature 0 ### Darkness == brightness 0.0 ### Light == brightness, what is light? baby don't hurt me #### Each analyse add 1 unit to the total tmp_type_of_analyse = 2 # temperature, brightness #### How long should be the song?
__author__ = 'stevevisinand' from imageElementDetect import ImageElementDetect if __name__ == '__main__': detector = ImageElementDetect('../images/watson.jpg', True) print("Nb faces : " + str(detector.countFaces()))