Skip to content

OpenCV error while using the handwrite.exe on windows 10 #81

@tusharsoni-dev

Description

@tusharsoni-dev

Hi,

Thanks for this wonderful tool.
I am trying to use it on Windows Home 10.
I have installed fontforge in usual program files (x86) folder by download the installer.
Potrace is downloaded as zip and added the path to it in PATH env var.
Then from cmd I am running handwrite --directory "temp" "inputscan.jpg" "outputfont/"
In temp dir it creates all the folders per char.png (folder 59 is empty)
Then program throws error in sheettopng.py > cv2.inwrite() as below:

File "C:\Users\tushar\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\tushar\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\tushar\AppData\Local\Programs\Python\Python39\Scripts\handwrite.exe\__main__.py", line 7, in <module> File "C:\Users\tushar\AppData\Local\Programs\Python\Python39\lib\site-packages\handwrite\cli.py", line 56, in main converters( File "C:\Users\tushar\AppData\Local\Programs\Python\Python39\lib\site-packages\handwrite\cli.py", line 34, in converters run(sheet, output_directory, directory, config, metadata) File "C:\Users\tushar\AppData\Local\Programs\Python\Python39\lib\site-packages\handwrite\cli.py", line 12, in run SHEETtoPNG().convert(sheet, characters_dir, config) File "C:\Users\tushar\AppData\Local\Programs\Python\Python39\lib\site-packages\handwrite\sheettopng.py", line 47, in convert self.save_images( File "C:\Users\tushar\AppData\Local\Programs\Python\Python39\lib\site-packages\handwrite\sheettopng.py", line 158, in save_images cv2.imwrite( cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp:801: error: (-215:Assertion failed) !_img.empty() in function 'cv::imwrite'

I am new to python, please let me know if I am missing anything.

Thanks,
Tushar

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions