*/
static void ConcatentateHexColorComponent(const PixelInfo *pixel,
- const ChannelType channel,char *tuple)
+ const PixelChannel channel,char *tuple)
{
char
component[MaxTextExtent];
color=0.0;
switch (channel)
{
- case RedChannel:
+ case RedPixelChannel:
{
color=pixel->red;
break;
}
- case GreenChannel:
+ case GreenPixelChannel:
{
color=pixel->green;
break;
}
- case BlueChannel:
+ case BluePixelChannel:
{
color=pixel->blue;
break;
}
- case AlphaChannel:
+ case AlphaPixelChannel:
{
color=pixel->alpha;
break;
}
- case BlackChannel:
+ case BlackPixelChannel:
{
color=pixel->black;
break;
Convert pixel to hex color.
*/
(void) ConcatenateMagickString(tuple,"#",MaxTextExtent);
- ConcatentateHexColorComponent(pixel,RedChannel,tuple);
- ConcatentateHexColorComponent(pixel,GreenChannel,tuple);
- ConcatentateHexColorComponent(pixel,BlueChannel,tuple);
+ ConcatentateHexColorComponent(pixel,RedPixelChannel,tuple);
+ ConcatentateHexColorComponent(pixel,GreenPixelChannel,tuple);
+ ConcatentateHexColorComponent(pixel,BluePixelChannel,tuple);
if (pixel->colorspace == CMYKColorspace)
- ConcatentateHexColorComponent(pixel,BlackChannel,tuple);
+ ConcatentateHexColorComponent(pixel,BlackPixelChannel,tuple);
if ((pixel->matte != MagickFalse) && (pixel->alpha != OpaqueAlpha))
- ConcatentateHexColorComponent(pixel,AlphaChannel,tuple);
+ ConcatentateHexColorComponent(pixel,AlphaPixelChannel,tuple);
return;
}
/*
% access the red channel contrast, for example, like this:
%
% channel_features=GetImageFeatures(image,1,exception);
-% contrast=channel_features[RedChannel].contrast[0];
+% contrast=channel_features[RedPixelChannel].contrast[0];
%
% Use MagickRelinquishMemory() to free the features buffer.
%
/*
Angular second moment: measure of homogeneity of the image.
*/
- channel_features[RedChannel].angular_second_moment[i]+=
+ channel_features[RedPixelChannel].angular_second_moment[i]+=
cooccurrence[x][y].direction[i].red*
cooccurrence[x][y].direction[i].red;
- channel_features[GreenChannel].angular_second_moment[i]+=
+ channel_features[GreenPixelChannel].angular_second_moment[i]+=
cooccurrence[x][y].direction[i].green*
cooccurrence[x][y].direction[i].green;
- channel_features[BlueChannel].angular_second_moment[i]+=
+ channel_features[BluePixelChannel].angular_second_moment[i]+=
cooccurrence[x][y].direction[i].blue*
cooccurrence[x][y].direction[i].blue;
if (image->colorspace == CMYKColorspace)
- channel_features[BlackChannel].angular_second_moment[i]+=
+ channel_features[BlackPixelChannel].angular_second_moment[i]+=
cooccurrence[x][y].direction[i].black*
cooccurrence[x][y].direction[i].black;
if (image->matte != MagickFalse)
- channel_features[OpacityChannel].angular_second_moment[i]+=
+ channel_features[AlphaPixelChannel].angular_second_moment[i]+=
cooccurrence[x][y].direction[i].alpha*
cooccurrence[x][y].direction[i].alpha;
/*
/*
Inverse Difference Moment.
*/
- channel_features[RedChannel].inverse_difference_moment[i]+=
+ channel_features[RedPixelChannel].inverse_difference_moment[i]+=
cooccurrence[x][y].direction[i].red/((y-x)*(y-x)+1);
- channel_features[GreenChannel].inverse_difference_moment[i]+=
+ channel_features[GreenPixelChannel].inverse_difference_moment[i]+=
cooccurrence[x][y].direction[i].green/((y-x)*(y-x)+1);
- channel_features[BlueChannel].inverse_difference_moment[i]+=
+ channel_features[BluePixelChannel].inverse_difference_moment[i]+=
cooccurrence[x][y].direction[i].blue/((y-x)*(y-x)+1);
if (image->colorspace == CMYKColorspace)
- channel_features[BlackChannel].inverse_difference_moment[i]+=
+ channel_features[BlackPixelChannel].inverse_difference_moment[i]+=
cooccurrence[x][y].direction[i].black/((y-x)*(y-x)+1);
if (image->matte != MagickFalse)
- channel_features[OpacityChannel].inverse_difference_moment[i]+=
+ channel_features[AlphaPixelChannel].inverse_difference_moment[i]+=
cooccurrence[x][y].direction[i].alpha/((y-x)*(y-x)+1);
/*
Sum average.
/*
Entropy.
*/
- channel_features[RedChannel].entropy[i]-=
+ channel_features[RedPixelChannel].entropy[i]-=
cooccurrence[x][y].direction[i].red*
log10(cooccurrence[x][y].direction[i].red+MagickEpsilon);
- channel_features[GreenChannel].entropy[i]-=
+ channel_features[GreenPixelChannel].entropy[i]-=
cooccurrence[x][y].direction[i].green*
log10(cooccurrence[x][y].direction[i].green+MagickEpsilon);
- channel_features[BlueChannel].entropy[i]-=
+ channel_features[BluePixelChannel].entropy[i]-=
cooccurrence[x][y].direction[i].blue*
log10(cooccurrence[x][y].direction[i].blue+MagickEpsilon);
if (image->colorspace == CMYKColorspace)
- channel_features[BlackChannel].entropy[i]-=
+ channel_features[BlackPixelChannel].entropy[i]-=
cooccurrence[x][y].direction[i].black*
log10(cooccurrence[x][y].direction[i].black+MagickEpsilon);
if (image->matte != MagickFalse)
- channel_features[OpacityChannel].entropy[i]-=
+ channel_features[AlphaPixelChannel].entropy[i]-=
cooccurrence[x][y].direction[i].alpha*
log10(cooccurrence[x][y].direction[i].alpha+MagickEpsilon);
/*
/*
Correlation: measure of linear-dependencies in the image.
*/
- channel_features[RedChannel].correlation[i]=
+ channel_features[RedPixelChannel].correlation[i]=
(correlation.direction[i].red-mean.direction[i].red*
mean.direction[i].red)/(sqrt(sum_squares.direction[i].red-
(mean.direction[i].red*mean.direction[i].red))*sqrt(
sum_squares.direction[i].red-(mean.direction[i].red*
mean.direction[i].red)));
- channel_features[GreenChannel].correlation[i]=
+ channel_features[GreenPixelChannel].correlation[i]=
(correlation.direction[i].green-mean.direction[i].green*
mean.direction[i].green)/(sqrt(sum_squares.direction[i].green-
(mean.direction[i].green*mean.direction[i].green))*sqrt(
sum_squares.direction[i].green-(mean.direction[i].green*
mean.direction[i].green)));
- channel_features[BlueChannel].correlation[i]=
+ channel_features[BluePixelChannel].correlation[i]=
(correlation.direction[i].blue-mean.direction[i].blue*
mean.direction[i].blue)/(sqrt(sum_squares.direction[i].blue-
(mean.direction[i].blue*mean.direction[i].blue))*sqrt(
sum_squares.direction[i].blue-(mean.direction[i].blue*
mean.direction[i].blue)));
if (image->colorspace == CMYKColorspace)
- channel_features[BlackChannel].correlation[i]=
+ channel_features[BlackPixelChannel].correlation[i]=
(correlation.direction[i].black-mean.direction[i].black*
mean.direction[i].black)/(sqrt(sum_squares.direction[i].black-
(mean.direction[i].black*mean.direction[i].black))*sqrt(
sum_squares.direction[i].black-(mean.direction[i].black*
mean.direction[i].black)));
if (image->matte != MagickFalse)
- channel_features[OpacityChannel].correlation[i]=
+ channel_features[AlphaPixelChannel].correlation[i]=
(correlation.direction[i].alpha-mean.direction[i].alpha*
mean.direction[i].alpha)/(sqrt(sum_squares.direction[i].alpha-
(mean.direction[i].alpha*mean.direction[i].alpha))*sqrt(
/*
Sum average.
*/
- channel_features[RedChannel].sum_average[i]+=
+ channel_features[RedPixelChannel].sum_average[i]+=
x*density_xy[x].direction[i].red;
- channel_features[GreenChannel].sum_average[i]+=
+ channel_features[GreenPixelChannel].sum_average[i]+=
x*density_xy[x].direction[i].green;
- channel_features[BlueChannel].sum_average[i]+=
+ channel_features[BluePixelChannel].sum_average[i]+=
x*density_xy[x].direction[i].blue;
if (image->colorspace == CMYKColorspace)
- channel_features[BlackChannel].sum_average[i]+=
+ channel_features[BlackPixelChannel].sum_average[i]+=
x*density_xy[x].direction[i].black;
if (image->matte != MagickFalse)
- channel_features[OpacityChannel].sum_average[i]+=
+ channel_features[AlphaPixelChannel].sum_average[i]+=
x*density_xy[x].direction[i].alpha;
/*
Sum entropy.
*/
- channel_features[RedChannel].sum_entropy[i]-=
+ channel_features[RedPixelChannel].sum_entropy[i]-=
density_xy[x].direction[i].red*
log10(density_xy[x].direction[i].red+MagickEpsilon);
- channel_features[GreenChannel].sum_entropy[i]-=
+ channel_features[GreenPixelChannel].sum_entropy[i]-=
density_xy[x].direction[i].green*
log10(density_xy[x].direction[i].green+MagickEpsilon);
- channel_features[BlueChannel].sum_entropy[i]-=
+ channel_features[BluePixelChannel].sum_entropy[i]-=
density_xy[x].direction[i].blue*
log10(density_xy[x].direction[i].blue+MagickEpsilon);
if (image->colorspace == CMYKColorspace)
- channel_features[BlackChannel].sum_entropy[i]-=
+ channel_features[BlackPixelChannel].sum_entropy[i]-=
density_xy[x].direction[i].black*
log10(density_xy[x].direction[i].black+MagickEpsilon);
if (image->matte != MagickFalse)
- channel_features[OpacityChannel].sum_entropy[i]-=
+ channel_features[AlphaPixelChannel].sum_entropy[i]-=
density_xy[x].direction[i].alpha*
log10(density_xy[x].direction[i].alpha+MagickEpsilon);
/*
Sum variance.
*/
- channel_features[RedChannel].sum_variance[i]+=
- (x-channel_features[RedChannel].sum_entropy[i])*
- (x-channel_features[RedChannel].sum_entropy[i])*
+ channel_features[RedPixelChannel].sum_variance[i]+=
+ (x-channel_features[RedPixelChannel].sum_entropy[i])*
+ (x-channel_features[RedPixelChannel].sum_entropy[i])*
density_xy[x].direction[i].red;
- channel_features[GreenChannel].sum_variance[i]+=
- (x-channel_features[GreenChannel].sum_entropy[i])*
- (x-channel_features[GreenChannel].sum_entropy[i])*
+ channel_features[GreenPixelChannel].sum_variance[i]+=
+ (x-channel_features[GreenPixelChannel].sum_entropy[i])*
+ (x-channel_features[GreenPixelChannel].sum_entropy[i])*
density_xy[x].direction[i].green;
- channel_features[BlueChannel].sum_variance[i]+=
- (x-channel_features[BlueChannel].sum_entropy[i])*
- (x-channel_features[BlueChannel].sum_entropy[i])*
+ channel_features[BluePixelChannel].sum_variance[i]+=
+ (x-channel_features[BluePixelChannel].sum_entropy[i])*
+ (x-channel_features[BluePixelChannel].sum_entropy[i])*
density_xy[x].direction[i].blue;
if (image->colorspace == CMYKColorspace)
- channel_features[BlackChannel].sum_variance[i]+=
- (x-channel_features[BlackChannel].sum_entropy[i])*
- (x-channel_features[BlackChannel].sum_entropy[i])*
+ channel_features[BlackPixelChannel].sum_variance[i]+=
+ (x-channel_features[BlackPixelChannel].sum_entropy[i])*
+ (x-channel_features[BlackPixelChannel].sum_entropy[i])*
density_xy[x].direction[i].black;
if (image->matte != MagickFalse)
- channel_features[OpacityChannel].sum_variance[i]+=
- (x-channel_features[OpacityChannel].sum_entropy[i])*
- (x-channel_features[OpacityChannel].sum_entropy[i])*
+ channel_features[AlphaPixelChannel].sum_variance[i]+=
+ (x-channel_features[AlphaPixelChannel].sum_entropy[i])*
+ (x-channel_features[AlphaPixelChannel].sum_entropy[i])*
density_xy[x].direction[i].alpha;
}
}
MagickEpsilon));
}
}
- channel_features[RedChannel].variance_sum_of_squares[i]=
+ channel_features[RedPixelChannel].variance_sum_of_squares[i]=
variance.direction[i].red;
- channel_features[GreenChannel].variance_sum_of_squares[i]=
+ channel_features[GreenPixelChannel].variance_sum_of_squares[i]=
variance.direction[i].green;
- channel_features[BlueChannel].variance_sum_of_squares[i]=
+ channel_features[BluePixelChannel].variance_sum_of_squares[i]=
variance.direction[i].blue;
if (image->colorspace == CMYKColorspace)
- channel_features[RedChannel].variance_sum_of_squares[i]=
+ channel_features[BlackPixelChannel].variance_sum_of_squares[i]=
variance.direction[i].black;
if (image->matte != MagickFalse)
- channel_features[RedChannel].variance_sum_of_squares[i]=
+ channel_features[AlphaPixelChannel].variance_sum_of_squares[i]=
variance.direction[i].alpha;
}
/*
/*
Difference entropy.
*/
- channel_features[RedChannel].difference_entropy[i]-=
+ channel_features[RedPixelChannel].difference_entropy[i]-=
density_xy[x].direction[i].red*
log10(density_xy[x].direction[i].red+MagickEpsilon);
- channel_features[GreenChannel].difference_entropy[i]-=
+ channel_features[GreenPixelChannel].difference_entropy[i]-=
density_xy[x].direction[i].green*
log10(density_xy[x].direction[i].green+MagickEpsilon);
- channel_features[BlueChannel].difference_entropy[i]-=
+ channel_features[BluePixelChannel].difference_entropy[i]-=
density_xy[x].direction[i].blue*
log10(density_xy[x].direction[i].blue+MagickEpsilon);
if (image->colorspace == CMYKColorspace)
- channel_features[BlackChannel].difference_entropy[i]-=
+ channel_features[BlackPixelChannel].difference_entropy[i]-=
density_xy[x].direction[i].black*
log10(density_xy[x].direction[i].black+MagickEpsilon);
if (image->matte != MagickFalse)
- channel_features[OpacityChannel].difference_entropy[i]-=
+ channel_features[AlphaPixelChannel].difference_entropy[i]-=
density_xy[x].direction[i].alpha*
log10(density_xy[x].direction[i].alpha+MagickEpsilon);
/*
/*
Difference variance.
*/
- channel_features[RedChannel].difference_variance[i]=
+ channel_features[RedPixelChannel].difference_variance[i]=
(((double) number_grays*number_grays*sum_squares.direction[i].red)-
(variance.direction[i].red*variance.direction[i].red))/
((double) number_grays*number_grays*number_grays*number_grays);
- channel_features[GreenChannel].difference_variance[i]=
+ channel_features[GreenPixelChannel].difference_variance[i]=
(((double) number_grays*number_grays*sum_squares.direction[i].green)-
(variance.direction[i].green*variance.direction[i].green))/
((double) number_grays*number_grays*number_grays*number_grays);
- channel_features[BlueChannel].difference_variance[i]=
+ channel_features[BluePixelChannel].difference_variance[i]=
(((double) number_grays*number_grays*sum_squares.direction[i].blue)-
(variance.direction[i].blue*variance.direction[i].blue))/
((double) number_grays*number_grays*number_grays*number_grays);
if (image->colorspace == CMYKColorspace)
- channel_features[BlackChannel].difference_variance[i]=
+ channel_features[BlackPixelChannel].difference_variance[i]=
(((double) number_grays*number_grays*sum_squares.direction[i].black)-
(variance.direction[i].black*variance.direction[i].black))/
((double) number_grays*number_grays*number_grays*number_grays);
if (image->matte != MagickFalse)
- channel_features[OpacityChannel].difference_variance[i]=
+ channel_features[AlphaPixelChannel].difference_variance[i]=
(((double) number_grays*number_grays*sum_squares.direction[i].alpha)-
(variance.direction[i].alpha*variance.direction[i].alpha))/
((double) number_grays*number_grays*number_grays*number_grays);
/*
Information Measures of Correlation.
*/
- channel_features[RedChannel].measure_of_correlation_1[i]=
+ channel_features[RedPixelChannel].measure_of_correlation_1[i]=
(entropy_xy.direction[i].red-entropy_xy1.direction[i].red)/
(entropy_x.direction[i].red > entropy_y.direction[i].red ?
entropy_x.direction[i].red : entropy_y.direction[i].red);
- channel_features[GreenChannel].measure_of_correlation_1[i]=
+ channel_features[GreenPixelChannel].measure_of_correlation_1[i]=
(entropy_xy.direction[i].green-entropy_xy1.direction[i].green)/
(entropy_x.direction[i].green > entropy_y.direction[i].green ?
entropy_x.direction[i].green : entropy_y.direction[i].green);
- channel_features[BlueChannel].measure_of_correlation_1[i]=
+ channel_features[BluePixelChannel].measure_of_correlation_1[i]=
(entropy_xy.direction[i].blue-entropy_xy1.direction[i].blue)/
(entropy_x.direction[i].blue > entropy_y.direction[i].blue ?
entropy_x.direction[i].blue : entropy_y.direction[i].blue);
if (image->colorspace == CMYKColorspace)
- channel_features[BlackChannel].measure_of_correlation_1[i]=
+ channel_features[BlackPixelChannel].measure_of_correlation_1[i]=
(entropy_xy.direction[i].black-entropy_xy1.direction[i].black)/
(entropy_x.direction[i].black > entropy_y.direction[i].black ?
entropy_x.direction[i].black : entropy_y.direction[i].black);
if (image->matte != MagickFalse)
- channel_features[OpacityChannel].measure_of_correlation_1[i]=
+ channel_features[AlphaPixelChannel].measure_of_correlation_1[i]=
(entropy_xy.direction[i].alpha-entropy_xy1.direction[i].alpha)/
(entropy_x.direction[i].alpha > entropy_y.direction[i].alpha ?
entropy_x.direction[i].alpha : entropy_y.direction[i].alpha);
- channel_features[RedChannel].measure_of_correlation_2[i]=
+ channel_features[RedPixelChannel].measure_of_correlation_2[i]=
(sqrt(fabs(1.0-exp(-2.0*(entropy_xy2.direction[i].red-
entropy_xy.direction[i].red)))));
- channel_features[GreenChannel].measure_of_correlation_2[i]=
+ channel_features[GreenPixelChannel].measure_of_correlation_2[i]=
(sqrt(fabs(1.0-exp(-2.0*(entropy_xy2.direction[i].green-
entropy_xy.direction[i].green)))));
- channel_features[BlueChannel].measure_of_correlation_2[i]=
+ channel_features[BluePixelChannel].measure_of_correlation_2[i]=
(sqrt(fabs(1.0-exp(-2.0*(entropy_xy2.direction[i].blue-
entropy_xy.direction[i].blue)))));
if (image->colorspace == CMYKColorspace)
- channel_features[BlackChannel].measure_of_correlation_2[i]=
+ channel_features[BlackPixelChannel].measure_of_correlation_2[i]=
(sqrt(fabs(1.0-exp(-2.0*(entropy_xy2.direction[i].black-
entropy_xy.direction[i].black)))));
if (image->matte != MagickFalse)
- channel_features[OpacityChannel].measure_of_correlation_2[i]=
+ channel_features[AlphaPixelChannel].measure_of_correlation_2[i]=
(sqrt(fabs(1.0-exp(-2.0*(entropy_xy2.direction[i].alpha-
entropy_xy.direction[i].alpha)))));
}
density_y[x].direction[i].alpha;
}
}
- channel_features[RedChannel].contrast[i]+=z*z*pixel.direction[i].red;
- channel_features[GreenChannel].contrast[i]+=z*z*pixel.direction[i].green;
- channel_features[BlueChannel].contrast[i]+=z*z*pixel.direction[i].blue;
+ channel_features[RedPixelChannel].contrast[i]+=z*z*
+ pixel.direction[i].red;
+ channel_features[GreenPixelChannel].contrast[i]+=z*z*
+ pixel.direction[i].green;
+ channel_features[BluePixelChannel].contrast[i]+=z*z*
+ pixel.direction[i].blue;
if (image->colorspace == CMYKColorspace)
- channel_features[BlackChannel].contrast[i]+=z*z*
+ channel_features[BlackPixelChannel].contrast[i]+=z*z*
pixel.direction[i].black;
if (image->matte != MagickFalse)
- channel_features[OpacityChannel].contrast[i]+=z*z*
+ channel_features[AlphaPixelChannel].contrast[i]+=z*z*
pixel.direction[i].alpha;
}
/*
Maximum Correlation Coefficient.
Future: return second largest eigenvalue of Q.
*/
- channel_features[RedChannel].maximum_correlation_coefficient[i]=
+ channel_features[RedPixelChannel].maximum_correlation_coefficient[i]=
sqrt((double) -1.0);
- channel_features[GreenChannel].maximum_correlation_coefficient[i]=
+ channel_features[GreenPixelChannel].maximum_correlation_coefficient[i]=
sqrt((double) -1.0);
- channel_features[BlueChannel].maximum_correlation_coefficient[i]=
+ channel_features[BluePixelChannel].maximum_correlation_coefficient[i]=
sqrt((double) -1.0);
if (image->colorspace == CMYKColorspace)
- channel_features[BlackChannel].maximum_correlation_coefficient[i]=
+ channel_features[BlackPixelChannel].maximum_correlation_coefficient[i]=
sqrt((double) -1.0);
if (image->matte != MagickFalse)
- channel_features[OpacityChannel].maximum_correlation_coefficient[i]=
+ channel_features[AlphaPixelChannel].maximum_correlation_coefficient[i]=
sqrt((double) -1.0);
}
/*
*/
typedef struct _FourierInfo
{
- ChannelType
+ PixelChannel
channel;
MagickBooleanType
{
switch (fourier_info->channel)
{
- case RedChannel:
+ case RedPixelChannel:
default:
{
SetPixelRed(magnitude_image,ClampToQuantum(QuantumRange*
magnitude_source[i]),q);
break;
}
- case GreenChannel:
+ case GreenPixelChannel:
{
SetPixelGreen(magnitude_image,ClampToQuantum(QuantumRange*
magnitude_source[i]),q);
break;
}
- case BlueChannel:
+ case BluePixelChannel:
{
SetPixelBlue(magnitude_image,ClampToQuantum(QuantumRange*
magnitude_source[i]),q);
break;
}
- case BlackChannel:
+ case BlackPixelChannel:
{
SetPixelBlack(magnitude_image,ClampToQuantum(QuantumRange*
magnitude_source[i]),q);
break;
}
- case AlphaChannel:
+ case AlphaPixelChannel:
{
SetPixelAlpha(magnitude_image,ClampToQuantum(QuantumRange*
magnitude_source[i]),q);
break;
}
- case GrayChannels:
- {
- SetPixelGray(magnitude_image,ClampToQuantum(QuantumRange*
- magnitude_source[i]),q);
- break;
- }
}
i++;
q+=GetPixelChannels(magnitude_image);
{
switch (fourier_info->channel)
{
- case RedChannel:
+ case RedPixelChannel:
default:
{
SetPixelRed(phase_image,ClampToQuantum(QuantumRange*
phase_source[i]),q);
break;
}
- case GreenChannel:
+ case GreenPixelChannel:
{
SetPixelGreen(phase_image,ClampToQuantum(QuantumRange*
phase_source[i]),q);
break;
}
- case BlueChannel:
+ case BluePixelChannel:
{
SetPixelBlue(phase_image,ClampToQuantum(QuantumRange*
phase_source[i]),q);
break;
}
- case BlackChannel:
+ case BlackPixelChannel:
{
SetPixelBlack(phase_image,ClampToQuantum(QuantumRange*
phase_source[i]),q);
break;
}
- case AlphaChannel:
+ case AlphaPixelChannel:
{
SetPixelAlpha(phase_image,ClampToQuantum(QuantumRange*
phase_source[i]),q);
break;
}
- case GrayChannels:
- {
- SetPixelGray(phase_image,ClampToQuantum(QuantumRange*
- phase_source[i]),q);
- break;
- }
}
i++;
q+=GetPixelChannels(phase_image);
{
switch (fourier_info->channel)
{
- case RedChannel:
+ case RedPixelChannel:
default:
{
source[i]=QuantumScale*GetPixelRed(image,p);
break;
}
- case GreenChannel:
+ case GreenPixelChannel:
{
source[i]=QuantumScale*GetPixelGreen(image,p);
break;
}
- case BlueChannel:
+ case BluePixelChannel:
{
source[i]=QuantumScale*GetPixelBlue(image,p);
break;
}
- case BlackChannel:
+ case BlackPixelChannel:
{
source[i]=QuantumScale*GetPixelBlack(image,p);
break;
}
- case AlphaChannel:
+ case AlphaPixelChannel:
{
source[i]=QuantumScale*GetPixelAlpha(image,p);
break;
}
- case GrayChannels:
- {
- source[i]=QuantumScale*GetPixelGray(image,p);
- break;
- }
}
i++;
p+=GetPixelChannels(image);
}
static MagickBooleanType ForwardFourierTransformChannel(const Image *image,
- const ChannelType channel,const MagickBooleanType modulus,
+ const PixelChannel channel,const MagickBooleanType modulus,
Image *fourier_image,ExceptionInfo *exception)
{
double
if (is_gray != MagickFalse)
thread_status=ForwardFourierTransformChannel(image,
- GrayChannels,modulus,fourier_image,exception);
+ GrayPixelChannel,modulus,fourier_image,exception);
else
thread_status=ForwardFourierTransformChannel(image,
- RedChannel,modulus,fourier_image,exception);
+ RedPixelChannel,modulus,fourier_image,exception);
if (thread_status == MagickFalse)
status=thread_status;
}
thread_status=MagickTrue;
if (is_gray == MagickFalse)
thread_status=ForwardFourierTransformChannel(image,
- GreenChannel,modulus,fourier_image,exception);
+ GreenPixelChannel,modulus,fourier_image,exception);
if (thread_status == MagickFalse)
status=thread_status;
}
thread_status=MagickTrue;
if (is_gray == MagickFalse)
thread_status=ForwardFourierTransformChannel(image,
- BlueChannel,modulus,fourier_image,exception);
+ BluePixelChannel,modulus,fourier_image,exception);
if (thread_status == MagickFalse)
status=thread_status;
}
thread_status=MagickTrue;
if (image->colorspace == CMYKColorspace)
thread_status=ForwardFourierTransformChannel(image,
- BlackChannel,modulus,fourier_image,exception);
+ BlackPixelChannel,modulus,fourier_image,exception);
if (thread_status == MagickFalse)
status=thread_status;
}
thread_status=MagickTrue;
if (image->matte != MagickFalse)
thread_status=ForwardFourierTransformChannel(image,
- AlphaChannel,modulus,fourier_image,exception);
+ AlphaPixelChannel,modulus,fourier_image,exception);
if (thread_status == MagickFalse)
status=thread_status;
}
{
switch (fourier_info->channel)
{
- case RedChannel:
+ case RedPixelChannel:
default:
{
magnitude_source[i]=QuantumScale*GetPixelRed(magnitude_image,p);
break;
}
- case GreenChannel:
+ case GreenPixelChannel:
{
magnitude_source[i]=QuantumScale*GetPixelGreen(magnitude_image,p);
break;
}
- case BlueChannel:
+ case BluePixelChannel:
{
magnitude_source[i]=QuantumScale*GetPixelBlue(magnitude_image,p);
break;
}
- case BlackChannel:
+ case BlackPixelChannel:
{
magnitude_source[i]=QuantumScale*GetPixelBlack(magnitude_image,p);
break;
}
- case AlphaChannel:
+ case AlphaPixelChannel:
{
magnitude_source[i]=QuantumScale*GetPixelAlpha(magnitude_image,p);
break;
}
- case GrayChannels:
- {
- magnitude_source[i]=QuantumScale*GetPixelGray(magnitude_image,p);
- break;
- }
}
i++;
p+=GetPixelChannels(magnitude_image);
{
switch (fourier_info->channel)
{
- case RedChannel:
+ case RedPixelChannel:
default:
{
phase_source[i]=QuantumScale*GetPixelRed(phase_image,p);
break;
}
- case GreenChannel:
+ case GreenPixelChannel:
{
phase_source[i]=QuantumScale*GetPixelGreen(phase_image,p);
break;
}
- case BlueChannel:
+ case BluePixelChannel:
{
phase_source[i]=QuantumScale*GetPixelBlue(phase_image,p);
break;
}
- case BlackChannel:
+ case BlackPixelChannel:
{
phase_source[i]=QuantumScale*GetPixelBlack(phase_image,p);
break;
}
- case AlphaChannel:
+ case AlphaPixelChannel:
{
phase_source[i]=QuantumScale*GetPixelAlpha(phase_image,p);
break;
}
- case GrayChannels:
- {
- phase_source[i]=QuantumScale*GetPixelGray(phase_image,p);
- break;
- }
}
i++;
p+=GetPixelChannels(phase_image);
{
switch (fourier_info->channel)
{
- case RedChannel:
+ case RedPixelChannel:
default:
{
SetPixelRed(image,ClampToQuantum(QuantumRange*source[i]),q);
break;
}
- case GreenChannel:
+ case GreenPixelChannel:
{
SetPixelGreen(image,ClampToQuantum(QuantumRange*source[i]),q);
break;
}
- case BlueChannel:
+ case BluePixelChannel:
{
SetPixelBlue(image,ClampToQuantum(QuantumRange*source[i]),q);
break;
}
- case BlackChannel:
+ case BlackPixelChannel:
{
SetPixelBlack(image,ClampToQuantum(QuantumRange*source[i]),q);
break;
}
- case AlphaChannel:
+ case AlphaPixelChannel:
{
SetPixelAlpha(image,ClampToQuantum(QuantumRange*source[i]),q);
break;
}
- case GrayChannels:
- {
- SetPixelGray(image,ClampToQuantum(QuantumRange*source[i]),q);
- break;
- }
}
i++;
q+=GetPixelChannels(image);
static MagickBooleanType InverseFourierTransformChannel(
const Image *magnitude_image,const Image *phase_image,
- const ChannelType channel,const MagickBooleanType modulus,
+ const PixelChannel channel,const MagickBooleanType modulus,
Image *fourier_image,ExceptionInfo *exception)
{
double
if (is_gray != MagickFalse)
thread_status=InverseFourierTransformChannel(magnitude_image,
- phase_image,GrayChannels,modulus,fourier_image,exception);
+ phase_image,GrayPixelChannel,modulus,fourier_image,exception);
else
thread_status=InverseFourierTransformChannel(magnitude_image,
- phase_image,RedChannel,modulus,fourier_image,exception);
+ phase_image,RedPixelChannel,modulus,fourier_image,exception);
if (thread_status == MagickFalse)
status=thread_status;
}
thread_status=MagickTrue;
if (is_gray == MagickFalse)
thread_status=InverseFourierTransformChannel(magnitude_image,
- phase_image,GreenChannel,modulus,fourier_image,exception);
+ phase_image,GreenPixelChannel,modulus,fourier_image,exception);
if (thread_status == MagickFalse)
status=thread_status;
}
thread_status=MagickTrue;
if (is_gray == MagickFalse)
thread_status=InverseFourierTransformChannel(magnitude_image,
- phase_image,BlueChannel,modulus,fourier_image,exception);
+ phase_image,BluePixelChannel,modulus,fourier_image,exception);
if (thread_status == MagickFalse)
status=thread_status;
}
thread_status=MagickTrue;
if (magnitude_image->colorspace == CMYKColorspace)
thread_status=InverseFourierTransformChannel(magnitude_image,
- phase_image,BlackChannel,modulus,fourier_image,exception);
+ phase_image,BlackPixelChannel,modulus,fourier_image,exception);
if (thread_status == MagickFalse)
status=thread_status;
}
thread_status=MagickTrue;
if (magnitude_image->matte != MagickFalse)
thread_status=InverseFourierTransformChannel(magnitude_image,
- phase_image,AlphaChannel,modulus,fourier_image,exception);
+ phase_image,AlphaPixelChannel,modulus,fourier_image,exception);
if (thread_status == MagickFalse)
status=thread_status;
}
/* #undef AUTOTRACE_DELEGATE */
/* Define if coders and filters are to be built as modules. */
-/* #undef BUILD_MODULES */
+#ifndef MAGICKCORE_BUILD_MODULES
+#define MAGICKCORE_BUILD_MODULES 1
+#endif
/* Define if you have the bzip2 library */
#ifndef MAGICKCORE_BZLIB_DELEGATE
#endif
/* Define if you have FFTW library */
-/* #undef FFTW_DELEGATE */
+#ifndef MAGICKCORE_FFTW_DELEGATE
+#define MAGICKCORE_FFTW_DELEGATE 1
+#endif
/* Location of filter modules */
#ifndef MAGICKCORE_FILTER_PATH
#endif
/* Define to 1 if you have the <CL/cl.h> header file. */
-/* #undef HAVE_CL_CL_H */
+#ifndef MAGICKCORE_HAVE_CL_CL_H
+#define MAGICKCORE_HAVE_CL_CL_H 1
+#endif
/* Define to 1 if you have the <complex.h> header file. */
#ifndef MAGICKCORE_HAVE_COMPLEX_H
#endif
/* Define if you have the <lcms2.h> header file. */
-#ifndef MAGICKCORE_HAVE_LCMS2_H
-#define MAGICKCORE_HAVE_LCMS2_H 1
-#endif
+/* #undef HAVE_LCMS2_H */
/* Define if you have the <lcms2/lcms2.h> header file. */
/* #undef HAVE_LCMS2_LCMS2_H */
/* Define if you have the <lcms.h> header file. */
-/* #undef HAVE_LCMS_H */
+#ifndef MAGICKCORE_HAVE_LCMS_H
+#define MAGICKCORE_HAVE_LCMS_H 1
+#endif
/* Define if you have the <lcms/lcms.h> header file. */
/* #undef HAVE_LCMS_LCMS_H */
#endif
/* Define if you have JBIG library */
-/* #undef JBIG_DELEGATE */
+#ifndef MAGICKCORE_JBIG_DELEGATE
+#define MAGICKCORE_JBIG_DELEGATE 1
+#endif
/* Define if you have JPEG version 2 "Jasper" library */
#ifndef MAGICKCORE_JP2_DELEGATE
#endif
/* Define if you have LQR library */
-/* #undef LQR_DELEGATE */
+#ifndef MAGICKCORE_LQR_DELEGATE
+#define MAGICKCORE_LQR_DELEGATE 1
+#endif
/* Define if using libltdl to support dynamically loadable modules */
#ifndef MAGICKCORE_LTDL_DELEGATE
/* Define to the system default library search path. */
#ifndef MAGICKCORE_LT_DLSEARCH_PATH
-#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/atlas:/usr/lib/llvm:/usr/lib64/llvm:/usr/lib64/mysql:/usr/lib64/qt-3.3/lib:/usr/lib64/tcl8.5/tclx8.4:/usr/lib64/tcl8.5:/usr/lib64/tracker-0.12:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-2"
+#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/R/lib:/usr/lib64/atlas:/opt/modules/pkg/intel/f77/10.0.025/lib:/opt/intel/lib/intel64:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mysql:/usr/lib64/nvidia:/usr/lib64/qt-3.3/lib:/usr/lib64/tracker-0.12:/usr/lib64/xulrunner-2"
#endif
/* The archive extension */
/* #undef NO_MINUS_C_MINUS_O */
/* Define if you have OPENEXR library */
-/* #undef OPENEXR_DELEGATE */
+#ifndef MAGICKCORE_OPENEXR_DELEGATE
+#define MAGICKCORE_OPENEXR_DELEGATE 1
+#endif
/* Name of package */
#ifndef MAGICKCORE_PACKAGE
#endif
/* Define if you have RSVG library */
-/* #undef RSVG_DELEGATE */
+#ifndef MAGICKCORE_RSVG_DELEGATE
+#define MAGICKCORE_RSVG_DELEGATE 1
+#endif
/* Define to the type of arg 1 for `select'. */
#ifndef MAGICKCORE_SELECT_TYPE_ARG1
#endif
/* Define if you have WEBP library */
-/* #undef WEBP_DELEGATE */
+#ifndef MAGICKCORE_WEBP_DELEGATE
+#define MAGICKCORE_WEBP_DELEGATE 1
+#endif
/* Define to use the Windows GDI32 library */
/* #undef WINGDI32_DELEGATE */
/* #undef WITH_DMALLOC */
/* Define if you have WMF library */
-/* #undef WMF_DELEGATE */
+#ifndef MAGICKCORE_WMF_DELEGATE
+#define MAGICKCORE_WMF_DELEGATE 1
+#endif
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
*/
#define MagickPackageName "ImageMagick"
#define MagickCopyright "Copyright (C) 1999-2011 ImageMagick Studio LLC"
-#define MagickSVNRevision "5659"
+#define MagickSVNRevision "exported"
#define MagickLibVersion 0x700
#define MagickLibVersionText "7.0.0"
#define MagickLibVersionNumber 7,0,0
#define MagickLibAddendum "-0"
#define MagickLibInterface 7
#define MagickLibMinInterface 7
-#define MagickReleaseDate "2011-10-15"
+#define MagickReleaseDate "2011-10-17"
#define MagickChangeDate "20110801"
#define MagickAuthoritativeURL "http://www.imagemagick.org"
#if defined(MAGICKCORE_OPENMP_SUPPORT)
default:
{
(void) FormatLocaleFile(stderr," red: %g (%g)\n",
- QuantumRange*channel_distortion[RedChannel],
- channel_distortion[RedChannel]);
+ QuantumRange*channel_distortion[RedPixelChannel],
+ channel_distortion[RedPixelChannel]);
(void) FormatLocaleFile(stderr," green: %g (%g)\n",
- QuantumRange*channel_distortion[GreenChannel],
- channel_distortion[GreenChannel]);
+ QuantumRange*channel_distortion[GreenPixelChannel],
+ channel_distortion[GreenPixelChannel]);
(void) FormatLocaleFile(stderr," blue: %g (%g)\n",
- QuantumRange*channel_distortion[BlueChannel],
- channel_distortion[BlueChannel]);
+ QuantumRange*channel_distortion[BluePixelChannel],
+ channel_distortion[BluePixelChannel]);
if (image->matte != MagickFalse)
(void) FormatLocaleFile(stderr," alpha: %g (%g)\n",
- QuantumRange*channel_distortion[AlphaChannel],
- channel_distortion[AlphaChannel]);
+ QuantumRange*channel_distortion[AlphaPixelChannel],
+ channel_distortion[AlphaPixelChannel]);
break;
}
case CMYKColorspace:
{
(void) FormatLocaleFile(stderr," cyan: %g (%g)\n",
- QuantumRange*channel_distortion[CyanChannel],
- channel_distortion[CyanChannel]);
+ QuantumRange*channel_distortion[CyanPixelChannel],
+ channel_distortion[CyanPixelChannel]);
(void) FormatLocaleFile(stderr," magenta: %g (%g)\n",
- QuantumRange*channel_distortion[MagentaChannel],
- channel_distortion[MagentaChannel]);
+ QuantumRange*channel_distortion[MagentaPixelChannel],
+ channel_distortion[MagentaPixelChannel]);
(void) FormatLocaleFile(stderr," yellow: %g (%g)\n",
- QuantumRange*channel_distortion[YellowChannel],
- channel_distortion[YellowChannel]);
+ QuantumRange*channel_distortion[YellowPixelChannel],
+ channel_distortion[YellowPixelChannel]);
(void) FormatLocaleFile(stderr," black: %g (%g)\n",
- QuantumRange*channel_distortion[BlackChannel],
- channel_distortion[BlackChannel]);
+ QuantumRange*channel_distortion[BlackPixelChannel],
+ channel_distortion[BlackPixelChannel]);
if (image->matte != MagickFalse)
(void) FormatLocaleFile(stderr," alpha: %g (%g)\n",
- QuantumRange*channel_distortion[AlphaChannel],
- channel_distortion[AlphaChannel]);
+ QuantumRange*channel_distortion[AlphaPixelChannel],
+ channel_distortion[AlphaPixelChannel]);
break;
}
case GRAYColorspace:
{
(void) FormatLocaleFile(stderr," gray: %g (%g)\n",
- QuantumRange*channel_distortion[GrayChannel],
- channel_distortion[GrayChannel]);
+ QuantumRange*channel_distortion[GrayPixelChannel],
+ channel_distortion[GrayPixelChannel]);
if (image->matte != MagickFalse)
(void) FormatLocaleFile(stderr," alpha: %g (%g)\n",
- QuantumRange*channel_distortion[AlphaChannel],
- channel_distortion[AlphaChannel]);
+ QuantumRange*channel_distortion[AlphaPixelChannel],
+ channel_distortion[AlphaPixelChannel]);
break;
}
}
(void) FormatLocaleFile(stderr," all: %g (%g)\n",
- QuantumRange*channel_distortion[CompositeChannels],
- channel_distortion[CompositeChannels]);
+ QuantumRange*channel_distortion[MaxPixelChannels],
+ channel_distortion[MaxPixelChannels]);
break;
}
case AbsoluteErrorMetric:
default:
{
(void) FormatLocaleFile(stderr," red: %g\n",
- channel_distortion[RedChannel]);
+ channel_distortion[RedPixelChannel]);
(void) FormatLocaleFile(stderr," green: %g\n",
- channel_distortion[GreenChannel]);
+ channel_distortion[GreenPixelChannel]);
(void) FormatLocaleFile(stderr," blue: %g\n",
- channel_distortion[BlueChannel]);
+ channel_distortion[BluePixelChannel]);
if (image->matte != MagickFalse)
(void) FormatLocaleFile(stderr," alpha: %g\n",
- channel_distortion[AlphaChannel]);
+ channel_distortion[AlphaPixelChannel]);
break;
}
case CMYKColorspace:
{
(void) FormatLocaleFile(stderr," cyan: %g\n",
- channel_distortion[CyanChannel]);
+ channel_distortion[CyanPixelChannel]);
(void) FormatLocaleFile(stderr," magenta: %g\n",
- channel_distortion[MagentaChannel]);
+ channel_distortion[MagentaPixelChannel]);
(void) FormatLocaleFile(stderr," yellow: %g\n",
- channel_distortion[YellowChannel]);
+ channel_distortion[YellowPixelChannel]);
(void) FormatLocaleFile(stderr," black: %g\n",
- channel_distortion[BlackChannel]);
+ channel_distortion[BlackPixelChannel]);
if (image->matte != MagickFalse)
(void) FormatLocaleFile(stderr," alpha: %g\n",
- channel_distortion[AlphaChannel]);
+ channel_distortion[AlphaPixelChannel]);
break;
}
case GRAYColorspace:
{
(void) FormatLocaleFile(stderr," gray: %g\n",
- channel_distortion[GrayChannel]);
+ channel_distortion[GrayPixelChannel]);
if (image->matte != MagickFalse)
(void) FormatLocaleFile(stderr," alpha: %g\n",
- channel_distortion[AlphaChannel]);
+ channel_distortion[AlphaPixelChannel]);
break;
}
}
(void) FormatLocaleFile(stderr," all: %g\n",
- channel_distortion[CompositeChannels]);
+ channel_distortion[MaxPixelChannels]);
break;
}
case MeanErrorPerPixelMetric:
{
(void) FormatLocaleFile(stderr," %g (%g, %g)\n",
- channel_distortion[CompositeChannels],
+ channel_distortion[MaxPixelChannels],
image->error.normalized_mean_error,
image->error.normalized_maximum_error);
break;
% example, like this:
%
% channel_features=MagickGetImageFeatures(wand,1);
-% contrast=channel_features[RedChannel].contrast[0];
+% contrast=channel_features[RedPixelChannel].contrast[0];
%
% Use MagickRelinquishMemory() to free the statistics buffer.
%
% You can access the red channel mean, for example, like this:
%
% channel_statistics=MagickGetImageStatistics(wand);
-% red_mean=channel_statistics[RedChannel].mean;
+% red_mean=channel_statistics[RedPixelChannel].mean;
%
% Use MagickRelinquishMemory() to free the statistics buffer.
%
%
% o wand: the magick wand.
%
-% o channel: Identify which channel to level: RedChannel, GreenChannel,
+% o channel: Identify which channel to level: RedPixelChannel,
+% GreenPixelChannel, etc.
%
% o black_point: the black point.
%