How exactly does the gradient function work when applying it to an image?
Show older comments
I know the description for using gradient is: [FX,FY] = gradient(F) returns the x and y components of the two-dimensional numerical gradient of matrix F. The output FX corresponds to ∂F/∂x, which are the differences in the x(horizontal) direction. The spacing between points is assumed to be 1. The additional output FY corresponds to ∂F/∂y, which are the differences in the y (vertical) direction. The spacing between points in each direction is assumed to be 1.
If I use it as [FX,FY] = gradient(Image), what exactly is does the array it spits out mean? Is it which direction each pixel is changing the most? Does it take into account horizontal pixels or only the ones horizontal and vertical to it? What does ∂F represent here?
Finally, what is the difference between using gradient and imgradient used with 'central'?
Accepted Answer
More Answers (0)
Categories
Find more on Object Analysis in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!