Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要计算积分图像,但我不确定如何通过矢量化和计算求和表来实现这一点。这在 MATLAB 中怎么可能?
最简单的方法是使用两个调用cumsum并转置原始图像:
cumsum
integral_image = cumsum(cumsum(image')');
matlab 版本用零填充(第一行和第一列)
integralImage = cumsum(cumsum(im, 2), 1); integralImage = padarray(integralImage,[1 1],'pre');