Computing first derivative--image processing
20 次查看(过去 30 天)
显示 更早的评论
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]
0 个评论
回答(2 个)
Image Analyst
2014-11-23
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 个评论
Image Analyst
2014-11-23
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
2014-11-23
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));
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Segmentation and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!