You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, a very weird output is produced:
In line 65, I save an array called "stitched_image_cut" with cv2 as "temp_save.png", then load it again with cv2 just after (named "array"), and test that both arrays are equal, which they are.
Then, I use the "Image.from_array" function on the loaded from cv2 array "array", apply some transformations and save it as "loaded_from_cv2.png". This is the result:
Just after, I do the same thing but this time with "stitched_image_cut", which is supposed to be exactly the same array as "array". This time, this is what I get:
Can anyone tell me what in the world is going on?
The text was updated successfully, but these errors were encountered:
Looks like a bug with stride handling. Although the ultimate data is the same, one data-buffer is laid out in memory with K order, and the other as 'C' order.
Short fix
Just set the order when copying data (np.copy(img, order='C'))
I have this notebook:
For which you will need the zip file I have attached.
test.zip
Now, a very weird output is produced:
In line 65, I save an array called "stitched_image_cut" with cv2 as "temp_save.png", then load it again with cv2 just after (named "array"), and test that both arrays are equal, which they are.
Then, I use the "Image.from_array" function on the loaded from cv2 array "array", apply some transformations and save it as "loaded_from_cv2.png". This is the result:
Just after, I do the same thing but this time with "stitched_image_cut", which is supposed to be exactly the same array as "array". This time, this is what I get:
Can anyone tell me what in the world is going on?
The text was updated successfully, but these errors were encountered: