Coverage for characterisation/datasets/colour_checkers/chromaticity_coordinates.py: 0%

82 statements  

« prev     ^ index     » next       coverage.py v7.11.0, created at 2025-11-16 22:49 +1300

1""" 

2Chromaticity Coordinates of the Colour Checkers 

3=============================================== 

4 

5Define the chromaticity coordinates of the colour checkers. 

6 

7Each colour checker data is in the form of a :class:`dict` class instance 

8of 24 or more samples as follows:: 

9 

10 {'name': 'xyY', ..., 'name': 'xyY'} 

11 

12The following colour checkers are available: 

13 

14- :attr:`colour.characterisation.datasets.colour_checkers.\ 

15chromaticity_coordinates.CCS_COLORCHECKER1976`: *ColorChecker Classic* 

16 developed by *McCamy et al. (1976)* at Macbeth, a Division of Kollmorgen. 

17- :attr:`colour.characterisation.datasets.colour_checkers.\ 

18chromaticity_coordinates.CCS_COLORCHECKER2005`: *ColorChecker Classic* 

19 reference data from *GretagMacbeth* published in 2005. 

20- :attr:`colour.characterisation.datasets.colour_checkers.\ 

21chromaticity_coordinates.CCS_BABELCOLOR_AVERAGE`: Average data derived from 

22 measurements of 30 *ColorChecker Classic* charts. 

23- :attr:`colour.characterisation.datasets.colour_checkers.\ 

24chromaticity_coordinates.CCS_COLORCHECKER24_BEFORE_NOV2014`: 

25 *ColorChecker Classic* reference data from *X-Rite* published in 2016 and 

26 matching the data from *GretagMacbeth* published in 2005. 

27- :attr:`colour.characterisation.datasets.colour_checkers.\ 

28chromaticity_coordinates.CCS_COLORCHECKER24_AFTER_NOV2014`: 

29 *ColorChecker Classic* reference data from *X-Rite* published in 2016 and 

30 matching the *ColorChecker Classic* edition after November 2014. 

31- :attr:`colour.characterisation.datasets.colour_checkers.\ 

32chromaticity_coordinates.CCS_COLORCHECKERSG_BEFORE_NOV2014`: 

33 *ColorChecker SG* reference data from *X-Rite* published in 2016 

34- :attr:`colour.characterisation.datasets.colour_checkers.\ 

35chromaticity_coordinates.CCS_COLORCHECKERSG_AFTER_NOV2014`: 

36 *ColorChecker SG* reference data from *X-Rite* published in 2016 

37- :attr:`colour.characterisation.datasets.colour_checkers.\ 

38chromaticity_coordinates. CCS_TE226_V2`: Reference data from *TE226 V2*. 

39 

40References 

41---------- 

42- :cite:`BabelColor2012b` : BabelColor. (2012). The ColorChecker (since 

43 1976!). Retrieved September 26, 2014, from 

44 http://www.babelcolor.com/main_level/ColorChecker.htm 

45- :cite:`BabelColor2012c` : BabelColor. (2012). ColorChecker RGB and 

46 spectra. 

47 http://www.babelcolor.com/download/ColorChecker_RGB_and_spectra.xls 

48- :cite:`ImageEngineering2017` : Image Engineering. (2017). TE226 V2 data 

49 sheet, from https://www.image-engineering.de/content/products/charts/\ 

50te226/downloads/TE226_D_data_sheet.pdf 

51- :cite:`X-Rite2016` : X-Rite. (2016). New color specifications for 

52 ColorChecker SG and Classic Charts. Retrieved October 29, 2018, from 

53 http://xritephoto.com/ph_product_overview.aspx?ID=938&Action=Support&\ 

54SupportID=5884# 

55""" 

56 

57from __future__ import annotations 

58 

59import typing 

60from dataclasses import dataclass 

61 

62import numpy as np 

63 

64from colour.colorimetry import CCS_ILLUMINANTS 

65 

66if typing.TYPE_CHECKING: 

67 from colour.hints import NDArrayFloat 

68 

69from colour.models import Lab_to_XYZ, XYZ_to_xyY 

70from colour.utilities import CanonicalMapping 

71 

72__author__ = "Colour Developers, Danny Pascale " 

73__copyright__ = "Copyright 2013 Colour Developers" 

74__copyright__ += ", " 

75__copyright__ += ( 

76 "BabelColor ColorChecker data: Copyright (C) 2004-2012 Danny Pascale " 

77 "(www.babelcolor.com); used by permission." 

78) 

79__license__ = "BSD-3-Clause - https://opensource.org/licenses/BSD-3-Clause" 

80__maintainer__ = "Colour Developers" 

81__email__ = "colour-developers@colour-science.org" 

82__status__ = "Production" 

83 

84__all__ = [ 

85 "ColourChecker", 

86 "SAMPLE_LABELS_COLORCHECKER_CLASSIC", 

87 "DATA_COLORCHECKER1976", 

88 "CCS_ILLUMINANT_COLORCHECKER1976", 

89 "CCS_COLORCHECKER1976", 

90 "DATA_COLORCHECKER2005", 

91 "CCS_ILLUMINANT_COLORCHECKER2005", 

92 "CCS_COLORCHECKER2005", 

93 "DATA_BABELCOLOR_AVERAGE", 

94 "CCS_ILLUMINANT_BABELCOLOR_AVERAGE", 

95 "CCS_BABELCOLOR_AVERAGE", 

96 "DATA_COLORCHECKER24_BEFORE_NOV2014_CIE_LAB", 

97 "DATA_COLORCHECKER24_BEFORE_NOV2014", 

98 "CCS_ILLUMINANT_COLORCHECKER24_BEFORE_NOV2014", 

99 "CCS_COLORCHECKER24_BEFORE_NOV2014", 

100 "DATA_COLORCHECKER24_AFTER_NOV2014_CIE_LAB", 

101 "DATA_COLORCHECKER24_AFTER_NOV2014", 

102 "CCS_ILLUMINANT_COLORCHECKER24_AFTER_NOV2014", 

103 "CCS_COLORCHECKER24_AFTER_NOV2014", 

104 "SAMPLE_LABELS_COLORCHECKER_SG", 

105 "DATA_COLORCHECKERSG_BEFORE_NOV2014_CIE_LAB", 

106 "DATA_COLORCHECKERSG_BEFORE_NOV2014", 

107 "CCS_ILLUMINANT_COLORCHECKERSG_BEFORE_NOV2014", 

108 "CCS_COLORCHECKERSG_BEFORE_NOV2014", 

109 "DATA_COLORCHECKERSG_AFTER_NOV2014_CIE_LAB", 

110 "DATA_COLORCHECKERSG_AFTER_NOV2014", 

111 "CCS_ILLUMINANT_COLORCHECKERSG_AFTER_NOV2014", 

112 "CCS_COLORCHECKERSG_AFTER_NOV2014", 

113 "DATA_TE226_V2_CIE_XYZ", 

114 "DATA_TE226_V2", 

115 "CCS_ILLUMINANT_TE226_V2", 

116 "CCS_TE226_V2", 

117 "CCS_COLOURCHECKERS", 

118] 

