# How to test a LCD display?

**URL:** <https://forum.opencv.org/t/how-to-test-a-lcd-display/7045>\
**Category:** Uncategorized\
**Created:** [January 9, 2022, 6:47pm UTC](https://forum.opencv.org/t/how-to-test-a-lcd-display/7045 "2022-01-09T18:47:16Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![burli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/burli/32/4178_2.png) [@burli](https://forum.opencv.org/u/burli)\
**Post date:** [January 9, 2022, 6:47pm UTC](https://forum.opencv.org/t/how-to-test-a-lcd-display/7045/1 "2022-01-09T18:47:16Z")

</div>

Hi, I am totally new to OpenCV and I want to do something relatively simple (I hope).

I want to test a LCD display with 7 segment digits in too sizes, some special symbols and backlight in different colors.

I want to test the segments and the correct backlight (missing LEDs or wrong color).

My problem is that I don’t know where to start. A lot of tutorials only show face recognition or object detection.

Can you recommend any tutorials that help me to finish this job?

---

<div class="post-metadata">

**Author:** ![sturkmen](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/sturkmen/32/13_2.png) [@sturkmen](https://forum.opencv.org/u/sturkmen)\
**Post date:** [January 9, 2022, 6:54pm UTC](https://forum.opencv.org/t/how-to-test-a-lcd-display/7045/2 "2022-01-09T18:54:28Z")

</div>

could you add a picture

---

<div class="post-metadata">

**Author:** ![burli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/burli/32/4178_2.png) [@burli](https://forum.opencv.org/u/burli)\
**Post date:** [January 9, 2022, 7:05pm UTC](https://forum.opencv.org/t/how-to-test-a-lcd-display/7045/3 "2022-01-09T19:05:28Z")

</div>

Luckily I can. This is a HDR image I made with my smartphone.

 ![20220107_092959](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/2/2553f033df890ddd467d91638600dd91517da04c.jpeg)

Taking a single picture can be tricky because of variations in exposure. Maybe I have to make more than one picture with different exposures.

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [January 9, 2022, 7:59pm UTC](https://forum.opencv.org/t/how-to-test-a-lcd-display/7045/4 "2022-01-09T19:59:13Z")

</div>

**first** you need to build a “jig” where you put the LCD and the camera so they’re always in the same relative position to each other, and put blinds around it all to shield from outside light (which is a distraction).

---

<div class="post-metadata">

**Author:** ![burli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/burli/32/4178_2.png) [@burli](https://forum.opencv.org/u/burli)\
**Post date:** [January 9, 2022, 8:44pm UTC](https://forum.opencv.org/t/how-to-test-a-lcd-display/7045/5 "2022-01-09T20:44:47Z")

</div>

This already exists.

---

<div class="post-metadata">

**Author:** ![burli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/burli/32/4178_2.png) [@burli](https://forum.opencv.org/u/burli)\
**Post date:** [January 10, 2022, 11:32am UTC](https://forum.opencv.org/t/how-to-test-a-lcd-display/7045/6 "2022-01-10T11:32:01Z")

</div>

I watched the freeCodeCamp video, but that wasn’t helpful. Just image processing basics (I already know) and face detection. Almost 4 wasted hours.

But how can I test if the segments are ok, the color of a segment is correct or the brightness is as expected?

Can you recommend videos or tutorials that help me to solve my problem without wasting more time?

---

<div class="post-metadata">

**Author:** ![kbarni](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/kbarni/32/26_2.png) [@kbarni](https://forum.opencv.org/u/kbarni)\
**Post date:** [January 10, 2022, 12:43pm UTC](https://forum.opencv.org/t/how-to-test-a-lcd-display/7045/7 "2022-01-10T12:43:41Z")

</div>

We are here to help you, not to write your homework.

And, to learn anything (including computer vision and image processing), you’ll have to “waste time”. Lot of time. Sorry.

Anyway, if you have a camera setup, you can define a mask for every segment you want to check, apply that mask on the image and get the mean value. It will give the color and intensity of the segment.

---

<div class="post-metadata">

**Author:** ![Alejandro\_Silvestri](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/alejandro_silvestri/32/357_2.png) [@Alejandro\_Silvestri](https://forum.opencv.org/u/Alejandro_Silvestri)\
**Post date:** [January 10, 2022, 10:38pm UTC](https://forum.opencv.org/t/how-to-test-a-lcd-display/7045/8 "2022-01-10T22:38:09Z")

</div>

@burli

Going super simple, choose a fixed pixel coordinate for each segment, and test the color in that pixel.

---

<div class="post-metadata">

**Author:** ![burli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/burli/32/4178_2.png) [@burli](https://forum.opencv.org/u/burli)\
**Post date:** [January 11, 2022, 9:25am UTC](https://forum.opencv.org/t/how-to-test-a-lcd-display/7045/9 "2022-01-11T09:25:57Z")

</div>

@kbarni i don’t expect that you write code for me. I just ask for a direction.

I know basic image manipulation from Software like Gimp, so I don’t start at zero. But I’m new to OpenCV. OpenCV has about 2500 algorithms and I probably need 10 of them, maybe less. That’s what I mean with “wasting time”. I don’t want to try all 2500 algorithms just to find the few I need.

What I want to try is using contours to generate a mask for each segment. Just a single pixel is not accurate enough.

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [January 11, 2022, 11:17am UTC](https://forum.opencv.org/t/how-to-test-a-lcd-display/7045/10 "2022-01-11T11:17:02Z")

</div>

> [@burli](#):
>
> What I want to try is using contours to generate a mask for each segment.

time ~~to stop chatting, and~~ to [try the contour related tutorials](https://docs.opencv.org/4.x/df/d0d/tutorial_find_contours.html) , no ?

---

<div class="post-metadata">

**Author:** ![burli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/burli/32/4178_2.png) [@burli](https://forum.opencv.org/u/burli)\
**Post date:** [January 11, 2022, 12:16pm UTC](https://forum.opencv.org/t/how-to-test-a-lcd-display/7045/11 "2022-01-11T12:16:36Z")

</div>

Most tutorials just explain how to find contours and how to draw the outline. They don’t cover the interesting parts. But I found some promising tutorials I will try as soon as possible.

Currently I’m getting some original images from the system to have some training data.

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [January 11, 2022, 1:16pm UTC](https://forum.opencv.org/t/how-to-test-a-lcd-display/7045/12 "2022-01-11T13:16:49Z")

</div>

> [@burli](#):
>
> how to find contours and how to draw the outline.

draw each FILLED into a seperate black image, and you got your segment mask

---

<div class="post-metadata">

**Author:** ![burli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/burli/32/4178_2.png) [@burli](https://forum.opencv.org/u/burli)\
**Post date:** [January 15, 2022, 7:31pm UTC](https://forum.opencv.org/t/how-to-test-a-lcd-display/7045/13 "2022-01-15T19:31:33Z")

</div>

Meanwhile I learned a lot and found different ways to solve this like pattern matching, using HSV color range or even train an AI. But for the AI I definitely don’t have enough false Images.

I’m starting to enjoy it.
