deleting duplicates in an image list
Posted: 2014-07-06T09:11:08-07:00
I have a list with downscaled black-and-white images ($mask_segment_list_dual) generated by an image processing pipeline and I want to delete duplicates in the list. In the command line tools I found that delivers 0 if the two images are the same http://www.imagemagick.org/Usage/compare/#statistics. This is working fine when the images are on Harddisk. I have experimented in PerlMagick with lines like but I could not get it right. How can I compare for example the first two images in the list and got a comparison value in a Perl variable?
Or even better has someone an efficient general solution for deleting duplicates in an image list (preserving of positions in the list is not necessary)? Thanks!!
Code: Select all
compare -metric AE (or MAE) image1.png image2.png null: 2>&1
Code: Select all
$mask_segment_list_dual->[0]->Compare(image=>$mask_segment_list_dual->[1], metric=>'AE')
Or even better has someone an efficient general solution for deleting duplicates in an image list (preserving of positions in the list is not necessary)? Thanks!!