119 

120 

121@dataclass(frozen=True) 

122class ColourChecker: 

123 """ 

124 *Colour Checker* data. 

125 

126 Parameters 

127 ---------- 

128 name 

129 *Colour Checker* name. 

130 data 

131 Chromaticity coordinates in *CIE xyY* colourspace. 

132 illuminant 

133 *Colour Checker* illuminant chromaticity coordinates. 

134 rows 

135 *Colour Checker* row count. 

136 columns 

137 *Colour Checker* column count. 

138 """ 

139 

140 name: str 

141 data: dict[str, NDArrayFloat] 

142 illuminant: NDArrayFloat 

143 rows: int 

144 columns: int 

145 

146 

147SAMPLE_LABELS_COLORCHECKER_CLASSIC: tuple = ( 

148 "dark skin", 

149 "light skin", 

150 "blue sky", 

151 "foliage", 

152 "blue flower", 

153 "bluish green", 

154 "orange", 

155 "purplish blue", 

156 "moderate red", 

157 "purple", 

158 "yellow green", 

159 "orange yellow", 

160 "blue", 

161 "green", 

162 "red", 

163 "yellow", 

164 "magenta", 

165 "cyan", 

166 "white 9.5 (.05 D)", 

167 "neutral 8 (.23 D)", 

168 "neutral 6.5 (.44 D)", 

169 "neutral 5 (.70 D)", 

170 "neutral 3.5 (1.05 D)", 

171 "black 2 (1.5 D)", 

172) 

173"""*ColorChecker Classic* sample labels.""" 

174 

175DATA_COLORCHECKER1976: dict = { 

176 label: np.array(data) 

177 for label, data in zip( 

178 SAMPLE_LABELS_COLORCHECKER_CLASSIC, 

179 [ 

180 [0.4002, 0.3504, 0.1005], 

181 [0.3773, 0.3446, 0.3582], 

182 [0.2470, 0.2514, 0.1933], 

183 [0.3372, 0.4220, 0.1329], 

184 [0.2651, 0.2400, 0.2427], 

185 [0.2608, 0.3430, 0.4306], 

186 [0.5060, 0.4070, 0.3005], 

187 [0.2110, 0.1750, 0.1200], 

188 [0.4533, 0.3058, 0.1977], 

189 [0.2845, 0.2020, 0.0656], 

190 [0.3800, 0.4887, 0.4429], 

191 [0.4729, 0.4375, 0.4306], 

192 [0.1866, 0.1285, 0.0611], 

193 [0.3046, 0.4782, 0.2339], 

194 [0.5385, 0.3129, 0.1200], 

195 [0.4480, 0.4703, 0.5910], 

196 [0.3635, 0.2325, 0.1977], 

197 [0.1958, 0.2519, 0.1977], 

198 [0.3101, 0.3163, 0.9001], 

199 [0.3101, 0.3163, 0.5910], 

200 [0.3101, 0.3163, 0.3620], 

201 [0.3101, 0.3163, 0.1977], 

202 [0.3101, 0.3163, 0.0900], 

203 [0.3101, 0.3163, 0.0313], 

204 ], 

205 strict=True, 

206 ) 

207} 

208 

209CCS_ILLUMINANT_COLORCHECKER1976: NDArrayFloat = CCS_ILLUMINANTS[ 

210 "CIE 1931 2 Degree Standard Observer" 

211]["C"] 

212"""*ColorChecker Classic 1976* illuminant.""" 

213 

214CCS_COLORCHECKER1976: ColourChecker = ColourChecker( 

215 "ColorChecker 1976", 

216 DATA_COLORCHECKER1976, 

217 CCS_ILLUMINANT_COLORCHECKER1976, 

218 4, 

219 6, 

220) 

221""" 

222*ColorChecker Classic* developed by *McCamy et al.* (1976) at Macbeth, a 

223Division of Kollmorgen. 

224""" 

225 

226DATA_COLORCHECKER2005: dict = { 

227 label: np.array(data) 

228 for label, data in zip( 

229 SAMPLE_LABELS_COLORCHECKER_CLASSIC, 

230 [ 

231 [0.4316, 0.3777, 0.1008], 

232 [0.4197, 0.3744, 0.3495], 

233 [0.2760, 0.3016, 0.1836], 

234 [0.3703, 0.4499, 0.1325], 

235 [0.2999, 0.2856, 0.2304], 

236 [0.2848, 0.3911, 0.4178], 

237 [0.5295, 0.4055, 0.3118], 

238 [0.2305, 0.2106, 0.1126], 

239 [0.5012, 0.3273, 0.1938], 

240 [0.3319, 0.2482, 0.0637], 

241 [0.3984, 0.5008, 0.4446], 

242 [0.4957, 0.4427, 0.4357], 

243 [0.2018, 0.1692, 0.0575], 

244 [0.3253, 0.5032, 0.2318], 

245 [0.5686, 0.3303, 0.1257], 

246 [0.4697, 0.4734, 0.5981], 

247 [0.4159, 0.2688, 0.2009], 

248 [0.2131, 0.3023, 0.1930], 

249 [0.3469, 0.3608, 0.9131], 

250 [0.3440, 0.3584, 0.5894], 

251 [0.3432, 0.3581, 0.3632], 

252 [0.3446, 0.3579, 0.1915], 

253 [0.3401, 0.3548, 0.0883], 

254 [0.3406, 0.3537, 0.0311], 

255 ], 

256 strict=True, 

257 ) 

258} 

