Image Similarity Recognition

A variety of methods to calculate the similarity of pictures.

Category:
Tags: , , , , , ,

Description

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

Please note: 

In UE5, you need to add plugin content in Additional Asset Directories to Cook in the project settings. Otherwise, it will crash when used after packaging. And when loading pictures, try to use PNG pictures, JPG still has problems that have not been solved.

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.

Change log : (2022/04)

Support 5.0 version

Technical Details

Code Modules:

Check out ywt20’s other products here : https://www.unrealengine.com/marketplace/en-US/profile/YWT20

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.

Supported Engine Versions

4.26 – 4.27, 5.0 – 5.3