title: How to make Background black and Foreground White in OpenCV?
body: <p>I am doing Some image processing on image using OpenCV, i want to get an image that will always have black background and white foreground(text) on it,the problem is that i can invert the the image having white bg and black fg using BINARY_INV, but when user gives black bg and white fg how can i identify that image has already black bg not white so i wont have to invert it.i hope i made myself clear.
  here is a sample.
  <a href="http://s30.postimg.org/ugbxrvjrl/Untitled.png" rel="nofollow">Sample Image</a></p>
  
  <p><a href="http://s28.postimg.org/b0mieb62l/test9.jpg" rel="nofollow">New Image</a></p>