No BSD License  

Highlights from
optprop - a color properties toolbox

4.8

4.8 | 5 ratings Rate this file 39 Downloads (last 30 days) File Size: 1.69 MB File ID: #13788
image thumbnail

optprop - a color properties toolbox

by Jerker Wagberg

 

28 Jan 2007 (Updated 28 Mar 2007)

General routines for calculation and analysis of color related properties.

| Watch this File

File Information
Description

OPTPROP is a general toolbox for various color conversions and calculations. It is general in that in addition to handling various standard illuminants, observers and RGB color spaces, it can also handle custom specifications. It is a toolbox, in that it is not just a collection of routines. Instead, most routines have a common interface and can be combined seamlessly to form higher order routines.

The most novel feature of OPTPROP is its flexible argument passing mechanism, e.g. a conversion from XYZ to Lab can be carried out in any of the following ways:

   Lab=xyz2lab(XYZ)
   Lab=xyz2lab(X,Y,Z)
   [L,a,b]=xyz2lab(XYZ)
   [L,a,b]=xyz2lab(X,Y,Z)

X,Y,Z can have any dimensions as long as they are equal and XYZ can also have any dimensions as long as SIZE(XYZ,NDIMS(XYZ))==3. The non-colorimetric dimensions are retained and propagated to Lab and L,a,b respectively.

In addition to pure data, many conversion routines needs arguments like illuminant and observer. These arguments can be entered in each call, but can also be left out. In this case, the routines get these additional arguments from a set of default values that can be set on a session basis or as defaults for all subsequent sessions.

OPTPROP knows of many standard optical specifications and definitions, such as:
- illuminants: including
.....A, C, D50, D55, D65, D75, F1 through F12
- arbitrary blackbody and D illuminants
- observers, CIE 1931 2° and CIE 1964 10°
- RGB color spaces, such as sRGB, Adobe, Prophoto
- chromatic adaptation transforms, such as
.....scaled, vonKries and Bradford

When OPTPROP needs constants tabulated by ASTM, such as color weighting functions, it will use the pristine tabulated values whenever there is a table that fits the specified wavelength range for that illumination. If no suitable table exists, OPTPROP will interpolate the wanted table from the basic underlying tables and definitions. This makes it possible to use even non-standard illuminations such as e.g. D57.

All toplevel routines of OPTPROP are documented in an accompanying 110-page pdf manual.

The OPTPROP toolbox was written by Jerker Wågberg, More Research and DPC - Digital printing Center, as a part of the project "Interaction between ink and paper", a project sponsored by the Knowledge Foundation, Sweden.

MATLAB release MATLAB 7.3 (R2006b)
Other requirements Please notify author of bugs via email: jerker DOT wagberg AT more DOT se
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (6)
30 Jan 2007 John D'Errico

Fairly complete. A few spot checks gave values that I verified, though I did not exhaustively test these tools. I might have expected to see conversions to status A density. I was also wondering if I might see some tools for gamut mapping.

A few functions (viewgamut is one) expected input in forms that confused me. This is not a serious complaint, since with this extensive a variety of tools one would expect to spend at least some time learning to use them.

Overall - well done.

03 Mar 2007 Rayner Aloysius Tiam  
20 Oct 2007 Romdhane rim  
17 Dec 2007 adi nugroho  
14 Oct 2008 Carlos Almeida  
25 Oct 2011 Walid

is there a simple code to transform an RGB file into wavelengths and illuminations> the goal would be to do a spectral analysis of an image.
Thanks

Please login to add a comment or rating.
Updates
30 Jan 2007

Cleaned out some mlint complaints.
Hopefully made Description look nicer.

30 Jan 2007

Messed up the description in the previous post, despite all my good intentions...

14 Feb 2007

Version 2.1.3
Corrected roo2prop for single 'L' and 'b'
roo2brightness now works for single spectrum
wpt now also considers [] as dcwf
rosch documentation corrected
Typos corrected in manual

15 Feb 2007

Forgot to include the manual. Sorry.

28 Mar 2007

roo2xyz now works with chunking even non-ASTM length spectra.
Fixed viewgamut when given handle argument.
Minor message changes.

Tag Activity for this File
Tag Applied By Date/Time
color Jerker Wagberg 22 Oct 2008 08:58:32
lab Jerker Wagberg 22 Oct 2008 08:58:32
xyz Jerker Wagberg 22 Oct 2008 08:58:32
rgb Jerker Wagberg 22 Oct 2008 08:58:32
spectra Jerker Wagberg 22 Oct 2008 08:58:32
tristimulus Jerker Wagberg 22 Oct 2008 08:58:32
astm Jerker Wagberg 22 Oct 2008 08:58:32
color difference Jerker Wagberg 22 Oct 2008 08:58:32
conversion Jerker Wagberg 22 Oct 2008 08:58:32

Contact us at files@mathworks.com