259 

260CCS_ILLUMINANT_COLORCHECKER2005: NDArrayFloat = CCS_ILLUMINANTS[ 

261 "CIE 1931 2 Degree Standard Observer" 

262]["ICC D50"] 

263"""*ColorChecker Classic 2005* illuminant.""" 

264 

265CCS_COLORCHECKER2005: ColourChecker = ColourChecker( 

266 "ColorChecker 2005", 

267 DATA_COLORCHECKER2005, 

268 CCS_ILLUMINANT_COLORCHECKER2005, 

269 4, 

270 6, 

271) 

272"""*ColorChecker Classic* data from *GretagMacbeth (2005)*.""" 

273DATA_BABELCOLOR_AVERAGE: dict = { 

274 label: np.array(data) 

275 for label, data in zip( 

276 SAMPLE_LABELS_COLORCHECKER_CLASSIC, 

277 [ 

278 [0.4325, 0.3788, 0.1034], 

279 [0.4191, 0.3748, 0.3525], 

280 [0.2761, 0.3004, 0.1847], 

281 [0.3700, 0.4501, 0.1335], 

282 [0.3020, 0.2877, 0.2324], 

283 [0.2856, 0.3910, 0.4174], 

284 [0.5291, 0.4075, 0.3117], 

285 [0.2339, 0.2155, 0.1140], 

286 [0.5008, 0.3293, 0.1979], 

287 [0.3326, 0.2556, 0.0644], 

288 [0.3989, 0.4998, 0.4435], 

289 [0.4962, 0.4428, 0.4358], 

290 [0.2040, 0.1696, 0.0579], 

291 [0.3270, 0.5033, 0.2307], 

292 [0.5709, 0.3298, 0.1268], 

293 [0.4694, 0.4732, 0.6081], 

294 [0.4177, 0.2704, 0.2007], 

295 [0.2151, 0.3037, 0.1903], 

296 [0.3488, 0.3628, 0.9129], 

297 [0.3451, 0.3596, 0.5885], 

298 [0.3446, 0.3590, 0.3595], 

299 [0.3438, 0.3589, 0.1912], 

300 [0.3423, 0.3576, 0.0893], 

301 [0.3439, 0.3565, 0.0320], 

302 ], 

303 strict=True, 

304 ) 

305} 

306 

307CCS_ILLUMINANT_BABELCOLOR_AVERAGE: NDArrayFloat = CCS_ILLUMINANTS[ 

308 "CIE 1931 2 Degree Standard Observer" 

309]["ICC D50"] 

310"""*BabelColor Average* illuminant.""" 

311 

312CCS_BABELCOLOR_AVERAGE: ColourChecker = ColourChecker( 

313 "BabelColor Average", 

314 DATA_BABELCOLOR_AVERAGE, 

315 CCS_ILLUMINANT_BABELCOLOR_AVERAGE, 

316 4, 

317 6, 

318) 

319"""Average data derived from measurements of 30 *ColorChecker Classic* charts.""" 

320 

321DATA_COLORCHECKER24_BEFORE_NOV2014_CIE_LAB: dict = { 

322 label: np.array(data) 

323 for label, data in zip( 

324 SAMPLE_LABELS_COLORCHECKER_CLASSIC, 

325 [ 

326 [37.986, 13.555, 14.059], 

327 [65.711, 18.13, 17.81], 

328 [49.927, -4.88, -21.905], 

329 [43.139, -13.095, 21.905], 

330 [55.112, 8.844, -25.399], 

331 [70.719, -33.397, -0.199], 

332 [62.661, 36.067, 57.096], 

333 [40.02, 10.41, -45.964], 

334 [51.124, 48.239, 16.248], 

335 [30.325, 22.976, -21.587], 

336 [72.532, -23.709, 57.255], 

337 [71.941, 19.363, 67.857], 

338 [28.778, 14.179, -50.297], 

339 [55.261, -38.342, 31.37], 

340 [42.101, 53.378, 28.19], 

341 [81.733, 4.039, 79.819], 

342 [51.935, 49.986, -14.574], 

343 [51.038, -28.631, -28.638], 

344 [96.539, -0.425, 1.186], 

345 [81.257, -0.638, -0.335], 

346 [66.766, -0.734, -0.504], 

347 [50.867, -0.153, -0.27], 

348 [35.656, -0.421, -1.231], 

349 [20.461, -0.079, -0.973], 

350 ], 

351 strict=True, 

352 ) 

353} 

354 

355DATA_COLORCHECKER24_BEFORE_NOV2014: dict = dict( 

356 zip( 

357 SAMPLE_LABELS_COLORCHECKER_CLASSIC, 

358 XYZ_to_xyY( 

359 Lab_to_XYZ( 

360 list(DATA_COLORCHECKER24_BEFORE_NOV2014_CIE_LAB.values()), 

361 CCS_ILLUMINANTS["CIE 1931 2 Degree Standard Observer"]["ICC D50"], 

362 ) 

363 ), 

364 strict=True, 

365 ) 

366) 

367 

368CCS_ILLUMINANT_COLORCHECKER24_BEFORE_NOV2014: NDArrayFloat = CCS_ILLUMINANTS[ 

369 "CIE 1931 2 Degree Standard Observer" 

370]["ICC D50"] 

371"""*ColorChecker24 - Before November 2014* illuminant.""" 

372 

373CCS_COLORCHECKER24_BEFORE_NOV2014: ColourChecker = ColourChecker( 

374 "ColorChecker24 - Before November 2014", 

375 DATA_COLORCHECKER24_BEFORE_NOV2014, 

376 CCS_ILLUMINANT_COLORCHECKER24_BEFORE_NOV2014, 

377 4, 

378 6, 

379) 

