PDA

View Full Version : SOLVED Propping up my floors


Nick Temple-Fry
7th October 2009, 02:36 PM
OK - my brain works quite slowly, I originally posted this problem as http://e-group.uk.net/forum/showthread.php?t=6593 - My Floors Sag.

I think I've now got a method which works quite well (though I've been looking at these pictures for so long my judgement may well be awry).

The problem is that perspective correction works on a matrix which has its centre at the exact middle of the image. This is where the software imagines the vanishing point to be. Unfortunately if you shoot from an angle the vanishing point is displaced to one side ( and up/down if you are not level). It is about this point that transformation matrix should work.

So take this image (hdr lens corrected through PT lens - but otherwise as shot)

http://e-group.uk.net/gallery/data/500/Fred_0.jpg (http://e-group.uk.net/gallery/showphoto.php/photo/18303)

Now make a second layer and draw lines to work out the actual vanishing point

http://e-group.uk.net/gallery/data/500/fred_1.jpg (http://e-group.uk.net/gallery/showphoto.php/photo/18304)

This shows the locus as being just below the lh of the window - but ill defined as a result of perspective issues.

Now copy the original image (without lines)to a new image which is more than twice the size of the original, and anchor it so that so that the centre of the new image is just below the lh of the window.

Apply perspective correction to the new image - this now has its transformation matrix centred close to the actual vanishing point so introduces less distortion.

This gives

http://e-group.uk.net/gallery/data/500/fred_2.jpg (http://e-group.uk.net/gallery/showphoto.php/photo/18305)

which if you draw on the lines again shows a nicely defined vanishing point

http://e-group.uk.net/gallery/data/500/fred_3.jpg (http://e-group.uk.net/gallery/showphoto.php/photo/18306)

But


Have I fooled myself - it looks right but am I just blinded by looking too long

Does this make sense


And why didn't I think of it ages ago?

Nick

Ian
7th October 2009, 02:48 PM
I think that works well, Nick - I'll be borrowing your method in future!

Ian

PS My main problem with perspectiev correction (in PS at any rate) is that sometimes the height goes out of whack.

Nick Temple-Fry
7th October 2009, 03:22 PM
I think that works well, Nick - I'll be borrowing your method in future!

Ian

PS My main problem with perspectiev correction (in PS at any rate) is that sometimes the height goes out of whack.

Thank you Ian - I hope that also means the explanation makes enough sense so that the method can be used (in whatever tool supports layers).

As to the height - well I've taken to applying half of each correction as stretch (pulling out of the image) and the other half as sqeeze (pushing in). But after a couple of minutes it's hard to remember what the actual proportions were (maybe a 2'nd screen with the original would help)

Nick

Ellie
7th October 2009, 05:30 PM
... and anchor it so that so that the centre of the new image is just below the lh of the window.

:confused: How do you do that?

Nick Temple-Fry
7th October 2009, 05:42 PM
:confused: How do you do that?

In The GIMP (if you are still using that) - the layers dialogue and workbench have (respectively) the word 'anchor' or a little anchor sign.

So after you have opened a new file of say 7000/5000 pixels. You copy and paste from the original - which becomes a 'floating layer' centred on the middle of the new file. The tools workbench gives you a little cross with arrows on the arms - this enables you to move the 'floating layer' till you've aligned it where you think the vanishing point is over the centre of the new image.

In the words of Soap - 'Confused - you will be'

Hope this helps

Nick

Ellie
7th October 2009, 05:53 PM
'Confused - you will be'

*yes

:eek:

:confused:

Errm, if you anchor it, how do you move it afterwards?

Sorry, I'm probably being very dim. Blame it on the weather!

Nick Temple-Fry
7th October 2009, 05:56 PM
*yes

:eek:

:confused:

Errm, if you anchor it, how do you move it afterwards?

Sorry, I'm probably being very dim. Blame it on the weather!

You move it first - then anchor it - so you read my comments backwards (it's all about perspective)

Sorry

Nick

Zuiko
7th October 2009, 08:33 PM
*yes

:eek:

:confused:

Errm, if you anchor it, how do you move it afterwards?

Sorry, I'm probably being very dim. Blame it on the weather!

Dont worry, Ellie, it's gone right over my head too, but I don't even know how to make another layer! Think I'll stick to landscapes, where perspective doesn't need to be quite so accurate. :)

Nick Temple-Fry
7th October 2009, 09:21 PM
Dont worry, Ellie, it's gone right over my head too, but I don't even know how to make another layer! Think I'll stick to landscapes, where perspective doesn't need to be quite so accurate. :)

It's Layer - new, on The GIMP menu system from the screen where the picture is shown. Of course it might be a bit more complicated on paid for software.

Nick

snaarman
7th October 2009, 09:44 PM
I probably don't understand the method, but I should get inside my copy of Gimp and learn more..

Mainly though I don't understand the result.. Were we trying to make the handrail horizontal as well as retaining a rectilinier look to the rest of the scene?? If not, then where was the offending sag?

:confused:


Pete

Nick Temple-Fry
7th October 2009, 10:12 PM
I probably don't understand the method, but I should get inside my copy of Gimp and learn more..

Mainly though I don't understand the result.. Were we trying to make the handrail horizontal as well as retaining a rectilinier look to the rest of the scene?? If not, then where was the offending sag?

:confused:


Pete

OK - invoking a Sondheim presentation

http://e-group.uk.net/gallery/data/500/Sondheim.jpg (http://e-group.uk.net/gallery/showphoto.php/photo/18312)

The disparity in angle between handrail and the alter/east window is obviously wrong. The floor on the lhs of the original slopes downwards towards the viewer, similarly the wall is too tall. The roof line around the windows is out, with the roof on the rhs far too low.

Now I may not have completely solved each of these problems (indeed the eye seems to want some perspective distortion in a photograph) but I think they are reduced.

But perhaps I'm fooling myself - or perhaps there is a better representation.

Nick

Zuiko
7th October 2009, 11:11 PM
It's definitely a big improvement, Nick, albeit at a slightly reduced angle of view. :)

Nick Temple-Fry
7th October 2009, 11:47 PM
It's definitely a big improvement, Nick, albeit at a slightly reduced angle of view. :)

Thank you John.

Actually I'm not sure about the angle of view - effectively we originally had two - one portrayed by the elements that went across the scene at an angle (and were therefore most subject to distortion) and one by the walls that went into the scene. The walls seem fairly close in both - it's the cross elements that have changed.

I think I need a tame maths teacher (or an old style physicist), some graph paper and a pair of compasses.

Nick

snaarman
8th October 2009, 07:14 AM
OK, we are barking up the same tree.

If you had stood in the centre of the chancel facing the altar, then the walls left and right will recede towards a common vanishing point dead centre, straight ahead. If the lens is a good 'un (and they used good builders) then you can draw straight lines towards this vanishing point and all is well.

The laterals (handrail etc) goleft to right parallel to the image frame.

However... If you stand to one side (lets say to the left side as per the pictures), then you invoke two sets of vanishing points: The side walls will converge on the one ahead and now to the left a bit. The laterals will converge on a second vanishing point well out of shot to the right. I think that is what you are seeing in the first shot..

I shall now sit down with a nice cup of tea.

Pete

edit..

Rather like this fine example from the world of crosstich (!) http://www.needlepoint.org/Archives/perspective/index.php

Nick Temple-Fry
8th October 2009, 08:59 AM
Well yes - but added in we have the distortion caused by the fact the lens is not parallel with those elements going across the screen - they are in the same state that if we partially emulate the diggers and turn the world on its side - a tower would be if we were to lean back to include both the top and the bottom.

So in the original the 2'nd vanishing point is ill defined to one side (and in reality far too close). In the modified image well..........

http://e-group.uk.net/gallery/data/500/Fred_4.jpg (http://e-group.uk.net/gallery/showphoto.php/photo/18313)

