0
$\begingroup$

Have a look at this beautiful girl:

enter image description here

She is literally just (a dummy matrix):

enter image description here

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 :

enter image description here

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.

$\endgroup$
3
  • 1
    $\begingroup$ 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 $\endgroup$ – user160738 Nov 8 '16 at 18:42
  • 1
    $\begingroup$ Unit 1 is arbitrary... $\endgroup$ – Jean Marie Nov 8 '16 at 18:42
  • $\begingroup$ @AbdallahHammam, I know it:), but that's not what I'm asking. $\endgroup$ – Plain_Dude_Sleeping_Alone Nov 8 '16 at 18:53
1
$\begingroup$

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...

$\endgroup$
3
  • $\begingroup$ Thanks, but don't you think that it's kind of unsual, as we don't exactly know the distance between 2 pixels, thought they are separated in constant distance. $\endgroup$ – Plain_Dude_Sleeping_Alone Nov 8 '16 at 18:59
  • $\begingroup$ The distance between 2 pixels is 1 pixel. $\endgroup$ – Kaynex Nov 8 '16 at 19:01
  • $\begingroup$ Ah I see your point , the function of the pixels is actually discrete thus continuous derivative is not applicable , so we choose the smallest possible value for an integer, the closest to 0 . Thank you very much $\endgroup$ – Plain_Dude_Sleeping_Alone Nov 8 '16 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.