A novel method for constructing HSV spatial models

By converting the RGB space to the HSV space using a novel HSV space model, the problem of separating hue, brightness, and saturation in low-light image enhancement using the RGB space is solved, thus achieving effective enhancement of high-saturation low-light images.

CN115690355BActive Publication Date: 2026-03-06NANJING UNIV OF POSTS & TELECOMM
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-08
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

The existing RGB color space makes it difficult to separate hue, brightness, and saturation in image processing, resulting in poor performance in low-light image enhancement. Data-driven methods require a large number of training images, which is difficult to implement.

Method used

A novel HSV spatial model is adopted to convert the image RGB space to HSV space. Hue, saturation and brightness are calculated by direct projection, which improves the enhancement effect of high saturation low light images.

Benefits of technology

It achieves effective separation of image color and illumination, improves the enhancement effect of high-saturation, low-light images, and the algorithm principle is easy to understand, with lower saturation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115690355B_ABST
    Figure CN115690355B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of pattern recognition, specifically a method for constructing a novel HSV space model that can effectively convert between the RGB space and the novel HSV space of an image. The method includes three steps: Step 1: Obtaining the RGB space of an image through image acquisition; Step 2: Obtaining a model for converting the RGB space to the novel HSV space; Step 3: Obtaining a model for converting the novel HSV space obtained in Step 2 back to the RGB space. This invention fully considers the relationship between the RGB and HSV spaces of an image, improves the original HSV space, and enables the mutual conversion of color images between the RGB and novel HSV spaces.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of pattern recognition, specifically a method for constructing a novel HSV spatial model that enables effective conversion between image RGB space and the novel HSV space. Background Technology

[0002] Most everyday color images are encoded using the RGB color space. The RGB color space is based on three primary colors: Red (R), Green (G), and Blue (B), which are superimposed to varying degrees to produce a rich and wide range of colors; hence, it's commonly known as the three-primary-color model. However, the RGB color space is generally not used in scientific research because it represents hue, brightness, and saturation together, making them difficult to separate. Therefore, while the RGB color space is suitable for display systems, it is not suitable for image processing.

[0003] The HSV (Hue, Saturation, Value) color space model uses H, S, and V to describe color characteristics. H defines the frequency of a color, called hue; S represents the lightness or darkness of a color, called saturation; and V represents the intensity or value of light. It is closer to people's perceptual experience of color than RGB. It intuitively expresses the hue, vividness, and brightness of a color, facilitating color comparison. Therefore, the HSV space is widely used in image processing.

[0004] The novel HSV spatial model is an effective technique for converting images from RGB space to HSV space. It uses a circular projection surface and calculates hue, saturation, and brightness through direct projection. It is characterized by its easy-to-understand principle and lower saturation. This method can significantly improve the enhancement effect of high-saturation, low-light images.

[0005] Low-light image enhancement has long been a crucial topic in pattern recognition, leading researchers to propose and develop numerous methods with significant implications and practical value. These methods can be broadly categorized into two types based on their technical characteristics: data-driven methods and model-driven methods. Data-driven methods train deep neural networks using large-scale image training, enabling them to generate normally lit images of low-light conditions. However, this requires a large number of high-quality training images, which are often difficult to obtain in practical applications. Model-driven methods, on the other hand, convert the image from RGB to HSV space, enhance the illumination channel V, and then convert the processed HSV image back to RGB space, achieving good enhancement results. A novel HSV space model exhibits lower saturation. Summary of the Invention

[0006] The purpose of this invention is to provide a novel method for constructing an HSV spatial model, which can effectively convert between the RGB space of an image and the novel HSV space of an image. This invention differs from the original HSV spatial model and proposes a direct and effective novel HSV spatial model.

[0007] The specific technical solution adopted in this invention is as follows:

[0008] A novel method for constructing an HSV spatial model includes the following steps:

[0009] Step 1: Obtain the RGB color space of the image through image acquisition. R represents the Red channel, G represents the Green channel, and B represents the Blue channel. {r, g, b} represent any color point in the RGB color space, where r represents the red component value, g represents the green component value, and b represents the blue component value. The R channel of the RGB color space is composed of the r component values ​​of all color points in the image; the G channel is composed of the g component values; and the B channel is composed of the b component values.

[0010] Step 2: Obtain the model for converting the image from RGB space to the new HSV space. H represents the hue channel, S represents the saturation channel, and V represents the value channel in the new HSV space. {h, s, v} represent any color point in the new HSV space, where h represents the hue component value, s represents the saturation component value, and v represents the value of the value. The H channel in the new HSV space is composed of the h component values ​​of all color points in the image; the S channel is composed of the s component values; and the V channel is composed of the v component values.

[0011] The specific process is as follows:

[0012] Procedure 2.1: The luminance component value v of color points in the new HSV space of the image is defined as follows:

[0013] v = max(r, g, b) (1)

[0014] Where r, g, and b are the red, green, and blue component values ​​of the color points in the RGB space of the image in step two, respectively. max(r,g,b) means taking the maximum value among {r,g,b}.

[0015] Procedure 2.2: The saturation component value s of color points in the new HSV space of the image is defined as follows:

