A method for constructing an HSV3S space model
By using the HSV3S space model, the image RGB space is converted to HSV3S space. The algorithm is simplified by using a three-interval model, which solves the problem of low conversion efficiency between image RGB space and HSV3S space in the existing technology. This achieves fast and effective separation of image color and illumination, and improves the image enhancement effect in low light.
Patent Information
- Application Number
- CN202211391589.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-08
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2042-11-08
AI Technical Summary
Existing technologies struggle to efficiently convert between RGB and HSV3S image spaces, especially under low-light conditions. Data-driven methods require a large number of training images, while model-driven methods have limited effectiveness in enhancing the illumination channel.
The HSV3S spatial model is used to convert the image RGB space to HSV3S space. The model is simplified to a three-interval HSV3S spatial model based on the lightness, saturation and hue channels. The calculation formulas for the lightness component value v, saturation component value s and hue component value h are included to achieve fast conversion.
It improves the speed and effectiveness of image color and illumination separation, simplifies the algorithm, enhances the performance of high-saturation, low-light image enhancement, and achieves better image enhancement results.
Smart Images

Figure BDA0003932043080000021 
Figure BDA0003932043080000031 
Figure BDA0003932043080000032
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of pattern recognition, and particularly relates to a construction method of an HSV3S space model, which can more efficiently realize conversion between an image RGB space and an image HSV3S space. BACKGROUND
[0002] Most of the color images that can be seen in daily life are encoded in an RGB color space. The RGB color space is based on three basic colors of red R (Red), green G (Green) and blue B (Blue), and produces rich and extensive colors through different degrees of superposition, so it is commonly known as a three-primary color mode. However, the RGB color space is generally not used in scientific research because it is difficult to separate the three quantities of hue, brightness and saturation together, so the RGB color space is suitable for display systems but not for image processing.
[0003] An HSV (Hue, Saturation, Value) color space model describes color characteristics by using H, S and V, wherein H defines the frequency of color, which is called hue; S represents the depth of color, which is called saturation; and V represents the intensity of light or brightness. The HSV color space model is closer to people's experience of color perception than the RGB color space, and can intuitively express the hue, brightness and darkness of color, and facilitate color comparison. Therefore, the HSV space is more commonly used in image processing.
[0004] For a long time, low-light image enhancement has been an important topic in the field of pattern recognition, and researchers have proposed and developed many methods with significant significance and application value. According to technical characteristics, the methods can be divided into two categories: data-driven methods and model-driven methods. The data-driven method uses a large number of images to train a deep neural network, so that the deep neural network can generate normal-light images from low-light images. The data-driven method requires a large number of high-quality training images, which are difficult to obtain in actual applications. Therefore, the data-driven method cannot efficiently realize conversion between an image RGB space and an image HSV3S space. The model-driven method converts an image RGB space to an HSV space, enhances the light channel V, and then converts the processed HSV space image to an RGB space, which has a good enhancement effect. The HSV3S space model has a faster speed and smaller saturation. SUMMARY
[0005] The application aims to provide a construction method of an HSV3S space model, which can more efficiently realize conversion between an image RGB space and an image HSV3S space.
[0006] The application adopts the following specific technical scheme:
[0007] A method for constructing a HSV3S space model, specifically comprising the following steps:
[0008] Step 1: Obtain an image RGB space through image acquisition. R (Red) represents the red channel of the image RGB space, G (Green) represents the green channel of the image RGB space, and B (Blue) represents the blue channel of the image RGB space. {r, g, b} represents any one color point in the 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 the image RGB space is composed of the r component values of all color points of the image, the G channel of the image RGB space is composed of the g component values of all color points of the image, and the B channel of the image RGB space is composed of the b component values of all color points of the image.
[0009] Step 2: Obtain the model of converting the image RGB space to the HSV3S (HSV with 3 Sectors) space. H (Hue) represents the hue channel of the image HSV3S space, S (Saturation) represents the saturation channel of the image HSV3S space, and V (Value) represents the brightness channel of the image HSV3S space. {h, s, v} represents any one color point in the image HSV3S 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 the image HSV3S space is composed of the h component values of all color points of the image, the S channel of the image HSV3S space is composed of the s component values of all color points of the image, and the V channel of the image HSV3S space is composed of the v component values of all color points of the image.
[0010] The specific process is as follows:
[0011] Process 2.1: The brightness component value v of a color point in the image HSV3S space is defined as follows:
[0012] v = max(r, g, b) (1)
[0013] Wherein r, g, and b are the red component value, green component value, and blue component value of the color point in the image RGB space in step 1, respectively. max(r, g, b) represents the maximum value in {r, g, b}.
[0014] Process 2.2: The saturation component value s of a color point in the image HSV3S space is defined as follows:
[0015]
[0016] Wherein v is the brightness component value of the color point in the image HSV3S space obtained in process 2.1.
[0017] Flow 2.3: According to the relationship between the value of the lightness component value v and the r, g, b component values in flow 2.1, three intervals can be constructed, which are v=r, v=g, and v=b. The hue component value h of the color point in the image HSV3S space is calculated in the three intervals respectively, and the hue component value h is defined as follows:
[0018]
[0019] Formula (1), formula (2) and 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 image HSV3S space. When all color points in the image RGB space are converted into the corresponding color points in the image HSV3S space, the H, S, and V three channels of the image HSV3S space can be obtained.
[0020] Step three: obtaining the model for converting the image HSV3S space obtained in step two into the RGB space. By solving formula (1), formula (2) and formula (3) in step two, the model for converting the image HSV3S space into the RGB space can be obtained as follows:
[0021]
[0022]
[0023]
[0024] Formula (4), formula (5) and formula (6) convert any color point {h, s, v} in the image HSV3S space into the corresponding color point {r, g, b} in the image RGB space. When all color points in the image HSV3S 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.
[0025] Advantages of the present application: compared with the traditional method, the present application converts the image RGB space into the HSV space, which is more concise and faster, and the saturation of the image in the HSV3S space is smaller, which is of great value for improving the performance of high-saturation weak-light image enhancement; the present application separates the image color and illumination in the weak-light image enhancement, improves the traditional six-interval HSV space model into a three-interval HSV3S space model, which simplifies the algorithm and obtains a smaller saturation; the present application can significantly improve the separation speed of the image color and illumination in the high-saturation weak-light image enhancement, and obtain an image with better enhancement effect; the present application is concise and efficient in calculation from the actual application effect. BRIEF DESCRIPTION OF DRAWINGS
[0026] Figure 1 It is the overall flowchart of the method of the present application.
[0027] Figure 2 is a geometric relationship diagram of image RGB space and image HSV3S space.
[0028] Figure 3 is a geometric diagram of projection surface of image HSV3S space. DETAILED DESCRIPTION
[0029] In order to deepen the understanding of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and examples, which are only used to explain the present application and do not constitute a limitation on the protection scope of the present application.
[0030] Embodiment: a method for constructing an HSV3S space model, the flow chart is as shown in Figure 1 The specific steps are as follows:
[0031] Step one: through image acquisition, obtain image RGB space. R (Red) represents the red channel of image RGB space, G (Green) represents the green channel of image RGB space, and B (Blue) represents the blue channel of image RGB space. {r, g, b} represents any one 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 values of all color points of the image, the G channel of image RGB space is composed of the g component values of all color points of the image, and the B channel of image RGB space is composed of the b component values of all color points of the image.
[0032] Step two: obtain the model of image RGB space converted to HSV3S (HSV with 3 Sectors) space. H (Hue) represents the hue channel of image HSV3S space, S (Saturation) represents the saturation channel of image HSV3S space, and V (Value) represents the brightness channel of image HSV3S space. {h, s, v} represents any one color point of image HSV3S 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 image HSV3S space is composed of the h component values of all color points of the image, the S channel of image HSV3S space is composed of the s component values of all color points of the image, and the V channel of image HSV3S space is composed of the v component values of all color points of the image.
[0033] Figure 2 is a geometric relationship diagram of image RGB space and HSV3S space. Figure 2 In the formula, O is the origin of a three-dimensional coordinate system, respectively, and the image RGB space is composed of the three color component axes of red, green and blue. P is any color point in the image RGB space, and the red, green and blue component values of the color point P are {r, g, b}, and the color point P is represented as P(r, g, b). represents the vector formed by connecting the point O and the point S, represents the brightness axis. M is the center of the hexagon AHQJFN, is the side length of the hexagon AHQJFN. Figure 2 in the middle, is perpendicular to is perpendicular to is perpendicular to the hexagon AHQJFN, is in the same plane as the hexagon AHQJFN. Figure 3 is a projection plane geometry diagram of the HSV3S space, Figure 3 the hexagon in the middle is Figure 2 the hexagon in the middle, when the P point is located in the sector HMJ (or the sector JMN, or the sector NMH), θ represents the counterclockwise included angle between the starting vector (or or ) and , and 0≤θ≤120°.
[0034] H (Hue) represents the hue channel of the image HSV3S space, S (Saturation) represents the saturation channel of the image HSV3S space, and V (Value) represents the brightness channel of the image HSV3S space. {h, s, v} represents any color point in the image HSV3S 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 the image HSV3S space is composed of the h component values of all color points of the image, the S channel of the image HSV3S space is composed of the s component values of all color points of the image, and the V channel of the image HSV3S space is composed of the v component values of all color points of the image. The specific process is as follows:
[0035] Step 2.1: The brightness component value v of the color point in the image HSV3S space is defined as follows:
[0036] v = max(r, g, b) (1)
[0037] wherein r, g and b are the red component value, green component value and blue component value of the color point in the image RGB space in step 2. max(r, g, b) represents the maximum value in {r, g, b}.
[0038] Step 2.2: The saturation component value s of the color point in the image HSV3S space is defined as follows:
[0039]
[0040] where v is the value of the lightness component of the color point in the image HSV3S space obtained in step 2.1. Figure 3 In the above formula, M is the center of the hexagon, and Q is the vertex of the hexagon. is the length of the line connecting the center M of the hexagon to the vertex Q.
[0041] Step 2.3: According to the size relationship of the r, g, b component values of the color point in the image RGB space in step 2, three sectors can be constructed, which are sector HMJ (v = r), sector JMN (v = g), and sector JMN (v = b), as shown in the following figure: Figure 3 The hue component value h of the color point in the image HSV3S space is calculated in the three sectors HMJ, JMN, and NMH, respectively, and is represented as follows:
[0042]
[0043] where θ represents the counterclockwise angle between the starting vector or or and , and 0 ≤ θ ≤ 120°. When v = r, the starting vector is When v = g, the starting vector is When v = b, the starting vector is
[0044] Equations (1), (2), and (3) are the models for converting any color point {r, g, b} in the image RGB space to the corresponding color point {h, s, v} in the image HSV3S space. When all color points in the image RGB space are converted to the corresponding color points in the image HSV3S space, the H, S, and V channels of the image HSV3S space can be obtained.
[0045] Step 3: Obtain the model for converting the image HSV3S space obtained in step 2 to the RGB space. By solving equations (1), (2), and (3) in step 2, the model for converting the image HSV3S space to the RGB space can be obtained as follows:
[0046]
[0047]
[0048]
[0049] The formula (4), formula (5) and formula (6) convert any one color point {h, s, v} of the image HSV3S space into the corresponding color point {r, g, b} of the image RGB space. When all the color points of the image HSV3S space are converted into the corresponding color points of the image RGB space, the R, G and B three channels of the image RGB space can be obtained.
[0050] The basic principles, main features and advantages of the present application are shown and described above. It should be understood by those skilled in the art that the present application is not limited by the above examples, and the above examples and descriptions in the specification are only to illustrate the principles of the present application. Without departing from the spirit and scope of the present application, various changes and improvements can be made to the present application, and these changes and improvements all fall within the scope of the present application. The scope of protection of the present application is defined by the appended claims and their equivalents.
Claims
1. A method of constructing a HSV3S space model, characterized by, Specifically comprising the following steps: Step one, through image acquisition, obtain the image RGB space; Step two, obtain the model of image RGB space conversion to HSV3S space; Step three: obtain the model of image HSV3S 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 set {r, g, b} represents any one 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 HSV3S space, S represents the saturation channel of image HSV3S space, and V represents the brightness channel of image HSV3S space, and set {h, s, v} represents any one color point of image HSV3S 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 image HSV3S space is composed of the h component value of all color points of the image, the S channel of image HSV3S space is composed of the s component value of all color points of the image, and the V channel of image HSV3S space is composed of the v component value of all color points of the image; The specific process of the step two is as follows: Process 2.1: define the brightness component value v of the color point in the image HSV3S space; Process 2.2: define the saturation component value s of the color point in the image HSV3S space; Process 2.3: according to the relationship between the value of brightness component value v in process 2.1 and the values of r, g and b component, three intervals are constructed, which are v=r, v=g and v=b, and the model of image RGB space conversion to HSV3S space is obtained; In the specific process 2.1 of the step two, the brightness component value v of the color point in the image HSV3S space is defined as follows: v=max(r, g, b) (1) Wherein r, g and b are respectively the red component value, green component value and 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 specific process 2.2 of the step two, the saturation component value s of the color point in the image HSV3S space is defined as follows: Wherein v is the brightness component value of the color point in the image HSV3S space obtained in process 2.
1.
2. The method of claim 1, wherein, In the specific process 2.3 of the step two, according to the relationship between the value of brightness component value v in process 2.1 and the values of r, g and b component, three intervals are constructed, which are v=r, v=g and v=b, and the hue component value h of the color point in the image HSV3S space is obtained in the three intervals respectively, and the hue component value h is defined as follows: The formula (1), formula (2) and formula (3) are models for converting any color point {r, g, b} in the image RGB space into a corresponding color point {h, s, v} in the image HSV3S space, and when all color points in the image RGB space are converted into corresponding color points in the image HSV3S space, H, S and V three channels of the image HSV3S space can be obtained.
3. The method of claim 2, wherein the HSV3S space model is constructed by, The specific process of the third step is as follows: by solving the formula (1), formula (2) and formula (3) in the second step, the model for converting the image HSV3S space into the RGB space is obtained as follows: The formula (4), formula (5) and formula (6) convert any color point {h, s, v} in the image HSV3S space into a corresponding color point {r, g, b} in the image RGB space, and when all color points in the image HSV3S space are converted into corresponding color points in the image RGB space, R, G and B three channels of the image RGB space can be obtained.
Citation Information
Patent Citations
Color eye fundus image enhancement method
CN113870141A