Forrest logo
back to the compare tool

compare:tldr:9f9de

compare: Compare 2 images using a custom metric.
$ compare -verbose -metric ${PSNR} ${image1-png} ${image2-png} ${diff-png}
try on your machine

The command you provided is comparing two PNG images using the "compare" command with the following options and arguments:

-verbose: This option is used to display detailed information about the comparison process. It provides a more extensive output, including additional metrics and statistics.

-metric ${PSNR}: This option specifies the metric to be used for the comparison. In this case, ${PSNR} represents the Peak Signal-to-Noise Ratio, which is a commonly used metric to measure the quality of an image by comparing it to a reference image.

${image1-png} and ${image2-png}: These are placeholders for the paths or filenames of the two PNG images you want to compare. Replace them with the actual paths or filenames of your images.

${diff-png}: This is the placeholder for the output file that will be generated by the comparison process. It represents the path or filename of the resulting difference image, which highlights the discrepancies between the two input images.

So, when you execute this command with appropriate values, it will compare the two PNG images using the Peak Signal-to-Noise Ratio (PSNR) metric and generate a difference image (${diff-png}) that indicates the dissimilarities between the two input images. The -verbose option ensures that detailed information about the comparison process will be displayed.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the compare tool