ArticleslgStudy

science

Color moments

Color moments is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Color moments rather than just read about it. In short: Color moments are measures that characterise color distribution in an image in the same way that central moments uniquely describe a probability distribution. Color moments are mainly used for color indexing purposes as features in image retrieval applications in order to compare how similar two images are based on color.

Key takeaways

  • Color moments belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Color moments to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Color moments from memory before moving on to harder problems.

Reference excerpt

Color moments are measures that characterise color distribution in an image in the same way that central moments uniquely describe a probability distribution. Color moments are mainly used for color indexing purposes as features in image retrieval applications in order to compare how similar two images are based on color. Usually one image is compared to a database of digital images with pre-computed features in order to find and retrieve a similar Image. Each comparison between images results in a similarity score, and the lower this score is the more identical the two images are supposed to be.

Overview Color moments are scaling and rotation invariant. It is usually the case that only the first three color moments are used as features in image retrieval applications as most of the color distribution information is contained in the low-order moments. Since color moments encode both shape and color information they are a good feature to use under changing lighting conditions, but they cannot handle occlusion very successfully. Color moments can be computed for any color model. Three color moments are computed per channel (e.g. 9 moments if the color model is RGB and 12 moments if the color model is CMYK). Computing color moments is done in the same way as computing moments of a probability distribution.

Mean

The first color moment can be interpreted as the average color in the image, and it can be calculated by using the following formula

Ei=∑j=1N1Npij where N is the number of pixels in the image and pij is the value of the j-th pixel of the image at the i-th color channel.

Standard Deviation

The second color moment is the standard deviation, which is obtained by taking the square root of the variance of the color distribution.

σi=(1N∑j=1N(pij−Ei)2) where Ei is the mean value, or first color moment, for the i-th color channel of the image.

Skewness

The third color moment is the skewness. It measures how asymmetric the color distribution is, and thus it gives information about the shape of the color distribution. Skewness can be computed with the following formula:

si=(1N∑j=1N(pij−Ei)3)3σi

Kurtosis

Kurtosis is the fourth color moment, and, similarly to skewness, it provides information about the shape of the color distribution. More specifically, kurtosis is a measure of how extreme the tails are in comparison to the normal distribution.

Higher-order color moments

Higher-order color moments are usually not part of the color moments feature set in image retrieval tasks as they require more data in order to obtain a good estimate of their value, and also the lower-order moments generally provide enough information.

Applications Color moments have significant applications in image retrieval. They can be used in order to compare how similar two images are. This is a relatively new approach to color indexing. The greatest advantage of using color moments comes from the fact that there is no need to store the complete color distribution. This greatly speeds up image retrieval since there are less features to compare. In addition, the first three color moments have the same units, which allows for comparison between them.

Color indexing Color indexing is the main application of color moments. Images can be indexed, and the index will contain the computed color moments. Then, if someone has a particular image and wants to find similar images in the database, the color moments of the image of interest will also be computed. After that the following function will be used in order to compute a similarity score between the image of interest and all the images in the database:

dmom(H,I)=∑i=1rwi1|Ei1−Ei2|+wi2|σi1−σi2|+wi3|si1−si2| where:

H and I are the color distributions of the two images that are being compared i is the channel index and r is the total number of channels Ei1 and Ei2 are the first order moments computed for the image distributions. σi1 and σi2 are the second order moments computed for the image distributions. s_i^1 and s_i^2 are the third order moments computed for the image distributions. wi1, wi2, and wi3 are weights, specified by the user, for each of the three color moments used. Finally, the images in the database will be ranked according to the computed similarity score with the image of interest, and the database images with the lowest dmom(H,I) value should be retrieved. "A retrieval based on dmom(H,I) may produce false positives because the index contains no information about the correlation between the color channels".

Example A simple and concise example of the use of color moments for image retrieval tasks is illustrated in. Consider having several test images in a database and a "New Image". The goal is to retrieve images from the database that are similar to the "New Image". The first three color moments are used as features. There are several steps in this computation.

Image preprocessing (Optional) - The image preprocessing step of the computation process is optional. For example, in this step all images could be modified to be the same size (in terms of pixels). However, since color moments are invariant to scaling, it is not necessary to make all images the same width and height. Computing the features - Use the color moments formulae in order to compute the first three moments for each of the color channels in the image. For example, if the HSV color space is used, this means that for each of the images, 9 features in total will be computed (the first three order moments for the Hue, Saturation, and Value channels). Calculating the similarity score - After computing the color moments the weights for each of the moments in the dmom(H,I) function should be determined by the user. The weights have to be adjusted each time in accordance with the application or condition and quality of the images. Following that the dmom(H,I) function is used to calculate a similarity score for the "New Image" and each of the images in the database. Ranking and image retrieval - From the previous step the dmom(H,I) values were obtained. Now a comparison of these values can be made in order to decide which of the images in the database are more similar to the "New Image", and thus rank the database images accordingly. The smaller the dmom(H,I) value is the more similar the two color distributions are supposed to be. Finally, some of the top ranked images (the ones with the smallest dmom(H,I) value) from the database are retrieved.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Color moments

Start with the simplest possible case. Write down what Color moments claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Color moments before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Color moments ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Color moments

In research
Color moments appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Color moments in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Color moments is common in secondary-school and first-year university syllabi. It links to neighbouring topics Image processing, so understanding it makes those chapters shorter.
In everyday life
Look for Color moments outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Color moments” →

How to study Color moments in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Color moments means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Color moments out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Color moments in simple terms?

Color moments are measures that characterise color distribution in an image in the same way that central moments uniquely describe a probability distribution. Color moments are mainly used for color indexing purposes as features in image retrieval applications in order to compare how similar two im…

Why does Color moments matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Color moments?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Color moments.

Tags

  • Image processing

Keep exploring