How to find integral over 2D image

7 次查看(过去 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 个评论
Koen Franse
Koen Franse 2020-9-28
I think over an area, at least the idea is that all the components of dW and therefore dW itself result in a 2D image as well
Koen Franse
Koen Franse 2020-9-28
In the meantime I found the functions 'IntegralFilter' and 'IntegralKernel', would that be a way to adress this? And if so, do you have any suggestions on what kernel to use?

请先登录,再进行评论。

回答(2 个)

Steve Eddins
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.

Bjorn Gustavsson
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

类别

Help CenterFile Exchange 中查找有关 3-D Volumetric Image Processing 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by