Hi,
I don't know how to solve my problem.. I have no idea of image manipulation.. sorry. Probably it' very easy for most of you!
Suppose that I have a photo camera that can take photos every 0.5 s, and I photograph a jump of a motorcycle. Suppose that the jump lasts 3 seconds, so I have 6 images. I would like to compose the 6 images and obtain a result like this:
http://www.showlinephoto.com/fencecheck ... e-jump.jpg
I don't know how to do it with imagemagick.. Any help would be highly appreciated!
Thanks,
Lego.
Composing multiple images
Re: Composing multiple images
Mc Afee did not like that site and the image is not there, only a 404 page.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Composing multiple images
I don't know how well this will work, but if your camera has not moved so that the ground is not different in each image, then you could try,
convert image1 image2 image3 image4 image5 image6 -evaluate sequence mean result.
see http://www.imagemagick.org/script/comma ... e-sequence
however that will mix each motorcycle with the sky and so look a bit faded. you might have to increase the contrast (-brightness-contrast function)
The best way would be to make a mask (say white) where the motorcycle are located (manually draw around them in some other program like GIMP) with the rest black and then use the masks with convert image 1 image2 mask2 -compose over -composite image3 mask3 -compose over -composite etc result.
see
http://www.imagemagick.org/Usage/compose/#compose
http://www.imagemagick.org/Usage/layers/#convert
convert image1 image2 image3 image4 image5 image6 -evaluate sequence mean result.
see http://www.imagemagick.org/script/comma ... e-sequence
however that will mix each motorcycle with the sky and so look a bit faded. you might have to increase the contrast (-brightness-contrast function)
The best way would be to make a mask (say white) where the motorcycle are located (manually draw around them in some other program like GIMP) with the rest black and then use the masks with convert image 1 image2 mask2 -compose over -composite image3 mask3 -compose over -composite etc result.
see
http://www.imagemagick.org/Usage/compose/#compose
http://www.imagemagick.org/Usage/layers/#convert
Re: Composing multiple images
I have just remember that Anthony had a background removal example: http://www.imagemagick.org/Usage/compose/#changemask
If you had a photo of the background only you could use that? May take some time to process a photo though.
If you had a photo of the background only you could use that? May take some time to process a photo though.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Composing multiple images
See Photo Handling Double Exposures...
http://www.imagemagick.org/Usage/photos/#double
Basically you either 'average' the images to get 'ghosts', whcih enhances the background the more images you have.
Or you work out various masks to select the component from each image. Typically you again create an average background, then use that to work out the masks for each frame.
http://www.imagemagick.org/Usage/photos/#double
Basically you either 'average' the images to get 'ghosts', whcih enhances the background the more images you have.
Or you work out various masks to select the component from each image. Typically you again create an average background, then use that to work out the masks for each frame.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Composing multiple images
If all of the motorcycle and rider were darker than the sky, then you could use
convert image1 image2 image3 image4 image5 image6 -evaluate sequence min result
But unfortunately, the sun is reflecting on the rider making part of him or the cycle brighter than the sky.
convert image1 image2 image3 image4 image5 image6 -evaluate sequence min result
But unfortunately, the sun is reflecting on the rider making part of him or the cycle brighter than the sky.
Re: Composing multiple images
Thank you!!!
Well I didn't had motorcycle photos, this was just an example in order to express my problem.
I tried with
but the images looked faded, but with
the result is just what I wanted!!
Thank you very much!!
Well I didn't had motorcycle photos, this was just an example in order to express my problem.
I tried with
Code: Select all
convert img1 img2 img3 img4 ... -evaluate-sequence mean img-final
Code: Select all
convert img1 img2 img3 img4 ... -evaluate-sequence min img-final
Thank you very much!!
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Composing multiple images
It is as I said, averaging (mean) will generate a strong background with the moving foreground appearing as 'ghosts'. It is generally used as just one step in a larger process.lego wrote:I tried withbut the images looked fadedCode: Select all
convert img1 img2 img3 img4 ... -evaluate-sequence mean img-final
The key to getting a perfect layering of all foreground objects, is the generating masks of the the individual objects.
The use of 'min' will work fine but only if the foreground object is completely darker than the background, but it is a step. Be warned however that it could pick one channel value from one image, and another value from the other image. Much like the composition method Lighten and Darken.
http://www.imagemagick.org/Usage/compose/#lighten
The boolean (comparision) composition methods such as ChangeMask, Lighten-Intensity and Darken-Intensity, etc can also help in generating either the final image, or just the masks.
http://www.imagemagick.org/Usage/compos ... _intensity
http://www.imagemagick.org/Usage/compose/#changemask
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Composing multiple images
Thanks for that information, for the moment I will use the min method, when I have some time I will take a look at those other methods.
Thank you!
Thank you!