Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

de2000中有错误 #103

Open
vip594nb opened this issue Jan 30, 2020 · 4 comments
Open

de2000中有错误 #103

vip594nb opened this issue Jan 30, 2020 · 4 comments

Comments

@vip594nb
Copy link

def delta_e_cie2000(lab_color_vector, lab_color_matrix, Kl=1, Kc=1, Kh=1):
R_C = numpy.sqrt((numpy.power(avg_C1p_C2p, 7.0)) / (numpy.power(avg_C1p_C2p, 7.0) + numpy.power(25.0, 7.0)))
应该为
R_C = 2*(numpy.sqrt((numpy.power(avg_C1p_C2p, 7.0)) / (numpy.power(avg_C1p_C2p, 7.0) + numpy.power(25.0, 7.0))))
少乘以2了

@KelSolaar
Copy link
Collaborator

Hi @vip594nb,

Would it be possible to update/re-post in english please?

Cheers,

Thomas

@JensBloemer
Copy link

It says

def delta_e_cie2000(lab_color_vector, lab_color_matrix, Kl=1, Kc=1, Kh=1):
R_C = numpy.sqrt((numpy.power(avg_C1p_C2p, 7.0)) / (numpy.power(avg_C1p_C2p, 7.0) + numpy.power(25.0, 7.0)))
should be
R_C = 2*(numpy.sqrt((numpy.power(avg_C1p_C2p, 7.0)) / (numpy.power(avg_C1p_C2p, 7.0) + numpy.power(25.0, 7.0))))
(multiply by 2)

@s51517765
Copy link

I don't think this is a mistake.
The 2 in this case is contained in R_T.
R_T = -2 * R_C * numpy.sin(2 * numpy.radians(delta_ro))

So,
R_C = numpy.sqrt((numpy.power(avg_C1p_C2p, 7.0)) / (numpy.power(avg_C1p_C2p, 7.0) + numpy.power(25.0, 7.0)))
is OK.

@s51517765
Copy link

@vip594nb @KelSolaar
I have checked.
It all matches (4 decimal places) with TABLE 1. of the following paper, and I think it is correct.
http://www2.ece.rochester.edu/~gsharma/ciede2000/ciede2000noteCRNA.pdf

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants