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

清晰增强图片报错:dnn_superres.cpp:263: error: (-5:Bad argument) Not supported image type: CV_8UC4 in function #7

Open
goulin2k opened this issue Dec 25, 2024 · 1 comment

Comments

@goulin2k
Copy link

在主界面选择清晰增强出错:Traceback (most recent call last):
File "C:\Users\goning\workspace\Doc-Image-Tool-main\custom\listWidgets.py", line 78, in add_used_function
self.mainwindow.update_image()
File "C:\Users\goning\workspace\Doc-Image-Tool-main\main.py", line 64, in update_image
img = self.process_image()
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\goning\workspace\Doc-Image-Tool-main\main.py", line 78, in process_image
img = self.useListWidget.item(i)(img)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\goning\workspace\Doc-Image-Tool-main\custom\listWidgetItems.py", line 77, in call
result = doc_sharpening_pred(img)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\goning\workspace\Doc-Image-Tool-main\function_method\DocSharpening.py", line 26, in doc_sharpening_pred
result = doc_sharpening_model.upsample(image)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cv2.error: OpenCV(4.10.0) D:\a\opencv-python\opencv-python\opencv_contrib\modules\dnn_superres\src\dnn_superres.cpp:263: error: (-5:Bad argument) Not supported image type: CV_8UC4 in function 'cv::dnn_superres::DnnSuperResImpl::preprocess_YCrCb'

@goulin2k
Copy link
Author

运行环境:Macbook Pro M1, windows11,conda虚拟环境如下:
contourpy 1.3.1 pypi_0 pypi
imageio 2.36.1 pypi_0 pypi
jinja2 3.1.5 pypi_0 pypi
matplotlib 3.10.0 pypi_0 pypi
mpmath 1.3.0 pypi_0 pypi
numpy 2.2.1 pypi_0 pypi
opencv-contrib-python 4.10.0.84 pypi_0 pypi
pip 24.2 py312haa95532_0
pyqt5 5.15.11 pypi_0 pypi
pyqt5-qt5 5.15.2 pypi_0 pypi
pyqt5-sip 12.16.1 pypi_0 pypi
python 3.12.0 h1d929f7_0
scikit-image 0.25.0 pypi_0 pypi
scipy 1.14.1 pypi_0 pypi
torch 2.5.1 pypi_0 pypi
torchvision 0.20.1 pypi_0 pypi

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