Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you solve error (cv2.error: Unknown C++ exception from OpenCV code) ? #16

Open
AmrGendyah opened this issue Mar 18, 2022 · 0 comments

Comments

@AmrGendyah
Copy link

AmrGendyah commented Mar 18, 2022

C:\Users\AMR\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\sklearn\base.py:329: UserWarning: Trying to unpickle estimator MLPClassifier from version 0.22 when using version 1.0.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations
  warnings.warn(
  0%|          | 0/3 [00:02<?, ?it/s]
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\multiprocessing\pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\multiprocessing\pool.py", line 48, in mapstar
    return list(map(*args))
  File "C:\Users\AMR\Scrapy_projects\Arabic-OCR\Arabic-OCR\src\OCR.py", line 23, in run2
    char_imgs = segment(line, word)
  File "C:\Users\AMR\Scrapy_projects\Arabic-OCR\Arabic-OCR\src\character_segmentation.py", line 659, in segment
    valid = filter_regions(binary_word, no_dots_copy, SRL, VP, upper_base, lower_base, MTI, MFV, top_line)
  File "C:\Users\AMR\Scrapy_projects\Arabic-OCR\Arabic-OCR\src\character_segmentation.py", line 401, in filter_regions
    cc, l = cv.connectedComponents(1-(no_dots_copy[:, end_idx:start_idx+1]), connectivity=4)
cv2.error: Unknown C++ exception from OpenCV code
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\AMR\Scrapy_projects\Arabic-OCR\Arabic-OCR\src\OCR.py", line 98, in <module>
    running_time.append(run(images_path))
  File "C:\Users\AMR\Scrapy_projects\Arabic-OCR\Arabic-OCR\src\OCR.py", line 47, in run
    predicted_words = pool.map(run2, words)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\multiprocessing\pool.py", line 364, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\multiprocessing\pool.py", line 771, in get
    raise self._value
cv2.error: Unknown C++ exception from OpenCV code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant