Remove darker images from timelapse

12:05 pm Uncategorized

I had a project where I took a picture from a security camera every 15 minutes in order to build a timelapse. The project lasted almost a year so I didn’t have a good way to set the day/night schedule as the seasons changed. I ended up taking pictures every 15 minutes for the whole project.

In order to build the final project I needed to remove all the dark images. I certainly wasn’t going to go through the entire folder contents and erase a group of pictures per night. In comes the utility identify from ImageMagick. This utility gives you the mean of the image so we can find the darker images.

$pictures = gci -Filter *.jpg -Recurse | Select -ExpandProperty FullName

foreach ($i in $pictures) {
    $mean = identify.exe -quiet -format "%[mean]" "$i"
    if ($([int]$mean) -le 10000) {
        Remove-Item "$i" -Force

Leave a Comment

Your comment

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.