How to find integral over 2D image
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/367567/image.png)
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/367570/image.png)
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 Kommentare
Antworten (2)
Steve Eddins
am 28 Sep. 2020
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 Kommentare
Bjorn Gustavsson
am 28 Sep. 2020
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 Kommentare
Siehe auch
Kategorien
Mehr zu 3-D Volumetric Image Processing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!