Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Removing duplicate images
#1
Big Grin 
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/5396...ate-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)

   

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
Reply
#2
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 Wink )

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-se...hp?t=23840

I also came across this https://raywoodcockslatest.wordpress.com...ia-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.
Reply
#3
(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 Wink )

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-se...hp?t=23840

I also came across this  https://raywoodcockslatest.wordpress.com...ia-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.

Yep total pain lol, thanks for the links, will check 'em out!

EDIT: Works wonders! Thanks.
Reply
#4
(06-25-2019, 07:36 PM)rich2005 Wrote: I also came across this  https://raywoodcockslatest.wordpress.com...ia-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.

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.
Reply
#5
(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. 

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.

Thanks. looks promising, VisiPics seems to work just fine also.
Reply


Forum Jump: