Ask Your Question
3

how to remove strong reflections

asked 2014-07-23 23:40:03 -0600

yomholedet gravatar image

image description

i want to remove strong reflections for digit detect. the 1 detected as 4. i try to use several approaches: 1. intesinty very high > 230 of color 2. the reflection is in one line over digits 3. distance transform in middle will be high so i was think to detect the reflcetion line to delete this and repeaint the digits ?

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2014-07-25 04:46:55 -0600

jamesnzt gravatar image

i have an idea but i dont know whether it works or not. In real time mostly no regions will have 255R,255B,255G. When i look at the intensity range the strong reflection has 220-225 values in R,G&B. If u suppress this values by averaging neighbouring pixels you can avoid it.

this is what comes to my mind. try this if u think this works.

edit flag offensive delete link more

Comments

1

I do not think this is a good approach, RGB is way to sensitive for lighting variations, where HSV is more robust. As to RGB, OpenCV uses BGR format so keep that in mind!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-07-25 04:57:19 -0600 )edit
1

answered 2014-07-24 17:56:14 -0600

Hi,

I am struggling with the same problem on a different problem. I have seen a successful approach that used a transformation to HSV colour space and building a 2D histogram of Saturation and Value channels. In the areas where reflection existed, there was a distinct histogram peak in high Value and low Saturation (if I am not mistaken) coordinate.

edit flag offensive delete link more

Comments

His solution is the right way. You want to remove regions where the luminance is high and replace it by a lower luminance but in the same colour region. Check the form of the HSV space to understand. You want to look for pixels that are at the top center (oversaturated) and bring their value down.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-07-25 03:58:46 -0600 )edit

Do you have any an example code for this solution @StevenPuttemans? I agree with you but i dont know how to do

vbc gravatar imagevbc ( 2017-11-20 01:52:58 -0600 )edit

Just loop over pixels and reduce their luminance intensity value by half for example? I guess that might work. Never tried it before myself, it was just a suggestion!

StevenPuttemans gravatar imageStevenPuttemans ( 2017-11-22 04:51:16 -0600 )edit

@StevenPuttemans: reduce by haft can resolve? I worry because i have a plate here: https://ibb.co/cjSdcm And when i detect number object on it. Number 0 and 2 will cant find by contour, It will be split to twice. Do you have any another solution?

vbc gravatar imagevbc ( 2017-11-27 20:20:25 -0600 )edit
0

answered 2014-07-27 00:13:17 -0600

yomholedet gravatar image

ok i will try today and send results thanks evrybody

edit flag offensive delete link more

Comments

Hey.. did u tried and got the result to remove the reflection. I didnt quite understand this S and V histogram build.so it will be helpful if u have done it already

sarjoondeen gravatar imagesarjoondeen ( 2015-10-16 06:35:41 -0600 )edit

Question Tools

Stats

Asked: 2014-07-23 23:40:03 -0600

Seen: 11,112 times

Last updated: Jul 27 '14