def _getDataFromImg(self, img):
     """
     Get the data from the image 
     """
     mc = None
     if (self._extractor):
         mc = self._extractor(img)
     else:
         temp = self._roi.reassign(img)
         mc = temp.meanColor()
     self.data['r'].append(mc[0])
     self.data['g'].append(mc[1])
     self.data['b'].append(mc[2])
     # NEED TO CHECK THAT THIS REALLY RGB
     self.data['i'].append(Color.getLightness(mc))
     self.data['h'].append(Color.getHueFromRGB(mc))
Esempio n. 2
0
 def _getDataFromImg(self, img):
     """
     Get the data from the image 
     """
     mc = None
     if self._extractor:
         mc = self._extractor(img)
     else:
         temp = self._roi.reassign(img)
         mc = temp.meanColor()
     self.data["r"].append(mc[0])
     self.data["g"].append(mc[1])
     self.data["b"].append(mc[2])
     # NEED TO CHECK THAT THIS REALLY RGB
     self.data["i"].append(Color.getLightness(mc))
     self.data["h"].append(Color.getHueFromRGB(mc))
 def _getBestValue(self, img):
     """
     Extract the data from the live signal
     """
     if (self._extractor):
         mc = self._extractor(img)
     else:
         temp = self._roi.reassign(img)
         mc = temp.meanColor()
     if (self._bestKey == 'r'):
         return mc[0]
     elif (self._bestKey == 'g'):
         return mc[1]
     elif (self._bestKey == 'b'):
         return mc[2]
     elif (self._bestKey == 'i'):
         return Color.getLightness(mc)
     elif (self._bestKey == 'h'):
         return Color.getHueFromRGB(mc)
Esempio n. 4
0
 def _getBestValue(self, img):
     """
     Extract the data from the live signal
     """
     if self._extractor:
         mc = self._extractor(img)
     else:
         temp = self._roi.reassign(img)
         mc = temp.meanColor()
     if self._bestKey == "r":
         return mc[0]
     elif self._bestKey == "g":
         return mc[1]
     elif self._bestKey == "b":
         return mc[2]
     elif self._bestKey == "i":
         return Color.getLightness(mc)
     elif self._bestKey == "h":
         return Color.getHueFromRGB(mc)