Computing first derivative--image processing

I need help understanding computer first derivative
I don't understand how to derivative of [5 5 5 4 4 3 4 3 4 5 2 2 2 2 1 1 1]
is
[X 0 -1 0 -1 1 -1 1 1 -3 0 0 0 -1 0 0 X]

답변 (2개)

Image Analyst
Image Analyst 2014년 11월 23일

0 개 추천

It's just the (n+1)st element minus the nth element. Same as you'd get from diff(). There are also imgradient(), and imgradientxy() functions in the Image Processing Toolbox.

댓글 수: 2

MLnoob5340
MLnoob5340 2014년 11월 23일
Okay! how would I find the second derivative do the same process again?
Yeah, you can do that. What do you really want to do anyway? Why don't you post your image and say what you want to measure in it or do to it?

댓글을 달려면 로그인하십시오.

Youssef  Khmou
Youssef Khmou 2014년 11월 23일

0 개 추천

In general diff(X,n) of N by 1 vector returns an N-n by 1 vector, second derivative is diff(X,2), using gradient is better because it offers a possibility to choose the sample rate, if its 1 then :
d2x=gradient(gradient(x));

질문:

2014년 11월 22일

댓글:

2014년 11월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by