compare.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. Copyright 1999 ImageMagick Studio LLC, a non-profit organization
  3. dedicated to making software imaging solutions freely available.
  4. You may not use this file except in compliance with the License. You may
  5. obtain a copy of the License at
  6. https://imagemagick.org/script/license.php
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. MagickCore image compare methods.
  13. */
  14. #ifndef MAGICKCORE_COMPARE_H
  15. #define MAGICKCORE_COMPARE_H
  16. #include "magick/image.h"
  17. #if defined(__cplusplus) || defined(c_plusplus)
  18. extern "C" {
  19. #endif
  20. typedef enum
  21. {
  22. UndefinedMetric,
  23. AbsoluteErrorMetric,
  24. MeanAbsoluteErrorMetric,
  25. MeanErrorPerPixelMetric,
  26. MeanSquaredErrorMetric,
  27. PeakAbsoluteErrorMetric,
  28. PeakSignalToNoiseRatioMetric,
  29. RootMeanSquaredErrorMetric,
  30. NormalizedCrossCorrelationErrorMetric,
  31. FuzzErrorMetric,
  32. UndefinedErrorMetric = 0,
  33. PerceptualHashErrorMetric = 0xff
  34. } MetricType;
  35. extern MagickExport double
  36. *GetImageChannelDistortions(Image *,const Image *,const MetricType,
  37. ExceptionInfo *);
  38. extern MagickExport Image
  39. *CompareImageChannels(Image *,const Image *,const ChannelType,
  40. const MetricType,double *,ExceptionInfo *),
  41. *CompareImages(Image *,const Image *,const MetricType,double *,
  42. ExceptionInfo *),
  43. *SimilarityImage(Image *,const Image *,RectangleInfo *,double *,
  44. ExceptionInfo *),
  45. *SimilarityMetricImage(Image *,const Image *,const MetricType,
  46. RectangleInfo *,double *,ExceptionInfo *);
  47. extern MagickExport MagickBooleanType
  48. GetImageChannelDistortion(Image *,const Image *,const ChannelType,
  49. const MetricType,double *,ExceptionInfo *),
  50. GetImageDistortion(Image *,const Image *,const MetricType,double *,
  51. ExceptionInfo *),
  52. IsImagesEqual(Image *,const Image *);
  53. #if defined(__cplusplus) || defined(c_plusplus)
  54. }
  55. #endif
  56. #endif