machinevision-toolbox-python icon indicating copy to clipboard operation
machinevision-toolbox-python copied to clipboard

Cannot load image on Windows machine if there are non-ASCII characters in file path

Open JeffreyScheck opened this issue 1 year ago • 0 comments

If there is a non-ASCII character in the file path then the library has issues loading images from file properly.

Potential fix is to change line 766 in machinevisiontoolbox/base/imageio.py from image = cv.imread(path.as_posix(), -1) to image = cv.imdecode(np.fromfile(path.as_posix(), dtype=np.uint8),cv.IMREAD_UNCHANGED)

I don't know if this causes other issues, but it did resolve the primary problem on a Windows machine.

JeffreyScheck avatar Sep 09 '24 05:09 JeffreyScheck