[0016]

[0017] Where v is the luminance component value of the color point in the new HSV space of the image obtained in process 2.1.

[0018] Step 2.3: Based on the relative values ​​of the r, g, and b components of the color points in the RGB space of the image from Step 1, six intervals can be constructed: r > g ≥ b, g ≥ r > b, g > b ≥ r, b ≥ g > r, b > r ≥ g, and r ≥ b > g. The hue component value h of the color points in the new HSV space of the image is calculated in each of these six intervals. The hue component value h is defined as follows:

[0019]

[0020] Equations (1), (2), and (3) are models for converting any color point {r, g, b} in the RGB space of an image into its corresponding color point {h, s, v} in the new HSV space. Once all color points in the RGB space of an image are converted into color points in the new HSV space, the H, S, and V channels of the new HSV space can be obtained.

[0021] Step 3: Obtain the model for converting the image's new HSV space to RGB space obtained in Step 2. By solving equations (1), (2), and (3) in Step 2, the model for converting the image's new HSV space to RGB space can be obtained as follows:

[0022]

[0023]

[0024]

[0025] Equations (4), (5), and (6) convert any color point {h, s, v} in the new HSV space of the image into the corresponding color point {r, g, b} in the RGB space of the image. After all the color points in the new HSV space of the image are converted into the corresponding color points in the RGB space of the image, the R, G, and B channel values ​​of the RGB space of the image can be obtained.

[0026] The beneficial effects of this invention are as follows: This invention converts the image RGB space to a novel HSV space. Compared with the traditional HSV space, the principle of this invention is easier to understand, and the saturation is lower, which is of great value in improving the performance of high-saturation low-light image enhancement. This invention addresses the separation of image color and illumination in low-light image enhancement by improving the traditional HSV space model based on line segment scaling to a novel HSV space model, achieving lower saturation while effectively implementing the algorithm. This invention can significantly improve the enhancement effect of high-saturation low-light images. Based on practical application effects, the algorithm principle of this invention is easy to understand and has low saturation. Attached Figure Description

[0027] Figure 1 This is a flowchart of the overall process of the method of the present invention.

[0028] Figure 2 This is a geometric relationship diagram between the RGB space and the new HSV space of the image.

[0029] Figure 3 A geometrical diagram of the projection surface of the novel HSV space. Detailed Implementation

[0030] To enhance understanding of the present invention, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. These embodiments are only used to explain the invention and do not limit the scope of protection of the invention.

[0031] Example: A novel method for constructing an HSV spatial model, the flowchart of which is shown below. Figure 1 As shown, the specific steps include:

[0032] Step 1: Obtain the RGB color space of the image through image acquisition. R represents the Red channel, G represents the Green channel, and B represents the Blue channel. {r, g, b} represent any color point in the RGB color space, where r represents the red component value, g represents the green component value, and b represents the blue component value. The R channel of the RGB color space is composed of the r component values ​​of all color points in the image; the G channel is composed of the g component values; and the B channel is composed of the b component values.

[0033] Step 2: Obtain a model for converting the image from RGB space to the new HSV space. Figure 2 It is a geometric relationship diagram between the RGB space of an image and the new HSV space of an image. Figure 2 In the diagram, O is the origin of the three-dimensional coordinate system. Let represent the red component axis, green component axis, and blue component axis, respectively. The RGB space of an image is composed of these three color component axes. P is any color point in the RGB space of the image, and the red, green, and blue component values ​​of point P are {r, g, b}. The color point P is represented as P(r, g, b). Let O represent the vector formed by connecting points O and S. For the brightness axis, The length is expressed as With T as the center, A circle with radius is represented as a circle. Figure 2 middle, and vertical, With circle vertical, With circle They are on the same plane. Figure 3 This is a schematic diagram of the projection plane geometry in the novel HSV space of an image. Figure 3 The circle in the middle that is Figure 2 The circle in the middle θ H express and The counterclockwise angle between them, and 0 ≤ θ H ≤360°.

[0034] H represents the hue channel, S represents the saturation channel, and V represents the value channel in the new HSV image space. {h, s, v} represent any color point in the new HSV image space, where h represents the hue component value, s represents the saturation component value, and v represents the value of the value. The H channel of the new HSV image space is composed of the h component values ​​of all color points in the image; the S channel is composed of the s component values; and the V channel is composed of the v component values.

[0035] The specific process is as follows:

[0036] Procedure 2.1: The luminance component value v of color points in the new HSV space of the image is defined as follows:

[0037] v = max(r, g, b) (1)

[0038] Where r, g, and b are the red, green, and blue component values ​​of the color points in the RGB space of the image in step 2. max(r,g,b) represents taking the maximum value among {r,g,b}.

[0039] Procedure 2.2: The saturation component value s of color points in the new HSV space of the image is defined as follows:

[0040]

[0041] Where v is the luminance component value of the color point in the new HSV space of the image obtained in step 2.1. for Figure 3 P(r,g,b) to the brightness axis distance, for Figure 3 Middle circle The radius.

