我想要为单个帧决定是否要将它添加到框架中或不是.. (Implementing background subtraction)..Matlab正在使用矩阵/图像来重置某个像素(3个dims)
我该如何快速地做到这一点? (我做到了与循环和它的工作realll慢...)
这是我有:(SEQ输入,DIFF是我对测试图像,F是新的图像)
for y = 1:height
for x = 1:width
res = 0;
for c = 1:channels
if diff(y,x,c) > thresh
res = 1;
end
end
if res == 1
F(y,x, :) = seq(y,x,:);
else
F(y,x, :) = 0;
end
end
end
谢谢!
它是绝对没有意义的,你如何使用差异,你能解释一下这个阈值应该描述什么? – Daniel