How to find integral over 2D image
9 ビュー (過去 30 日間)
古いコメントを表示
Hi all,
I'm working on some image processing and try to reproduce something from an article, in which they integrate over an 2D image. I'm familiar with with finding the derivative of an image with the help of for example Sobel masking, but is there any procedure you would recommend for integration?
The problem I'm trying to work out is the following:
in which H is a vector with an x and y component. Or to put it differently, I've got to 2D images for H: Hx and Hy. I need to integrate both of them over x and y, to obtain the following:
Anyone any suggestions how to achieve this? I was already looking into the integralImage function, but was questioning if this was what I needed.
Thanks in advance! Cheers Koen
3 件のコメント
回答 (2 件)
Steve Eddins
2020 年 9 月 28 日
Try integralImage. This function computes a cumulative in both directions, which would approximate the two-dimensional integral from the discrete image samples. The function integralFilter uses the output of integralImage to efficiently perform several different kinds of filtering operations, and I don't think that's what you need.
0 件のコメント
Bjorn Gustavsson
2020 年 9 月 28 日
If you want to have dW at the same resolution as your original image, just add the four terms together. If you want some local smooting of dW then I think you should simply convolve dW with a suitable filter-kernel, if you want a reduced size on dW, then I figure you could downsample such a filtered image. Since I don't know what your Hx and Hy are nor what they were used for in the paper you refer to more detailed suggestions become blind guesses.
One point to mention is that the second and third term looks very peculiar to me as a physicist.
HTH
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!