in our current project we are detecting the dark character of the specified ROI from our device screen we are unable to detect character
but after changing the ROI of the screen character it starts detection.
kindly suggest or respond regarding the issue.
thanks for your response,
that OCR read function is detecting some garbage characters for dark character but with same image if ROI is reduced LabVIEW OCR read function is able to detect dark text correctly.
you can go through the attached images
in these images
1] limit access_1_Garbage_1.png == showing the garbage characters after drawing ROI on the Image and showing garbage characters in the read string window
2] limit access_2_Corrected.png == showing the characters are readable and recognized in read string window
3] limit access_1.png == original image for the reference.
Seems like you background has a lot of high frequency pattern.
I would recommend to run a smoothing filter to reduce the background pattern before trying to detect the letters.
It's a guess you are reading text from an LCD screen, which is creating noise, which AmitShachaf pointed out.
To reduce background noise, I dropped the Red and Blue plane in the color image, keeping the green, which made the image monochrome, and fed that into the OCR tool. The OCR tool has wide range of options, and with a small bit of poking, it was possible to train on the text, in the full image. Setting Threshold to manual or Auto:Linear helped, and telling the OCR tool to performed a couple of erosions (to remove small particles). A picture of the result image with OCR tags is attached. Also included is the LabVIEW Script File, and a copy of the trained OCR file. [NOTE The OCR file format that NI uses has a .ABC suffex, but this forum DOES NOT SUPPORT .abc.. So attached RAR file can be uncompressed.]. Hopefully this will get you pointed in the right directions.. the OCR tool has many options, and you need to go through them carefully to increase your success rate..
There are probably a dozen ways to improve image quality through filtering and color adjustments. I just wandered into one of them.
Hope it helps
Is this in reference to the script I sent? It was created in LabVIEW 2020. I can generate LV Code from the script from my end in 2019sp1 if that is the case.
Let me know
Thanks for the reminder! I get lost some days.
The VI and the ABC file are attached. The characters are trained, so will only recognize the characters in that image, you may have to train the entire set.
Hope this gives you a good starting point.
This is just a conversion from the Script, so it's pretty messy, but it was able to read the provided image.
Best of luck!