OpenCV python: Show images in channel's color and not in grayscale
<p>I read an rgb image</p>

<pre><code>img = cv2.imread('image.jpg')
</code></pre>

<p>I split channels:</p>

<pre><code>b,g,r = cv2.split(img)
</code></pre>

<p>When I'm trying to show red image I get a grayscale image. Can I see it in red?</p>

<pre><code>cv2.imshow('Red image',r)
</code></pre>

<p>Make blue and green channels of all zeroes, and merge these with your red channel.
Then you will see just the red channel displayed in red.</p>

<p>Or you could just set the b and g channels of the image to 0. </p>

<pre><code>img[:,:,0] = 0
img[:,:,1] = 0
</code></pre>

python python-2.7 opencv