Image Similarity Recognition

YWT20 - Apr 5, 2021
Not Yet Rated

A variety of methods to calculate the similarity of pictures.

  • Supported Platforms
  • Supported Engine Versions
  • Download Type
    Engine Plugin
    This product contains a code plugin, complete with pre-built binaries and all its source code that integrates with Unreal Engine, which can be installed to an engine version of your choice then enabled on a per-project basis.

My other plug-in "Similarity Recognition" is mainly for objects such as shapes and symbols.

Several recognition functions are implemented in this plug-in based on OpenCV:

 PHA (perceptual hash algorithm). Its function is to generate a "fingerprint" string for each image, and then compare the fingerprints of different images. The closer the results, the more similar the images.

 PSNR (Peak Signal to Noise Ratio). It is a full reference image quality evaluation index. The most common and widely used image objective evaluation index, but it is based on the error between corresponding pixels, that is, based on error-sensitive image quality evaluation. Since the visual characteristics of the human eye are not considered (the human eye is more sensitive to the contrast difference with lower spatial frequency, the human eye is more sensitive to the brightness contrast difference than the chromaticity, and the human eye's perception of an area will be affected. The impact of its surrounding neighboring areas, etc.), so the evaluation results often appear inconsistent with people's subjective feelings.

 SSIM (structural similarity). It is a structural similarity and a full-reference image quality evaluation index. It measures image similarity from three aspects: brightness, contrast, and structure.

Technical Details


  •  RecognitionP_PHA、RecognitionT_PHA ----Perceptual hash algorithm function, the parameters are the image disk path and Txture2D.
  •  RecognitionP_PSNR、RecognitionT_PSNR----Peak Signal to Noise Ratio function, the parameters are the image disk path and Txture2D.
  •  RecognitionP_MSSIM、RecognitionT_MSSIM----Structural similarity function, the parameters are the image disk path and Txture2D.
  • LoadFileToTexture2D----Read the file from the disk to Texture2D.
  • SaveTexture2DToFile----Save Texture2D to disk file.

Code Modules:

  •  ImageSimilarityRecognition [Runtime]

Check out ywt20's other products here :

Number of Blueprints: 1

Number of C++ Classes: 2

Network Replicated: (No)

Supported Development Platforms: (“Windows”)

Supported Target Build Platforms: ("Win64", "Win32")

Documentation: Link

Example Project: Link

Important/Additional Notes:Please note that if you want to use the Texture2D file included in the project, we need to set the value of CompressionSettings to UserInterface2D and the value of MipGenSettings to NoMipmaps. If it is a picture file loaded from a disk, there is no problem.