Precisely Compare 2 images for differences using OpenCV

后端 未结 1 1444
有刺的猬
有刺的猬 2020-12-05 16:44

I am working on a project to capture images via webcam in a predefined time interval, and continuously compare the images to a template (good image) and give an error if the

相关标签:
1条回答
  • 2020-12-05 17:28

    An easy way is to just take the L2-norm between the image pairs:

    double l2_norm = cvNorm( img1, img2 );
    

    You'll have to experiment with setting the appropriate threshold. Of course this method is not robust to lighting changes, viewpoint changes, etc but its simple and fast.

    0 讨论(0)
提交回复
热议问题