假设我有两个相同大小的二值图像。如何找到两个二值图像之间的交集?只有两个白色图像(灰色 - 255)上相同坐标(位置)的像素才会在输出图像(交集)上给出白色像素。
您可以使用cvAnd http://opencv.itseez.com/modules/core/doc/operations_on_arrays.html?#bitwise-and or 简历::按位与 http://opencv.itseez.com/modules/core/doc/operations_on_arrays.html?#bitwise-and在两个图像上。仅当两个输入图像均为白色时,生成的图像才会为白色。
编辑:这是申请的结果简历::按位与 http://opencv.itseez.com/modules/core/doc/operations_on_arrays.html?#bitwise-and, 简历::按位或 http://opencv.itseez.com/modules/core/doc/operations_on_arrays.html?#bitwise-or and CV::按位异或 http://opencv.itseez.com/modules/core/doc/operations_on_arrays.html?#bitwise-xor在二值图像上:
这是两个源图像:
这是申请的结果简历::按位与 http://opencv.itseez.com/modules/core/doc/operations_on_arrays.html?#bitwise-and:
这是申请的结果简历::按位或 http://opencv.itseez.com/modules/core/doc/operations_on_arrays.html?#bitwise-or:
这是申请的结果CV::按位异或 http://opencv.itseez.com/modules/core/doc/operations_on_arrays.html?#bitwise-xor:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)