How to compare two images which have only brightness different? [closed]
I have made a program about the instrument detection. And I take out two images about the instrument pointer. I use perspective transformation to correct one of the images. Finally, I achieve two images different from the location of the pointer. I only need to compare the location of the pointer. So I use the OpenCV function absdiff to subtract them. But the result includes other information. I find two images have been different from the brightness. I need a good method to solve the problem so that the two images have the same brightness and are different from the pointer location. Thanks!
image1 and image2 is the source image, image3 is the warppespective image. Gray the image2 and subtract it with image3. Achieve the imag4. image4 includes other information. I only want the two pointers. I find that the difference brightness between image1 and image2 causes the rusult. How to solve this matter? Thanks!
You may need to use HSV colour space to avoid brightness variations.