title: How to convert numpy matrix to OpenCV image [python]
body: <p>I have a numpy 2d matrix which represents a colored image. This matrix has some negative and floating point numbers but of course I can display the image using imshow(my_matrix).</p>
  <p><img src="https://i.stack.imgur.com/Kh811.png" alt="my_matrix_screenshot" /></p>
  <p>I need to perform histogram equalization to this colored image so I found a code here in stackoverflow using OpenCV (<a href="https://stackoverflow.com/questions/31998428/opencv-python-equalizehist-colored-image">OpenCV Python equalizeHist colored image</a>) but the problem is I am unable to convert the 2d matrix to OpenCV matrix which takes three channels for RGB.</p>
  <p>I was searching again but all I found is to convert regular 3d numpy matrix to OpenCV matrix so how can numpy 2d matrix be converted to OpenCV matrix which has 3 channels?</p>