Detecting changes of image
I have a project involving batteries(18650 battery). I have a pack of them in a certain order(some are upwards showing the positive side and some are showing the negative). What i'm trying to do is take a pack that is in the correct form as a reference image (an image that is the correct order of the batteries) and capture another image(for example with the same pack with one battery that is incorrect in all the pack). How can i detect a difference between the referenced image to the current image and highlight the problematic battery.(to make it more clear, the positive has a different "look" than the negative). My goal is to detect changes between the original image to the newly taken image.
please add example images
(if you can fix the camera and the battery position, maybe a simple absdiff() will already do ...)
for example image 1 is the correct form of the pack and image 2 is an incorrect pack. and yes the image will be taken in a standstill position with same light exposure and angle with same pack width height and position.
ah, but as it looks, the battery can have any 90° rotation, right ?
The pack stays the same. In this case I changed the sleeves. but my goal is, same pack. same positioning of the sleeves, and just detect any battery that is in the wrong position. so no 90 degree rotation
I am looking at first image. The battery upside up(positive) contained 2 circulars while battery upside-down(negative) contained merely one circular. You need to do 2 things
findcontours
andinrange
colors. I noticed some some battery have different colours.