Compare images to find differences

前端 未结 6 1820
一生所求
一生所求 2021-01-05 01:24

Task: I have a camera mounted on the end of our assembly line, which captures images of produced items. Let\'s for example say, that we produce tickets (with some text and p

6条回答
  •  清酒与你
    2021-01-05 02:19

    I don't Know much about OpenCV, but a bit on image processing.

    The way to go depends on the frequency in that new pictures are taken. A simplistic approach would be to calculate a difference picture of you 'good' template and the image of your actual product.

    If the images are 100% identical, your resulting image should be empty. If there are residual pixels, you could count these and take them as a measure of deviation from the norm.

    However, you will have to match the orientation (and probably the scale) of one of the images to align there borders, otherwise this approach will not work.

    If you have timng constraints, you might want to reduce the information in your images prior to processing them (using for example an edge detection and/or convert them to grayscale or even monochromatic bitmap if your product's features are significant enough)

提交回复
热议问题