title: is it possible to detect text color & position with opencv histogram in python?
body: <p>I need to detect the color of the text on an image in opencv and use histogram to get the average color.</p>
  <p>is it possible to do this ?</p>
  <p>I have this code for now :</p>
  <pre><code>color = ('b','g','r')
  for i,col in enumerate(color):
      histr = cv2.calcHist([img],[i],None,[256],[0,256])
      plt.plot(histr,color = col)
      plt.xlim([0,256])
  plt.show()
  </code></pre>
  <p>the image background is transparent</p>
  <p><a href="https://i.stack.imgur.com/QN6zS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QN6zS.png" alt="îmage" /></a></p>