我想在 2 个灰色图像之间分割图像(视频流)的一部分。
当流开始时,我会拍一张照片。然后我制作另一个 IplImage 但每个像素的强度都加上一个数字。现在我想保留这两个图像之间的所有内容。
我的自动取款机
// Get the initial image
depthInit.copyFrom(result.getBufferedImage());
//Create an image where every intensity is 10, which will be added to the initial image.
cvSet(scalarImage,cvScalar(10, 0, 0, 0));
// De init image wordt verhoogt met de hoogte van de laag
cvAdd(depthInit, scalarImage, depthInitLayer2, null);
2 个阈值图像是:depthInit 和 depthInitLayer2
流是变量“结果”
现在使用这两个图像来阈值流
cvZero(difference);
// Select everything that is greater than the depthInit image
cvCmp(result, depthInit, difference, CV_CMP_GT);
cvZero(difference2);
// Select everything that is smaler than the depthInitLayer2
cvCmp(difference, depthInitLayer2, difference2, CV_CMP_LT);
虽然不幸的是这不起作用。
我的问题为什么?
提前谢谢