Error with For loop and matrix multiplication in PYTHON #21389
-
Above is the Error. The code employs if conditions and for loop to scans unequal images from two cameras and checks for matches. ’if_same’ : This is the main function which scans and checks. ‘mse’ calls another function which calculates squared error.
I have actually tried printing the i,j,w,h to see if there is the problem.
The code should slice matrixes of dimensions 10x13 from both images. But I get 10x10 and 10x11. If the slice is [0:10][0:13] and [1:11][1:14], both will return [10x13]. Correct me, if I’m wrong |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
The shape of the image gets inversed when read as an array. I later found that out by printing the shapes of images and image arrays.
|
Beta Was this translation helpful? Give feedback.
-
Thanks so much for sharing your solution with the community. Is your problem fully resolved now? |
Beta Was this translation helpful? Give feedback.
-
Yeah.It’s solved fully. Thanks for responding Mark. –Ram K |
Beta Was this translation helpful? Give feedback.
The shape of the image gets inversed when read as an array.
I later found that out by printing the shapes of images and image arrays.