The "Meet the GiMP!" ForumGIMP, Image Processing (DIP) and PhotographyImage Processing SoftwareHow to do?Superimposing 2 images using Gimp
Pages: [1] 2   Go Down
Print
Author Topic: Superimposing 2 images using Gimp  (Read 3259 times)
aa2105
Just in
*
Posts: 6


View Profile
« on: May 02, 2009, 10:33:11 am »

Hi
I need to superimpose 2 (or more) images in Gimp which have been taken from the exact same spot but with a slight difference in the object im interested in. how can i do this on gimp?

here is some more detail: i am taking pictures of a wing tip (looking at it end-on) and as the speed in the wind tunnel increases the wing deflects upwards. i need a way to superimpose the picture at zero speed and at some higher speed. the camera remains fixed so the only thing that changes is the position of the wing. how do i overlay the 2 pics? so i will be able to compare wing position at speed zero and speed 'u'.

also, if possible, is there a way to measure the distance between the original wing tip position and the new one in gimp? or will i have to use another software like getdata?

thanks in advance.
Logged

rayadagio
Script Magican in Residence
Lives here ;-)
***
Posts: 362



View Profile WWW
« Reply #1 on: May 02, 2009, 11:24:08 am »

Perhaps this episode could help:
http://meetthegimp.org/episode-059-motion-captured-in-colours/
Logged

Please feel free to correct my unique usage of the English language! ;-)

www.rayadagio.de

rayadagio
Script Magican in Residence
Lives here ;-)
***
Posts: 362



View Profile WWW
« Reply #2 on: May 02, 2009, 11:35:13 am »

Sorry, I forgot to mention: To measure distances you can use the Gimp measure tool (compass icon).
Logged

Please feel free to correct my unique usage of the English language! ;-)

www.rayadagio.de

Rolf
Administrator
Sr. Member
***
Posts: 1319


View Profile
« Reply #3 on: May 02, 2009, 02:47:26 pm »

Cool question!

Do you have a sample image? Then I'll take it into the video. I love hands on problems.

There are a lot of ways to do this, making the top layer half transparent or playing with the layer modes. A high contrast mark on the wig tip, like these crosses used in crash tests, would be a great advantage.

For measuring it is possible to put a grid over the image which (of course) has to be calibrated beforehand. Just put a ruler at the place of the wing tip.

The camera position and lens settings must be exactly the same the same in all shots.

(I have removed the second osting of this question.)
« Last Edit: May 02, 2009, 02:49:04 pm by Rolf » Logged

aa2105
Just in
*
Posts: 6


View Profile
« Reply #4 on: May 03, 2009, 12:11:03 pm »

i've attached 3 images with this post, which are in sequential order. the first one (IMG_0001.JPG) is with no wind and is therefore the base image. the remaining 2 are the ones i need to superimpose.

these pics dont have crosshairs on them but i have plans to put some on at the ends of the wing tip. also i will draw a line to mark the midpoint of the thickness (known as the 'chord' line) which should make it easier.

you mentioned putting a ruler over the wing tip - i can only do that for the base case when there is no velocity but i guess that is sufficient. once the wind tunnel is running any object will disrupt the air flow!

could you kindly let me know how to achieve this and measuring the distance? i'm very very new to all of this - in fact the only graphical software i have experience of is MS Paint!! lastly, if there are several ways of doing this then the fastest and easiest way would be preferred as i will have many photos to analyse. thank you very much for you help and advice.


* IMG_0001.JPG (1147.32 KB, 2160x1440 - viewed 140 times.)

* IMG_0002.JPG (1144.66 KB, 2160x1440 - viewed 112 times.)

* IMG_0003.JPG (1149.86 KB, 2160x1440 - viewed 113 times.)
Logged

aa2105
Just in
*
Posts: 6


View Profile
« Reply #5 on: May 03, 2009, 12:28:09 pm »

forgot to mention: i think its best to take pictures with the wing tip and camera at exactly the same height level which is what i'll try to do when taking the final snaps. as when the wing bends a lot the measure distance will become inaccurate.

and if its of any relevance the width (or chord) of the wing is 160mm and the maximum thickness is around 20mm. these can be used to get a pixel to mm conversion factor by comparing the pixel measured from the 'measure' tool. but i just wanted to confirm: using this method, am i right in saying that i will not need to account for the distance of the wing from the camera (i think its called paralax...). not very good with photography related issues...

thanks.
Logged

Rolf
Administrator
Sr. Member
***
Posts: 1319


View Profile
« Reply #6 on: May 03, 2009, 03:30:40 pm »

How do you like this one?

Click on it for animation. One unit in the ruler about 2mm - guesstimated from the wing thickness and rounded for convenience. ;-)

How to in #100 on Tuesday.



* windtunnel.gif (312.38 KB, 467x465 - viewed 175 times.)
« Last Edit: May 03, 2009, 03:34:12 pm by Rolf » Logged

