File:Polarlicht 2 kmeans 16 small.png

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Polarlicht_2_kmeans_16_small.png (376 × 245 pixels, file size: 13 KB, MIME type: image/png)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

[edit]
Description

File:Polarlicht 2.jpg reduced to 16 colors using the k-means algorithm. Implemented in MATLAB in a similar manner as File:Polarlicht 2 kmeans 16 large.png, except at the last step, the image that k-means was actually run on is used for assigning the colors.

  1. Read in source image.
  2. Convert to 3-dimensional matrix of [y-value, x-value, rgb] using imread. Each entry is an integer between 0 and 255 representing the value of the color indicated by rgb at (x, y).
  3. Reduce linear resolution 8 times by averaging the values in each 8x8 matrix block (for faster processing).
  4. Run k-means (self-implemented) for 20 iterations with k = 16, obtaining 16 colors which are the centroids of each cluster.
  5. For each pixel in the original image, replace its value with the closest color based on Euclidean norm of RGB.
Note: Please do not convert this to a JPEG. It must remain in a lossless format to preserve the integrity of the RGB values. Also do not delete this as a scaled-down duplicate of File:Polarlicht 2 kmeans 16 large.png; the manner in which it is a smaller version of that image is important to the purpose of the image.
Date
Source Own work
Author Senior Airman Joshua Strang, derivative work by King of Hearts
Other versions See gallery

Licensing

[edit]
Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
In some countries this may not be legally possible; if so:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.
Public domain
This image or file is a work of a U.S. Air Force Airman or employee, taken or made as part of that person's official duties. As a work of the U.S. federal government, the image or file is in the public domain in the United States.

العربية  беларуская (тарашкевіца)  català  čeština  Deutsch  English  español  eesti  فارسی  suomi  français  italiano  日本語  한국어  македонски  മലയാളം  မြန်မာဘာသာ  norsk bokmål  Plattdüütsch  Nederlands  polski  português  português do Brasil  русский  sicilianu  slovenčina  slovenščina  српски / srpski  svenska  Türkçe  українська  Tiếng Việt  中文(简体)  中文(繁體)  /−

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current20:50, 20 November 2012Thumbnail for version as of 20:50, 20 November 2012376 × 245 (13 KB)King of Hearts (talk | contribs)VicuñaUploader 1.16

There are no pages that use this file.

Metadata