#author("2022-04-22T04:54:48+00:00","default:src128","src128") &tag(Phashion); *目次 [#pe971efc] #contents *関連ページ [#od3cc9e0] *参考情報 [#r1e83e93] -[[westonplatter/phashion: Ruby wrapper around pHash, the perceptual hash library for detecting duplicate multimedia files:https://github.com/westonplatter/phashion]]…関連情報 *使用方法 [#b516234c] **同一画像かどうか判定 [#g9949648] -画像が同一かどうかを判定 #pre{{ require 'phashion' img1 = Phashion::Image.new(filename1) img2 = Phashion::Image.new(filename2) img1.duplicate?(img2) # --> true }} -二つの画像のハミング距離を測定 #pre{{ require 'phashion' img1 = Phashion::Image.new(filename1) img2 = Phashion::Image.new(filename2) img1.distance_from(img2) }} -複数の画像を比較する場合、数値が低い方が類似度が高い。