AUTOMATIC DETECTION OF CALIBRATION CHARTS IN IMAGES
Methods and apparatuses for locating an embedded color chart in an image are described. In one exemplary method, an image that includes an embedded color chart is located without the intervention of the user. The embedded color chart is verified and used to create a color profile of the image. Furthermore, the orientation angle of the color chart is determined and the image orientation is fixed based on this angle.
This application is a continuation of co-pending U.S. patent application Ser. No. 11/811,214, filed on Jun. 8, 2007, entitled “Automatic Detection of Calibration Charts in Images.”
FIELD OF THE INVENTIONThis invention relates generally to image processing and more particularly to automatically detecting a color calibration charts embedded in a digital image.
BACKGROUND OF THE INVENTIONA color calibration chart (“color chart”) is an array of several blocks of known color values that is used to calibrate and evaluate the color in cameras and other systems capable of color reproduction. Each of the squares represent different colors that are typically used in color images, such as white, black, different levels of gray, as well as colors representing human skin, foliage, and blue sky. Color charts are typically used photography, graphic arts, electronic publishing, and video production to check cameras (still and video), printers, scanners, monitors, or any other equipment used in the color reproductions system.
A photographer will typically take a picture of a scene that includes the color chart. The photographer can do this for every picture, or for a representative picture in a sequence of pictures. In the post-processing of the image, in one embodiment, a user would manually check the color of the some or all of the color squares in the reproduced color chart and adjust the reproduced color until the color of the square matched or closely approximated the known color. In an alternate embodiment, the user would select the color chart in the image and a computer would detect the selected color chart and use this chart to calibrate the image.
However, this process requires the user to manually select the color chart, or manually check each of the squares to calibrate the image. In addition, these methods known in the art require the color chart be horizontal with the image, which means that the color chart cannot be oriented at an angle other than zero to the image.
SUMMARY OF THE DESCRIPTIONMethods and apparatuses for locating an embedded color chart in an image are described. In one exemplary method, an image that includes an embedded color chart is located without the intervention of the user. The embedded color chart is verified and used to create a color profile of the image. Furthermore, the orientation angle of the color chart is determined and the image orientation is fixed based on this angle.
The patent or application file contains at least one drawing executed in color. Copies of this patent or patent application publication with color drawing(s) will be provided by the Office upon request and payment of the necessary fee.
The present invention is illustrated by way of example and not limitation in the figures of the accompanying drawings in which like references indicate similar elements.
In the following detailed description of embodiments of the invention, reference is made to the accompanying drawings in which like references indicate similar elements, and in which is shown by way of illustration specific embodiments in which the invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the invention, and it is to be understood that other embodiments may be utilized and that logical, mechanical, electrical, functional, and other changes may be made without departing from the scope of the present invention. The following detailed description is, therefore, not to be taken in a limiting sense, and the scope of the present invention is defined only by the appended claims.
In the embodiment illustrated in
In
At block 204, method 200 fixes the orientation of the image such that the color chart is spatially horizontal, such that the sides of the color chart are parallel to the image frame. The color chart may not be in a perfect horizontal orientation relative to the borders of the pictures. In one embodiment, method 200 determines the orientation angle of the color chart by plotting a histogram of the edge angles in the image. The orientation angle can be a small angle such that the color chart is tilted slightly or large in the case where the color chart is heavily tilted. Method 200 rotates the image by the orientation angle to fix the orientation. Fixing the orientation results in the color chart being right side up or upside down. Fixing the orientation of the image is further described in
Method 200 further executes a processing loop (blocks 206-212) to locate a particular reference color chart (N×M color chart) in the image. At block 208, method 200 searches for a particular N×M chart in the image. N refers to the number of color square columns in the color chart and M is the number of color square rows. As stated above, color charts are typically industry standard charts, comprising known dimensions, and number and type of color squares.
At block 210, method 200 determines if the N×M color chart is located. Locating a color chart is further described in
If method 200 has located the N×M color chart, method 200 verifies this chart at block 216. In one embodiment, verification consists of checking the located color chart for the correct number, arrangement and type of color squares. Alternatively, method 200 is to build a color profile using the found chart and check if the color matrix is roughly diagonal. Method 200 optionally prompts the user to calibrate this image using the found color chart at block 218. At block 220, method 200 uses the located color chart to create a color profile for the image. In one embodiment, a color profile, as is known in the art, can be used to calibrate a sensor such as one typically found in a camera, video camera, scanner, printer, etc. Alternatively, the color profile is used to calibrate the sensor for specific lighting conditions (for example, as during a photo shoot). In an alternate embodiment, the color profile is used to calibrate a sequence of images, such as a group of photos taken of the same scene or photo session. In another embodiment, the color profile is used to calibrate a series of video frames. The video frames can be from the same or different scene. In a further embodiment, the color profile can be used to calibrate color reproduction equipment, such as cameras, video cameras, printers, scanners, copiers, etc.
Method 500 fits a known pulse signal of the N×M color chart to the average horizontal and vertical scan lines by locating the horizontal and vertical positions of the color chart and fitting the pulses sequences of peaks and valleys from the average horizontal and vertical scan lines with generated pulse signals corresponding to a reference color chart. Method 500 further executes a first processing loop (blocks 504-522) to determine if there is a pulse representing rows of color squares in an embedded color chart in the image. At block 506, method 500 finds the next start position. In one embodiment, the next start position is the next pixel on the average horizontal scan line. In an alternate embodiment, a suitable scheme to known in the art to locate another point on a line can be employed.
At block 508, method 500 attempts to fit M pulses of the average horizontal scan line onto a generated signal. The M pulses represent M rows of the reference color chart and the generated signal is a signal that represents average horizontal scan line for the reference color chart. In one embodiment, method 500 fits the M pulses onto the generate signal by matching the number of pulses in generated signal with the number of pulses in the average horizontal scan line. In an alternate embodiment, method 500 fits M pulses onto a generated signal as further described in
At block 510, method 500 determines if the vertical fit is successful. In one embodiment, method 500 compares the sum of the goodness values is greater than a threshold. In one embodiment, the threshold is an empirical threshold. The determination of the goodness values for the average horizontal scan lines is further described at
It the vertical fit was successful, the location of the fit sets the top and bottom horizontal position of the color chart in the image. Locating the left and right vertical positions of the color chart can be accomplished by searching a reduced image bounded by the top and bottom horizontal positions determined above. Method 500 computes a reduced average vertical scan line at block 512. In one embodiment, the reduced average vertical scan line is determined by computing the average luminance along a vertical scan line of the image in between the top and bottom horizontal determined above. By computing the reduce average vertical scan line, the difference between the pulse peaks and valleys in the reduced average vertical scan lines can be more pronounced that for the average horizontal scan lines because there is less luminance contribution due to pixels that are not part of the color chart in the reduced image. Thus, the area above and below the chart can be excluded from computing the average vertical scan lines.
Method 500 further executes a second processing loop (blocks 514-522) to determine if there is a pulse representing rows of color squares in an embedded color chart in the image. At block 514, method 500 finds the next start position. In one embodiment, the next start position is the next pixel on the average horizontal scan line. In an alternate embodiment, a suitable scheme to known in the art to locate another point on a line can be employed. Furthermore, method 500 does not need to search over all possible pulse widths. In one embodiment, the height of the color chart and the peaks method 500 is searching for are roughly square. In this embodiment, method 500 searches for pulse widths that roughly comparable to the determined pulse height of the color chart.
At block 518, method 500 attempts to fit N pulses of the average vertical scan line onto a generated signal. The N pulses represent N columns of the reference color chart. The generated signal is a signal that represents average vertical scan line for the reference color chart. In one embodiment, method 500 fits the N pulses onto the generated signal by matching the number of pulses in generated signal with the number of pulses in the average vertical scan line. In an alternate embodiment, method 500 fits N pulses onto a generate signal as further described in
As block 520, method 500 determines if the horizontal fit is successful. In one embodiment, method 500 compares if the sum of the goodness values is greater than a threshold. The determination of the goodness values for the average horizontal scan lines is further described at
If the horizontal fit was successful, a color chart was found and control proceeds to block 216. If no color chart is found, control proceeds to block 212.
Returning to
At block 808, method 800 creates a histogram of the vector angle image. The histogram clusters vector angles along peaks of the histogram that are related to the orientation angle of the color chart.
Returning to
In practice, the methods described herein may constitute one or more programs made up of machine-executable instructions. Describing the method with reference to the flowchart in
The web server 1208 is typically at least one computer system which operates as a server computer system and is configured to operate with the protocols of the World Wide Web and is coupled to the Internet. Optionally, the web server 1208 can be part of an ISP which provides access to the Internet for client systems. The web server 1208 is shown coupled to the server computer system 1210 which itself is coupled to web content 1212, which can be considered a form of a media database. It will be appreciated that while two computer systems 1208 and 1210 are shown in
Client computer systems 1212, 1216, 1224, and 12212 can each, with the appropriate web browsing software, view HTML pages provided by the web server 1208. The ISP 1204 provides Internet connectivity to the client computer system 1212 through the modem interface 1214 which can be considered part of the client computer system 1212. The client computer system can be a personal computer system, a network computer, a Web TV system, a handheld device, or other such computer system. Similarly, the ISP 1206 provides Internet connectivity for client systems 1216, 1224, and 1226, although as shown in
Alternatively, as well-known, a server computer system 1228 can be directly coupled to the LAN 1222 through a network interface 1234 to provide files 12312 and other services to the clients 1224, 1226, without the need to connect to the Internet through the gateway system 1220. Furthermore, any combination of client systems 1212, 1216, 1224, 1226 may be connected together in a peer-to-peer network using LAN 1222, Internet 1202 or a combination as a communications medium. Generally, a peer-to-peer network distributes data across a network of multiple machines for storage and retrieval without the use of a central server or servers. Thus, each peer network node may incorporate the functions of both the client and the server described above.
The following description of
Network computers are another type of computer system that can be used with the embodiments of the present invention. Network computers do not usually include a hard disk or other mass storage, and the executable programs are loaded from a network connection into the memory 1308 for execution by the processor 1304. A Web TV system, which is known in the art, is also considered to be a computer system according to the embodiments of the present invention, but it may lack some of the features shown in
It will be appreciated that the computer system 1300 is one example of many possible computer systems, which have different architectures. For example, personal computers based on an Intel microprocessor often have multiple buses, one of which can be an input/output (I/O) bus for the peripherals and one that directly connects the processor 1304 and the memory 1308 (often referred to as a memory bus). The buses are connected together through bridge components that perform any necessary translation due to differing bus protocols.
It will also be appreciated that the computer system 1300 is controlled by operating system software, which includes a file management system, such as a disk operating system, which is part of the operating system software. One example of an operating system software with its associated file management system software is the family of operating systems known as MAC OS X from Apple Corporation in Cupertino, Calif., and their associated file management systems. The file management system is typically stored in the non-volatile storage 1314 and causes the processor 1304 to execute the various acts required by the operating system to input and output data and to store data in memory, including storing files on the non-volatile storage 1314.
It will be appreciated that computer system 1300 could be a camera, video camera, scanner, or any other type image acquisition system. In one embodiment, image acquisition system comprises a lens, image sensor or other hardware typically associated with a camera, video camera, or other type if image acquisition system.
In the foregoing specification, the invention has been described with reference to specific exemplary embodiments thereof. It will be evident that various modifications may be made thereto without departing from the broader spirit and scope of the invention as set forth in the following claims. The specification and drawings are, accordingly, to be regarded in an illustrative sense rather than a restrictive sense.
Claims
1. A computerized method comprising:
- receiving an image, wherein the image comprises an embedded color chart;
- locating the embedded color chart without intervention of a user;
- verifying the embedded color chart; and
- creating a color profile for the image based on the embedded color chart.
2. The computerized method of claim 1, wherein the locating comprises:
- computing an average horizontal scan line comprising a first set of pulses;
- fitting a second set of generated pulses corresponding to a reference color chart to the first set of pulses;
- determining if the first set of pulses matches the second set of generated pulses;
- computing an average vertical scan line comprising a third set of pulses;
- fitting a fourth set of generated pulses corresponding to a reference color chart to the third set of pulses; and
- determining if the third set of pulses matches the second set of generated pulses; and
- determining the location of the embedded color chart in the image based on the first and third set of pulses.
3. The computerized method of claim 2, wherein said fitting a second set of generated pulses to a first set of pulses comprises matching the number pulses in the second set of generated pulses to the first set of pulses.
4. The computerized method of claim 1, further comprising:
- determining an orientation angle of the embedded color chart; and
- fixing the orientation of the image based on the orientation angle.
5. The computerized method of claim 4, wherein the determining the orientation angle comprises:
- performing edge detection on the image;
- measuring an set of vector angles, wherein each angle in the set of vector angles is an angle of the gradient vector for each edge in the image;
- creating an angle image from the set of vector angles;
- creating a histogram from the angle image;
- reducing the histogram to one spike; and
- determining the orientation angle by selecting the maximum value in the reduced histogram.
6. The computerized method of claim 1, further comprising:
- calibrating the image with the color profile.
7. The computerized method of claim 6, further comprising:
- receiving a set of other images; and
- calibrating the set of other images with the color profile.
8. A computerized method comprising:
- locating automatically an embedded color chart in an image;
- determining an orientation angle of the embedded color chart in the image; and
- fixing the orientation of the image based on the orientation angle.
9. The computerized method of claim 8, wherein the determining the orientation angle comprises:
- performing edge detection on the image;
- measuring a set of vector angles, wherein each angle in the set of vector angles is an angle of the gradient vector for each edge in the image;
- creating an angle image from the set of vector angles;
- creating a histogram from the angle image;
- reducing the histogram to one spike; and
- determining the orientation angle by selecting the maximum value in the reduced histogram.
10. The computerized method of claim 9, further comprising:
- calibrating the image with the color profile.
11. The computerized method of claim 10, further comprising:
- receiving a set of other images; and
- calibrating the set of other images with the color profile.
12. A machine-readable medium having executable instructions to cause a processing system to perform a method comprising:
- receiving an image, wherein the image comprises an embedded color chart;
- locating the embedded color chart without intervention of a user;
- verifying the embedded color chart; and
- creating a color profile for the image based on the embedded color chart.
13. The machine-readable medium of claim 12, the method further comprising:
- computing an average horizontal scan line comprising a first set of pulses;
- fitting a second set of generated pulses corresponding to a reference color chart to the first set of pulses;
- determining if the first set of pulses matches the second set of generated pulses;
- computing an average vertical scan line comprising a third set of pulses;
- fitting a fourth set of generated pulses corresponding to a reference color chart to the third set of pulses; and
- determining if the third set of pulses matches the second set of generated pulses; and
- determining the location of the embedded color chart in the image based on the first and third set of pulses.
14. The medium of claim 12, the method further comprising:
- determining an orientation angle of the embedded color chart; and
- fixing the orientation of the image based on the orientation angle.
15. The medium of claim 14, wherein the determining the orientation angle comprises:
- performing edge detection on the image;
- measuring a set of vector angles, wherein each angle in the set of vector angles is an angle of the gradient vector for each edge in the image;
- creating an angle image from the set of vector angles;
- creating a histogram from the angle image;
- reducing the histogram to one spike; and
- determining the orientation angle by selecting the maximum value in the reduced histogram.
16. The medium of claim 14, the method further comprising:
- calibrating the image with the color profile.
17. The medium of claim 16, further comprising:
- receiving a set of other images; and
- calibrating the set of other images with the color profile.
18. A machine readable medium having executable instructions to cause a processing system to perform a method comprising:
- locating automatically an embedded color chart in an image;
- determining an orientation angle of the embedded color chart in the image; and
- fixing the orientation of the image based on the orientation angle.
19. The medium of claim 18, wherein the determining the orientation angle comprises:
- performing edge detection on the image;
- measuring a set of vector angles, wherein each angle in the set of vector angles is an angle of the gradient vector for each edge in the image;
- creating an angle image from the set of vector angles;
- creating a histogram from the angle image;
- reducing the histogram to one spike; and
- determining the orientation angle by selecting the maximum value in the reduced histogram.
20. The medium of claim 19, the method further comprising:
- calibrating the image with the color profile.
21. The medium of claim 20, the method further comprising:
- receiving a set of other images; and
- calibrating the set of other images with the color profile.
Type: Application
Filed: Dec 1, 2011
Publication Date: Mar 29, 2012
Inventors: Ralph T. Brunner (Cupertino, CA), David Hayward (Los Altos, CA)
Application Number: 13/309,340
International Classification: G06K 9/00 (20060101);