Image processing device
By using the graphic screen of the color wheel and the brightness bar in the image processing device, the user can specify and adjust the color range in the color image, solving the difficulty of specifying the color range in the color image in the prior art, and realizing the object area. Accurate extraction and intuitive adjustments.
Patent Information
- Application Number
- CN202010612747.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-07-19
- Filing Date
- 2020-06-30
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2040-06-30
AI Technical Summary
It is difficult to accurately extract object areas in color images with the existing technology, especially because the color range is difficult to specify due to the uneven brightness of the illumination light and the uneven color of the object.
Using an image processing device, by creating a graphic screen containing a color wheel and a brightness bar, the user can specify the range of colors in a two-dimensional color space and a one-dimensional brightness space, and use the mode switching unit to switch the display mode to intuitively adjust the hue and chroma. and lightness range to extract areas of specific colors.
It achieves accurate extraction of object areas in color images. Users can intuitively and easily adjust the color range to ensure that the extracted area contains the desired hue, chroma and brightness, improving the accuracy of image extraction.
Smart Images

Figure CN112243084B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an image processing device. Background Art
[0002] Conventionally, in order to specify a specific color among the colors included in a color image, a graphic representing a color space such as a color wheel and a bar is used (for example, see Patent Documents 1 to 4). A color is represented by three components. As the three components, hue, chroma, and brightness are used in Patent Documents 1 and 4, and hue, chroma, and brightness are used in Patent Documents 2 and 3. Each position of the graphic is displayed with a color corresponding to the position.
[0003] Prior art literature
[0004] Patent Literature
[0005] Patent Document 1: Japanese Patent Application Publication No. 2011-242877
[0006] Patent Document 2: Japanese Patent Application Publication No. 2009-044683
[0007] Patent Document 3: Japanese Patent Application Publication No. 2012-157080
[0008] Patent Document 4: Japanese Patent Application Publication No. 2012-070298 Summary of the invention
[0009] Problem that the invention aims to solve
[0010] The color of an object in a color image acquired by a color camera is not necessarily uniform due to the influence of uneven brightness of the illumination light, uneven color of the object itself, etc. The color of an object sometimes also varies from person to person. Therefore, when extracting an area of an object from a color image based on a specified color, it is necessary to specify a color range with a certain degree of width in order to accurately extract the area of the object. However, it is difficult to appropriately and easily specify the range of colors to be extracted based only on the graphics of the color space.
[0011] Solutions for solving problems
[0012] One embodiment of the present invention is an image processing device, which specifies a specific color among the colors contained in a color image, and the image processing device comprises: a graphic screen creation unit, which creates a first graphic screen and a second graphic screen; and a mode switching unit, which switches between a first display mode and a second display mode, the first display mode causes the first graphic screen to be displayed on a display unit, and the second display mode causes the second graphic screen to be displayed on the display unit, each of the first graphic screen and the second graphic screen includes: a color wheel, which is a circular graphic in a two-dimensional color space representing hue and saturation, and The circumferential position represents the hue, and the radial distance starting from the center represents the chroma; and a lightness bar, which is a band-shaped graphic of a one-dimensional color space representing the brightness, and the position in the length direction represents the brightness, in the first graphic picture, each position in the color wheel has a hue and chroma corresponding to the position, and each position in the lightness bar has a lightness corresponding to the position, and in the second graphic picture, the distribution of the hue and chroma of the colors contained in the color image in the two-dimensional color space is superimposed on the color wheel, and the distribution of the lightness of the colors contained in the color image in the one-dimensional color space is superimposed on the lightness bar. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 This is a block diagram showing the structure of an image processing device according to one embodiment.
[0014] Figure 2 This is a diagram showing an example of display of a color image, an extracted image, and a graphic screen on a display unit.
[0015] Figure 3 is a diagram showing an example of a color image.
[0016] Figure 4 It means from Figure 3 Figure 1. An example of an extracted image created from a color image.
[0017] Figure 5 FIG. 1 is a diagram showing an example of a first graphics screen displayed in the first display mode.
[0018] Figure 6 FIG. 1 is a diagram showing an example of a second graphics screen displayed in the second display mode.
[0019] Figure 7 FIG. 1 is a diagram showing another example of the second graphics screen displayed in the second display mode.
[0020] Figure 8 It means from Figure 3 Figure 2 is another example of an extracted image created from a color image.
[0021] Description of reference numerals:
[0022] 1: Image processing device
[0023] 3: Reference color designation unit
[0024] 4: Color range setting section
[0025] 5: Region extraction unit
[0026] 6: Graphics screen creation department
[0027] 7: Mode switching unit
[0028] 20: Display unit
[0029] A: Color image
[0030] B: Extract image
[0031] C1: First graphic screen
[0032] C2: Second graphic screen
[0033] E1, E2: Color wheel
[0034] E3: Hue area
[0035] F1, F2: Brightness bar
[0036] G1, G2: First boundary line
[0037] H1, H2: Second boundary line
[0038] I1, I2: The third boundary line
[0039] M1, M2: Marking DETAILED DESCRIPTION
[0040] Hereinafter, an image processing device 1 according to an embodiment will be described with reference to the drawings.
[0041] like Figure 1 As shown, the image processing device 1 is connected to a color camera 10 and a display unit 20, and receives a color image A from the color camera 10. Figure 2 As shown, the image processing device 1 outputs the color image A, the extracted image B created from the color image A, and one of the two graphic screens C1 and C2 to the display unit 20 and displays them on the display unit 20 .
[0042] like Figure 3 As shown in FIG. 1 , the color image A includes, for example, a plurality of objects D1, D2, D3, and D4 of different colors. The image processing device 1 specifies a specific color among the colors included in the color image A based on an input operation by a user, and performs the processing as shown in FIG. Figure 4 As shown, an extracted image B is created by extracting only a region D2 ′ having a specific color from a color image A.
[0043] like Figure 5 as well as Figure 6 As shown, the first graphic screen C1 includes a color wheel E1, a brightness bar F1, boundary lines G1, G2, H1, H2 arranged on the color wheel E1, and boundary lines I1, I2 arranged on the brightness bar F1. The second graphic screen C2 includes a color wheel E2, a brightness bar F2, boundary lines G1, G2, H1, H2 arranged on the color wheel E2, and boundary lines I1, I2 arranged on the brightness bar F2. As described later, the graphic screens C1 and C2 are created by the graphic screen creation unit 6 in the image processing device 1.
[0044] The color wheels E1 and E2 are circular graphics in a two-dimensional color space that represent hue and chroma. The hue gradually changes in the circumferential direction around the center of the color wheels E1 and E2. The chroma gradually increases from the center of the color wheels E1 and E2 toward the radial outside, and the center of the color wheels E1 and E2 is white. The circumferential position of the color wheels E1 and E2 represents the hue, and the radial distance from the center of the color wheels E1 and E2 represents the chroma.
[0045] The lightness bars F1 and F2 are strip-shaped graphics in a one-dimensional color space representing lightness. The lightness gradually changes along the length direction of the lightness bars F1 and F2. The position of the lightness bars F1 and F2 in the length direction represents the lightness.
[0046] The pair of boundary lines (first boundary lines) G1 and G2 are lines indicating the range of hue and are straight lines extending radially outward from the centers of the color wheels E1 and E2.
[0047] A pair of boundary lines (second boundary lines) H1 and H2 are lines indicating the range of chroma, and are concentric circles concentric with the color wheels E1 and E2.
[0048] A pair of boundary lines (third boundary lines) I1 and I2 are lines indicating the range of brightness and are straight lines extending in the width direction of the brightness bars F1 and F2.
[0049] like Figure 1 As shown, the image processing device 1 includes a receiving unit 2 , a reference color specifying unit 3 , a color range setting unit 4 , a region extracting unit 5 , a graphic screen creating unit 6 , and a mode switching unit 7 .
[0050] In one example, the image processing device 1 is a computer. That is, the image processing device 1 includes: a processor such as a central processing unit; and a storage unit having a RAM, a ROM, and other storage devices. In addition, the image processing device 1 includes input devices such as a mouse, a keyboard, and a touch panel as an input unit for a user to perform input operations on the image processing device 1. An image processing program is stored in the storage unit. The processor executes processing according to the image processing program to realize the functions of each unit 3, 4, 5, 6, and 7 described later.
[0051] The receiving unit 2 receives the color image A from the color camera 10 by wire or wirelessly. The color image A is sent from the receiving unit 2 to the area extracting unit 5 and the graphic screen creating unit 6. The color image A is output to the display unit 20 via the image processing device 1.
[0052] The reference color designation unit 3 sets a reference color used as a reference when extracting a region from the color image A based on an input operation of the user to the image processing device 1 .
[0053] For example, Figure 3 As shown in FIG. 1 , the user's input operation is an operation of selecting a rectangular range J from the color image A displayed on the display unit 20 using an input device such as a mouse. The rectangular range J can contain a plurality of colors with different hues, saturations, and brightness. The reference color designation unit 3 sets the average color of the colors contained in the rectangular range J as the reference color. Alternatively, the reference color designation unit 3 may set the reference color based on other methods, such as setting the color with the highest appearance frequency among the colors contained in the rectangular range J as the reference color. The user can designate the desired color as the reference color by selecting the rectangular range J that surrounds the area of the desired color from the color image A.
[0054] The user input operation for setting the reference color may also be an operation of inputting the hue, chroma, and brightness values of the reference color into the image processing device 1 using an input device such as a keyboard. Figure 5 as well as Figure 6 As shown, each graphic screen C1, C2 includes an area K for displaying the numerical values of the hue (tone), vividness (chroma), and brightness (brightness) of the reference color. The user can specify the desired color as the reference color by inputting the numerical values of the hue, chroma, and brightness of the desired color into the area K.
[0055] The color range setting unit 4 sets a color range including the reference color based on the reference color set by the reference color designating unit 3. That is, the color range setting unit 4 sets a range of hue, chroma, and lightness including the hue, chroma, and lightness of the reference color, respectively.
[0056] For example, the width of the hue range, the width of the chroma range, and the width of the lightness range are initially set. The color range setting unit 4 sets the hue range with the initially set width centered on the hue of the reference color, sets the chroma range with the initially set width centered on the chroma of the reference color, and sets the lightness range with the initially set width centered on the lightness of the reference color.
[0057] The color range setting unit 4 changes the ranges of hue, chroma, and brightness based on the input operation performed by the user to the image processing device 1. As described later, the boundary lines G1, G2, H1, H2, I1, and I2 are superimposed on the graphic screens C1 and C2 displayed on the display unit 20 according to the ranges set by the color range setting unit 4. For example, the user's input operation is as follows: using a mouse, the boundary lines G1, G2, H1, H2, I1, and I2 are dragged to an arbitrary position on the graphic screen C1 or C2 displayed on the display unit 20. The color range setting unit 4 changes the ranges of hue, chroma, and brightness according to the dragged positions of the boundary lines G1, G2, H1, H2, I1, and I2.
[0058] The user input operation for changing the range of hue, chroma and brightness may be an operation of inputting the range of hue, chroma and brightness to the image processing device 1 using an input device such as a keyboard. Figure 5 as well as Figure 6 As shown, each of the graphic screens C1 and C2 includes an area L for displaying the width of each range of hue, chroma, and lightness. The user can change the range of hue, chroma, and lightness by inputting a desired width into the area L.
[0059] The region extraction unit 5 creates an extracted image B from the color image A based on the color range set by the color range setting unit 4. Specifically, the region extraction unit 5 extracts a region D2' having a hue, chroma, and brightness within the range of hue, chroma, and brightness set by the color range setting unit 4 from the color image A, and creates an extracted image B showing only the extracted region D2'. For example, Figure 4 As shown, the extracted image B is a black-and-white image in which the background is displayed in black and only the extracted region D2 ′ is displayed in white. The extracted image B is sent from the region extracting unit 5 to the display unit 20 and is displayed on the display unit 20 .
[0060] If the ranges of hue, chroma, and brightness are changed by the user, the region extracted from the color image A by the region extraction unit 5 is also changed. The user can intuitively and easily determine the respective ranges of hue, chroma, and brightness of the entire extracted desired object D2 by changing the ranges of hue, chroma, and brightness while observing the extracted image B displayed on the display unit 20.
[0061] The graphic screen creation unit 6 creates a first graphic screen C1 and a second graphic screen C2, wherein the first graphic screen C1 shows the user the reference color and the second graphic screen C2 shows the user the distribution of the colors included in the color image A in the color space. The graphic screens C1 and C2 are output from the graphic screen creation unit 6 to the display unit 20 via the mode switching unit 7 and are displayed on the display unit 20. As described later, in the mode switching unit 7, only one of the graphic screens C1 and C2 is selected, and only the selected graphic screen C1 or C2 is output to the display unit 20.
[0062] As described above, the first graphic screen C1 includes the color wheel E1 and the lightness bar F1. Each position on the color wheel E1 is displayed with the hue and chroma represented by the position. Therefore, the color wheel E1 is a colorful graphic in which the hue gradually changes along the circumferential direction and the chroma gradually changes along the radial direction. Each position on the lightness bar F1 is displayed with the lightness represented by the position.
[0063] The graphic screen creation unit 6 adds marks M1 and M2 indicating the reference color set by the reference color designation unit 3 to the color wheel E1 and the lightness bar F1. Specifically, the graphic screen creation unit 6 adds a first mark M1 to the position indicating the hue and chroma of the reference color in the color wheel E1. The mark M1 is, for example, a white crosshair. In addition, the graphic screen creation unit 6 adds a second mark M2 to the position indicating the lightness of the reference color in the lightness bar F2. The mark M2 is, for example, an arrow.
[0064] As described above, the second graphic picture C2 includes the color wheel E2 and the brightness bar F2. The color wheel E2 is displayed in a uniform color, such as black.
[0065] The graphic screen creation unit 6 creates the distribution of the hue and chroma of the colors contained in the color image A in the two-dimensional color space, and superimposes the distribution on the color wheel E2. The distribution is a distribution diagram composed of multiple data points, and one data point represents a set of hue and chroma. Figure 3 In the case of a color image A, the colors contained in the color image A are roughly classified into five colors corresponding to the background and four objects D1, D2, D3, and D4. Therefore, clusters of data points are formed in five regions within the color wheel E2. Figure 6 In FIG. 1 , clusters are represented as white areas within the color wheel E2.
[0066] In addition, the graphic screen creation unit 6 creates a distribution of the brightness of the colors included in the color image A in a one-dimensional color space, and superimposes the distribution on the brightness bar F2. The distribution is a distribution graph composed of a plurality of data points, and one data point represents one brightness.
[0067] The data points are displayed in a color different from the color of the color wheel E2. For example, when the color wheel E2 is black, the data points are displayed in white.
[0068] Each data point on the color wheel E2 may also be displayed in shades corresponding to the frequency of occurrence of the combination of hue and chroma represented by the position of the data point in the color image A. Similarly, each data point on the lightness bar F2 may also be displayed in shades corresponding to the frequency of occurrence of the lightness represented by the position of the data point in the color image A. For example, the color of the data point is displayed in a gray scale. The closer the color of the data point is to white, the higher the frequency of occurrence of the combination of hue and chroma or lightness represented by the position of the data point; the closer the color of the data point is to black, the lower the frequency of occurrence of the combination of hue and chroma or lightness represented by the position of the data point.
[0069] The second graphic screen C2 may also have a hue region E3 in the form of a wheel on the outer periphery of the color wheel E2. The hue region E3 is a graphic of a color space showing a hue that gradually changes along the circumference, similar to the color wheels E1 and E2. Each position in the hue region E3 is displayed with the hue represented by the position. That is, the hue region E3 is a colorful graphic showing a color that gradually changes along the circumference, similar to the color wheel E1.
[0070] In addition, the graphic screen creation unit 6 superimposes the boundary lines G1, G2, H1, H2, I1, and I2 on the color wheels E1 and E2 and the lightness bars F1 and F2 based on the color range set by the color range setting unit 4. Specifically, the graphic screen creation unit 6 superimposes a pair of boundary lines G1 and G2 on the boundary of the range of hue in each color wheel E1 and E2, a pair of boundary lines H1 and H2 on the boundary of the range of chroma in each color wheel E1 and E2, and a pair of boundary lines I1 and I2 on the boundary of the range of lightness in each lightness bar F1 and F2. The graphic screen creation unit 6 changes the position of each boundary line G1, G2, H1, H2, I1, and I2 in response to the user's input operation to change the above-mentioned range of hue, chroma, and lightness.
[0071] The mode switching unit 7 switches between the first display mode and the second display mode based on the user's input operation to the image processing device 1. For example, each of the graphic screens C1 and C2 includes a mode selection bar N for the user to select a display mode. The user's input operation is as follows: using an input device such as a mouse to select either the first display mode or the second display mode from a drop-down menu displayed in the mode selection bar N. When the first display mode is selected, the mode switching unit 7 selects the first graphic screen C1 and displays the first graphic screen C1 on the display unit 20. On the other hand, when the second display mode is selected, the mode switching unit 7 selects the second graphic screen C2 and displays the second graphic screen C2 on the display unit 20.
[0072] Next, the operation of the image processing device 1 will be described.
[0073] The color image A acquired by the color camera 10 is displayed on the display unit 20 via the image processing device 1. In the initial state, the first display mode is selected by the mode switching unit 7, and the first graphic screen C1 is displayed on the display unit 20 together with the color image A.
[0074] The user performs an input operation to designate a reference color for extracting a desired object D2 from the color image A based on the color image A displayed on the display unit 20. For example, the user enables the input operation by clicking a "setting button" in the first graphic screen C1 with a mouse, and performs an input operation to designate the reference color using an input device. For example, the user sets a rectangular range J that surrounds a part of the object D2 to be extracted in the color image A with a mouse, thereby selecting the rectangular range J from the object D2 to be extracted in the color image A.
[0075] The reference color designation unit 3 sets the reference color based on the user's input operation, for example, based on the color included in the selected rectangular range J. The color range setting unit 4 automatically sets the range of hue, chroma, and lightness that respectively includes the hue, chroma, and lightness of the set reference color.
[0076] After the reference color and range are set, the graphics screen creation unit 6 adds the marks M1, M2 and the boundary lines G1, G2, H1, H2, I1, and I2 to the color wheel E1 and the lightness bar F1 in the first graphics screen C1. Then, the first graphics screen C1 with the marks M1, M2 and the boundary lines G1, G2, H1, H2, I1, and I2 is displayed on the display unit 20. In addition, the region extraction unit 5 creates an extracted image B in which only the object D2 is extracted from the graphics screen A, and the extracted image B is displayed on the display unit 20. In addition, the graphics screen creation unit 6 creates the distribution of hue and saturation and the distribution of lightness, and superimposes the distribution on the color wheel E2 and the lightness bar F2 in the second graphics screen C2.
[0077] The user uses the input device to perform an input operation for switching between the first display mode and the second display mode. As a result, the mode switching unit 7 switches between the first graphic screen C1 and the second graphic screen C2 displayed on the display unit 20 .
[0078] By selecting the first display mode, the user can refer to the reference color specified by the user on the color wheel E1 and can intuitively confirm the reference color. In addition, by selecting the second display mode, the user can intuitively and easily confirm whether the color of the object D2 to be extracted in the color image A is appropriately included in the set color range, and can intuitively adjust the color range.
[0079] Specifically, the user can check the hue, chroma, and brightness of the reference color based on the positions of the marks M1 and M2 on the color wheel E1 and the brightness bar F1.
[0080] In addition, the user can determine the cluster to which the reference color belongs in the distribution on the color wheel E2 and the lightness bar F2 based on the positions of the marks M1 and M2 on the color wheel E1 and the lightness bar F1. Furthermore, the user can confirm whether the currently set range of hue, chroma and lightness respectively includes the hue, chroma and lightness of all the objects D2 to be extracted based on the positional relationship between the distribution of the data points of the cluster to which the reference color belongs and the boundary lines G1, G2, H1, H2, I1 and I2.
[0081] In addition, the user can confirm whether the object D2 to be extracted is properly extracted from the color image A based on the extracted image B displayed on the display unit 20. If the object D2 to be extracted is not properly extracted, the user changes the range of hue, chroma, or brightness by moving the boundary line G1, G2, H1, H2, I1, or I2 according to the distribution in the second graphic screen C2. By changing the range of hue, chroma, or brightness, the extracted image B displayed on the display unit 20 is updated. The user repeatedly changes the range of hue, chroma, or brightness and confirms the extracted image B until a proper extracted image B is created.
[0082] When data points are displayed in shades corresponding to the frequency of color appearance, the color range can be more easily adjusted by adjusting the positions of the boundary lines G1 , G2 , H1 , H2 , I1 , and I2 so that the color with a high frequency of appearance is included in the range.
[0083] For example, when the color image A contains a brown object D1 and an orange object D2, and the object to be extracted is the orange object D2, Figure 7 As shown in FIG. 1 , if the range of hue sandwiched by the boundary lines G1 and G2 is too large, Figure 8 As shown, not only the region D2' of the orange object D2 but also the region D1' of the brown object D1 is extracted. Thus, by comparing the second graphic screen C2 with the extracted image B, it is possible to intuitively and easily check whether the ranges of hue, saturation and brightness are appropriate.
[0084] Furthermore, according to the present embodiment, whether or not the setting range of colors is appropriate can be checked for other color images by checking the distribution of colors in the second display mode.
Claims
1. An image processing device, the image processing device designating a specific color among the colors included in a color image, characterized in that: The image processing device comprises: A graphic screen creating unit, which creates a first graphic screen and a second graphic screen; a mode switching unit configured to switch between a first display mode and a second display mode, wherein the first display mode causes the first graphic screen to be displayed on the display unit, and the second display mode causes the second graphic screen to be displayed on the display unit; as well as a reference color specifying unit that sets a reference color based on an input operation by a user, Each of the first graphic picture and the second graphic picture comprises: A color wheel is a circular graphic representing a two-dimensional color space of hue and chroma, wherein the position in the circumferential direction represents the hue and the radial distance from the center represents the chroma; and A lightness bar is a strip-shaped graphic in a one-dimensional color space representing lightness, and the position in the length direction represents lightness. In the first graphic picture, each position in the color wheel has a hue and chroma corresponding to the position, and each position in the brightness bar has a brightness corresponding to the position. In the second graphic picture, data points of the distribution of the hue and chroma of the colors contained in the color image in the two-dimensional color space are superimposed on the color wheel, and data points of the distribution of the lightness of the colors contained in the color image in the one-dimensional color space are superimposed on the lightness bar. The graphic screen creation unit adds a first mark to a position indicating the hue and chroma of the reference color in the color wheel in the first graphic screen, and adds a second mark to a position indicating the brightness of the reference color in the brightness bar in the first graphic screen.
2. The image processing device according to claim 1, characterized in that The image processing device comprises: A color range setting unit that sets each range of hue, chroma, and brightness; and The region extracting unit extracts a region having the hue, saturation, and lightness within the range set by the color range setting unit from the color image, and creates an extracted image showing only the extracted region.
3. The image processing device according to claim 2, characterized in that: Each of the first graphic picture and the second graphic picture comprises: a pair of first boundary lines, which are straight lines extending radially outward from the center of the color wheel and indicating the range of the hue; a pair of second boundary lines which are concentric circles concentric with the color wheel and represent the range of chroma; as well as A pair of third boundary lines are straight lines extending in the width direction of the brightness strip and indicating the range of the brightness.
4. The image processing device according to claim 2 or 3, characterized in that: The color range setting unit can change each range of the hue, saturation, and lightness based on an input operation by a user.
5. The image processing device according to any one of claims 1 to 3, characterized in that: In the second graphic picture, Each data point of the distribution on the color wheel is displayed in a shade corresponding to the frequency of occurrence of the combination of hue and saturation represented by the position of the data point in the color image, Each data point of the distribution on the brightness bar is displayed with a shade corresponding to the following frequency of occurrence: the frequency of occurrence of the brightness represented by the position of the data point in the color image.