aa2105
Just in
*
Posts: 6


View Profile
« Reply #7 on: May 03, 2009, 06:49:08 pm »

great job Rolf! looks very good - could use something like that for my presentation. are there any tutorials on stuff like this i can read in the meantime as i'm very short on time with my project and need to get this method worked out. once thanks for the help.
Logged

Rolf
Administrator
Sr. Member
***
Posts: 1319


View Profile
« Reply #8 on: May 03, 2009, 08:47:46 pm »

On the last moment, as any scientific work. ;-) I'll send you a link to the unedited video later. Not for sharing with anyone, too embarrassing. ;-)

Do you want the animation too? That's not in the video but easy to do.

When is presentation day?
Logged

aa2105
Just in
*
Posts: 6


View Profile
« Reply #9 on: May 03, 2009, 09:50:03 pm »

the video is not critical for the analysis but could be a nice addition. the presentation is a couple of weeks away but i only have this week for testing for which i need to know how to manupilate the pictures to get the required results - hence the hurry!

i've tried playing around with gimp - using the opacity option but it becomes difficult to distinguish the wings.

the link would be great and if possible also a basic outline of what needs to be done to get the images together (with good clarity) would be much appreciated. thanks Rolf - you've great help.
Logged

mramshaw
Lives here ;-)
***
Posts: 288


View Profile
« Reply #10 on: May 04, 2009, 06:45:09 pm »

I hope you will give credit to all who have helped you when you make your presentation.

Reaching out to experts for help and advice will impress people; stealing their work and
trying to pass it off as your own will probably NOT impress anyone. There will also be a
question period where anything you don't understand in depth will probably be exposed.

and if its of any relevance the width (or chord) of the wing is 160mm and the maximum thickness is around 20mm. these can be used to get a pixel to mm conversion factor by comparing the pixel measured from the 'measure' tool. but i just wanted to confirm: using this method, am i right in saying that i will not need to account for the distance of the wing from the camera (i think its called paralax...).

You will need to account for the distance of both the wingtip and the camera from the centre
or rotation; as the wingtip deforms from 90 degrees it will get further from the camera. This
is called Physics by the way, and doesn't have anything to do with photography.

not very good with photography related issues...

Parallax (still Physics but at least now photography related) would be related to the deflection
of the light as it travels through the viewport in the wind tunnel. I think you can get away with
ignoring the parallax in the camera itself, but you should at least find out what material the
viewport window is composed of, as well as an estimate of how thick it is, and make a stab at
estimating how parallax would affect the visible deformation of the wingtip.

As someone pointed out to me recently, Wikipedia is your friend. Start with 'parallax' then try
'tempered glass' and 'perspex'.
Logged

monoceros84
Administrator
Sr. Member
***
Posts: 1447



View Profile WWW
« Reply #11 on: May 04, 2009, 10:40:59 pm »

This cries for a script since you will have many images to analyse. I think about something like:
  • mark tip of the wing manually
  • script will know mm per pixel
  • output of a picture containing an overlayed image of all layers so you will see the movement and maybe a scale and some text with measurements
Logged

Cheers,
Mathias

Visit this site about my photography, my experiences in Norway and my blog:
http://www.gedankenquirl.de (German language)

Rolf
Administrator
Sr. Member
***
Posts: 1319


View Profile
« Reply #12 on: May 05, 2009, 10:13:40 pm »

Some thoughts for your further work:

# A ruler is not really necessary - just make a sign of defined size at the wing tip. Like a adhesive dot or so. Then you can check the size in each shot.

# Either zoom in more, take another lens or go nearer to the wing. Your image is quite empty and you only have 5 pixels per mm. If you shoot in portrait orientation you should be able to get at least 20 pixel/mm - much higher precision. What precision do you need?

# If you want to show two wings in one shot, set the top one to "difference mode". You can see that effect while I aligned your images.

# You can move the layer with the ruler around and even pull it into another image.

Feel free to ask if you need more input.
Logged

paynekj
Master of the TOC
Lives here ;-)
***
Posts: 181



View Profile WWW
« Reply #13 on: May 06, 2009, 09:21:36 am »

Interesting to see you are also considering an alternative method of doing this using LabVIEW:

http://forums.lavag.org/index.php?s=&showtopic=4802&view=findpost&p=62172
Logged

Kevin

aa2105
Just in
*
Posts: 6


View Profile
« Reply #14 on: May 06, 2009, 12:06:08 pm »

hi all
thanks for your input. don't i will acknowledge the work done by others.

i'll try out what you have suggested and get back to you, should i need more help. i have drawn a chord line and 2 cross hairs to the wing tip - whcih can now be used to more accurately determine the distance and also the angle of the wing tip (using the measure tool). i've attached a pic. thanks.


* IMG_0010.JPG (1128.21 KB, 2160x1440 - viewed 119 times.)
Logged

Pages: [1] 2   Go Up
Print
Jump to: