Study Dip 66th Day
Reprint please indicate the source of this article:Http://blog.csdn.net/tonyshengtan , out of respect for the work of the author, reprint please indicate the source! Article code is hosted, Welcome to co-development:Https://github.com/Tony-Tan/DIPpro
The opening crap.
Color space Introduction The last two are relatively close to the human perception of two space, color image processing behind the majority of the content used in the image of the basic processing, and if you want to learn image analysis, should start to learn some pattern recognition and machine learning algorithms, intends to start learning some recently, and open a new blog theme, Welcome to discuss ...
Today, two relatively close to the definition of color, human vision can only distinguish between the color of the three changes: brightness, hue, saturation, HSI and HSV is the relative variables, where H (hue) represents the hue, S (saturation) represents the saturation, i/v (intensity/ Value) represents the luminance/lightness. HSI and HSV are relative colors, but are used extensively in color image processing, and the following describes the two spaces, and their conversion to RGB space.
HSI Color space
Hue h (Hue): related to the wavelength of the light wave, it represents the human senses of different colors of the feelings, such as red, green, blue, etc., it can also represent a range of colors, such as warm, cool and so on.
Saturation s (saturation): Indicates the purity of the color, pure spectral color is fully saturated, adding white light will dilute the saturation. The greater the saturation, the brighter the color will look, and vice versa.
Luminance I (Intensity): corresponds to the brightness of the image and the grayscale of the images, which is the brightness of the color.
Conversion formulas for RGB and HSI conversions:
HSV Color Space
HSV models are commonly used in computer graphics applications. The HSV color wheel is often used in a variety of application environments where the user must select a color to apply to a particular graphic element. Where hue is represented as a ring; You can use a separate triangle to represent saturation and lightness. Typically, the vertical axis of this triangle indicates saturation, while the horizontal axis represents lightness. In this way, select a color to first select the hue in the ring, and select the desired saturation and lightness from the triangle.
Another visual method of the HSV model is the cone. In this representation, the hue is represented as an angle around the center axis of the cone, and the saturation is expressed as the distance from the centre of the cone's cross-section to the point, and the lightness is expressed as the distance from the center of the cone's cross-section to the vertex. Some representations use the six pyramid. This method is more suitable for displaying the HSV color space in a single object, but due to its three-dimensional nature, it is not suitable for color selection in a two-dimensional computer interface.
The HSV color space can also be expressed as a cylinder similar to the above cone, the hue changes along the outer circumference of the cylinder, and the saturation varies along the distance from the center of the cross-section, and the lightness follows the distance between the cross-section and the top surface. This representation may be considered to be a more accurate mathematical model of the HSV color space, but the number of levels of saturation and hue that can be distinguished in practice decreases as the luminosity approaches black. In addition, the computer typically uses a finite precision range to store the RGB values, which constrains the precision, coupled with the limitations of human color perception, making the cone more practical in most cases.
Conversion formula:
Rgb->hsv
Hsv->rgb
Summarize
Today the main introduction of HSX model, such color space and color definition corresponding to the color image processing in the back will be used in a large number.
Cond...
Color image--Color space HSI (HSL), HSV (HSB)