380""" 

381Reference *ColorChecker Classic* data from *X-Rite (2016)*. 

382 

383Notes 

384----- 

385- The rounded *ColorChecker24 - Before November 2014* values should match the 

386 *ColorChecker Classic 2005* values. They are specified for reference of the 

387 original *CIE L\\*a\\*b\\** colourspace values. 

388""" 

389 

390DATA_COLORCHECKER24_AFTER_NOV2014_CIE_LAB: dict = { 

391 label: np.array(data) 

392 for label, data in zip( 

393 SAMPLE_LABELS_COLORCHECKER_CLASSIC, 

394 [ 

395 [37.54, 14.37, 14.92], 

396 [64.66, 19.27, 17.5], 

397 [49.32, -3.82, -22.54], 

398 [43.46, -12.74, 22.72], 

399 [54.94, 9.61, -24.79], 

400 [70.48, -32.26, -0.37], 

401 [62.73, 35.83, 56.5], 

402 [39.43, 10.75, -45.17], 

403 [50.57, 48.64, 16.67], 

404 [30.1, 22.54, -20.87], 

405 [71.77, -24.13, 58.19], 

406 [71.51, 18.24, 67.37], 

407 [28.37, 15.42, -49.8], 

408 [54.38, -39.72, 32.27], 

409 [42.43, 51.05, 28.62], 

410 [81.8, 2.67, 80.41], 

411 [50.63, 51.28, -14.12], 

412 [49.57, -29.71, -28.32], 

413 [95.19, -1.03, 2.93], 

414 [81.29, -0.57, 0.44], 

415 [66.89, -0.75, -0.06], 

416 [50.76, -0.13, 0.14], 

417 [35.63, -0.46, -0.48], 

418 [20.64, 0.07, -0.46], 

419 ], 

420 strict=True, 

421 ) 

422} 

423 

424DATA_COLORCHECKER24_AFTER_NOV2014: dict = dict( 

425 zip( 

426 SAMPLE_LABELS_COLORCHECKER_CLASSIC, 

427 XYZ_to_xyY( 

428 Lab_to_XYZ( 

429 list(DATA_COLORCHECKER24_AFTER_NOV2014_CIE_LAB.values()), 

430 CCS_ILLUMINANTS["CIE 1931 2 Degree Standard Observer"]["ICC D50"], 

431 ) 

432 ), 

433 strict=True, 

434 ) 

435) 

436 

437CCS_ILLUMINANT_COLORCHECKER24_AFTER_NOV2014: NDArrayFloat = CCS_ILLUMINANTS[ 

438 "CIE 1931 2 Degree Standard Observer" 

439]["ICC D50"] 

440"""*ColorChecker24 - After November 2014* illuminant.""" 

441 

442CCS_COLORCHECKER24_AFTER_NOV2014: ColourChecker = ColourChecker( 

443 "ColorChecker24 - After November 2014", 

444 DATA_COLORCHECKER24_AFTER_NOV2014, 

445 CCS_ILLUMINANT_COLORCHECKER24_AFTER_NOV2014, 

446 4, 

447 6, 

448) 

449""" 

450Reference *ColorChecker Classic* data from *X-Rite (2016)* and matching the 

451*ColorChecker Classic* edition after November 2014. 

452""" 

453 

454SAMPLE_LABELS_COLORCHECKER_SG: tuple = ( 

455 "A1", 

456 "A2", 

457 "A3", 

458 "A4", 

459 "A5", 

460 "A6", 

461 "A7", 

462 "A8", 

463 "A9", 

464 "A10", 

465 "B1", 

466 "B2", 

467 "B3", 

468 "B4", 

469 "B5", 

470 "B6", 

471 "B7", 

472 "B8", 

473 "B9", 

474 "B10", 

475 "C1", 

476 "C2", 

477 "C3", 

478 "C4", 

479 "C5", 

480 "C6", 

481 "C7", 

482 "C8", 

483 "C9", 

484 "C10", 

485 "D1", 

486 "D2", 

487 "D3", 

488 "D4", 

489 "D5", 

490 "D6", 

491 "D7", 

492 "D8", 

493 "D9", 

494 "D10", 

495 "E1", 

496 "E2", 

497 "E3", 

498 "E4", 

499 "E5", 

500 "E6", 

501 "E7", 

502 "E8", 

503 "E9", 

504 "E10", 

505 "F1", 

506 "F2", 

507 "F3", 

508 "F4", 

509 "F5", 

510 "F6", 

511 "F7", 

512 "F8", 

513 "F9", 

514 "F10", 

515 "G1", 

516 "G2", 

517 "G3", 

518 "G4", 

519 "G5", 

520 "G6", 

521 "G7", 

522 "G8", 

523 "G9", 

524 "G10", 

525 "H1", 

526 "H2", 

527 "H3", 

528 "H4", 

529 "H5", 

530 "H6", 

531 "H7", 

532 "H8", 

533 "H9", 

534 "H10", 

535 "I1", 

536 "I2", 

537 "I3", 

538 "I4", 

539 "I5", 

540 "I6", 

541 "I7", 

542 "I8", 

543 "I9", 

544 "I10", 

545 "J1", 

546 "J2", 

547 "J3", 

548 "J4", 

549 "J5", 

550 "J6", 

551 "J7", 

552 "J8", 

553 "J9", 

554 "J10", 

555 "K1", 

556 "K2", 

557 "K3", 

558 "K4", 

559 "K5", 

560 "K6", 

561 "K7", 

562 "K8", 

563 "K9", 

564 "K10", 

565 "L1", 

566 "L2", 

567 "L3", 

568 "L4", 

569 "L5", 

570 "L6", 

571 "L7", 

572 "L8", 

573 "L9", 

574 "L10", 

575 "M1", 

576 "M2", 

577 "M3", 

578 "M4", 

579 "M5", 

580 "M6", 

581 "M7", 

582 "M8", 

583 "M9", 

584 "M10", 

585 "N1", 

586 "N2", 

587 "N3", 

588 "N4", 

589 "N5", 

590 "N6", 

591 "N7", 

592 "N8", 

593 "N9", 

594 "N10", 

595) 

596"""*ColorChecker SG* sample labels.""" 

597 

