使用的版本:opencv3.0.0
出现的前置条件:两张待对比的图片,
方法是:Core.absdiff(img1, img2, img);
错误信息: OpenCV Error: Sizes of input arguments do not match (The operation is neither 'array op array' (where arrays have the same size and the same number of channels), nor 'array op scalar', nor 'scalar op array') in cv::arithm_op, file C:\builds\master_PackSlaveAddon-win64-vc12-static\opencv\modules\core\src\arithm.cpp, line 1987 Exception in thread "main" CvException [org.opencv.core.CvException
问题:两张图片长宽px一致的时候没有问题,但是长宽一旦有点差别就会出现该错误。是不是这个方法要求就是保存两张图片长宽一致?或者有其他更好的方法?
|