Answers.Body: <p>Imagine a line laid through the image. All pixels along the line count as values, so you can graph the pixels along the line like a function. </p>
  
  <p>The derivative is of that 'function'. A black picture and a white picture have the same derivative (0), but a black-fading-to grey image would have a constant derivative bigger or smaller than zero, depending on the direction of the line in relation to the fading. Hard contrasts have huge derivarives at the points in the line where the line crosses a white/black border. Usually the rows and columns are used as the lines, but you could also lay any oblique line, and some algorithms do.</p>
  
  <p>The term 'derivative' is somewhat a misnomer in this case, as usually the pixel values do net get fitted by a function of which then a derivative is taken, but the 'derivative' is directly taken by looking at the differences from one pixel to it's neighbor.</p>
  
  <p>There is a <a href="https://dsp.stackexchange.com/questions/16805/1d-first-order-derivative-mask">thread</a> in dsp.stackexchange that deals with this, the following illustrative picture is from there:
  <a href="https://i.sstatic.net/r2bUi.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/r2bUi.png" alt="enter image description here"></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-08T15:22:53.213Z
Answers.Text: Thank you bukwyrm!
  So you mean for a 100*200 image, sobel in x-direction, plots 100 functions for each row of the image, then takes the derivative of each row, and so on?
  And also does the same for each column in y-direction?
  
  If I got it true, do you know what is the next step of the algorithm(just like to know)
Answers.UserDisplayName: user3486308
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-11T04:45:30.913Z
Answers.Text: @Hasani I edited the answer, hopefully adressing your remarks.
Answers.UserDisplayName: bukwyrm
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-18T02:20:55.160Z
Answers.Text: Applying the word DERIVATIVE to the output of a process to characterize image change is NOT a misnomer. Rather post(s) in the dsp.stackexchange thread are apparently incorrectly using the term. The diagram and description you provided describes what is called an DIFFERENCE SEQUENCE. It is, as you say, applied to either ORTHOGONAL or DIAGONAL slices. It was a design component used by early 1D bar code readers. DERIVATIVE matrices (x-y) or cubes (x-y-time) can be developed using Hamming, trapezoidal, or other windowing along with 2/3D splines or FFTs. (Not all DSP programs are well designed.)
Answers.UserDisplayName: Douglas Daseeco
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-08T15:11:32.720Z
Answers.LastActivityDate: 2018-06-11T11:00:02.650Z
Answers.LastEditDate: 2018-06-11T11:00:02.650Z
Answers.UserDisplayName: bukwyrm
Answers.Body: <p>The term <strong><code>Derivative of an Image</code></strong> in the context you mention has two meanings.</p>
  
  <ol>
  <li>A matrix, image, or floating point number that is derived from an image via convolution, passing the image through a two dimensional NN, the application of an FFT analysis, or some other process.  In this context, the word <strong>Derivative</strong> implies the direction of calculation: Image B is derived from image A.</li>
  <li>A matrix or cube that represents the rate of change at in the image being processed.  The change being measured between only two adjacent pixels in a single dimension and only one direction at a time, but the applications of this technique is very limited, and such a sequence is of differences, not at all reasonable approximations of the derivative of light.  What is more useful in real recognition systems are two dimensional or hexagonal windowing (Gausian, Hamming, Hanning, trapazoidal, cosine, ...) across space and, for video, through time.  The calculus term derivative should always reference the theoretical surface being approximated using these techniques, not the discrete matrix or cube that approximates the surface.</li>
  </ol>
  
  <p>Such multidimensional convolution and neural network based approaches are less sensitive to capture noise and orientation nuances.  Two dimensional whole image or windowed FFT techniques have met with much success because filtering the expected frequency range of features to be detected is merely an attenuation process.  Two and three dimensional splines can also be tuned to be useful in the detection of features in an orientation independent way.</p>
  
  <p>In addition to gray scale analysis, color and transparency channels can be selected for independent or parallel analysis or added to the dimension of the fitting model from which the derivative is taken.</p>
  
  <p>Advances in deep networks have blossomed into a new area of image processing and recognition research, bringing new hope to robotics, automated transportation, and cybernetics in general.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-09T07:28:33.623Z
Answers.Text: Thank you FauChristian, I updated my question, maybe clarifies what exactly I asked.
Answers.UserDisplayName: user3486308
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-08T19:27:35.613Z
Answers.LastActivityDate: 2018-06-18T02:50:23.553Z
Answers.LastEditDate: 2018-06-18T02:50:23.553Z
Answers.UserDisplayName: Douglas Daseeco
Body: <p>I am reading a book about OpenCV, it speaks about some derivative of images like <code>sobel</code>. I am confused about image derivative! What is derived from? How can we derived from an image? I know we consider an image(1-channel) as a n*m matrix with 0 to 255 intensity numbers. How can we derive from this matrix?</p>
  <p>EDIT: a piece of text of the book:</p>
  <blockquote>
  <p>Derivatives   and Gradients</p>
  <p>One   of  the most    basic   and important   convolutions    is  computing   derivatives
  (or   approximations  to  them).  There   are many    ways    to  do  this,   but only    a   few
  are   well    suited  to  a   given   situation.</p>
  <p>In    general,    the most    common  operator    used    to  represent   differentiation is  the
  Sobel derivative  operator.   Sobel
  operators exist   for any order   of  derivative  as  well    as  for mixed   partial
  derivatives   (e.g.,  ∂ 2 /∂x∂y).</p>
  </blockquote>
  