598DATA_COLORCHECKERSG_BEFORE_NOV2014_CIE_LAB: dict = { 

599 label: np.array(data) 

600 for label, data in zip( 

601 SAMPLE_LABELS_COLORCHECKER_SG, 

602 [ 

603 [96.55, -0.91, 0.57], 

604 [6.43, -0.06, -0.41], 

605 [49.7, -0.18, 0.03], 

606 [96.5, -0.89, 0.59], 

607 [6.5, -0.06, -0.44], 

608 [49.66, -0.2, 0.01], 

609 [96.52, -0.91, 0.58], 

610 [6.49, -0.02, -0.28], 

611 [49.72, -0.2, 0.04], 

612 [96.43, -0.91, 0.67], 

613 [49.72, -0.19, 0.02], 

614 [32.6, 51.58, -10.85], 

615 [60.75, 26.22, -18.69], 

616 [28.69, 48.28, -39], 

617 [49.38, -15.43, -48.48], 

618 [60.63, -30.77, -26.23], 

619 [19.29, -26.37, -6.15], 

620 [60.15, -41.77, -12.6], 

621 [21.42, 1.67, 8.79], 

622 [49.69, -0.2, 0.01], 

623 [6.5, -0.03, -0.67], 

624 [21.82, 17.33, -18.35], 

625 [41.53, 18.48, -37.26], 

626 [19.99, -0.16, -36.29], 

627 [60.16, -18.45, -31.42], 

628 [19.94, -17.92, -20.96], 

629 [60.68, -6.05, -32.81], 

630 [50.81, -49.8, -9.63], 

631 [60.65, -39.77, 20.76], 

632 [6.53, -0.03, -0.43], 

633 [96.56, -0.91, 0.59], 

634 [84.19, -1.95, -8.23], 

635 [84.75, 14.55, 0.23], 

636 [84.87, -19.07, -0.82], 

637 [85.15, 13.48, 6.82], 

638 [84.17, -10.45, 26.78], 

639 [61.74, 31.06, 36.42], 

640 [64.37, 20.82, 18.92], 

641 [50.4, -53.22, 14.62], 

642 [96.51, -0.89, 0.65], 

643 [49.74, -0.19, 0.03], 

644 [31.91, 18.62, 21.99], 

645 [60.74, 38.66, 70.97], 

646 [19.35, 22.23, -58.86], 

647 [96.52, -0.91, 0.62], 

648 [6.66, 0, -0.3], 

649 [76.51, 20.81, 22.72], 

650 [72.79, 29.15, 24.18], 

651 [22.33, -20.7, 5.75], 

652 [49.7, -0.19, 0.01], 

653 [6.53, -0.05, -0.61], 

654 [63.42, 20.19, 19.22], 

655 [34.94, 11.64, -50.7], 

656 [52.03, -44.15, 39.04], 

657 [79.43, 0.29, -0.17], 

658 [30.67, -0.14, -0.53], 

659 [63.6, 14.44, 26.07], 

660 [64.37, 14.5, 17.05], 

661 [60.01, -44.33, 8.49], 

662 [6.63, -0.01, -0.47], 

663 [96.56, -0.93, 0.59], 

664 [46.37, -5.09, -24.46], 

665 [47.08, 52.97, 20.49], 

666 [36.04, 64.92, 38.51], 

667 [65.05, 0, -0.32], 

668 [40.14, -0.19, -0.38], 

669 [43.77, 16.46, 27.12], 

670 [64.39, 17, 16.59], 

671 [60.79, -29.74, 41.5], 

672 [96.48, -0.89, 0.64], 

673 [49.75, -0.21, 0.01], 

674 [38.18, -16.99, 30.87], 

675 [21.31, 29.14, -27.51], 

676 [80.57, 3.85, 89.61], 

677 [49.71, -0.2, 0.03], 

678 [60.27, 0.08, -0.41], 

679 [67.34, 14.45, 16.9], 

680 [64.69, 16.95, 18.57], 

681 [51.12, -49.31, 44.41], 

682 [49.7, -0.2, 0.02], 

683 [6.67, -0.05, -0.64], 

684 [51.56, 9.16, -26.88], 

685 [70.83, -24.26, 64.77], 

686 [48.06, 55.33, -15.61], 

687 [35.26, -0.09, -0.24], 

688 [75.16, 0.25, -0.2], 

689 [44.54, 26.27, 38.93], 

690 [35.91, 16.59, 26.46], 

691 [61.49, -52.73, 47.3], 

692 [6.59, -0.05, -0.5], 

693 [96.58, -0.9, 0.61], 

694 [68.93, -34.58, -0.34], 

695 [69.65, 20.09, 78.57], 

696 [47.79, -33.18, -30.21], 

697 [15.94, -0.42, -1.2], 

698 [89.02, -0.36, -0.48], 

699 [63.43, 25.44, 26.25], 

700 [65.75, 22.06, 27.82], 

701 [61.47, 17.1, 50.72], 

702 [96.53, -0.89, 0.66], 

703 [49.79, -0.2, 0.03], 

704 [85.17, 10.89, 17.26], 

705 [89.74, -16.52, 6.19], 

706 [84.55, 5.07, -6.12], 

707 [84.02, -13.87, -8.72], 

708 [70.76, 0.07, -0.35], 

709 [45.59, -0.05, 0.23], 

710 [20.3, 0.07, -0.32], 

711 [61.79, -13.41, 55.42], 

712 [49.72, -0.19, 0.02], 

713 [6.77, -0.05, -0.44], 

714 [21.85, 34.37, 7.83], 

715 [42.66, 67.43, 48.42], 

716 [60.33, 36.56, 3.56], 

717 [61.22, 36.61, 17.32], 

718 [62.07, 52.8, 77.14], 

719 [72.42, -9.82, 89.66], 

720 [62.03, 3.53, 57.01], 

721 [71.95, -27.34, 73.69], 

722 [6.59, -0.04, -0.45], 

723 [49.77, -0.19, 0.04], 

724 [41.84, 62.05, 10.01], 

725 [19.78, 29.16, -7.85], 

726 [39.56, 65.98, 33.71], 

727 [52.39, 68.33, 47.84], 

728 [81.23, 24.12, 87.51], 

729 [81.8, 6.78, 95.75], 

730 [71.72, -16.23, 76.28], 

731 [20.31, 14.45, 16.74], 

732 [49.68, -0.19, 0.05], 

733 [96.48, -0.88, 0.68], 

734 [49.69, -0.18, 0.03], 

735 [6.39, -0.04, -0.33], 

736 [96.54, -0.9, 0.67], 

737 [49.72, -0.18, 0.05], 

738 [6.49, -0.03, -0.41], 

739 [96.51, -0.9, 0.69], 

740 [49.7, -0.19, 0.07], 

741 [6.47, 0, -0.38], 

742 [96.46, -0.89, 0.71], 

743 ], 

744 strict=True, 

745 ) 

746} 

