Search code examples
image-processinglabviewtext-extractionimage-thresholding

How do I decide my image has bright text or dark text? [LabVIEW]


I'm working on a Text Extraction algorithm in which I need some assistance with thresholding an image. My development platform is LabVIEW 2015 and I'm using the "AutoBThreshold2.vi" from Vision Development Module 2015. I decided to go with Otsu's Algorithm for thresholding which is available as "Inter Class Variance" Method. Now, The problem is that I need to specify the "Look for" option to extract the text! Unfortunately, my input images will not always be same.

Kindly refer the attached source code along with sample images. My question is that Is there any way to find whether the image has Dark objects/Bright Objects on Dark Background/Bright Background? Meanwhile I'm also playing with Histogram to find out the BG & FG type!

Text Extraction.vi

Get Optimal Plane.vi

I'd really appreciate your help...


Solution

  • With the help of NI forum, I'm able to solve this problem.

    Auto Thresholding

    https://forums.ni.com/t5/LabVIEW/Auto-Thresholding-an-image-for-text-extraction/m-p/3904533#M1108133