diff --git a/Magick++/lib/Magick++/Statistic.h b/Magick++/lib/Magick++/Statistic.h
index 5a18121..be3eacf 100644
--- a/Magick++/lib/Magick++/Statistic.h
+++ b/Magick++/lib/Magick++/Statistic.h
@@ -298,4 +298,4 @@
};
}
-#endif // Magick_ChannelMoments_header
\ No newline at end of file
+#endif // Magick_ChannelMoments_header
diff --git a/Magick++/lib/Statistic.cpp b/Magick++/lib/Statistic.cpp
index f19f6c8..97f6c3e 100644
--- a/Magick++/lib/Statistic.cpp
+++ b/Magick++/lib/Statistic.cpp
@@ -113,7 +113,7 @@
i;
for (i=0; i<8; i++)
- _huInvariants.push_back(channelMoments_->I[i]);
+ _huInvariants.push_back(channelMoments_->invariant[i]);
}
Magick::ChannelPerceptualHash::ChannelPerceptualHash(void)
@@ -647,4 +647,4 @@
channel_statistics);
}
ThrowPPException;
-}
\ No newline at end of file
+}
diff --git a/MagickCore/identify.c b/MagickCore/identify.c
index 34a8b8c..96a5c95 100644
--- a/MagickCore/identify.c
+++ b/MagickCore/identify.c
@@ -378,8 +378,8 @@
channel_moments[channel].ellipse_intensity);
for (i=0; i < MaximumNumberOfImageMoments; i++)
n+=FormatLocaleFile(file," I%.20g: %.*g (%.*g)\n",i+1.0,
- GetMagickPrecision(),channel_moments[channel].I[i]/pow(scale,powers[i]),
- GetMagickPrecision(),channel_moments[channel].I[i]);
+ GetMagickPrecision(),channel_moments[channel].invariant[i]/pow(scale,
+ powers[i]),GetMagickPrecision(),channel_moments[channel].invariant[i]);
return(n);
}
diff --git a/MagickCore/statistic.c b/MagickCore/statistic.c
index 776624c..003fef0 100644
--- a/MagickCore/statistic.c
+++ b/MagickCore/statistic.c
@@ -1635,35 +1635,35 @@
/*
Compute Hu invariant moments.
*/
- channel_moments[channel].I[0]=M20[channel]+M02[channel];
- channel_moments[channel].I[1]=(M20[channel]-M02[channel])*
+ channel_moments[channel].invariant[0]=M20[channel]+M02[channel];
+ channel_moments[channel].invariant[1]=(M20[channel]-M02[channel])*
(M20[channel]-M02[channel])+4.0*M11[channel]*M11[channel];
- channel_moments[channel].I[2]=(M30[channel]-3.0*M12[channel])*
+ channel_moments[channel].invariant[2]=(M30[channel]-3.0*M12[channel])*
(M30[channel]-3.0*M12[channel])+(3.0*M21[channel]-M03[channel])*
(3.0*M21[channel]-M03[channel]);
- channel_moments[channel].I[3]=(M30[channel]+M12[channel])*
+ channel_moments[channel].invariant[3]=(M30[channel]+M12[channel])*
(M30[channel]+M12[channel])+(M21[channel]+M03[channel])*
(M21[channel]+M03[channel]);
- channel_moments[channel].I[4]=(M30[channel]-3.0*M12[channel])*
+ channel_moments[channel].invariant[4]=(M30[channel]-3.0*M12[channel])*
(M30[channel]+M12[channel])*((M30[channel]+M12[channel])*
(M30[channel]+M12[channel])-3.0*(M21[channel]+M03[channel])*
(M21[channel]+M03[channel]))+(3.0*M21[channel]-M03[channel])*
(M21[channel]+M03[channel])*(3.0*(M30[channel]+M12[channel])*
(M30[channel]+M12[channel])-(M21[channel]+M03[channel])*
(M21[channel]+M03[channel]));
- channel_moments[channel].I[5]=(M20[channel]-M02[channel])*
+ channel_moments[channel].invariant[5]=(M20[channel]-M02[channel])*
((M30[channel]+M12[channel])*(M30[channel]+M12[channel])-
(M21[channel]+M03[channel])*(M21[channel]+M03[channel]))+
4.0*M11[channel]*(M30[channel]+M12[channel])*(M21[channel]+M03[channel]);
- channel_moments[channel].I[6]=(3.0*M21[channel]-M03[channel])*
+ channel_moments[channel].invariant[6]=(3.0*M21[channel]-M03[channel])*
(M30[channel]+M12[channel])*((M30[channel]+M12[channel])*
(M30[channel]+M12[channel])-3.0*(M21[channel]+M03[channel])*
(M21[channel]+M03[channel]))-(M30[channel]-3*M12[channel])*
(M21[channel]+M03[channel])*(3.0*(M30[channel]+M12[channel])*
(M30[channel]+M12[channel])-(M21[channel]+M03[channel])*
(M21[channel]+M03[channel]));
- channel_moments[channel].I[7]=M11[channel]*((M30[channel]+M12[channel])*
- (M30[channel]+M12[channel])-(M03[channel]+M21[channel])*
+ channel_moments[channel].invariant[7]=M11[channel]*((M30[channel]+
+ M12[channel])*(M30[channel]+M12[channel])-(M03[channel]+M21[channel])*
(M03[channel]+M21[channel]))-(M20[channel]-M02[channel])*
(M30[channel]+M12[channel])*(M03[channel]+M21[channel]);
}
@@ -1750,7 +1750,7 @@
for (channel=0; channel <= MaxPixelChannels; channel++)
for (i=0; i < MaximumNumberOfImageMoments; i++)
perceptual_hash[channel].srgb_hu_phash[i]=
- (-MagickLog10(moments[channel].I[i]));
+ (-MagickLog10(moments[channel].invariant[i]));
moments=(ChannelMoments *) RelinquishMagickMemory(moments);
/*
Blur then transform to HCLp colorspace.
@@ -1781,7 +1781,7 @@
for (channel=0; channel <= MaxPixelChannels; channel++)
for (i=0; i < MaximumNumberOfImageMoments; i++)
perceptual_hash[channel].hclp_hu_phash[i]=
- (-MagickLog10(moments[channel].I[i]));
+ (-MagickLog10(moments[channel].invariant[i]));
moments=(ChannelMoments *) RelinquishMagickMemory(moments);
return(perceptual_hash);
}
diff --git a/MagickCore/statistic.h b/MagickCore/statistic.h
index 6017bf7..2c23604 100644
--- a/MagickCore/statistic.h
+++ b/MagickCore/statistic.h
@@ -47,7 +47,7 @@
typedef struct _ChannelMoments
{
double
- I[MaximumNumberOfImageMoments+1];
+ invariant[MaximumNumberOfImageMoments+1];
PointInfo
centroid,
diff --git a/coders/json.c b/coders/json.c
index 541c0c7..7984205 100644
--- a/coders/json.c
+++ b/coders/json.c
@@ -414,7 +414,7 @@
GetMagickPrecision(),channel_moments[channel].ellipse_intensity);
for (i=0; i < 8; i++)
n+=FormatLocaleFile(file," I%.20g: %.*g\n",i+1.0,GetMagickPrecision(),
- channel_moments[channel].I[i]);
+ channel_moments[channel].invariant[i]);
return(n);
}