Tags: <image-recognition>
Title: What does it mean "derivative of an image"?
UserDisplayName: user3486308
ThreadText: # What does it mean "derivative of an image"?
  
  (Asked by: username_0 on 2018-06-08)
  
  I am reading a book about OpenCV, it speaks about some derivative of images like `sobel`. I am confused about image derivative! What is derived from? How can we derived from an image? I know we consider an image(1-channel) as a n\*m matrix with 0 to 255 intensity numbers. How can we derive from this matrix?
  
  EDIT: a piece of text of the book:
  
  > Derivatives and Gradients
  >
  > One of the most basic and important convolutions is computing derivatives
  > (or approximations to them). There are many ways to do this, but only a few
  > are well suited to a given situation.
  >
  > In general, the most common operator used to represent differentiation is the
  > Sobel derivative operator. Sobel
  > operators exist for any order of derivative as well as for mixed partial
  > derivatives (e.g., ∂ 2 /∂x∂y).
  
  **Tags:** image-recognition
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-06-08. Score: 2 | Accepted answer
  
  Imagine a line laid through the image. All pixels along the line count as values, so you can graph the pixels along the line like a function.
  
  The derivative is of that 'function'. A black picture and a white picture have the same derivative (0), but a black-fading-to grey image would have a constant derivative bigger or smaller than zero, depending on the direction of the line in relation to the fading. Hard contrasts have huge derivarives at the points in the line where the line crosses a white/black border. Usually the rows and columns are used as the lines, but you could also lay any oblique line, and some algorithms do.
  
  The term 'derivative' is somewhat a misnomer in this case, as usually the pixel values do net get fitted by a function of which then a derivative is taken, but the 'derivative' is directly taken by looking at the differences from one pixel to it's neighbor.
  
  There is a [thread](https://dsp.stackexchange.com/questions/16805/1d-first-order-derivative-mask) in dsp.stackexchange that deals with this, the following illustrative picture is from there:
  [![enter image description here](https://i.sstatic.net/r2bUi.png)](https://i.sstatic.net/r2bUi.png)
  
  > **Comments:**
  > **username_0**: Thank you bukwyrm! So you mean for a 100*200 image, sobel in x-direction, plots 100 functions for each row of the image, then takes the derivative of each row, and so on? And also does the same for each column in y-direction?  If I got it true, do you know what is the next step of the algorithm(just like to know)  
  > **username_1**: @Hasani I edited the answer, hopefully adressing your remarks.  
  > **username_2**: Applying the word DERIVATIVE to the output of a process to characterize image change is NOT a misnomer. Rather post(s) in the dsp.stackexchange thread are apparently incorrectly using the term. The diagram and description you provided describes what is called an DIFFERENCE SEQUENCE. It is, as you say, applied to either ORTHOGONAL or DIAGONAL slices. It was a design component used by early 1D bar code readers. DERIVATIVE matrices (x-y) or cubes (x-y-time) can be developed using Hamming, trapezoidal, or other windowing along with 2/3D splines or FFTs. (Not all DSP programs are well designed.)  
  
  ---
  
  ### Answer by username_2 on 2018-06-08. Score: 4
  
  The term **`Derivative of an Image`** in the context you mention has two meanings.
  
  1. A matrix, image, or floating point number that is derived from an image via convolution, passing the image through a two dimensional NN, the application of an FFT analysis, or some other process. In this context, the word **Derivative** implies the direction of calculation: Image B is derived from image A.
  2. A matrix or cube that represents the rate of change at in the image being processed. The change being measured between only two adjacent pixels in a single dimension and only one direction at a time, but the applications of this technique is very limited, and such a sequence is of differences, not at all reasonable approximations of the derivative of light. What is more useful in real recognition systems are two dimensional or hexagonal windowing (Gausian, Hamming, Hanning, trapazoidal, cosine, ...) across space and, for video, through time. The calculus term derivative should always reference the theoretical surface being approximated using these techniques, not the discrete matrix or cube that approximates the surface.
  
  Such multidimensional convolution and neural network based approaches are less sensitive to capture noise and orientation nuances. Two dimensional whole image or windowed FFT techniques have met with much success because filtering the expected frequency range of features to be detected is merely an attenuation process. Two and three dimensional splines can also be tuned to be useful in the detection of features in an orientation independent way.
  
  In addition to gray scale analysis, color and transparency channels can be selected for independent or parallel analysis or added to the dimension of the fitting model from which the derivative is taken.
  
  Advances in deep networks have blossomed into a new area of image processing and recognition research, bringing new hope to robotics, automated transportation, and cybernetics in general.
  
  > **Comments:**
  > **username_0**: Thank you FauChristian, I updated my question, maybe clarifies what exactly I asked.  
  
  ---
  
  