File Exchange

image thumbnail

Color Distribution Plotter

version 1.0.0 (10.6 KB) by Kei Otsuka
Display 3-D color gamut and plot distribution of colors in an image on a chromaticity diagram


Updated 27 Nov 2018

View License

This function enable you to visualize distribution of colors in an image as a 3-D color gamut and chromaticity diagram.

>>myChromaticityDiagram(image, useCurvefit, useStats)
Creates figure with three components to display input image and 3-D color gamut, and to plot distribution of colors in an image on a chromaticity diagram. Color space for 3-D color gamut is 'rgb' as a default, but you can choose another color spaces such as 'hsv', 'lab' and 'ycbcr' using pop-up menu.
Optionally, you can use 'useCurvefit' or 'useStats' flag to accelerate execution speed. For example, if you set 'useStats' flag to true, this function use knnsearch to find nearest xy coordinates and ~10x speedup might be achieved.
Curve Fitting Toolbox is required to enable useCurvefit, and Statistics and Machine Learning Toolbox is required to enable useStats. Both are mutually exclusive.
Please run tb_myChromaticity.m first to see how this function works.

>>myChromaticityDiagram(image, useCurvefit, useStats)
上記のように実行すると3つのコンポーネントを持つFigureが立ち上がり、入力画像、3D色空間と入力画像の色分布を色度図としてプロットした結果を確認できます。3D色空間の作成においては'rgb'が初期値として選択されていますが、ポップアップメニューから他の色空間('hsv', 'lab', 'ycbcr')も選択できます。
useCurvefitを有効にするためにはCurve Fitting Toolboxが必要で、useStatsにはStatistics and Machine Learning Toolboxが必要となります。これらのフラグは排他的に利用してください。

Cite As

Kei Otsuka (2019). Color Distribution Plotter (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2018b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor