Using OpenCV, input image(Blue background image Christmas tree inside) was read.
Below image is input image.
the output of read image is changed from a blue background into the red.
when I viewed the value of the variable of 'image' in spyder. Here 3 is RGB channel
When double-clicked the value it shows with Axis =0. what I understood is BGR value
Axis =1 here to0 BGR
Axis =2. I am stuck here. I would not understand how triplet value of(pixel) RBG value is converted into a single value of each pixel and how this pixel(0,0)=254 represents red color here.
I understood for black and white values varies from 0 to 255. But here how axis =2 (pixel(0,0)=254) represents Red color(guessing from output of the read image).





You are reading image using OpenCV where it takes BGR color channel matrix. However you are displaying it using some other library which take color channel matrix as RGB. Convert your image to RGB using
cv2.cvtColor(image, cv2.BGR2RGB)and it will then display it.