How do I find the new pixels added to image after performing morphology?

asked 2018-10-15 06:53:10 -0500

opencv-newb gravatar image

I want to see a difference of images so as to count how many new pixels were added. Subtraction between images doesn't seem to do the job. XORing gives me a weird complete white background image.

edit retag flag offensive close merge delete

Comments

absdiff(a,b,res)

(simply using res = a - b might result in negative numbers, which will be "saturated away")

berak gravatar imageberak ( 2018-10-15 07:35:48 -0500 )edit