c++ - OpenCV how to get bool true if images are `==`and false if not? -
c++ - OpenCV how to get bool true if images are `==`and false if not? -
so seek code like:
cv::mat m1, m2; cv::videocapture cap(0); { cap >> m1; cap >> m2; } while(cv::norm(m1,m2)==0); frames+=2; //... but seems not work. how bool if frames info contents captured photographic camera same or not?
your method fails because in real photographic camera videostream (from code see capture camera) every 2 frames not equal because of noise, changing illumination, little photographic camera motion etc. can alter check this:
cv::norm(m1,m2) < epsilon where epsilon unsigned number can find (it depends on criteria). fast , simple solution.
look @ karlphillip's link more efficient solution.
c++ image opencv camera
Comments
Post a Comment