I got the following:
- redIdx: a 2x1 matrix with values (289485, 289486).
- image: 366x791x3 uint8 matrix (an image).
- image2: zeros matrix with the same sape as image.
In MATLAB, if I do image2(redIdx) it returns a 2x1 matrix with values (0,0) and if I do image(redIdx) it returns a 2x1 matrix with values (94, 83).
But in Python, if I do image2[redIdx] or image[redIdx], it returns the next error: index 2879485 is out of bounds for axis 0 with size 366.
How can I get the same result as MATLAB?