bugGNU Octave - Bugs: bug #50429, [octave forge] (image) xyz2lab...


bug #50429: [octave forge] (image) xyz2lab changed slightly in Matlab (and other color conversion functions)

Submitted by:  Hartmut <hardy>
Submitted on:  Wed 01 Mar 2017 07:31:14 PM UTC  
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: NoneAssigned to: None
Originator Name: Open/Closed: Open
Release: 4.2.1Operating System: Any

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Wed 01 Mar 2017 07:43:06 PM UTC, comment #1:

my personal comments:

  • So the remark about Matlab's D65 values in comment #0 might well be correct. So this is a slight Matlab incompatiblity.
  • Nevertheless, my intention in writing those color conversion functions in the Octave image package was never to be perfectly Matlab compatible. The current results are mostly Matlab compatible (maybe only to Matlab version before V2016a), but the have a better "round trip accuracy" than Matlab had at that time. See "help rgb2lab" for some more detail on this.

I have no objections to making the Octave color conversion functions even more Matlab compatible, also to the newest Matlab version. But I myself won't find the time to do this in the forseeable future.

Hartmut <hardy>
Wed 01 Mar 2017 07:31:14 PM UTC, original submission:

quoting the original issue reporter:

Octave - image - xyz2lab

For a research project, I was comparing the results between the built-in Matlab function and the implementation on http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_Lab.html . In these calculations it turns out that Matlab does use "D65 = [0.95047, 1, 1.08883];", despite of the truncation in the whitepoint function.This means that the comment on line 58 can be changed.

I also have another remark: the sourcing on Wikipedia for the white point is pretty poor. I found an Excel file on the website of the CIE, from which it should be possible to calculate the D65. I haven't implemented this, as that is way more precision than I need, but it would improve the rigor. I might write something on Wikipedia, but I won't promise. I copied the Excel file download link to the way back machine, so it can safely be cited: https://web.archive.org/web/20170131100357/http://files.cie.co.at/204.xls

Best regard,
R. W.

Hartmut <hardy>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by jwe (Updated the item)
  • -unavailable- added by hardy (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 12 Aug 2017 07:07:27 PM UTCjweSummaryimage package: xyz2lab changed slightly in Matlab (and other color conversion functions)=>[octave forge] (image) xyz2lab changed slightly in Matlab (and other color conversion functions)

    Back to the top

    Powered by Savane 3.1-cleanup1