Read white and black words when threshold [closed]

asked 2018-09-19 01:55:32 -0600

uraqtlee gravatar image

updated 2020-11-07 02:17:00 -0600

image description The program can read the white text correctly but when it comes to the 2nd license plate, the program will still try read the white text and thus won't be able to read the actual letters on the license plate. Any way to fix this?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by uraqtlee
close date 2018-10-09 21:45:25.957817

Comments

how would we know, without seeing your code ?

and please put your imge here not on an external bin. thank you.

berak gravatar imageberak ( 2018-09-19 01:56:45 -0600 )edit

Hi, this program I got it online and I'm trying to currently fit it to my likings and learn stuff from it. but I think that the code that revolves around detecting plates is this: https://pastebin.com/DKwzNZcS I'm just a beginner so hope i can learn a lot thanks

uraqtlee gravatar imageuraqtlee ( 2018-09-19 02:51:40 -0600 )edit

maybe apply a bitwise_not for the white text plates?

m93c gravatar imagem93c ( 2018-09-19 02:53:04 -0600 )edit

...or use the thresholding operation THRESH_BINARY for the white and THRESH_BINARY_INV for the black license plate.

kbarni gravatar imagekbarni ( 2018-09-19 04:46:26 -0600 )edit

ill maybe try that, but i have to make it work with a video feed instead of a picture so its random when a car pops up with a black on white or white on black. edit 1: thanks it kinda works

uraqtlee gravatar imageuraqtlee ( 2018-09-19 10:06:25 -0600 )edit