we have 2 effects - first I left a little roofline distortion - because it looked closer to right to me (at the time) - secondly the actual vanishing point moves further from the image. So we have the crossing lines caused by the 'left in' roofline distortion and the converging lines for the lower half tending towards the vanishing point.

Now it should be possible to calculate (given the distance of the nearest/furthest object and the angle of the viewer compared to the rail/far wall) where the vanishishing point is exactly using simple trig functions, but I'm getting old and am no longer quite the keen schola buriensis that Edward the VI intended me to be.

Interestingly the angle of the lens to the far wall accounts for Johns comments that the angle of view has altered - because the same effect that makes towers lean has moved the corner of the walls (LH rear) beyond 90%, so if it's reconciled back to 90% it appears a flatter presentation.

Nick

art frames
8th October 2009, 10:03 AM
I have so far commented to Nick by pm directly on this but hope this little demo drawing will help others.

There is three point perspective distortion caused by using wide angle lenses in a lot of architectural photography. Usually people seem to want it as it creates a sense of drama. Nick, like me, prefers to remove it. Disney was the master of using three point perspective to great effect in his cartoons. Such that he could induce vertigo by creating a sense of height.

So this has three point not two point perspective. And you need to correct it in stages. This little drawing shows the third vanishing point (up or down depending on the objects height against the horizon - or not having the camera lens vertical).

http://e-group.uk.net/gallery/data/500/vanishing_points.jpg (http://e-group.uk.net/gallery/showphoto.php/photo/18315)

My training as an artist on perspective is useful to me but tends not to help me explain what I see. I tend not to draw any of the lines as I see the distortions and use the tools to remove them instinctively. But I'm sure Nick will draw lines to prove me wrong.

http://e-group.uk.net/gallery/data/500/demo.jpg (http://e-group.uk.net/gallery/showphoto.php/photo/18314)

All I have done in the three stages is to, one by one, remove the perspective effects to eventually simulate one point perspective. Firstly, squeezing and aligning the perspective tool at the bottom (using corners and centre) to align the verticals and then squeezing on the left (again using corners and centre) to remove convergence to the lateral vanishing point. You can then reshape the frame to get the dimensions, I have no idea of the relative dimensions in this shot so left it.

But one point perspective is also a distortion. As you are physically in the wrong spot for this to be true I consider this to be a step too far, and would leave it where Nick did (with mild two point perspective) or between the two.

But to get rid of the sag without photoshop, you need to reduce the exaggerated perspective caused by the wide angle lens. As I understand it anything wider than the lens of our eye tends to introduce distortion so about 50mm is often used as 'normal'.

snaarman
8th October 2009, 10:23 AM
I have so far commented to Nick by pm directly on this but hope this little demo drawing will help others.

There is three point perspective distortion caused by using wide angle lenses in a lot of architectural photography. Usually people seem to want it as it creates a sense of drama. Nick, like me, prefers to remove it. Disney was the master of using three point perspective to great effect in his cartoons. Such that he could induce vertigo by creating a sense of height.

So this has three point not two point perspective. And you need to correct it in stages. This little drawing shows the third vanishing point (up or down depending on the objects height against the horizon - or not having the camera lens vertical).

http://e-group.uk.net/gallery/data/500/vanishing_points.jpg (http://e-group.uk.net/gallery/showphoto.php/photo/18315)

My training as an artist on perspective is useful to me but tends not to help me explain what I see. I tend not to draw any of the lines as I see the distortions and use the tools to remove them instinctively. But I'm sure Nick will draw lines to prove me wrong.

http://e-group.uk.net/gallery/data/500/demo.jpg (http://e-group.uk.net/gallery/showphoto.php/photo/18314)

All I have done in the three stages is to, one by one, remove the perspective effects to eventually simulate one point perspective. Firstly, squeezing and aligning the perspective tool at the bottom (using corners and centre) to align the verticals and then squeezing on the left (again using corners and centre) to remove convergence to the lateral vanishing point. You can then reshape the frame to get the dimensions, I have no idea of the relative dimensions in this shot so left it.

