A method and system for classifying an image as a photograph or a graphic based on a ranked prevalent color histogram feature or a ranked region size feature is provided. The prevalent color histogram feature contains counts of the colors that are most prevalent in the image sorted in descending order. The region size feature contains counts of the largest regions of the image sorted in descending order. The classification system then classifies the image based on the ranked prevalent color histogram feature and/or the ranked region size feature using a previously trained classifier.
|
7. A system for classifying an image as a photograph or a graphic, comprising:
a memory storing computer-executable instructions of:
a component that extracts a region size feature for an image, a region size being the size of a region of the image that contains similar colors, a region being a contiguous area of the image;
a component that normalizes the extracted region size feature for an image based on the size of the image; and
a classifier that classifies the image as a photograph or graphic based on the normalized region size feature; and
a processor for executing the computer-executable instructions stored in the memory.
1. A system for classifying an image as a photograph or a graphic, comprising:
a memory storing computer-executable instructions of:
a component that extracts a prevalent color histogram feature for an image, the prevalent color histogram feature being based on the number of pixels of the image that contain similar colors;
a component that generates a ranked prevalent color histogram feature representing an ordering of the colors based on the number of pixels of that image that contain similar colors; and
a classifier that classifies the image as a photograph or graphic based on the ranked prevalent color histogram feature, the classifier trained using training data that includes ranked prevalent color histogram features of training images and a label for each training image indicating whether the image is a photograph or a graphic; and
a processor for executing the computer-executable instructions stored in the memory.
2. The system of
4. The system of
5. The system of
6. The system of
9. The system of
10. The system of
12. The system of
|
The Internet is being increasingly used to search for and view images (e.g., photographs). To support this use, commercial search engine services have located and indexed over 1 billion images since 2005. Users who search for images often want to locate and view images that are either photographs or graphics. Photographs (e.g., portraits) are a class of images typically acquired by cameras and scanners, and graphics (e.g., chart or drawing) are a class of images generated by computers. A person searching for images may know the semantic content and the class of image of interest. For example, a person may want to locate a cartoon that contains a picture of a dog. After submitting an image query such as “dog cartoon,” the user may be presented with hundreds of images as the search result and needs to review all the images to identify those images of the desired class. It would be helpful if the user could limit the search to only graphic images when searching for images generated by a computer.
Current commercial image search engines, however, do not allow a user to limit a search to photographic or graphic images. These search engines typically locate images of web pages based on text such as text surrounding the image or text of a file name or images of image forums based on text of metadata such as description, file name, and reviewer comments. This text may describe the semantic content of an image (e.g., “dogimage1.jpg”) to a certain extent, but rarely classifies the image as being a photograph or graphic.
The classifying of images as a photograph or graphic is also useful in personal image management. A person may have thousands of images stored on their computer system and may want to search only for photographic images or only for graphic images. For example, a person may want to view only their personal photographs or may want to view only their collection of business graphics. Also, when automatically processing images, it can be important to distinguish photographs from graphics. For example, a person may want to add a border to all the photographs, but not to graphics.
Current techniques for classifying images as photographs or graphics are either inaccurate or computationally expensive. One technique tends to differentiate photographs from graphics based on various features of the images including the number of colors, most prevalent color, a farthest neighbor metric, and a saturation metric. Such a technique, however, has a relatively high error rate. Another technique uses image geometry to differentiate photographs from graphics. This technique, however, can take more than 50 seconds to classify an image, which makes the technique impractical for use in web-based image searching.
A method and system for classifying an image as a photograph or a graphic based on a prevalent color histogram feature or a region size feature is provided. The classification system generates the prevalent color histogram feature by counting the number of pixels of the image that have similar colors. Each count represents a bin of similar colors. The classification system may define similar colors by quantizing the color values. The classification system then selects the bins with the largest counts and sorts them in descending order. The result is a ranked prevalent color histogram feature. The classification system then classifies the image based on the ranked prevalent color histogram feature using a previously trained classifier.
The classification system generates the region size feature of an image by segmenting the image into regions of similar colors. The classification system calculates the size of each region. The classification system then selects the sizes of the largest regions and sorts them in descending order. The result is a ranked region size feature. The classification system then classifies the image based on the ranked region size feature using a previously trained classifier.
This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.
A method and system for classifying an image as a photograph or a graphic based on a prevalent color histogram feature or a region size feature is provided. In one embodiment, the classification system generates a prevalent color histogram feature for an image to be classified. The classification system generates the prevalent color histogram feature by counting the number of pixels of the image that have similar colors. Each count represents a bin or group of similar colors. The classification system may define similar colors by quantizing the color values. For example, if the color of an image is represented in RGB space with an 8-bit value for each color, then the classification system may quantize the 8-bit values to 5-bit values of 32 bins. The classification system then counts the number of pixels in each bin. For example, the counts may specify 200 pixels in the bin for the quantized color value (0, 0, 0), 210 pixels in the bin for the quantized color value (0, 0, 1), 25 pixels in the bin for the quantized color value (0, 0, 2), and so on ending with 10 pixels in the bin for the quantized color value (31, 31, 31). The classification system then selects the bins with the largest counts and sorts them in descending order. The result is a ranked prevalent color histogram feature. The classification system then classifies the image based on the ranked prevalent color histogram feature using a previously trained classifier as described below. The use of a ranked prevalent color histogram feature allows the classification system to quickly and reliably classify images as photographs or graphics.
In an embodiment, the classification system generates a region size feature for an image to be classified. The classification system generates the region size feature by segmenting the image into regions of similar colors. For example, the classification system may use a watershed segmentation algorithm as described below to segment the image. The classification system then calculates the size of each region. The classification system then selects the sizes of the largest regions and sorts them in descending order. The result is a ranked region size feature. The classification system then classifies the images based on the ranked region size feature using a previously trained classifier as described below. The use of the ranked region size feature allows the classification system to quickly and reliably classify images as photographs or graphics.
In one embodiment, the classification system may use various combinations of features to generate a feature vector for classifying images as photographs or graphics. The classification system may use both the ranked prevalent color histogram feature and the ranked region size feature. In addition, the classification system may use a color moment feature, a correlograms feature, and a farthest neighbor histogram feature. The color moment feature characterizes the color distribution using color moments such as mean, standard deviation, and skewness for the H, S, and V channels of HSV space. (See, M. Stricker, and M. Orengo, “Similarity of color images,” Proceedings of SPIE Storage and Retrieval for Image and Video Databases Conference, pp. 381-392, 1995.) The correlograms feature incorporates the spatial correlation of colors to provide texture information and describes the global distribution of the local spatial correlation of colors. (See, J. Huang, R. Kumar, and M. Mitra, “Image Indexing Using Color Correlograms,” Proc. CVPR, pp. 762-768, 1997.) The classification system may simplify the process of extracting the correlograms features by quantizing the RGB colors and using the probability that the neighbors of a given pixel are identical in color as the feature. The farthest neighbor histogram feature identifies the pattern of color transitions from pixel to pixel. (See, V. Athitsos, M. J. Swain, and C. Frankel, “Distinguishing Photographs and Graphics on the World Wide Web,” IEEE Workshop on Content-Based Access of Image and Video Libraries, pp. 10-17, June 1997.) The classification system may combine various combinations of features into the feature vector that is used to classify an image.
In one embodiment, the classification system trains a classifier based on image training data. The classification system generates a feature vector for each image of the training data. The feature vector may include various combinations of the features included in the ranked prevalent color histogram feature and the ranked region size feature. The classification system may also receive the classification of each image of the training data as a photograph or graphic. The classification system then trains the classifier using the feature vectors and classifications of the images. The classification system may use various classifiers. For example, the classification system may use a support vector machine (“SVM”) classifier, an adaptive boosting (“AdaBoost”) classifier, a neural network model classifier, and so on.
A support vector machine operates by finding a hyper-surface in the space of possible inputs. The hyper-surface attempts to split the positive examples (e.g., feature vectors for photographs) from the negative examples (e.g., feature vectors for graphics) by maximizing the distance between the nearest of the positive and negative examples to the hyper-surface. This allows for correct classification of data that is similar to but not identical to the training data. Various techniques can be used to train a support vector machine. One technique uses a sequential minimal optimization algorithm that breaks the large quadratic programming problem down into a series of small quadratic programming problems that can be solved analytically. (See Sequential Minimal Optimization, at http://research.microsoft.com/˜jplatt/smo.html.)
Adaptive boosting is an iterative process that runs multiple tests on a collection of training data. Adaptive boosting transforms a weak learning algorithm (an algorithm that performs at a level only slightly better than chance) into a strong learning algorithm (an algorithm that displays a low error rate). The weak learning algorithm is run on different subsets of the training data. The algorithm concentrates more and more on those examples in which its predecessors tended to show mistakes. The algorithm corrects the errors made by earlier weak learners. The algorithm is adaptive because it adjusts to the error rates of its predecessors. Adaptive boosting combines rough and moderately inaccurate rules of thumb to create a high-performance algorithm. Adaptive boosting combines the results of each separately run test into a single, very accurate classifier. Adaptive boosting may use weak classifiers that are single-split trees with only two leaf nodes.
A neural network model has three major components: architecture, cost function, and search algorithm. The architecture defines the functional form relating the inputs to the outputs (in terms of network topology, unit connectivity, and activation functions). The search in weight space for a set of weights that minimizes the objective function is the training process. In one embodiment, the classification system may use a radial basis function (“RBF”) network and a standard gradient descent as the search technique.
The computing devices on which the classification system may be implemented may include a central processing unit, memory, input devices (e.g., keyboard and pointing devices), output devices (e.g., display devices), and storage devices (e.g., disk drives). The memory and storage devices are computer-readable media that may contain instructions that implement the classification system. In addition, the data structures and message structures may be stored or transmitted via a data transmission medium, such as a signal on a communications link. Various communications links may be used, such as the Internet, a local area network, a wide area network, or a point-to-point dial-up connection.
The classification system may use various computing systems or devices including personal computers, server computers, hand-held or laptop devices, multiprocessor systems, microprocessor-based systems, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The classification system may also provide its services to various computing systems such as personal computers, cell phones, personal digital assistants, consumer electronics, home automation devices, and so on.
The classification system may be described in the general context of computer-executable instructions, such as program modules, executed by one or more computers or other devices. Generally, program modules include routines, programs, objects, components, data structures, and so on that perform particular tasks or implement particular abstract data types. Typically, the functionality of the program modules may be combined or distributed as desired in various embodiments. For example, the train classifier component may be implemented on a computer system separate from the computer system that classifies images using the classify image component.
In one embodiment, the classification system uses a watershed segmentation algorithm to identify the regions with similar colors. The classification system could, however, use any of a variety of well-known segmentation algorithms. A watershed segmentation algorithm segments regions of an image into “catchment basins.” These basins are low points in the intensity of the image being segmented. The basins represent the segments, and the basins share boundaries. The algorithm conceptually fills the basins with rainwater. As the water level rises, the basins fill and water spills across the boundaries, joining those basins into larger basins. The final height of the water level controls the number of basins. A large final height results in fewer basins because adjacent basins with boundaries below the final height are joined, and a small final height results in more basins because fewer are joined. (See, L. Vincent, and P. Soille, “Watersheds in Digital Spaces: An efficient Algorithm Based on Immersion Simulations,” IEEE Transactions on Pattern Analysis and Machine Intelligence, 13(6):583-598, June 1991.) The classification system may define the distance between two pixels p1 and p2 for the watershed segmentation by the following equation:
d=|r1−r2|+|g1−g2|+|b1−b2|, (1)
where d represents the distance and (r1,g1,b1) and (r2,g2,b2) represent colors for pixels p1 and p2, respectively. The classification system defines a neighbor p2 of p1 as in the same region of p1 if the distance between them is smaller than a predefined threshold.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. For example, the classification could use no ranking or partial ranking of counts or region sizes, rather than complete ranking. Accordingly, the invention is not limited except as by the appended claims.
Ma, Wei-Ying, Li, Zhiwei, Li, Mingjing, Chen, Yuanhao
Patent | Priority | Assignee | Title |
10268923, | Dec 29 2015 | Bar-Ilan University | Method and system for dynamic updating of classifier parameters based on dynamic buffers |
7822696, | Jul 13 2007 | Microsoft Technology Licensing, LLC | Histogram-based classifiers having variable bin sizes |
7853071, | Nov 16 2006 | INNOVATION ASSET COLLECTIVE | Method and system for learning object recognition in images |
7876958, | Jun 25 2007 | Xerox Corporation | System and method for decomposing a digital image |
8059898, | Nov 16 2006 | INNOVATION ASSET COLLECTIVE | Method and system for learning object recognition in images |
8065313, | Jul 24 2006 | GOOGLE LLC | Method and apparatus for automatically annotating images |
8139852, | Jun 29 2006 | Fujitsu Limited | Color classification method, color recognition method, color classification apparatus, color recognition apparatus, color recognition system, computer program, and recording medium |
8139865, | Jun 25 2007 | Xerox Corporation | Computer-implemented system and method for recognizing patterns in a digital image through document image decomposition |
8437557, | May 11 2010 | Microsoft Technology Licensing, LLC | Auto classifying images as “image not available” images |
8457414, | Aug 03 2009 | Board of Regents of the University of Texas System | Detection of textural defects using a one class support vector machine |
8774509, | Mar 01 2012 | GOOGLE LLC | Method and system for creating a two-dimensional representation of an image based upon local representations throughout the image structure |
Patent | Priority | Assignee | Title |
6381363, | Mar 15 1999 | GRASS VALLEY US INC ; GRASS VALLEY U S INC | Histogram-based segmentation of images and video via color moments |
7305151, | Apr 30 2003 | Canon Kabushiki Kaisha | Image processing apparatus and method therefor |
7425963, | Jul 16 2001 | HEWLETT-PACKARD DEVELOPMENT COMPANY L P | Hierarchical image feature-based visualization |
7453468, | Nov 29 2000 | Xerox Corporation | Intelligent color to texture converter |
20060147107, | |||
20070076950, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Feb 21 2006 | Microsoft Corporation | (assignment on the face of the patent) | / | |||
Apr 07 2006 | CHEN, YUANHAO | Microsoft Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 017482 | /0476 | |
Apr 10 2006 | LI, MINGJING | Microsoft Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 017482 | /0476 | |
Apr 10 2006 | LI, ZHIWEI | Microsoft Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 017482 | /0476 | |
Apr 17 2006 | MA, WEI-YING | Microsoft Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 017482 | /0476 | |
Oct 14 2014 | Microsoft Corporation | Microsoft Technology Licensing, LLC | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 034543 | /0001 |
Date | Maintenance Fee Events |
Mar 18 2013 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Jul 24 2017 | M1552: Payment of Maintenance Fee, 8th Year, Large Entity. |
Jun 23 2021 | M1553: Payment of Maintenance Fee, 12th Year, Large Entity. |
Date | Maintenance Schedule |
Feb 02 2013 | 4 years fee payment window open |
Aug 02 2013 | 6 months grace period start (w surcharge) |
Feb 02 2014 | patent expiry (for year 4) |
Feb 02 2016 | 2 years to revive unintentionally abandoned end. (for year 4) |
Feb 02 2017 | 8 years fee payment window open |
Aug 02 2017 | 6 months grace period start (w surcharge) |
Feb 02 2018 | patent expiry (for year 8) |
Feb 02 2020 | 2 years to revive unintentionally abandoned end. (for year 8) |
Feb 02 2021 | 12 years fee payment window open |
Aug 02 2021 | 6 months grace period start (w surcharge) |
Feb 02 2022 | patent expiry (for year 12) |
Feb 02 2024 | 2 years to revive unintentionally abandoned end. (for year 12) |