747 

748_DATA_COLORCHECKERSG_BEFORE_NOV2014 = np.reshape( 

749 np.transpose( 

750 np.reshape( 

751 np.array( 

752 list( 

753 zip( 

754 SAMPLE_LABELS_COLORCHECKER_SG, 

755 DATA_COLORCHECKERSG_BEFORE_NOV2014_CIE_LAB.values(), 

756 strict=True, 

757 ) 

758 ), 

759 dtype=object, 

760 ), 

761 (14, 10, 2), 

762 ), 

763 [1, 0, 2], 

764 ), 

765 (-1, 2), 

766) 

767 

768DATA_COLORCHECKERSG_BEFORE_NOV2014: dict = dict( 

769 zip( 

770 _DATA_COLORCHECKERSG_BEFORE_NOV2014[..., 0], 

771 XYZ_to_xyY( 

772 Lab_to_XYZ( 

773 list(_DATA_COLORCHECKERSG_BEFORE_NOV2014[..., 1]), 

774 CCS_ILLUMINANTS["CIE 1931 2 Degree Standard Observer"]["ICC D50"], 

775 ) 

776 ), 

777 strict=True, 

778 ) 

779) 

780 

781del _DATA_COLORCHECKERSG_BEFORE_NOV2014 

782 

783CCS_ILLUMINANT_COLORCHECKERSG_BEFORE_NOV2014: NDArrayFloat = CCS_ILLUMINANTS[ 

784 "CIE 1931 2 Degree Standard Observer" 

785]["ICC D50"] 

786"""*ColorCheckerSG - Before November 2014* illuminant.""" 

787 

788CCS_COLORCHECKERSG_BEFORE_NOV2014: ColourChecker = ColourChecker( 

789 "ColorCheckerSG - Before November 2014", 

790 DATA_COLORCHECKERSG_BEFORE_NOV2014, 

791 CCS_ILLUMINANT_COLORCHECKERSG_BEFORE_NOV2014, 

792 10, 

793 14, 

794) 

795""" 

796Reference *ColorChecker SG* data from *X-Rite (2016)*. 

797""" 

798 

