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
256 Downloads
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.
--
[Japanese]
本ツールを利用することで、画像中の色分布を3D色空間と色度図で可視化することができます。

>>myChromaticityDiagram(image, useCurvefit, useStats)
上記のように実行すると3つのコンポーネントを持つFigureが立ち上がり、入力画像、3D色空間と入力画像の色分布を色度図としてプロットした結果を確認できます。3D色空間の作成においては'rgb'が初期値として選択されていますが、ポップアップメニューから他の色空間('hsv', 'lab', 'ycbcr')も選択できます。
また、任意でuseCurvefitもしくはuseStatsフラグを利用して実行速度を改善可能です。例えば、useStatsをtrueに設定すると、最近傍のxy座標の探索にknnsearchが利用され、~10倍程度の高速化が期待できます。
useCurvefitを有効にするためにはCurve Fitting Toolboxが必要で、useStatsにはStatistics and Machine Learning Toolboxが必要となります。これらのフラグは排他的に利用してください。
まず始めにtb_myChromaticity.mを実行していただくと、本関数の振る舞いが確認できます。
--
[Keyward]
画像処理・色空間・カラープロファイル・色度図・デモ・IPCVデモ・色空間変換

Cite As

Kei Otsuka (2024). Color Distribution Plotter (https://www.mathworks.com/matlabcentral/fileexchange/69503-color-distribution-plotter), MATLAB Central File Exchange. Retrieved .

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

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0