[0042] Step 2.3: Based on the relationship between the r, g, and b component values ​​of the RGB color points in the image from step 2, six intervals can be constructed: r > g ≥ b, g ≥ r > b, g > b ≥ r, b ≥ g > r, b > r ≥ g, and r ≥ b > g. Figure 3 As shown, the hue component values ​​h of the color points in the new HSV space of the image are calculated in six intervals, and expressed as follows:

[0043]

[0044] θ represents and The angle between them, where 0 ≤ θ ≤ 180°, gives us:

[0045]

[0046] Depend on and The formula for the cosine of the angle between them is:

[0047]

[0048] Thus, the hue h can be calculated and represented as:

[0049]

[0050] Equations (1), (2), and (6) are models for converting any color point {r, g, b} in the RGB space of an image into its corresponding color point {h, s, v} in the new HSV space. Once all color points in the RGB space of an image are converted into their corresponding color points in the new HSV space, the H, S, and V channels of the new HSV space can be obtained.

[0051] Step 3: Obtain the model for converting the image's new HSV space obtained in Step 2 to the image's RGB space. By solving equations (1), (2), and (6) in Step 2, the model for converting the image's new HSV space to the image's RGB space can be obtained as follows:

[0052]

[0053]

[0054]

[0055] Equations (7), (8), and (9) convert any color point {h, s, v} in the new HSV space of the image into the corresponding color point {r, g, b} in the RGB space of the image. After all the color points in the new HSV space of the image are converted into the corresponding color points in the RGB space of the image, the R, G, and B channels of the RGB space of the image can be obtained.

[0056] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for constructing a new HSV space model, characterized in that, The method comprises the following steps: Step one, obtaining image RGB space through image acquisition; Step two, obtaining the model of image RGB space conversion to new HSV space; Step three, obtaining the model of image new HSV space conversion to RGB space in step two; In the step one, R represents the red channel of image RGB space, G represents the green channel of image RGB space, B represents the blue channel of image RGB space, and {r, g, b} represents any color point of image RGB space, wherein r represents the red component value of the color point, g represents the green component value of the color point, and b represents the blue component value of the color point, the R channel of image RGB space is composed of the r component value of all color points of the image, the G channel of image RGB space is composed of the g component value of all color points of the image, and the B channel of image RGB space is composed of the b component value of all color points of the image; In the step two, H represents the hue channel of image new HSV space, S represents the saturation channel of image new HSV space, and V represents the brightness channel of image new HSV space, and {h, s, v} represents any color point of image new HSV space, wherein h represents the hue component value of the color point, s represents the saturation component value of the color point, and v represents the brightness component value of the color point, the H channel of new HSV space is composed of the h component value of all color points of the image, the S channel of new HSV space is composed of the s component value of all color points of the image, and the V channel of new HSV space is composed of the v component value of all color points of the image; In the step two, the specific process is as follows: Process 2.1: defining the brightness component value v of the color point in the image new HSV space: Process 2.2: defining the saturation component value s of the color point in the image new HSV space: Process 2.3: according to the size relationship of the r, g and b component values of the color point in the image RGB space in step one, six intervals are constructed, which are r>g≥b, g>r>b, g>b>r, b>g>r, b>r>g and r>b>g, and the hue component value h of the color point in the new HSV space is obtained in the six intervals, and the hue component value h is defined, and after all color points of the image RGB space are converted into corresponding color points of the image new HSV space, the H, S and V three channels of the image new HSV space can be obtained; In the step two, process 2.1: the brightness component value v of the color point in the image new HSV space is defined as follows: v=max(r, g, b) (1) Wherein r, g and b are respectively the red component value, the green component value and the blue component value of the color point in the image RGB space in step one, and max(r, g, b) represents the maximum value in {r, g, b}; In the step two, process 2.2: the saturation component value s of the color point in the image new HSV space is defined as follows: Wherein v is the brightness component value of the color point in the image new HSV space obtained in process 2.

1. In the step two, the process 2.3: according to the size relationship of the r, g, b component values of the color points in the image RGB space in the step one, six intervals are constructed, which are r>g>=b, g>=r>b, g>b>=r, b>=g>r, b>r>=g, r>=b>g, the hue component value h of the color points in the new HSV space is obtained in the six intervals respectively, and the hue component value h is defined as follows: The formula (1), the formula (2) and the formula (3) are the model for converting any color point {r, g, b} in the image RGB space into the corresponding color point {h, s, v} in the new image HSV space, and when all the color points in the image RGB space are converted into the corresponding color points in the new image HSV space, the H, S and V three channels of the new image HSV space can be obtained.

2. The method of constructing a new HSV space model according to claim 1, wherein, In the step three, the model for converting the new HSV space into the RGB space is obtained by solving the formula (1), the formula (2) and the formula (3) in the step two as follows: The formula (4), the formula (5) and the formula (6) convert any color point {h, s, v} in the new HSV space into the corresponding color point {r, g, b} in the image RGB space, and when all the color points in the new HSV space are converted into the corresponding color points in the image RGB space, the R, G and B three channels of the image RGB space can be obtained.

Citation Information

Patent Citations

  • Method for enhancing color image

    CN101742339A