# Confusion over derivative (Calculus perpective )

Have a look at this beautiful girl: She is literally just (a dummy matrix): Where each element represents the value of the black-to-white level put in each pixel at (x,y) location, thus the function is f(x,y).

A calculus books taught me that the derivative of f with respect to x-axis at (a,b) defined as : In a computer vision we compute the derrivates as :

$$\frac{\partial f}{\partial x} \approx \frac{f(x+1,y) - f(x,y)}{1} = f(x+1,y) - f(x,y)$$ .

They are both same formula, same principal, except that in the second formula it assumes that h=1 , instead of h approaches to 0.

Why is it computed under h=1? I think it's a matter of interpretation that I don't get very well over the derivative?

Actually here , https://cs.stackexchange.com/questions/65152/derivative-for-x-direction-for-image. It's mentioned that :

This is because f(x,y), the pixel color values at (x,y), is a value of 1 away from the nearest neighboring pixels in both the x and y direction.

If so, wouldn't it matter, if I use h about 0.00001 for example.

• Computer is doing an approximation of derivative, under assumption that for small enough $h$, $\frac{\partial f}{\partial x}$ is close to the approximation. Computer chose $h$ because it thought it was small enough and thus gives a good approximation. But that heavily depends on function $f$ itself and I doubt $1$ would be good enough approximation for most of practical uses – user160738 Nov 8 '16 at 18:42
• Unit 1 is arbitrary... – Jean Marie Nov 8 '16 at 18:42
• @AbdallahHammam, I know it:), but that's not what I'm asking. – Plain_Dude_Sleeping_Alone Nov 8 '16 at 18:53

The basic idea is that when the true continuous derivative is not available, you approximate it for some finite and small $h$. In the case of computer vision and computer graphics, the minimum available step size is 1 pixel on the screen...