Udayraj123 / OMRChecker

Evaluate OMR sheets fast and accurately using a scanner 🖨 or your phone 🤳.
MIT License
752 stars 311 forks source link

[Bug] TIFF images not processed anymore ? #150

Closed daviddeleeuw closed 1 year ago

daviddeleeuw commented 1 year ago

Hi Udaj,

We played around with OMRCHECKER februari 2022. We could read jpg and tif files without problem.

I downloaded an updated version. Now tif files are ignored.

      INFO     No valid images or sub-folders found in inputs\McuSample.

I can't find anything in the code to allow or ignore tif files.

What am I missing ?

Thanks David de Leeuw

daviddeleeuw commented 1 year ago

Hi Udaj

Found it. In the "entry.py" module the var "exts" determines the types of images recognized. It only showed jpg and png files.

I replaced exts = (".[pP][nN][gG]", ".[jJ][pP][gG]", ".[jJ][pP][eE][gG]") with exts = (".[pP][nN][gG]", ".[jJ][pP][gG]", ".[jJ][pP][eE][gG]",".[tT][iI][fF]",".[tT][iI][fF][fF]") and all is fine.

Of course there are more image files that may be used. ("bmp" for example). Whoever needs it, check OpenCV documentation, and test according to your needs.

Thanks

David