>
> The derivative of a 1D signal can be obtained from convolution with
> the kernel [1 -1].
No it can't. By definition the derivative applies to a continuous function.
What you are describing is very much like the derivative in some respects, but
not exactly the same.
>To get the derivative of a 2D image, can someone
> help me with what the kernel is - something like
>
> [1 -1]
> [-1 1]?
>
Yes, this would be analogous to the 1d case. That is, it is equivalent to
applying the kernel [1 -1] separately in x and y. But, you may find that the
half pixel shift in the result is a nuisance. To avoid that you might use:
1 0 -1
0 0 0
1 0 -1
or maybe:
0 1 0
1 0 -1
0 -1 0
or any number of other more complex symmetrical operators have been used.
> I guess. And for the second derivative, in 1D it's [-1 2 -1] and for
> 2D
>
> [ 1 -2 1]
> [-2 4 -2]
> [ 1 -2 1]?
>
That would be equivalent to applying your original kernel twice.
-jim
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Reply by trouble●June 16, 20042004-06-16
The derivative of a 1D signal can be obtained from convolution with
the kernel [1 -1]. To get the derivative of a 2D image, can someone
help me with what the kernel is - something like
[1 -1]
[-1 1]?
I guess. And for the second derivative, in 1D it's [-1 2 -1] and for
2D
[ 1 -2 1]
[-2 4 -2]
[ 1 -2 1]?
Thanks for helping!