开发者

Plot gradient magnitudes of a colour image in matlab

I would like to plot gradient magnitudes of an color image in matlab. Precisely saying i want the gradient in my x-axis and the log of probability densit开发者_C百科y on my y axis. i would request if someone can help me out. Thanks


These are the steps you'll need to figure out (I'm not going to write code for you, because I haven't got Matlab at home, and because I'm lazy):

  1. Convert your image to grayscale.
  2. Determine a suitable finite-difference approximation to the gradient operator.
  3. Apply the finite-difference kernel using conv2.
  4. Take the abs of the result.
  5. Use hist to calculate a histogram.
  6. Plot the result, converting as appropriate with log, or semilogy.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