Ask Your Question

gonxintel's profile - activity

2017-08-22 07:49:21 -0600 received badge  Famous Question (source)
2014-11-26 05:37:42 -0600 received badge  Notable Question (source)
2014-08-22 03:52:29 -0600 received badge  Student (source)
2014-08-22 03:52:22 -0600 received badge  Nice Answer (source)
2014-07-07 04:15:00 -0600 received badge  Popular Question (source)
2013-05-28 02:40:07 -0600 received badge  Teacher (source)
2013-05-27 19:56:01 -0600 received badge  Self-Learner (source)
2013-05-27 19:55:57 -0600 received badge  Necromancer (source)
2013-05-27 19:55:57 -0600 received badge  Self-Learner (source)
2013-05-27 14:18:12 -0600 answered a question How can i determine the location of LCD/LED display in an image with OpenCV and perl

Hi all

Thank you for your input/suggestion to my question how to determine the LCD/LED display in an image.

The figure 1 below is a scratchcard which we are interested to locate/segment based on the yellowish color part ,which i refer to as the LCD/LED display. After segmenting the LCD/LED area based on the Yellowish color we can extract the digits present

image description

                 Figure 1 Scratchcard Image

For this this task we will use OpenCV and C++
OpenCV captures images in BGR (BLUE,RED and GREEN ) format, and not RGB ( RED, GREEN and BLUE) as one would expect.The captured images are 3 bytes ( 24 bits ) of data .The 3 bytes of data for each pixel is split into 3 different parts which are BLUE,RED and GREEN having 8-bits or 1 byte each. 1 byte can store a value from 0 to 255.This means that each BLUE having 256 variations of Blue , each GREEN having 256 variations of Green and each RED having 256 variations of Red.These primary colors can be mixed with different variations of each to get the desired color in this case yellowish or LCD/LED display color. Figure 2 shows the RBG colorspace.

image description

Figure 2 RBG color space

In this task what is needed is to isolate the yellowish color in order to determine the LCD/LED display This is referred to as color based segmentation which is also know as With thresholding.However while OpenCV images are captured in BGR format ,The BGR format falls short for color based segmentation task. It seems using HSV color space shown in figure 3 will be more suitable.

image description
Figure 3 HSV

HSV stands for Hue, Saturation, and Value.The Hue defines the color component ,Saturation defines how strong the color component is in other words how close that color is to white and Value defines the brightness of the color component or how close that color is to black..Therefore unlike RGB, HSV separates brightness in an image from the color information. This is very useful for this task at hand . Further it gives the the upper hand of having a single number color for the color of interest despite multiple shades of that color

in OpenCV the HSV values ranges are different from other application such as Gimp whose HSV ranges are: Hue ranges from 0 to 360, Saturation from 0 to 100 and Value from 0 to 100. while in OpenCV the HSV values ranges are Hue ranges from 0 to 180,Saturation ranges from 0 to 255, and Value ranges 0 to 255.

Gimp Hue values for the colors are : Orange 0-44 ,Yellow 44- 76, Green 76-150, Blue 150-260, Violet 260-320, Red 320-360

OpenCV Hue values for the colors Orange 0-22 Yellow 22- 38 Green 38-75 Blue 75-130 Violet 130-160 Red 160-180

For this task, the suitable ranges for the HSV ,after experimenting with different values to get the yellowish part , are Hue from ranges 20 to 70 ... (more)

2013-04-09 01:49:09 -0600 commented answer How can i determine the location of LCD/LED display in an image with OpenCV and perl

Hi Geomod

thank you so much for your reply i believe u are right ,"If you scratch all the card (so there aren't any near black points close to the number) this could work very well" will help to for the tesseract to easily read the individual digits.Kindly explain further on segmentation using the "histogram of the picture." approach thank so much ... one of the issues i ran into ... .As an experiment i cut out the area of interest " scratchcard_lcd_image_to_read.jpg" attached in my initial post and passed it to the tesseract unfortunately didn't yield any results. i suppose because some of the images digits where not clear enough but surely some of them would have been easily read. many thanks Geomod different approach this give me a different approach

2013-04-09 01:41:09 -0600 commented answer How can i determine the location of LCD/LED display in an image with OpenCV and perl

Hi Guanta thank you so much for your elaborate steps , i will execute them and revert to you on my success.The steps seems feasible with regards to identifying the area of interest dynamically.As an experiment i cut out the area of interest " scratchcard_lcd_image_to_read.jpg" attached in my initial post and passed it to the tesseract unfortunately didn't yield any results .... is this because i have to denoise the source-image scratchcard_lcd_image_to_read.jpg or train tesseract with the font in the image ? once again thank you so much for your insight i really appreciate it

2013-04-08 09:46:21 -0600 commented question How can i determine the location of LCD/LED display in an image with OpenCV and perl

Hi Guanta thank you so much for your reply i have edited my initial post to attached the images i would like to read. they are not LCD per say but identifying the region where the value is will require to identify the LCD like region first and the read the individual segments for the digits this is where i would like some help on how to identify them dynamcically as i have to process a number of them

2013-04-08 09:42:10 -0600 received badge  Editor (source)
2013-04-08 04:26:24 -0600 asked a question How can i determine the location of LCD/LED display in an image with OpenCV and perl

C:\fakepath\scratchcard_lcd_image_to_read.jpg

C:\fakepath\scratchcard.jpg

Hi aliam very new to OpenCV and indeed this forum, therefore my apologies in advance for any unobserved rules and also for asking a qtn that seem may seem lame to most.Having pointed that out my question is ... How can i determine the location of LCD/LED display in an image with OpenCV and perl, iam trying to dynamically locate the location of LCD/LED display in an image. My main point is to read the characters in the image and later on convert them to text. I would like to do with in perl or C++ plus openCV ?

please find the attached image i would like to read

many thanks in advance Gonxintel