NoahGWood / OpenEFT

Open-source EFT Fingerprint Software
Other
69 stars 16 forks source link

Script hangs on debug call for cv2.waitKey(0) #6

Closed rtadams89 closed 1 year ago

rtadams89 commented 1 year ago

I am attempting to run this on a fresh install of Ubuntu 22.04 LTS. The script runs and gets to the "Sectioning Fingerprints" step. Multiple windows then open showing the individual fingerprint boxes. The script remains on "Sectioning Fingerprints..." and does not progress. The output eft file is never written.

It looks like it gets to line 86 in core.py, jumps to the "get_fp" function, but never returns from that. Putting some additional logging statements in that function, I see it seems to process the images as expected, but gets hung up on the "cv2.waitKey(0)" command (and no, pressing a key does not seem to work).

rtadams89 commented 1 year ago

As an aside, it looks like debug is hardcoded to "true" in the base python script. Would it make more sense to default this to "false" but allow debug mode to be set as via an additional argument at run time? Would you be open to me rewriting eft.py to accept accept up to 3 arguments: input file, output file, & debug mode?

kmenter commented 1 year ago

So other users can see. If you change line 16 in eft.py to debug=False, the script works and continues processing.

I'm in favor of adding an optional parameter (defaulting to debug=false) to set debug at runtime.

rtadams89 commented 1 year ago

I spawned the debug mode argument off into a new issue to address independently. For this issue, I propose simply removing lines 71-73 in core.py.

NoahGWood commented 1 year ago

We're going full GUI at this point, this issue is resolved in the latest update