basics.rst 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. Basics
  2. ------
  3. Here are basic concepts that might help to understand documentation
  4. written in this folder:
  5. Convolution
  6. ~~~~~~~~~~~
  7. The simplest way to look at this is "tweaking the input so that it would
  8. look like the shape provided". What exact tweaking is applied depends on
  9. the kernel.
  10. --------------
  11. Filters, kernels, weights
  12. ~~~~~~~~~~~~~~~~~~~~~~~~~
  13. Those three words usually mean the same thing, unless context is clear
  14. about a different usage. Simply put, they are matrices, that are used to
  15. achieve certain effects on the image. Lets consider a simple one, 3 by 3
  16. Scharr filter
  17. ``ScharrX = [1,0,-1][1,0,-1][1,0,-1]``
  18. The filter above, when convolved with a single channel image
  19. (intensity/luminance strength), will produce a gradient in X
  20. (horizontal) direction. There is filtering that cannot be done with a
  21. kernel though, and one good example is median filter (mean is the
  22. arithmetic mean, whereas median will be the center element of a sorted
  23. array).
  24. --------------
  25. Derivatives
  26. ~~~~~~~~~~~
  27. A derivative of an image is a gradient in one of two directions: x
  28. (horizontal) and y (vertical). To compute a derivative, one can use
  29. Scharr, Sobel and other gradient filters.
  30. --------------
  31. Curvature
  32. ~~~~~~~~~
  33. The word, when used alone, will mean the curvature that would be
  34. generated if values of an image would be plotted in 3D graph. X and Z
  35. axises (which form horizontal plane) will correspond to X and Y indices
  36. of an image, and Y axis will correspond to value at that pixel. By
  37. little stretch of an imagination, filters (another names are kernels,
  38. weights) could be considered an image (or any 2D matrix). A mean filter
  39. would draw a flat plane, whereas Gaussian filter would draw a hill that
  40. gets sharper depending on it's sigma value.