Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Camera Calibration

Camera calibration is the process of estimating and determining the internal parameters of the camera lens and sensor, with the purpose of undistorting the image and finding the parameters that describe how the camera projects 3D points onto a 2D image. The key aspects extracted from a calibration are:intrinsic and extrinsic parameters, distortion coefficients, rectification matrix
and projection matrix.

Intrinsic parametersare the internal characteristics of the camera and describes the camera
conversion from a 3D point in the real into a 2D image point. These parameters are described by
the matrix K shown on the right.


Where cx and cy are the coordinates of the optical sensor, which represent the image sensors ideal
center. The α corrects for any deviation from a 90°angle between the pixel rows and columns, and
is called the skew coefficient. Lastly, the fx and fy represents the focal lengths in the x and y
directions, and they determine how magnified the captured image is. A larger focal length would
result in a narrower field of view and vice versa.

Image Added

Extrinsic parametersinclude the rotational matrix, which represents the orientation of the cam-
era, and the translation vector, which describes the position of the camera in relation to the world
coordinates. The world coordinates can be extracted by transforming these coordinates.


Distortion coefficientsaccounts for lens distortion by taking radial and/or tangential distortion.
There are several model that that use different methods, such as ”Plumb bob” which include the
tangential and radial coefficients.

Plumb Bob

Image Added



Gaussian Blur

Gaussian blur is a technique used in image processing that involves smoothing the image by
reducing the noise and details.


By using the Gaussian function this is achieved as it convulses the image. Further the Gaussian
kernel is applied to each pixel in the image and averaging the pixel values with their neighbors,
weighted by the Gaussian function.


For more information on Gaussian blur, read chapter 4 in Machine Learning: https://cse.usf.edu/~r1k/MachineVisionBook/MachineVision.htm

Image Added


HSV and Contour filtering

HSV stands for Hue, Saturation, Value, and they represent the color space.


Hueis the color spectrum ranging from 0 to 360.
Saturationrepresents the vibrancy of the color and ranges from 0%(gray) to 100%(full
saturation)
Valueis the brightness and ranges from 0 to 100, where 0 is black and 100 is white.


Contouring is, in machine vision and image processing, detection, representation and analysis of
boundaries within digital images. Contour is known as the linked representation of edges inside a
region boundary, which could either be closed or open. With closed contours the region boundaries
are defined, and the pixels within can be identified with a filling algorithms. Open contour may
represent parts of the region boundaries. The region boundary can have gaps in them, which occur
when the contrast between the edges is insufficient along the boundary.This can happen if the
threshold for the edge detector is set too high or if the contrast is too weak along the boundary
compared to other areas of the image, making it difficult or even impossible to find a threshold
that works across the image uniformly.


For more documentation on contour, read chapter 6 in Machine Learning: https://cse.usf.edu/~r1k/MachineVisionBook/MachineVision.htm

Image Added

llustration of the HSV spectrum - taken from First robotic competition.©2024,
FIRST and other WPILib Contributors.Licensed under a Creative Commons Attribution 4.0
International License.

url: https://docs.wpilib.org/en/stable/docs/software/vision-processing/wpilibpi/image-thresholding.html