799DATA_COLORCHECKERSG_AFTER_NOV2014_CIE_LAB: dict = { 

800 label: np.array(data) 

801 for label, data in zip( 

802 SAMPLE_LABELS_COLORCHECKER_SG, 

803 [ 

804 [96.71, -0.62, 2.06], 

805 [8.05, 0.17, -0.69], 

806 [49.76, 0.11, 0.72], 

807 [96.72, -0.63, 2.06], 

808 [8.17, 0.15, -0.65], 

809 [49.68, 0.14, 0.74], 

810 [96.60, -0.62, 2.11], 

811 [7.99, 0.21, -0.75], 

812 [49.67, 0.15, 0.73], 

813 [96.51, -0.63, 2.11], 

814 [49.70, 0.12, 0.68], 

815 [33.02, 52.00, -10.30], 

816 [61.40, 27.14, -18.42], 

817 [30.54, 50.39, -41.79], 

818 [49.56, -13.90, -49.65], 

819 [60.62, -29.91, -27.54], 

820 [20.13, -24.81, -7.50], 

821 [60.32, -40.29, -13.25], 

822 [19.62, 1.77, 11.99], 

823 [49.68, 0.15, 0.78], 

824 [8.13, 0.15, -0.76], 

825 [19.65, 20.42, -18.82], 

826 [41.70, 18.90, -37.42], 

827 [20.25, 0.26, -36.44], 

828 [60.13, -17.88, -32.08], 

829 [19.75, -17.79, -22.37], 

830 [60.43, -5.12, -32.79], 

831 [50.46, -47.90, -11.56], 

832 [60.53, -40.75, 19.37], 

833 [8.09, 0.19, -0.69], 

834 [96.79, -0.66, 1.99], 

835 [84.00, -1.70, -8.37], 

836 [85.48, 15.15, 0.79], 

837 [84.56, -19.74, -1.13], 

838 [85.26, 13.37, 7.95], 

839 [84.38, -11.97, 27.16], 

840 [62.35, 29.94, 36.89], 

841 [64.17, 21.34, 19.36], 

842 [50.48, -53.21, 12.65], 

843 [96.57, -0.64, 2.00], 

844 [49.79, 0.13, 0.66], 

845 [32.77, 19.91, 22.33], 

846 [62.28, 37.56, 68.87], 

847 [19.92, 25.07, -61.05], 

848 [96.78, -0.66, 2.01], 

849 [8.07, 0.12, -0.93], 

850 [77.37, 20.28, 24.27], 

851 [74.01, 29.00, 25.80], 

852 [20.33, -23.98, 7.20], 

853 [49.72, 0.14, 0.71], 

854 [8.09, 0.19, -0.69], 

855 [63.88, 20.34, 19.93], 

856 [35.28, 12.93, -51.17], 

857 [52.75, -44.12, 38.68], 

858 [79.65, -0.08, 0.62], 

859 [30.32, -0.10, 0.22], 

860 [63.46, 13.53, 26.37], 

861 [64.44, 14.31, 17.63], 

862 [60.05, -44.00, 7.27], 

863 [8.08, 0.18, -0.78], 

864 [96.70, -0.66, 1.97], 

865 [45.84, -3.74, -25.32], 

866 [47.60, 53.66, 22.15], 

867 [36.88, 65.72, 41.63], 

868 [65.22, -0.27, 0.16], 

869 [39.55, -0.37, -0.09], 

870 [44.49, 16.06, 26.79], 

871 [64.97, 15.89, 16.79], 

872 [60.77, -30.19, 40.76], 

873 [96.71, -0.64, 2.01], 

874 [49.74, 0.14, 0.68], 

875 [38.29, -17.44, 30.22], 

876 [20.76, 31.66, -28.04], 

877 [81.43, 2.41, 88.98], 

878 [49.71, 0.12, 0.69], 

879 [60.04, 0.09, 0.05], 

880 [67.60, 14.47, 17.12], 

881 [64.75, 17.30, 18.88], 

882 [51.26, -50.65, 43.80], 

883 [49.76, 0.14, 0.71], 

884 [8.10, 0.19, -0.93], 

885 [51.36, 9.52, -26.98], 

886 [71.62, -24.77, 64.10], 

887 [48.75, 57.24, -14.45], 

888 [34.85, -0.21, 0.73], 

889 [75.36, 0.35, 0.26], 

890 [45.14, 26.38, 41.24], 

891 [36.20, 16.70, 27.06], 

892 [61.65, -54.33, 46.18], 

893 [7.97, 0.14, -0.80], 

894 [96.69, -0.67, 1.95], 

895 [68.71, -35.41, -1.11], 

896 [70.39, 19.37, 79.73], 

897 [47.42, -30.91, -32.27], 

898 [15.43, -0.24, -0.25], 

899 [88.85, -0.59, 0.25], 

900 [64.00, 25.09, 27.14], 

901 [66.65, 22.21, 28.81], 

902 [62.05, 16.45, 51.74], 

903 [96.71, -0.64, 2.02], 

904 [49.72, 0.12, 0.64], 

905 [85.68, 10.75, 18.39], 

906 [89.35, -16.38, 6.41], 

907 [84.59, 5.21, -5.87], 

908 [83.63, -12.47, -8.89], 

909 [70.60, -0.24, 0.07], 

910 [45.14, -0.04, 0.86], 

911 [20.33, 0.40, -0.21], 

912 [62.33, -14.54, 54.58], 

913 [49.74, 0.14, 0.69], 

914 [8.08, 0.13, -0.81], 

915 [23.03, 33.95, 8.88], 

916 [44.35, 67.94, 50.62], 

917 [60.91, 36.55, 4.15], 

918 [62.20, 37.45, 18.18], 

919 [63.33, 51.30, 81.88], 

920 [73.74, -11.45, 85.07], 

921 [62.35, 1.96, 57.52], 

922 [72.77, -29.09, 71.26], 

923 [8.13, 0.15, -0.86], 

924 [49.71, 0.12, 0.62], 

925 [42.52, 63.55, 11.43], 

926 [18.09, 32.61, -5.90], 

927 [40.66, 65.54, 31.98], 

928 [53.13, 68.44, 49.57], 

929 [82.08, 23.39, 87.24], 

930 [82.50, 5.29, 96.68], 

931 [71.90, -17.32, 77.72], 

932 [21.95, 13.41, 16.36], 

933 [49.74, 0.12, 0.69], 

934 [96.79, -0.67, 1.97], 

935 [49.78, 0.12, 0.65], 

936 [8.23, 0.18, -0.82], 

937 [96.73, -0.67, 1.99], 

938 [49.80, 0.11, 0.67], 

939 [8.18, 0.15, -0.84], 

940 [96.73, -0.65, 2.01], 

941 [49.75, 0.13, 0.67], 

942 [8.11, 0.15, -0.90], 

943 [96.55, -0.64, 2.02], 

944 ], 

945 strict=True, 

946 ) 

947} 

948 

949_DATA_COLORCHECKERSG_AFTER_NOV2014 = np.reshape( 

950 np.transpose( 

951 np.reshape( 

952 np.array( 

953 list( 

954 zip( 

955 SAMPLE_LABELS_COLORCHECKER_SG, 

956 DATA_COLORCHECKERSG_AFTER_NOV2014_CIE_LAB.values(), 

957 strict=True, 

958 ) 

959 ), 

960 dtype=object, 

961 ), 

962 (14, 10, 2), 

963 ), 

964 [1, 0, 2], 

965 ), 

966 (-1, 2), 

967) 

968 

969DATA_COLORCHECKERSG_AFTER_NOV2014: dict = dict( 

970 zip( 

971 _DATA_COLORCHECKERSG_AFTER_NOV2014[..., 0], 

972 XYZ_to_xyY( 

973 Lab_to_XYZ( 

974 list(_DATA_COLORCHECKERSG_AFTER_NOV2014[..., 1]), 

975 CCS_ILLUMINANTS["CIE 1931 2 Degree Standard Observer"]["ICC D50"], 

976 ) 

977 ), 

978 strict=True, 

979 ) 

980) 

981 

982del _DATA_COLORCHECKERSG_AFTER_NOV2014 

983 

984CCS_ILLUMINANT_COLORCHECKERSG_AFTER_NOV2014: NDArrayFloat = CCS_ILLUMINANTS[ 

985 "CIE 1931 2 Degree Standard Observer" 

986]["ICC D50"] 

987"""*ColorCheckerSG - After November 2014* illuminant.""" 

988 

989CCS_COLORCHECKERSG_AFTER_NOV2014: ColourChecker = ColourChecker( 

990 "ColorCheckerSG - After November 2014", 

991 DATA_COLORCHECKERSG_AFTER_NOV2014, 

992 CCS_ILLUMINANT_COLORCHECKERSG_AFTER_NOV2014, 

993 10, 

994 14, 

995) 

996""" 

997Reference *ColorChecker SG* data from *X-Rite (2016)* and matching the 

998*ColorChecker SG* edition after November 2014. 

999""" 

1000 

