03-14-2022 02:36 AM
Hi,
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.
Regards,
Wagh Dnyaneshwar
03-15-2022 11:49 AM
posting an image, might be helpful in understanding the problem.
03-16-2022 06:10 AM
Hi,
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.
warm regards
03-16-2022 02:09 PM
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.
https://en.wikipedia.org/wiki/Gaussian_blur
03-16-2022 09:46 PM
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
Good luck!
Robert
03-23-2022 12:09 AM
OCR.vascr is giving "invalid script file selected error" in vision assistant version 2019 SP1
03-23-2022 09:42 AM
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
Robert
03-23-2022 11:51 PM
hi
thanks for your reply
kindly give me the code with LV 2019 sp1
Regards,
Wagh Dnyaneshwar
03-31-2022 01:46 AM
please send me the code in LabVIEW 2019 SP1
03-31-2022 10:07 AM
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!
Cheers
Robert