Computer pipeline
What we want with preprocessing?
- Enhance the most important parts of an image
Typical preprocessing methods?
Gray images?
- The location of each pixel is a X Y coordinate. X increases to the right and Y increases downwards
Opencv
- It reads images in BGR
Why use HSV?
High pass filters
- Convolutional kernels or windows. Normally the sum of the coefficients is 0
Low pass filters
- The kernel is a matrix full of ones and the values are averaged. Smooth the image
Frequency in images
Important open cv functions
Gradients
Gradients are a measure of intensity change in an image, and they generally mark object boundaries and changing area of light and dark. If we think back to treating images as functions, F(x, y), we can think of the gradient as a derivative operation F ’ (x, y). Where the derivative is a measurement of intensity change.
Sobel filters
The Sobel filter is very commonly used in edge detection and in finding patterns in intensity in an image. Applying a Sobel filter to an image is a way of taking (an approximation) of the derivative of the image in the x or y direction.
Magnitude
Sobel also detects which edges are strongest. This is encapsulated by the magnitude of the gradient; the greater the magnitude, the stronger the edge is. The magnitude, or absolute value, of the gradient is just the square root of the squares of the individual x and y gradients. For a gradient in both the x and y directions, the magnitude is the square root of the sum of the squares.
How to produce good edge and canny detector?