COLOR MEASUREMENT AND CALIBRATION
20200045270 ยท 2020-02-06
Inventors
Cpc classification
H04N23/10
ELECTRICITY
G01J3/462
PHYSICS
International classification
H04N17/00
ELECTRICITY
Abstract
Embodiments described herein disclose a color measurement device and method for use with cameras or other imaging devices. The color measurement device may be configured to determine many different colors via a commonly owned device. Embodiments utilize sinusoidal grayscale rings to determine an exact color match of an unknown color, even if there is perspective distortion of an obtained image.
Claims
1. A system for determining a true color of an unknown color sample, the system comprising: a template including a cut-out and a plurality of concentric rings around the cut-out, each of the concentric rings having offset gray scales modulated as a function of an angle of a polar coordinate, wherein there is a trigonometric relationship between the gray scales of the plurality of concentric rings; a RGB color module configured to determine, in an image of the template over the unknown color sample, a first radial cross-section of one of the concentric rings having an intensity that matches a determined average red color value of the image of the unknown color sample and to determine a true average red color value of the unknown color sample based on an intensity profile of the one of the concentric rings and a polar angle of the first radial cross-section; and an angular module configured to determine the polar angle of the first radial cross-section.
2. The system of claim 1, wherein the angular module is configured to determine the polar angle of the first radial cross-section by comparing the intensity in the image of the first radial cross-section with an intensity in the image of a radial cross-section of another of the concentric rings along the same radial segment and utilizing the trigonometric relationship between the gray scales of the concentric rings.
3. The system of claim 1, wherein the RGB color module is further configured to determine, in the image of the template over the unknown color sample, a second radial cross-section of a second one of the concentric rings having an intensity that matches a determined average green color value of the image of the unknown color sample and to determine a true average green color value of the unknown color sample based on a ring intensity profile of the second one of the concentric rings and a polar angle of the second radial cross-section, and to determine, in the image of the template over the unknown color sample, a third radial cross-section of a third one of the concentric rings having an intensity that matches a determined average blue color value of the image of the unknown color sample and to determine a true average blue color value of the unknown color sample based on a ring intensity profile of the third one of the concentric rings and a polar angle of the third radial cross-section, and wherein the angular module is configured to determine the polar angle of the second and third radial cross-sections.
4. The system of claim 3, further comprising an exact color module configured to determine the true color of the unknown color sample based on the true average red color value, the true average green color value, and the true average blue color value.
5. The system of claim 1, wherein each concentric ring is phase shifted a given angle from each other concentric ring.
6. The system of claim 5, wherein the plurality of concentric rings comprise three concentric rings, the second concentric ring being phase shifted a first given angle from the first concentric ring and the third concentric ring being phase shifted a second given angle from the second concentric ring.
7. The system of claim 1, further comprising an image capturing device configured to obtain an image of the template over the unknown color sample.
8. The system of claim 1, wherein the template further comprises distinctive markings at known locations and wherein the center of the concentric rings can be determined from an image of the template using geometric relationships between the distinctive markings and the center.
9. The system of claim 8, wherein the template is rectangular, the distinctive markings comprise corner markings, and the center of the concentric rings is at the center of the template, wherein the center of the concentric rings in the image can be determined based on an intersection of a first line from a first of the corner markings diagonally to a third of the corner markings and a second line from a second of the corner markings diagonally to a fourth of the corner markings, wherein the center of the concentric rings is then used to determine the radial segment on which a radial cross-section lies.
10. The system of claim 1, wherein the RGB module is further configured to determine, in the image of the template over the unknown color sample, another radial cross-section of another of the concentric rings having an intensity that matches the determined average red color value of the image of the unknown color sample and to determine a second true average red color value of the unknown color sample based on an intensity profile of the another of the concentric rings and a different polar angle of the another radial cross-section, and to determine a final true average red color value of the unknown color sample by calculating a weighted average of the true average red color value and the second true average red color value.
11. A method for determining a color of an unknown color sample, the method comprising: positioning a cut-out of a template over the unknown color sample, the template comprising the cut-out and one or more concentric rings around the cut-out, each of the concentric rings comprising a gray scale continuum that varies in intensity as a function of polar angle; obtaining an image of the unknown color sample via the cut-out and the template; determining a first radial cross-section of one of the concentric rings that matches a measured average red color value of the unknown color sample in the image; determining a polar angle of the first radial cross-section; and determining a corrected average red color value of the unknown color sample using the polar angle of the first radial cross-section.
12. The method of claim 11, wherein obtaining the image comprises actuating an image-capturing device.
13. The method of claim 11, wherein the polar angle of the first radial cross-section is determined by comparing the intensity in the image of the first radial cross-section with an intensity in the image of a radial cross-section of another of the concentric rings along the same radial segment as the first radial cross-section and utilizing a trigonometric relationship between the gray scale continuums of the concentric rings.
14. The method of claim 11, further comprising determining, from the image, a second radial cross-section of a second one of the concentric rings having an intensity that matches a measured average green color value of the image of the unknown color sample and determining a corrected average green color value of the unknown color sample using a polar angle of the second radial cross-section, and determining, from the image, a third radial cross-section of a third one of the concentric rings having an intensity that matches a measured average blue color value of the image of the unknown color sample and determining a corrected average blue color value of the unknown color sample using a polar angle of the third radial cross-section, and determining the polar angle of the second and third radial cross-sections.
15. The method of claim 13, further comprising determining the color of the unknown color sample based on the corrected average red color value, the corrected average green color value, and the corrected average blue color value.
16. The method of claim 11, wherein the template further comprises distinctive markings at known locations and further comprising determining the center of the concentric rings from the image using geometric relationships between the distinctive markings and the center, and using the center of the concentric rings to determine the radial segment on which a radial cross-section lies.
17. The method of claim 11, further comprising determining, from the image, another radial cross-section of another of the concentric rings having an intensity that matches the determined average red color value of the image of the unknown color sample and determining a second corrected average red color value of the unknown color sample using the polar angle of the another radial cross-section, and determining a final average red color value of the unknown color sample by calculating a weighted average of the corrected average red color value and the second corrected average red color value.
18. A color identification system, comprising: a template comprising one or more gray scale continuums, wherein intensity along each continuum is a function of geometric position on the template; an image obtaining device configured to obtain an image of an unknown color sample and the template; and color identification modules configured to determine, for each of a red, a green, and a blue color value of the image of the unknown color sample, a corresponding geometric position on one or more of the gray scale continuums in the image where intensity of the gray scale continuum matches the color value, and to use the three determined geometric positions to determine the color of the unknown color sample.
19. The method of claim 15, further comprising matching the determined color of the unknown color sample to one or more of a plurality of paint colors stored in a database.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Non-limiting and non-exhaustive embodiments of the present disclosure are described with reference to the following figures, wherein like reference numerals refer to like parts throughout the various views unless otherwise specified.
[0051]
[0052]
[0053]
[0054]
[0055]
[0056]
[0057]
[0058]
[0059]
[0060]
DETAILED DESCRIPTION
[0061] The invention and the various features and advantageous details thereof are explained more fully with reference to the nonlimiting embodiments that are illustrated in the accompanying drawings and detailed in the following description. Descriptions of well-known starting materials, processing techniques, components and equipment are omitted so as not to unnecessarily obscure the invention in detail. It should be understood, however, that the detailed description and the specific examples, while indicating preferred embodiments of the invention, are given by way of illustration only and not by way of limitation. Various substitutions, modifications, additions and/or rearrangements within the spirit and/or scope of the underlying inventive concept will become apparent to those skilled in the art from this disclosure. Embodiments discussed herein can be implemented in suitable computer-executable instructions that may reside on a computer readable medium (e.g., a hard disk (HD)), hardware circuitry or the like, or any combination.
[0062] As used herein, the terms comprises, comprising, includes, including, has, having or any other variation thereof, are intended to cover a non-exclusive inclusion. For example, a process, article, or apparatus that comprises a list of elements is not necessarily limited to only those elements but may include other elements not expressly listed or inherent to such process, article, or apparatus. Furthermore, unless expressly stated to the contrary, or refers to an inclusive or and not to an exclusive or. For example, a condition A or B is satisfied by any one of the following: A is true (or present) and B is false (or not present), A is false (or not present) and B is true (or present), and both A and B are true (or present).
[0063] Additionally, any embodiments, examples or illustrations given herein are not to be regarded in any way as restrictions on, limits to, or express definitions of, any term or terms with which they are utilized. Instead, these embodiments, examples or illustrations are to be regarded as being described with respect to one particular embodiment and as illustrative only. Those of ordinary skill in the art will appreciate that any term or terms with which these embodiments, examples or illustrations are utilized will encompass other embodiments which may or may not be given therewith or elsewhere in the specification and all such embodiments are intended to be included within the scope of that term or terms. Language designating such nonlimiting examples and illustrations includes, but is not limited to: for example, for instance, e.g., in one embodiment.
[0064] Embodiments of the present invention can be implemented in a computer, desktop, laptop, netbook, tablet, smartphone, or the like, communicatively coupled to a network (for example, the Internet, an intranet, an internet, a WAN, a LAN, a SAN, etc.), another computer, or in a standalone computer. As is known to those skilled in the art, the computer can include a central processing unit (CPU) or processor, at least one read-only memory (ROM), at least one random access memory (RAM), at least one hard drive (HD), and one or more input/output (I/O) device(s). The I/O devices can include a keyboard, monitor, printer, electronic pointing device (for example, mouse, trackball, stylist, etc.), or the like. In embodiments of the invention, the computer has access to at least one database locally or over the network.
[0065] ROM, RAM, and HD are computer memories for storing computer-executable instructions executable by the CPU or capable of being complied or interpreted to be executable by the CPU. Within this disclosure, the term computer readable medium is not limited to ROM, RAM, and HD and can include any type of data storage medium that can be read by a processor. For example, a computer-readable medium may refer to a data cartridge, a data backup magnetic tape, a floppy diskette, a flash memory drive, an optical data storage drive, a CD-ROM, ROM, RAM, HD, or the like. The processes described herein may be implemented in suitable computer-executable instructions that may reside on a computer readable medium (for example, a disk, CD-ROM, a memory, etc.). Alternatively, the computer-executable instructions may be stored as software code components on a DASD array, magnetic tape, floppy diskette, optical storage device, or other appropriate computer-readable medium or storage device.
[0066] In one exemplary embodiment of the invention, the computer-executable instructions may be lines of C++, Java, JavaScript, HTML, or any other programming or scripting code. Other software/hardware/network architectures may be used. For example, the functions of the present invention may be implemented on one computer or shared among two or more computers. In one embodiment, the functions of the present invention may be distributed in the network. Communications between computers implementing embodiments of the invention can be accomplished using any electronic, optical, radio frequency signals, or other suitable methods and tools of communication in compliance with known network protocols.
[0067] It will be understood for purposes of this disclosure that a module is one or more computer processes, computing devices or both, configured to perform one or more functions. A module may present one or more interfaces which can be utilized to access these functions. Such interfaces include APIs, web services interfaces presented for a web services, remote procedure calls, remote method invocation, etc.
[0068] Embodiments described herein disclose a color measurement device and method for use with cameras or any imaging device. The color measurement device may be configured to determine many different colors via a commonly owned template card. Embodiments utilize various markings on the template card, such as sinusoidal grayscale rings or lines, sample colors, sample patterns, and alignment features to determine an exact color match of an unknown color, even if there is perspective distortion in the obtained image. In effect, the template card is predetermined and known to the color matching system and serves as a predetermined reference card.
[0069]
[0070] According to one embodiment of the present invention, template card 110 may include a center cut-out 112, a plurality of concentric rings 113, and corner quadratic wheels 120A-D. As shown in this embodiment, a single template card 110 may include a plurality of different continuous gray scalesin this case concentric rings 114, 116, 118. In this embodiment, to determine an unknown color, it is unnecessary to include samples of different colors, other than gray scales, on template card 110 because the gray scales include red, green, and blue responsive curves. In other embodiments, component colors may be incorporated in addition to one or more gray scales.
[0071] Center cut-out 112 may be an orifice disposed at the center of template card 110. Center cut-out 112 may be configured to be disposed over an unknown color sample, such that template card 110 may be superimposed on the unknown color and color measurement device 130 may be configured to obtain an image of the unknown color through center cut-out 112.
[0072] The plurality of concentric rings 113 may include an inner ring 114, a middle ring 116, and an outer ring 118. Each of the plurality of concentric rings 113 may have a two hundred and fifty-six level gray scale that is modulated sinusoidally as a function of polar coordinate angle (256 level gray scales corresponds to 8-bit color). One skilled in the art will appreciate that in other embodiments, different gray scales for each of the plurality of concentric rings 113 may be used. For example, one or more of the rings 114, 116, and 118 could comprise a 65,535 level gray scale that corresponds to 16-bit color. In one embodiment, inner ring 114 may be phase shifted by +120 with respect to middle ring 116, and outer ring 118 may be phase shifted by 120 with respect to middle ring 116. Because the plurality of concentric rings 113 are phase shifted, middle ring 116 may have an intensity profile of Im=A*cos(t)+B, inner ring 114 may have an intensity profile of) Ii=A*cos(t+120+B, and outer ring 118 may have an intensity profile of Io=A*cos(t120)+B. In embodiments, A and B may be chosen to maximize the template printer dynamic range of the gray scales, where A may be a white scaling and B may be a black offset, and t may be a polar angle of a radial cross section of the plurality of concentric rings 113.
[0073] Corner quadratic wheels 120A-D may each be disposed at a corner of template card 110, and may each be divided into four equal subsections. Because corner quadratic wheels 120A-D are distinct, known image processing techniques, such as cross, corner, or symmetry detectors may be used to identify the centers of each corner quadratic wheel 120A-D. The intersection point of a first diagonal line from the center of corner quadratic wheel 120A to corner quadratic wheel 120C and a second diagonal line from the center of corner quadratic wheel 120B to corner quadratic wheel 120D may be configured to determine the centroid of center cut-out 112. Since lines remain lines, even at different viewing perspectives, this technique is robust against any camera tilt. Any segment emanating from the center of center cut-out 112 may, in this embodiment, be a true radius of the plurality of concentric rings 113.
[0074] The circular shape of the wheels 120A-D illustrated in
[0075] Color measurement device 130 may be a device configured to obtain an image of an unknown color sample, determine polar angles (t) of radial cross-sections of the concentric rings 113 where the determined intensity matches the determined red, green, and blue values for the color sample image, and determine a color match of the unknown color based on a true red color value, a true green color value, and a true blue color value of the color sample responsive to functions of the polar angles (t). In embodiments, an unknown camera gain and lighting effects may not affect the true red, green, and blue color values because the camera gain and lighting effects affect template card 110 in the same manner as they affect a sample of the unknown color. Thus, the template card 110 serves as a reference card to eliminate the many variations that can impact the perception or imaging of an unknown color sample.
[0076] Inevitably, there may be some difference in camera gain and/or lighting gain between different regions of the template card 110 (e.g. the color sample and the surrounding rings) but the difference may be negligible. To achieve a given RGB measurement error, the residual nonuniformity of camera gain and lighting effects between the unknown color sample and the rings may be less than three times the desired RGB measurement error. In other words, to achieve RGB values with 98% accuracy, nonuniformity may be up to 6%. Nonuniformity of less than three times desired RGB measurement error may be considered equality of camera gain and lighting effects between the unknown color sample and the concentric rings 113.
[0077] In embodiments where the background color of the card (e.g. outside the concentric rings, excluding any distinctive markings such as corner quadratic wheels) is uniform and known, one can utilize this fact to compute and subtract out of any smooth nonuniformity, resulting in a residual nonuniformity several times smaller than the actual. This may be done by sampling a number of points in the image of the template background, which are known to be the same color, and determining the variance in the image from the known color based on the location of the point to find and remove smooth nonuniformity. For example, the points may be fitted to a parabolic curve, with everything up to the 2.sup.nd order removed. Some allowance may be made for potential discoloration of the background due to long or heavy use, soiling, etc., which may for example result in data points that are discarded as too far off the known background color, or in a notification regarding this possible problem, which may prompt the user to decide whether to drop the data point, or to abandon the smooth nonuniformity removal process.
[0078] Using the embodiments depicted in the FIGURES, equality of camera gain and lighting effects may be achieved in all but the most extreme lighting conditions (e.g. a sharp and dark shadow directly across one side of the rings).
[0079] In embodiments, color measurement device 130 may include a camera 132, an RGB color module 134, an angular module 140, and an exact color module 142.
[0080] The measurement device 130 may be configured to execute modules 134, 140, and 142 by software; hardware; firmware; some combination of software, hardware, and/or firmware; and/or other mechanisms for configuring processing capabilities on measurement device 130. As used herein, the term module may refer to any component or set of components that perform the functionality attributed to the module. This may include one or more physical processors during execution of processor readable instructions, the processor readable instructions, circuitry, hardware, storage media, or any other components.
[0081] It should be appreciated that although modules 134, 140, and 142 are illustrated in
[0082] Camera 132 may be a device configured to record images, which may be still images or videos. In embodiments, camera 132 may be configured to record an image or a frame of a video of an unknown color through center cut-out 112 of template card 110. In other words, the image captured by camera 132 will include the entirety of template card 110 (or at least the relevant parts of template card 110 to the particular color determination process) and the unknown color in center cut-out 112. In embodiments, camera 132 may be included in a mobile phone, tablet, PDA, DSLR camera, point and shoot camera, webcam, any consumer image device, or any other device configured to obtain an image.
[0083] RGB color module 134 may be configured to determine a red color value of the unknown color based on an average red color reading of the unknown color and determined intensity and intensity profile of inner ring 114 (and/or middle ring 116 and outer ring 118). In embodiments, the radial cross section of inner ring 114 may be chosen to determine the red color value of the unknown sample because inner ring 114 may be the most proximate of the plurality of concentric rings 113 to the sample of the unknown color. Therefore, inner ring 114 may be the least sensitive of the plurality of concentric rings 113 to any non-uniformity of color measurement device 130.
[0084] First, the radial cross-section of the inner ring 114 where the measured intensity of the inner ring 114 matches the measured average red color reading of the unknown color is determined. Second, the true polar angle (t_red) of this radial cross-section is determined using angular module 140 (as discussed in detail below). Third, the true average red color value of the unknown color is determined as the inner ring intensity at the calculated polar angle (t) using the inner ring intensity profile Ii=A*cos(t_red+120)+B and the known polar angle (t_red) and A and B values. This procedure is then repeated for the green color determination and the blue color determination, with the true polar angles for green and blue, t_green and t_blue, used instead of t_red.
[0085] Each gray-scale ring 112, 114, 116 includes all threecolor modulations, red, green, and blue, making embodiments compact, universal, and inexpensive to print. Although the proximity advantage of the inner ring 114 may be lost, other implementations may utilize the middle ring 116 or the outer ring 118 or even a combination of all three for determining the red, green and/or blue color values of the unknown color sample. A combination of rings 112, 114, 116 might be used, for example, by finding the true average color values using two or all three of the rings 112, 114, 116 independently, and then averaging the determined values or using a weighted average, which may account for lessened accuracy as the determinations move away from the center of the template card 110. For example, the inner ring value may be given a 50% () weight, the middle ring value may be given a 33% () weight, and the outer ring value may be given a 17% () weight. Using a combination may help to compensate for uneven shadow and/or eliminate noise.
[0086] Angular module 140 may be configured to determine the polar angle (t) of the radial cross-section of each of the plurality of concentric rings 113 where the intensity matches the measured average color value of the unknown color. In embodiments, if camera 132 obtains an image of template card 110 superimposed over the unknown color from a tilted or off-center perspective, the observed concentric ring 113 patterns of the obtained image may change. For example, if an image of template card 110 is obtained from a tilted perspective, the plurality of concentric rings 113 may appear to be elliptical instead of circular. However, the radial cross-sections of the plurality of the concentric rings 113 remain the same, since a line remains a line irrespective of the view angle. The polar angles (t) of the radial cross-sections may be determined from the sampled intensities of each concentric ring 113, as discussed below. So, once determined, the polar angles (t) of the plurality of concentric rings 113 may then be utilized to look up the true red, green, and blue color values.
[0087] Thus, first a radial section from the center of the template cut-out 112 through the radial concentric rings 113 is found which best matches the sample intensity to the intensity of the radial cross-section of one of the concentric rings 113 through which the radial segment extends. That is done simply by matching the intensity of the sample to the intensity of a cross section of one of the concentric rings 113 and extending a segment from that radial cross-section through the center of the template card 110 and through the circumference of the outer ring 118. Once that is accomplished, one can use the intensities of the concentric rings 113 cross-sections to determine the polar angle (t) using determined intensity values of the cross-sections and the known (and designed) trigonometric relationship between the intensity profiles of the concentric rings 113. Once the best estimated polar angle is known, it can be used to infer the color intensity of the unknown sample. Angular module 140 may be configured to determine the polar angle (t) utilizing the intensity profiles of each of the plurality of concentric rings 113 (completely independent of the camera gain and lighting conditions) and trigonometric manipulations of the intensity profiles of the plurality of the concentric rings 113 as intersected by the radial segment.
[0088] In embodiments, the total camera and lighting scaling gain (k) and camera zero (Z) affect template card 110 in the same manner as they affect the unknown color. The intensity profile of middle ring 116 may have a gain intensity profile equal to Pmid=k*[A*cos(t)+B]+Z, the intensity profile of inner ring 114 may have a gain intensity profile equal to Pin=k*[A*cos(t+120)+B]+Z, and the intensity profile of outer ring 118 may have a gain intensity profile equal to Pout=k*[A*cos(t120)+B]+Z. A and B are gray level encoding constants.
[0089] Utilizing trigonometry properties, angular module 140 may determine the polar angle (t) of a given radial cross-section using the equation t=a tan 2[{square root over (3)}(PoutPin), 2*Pmid(Pin+Pout)], where the intensities of the concentric rings at the given radial cross-section can be measured directly and substituted into the equation to solve for t. The true/corrected RGB value is determined, as noted above, by substituting the determined t and known A and B values into the intensity profile for the appropriate concentric ring.
[0090] Note that the variables associated with gain and lighting conditions and zero level drop out of the equation. Zero level is subtracted out, gain level is divided out, 2.sup.nd order nonlinear gain is subtracted out, resulting in built-in auto white balancing. By comparing the corrected RGB against Pin, Pmid, and Pout, gamma compression can be undone. Even though the measured intensities may not match the actual intensities, as all the concentric rings 113 will be subject to the same error sources, the trigonometric relationship between the measured intensities of the concentric rings will hold, allowing the true polar angle to be determined. The process is therefore insensitive to nonlinearity in camera gain and zero level of the image capturing sensor and allows for precise camera gamma correction. Results are not dependent on camera type or brand, and are consistent across a range of lighting.
[0091] Exact color module 142 may be configured to determine the true color of the unknown sample and report it either as a RGB value or as a match to particular known colors. For example, exact color module 142 may determine the true color of the unknown sample based on the average red, green, and blue (RGB) color values of the unknown sample as determined by RGB color module 134 and report those values. Exact color module 142 may then compare the RGB value of the unknown sample to a color database which lists known colors (such as manufacturers' paints) by RGB value and color name and report the closest match, or set of closest matches.
[0092] Accordingly, color measurement device 130 may be configured to determine the angular coordinates of radial cross-sections of each of the plurality of concentric rings 113 on template card 110 even if an obtained image of template card 110 includes perspective distortion. Furthermore, color measurement device 130 may be configured to determine the color of an unknown color sample based on the behaviors of three different intensity profiles of the plurality of concentric rings.
[0093]
[0094] Center cut-out 112 may be configured to be disposed over an unknown color, such that the measured color values of the unknown color 205 may be compared with the radial segment cross-sections 210 of each of the plurality of concentric rings 113, including inner ring 114, middle ring 116, and an outer ring 118. Each of the plurality of concentric rings 113 may be associated with any or all of the different red, green, and blue color values of the unknown color. Therefore, based on the unknown color values, there will be different polar angles (t) 215, at which any or combination of radial segment cross-sections at the color values correspondingly best match the unknown color values.
[0095] Corner quadratic wheels 120A-D may be each disposed at a corner of template card 110, and may each be divided into four equal subsections. The intersection of a first diagonal line from the center of corner quadratic wheel 120A to corner quadratic wheel 120C and a second diagonal line from the center of corner quadratic wheel 120B to corner quadratic wheel 120D may determine the center of center cut-out 112.
[0096] Responsive to determining the center of center cut-out 112, the polar angles (t) 215 of radial segment cross-sections 210 of concentric rings 113 on template card 110 corresponding to the color values of the unknown color 205 may be determined with measured intensities. Based on the polar angles (t) 215 and the known intensity profiles of each of the plurality of concentric rings 113, the true color values of the unknown color may then be determined and color matching may be performed as described above.
[0097]
[0098] For example, the measured RGB values for the color component ring 604 in the image with the unknown color sample can be compared to measured RGB values for the color component ring 604 during a calibration process with controlled lighting and camera/sensor conditions to calculate a color correction matrix. This color correction matrix can be used to adjust the measured RGB values of the unknown color sample to compensate, to the first order, for the environmental conditions (e.g. lighting/light spectra, imaging device/sensor spectral response) under which the image was taken, making a comparison to RGB values of potential color matches measured under different, controlled conditions more accurate.
[0099] An RGB reading for an image portion can be described as the sum of functions of the sensor used to take the reading, the lighting in which the reading was taken, and the reflectance of the object(s) imaged, as follows:
.sub.0.sup.Sensor().Math.Lighting().Math.Reflectance().Math.d
Reflectance()=rRed()+gG()+bB()
[0100] For neutral color, the Reflectance is nearly constant, so color correction is not needed.
[0101] But in general, substituting the reflectance equation into the original integral, we have: Each RGB reading
r.sub.0.sup.Sensor().Math.Lighting().Math.Red().Math.d
+g.sub.0.sup.Sensor().Math.Lighting().Math.Green().Math.d
+b.sub.0.sup.Sensor().Math.Lighting().Math.Blue().Math.d
[0102] There are three integrals each for the red value, green value and blue value. Component colors 610a-h (outer rim) are added for measuring the nine integrals. These nine integrals are the nine elements of color calibration matrix Mcc below. The closer the spectral match of the component colors on the IC-Wheel to those of the sample, the more accurate the color correction will be.
[0103] Barcode 602 may be used to lookup information relating to the template card, such as calibration information pertaining thereto, paint manufacturer(s), users, retailers, etc. Including calibration information on the cards allows manufacturing requirements to be relaxed, such as by lowering tolerance requirements, which in turn lowers costs.
[0104] For example, the template cards may be calibrated after they are manufactured. Template cards from a batch manufactured together may be photographed straight on with diffuse photographer lighting over a set of (e.g., sixteen) color samples. RGB measurements may then be made using each image in conjunction with the template cards' gray scales per the description herein. Then, these measured RGB values are correlated to colors within a manufacturer database using, for example, a least square correlation algorithm, and a transform matrix is derived and saved. Next, a new RGB database is created based on the saved matrix, and the new RGB database and transform matrix are locked to the barcode printed on the batch of template cards.
[0105] In some embodiments, the template cards may be calibrated as described above with color samples of various finishes, resulting in a separate RGB database and transform matrix for each type of finish used in the calibration. Finish of a color sample may be user-selected or automatically detected when color matching is desired so that the appropriate database and matrix are used.
[0106] For calibration, manufacturer swatch samples (or other samples) corresponding to colors stored in the database are measured for RGB values with template cards as described herein, and at the same time RGB values for the component colors may be measured using the same method and images. The RGB values measured by this method for the component colors form a calibration matrix M_calib which can be used later during measurement to derive a color correction matrix that adjusts for differences between the calibration setting and real-world measurement (e.g., lighting, sensor, etc.). The measured swatch RGB values are then correlated to the manufacturer database RGB values corresponding to the swatches using, for example, a least squares algorithm. A customized database is then formed based on the fitted trend. So, when an unknown sample is taken, the color correction matrix is applied first and then the least squares fitted trend. In embodiments, color correction and least squares fitting trend may be performed by the exact color module, and/or by one or more modules dedicated to color correction and/or least squares fitting. Finally, the adjusted and corrected measured sample is matched to the customized database, ensuring the same consistency as if the sample was measured using the calibration setup.
[0107] In an example of this process, a batch of template cards is used to measure 1320 paint swatches for a given paint manufacturer. The RGB value of each of the swatches is measured using the template cards as described herein, and plotted against the corresponding RGB values supplied by the paint manufacturer. The measured RGB values are correlated to the corresponding manufacturer RGB values using a least squares algorithm and known techniques to obtain third order polynomial coefficients to transform the measured RGB values into adjusted RGB values for matching against the manufacturer-provided RGB values. In this case, the coefficients were calculated to be as follows: red coefficients [9.90217e-06, 0.0034507, 0.975559, 57.2588], green coefficients [8.97079e-06, 0.0032746, 0.962333, 55.9677], and blue coefficients [4.89502e-06, 0.00184182, 0.830719, 57.7655]. These coefficients define the polynomial to map the measured RGB values to the database (manufacturer) RGB values.
[0108] In this example, each of the swatches is measured four times. The average of each swatch measurement set is taken, and the above polynomial is applied to form a custom database, which now reflects the method of calibration. So, for example, the color Hint of Vanilla, which the manufacturer characterizes as [238, 232, 216], is registered as [242, 225, 208] in the custom database, which compares better with future measurements outside of the calibration environment.
[0109] Using one or more of the same images used to measure RGB values of the paint swatches, RGB values of the component colors of the template cards are measured and stored in a matrix M_calib as discussed above. In this example, the matrix is as follows, where each row corresponds to the measured RGB value for one of the eight component colors:
[0110] In other embodiments, there may be more or less component colors. Color correction starts after an RGB value of a color sample has been measured for a user as discussed herein using the gray scales. For example, a color sample of Hint of Vanilla may be measured by a user to have raw RGB values (using the grey rings) of [249.18, 243.1, 230.02]. The eight component colors are measured according to this same process, using the same image, and in this example their RGB values are measured to be: [107.55, 15.694, 82.468], [36.543, 136.9, 146.97], [7.2466, 6.571, 4.8558], [19.495, 17.289, 82.897], [27.156, 128.28, 64.878], [124.34, 13.159, 10.08], [243.7, 242.63, 245.64], [126.56, 131.97, 43.998]. Together, they form an 83 matrix M_meas as follows:
[0111] The color correction matrix M_cc is calculated as follows:
[0112] M_cc=Mmeas.sup.1*M_calib, in this example:
[0113] Multiplying the measured RGB values for the color sample by the color correction matrix gives the following corrected measured RGB values:
[0114] The corrected measured RGB value corrects for differences in lighting and sensor between the calibration process and actual real-world conditions under which the image was captured. The corrected measured RGB value can then be adjusted using calibration data to account for differences between RGB values measured during calibration and what a paint (coating or other color substance) manufacturer indicates the color's RGB values to be. A mapping, for example a polynomial mapping, determined during the calibration process as described above, can be applied to the corrected measured RGB values to arrive at the final RGB values used to match to a paint (or other) color, for example in a database of such colors.
[0115] In this example, a third order polynomial mapping was generated during the calibration process, as noted above: red coefficients [9.90217e-06, 0.0034507, 0.975559, 57.2588], green coefficients [8.97079e-06, 0.0032746, 0.962333, 55.9677], and blue coefficients [4.89502e-06, 0.00184182, 0.830719, 57.7655]. Thus, the red value (252.73) is plugged into the equation 9.90217e-6(R.sup.3)0.0034507(R.sup.2)+0.975559R+57.2588 to arrive at the final matching red value of 243.25. The green value (242.41) is plugged into the equation 8.97079e-6(G.sup.3)0.0032746(G.sup.2)+0.962333G+55.9677 to arrive at the final matching green value of 224.61. The blue value (224.28) is plugged into the equation 4.89502e-6(B.sup.3)0.00184182(B.sup.2)+0.830719B+57.7655 to arrive at the final matching green value of 206.65. Thus, the final RGB value calculated for matching purposes in this example is [243.25, 224.61, 206.65]. The RGB value for this Hint of Vanilla color provided by the paint manufacturer and entered into the database is [242,225,208], so the final RGV values calculated are highly accurate in this example.
[0116]
[0117] The device 730 may operate a camera 732 or other image capturing device to obtain the images, or may obtain an image taken in any known manner. Template cards 720 may have at least one reference scale and at least one reference color, and may be any of the template cards disclosed herein.
[0118] In addition to the functionality discussed above, device 730 may process collected images, output known sample RGB values and at least one reference color RGB value, store the at least one reference color RGB value as a calibration RGB value matrix for color correction, compare the output known sample RGB values with the RGB values of corresponding color definitions stored within the database, and perform a least squares fit of the output known sample RGB values to the corresponding color definition RGB values to generate coefficients of a transform function for transforming output RGB values into corresponding color definition RGB values. Processor 702 may be configured to carry out these operations by calling color correction module 712 and least squares module 710 stored in memory 704. In other embodiments, different and/or additional modules may be used.
[0119]
[0120] At a later time when a user wishes to identify an unknown color, the user obtains an image 812 of an unknown color sample together with a template card, for example, by actuating a camera or other image capture device. RGB values of the unknown sample and the component colors of the template card are measured 814. The measured RGB values of the unknown sample are matched to measured intensities of gray scales on the template card 816. Locations of the matching gray scale intensities are used with functions relating gray scale location to known gray scale intensity to improve the measured unknown sample RGB values 818.
[0121] A barcode on the template card is used to retrieve the stored component color RGB values and transform function 820. The measured component color RGB values are compared 822 to the stored component color RGB values to correct the improved sample RGB value for differences in lighting, camera, etc. The transform function is applied to the corrected sample RGB value to obtain a final unknown sample RGB value for matching to the known sample RGB values 824, and the closest match or matches to the final unknown sample RGB value are retrieved from color definitions stored in a database 826.
[0122]
[0123] Although templates having two types of gray scales are shown in the figures, any number of gray scales in any locations and shapes on the template card may be utilized in various embodiments, as long as the intensity of each scale on a template is known as a function of its geometric location on the template card. Where there are markings such as 120A-D shown in
[0124] As with the embodiments shown in
[0125]
[0126] The application, whether a web application as depicted in
[0127] When the application is integrated into a smartphone or other image capturing device, the image may be captured through the app, and the app may have certain functionality to improve the quality of the image captured for the purpose of the color matching. For example, the camera may be automatically zoomed to fit the template card, orientation may be locked in landscape, validation checks may occur as the image is being scanned (e.g. for angle, presence of entire template card, locating and reading bar code, locating corner quadrant wheels and checking for tilt, etc.). The captured image may be automatically uploaded to a server for processing. The application may capture user data such as image capturing device type and information (operating system, service provider, brand), location, time of day, etc., and this data may be used to identify factors that may affect accuracy, and to compensate for them in the future.
[0128]
[0129] In various embodiments, the results may be presented in various ways. Instead of maximum error, closeness of the match may be presented as percent match, for example calculated by 1(norm(RGB_measRGB_ref)/256), where the norm( ) function returns the Euclidian norm of the three-value RGB difference vector. For example, if the calculated RGB values are (176, 234, 117) and the closest match is (179, 232, 113) then RGB_measRGB_ref is (3,2,4). The Euclidian norm is then calculated as the square root of the sum of the squares of the vector, here the square root of 9+4+16=29. The percent match would then be calculated as one minus the result of that calculation, 5.39, divided by 256, giving a final percent match of 98%. The number of matches presented may vary, though they generally will be selected from the closest matches identified in a color database. In some embodiments, all matches of 97%-100%, for example, may be presented, with at least one match always being presented. The database of colors may have paint colors from multiple paint manufacturers. The presented matches may include the closest match for some or all of the paint manufacturers reflected in the database of colors, as users may prefer one manufacturer over another for various reasons. The image processing and color matching may be performed almost entirely on a remote server and typical processing time including upload is less than one second.
[0130] In another exemplary embodiment, the color matching software may be implemented, in whole or in part, on a mobile application installed on a mobile device, such as on a mobile phone, tablet, PDA, or other portable device, as shown in
[0131] Once an image is obtained, it may be analyzed in the manner described herein to determine a color match. The analyzing process may be undertaken by the mobile software on the mobile device, by remote software and/or databases in communication with the mobile device, or by some combination of the two.
[0132] After the image is analyzed, as shown in
[0133] The exemplary embodiments above are explained in the context of paint color identification, but it is not in any way limited thereto. The disclosed technology can find application in any endeavor where color identification is useful, such as cosmetics, medicine, AI, object sorting, interior decorating, restorations, etc.
[0134] In the foregoing specification, embodiments have been described with reference to specific embodiments. However, one of ordinary skill in the art appreciates that various modifications and changes can be made without departing from the scope of the invention. Accordingly, the specification and figures are to be regarded in an illustrative rather than a restrictive sense, and all such modifications are intended to be included within the scope of invention.
[0135] Although the invention has been described with respect to specific embodiments thereof, these embodiments are merely illustrative, and not restrictive of the invention. The description herein of illustrated embodiments of the invention is not intended to be exhaustive or to limit the invention to the precise forms disclosed herein (and in particular, the inclusion of any particular embodiment, feature or function is not intended to limit the scope of the invention to such embodiment, feature or function). Rather, the description is intended to describe illustrative embodiments, features and functions in order to provide a person of ordinary skill in the art context to understand the invention without limiting the invention to any particularly described embodiment, feature or function. While specific embodiments of, and examples for, the invention are described herein for illustrative purposes only, various equivalent modifications are possible within the spirit and scope of the invention, as those skilled in the relevant art will recognize and appreciate. As indicated, these modifications may be made to the invention in light of the foregoing description of illustrated embodiments of the invention and are to be included within the spirit and scope of the invention. Thus, while the invention has been described herein with reference to particular embodiments thereof, a latitude of modification, various changes and substitutions are intended in the foregoing disclosures, and it will be appreciated that, in some instances, some features of embodiments of the invention will be employed without a corresponding use of other features without departing from the scope and spirit of the invention as set forth. Therefore, many modifications may be made to adapt a particular situation or material to the essential scope and spirit of the invention.
[0136] In the description herein, numerous specific details are provided, such as examples of components and/or methods, to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that an embodiment may be able to be practiced without one or more of the specific details, or with other apparatus, systems, assemblies, methods, components, materials, parts, and/or the like. In other instances, well-known structures, components, systems, materials, or operations are not specifically shown or described in detail to avoid obscuring aspects of embodiments of the invention. While the invention may be illustrated by using a particular embodiment, this is not and does not limit the invention to any particular embodiment, and a person of ordinary skill in the art will recognize that additional embodiments are readily understandable and are a part of this invention.
[0137] It is also within the spirit and scope of the invention to implement in software programming or coding the steps, operations, methods, routines or portions thereof described herein, where such software programming or code can be stored in a computer-readable medium and can be operated on by a processor to permit a computer to perform any of the steps, operations, methods, routines or portions thereof described herein. The invention may be implemented by using software programming or code in one or more general purpose digital computers, by using application specific integrated circuits, where programmable logic devices, field programmable gate arrays, and optical, chemical, biological, quantum, or nanoengineered systems, components, and mechanisms may be used. In general, the functions of the invention can be achieved by any means as is known in the art. For example, distributed or networked systems, components and circuits can be used. In another example, communication or transfer (or otherwise moving from one place to another) of data may be wired, wireless, or by any other means.
[0138] It will also be appreciated that one or more of the elements depicted in the drawings/figures can also be implemented in a more separated or integrated manner, or even removed or rendered as inoperable in certain cases, as is useful in accordance with a particular application. Additionally, any signal arrows in the drawings/figures should be considered only as exemplary, and not limiting, unless otherwise specifically noted.
[0139] Benefits, other advantages, and solutions to problems have been described above with regard to specific embodiments. However, the benefits, advantages, solutions to problems, and any component(s) that may cause any benefit, advantage, or solution to occur or become more pronounced are not to be construed as a critical, required, or essential feature or component.