1001DATA_TE226_V2_CIE_XYZ: dict = { 

1002 label: np.array(data) 

1003 for label, data in { 

1004 "dark skin": [0.1278, 0.1074, 0.0726], 

1005 "light skin": [0.4945, 0.4484, 0.3586], 

1006 "blue sky": [0.1459, 0.1690, 0.2925], 

1007 "foliage": [0.0714, 0.1243, 0.0254], 

1008 "blue flower": [0.4470, 0.4039, 0.7304], 

1009 "bluish green": [0.3921, 0.5420, 0.6113], 

1010 "orange": [0.4574, 0.3628, 0.0624], 

1011 "purplish blue": [0.2979, 0.3180, 0.8481], 

1012 "moderate red": [0.3884, 0.2794, 0.1886], 

1013 "purple": [0.1324, 0.0796, 0.3824], 

1014 "yellow green": [0.3399, 0.5786, 0.1360], 

1015 "orange yellow": [0.5417, 0.4677, 0.0644], 

1016 "blue": [0.0859, 0.0361, 0.4728], 

1017 "green": [0.1000, 0.2297, 0.0530], 

1018 "red": [0.3594, 0.1796, 0.0197], 

1019 "yellow": [0.5236, 0.5972, 0.0368], 

1020 "magenta": [0.4253, 0.2050, 0.5369], 

1021 "cyan": [0.4942, 0.6119, 1.0304], 

1022 "patch 19": [0.2646, 0.2542, 0.1631], 

1023 "patch 20": [0.7921, 0.7560, 0.5988], 

1024 "patch 21": [0.4409, 0.4004, 0.3366], 

1025 "patch 22": [0.1546, 0.3395, 0.1016], 

1026 "patch 23": [0.3182, 0.3950, 0.5857], 

1027 "patch 24": [0.5920, 0.5751, 0.9892], 

1028 "patch 25": [0.4287, 0.2583, 0.0444], 

1029 "patch 26": [0.4282, 0.5757, 0.4770], 

1030 "patch 27": [0.1697, 0.1294, 0.7026], 

1031 "patch 28": [0.2143, 0.1564, 0.1908], 

1032 "patch 29": [0.1659, 0.3876, 0.3945], 

1033 "patch 30": [0.1869, 0.1093, 0.7069], 

1034 "patch 31": [0.3316, 0.1596, 0.1714], 

1035 "patch 32": [0.8298, 0.8910, 0.5199], 

1036 "patch 33": [0.1412, 0.1758, 0.4643], 

1037 "patch 34": [0.0153, 0.0668, 0.0694], 

1038 "patch 35": [0.6053, 0.5088, 0.1593], 

1039 "patch 36": [0.4217, 0.4459, 0.3173], 

1040 "white": [0.9505, 1.0000, 1.0888], 

1041 "neutral 87": [0.8331, 0.8801, 0.9576], 

1042 "neutral 63": [0.6050, 0.6401, 0.6958], 

1043 "neutral 44": [0.4119, 0.4358, 0.4724], 

1044 "neutral 28": [0.2638, 0.2798, 0.3018], 

1045 "neutral 15": [0.1405, 0.1489, 0.1598], 

1046 "neutral 7": [0.0628, 0.0665, 0.0701], 

1047 "neutral 2": [0.0190, 0.0202, 0.0202], 

1048 "neutral < 0.1": [0.0000, 0.0001, 0.0000], 

1049 }.items() 

1050} 

1051 

1052DATA_TE226_V2: dict = dict( 

1053 zip( 

1054 tuple(DATA_TE226_V2_CIE_XYZ.keys()), 

1055 XYZ_to_xyY(list(DATA_TE226_V2_CIE_XYZ.values())), 

1056 strict=True, 

1057 ) 

1058) 

1059 

1060CCS_ILLUMINANT_TE226_V2: NDArrayFloat = CCS_ILLUMINANTS[ 

1061 "CIE 1931 2 Degree Standard Observer" 

1062]["D65"] 

1063"""*TE226 V2* illuminant.""" 

1064 

1065CCS_TE226_V2: ColourChecker = ColourChecker( 

1066 "TE226 V2", DATA_TE226_V2, CCS_ILLUMINANT_TE226_V2, 5, 9 

1067) 

1068""" 

1069Reference data from *TE226 V2*. Transparent color rendition test chart 

1070for HDTV cameras, in addition to known colors from "ColorChecker", the test 

1071chart contains colors which are critical in reproduction. 

1072""" 

1073 

1074CCS_COLOURCHECKERS: CanonicalMapping = CanonicalMapping( 

1075 { 

1076 "ColorChecker 1976": CCS_COLORCHECKER1976, 

1077 "ColorChecker 2005": CCS_COLORCHECKER2005, 

1078 "BabelColor Average": CCS_BABELCOLOR_AVERAGE, 

1079 "ColorChecker24 - Before November 2014": CCS_COLORCHECKER24_BEFORE_NOV2014, 

1080 "ColorChecker24 - After November 2014": CCS_COLORCHECKER24_AFTER_NOV2014, 

1081 "ColorCheckerSG - Before November 2014": CCS_COLORCHECKERSG_BEFORE_NOV2014, 

1082 "ColorCheckerSG - After November 2014": CCS_COLORCHECKERSG_AFTER_NOV2014, 

1083 "TE226 V2": CCS_TE226_V2, 

1084 } 

1085) 

1086CCS_COLOURCHECKERS.__doc__ = """ 

1087Chromaticity coordinates of the colour checkers. 

1088 

1089References 

1090---------- 

1091:cite:`BabelColor2012b`, :cite:`BabelColor2012c`, 

1092:cite:`ImageEngineering2017`, :cite:`X-Rite2016` 

1093 

1094Aliases: 

1095 

1096- 'babel_average': 'BabelColor Average' 

1097- 'cc2005': 'ColorChecker 2005' 

1098- 'ccb2014': 'ColorChecker24 - Before November 2014' 

1099- 'cca2014': 'ColorChecker24 - After November 2014' 

1100""" 

1101CCS_COLOURCHECKERS["babel_average"] = CCS_COLOURCHECKERS["BabelColor Average"] 

1102CCS_COLOURCHECKERS["cc2005"] = CCS_COLOURCHECKERS["ColorChecker 2005"] 

1103CCS_COLOURCHECKERS["ccb2014"] = CCS_COLOURCHECKERS[ 

1104 "ColorChecker24 - Before November 2014" 

1105] 

1106CCS_COLOURCHECKERS["cca2014"] = CCS_COLOURCHECKERS[ 

1107 "ColorChecker24 - After November 2014" 

1108]