Removing duplicate images - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: Other graphics software (https://www.gimp-forum.net/Forum-Other-graphics-software) +--- Thread: Removing duplicate images (/Thread-Removing-duplicate-images) |
Removing duplicate images - Zero01 - 06-25-2019 I have an issue with my camera (cheapo 4k camera), on any other setting it's fine but when videoing in 4k I find every few frames are repeated producing an annoying jittery effect. I used ffmpeg to convert the first 240 frames of a 15 minute video to see the problem in more detail, the images are definitely repeating every few images or so (although it's not at regular intervals, and not just one duplicate frame but 2 or 3 in a row at times) I tried ffmpeg on it's own [i.e. https://stackoverflow.com/questions/53964070/removing-duplicate-frames ], but the result wasn't what I expected at all. So it's difficult to deal with - to get rid of ALL duplicate frames in a 15 minute 30 fps video manually would be a non-starter.. so I looked into a Python solution - I installed dhash (via pip) which uses Pillow for parsing the images and it generates a "difference hash" for each image. I ran a test script and it seems to work how it should, each duplicate has the same hash value (see pic) [attachment=2961] Could anyone help me in finding a solution or any other way of sorting the hashes so that the duplicates are gone, and in there places are blank spaces so that I can edit a column next to them with the associated image file that will need deleting. Hopefully then I can reconstruct the file using ffmpeg. Alternatively is there any software out there that will do the same thing. Thanks RE: Removing duplicate images - rich2005 - 06-25-2019 Is the camera duplicating frames or is it dropping frames I wonder? (rhetorical question). 4K 30 frames or 60 frames interlaced? Whole thing is a PITA. (I lost interest after DVD ) Imagemagick has a facility for finding / comparing duplicate images, it might be worth asking the question there, although a search does bring up some similar old topics. example: https://www.imagemagick.org/discourse-server/viewtopic.php?t=23840 I also came across this https://raywoodcockslatest.wordpress.com/2018/04/25/editing-video-via-images/ and a reference to an application I never heard of before, VisiPics http://www.visipics.info and https://www.fosshub.com/VisiPics.html Seems to be a front end for IM Old so probably needs an equally old version of IM. Maybe worth a look. RE: Removing duplicate images - Zero01 - 06-25-2019 (06-25-2019, 07:36 PM)rich2005 Wrote: Is the camera duplicating frames or is it dropping frames I wonder? (rhetorical question). 4K 30 frames or 60 frames interlaced? Whole thing is a PITA. (I lost interest after DVD ) Yep total pain lol, thanks for the links, will check 'em out! EDIT: Works wonders! Thanks. RE: Removing duplicate images - akovia - 06-25-2019 (06-25-2019, 07:36 PM)rich2005 Wrote: I also came across this https://raywoodcockslatest.wordpress.com/2018/04/25/editing-video-via-images/ and a reference to an application I never heard of before, VisiPics http://www.visipics.info and https://www.fosshub.com/VisiPics.html Seems to be a front end for IM I used VisiPics years ago and it is a full featured image comparison tool. I had to run it via wine since I was on linux, but it is a good purpose built tool with tons of options. Since then I use the built in image comparison tool that come with XnViewMP. 1:1 matches are quick and easy to deal with and its fuzzy logic isn't bad either. It also happens to be my favorite swiss army knife of everything image related. Viewer, organizer, batch editor, dupe finder, quick editor, etc.. Might be worth a look too if you aren't married to an image viewer already. Otherwise it's still a quick and easy GUI solution for duplicates. RE: Removing duplicate images - Zero01 - 06-28-2019 (06-25-2019, 10:05 PM)akovia Wrote: I used VisiPics years ago and it is a full featured image comparison tool. I had to run it via wine since I was on linux, but it is a good purpose built tool with tons of options. Thanks. looks promising, VisiPics seems to work just fine also. |