Question: Pick any colored image you like, (a) split the image color into RGB color space and display only blue channel, green channel, and the red
- Pick any colored image you like, (a) split the image color into RGB color space and display only blue channel, green channel, and the red channel; then (b) merge three channels to compare with the original image; and (c) keep only the red and blue channels and set the value of green channel pixels to 0. (d) What happens if you merge ( (r,r,r) )? What image does CV2 generate?
Hint: To display the blue channel only, you need to do the following:
b_img = image.copy() # image is the original color image
b_img[ : , : , 1] = 0 # set green channel to 0
b_img[ : , : , 2] = 0 # set red channel to 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
