Toan Cao wrote:
> hi, everyone!
> i am also new user in image processing with Matlab.
> I met a problem when i studied programming in my work.
> I have a set of points of a curve in image. I would like to compute the
> slope of tangents at every point of the curve ( The function of curve is
> unknown).
> So, who can help me to do that ?. Thank you very much !!!
> I'm sorry if my question is foolish.
In the below diagram, let O represent an open (unfilled) pixel, and let
X represent a filled pixel, and let the bottom left pixel be for the
coordinates (0,0); as usual, let X increase to the right and Y increase
upwards.
OOXXX
XXOOO
Now, what is the slope of the tangent of each of the lit pixels?
Answer: you can't tell. The diagram is correct for both the slope 1 in 3
and the slope 1 in 4, if one makes the assumption that in determining
which pixel to light, one does standard rounding of the coordinates 
that, in particular, 0.5 is rounded to 1.
[0, 1/3, 2/3, 3/3, 4/3] rounds to [0, 0, 1, 1, 1]
[0, 1/4, 2/4, 3/4, 4/4] rounds to [0, 0, 1, 1, 1]
Now if you cannot accurately determine the slope of the pixels for this
representation of a simple line, then how can you hope to determine the
slope of a curve? Indeed, how do you know that this isn't the diagram
for a simple curve? Or even the diagram for an S curve?
If you only have discrete pixels and do not have the original function,
it is not theoretically possible to determine _with certainty_ the
tangents of the points.
