Ask Your Question
0

Difference between two images light independent

asked 2017-10-29 06:43:42 -0600

marcosbontempo gravatar image

Hello,

I'm getting the difference between two images using the absdiff method and aplying a threshold. However, due to light variations, I have to change the threshold value every place I test my system.

Is there an alternative way to get the difference between two images that is light independent?

Any tip will be very helpful,

Thanks

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2017-10-30 06:16:32 -0600

supra56 gravatar image

For python3.5 and OpenCV 3.3.1 on raspberry pi3 using linux. I used createCLAHE and or cv2.equalizeHist or even create function of gamma.

edit flag offensive delete link more
0

answered 2017-10-29 14:14:53 -0600

Tetragramm gravatar image

Have you tried normalizing the images by the standard deviation?

Convert them both to the CV_32F type, and calculate the mean and standard deviation of each image. Subtract the mean from each then divide by the stddev.

This is a simple way. If you want to search for more complicated ways, the key terms to use is "illumination invariance". There are a huge number of methods, so good luck.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-10-29 06:43:42 -0600

Seen: 952 times

Last updated: Oct 30 '17