| 1 | # | ||
| 2 | # GENERATED WITH PDL::PP from color_distance.pp! Don't modify! | ||
| 3 | # | ||
| 4 | package PDL::Graphics::ColorDistance; | ||
| 5 | |||
| 6 | 1 | our @EXPORT_OK = qw(delta_e_2000 delta_e_2000 ); | |
| 7 | 1 | our %EXPORT_TAGS = (Func=>\@EXPORT_OK); | |
| 8 | |||
| 9 | 1 | ▶ | use PDL::Core; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 1 | ▶ | use PDL::Exporter; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 1 | ▶ | use DynaLoader; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | |||
| 14 | 1 | our $VERSION = '0.0.1'; | |
| 15 | 1 | our @ISA = ( 'PDL::Exporter','DynaLoader' ); | |
| 16 | 1 | push @PDL::Core::PP, __PACKAGE__; | |
| 17 | 1 | bootstrap PDL::Graphics::ColorDistance $VERSION; | |
| 18 | |||
| 19 | |||
| 20 | |||
| 21 | |||
| 22 | |||
| 23 | |||
| 24 | |||
| 25 | |||
| 26 | #line 9 "color_distance.pp" | ||
| 27 | |||
| 28 | =encoding utf-8 | ||
| 29 | |||
| 30 | =head1 NAME | ||
| 31 | |||
| 32 | PDL::Graphics::ColorDistance | ||
| 33 | |||
| 34 | =head1 VERSION | ||
| 35 | |||
| 36 | 0.0.1 | ||
| 37 | |||
| 38 | =head1 DESCRIPTION | ||
| 39 | |||
| 40 | This is a PDL implementation of the CIEDE2000 color difference formula. | ||
| 41 | |||
| 42 | =head1 SYNOPSIS | ||
| 43 | |||
| 44 | use PDL::LiteF; | ||
| 45 | use PDL::Graphics::ColorDistance; | ||
| 46 | |||
| 47 | my $lab1 = pdl([ 50, 2.6772, -79.7751 ]); | ||
| 48 | my $lab2 = pdl([ 50, 0, -82.7485 ]); | ||
| 49 | my $delta_e = delta_e_2000($lab1, $lab2); | ||
| 50 | |||
| 51 | # $delta_e == 2.0425; | ||
| 52 | |||
| 53 | =cut | ||
| 54 | |||
| 55 | use strict; | ||
| 56 | use warnings; | ||
| 57 | |||
| 58 | use Carp; | ||
| 59 | use PDL::LiteF; | ||
| 60 | |||
| 61 | $PDL::onlinedoc->scan(__FILE__) if $PDL::onlinedoc; | ||
| 62 | #line 63 "ColorDistance.pm" | ||
| 63 | |||
| 64 | |||
| 65 | =head1 FUNCTIONS | ||
| 66 | |||
| 67 | =cut | ||
| 68 | |||
| 69 | |||
| 70 | |||
| 71 | |||
| 72 | |||
| 73 | |||
| 74 | =head2 delta_e_2000 | ||
| 75 | |||
| 76 | =for sig | ||
| 77 | |||
| 78 | Signature: (double lab1(c=3); double lab2(c=3); double [o]delta_e()) | ||
| 79 | Types: (sbyte byte short ushort long ulong indx ulonglong longlong | ||
| 80 | float double ldouble) | ||
| 81 | |||
| 82 | =for ref | ||
| 83 | |||
| 84 | Calculates the ΔE*00 (delta e, color distance) between two Lab colors | ||
| 85 | |||
| 86 | =for usage | ||
| 87 | |||
| 88 | Usage: | ||
| 89 | |||
| 90 | my $delta_e = delta_e_2000($lab1, $lab2); | ||
| 91 | |||
| 92 | =pod | ||
| 93 | |||
| 94 | Broadcasts over its inputs. | ||
| 95 | |||
| 96 | =for bad | ||
| 97 | |||
| 98 | If C<delta_e_2000> encounters a bad value in any of the L, a, or b values the input values will be marked as bad | ||
| 99 | |||
| 100 | =cut | ||
| 101 | |||
| 102 | |||
| 103 | |||
| 104 | |||
| 105 | 0 | *delta_e_2000 = \&PDL::delta_e_2000; | |
| 106 | |||
| 107 | |||
| 108 | |||
| 109 | |||
| 110 | |||
| 111 | #line 97 "color_distance.pp" | ||
| 112 | |||
| 113 | =head1 DEVELOPMENT | ||
| 114 | |||
| 115 | This module is being developed via a git repository publicly available at http://github.com/ewaters/perl-PDL-Graphics-ColorDistance. | ||
| 116 | |||
| 117 | =head1 COPYRIGHT | ||
| 118 | |||
| 119 | Copyright (c) 2013 Eric Waters and Shutterstock Images (http://shutterstock.com). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. | ||
| 120 | |||
| 121 | The full text of the license can be found in the LICENSE file included with this module. | ||
| 122 | |||
| 123 | =head1 AUTHOR | ||
| 124 | |||
| 125 | Eric Waters <ewaters@gmail.com> | ||
| 126 | |||
| 127 | =cut | ||
| 128 | #line 129 "ColorDistance.pm" | ||
| 129 | |||
| 130 | # Exit with OK status | ||
| 131 | |||
| 132 | 1 | 1; | |