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

Black background plate bitwise loop not working #106

Open
dominique-AR opened this issue Feb 3, 2023 · 0 comments
Open

Black background plate bitwise loop not working #106

dominique-AR opened this issue Feb 3, 2023 · 0 comments

Comments

@dominique-AR
Copy link

I want to perform OCR in black background plate, to do so i want to implement this code in order to check it and if so to inverse the result of cv2.threshold but it doesn't work.

background = np.mean(thresh)
if int(background) < 100:
thresh = cv2.bitwise_not(thresh)
else:
pass

I didn't figure out where i'm wrong, can anyone help please!

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