But one point perspective is also a distortion. As you are physically in the wrong spot for this to be true I consider this to be a step too far, and would leave it where Nick did (with mild two point perspective) or between the two.

But to get rid of the sag without photoshop, you need to reduce the exaggerated perspective caused by the wide angle lens. As I understand it anything wider than the lens of our eye tends to introduce distortion so about 50mm is often used as 'normal'.


Excellent! Exactly what I was attempting to explain.. *chr

So, be careful where you stand when you take a picture ;-)

Pete

Nick Temple-Fry
8th October 2009, 10:46 AM
Excellent! Exactly what I was attempting to explain.. *chr

So, be careful where you stand when you take a picture ;-)

Pete

I am, very careful, I stand offset because it gives a better sense of the depth/shape/character of a room - If you stand central and shoot square then you get a very flat view, distinct from the normal experience of being in a church.

But yes, the rod is of my own making, but my back is able to accomodate it.

Nick

Nick Temple-Fry
8th October 2009, 10:54 AM
I have so far commented to Nick by pm directly on this but hope this little demo drawing will help others.

There is three point perspective distortion caused by using wide angle lenses in a lot of architectural photography. Usually people seem to want it as it creates a sense of drama. Nick, like me, prefers to remove it. Disney was the master of using three point perspective to great effect in his cartoons. Such that he could induce vertigo by creating a sense of height.

So this has three point not two point perspective. And you need to correct it in stages. This little drawing shows the third vanishing point (up or down depending on the objects height against the horizon - or not having the camera lens vertical).

My training as an artist on perspective is useful to me but tends not to help me explain what I see. I tend not to draw any of the lines as I see the distortions and use the tools to remove them instinctively. But I'm sure Nick will draw lines to prove me wrong.

All I have done in the three stages is to, one by one, remove the perspective effects to eventually simulate one point perspective. Firstly, squeezing and aligning the perspective tool at the bottom (using corners and centre) to align the verticals and then squeezing on the left (again using corners and centre) to remove convergence to the lateral vanishing point. You can then reshape the frame to get the dimensions, I have no idea of the relative dimensions in this shot so left it.

But one point perspective is also a distortion. As you are physically in the wrong spot for this to be true I consider this to be a step too far, and would leave it where Nick did (with mild two point perspective) or between the two.

But to get rid of the sag without photoshop, you need to reduce the exaggerated perspective caused by the wide angle lens. As I understand it anything wider than the lens of our eye tends to introduce distortion so about 50mm is often used as 'normal'.

Peter is of course right and I'm seeking to produce a compromise that looks right for my chosen off centre presentation.

Why do I shoot off centre - well, for me it makes the view seem more natural, we very rarely stand at the dead centre of a scene staring exactly straight at a far wall; so why should geometry force us to do so, unless we choose our view of the world to be at the convenience of the camera.

Nick

art frames
8th October 2009, 11:10 AM
Peter is of course right and I'm seeking to produce a compromise that looks right for my chosen off centre presentation.

Why do I shoot off centre - well, for me it makes the view seem more natural, we very rarely stand at the dead centre of a scene staring exactly straight at a far wall; so why should geometry force us to do so, unless we choose our view of the world to be at the convenience of the camera.

Nick

I would suggest you keep standing where you do but reduce the wide angle as much as you can towards a more normal perspective.

Your eye is just trying to see things how it normally does. If you spent more time looking through a wide angle lens then that would quickly become normal to you (but not others).

I imagine that there must be point at which the extra width to the scene added as you take it is simply removed by the editing later when you square up the distortions.

As a suggestion - How about stitching two standard lens shots together?

Peter

Ellie
9th October 2009, 01:13 PM
Out of interest, would you have these problems if you could use a shift lens?

petrovich
10th October 2009, 07:33 AM
Nick.
A question from me I am afraid. Having been a systems (electrical) surveyor for some years in an earlier decade :o:o does this artefact only appear in images where you capture buildings, rooms etc that have purely equal dimensions and shape.

