[argyllcms] Re: DE2000 Tolerance Ellipsoids
- From: Jack Hogan <jack.hogan77@xxxxxxxxx>
- To: argyllcms@xxxxxxxxxxxxx
- Date: Tue, 14 Apr 2020 08:46:51 +0200
Speaking of Matlab, the attached may give some pointers and is how I dealt
with something similar here:
https://www.strollswithmydog.com/just-noticeable-difference-color/
jack
On Tue, Apr 14, 2020 at 5:30 AM Graeme Gill <graeme@xxxxxxxxxxxxx> wrote:
graxx@xxxxxxxxxxxx wrote:
Would anyone have any experience calculating DE2000 Tolerance Ellipsoids?
https://1drv.ms/u/s!AkD78CVR1NBqk8g4WLQJjsLHmizXUw?e=o9a6Ce
<https://1drv.ms/u/s%21AkD78CVR1NBqk8g4WLQJjsLHmizXUw?e=o9a6Ce>
Hi Roger,
no experience, but I know how I would go about it. Short
of an analytical approach, the pragmatic approach would be to
simply use a numerical minimizer to locate points in the a*b*
plane in a given direction that have your target ellipsoid delta E 2K.
Feed vectors around the circle, and plot your ellipsoid. Coded
in a compiled language this would be pretty fast. I guess it could
be coded in something like MATLAB or GNU Octave as well.
Cheers,
Graeme Gill.
function jnd(XYZ,thresh)
%generates ellipses of thresh dE00 radius on xy chromaticity diagram from
%Nx3 XYZ 0->100 coordinates. Set cwf below. Needs free toolbox OptProp.
cwf = 'D65/2';
res = .0001; %xy units, resolution of estimate
if nargin < 2
thresh = 1; end %default size of dE00 ellipse
figure
helmholtz(cwf); hold on
for i = 1:size(XYZ,1) %distance from sample to xy roi grid
[x,y,Y] = xyz2xyy(XYZ(i,:)); %xyY coords of sample
[xx,yy] = meshgrid(x-.1:res:x+.1,y-.1:res:y+.1); %xy roi grid
Y = Y * ones(size(xx)); %evaluate roi at brightness Y
xyz = xyy2xyz(cat(3,xx,yy,Y)); %xyz values of roi grid
labGrid = xyz2lab(xyz,cwf); %lab values of roi grid
lab = xyz2lab(XYZ(i,:),cwf);
de00 =de2000(labGrid,lab); %roi grid distance to sample
lt = (de00<=thresh);
lt = edge(lt); %optional, find edge
plot(xx(lt),yy(lt),'.k','MarkerSize',1)
plot(x,y,'.r','MarkerSize',2) %plot ellipse centers
end
plot([0.64 0.21 0.15 0.64],[0.33 0.71 0.06 0.33],'--w') %Adobe RGB
plot([.708 .17 .131 .708],[.292 .797 .046 .292],'w') %Rec. 2020
xlabel('x'); ylabel('y')
axis equal
set(gca,'XMinorTick','on','YMinorTick','on')
title('1 dE00 or less from Ellipse Center, at each given Y')
end
Other related posts: