The present disclosure relates to an image processing technique for evaluating color of an object.
There is a technique for evaluating a color difference between two points on an object using image data obtained by capturing an image of the object by a camera. Japanese Patent Application Laid-Open No. 2017-229064 discusses a technique for calculating a color difference between evaluation points designated on a displayed image.
However, an image to be displayed on a display apparatus is generated in such a manner that high saturation color which cannot be expressed by the display apparatus is compressed and converted into a color gamut which can be expressed by the display apparatus. Therefore, in some cases, a user may need to designate a region to be subjected to color evaluation while referring to an image having a gradation of color saturation significantly different from that of an actual object.
Embodiments of the present disclosure are made in view of the above-described issue and are directed to the provision of an image processing technique for designating an evaluation region on an image while referring to the image which is generated based on a captured image of an object and which has a gradation of color saturation close to that of the actual object.
An image processing apparatus according to the present disclosure includes an obtainment unit configured to obtain first image data obtained by capturing an image of an object, a generation unit configured to generate second image data representing a second image by performing conversion to maintain a specific gradation in a color saturation range in a case where a hue or color saturation of a region of interest in a first image represented by the first image data is converted according to a characteristic of a display unit, a conversion unit configured to perform conversion on the first image and the second image according to the characteristic of the display unit, and a display control unit configured to display the converted first image and the converted second image together on the display unit.
Further features of the present disclosure will become apparent from the following description of exemplary embodiments with reference to the attached drawings.
Exemplary embodiments of the present disclosure will be described below with reference to the attached drawings. The exemplary embodiments described below do not necessarily limit the present disclosure. Further, not all combinations of features described in the exemplary embodiments are deemed to be essential.
<Hardware Configuration of Image Processing Apparatus>
A first exemplary embodiment will be described.
<Logical Configuration of Image Processing Apparatus>
The image processing apparatus 1 includes an image obtainment unit 201, a color conversion unit 202, a color saturation determination unit 203, an image generation unit 204, a color difference calculation unit 205, a display control unit 206, and a designation reception unit 207. The image obtainment unit 201 obtains captured image data obtained by capturing an image of an object. The color conversion unit 202 converts pixel values (R, G, B) of each pixel included in a captured image represented by the captured image data into L*a*b* values (L*, a*, b*). The color saturation determination unit 203 determines a magnitude relationship between color saturation of a region of interest in the captured image and maximum color saturation which can be expressed by the display apparatus 17 with respect to a hue of the region of interest. The image generation unit 204 generates display image data representing a display image to be displayed on the display apparatus 17 based on a determination result regarding the color saturation of the region of interest.
The designation reception unit 207 receives region information indicating a region designated by a user in a display image. The color difference calculation unit 205 calculates a color difference between the regions designated by the user. The display control unit 206 displays the display image and the color difference between the regions designated by the user on the display apparatus 17.
<Processing Executed by Image Processing Apparatus>
In step S301, the image obtainment unit 201 obtains the captured image data obtained by capturing an image of an object and reference white color signal values (XW, YW, ZW). The image obtainment unit 201 according to the present exemplary embodiment obtains the captured image data and the reference white color signal values (XW, YW, ZW,) stored in advance in the HDD 15 therefrom.
In step S302, the display control unit 206 converts the pixel values (R, G, B) of each pixel included in the captured image represented by the captured image data into color signal values (RD, GD, BD) corresponding to a characteristic of the display apparatus 17. In the conversion, high saturation color which cannot be expressed by the display apparatus 17 is compressed into a color gamut which can be expressed by the display apparatus 17. In the conversion, a color conversion look-up table (LUT) is used which stores a correspondence relationship between the pixel values (R, G, B) and the color signal values (RD, GD, BD). The display control unit 206 displays a display image A which includes the color signal values (RD, GD, BD) in each pixel on the display apparatus 17. The high saturation color is compressed in the display image A, so that a gradation of color saturation of the display image A may be significantly different from that of the image-captured object compared with a display image B described below.
In step S303, the designation reception unit 207 receives the region information indicating the region of interest designated by a user in the display image A. The region information according to the present exemplary embodiment is coordinates (x, y) on the display image A.
In step S304, the color conversion unit 202 converts the pixel values (R, G, B) of each pixel included in the captured image represented by the captured image data into the L*a*b* values (L*, a*, b*). The processing for converting the pixel values (R, G, B) into the L*a*b* values (L*, a*, b*) will be described in detail below.
In step S401, the color conversion unit 202 converts the pixel values (R, G, B) of a pixel of interest into XYZ values (X, Y, Z) according to Equation (1). Coefficients (m11 to m33) are determined in advance using a result of image capturing and colorimetry of a color chart.
In step S402, the color conversion unit 202 converts the XYZ values (X, Y, Z) of the pixel of interest into the L*a*b* values (L*, a*, b*) according to Equations (2) to (5).
In step S403, the color conversion unit 202 determines whether the pixel values of all pixels in the captured image are converted into the L*a*b* values. In a case where all pixel values are not yet converted (NO in step S403), the color conversion unit 202 updates the pixel of interest and returns the processing to step S401. Whereas, in a case where the pixel values are all converted (YES in step S403), the color conversion unit 202 terminates the processing in step S304 and advances the processing to step S305.
In step S305, the color saturation determination unit 203 determines the magnitude relationship between the color saturation of the region of interest in the captured image and the maximum color saturation which can be expressed by the display apparatus 17 with respect to the hue of the region of interest. The processing for determining the magnitude relationship of the color saturation is described in detail below.
In step S501, the color saturation determination unit 203 calculates color saturation C and a hue H for all pixels in the captured image according to Equation (6).
In step S502, the color saturation determination unit 203 calculates maximum color saturation CMAX which can be expressed by the display apparatus 17 with respect to the hue H of the region of interest. The processing for calculating the maximum color saturation CMAX will be described in detail below.
In step S602, the color saturation determination unit 203 obtains lightness L*, the color saturation C, and the hue H of the pixel of interest in the region of interest. In step S603, the color saturation determination unit 203 generates a vector passing through coordinates (L*, C, H) corresponding to the pixel of interest and coordinates (L*, 0, 0) on a lightness axis in the L*CH color space. In step S604, the color saturation determination unit 203 calculates an intersection point of a triangular element (a polygon) forming the outermost shell of the color gamut of the display apparatus 17 and the generated vector and records coordinates of the intersection point. The coordinates of the intersection point on a color saturation axis are the maximum color saturation CMAX which can be expressed by the display apparatus 17 with respect to the hue H of the pixel of interest. In step S605, the color saturation determination unit 203 determines whether the maximum color saturation CMAX is calculated for all pixels in the region of interest. In a case where the maximum color saturation CMAX is not calculated for all pixels in the region of interest (NO in step S605), the color saturation determination unit 203 updates the pixel of interest and returns the processing to step S602. Whereas, in a case where the maximum color saturation CMAX is calculated for all pixels in the region of interest (YES in step S605), the color saturation determination unit 203 terminates the processing in step S502 and advances the processing to step S503.
In step S503, the color saturation determination unit 203 compares the color saturation C with the maximum color saturation CMAX for the pixel of interest in the region of interest. In a case where the maximum color saturation CMAX is larger, a value of zero is stored as identification information of the pixel of interest, whereas in a case where the color saturation C is larger, a value of one is stored as the identification information of the pixel of interest. In step S504, the color saturation determination unit 203 determines whether determination regarding the color saturation is performed for all pixels in the region of interest. In a case where the determination is not performed for all pixels in the region of interest (NO in step S504), the color saturation determination unit 203 updates the pixel of interest and returns the processing to step S503. Whereas in a case where the determination is performed for all pixels in the region of interest (YES in step S504), the color saturation determination unit 203 terminates the processing in step S305 and advances the processing to step S306.
In step S306, the image generation unit 204 generates display image data representing the display image B to be displayed on the display apparatus 17 based on the determination result regarding the color saturation of the region of interest. The processing for generating the display image data representing the display image B will be described in detail below.
In step S801, the hue rotation unit 2041 obtains the lightness L*, the color saturation C, the hue H, and the identification information as the determination result of the color saturation for all pixels in the region of interest. In step S802, the hue rotation unit 2041 calculates a representative hue HREP representing hues of pixels the identification information of which is one in the region of interest. The representative hue HREP according to the present exemplary embodiment is an average value the hues of pixels the identification information of which is one. The identification information of one indicates that the color saturation C is outside the color gamut of the display apparatus 17, and the identification information of zero indicates that the color saturation C is within the color gamut of the display apparatus 17.
In step S803, the hue rotation unit 2041 obtains a hue HMAX in which the display apparatus 17 can express the maximum color saturation from the color characteristic information of the display apparatus 17. Further, the hue rotation unit 2041 calculates a difference between the representative hue HREP and the hue HMAX as a rotation angle ΔH for rotating the hue of the captured image. The rotation angle ΔH is calculated according to Equation (7).
ΔH=HMAX−HREP Equation (7)
In step S804, the hue rotation unit 2041 converts the hues H of all pixels in the captured image into hues HR according to the rotation angle ΔH calculated by Equation (8).
In step S805, the image conversion unit 2042 converts L*CH values (L*, C, HR) of the pixel of interest in the captured image into the XYZ values (X, Y, Z). Specifically, the image conversion unit 2042 converts the L*CH values (L*, C, HR) into the L*a*b* values (L*, a*, b*) according to Equation (9). Further, the image conversion unit 2042 converts the L*a*b* values (L*, a*, b*) into the XYZ values (X, Y, Z) by performing conversion inverse to the conversion in step S402.
In step S806, the image conversion unit 2042 converts the XYZ values (X, Y, Z) of the pixel of interest into the color signal values (RD, GD, BD) corresponding to the characteristic of the display apparatus 17. In the conversion, a color conversion LUT is used which stores a correspondence relationship between the XYZ values (X, Y, Z) and the color signal values (RD, GD, BD). In step S807, the image conversion unit 2042 determines whether the L*CH values of all pixels in the captured image are converted into the color signal values (RD, GD, BD). In a case where all of the L*CH values are not yet converted (NO in step S807), the image conversion unit 2042 updates the pixel of interest and returns the processing to step S805. Whereas, in a case where all of the L*CH values are converted (YES in step S807), the image conversion unit 2042 terminates the processing in step S306 and advances the processing to step S307.
The display image B is a display image which is obtained by the above-described processing in step S306 and has the color signal values (RD, GD, BD) in each pixel. The display image B is an image in which reproduction of the color saturation is prioritized over the hue and uses the maximum color saturation which can be output by the display apparatus 17, so that a gradation of the color saturation in the region of interest is close to that of the image-captured object compared with the above-described display image A.
In step S307, the display control unit 206 displays the display image B and the display image A side by side.
In step S308, the color difference calculation unit 205 calculates the color difference between the region of interest and the reference region. The processing for calculating the color difference between the regions will be described in detail below.
In step S1001, the color difference calculation unit 205 obtains coordinates of the region of interest and coordinates of the reference region. In step S1002, the color difference calculation unit 205 calculates an average value of the L*a*b* values (L*1, a*1, b*1) in the region of interest and an average value of L*a*b* values (L*2, a*2, b*2) in the reference region. In step S1003, the color difference calculation unit 205 calculates a color difference ΔE between the average value of the L*a*b* values in the region of interest and the average value of the L*a*b* values in the reference region according to Equation (10).
ΔE=√{square root over ((L*2−L*1)2+(a*2−a*1)2+(b*2−b*1)2)} Equation (10)
In step S1004, the display control unit 206 displays the color difference ΔE in a value display region 907 in
<Effect of First Exemplary Embodiment>
As described above, the image processing apparatus according to the present exemplary embodiment obtains image data obtained by capturing an image of an object. The image processing apparatus generates image data by converting the hue or the color saturation of the region of interest in the image represented by the obtained image data so that a specific gradation in the color saturation range is maintained in a case where conversion is performed according to the characteristic of the display unit. The image processing apparatus performs conversion on the image represented by the obtained image data and the image represented by the generated image data according to the characteristic of the display apparatus. The image processing apparatus displays the converted two images together on the display apparatus. Accordingly, a user can designate an evaluation region on the image while referring to the image which is generated based on the captured image of the object and which has the gradation of the color saturation close to the actual object.
<Modification>
According to the first exemplary embodiment, the image obtainment unit 201 obtains the captured image data from the HDD 15. However, the image obtainment unit 201 may control the image capturing apparatus 13 to capture an image of an object and obtain the captured image data. In addition, the image obtainment unit 201 may obtain a color signal value of a reference white point designated by a user on the display image A as the color signal values (XW, YW, ZW,) without obtaining the reference white color signal values (XW, YW, ZW,) from the HDD 15.
According to the first exemplary embodiment, the maximum color saturation CMAX is calculated by the processing in steps S601 to S605. However, a LUT storing a correspondence relationship between the hue H and the maximum color saturation CMAX may be generated in advance and used.
According to the first exemplary embodiment, the maximum color saturation CMAX is calculated by the processing in steps S601 to S605. However, the maximum color saturation CMAX which is larger than the color saturation C and which has corresponding hue closest to the hue H may be selected from the maximum color saturation of each of all the hues.
According to the first exemplary embodiment, the average values of the L*a*b* values are respectively calculated for the region of interest and the reference region. However, average values of RGB values and XYZ values may be respectively calculated and then converted into L*a*b* values.
According to the first exemplary embodiment, the color difference ΔE is calculated for evaluating the color difference between regions. However, any other known value may be used as long as the color difference can be evaluated by the value.
According to the first exemplary embodiment, the display image A and the display image B are displayed side by side. However, a region designated by a user in the display image A may be displayed by being replaced with a corresponding region in the display image B. In this case, in step S303, the designation reception unit 207 receives replacement region information indicating a region which is displayed by being replaced with the display image B in the display image A. In step S307, the display control unit 206 replaces a part of the display image A with a part of the display image B based on the replacement region information and displays the display image.
According to the first exemplary embodiment, an image is displayed by being converted to the hue in which the display apparatus 17 can output the maximum color saturation. According to a second exemplary embodiment, color conversion is performed on an image to maintain a gradation of high saturation color, and a display image is displayed without converting a hue. A hardware configuration of an image processing apparatus 1 according to the present exemplary embodiment is similar to that according to the first exemplary embodiment, so that the description thereof is omitted. A difference between the present exemplary embodiment and the first exemplary embodiment will be mainly described below. The same configuration will be described with the same reference numeral.
<Logical Configuration of Image Generation Unit 204>
The image generation unit 204 generates display image data representing a display image to be displayed on the display apparatus 17 based on a determination result regarding color saturation of a region of interest.
<Processing for generating Display Image Data>
In step S306, the image generation unit 204 generates the display image data representing the display image B to be displayed on the display apparatus 17 based on the determination result regarding the color saturation of the region of interest. The processing for generating the display image data representing the display image B will be described in detail below.
In step S801, the color saturation conversion unit 2043 obtains the lightness L*, the color saturation C, the hue H, and the identification information as the determination result of the color saturation for all pixels in the region of interest. In step S1301, the color saturation conversion unit 2043 converts color saturation of the pixel the identification information of which is one in the region of interest using a color saturation conversion LUT.
<Effect of Second Exemplary Embodiment>
As described above, the image processing apparatus according to the present exemplary embodiment performs color saturation conversion on an image to maintain a gradation of relatively high saturation color in the color saturation range which can be displayed by the display apparatus and displays a display image. Accordingly, a user can designate an evaluation region on the image while referring to the image which is generated by maintaining the hue and which has the gradation of the color saturation close to an actual object.
<Modification>
According to the second exemplary embodiment, color saturation conversion is performed using one type of the color saturation conversion LUT determined in advance. However, a color saturation conversion LUT to be used in color saturation conversion may be selected from a plurality of types of color saturation conversion LUTs according to an application.
According to the above-described exemplary embodiments, a pixel value of a captured image is converted into L*a*b* values, and a hue or color saturation is converted based on the L*a*b* values. According to a third exemplary embodiment, display image data is generated using a color conversion LUT storing a correspondence relationship between a pixel value of a captured image and a color signal value after being subjected to conversion of a hue or color saturation. A hardware configuration of an image processing apparatus 1 according to the present exemplary embodiment is similar to that according to the first exemplary embodiment, so that the description thereof will be omitted. A difference between the present exemplary embodiment and the first exemplary embodiment will be mainly described below. The same configuration will be described with the same reference numeral.
<Logical Configuration of Image Processing Apparatus>
The image processing apparatus 1 includes the image obtainment unit 201, an image generation unit 1701, the color difference calculation unit 205, the display control unit 206, and the designation reception unit 207. The image generation unit 1701 generates display image data using a color conversion LUT storing a correspondence relationship between a pixel value of a captured image and a color signal value after being subjected to conversion of a hue or color saturation.
<Processing Executed by Image Processing Apparatus>
In step S1801, the image generation unit 1701 converts pixel values (R, G, B) of each pixel included in a captured image into color signal values (RD, GD, BD) corresponding to the characteristic of the display apparatus 17 using the color conversion LUT. The color conversion LUT used in this processing is generated and stored in the HDD 15 in advance. The color conversion LUT stores a correspondence relationship between pixel values (R, G, B) corresponding to each grid point equally arranged in an RGB color space dependent on the image capturing apparatus 13 and color signal values (RD, GD, BD) a hue or color saturation of which is converted by the above-described processing in step S306. The color conversion LUT can be generated in advance by performing the above-described processing in steps S304 and S306 with respect to the pixel values (R, G, B) corresponding to each grid point equally arranged in the RGB color space dependent on the image capturing apparatus 13.
<Effect of Third Exemplary Embodiment>
As described above, the image processing apparatus according to the present exemplary embodiment generates display image data using the color conversion LUT storing the correspondence relationship between a pixel value of a captured image and a color signal value after being subjected to conversion of a hue or color saturation. Accordingly, the image processing apparatus can perform color conversion which maintains a gradation of high saturation color without performing hue rotation processing and thus can reduce a calculation cost.
<Modification>
According to the third exemplary embodiment, the color conversion LUT storing the correspondence relationship between the pixel value of the captured image and the color signal value after being subjected to conversion of the hue or the color saturation is used. However, conversion using a matrix and gamma conversion may be performed instead of conversion using the color conversion LUT.
According to embodiments of the present disclosure, a user can designate an evaluation region on an image while referring to the image which is generated based on a captured image of an object and which has a gradation of color saturation close to the actual object.
Embodiment(s) of the present disclosure can also be realized by a computer of a system or apparatus that reads out and executes computer executable instructions (e.g., one or more programs) recorded on a storage medium (which may also be referred to more fully as a ‘non-transitory computer-readable storage medium’) to perform the functions of one or more of the above-described embodiment(s) and/or that includes one or more circuits (e.g., application specific integrated circuit (ASIC)) for performing the functions of one or more of the above-described embodiment(s), and by a method performed by the computer of the system or apparatus by, for example, reading out and executing the computer executable instructions from the storage medium to perform the functions of one or more of the above-described embodiment(s) and/or controlling the one or more circuits to perform the functions of one or more of the above-described embodiment(s). The computer may comprise one or more processors (e.g., central processing unit (CPU), micro processing unit (MPU)) and may include a network of separate computers or separate processors to read out and execute the computer executable instructions. The computer executable instructions may be provided to the computer, for example, from a network or the storage medium. The storage medium may include, for example, one or more of a hard disk, a random-access memory (RAM), a read only memory (ROM), a storage of distributed computing systems, an optical disk (such as a compact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™), a flash memory device, a memory card, and the like.
While the present disclosure includes exemplary embodiments, it is to be understood that the disclosure is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
Number | Date | Country | Kind |
---|---|---|---|
2019-197998 | Oct 2019 | JP | national |
This application is a Continuation of U.S. patent application Ser. No. 17/076,353, filed Oct. 21, 2020, which claims the benefit of Japanese Patent Application No. 2019-197998, filed Oct. 30, 2019, both of which are hereby incorporated by reference herein in their entirety.
Number | Name | Date | Kind |
---|---|---|---|
5469536 | Blank | Nov 1995 | A |
10531057 | Kuwabara | Jan 2020 | B2 |
20050174586 | Yoshida | Aug 2005 | A1 |
20070133852 | Collins | Jun 2007 | A1 |
20070279659 | Hasegawa | Dec 2007 | A1 |
20070279714 | Higashikata | Dec 2007 | A1 |
20080013114 | Hasegawa | Jan 2008 | A1 |
20080170779 | Hasegawa | Jul 2008 | A1 |
20080273794 | Samworth | Nov 2008 | A1 |
20100302404 | Mizukura | Dec 2010 | A1 |
20120307270 | Nakajima | Dec 2012 | A1 |
20130001690 | Zhu | Jan 2013 | A1 |
20130317369 | Bryant-Greenwood | Nov 2013 | A1 |
20150256719 | Bishop | Sep 2015 | A1 |
20170061594 | Suzuki | Mar 2017 | A1 |
20170180759 | Mertens | Jun 2017 | A1 |
20180232867 | Park | Aug 2018 | A1 |
Number | Date | Country |
---|---|---|
2001218078 | Aug 2001 | JP |
2004350209 | May 2003 | JP |
2005197808 | Dec 2003 | JP |
2010074317 | Apr 2010 | JP |
2017229064 | Jun 2016 | JP |
Number | Date | Country | |
---|---|---|---|
20220366868 A1 | Nov 2022 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 17076353 | Oct 2020 | US |
Child | 17816667 | US |