Regards

snaarman
10th October 2009, 07:58 AM
Nick.
A question from me I am afraid. Having been a systems (electrical) surveyor for some years in an earlier decade :o:o does this artefact only appear in images where you capture buildings, rooms etc that have purely equal dimensions and shape.

Regards

This effect happens all the time around us with all objects. Its more obvious with rooms and objects with straight lines in them. You don't even need a camera, it happens with our eyes.. However our brains spend a lot of time compensating for and ignoring it :-)

It was a revolution in art when they discovered how to paint and portray perspective - compare the results to the previous artistic efforts, everything was the same size no matter how far away.*

Pete

*Ironic point there - wouldn't we like a lens that did that!

Ellie
10th October 2009, 12:13 PM
Nick.
A question from me I am afraid. Having been a systems (electrical) surveyor for some years in an earlier decade :o:o does this artefact only appear in images where you capture buildings, rooms etc that have purely equal dimensions and shape.

Regards

Pete's right about it being an 'artistic revolution' when they worked out how to show perspective.

There's a good series of articles on Wikipedia (http://en.wikipedia.org/wiki/Vanishing_point) about this, using paintings as well as diagrams. Explanations tend to use buildings, roads etc to try to explain what happens to distant objects, but it's relevant to anything we see with our binocular vision.

Also, if I remember rightly, the vanishing point, or points, of an image will always be at the eye level/horizon of the person, or camera. The vanishing point is also affected by the angle of view as well as the angle to the focal plane - either in the camera or the back of your eye.

If you aren't exactly square (parallel) to a building or architectural feature when you photograph it you can get some really strange distortions that aren't just related to the type of lens used. As far as I know, this is why professional photographers who take pictures of architecture use shift lenses and take an awfully long time setting up a photograph.

Nick Temple-Fry
10th October 2009, 12:18 PM
This effect happens all the time around us with all objects. Its more obvious with rooms and objects with straight lines in them. You don't even need a camera, it happens with our eyes.. However our brains spend a lot of time compensating for and ignoring it :-)

It was a revolution in art when they discovered how to paint and portray perspective - compare the results to the previous artistic efforts, everything was the same size no matter how far away.*

Pete

*Ironic point there - wouldn't we like a lens that did that!

Or smaller but flat -on, only 2 - dimensions which is what the camera (and quite a lot of photographers) naturally do.

Pete is right it is there in all images - it is visible in these because we have so many lines as references. It is less obvious in 'deep' images and more obvious in images with a large crossways dimension (at least to my eyes).

But our convention on 3-d depth on 2-d paper/screens is a learned one, it develops through childhood which is one of the reasons childrens illustrations tend to flat. I suspect we go through our lives seeing it slightly differently.

Don't know what I could do with a shift lens - not having worked with one I'm not sure I really understand their use

Nick

Nick Temple-Fry
11th October 2009, 12:52 PM
From another thread it is clear there is some confusion as to why I use layers in this example. And the comment that as perspective is applied to the active layer which then replaces the other layer in toto that layers are irrelevant.

Well that last is true. But in The GIMP the software underlying perspective transform assumes the vanishing point is central to the image, and how it moves pixels between the point that has been stretched/squeezed and the vanishing point/centre of the image is based on distance/angle. So to get the vanishing point which relates to the POV in the right place you need to work on a bigger image and copy your picture so that its vanishing point is over the centre of the new image. That makes the distance/sums/angles in the tool work better and gives the better results I demonstrated.

Layers are used first to find/illustrate where the vanishing point is (you could hold a ruler to the screen instead) and because that is how GIMP uses cut/paste.

I suspect that there are a handful that 'get' how this method works, others who don't believe it (fine - give it a trial - nothing to pay and your money back if not completely satisfied) and a majority who just don't care (probably who take images that don't need it or are satisfied with the compromises that lens/flat sensors impose).

It works though - and is there for any that want it.

Nick