What is an Image Gradient?

前提是你 提交于 2021-01-29 10:48:51

问题


I am currently, learning the working of Seam Carving aka Content Aware Resizing.

Seam Carving involves calculation of Energy of Each individual pixel in an image. Where the Energy could be calculated using several methods, one of which being Gradient Magnitude (Image Gradient).

I have previously used Sobel Filter/Operator, which involves calculation of gradients in X and Y direction, where the output of the two is used for finding edges. But, I am not quite sure what a Gradient is by definition.

P.S.:- I read the Wikipedia page of Image Gradient but was unable to understand it, clearly.


回答1:


With Sobel you have computed the derivatives in the x and y directions.

These two derivatives together form the gradient. That is, the gradient has two values (a 2D vector) at each pixel. Because we have a vector at each pixel, we have a vector field.

The gradient gives the strength and the direction of the slope at each point. The magnitude of the gradient gives the slope strength.



来源:https://stackoverflow.com/questions/56911127/what-is-an-image-gradient

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!