필터 지우기
필터 지우기

Calculate Dominant wavelength in CIE 1931

조회 수: 36 (최근 30일)
nesrine merabti
nesrine merabti 2023년 4월 27일
답변: Supraja 2023년 5월 5일
I did program for get the dominant wavelength from CIE1931 diagram, Now I need mathematic demonstration of dominant wavelegth formula "dominant_wavelength = 580 + (300*x) + (700*y)".
Can any one help me for that.

답변 (1개)

Supraja
Supraja 2023년 5월 5일
You can use the below function:
function varargout=dp2xy(varargin)
%DP2XY Calculate chromaticity from dominating wavelength and spectral purity.
% XY=DP2XY(DP,CWF) with size(DP)=[M N ... P 2] returns
% matrix XY with same size.
%
% XY=DP2XY(D,P,CWF) with size(D,P)=[M N ... P] returns
% matrix XY with size [M N ... P 2].
%
% [X,Y]=DP2XY(DP,CWF) with size(DP)=[M N ... P 2] returns
% matrices X and Y, each with size [M N ... P].
%
% [X,Y]=DP2XY(D,P,CWF) with size(D,P)=[M N ... P]
% returns equally sized matrices X and Y.
% CWF is a color weighting function specification. It can be a string,
% e.g. 'D50/2', or a struct, see MAKECWF. If omitted or empty, the
% default cwf, DCWF is used.
%
% Example:
% Show the locus of xy with the spectral purity = 0.5 in the chromaticity plane
%
% lam=linspace(380,720,20);
% [x,y]=dp2xy(lam,.5*ones(size(lam)));
% plot(x,y, 'LineWidth', 2)
% hold on
% helmholtz
% hold off
% axis equal
%
% See also: I_DP2XY, XY2DP, MAKECMF, OPTGETPREF
% Part of the OptProp toolbox, $Version: 2.1 $
% Author: Jerker Wågberg, More Research & DPC, Sweden
% Email: ['jerker.wagberg' char(64) 'more.se']
% $Id: dp2xy.m 23 2007-01-28 22:55:34Z jerkerw $
varargout=cell(1,max(1,nargout));
[err,varargout{:}]=optproc([2 0 1 0 0],1,@i_dp2xy,varargin{:});
error(err);
For additional reference you can follow the link given below:
https://www.mathworks.com/matlabcentral/fileexchange/13788-optprop-a-color-properties-toolbox?s_tid=srchtitle_wavelength%20calculation%20of%20cie1931_1

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by