Nothing Special   »   [go: up one dir, main page]

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

AttributeError: module 'cv2.ximgproc' has no attribute 'thinning' #26502

Open
2 of 4 tasks
TC9905 opened this issue Nov 21, 2024 · 0 comments
Open
2 of 4 tasks

AttributeError: module 'cv2.ximgproc' has no attribute 'thinning' #26502

TC9905 opened this issue Nov 21, 2024 · 0 comments
Labels

Comments

@TC9905
Copy link
TC9905 commented Nov 21, 2024

System Information

Ubuntu 11.4.0-1ubuntu1~22.04
opencv-contrib-python 4.10.0.84
opencv-python-headless 4.10.0.84
python 3.8.20

Detailed description

python 111.py
Traceback (most recent call last):
File "111.py", line 11, in
thinned = cv2.ximgproc.thinning(thresh, cv2.ximgproc.THINNING_ZHANGSUEN)
AttributeError: module 'cv2.ximgproc' has no attribute 'thinning'

Steps to reproduce

import cv2
import numpy as np

img = cv2.imread('/home/mambauser/arrow-detection/ReactionDataExtractor/testimage/1.png', 0)

ret, thresh = cv2.threshold(img, 127, 255, cv2.THRESH_BINARY)

thinned = cv2.ximgproc.thinning(thresh, cv2.ximgproc.THINNING_ZHANGSUEN)

cv2.imshow('image', np.hstack((thresh, thinned)))
cv2.waitKey(0)
cv2.destroyAllWindows()

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)
@TC9905 TC9905 added the bug label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant