time lapse picture
time lapse picture
Hi,
I'm new to this forum, but I would like to know how I can use image magick to improve an sequence of images taken at night with a time lapse camera (Rasberry PI) so I can improve the overall quality of the video.
Thanks for your help.
Lionel
I'm new to this forum, but I would like to know how I can use image magick to improve an sequence of images taken at night with a time lapse camera (Rasberry PI) so I can improve the overall quality of the video.
Thanks for your help.
Lionel
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: time lapse picture
What don't you like about the quality? What do you want to improve? Adjusting levels or colour balance are two common needs. If you put up a sample image to somewhere like dropbox.com we can be more specific.
With images for a video, we generally want to adjust all the frames in the same way, so some features like "-auto-level" don't work well, but there are workarounds.
With images for a video, we generally want to adjust all the frames in the same way, so some features like "-auto-level" don't work well, but there are workarounds.
snibgo's IM pages: im.snibgo.com
Re: time lapse picture
Here is the context:
I'm taking many pictures (with different shutter speed) every 5 min
at night I use a shutter speed of 5 sec and here are two sample picture:
note that I would like to process them with convert version
graphickmagick 1.3.21 2015-02-08 Q16
I'm taking many pictures (with different shutter speed) every 5 min
at night I use a shutter speed of 5 sec and here are two sample picture:
note that I would like to process them with convert version
graphickmagick 1.3.21 2015-02-08 Q16
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: time lapse picture
It says:
Code: Select all
You need permission
Want in? Ask the owner for access, or switch to an account with permission.
snibgo's IM pages: im.snibgo.com
Re: time lapse picture
Sorry I changed it.
Re: time lapse picture
Here are my two samples
https://drive.google.com/open?id=0B0u3v ... HYtM2kzM2s
https://drive.google.com/open?id=0B0u3v ... UZaWVRSU2c
I don't see the -auto-level as an option in convert or mogrify, but I need to normalize (I guess) the level from picture 50 to 120 for example. It this feasible ?
https://drive.google.com/open?id=0B0u3v ... HYtM2kzM2s
https://drive.google.com/open?id=0B0u3v ... UZaWVRSU2c
I don't see the -auto-level as an option in convert or mogrify, but I need to normalize (I guess) the level from picture 50 to 120 for example. It this feasible ?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: time lapse picture
This is an Imagemagick forum. Graphicsmagick is not the same as Imagemagick. The Imagemagick developers do not maintain GraphicsMagick.note that I would like to process them with convert version
graphickmagick 1.3.21 2015-02-08 Q16
They started out the same, but split off a long time ago and Graphicsmagick has not kept up with the improvements in Imagemagick. So it is likely they do not have -auto-level.
Re: time lapse picture
Sorry I'm not too familiar with Imagemagick, How do I check the version from bash in UbuntuStudio 15.04, since I have both installed ?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: time lapse picture
Code: Select all
convert -version
Code: Select all
fullpath2/convert -version
Re: time lapse picture
Thanks, I updated my version and now I'm at the proper level.
Version: ImageMagick 6.8.9-9 Q16 i686 2015-01-06 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib
It seems to work well on multiple pictures.
But is there a way to average the level for multiple consecutive picture which are not all at the same exposure ?
Thanks for your help.
Version: ImageMagick 6.8.9-9 Q16 i686 2015-01-06 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib
It seems to work well on multiple pictures.
But is there a way to average the level for multiple consecutive picture which are not all at the same exposure ?
Thanks for your help.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: time lapse picture
Use the mean and standard deviation from the image statistics to match all the images to one common image statistics. See snibgo's page at http://im.snibgo.com/gainbias.htm for the math and examples. You could also get the average of the mean and std from all the images and match each image to that set of statistics
I also have a histmatch script for unix at my link below. It attempts to match the histograms. But I suspect the mean and std technique might be the quickest and safest.
I also have a histmatch script for unix at my link below. It attempts to match the histograms. But I suspect the mean and std technique might be the quickest and safest.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: time lapse picture
There are many possible ways of improving the images, depending on what you want or like. For example, converting to HCL and applying a gamma to lightness works well. While in HCL space, increasing Chroma a little also looks good:
You can use "-gamma X" to change all images to have the same mean, where X is a number:
X = log(old_mean)/log(new_mean)
Code: Select all
convert 00090.jpg -colorspace HCL -channel B -gamma 2.6 -channel G -gamma 1.25 +channel -colorspace sRGB out.png
X = log(old_mean)/log(new_mean)
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: time lapse picture
-auto-gamma does just that for a desired mean of 50%snibgo wrote:
You can use "-gamma X" to change all images to have the same mean, where X is a number:
X = log(old_mean)/log(new_mean)
I wish there was a -define to set the desired mean. But Anthony did not want to add that originally.
My script autogamma allows an arbitrary desired mean.
Re: time lapse picture
I tried both options above and they degrade the original picture. Part of it is better and part of it is degraded.
I tried a few options (auto-level, equalize, auto-gamma, normalize) but none of them is perfect because I work under different light scenarios.
Here is the original captured time-lapse video after ffmpeg put it together, I recorded for 3 days, 24hours, every 3 mins:
https://drive.google.com/file/d/0B0u3vN ... sp=sharing
the normalize gave the best result.
Thanks for your help.
Lionel
I tried a few options (auto-level, equalize, auto-gamma, normalize) but none of them is perfect because I work under different light scenarios.
Here is the original captured time-lapse video after ffmpeg put it together, I recorded for 3 days, 24hours, every 3 mins:
https://drive.google.com/file/d/0B0u3vN ... sp=sharing
the normalize gave the best result.
Thanks for your help.
Lionel