title: Convert a 2D numpy array into a 3d numpy array representing a grayscaled image
body: <p>I am using OpenCV with numpy and Python. I have a 2D <code>uint8</code> numpy array. The values represent the local densities of over-threshold pixels from a thresholded image. I would like to convert this into a 3-dimensional RGB image with all RGB values set the same, so basically a grayscale image where the maximum value gets <code>(255,255,255)</code> and everything else is scaled accordingly. (I need RGB because this seems to be the only kind of image I can write to video with OpenCV).  What is the most efficient way to do this?</p>