By continuing to use this site, you agree to our use of cookies. Find out more
Forum sponsored by:
Forum sponsored by Forum House Ad Zone

In search of the ‘reverse algorithm’

All Topics | Latest Posts

Search for:  in Thread Title in  
Michael Gilligan01/06/2021 20:20:18
avatar
23121 forum posts
1360 photos

First: Please don’t mention the KISS principle !

I am well-aware that I could draw the item from scratch, in less time than it has taken to compose this post.

.

I set myself a little challenge, and I have failed ... so I turn to the forum for guidance.

So far as I am aware, the only available picture of the ‘screwcutting attachment’ for the Jason lathe is here:

**LINK** http://www.lathes.co.uk/jason/

I want [want, not need] to fit that image to an Isometric Grid ... but no matter how I ‘transform’ the perspective, I cannot get it to align in all three isoplanes at the same time.

Now: The object has lots of 90° corners, and we know that the movements on a technical camera could square things up [*] ... so why can’t I fully ‘de-perspectivize’ the photograph ?

MichaelG.

[*]  **LINK**

https://www.properproof.com/largeformat/Guides/CalumetDigitalGuide1%20(2).pdf

.

Edit: Here, for anyone who wants to play, is the photo ... re-sized and put on a large ‘canvas’

.

33f9543d-7bba-4bee-ad64-fc75fb179591.jpeg

Edited By Michael Gilligan on 01/06/2021 20:32:24

Ady101/06/2021 23:43:41
avatar
6137 forum posts
893 photos

The silver handle generates an optical illusion which makes it look like it is on the same plane as the 3rd cog

The 3rd cog which is aligned with the 2nd cog which is aligned with the top cog...

Edited By Ady1 on 01/06/2021 23:45:20

JasonB02/06/2021 07:06:19
avatar
25215 forum posts
3105 photos
1 articles

Could the image you are working from already have some distortion or have been tweaked by a camera? May even have had the format changed at some time.

There is also the problem with draft angle on what looks like a cast bracket so your 90deg corners may well be 93 or 87

Michael Gilligan02/06/2021 07:21:07
avatar
23121 forum posts
1360 photos
Posted by Ady1 on 01/06/2021 23:43:41:

The silver handle generates an optical illusion which makes it look like it is on the same plane as the 3rd cog

The 3rd cog which is aligned with the 2nd cog which is aligned with the top cog...

Edited By Ady1 on 01/06/2021 23:45:20

dont know

But there are plenty of straight lines to define rectilinear/orthogonal features

The first step in my work-flow was to trace over some of the reasonably clear ones.

... one very obvious set being the edges of the nameplate

MichaelG.

JasonB02/06/2021 07:46:18
avatar
25215 forum posts
3105 photos
1 articles
Posted by Michael Gilligan on 02/06/2021 07:21:07:
Posted by Ady1 on 01/06/2021 23:43:41:

The silver handle generates an optical illusion which makes it look like it is on the same plane as the 3rd cog

The 3rd cog which is aligned with the 2nd cog which is aligned with the top cog...

Edited By Ady1 on 01/06/2021 23:45:20

dont know

But there are plenty of straight lines .................................

... one very obvious set being the edges of the nameplate

That does look the best for two planes, front to back is not so easy to find a long straight pair, probably top and bottom of the motor mount plate as they seem to be the only two on the same plane assuming the top edge is parallel to the bottom?

Michael Gilligan02/06/2021 07:49:04
avatar
23121 forum posts
1360 photos
Posted by JasonB on 02/06/2021 07:06:19:

Could the image you are working from already have some distortion or have been tweaked by a camera? May even have had the format changed at some time.

There is also the problem with draft angle on what looks like a cast bracket so your 90deg corners may well be 93 or 87

.

Good point, Jason yes

... that potential ‘tweaking by a camera’ is basically what prompted my title for the thread.

In principle, I think it should be possible to ‘undo’ that which has been done.

[ Light travels in straight lines ]

My plan was to do the perspective correction based on ‘known’ features ... which, if it had worked, might have revealed that draft angle. But, using 4-corner ‘free transform’ I still can’t get it anywhere near isometric.

... I must be missing something !

MichaelG.

Andy Carlson02/06/2021 08:17:28
440 forum posts
132 photos

I've tried something not entirely dissimilar when trying to find dimensions for railway vehicles and buildings that are no longer with us.

My first attempts involved measuring the photo and trying to use trig to determine the unknown dimensions from the one that was least uncertain. I thought it should be simple but I could not make it simple or get it to produce sensible results.

My approach now is to take advantage of the fact that I need to make a drawing anyway and then create a 3d model in whatever tool, export it to STL and then import that to Blender. With Blender I can then guess the relative position of the camera and the subject, guess the focal length of the lens and attempt to reproduce the perspective in the photo. The photo can be imported as a background and I can move the opacity slider to compare the two. The same model can be used to overlay multiple photos from different angles if you have them.

Blender takes time to learn but overlaying a photo onto an existing STL is using a tiny part of its features so you only need to learn those parts.

See below for an example of a building. It's the Steam Packet Inn in Hayle and was demolished in the 1960s.

I have not tried to use isometric projection as an interim step TBH.

steam-packet-blender-overlay.jpg

Martin Connelly02/06/2021 08:46:16
avatar
2549 forum posts
235 photos

This is tweaked, I haven't spent a lot of time on it so it could be done better.

jason3.jpg

It was rotated 3° to get the verticals correct then pinched about 10% to get the parallels more parallel followed by a 105% vertical stretch.

Martin C

PS. I think a about -10% vertical perspective adjustment should have been done to get the verticals parallel but forgot that bit.

Edited By Martin Connelly on 02/06/2021 08:50:30

Ady102/06/2021 08:48:29
avatar
6137 forum posts
893 photos
Posted by Michael Gilligan on 02/06/2021 07:49:04:

[ Light travels in straight lines ]

Well yes and no

Light travels in straight lines by bouncing and dissipating

Never forgot about some chap in the far east who invented a camera which could reconstruct deconstructed light

so looking down a corridor became like looking down a corridor covered in mirrors, so you could see around corners

clever stuff

Martin Connelly02/06/2021 08:54:56
avatar
2549 forum posts
235 photos

This is with the vertical perspective tweaked. The problem is as you adjust one thing the previous changes get put out slightly which is why some experiment is required to get the best overall result.

jason4.jpg

Martin C

Michael Gilligan02/06/2021 09:10:48
avatar
23121 forum posts
1360 photos
Posted by Martin Connelly on 02/06/2021 08:46:16:

This is tweaked, I haven't spent a lot of time on it so it could be done better […]

.


Thanks, Martin ... we’re on the same track

But have you compared the resulting angles with an isometric grid ?

MichaelG.

.

In true ‘Blue Peter’ style ... Here is one I prepared earlier:

62a8f25e-d6c9-44b5-87c1-3a1938fbc685.jpeg

Edited By Michael Gilligan on 02/06/2021 09:21:13

Martin Connelly02/06/2021 10:29:12
avatar
2549 forum posts
235 photos

I didn't go that far but once the various edges are parallel then a bit of tweaking of the vertical or horizontal scale and the rotational angle should allow you to match it up. It may need some skew to get the various angles all matched to your grid. It will not be possible to get a perfect match to a symmetrical grid since the original picture was probably not taken from a suitable position. As pointed out light does not go round corners so if the picture was taken from a position to the left or right of the line at 45° to the spindle axis (I think left in this case) you would probably better off using an asymmetrical grid and save some headache.

Martin C

 

Edited By Martin Connelly on 02/06/2021 10:40:02

Edited By Martin Connelly on 02/06/2021 10:40:30

SillyOldDuffer02/06/2021 10:55:14
10668 forum posts
2415 photos

Another tricky problem from Michael!

This shot from Michael's first link suggests why the answer is hard:

cameratwist.jpg

The type of camera that may have been used to photograph the Jason is adjustable in all three planes, and is positioned and tilted by the operator relative to the target to control perspective and lens distortion. He adjusts images by eye so they look good, rather than them being geometrically correct. Getting back to isometric means first undoing the unknown camera corrections, and then removing perspective and lens distortions; the lens is also unknown.

Problem is still difficult even if an ordinary camera was used. The camera sees a perspective image because the object isn't flat. Big cow far away and model cow close up are the same size, making it possible to take photographs like this, which I think are impossible to lay on an isometric grid and recover the dimensions.

In the Pisa example, in translating a 3D image of the tower and girl into 2 dimensions the camera has lost the information that tower and girl are on entirely different scales. Although the Pisa example is extreme, the effect also applies to smaller objects like the Jason. It's easier to work with flat photos and stereoscopic pairs than a single photo of a deeply 3D object.

Martin's on the right track, and as he says 'some experiment is required to get the best overall result.'

The camera never lies? Oh yes it does...

Dave

Michael Gilligan02/06/2021 12:21:21
avatar
23121 forum posts
1360 photos
Posted by Martin Connelly on 02/06/2021 10:29:12:

I didn't go that far but once the various edges are parallel then a bit of tweaking of the vertical or horizontal scale and the rotational angle should allow you to match it up. […]

.

Sorry Martin ... That’s where I was, after spending a lot of time on it over the weekend.

The fact that I couldn’t make that final step is why I put it to the forum.

MichaelG.
.

P.S. __ as previously stated, I want to be able to do this sort of conversion, and [unless it forms part of the necessary process] I have no interest in adapting grid to suit the photo.

I happen to have a fondness for isometric projections, and although converting this specific image would be of trivial value, it serves as a suitable exercise.

Martin Connelly02/06/2021 12:58:14
avatar
2549 forum posts
235 photos

Here is the effect of rotating to even out the angles and skewing to bring the verticals back to vertical. Then stretching the width to get shallower angles. The quality of the picture just decreases with every geometric adjustment.

jason5.jpg

Martin C

Michael Gilligan02/06/2021 12:59:17
avatar
23121 forum posts
1360 photos

For general info.

This is what you can do [quickly and interactively] with ‘free transform’

This is a screenshot from Procreate; but the functionality is available in Photoshop and other software

458c9db8-3abd-4390-b143-21e2eab2f88b.jpeg

‘Get your eye in’ and you can see that as a rectangle on a tilted plane.

The result should be directly equivalent to using swing/tilt on a technical camera.

But the little Demon on my shoulder is whispering : Does it also replicate rise/fall ?

MichaelG.

Michael Gilligan02/06/2021 13:25:24
avatar
23121 forum posts
1360 photos
Posted by SillyOldDuffer on 02/06/2021 10:55:14:

Another tricky problem from Michael!

[…]


Problem is still difficult even if an ordinary camera was used. The camera sees a perspective image because the object isn't flat. Big cow far away and model cow close up are the same size, making it possible to take photographs like this, which I think are impossible to lay on an isometric grid and recover the dimensions.

[…]

In the Pisa example, in translating a 3D image of the tower and girl into 2 dimensions the camera has lost the information that tower and girl are on entirely different scales. Although the Pisa example is extreme, the effect also applies to smaller objects like the Jason. […]

.

You make some good points, Dave ... particularly regarding loss of information

I think, as you have demonstrated, that there could be many ‘alternative realities’ in a captured image

The trick then is to select the one that you want !
... reasonably easy if we happen to know the height of the girl and the height of the tower.

... very easy with the Jason, because I have the machine [and copies of some factory drawings]

MichaelG.

Michael Gilligan03/06/2021 00:13:24
avatar
23121 forum posts
1360 photos
Posted by Andy Carlson on 02/06/2021 08:17:28:

I've tried something not entirely dissimilar when trying to find dimensions for railway vehicles and buildings that are no longer with us.

[…]

.
Thanks for your post, Andy ... and apologies for not responding sooner

I have only just seen it blush

Blender seems to have very good facilities for ‘making’ an isometric camera ...

Blender frequently crops-up in my searches ... when I am trying to find definitive confirmation of my belief that a [physical] technical camera can produce a true isometric image.

MichaelG.

.

Ref. https://www.blender3darchitect.com/architectural-visualization/create-true-isometric-camera-architecture/

Noting the first comment, by rickyx

Edited By Michael Gilligan on 03/06/2021 00:34:24

Neil Wyatt03/06/2021 20:08:11
avatar
19226 forum posts
749 photos
86 articles

I've used a similar approach to get a 'side on' view of a locomotive photographed obliquely.

There is a deal of distortion, but it helps with working out dimensions.

I've also found that things made in imperial dimensions tend to be sized conveniently, often in obvious 'steps'.

Neil

Andy Carlson03/06/2021 22:05:43
440 forum posts
132 photos
Posted by Michael Gilligan on 03/06/2021 00:13:24:

Blender seems to have very good facilities for ‘making’ an isometric camera ...

Blender frequently crops-up in my searches ... when I am trying to find definitive confirmation of my belief that a [physical] technical camera can produce a true isometric image.

I'd have thought that perspective is a fact of life and (to quote Mr Scott) 'You cannae change the laws of physics'. Tilt and shift lenses can distort things but presumably there is a price somewhere else... which may not be be visible if the object is simple, solid and the right shape... but if you take the extreme case of a wireframe... maybe not possible?

To minimise perspective you'd need a long focal length and put the camera far away. With the right camera position it should then be close to isometric.. but never quite reaching it.

All Topics | Latest Posts

Please login to post a reply.

Magazine Locator

Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!

Find Model Engineer & Model Engineers' Workshop

Sign up to our Newsletter

Sign up to our newsletter and get a free digital issue.

You can unsubscribe at anytime. View our privacy policy at www.mortons.co.uk/privacy

Latest Forum Posts
Support Our Partners
cowells
Sarik
MERIDIENNE EXHIBITIONS LTD
Subscription Offer

Latest "For Sale" Ads
Latest "Wanted" Ads
Get In Touch!

Do you want to contact the Model Engineer and Model Engineers' Workshop team?

You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.

Click THIS LINK for full contact details.

For subscription issues please see THIS LINK.

Digital Back Issues

Social Media online

'Like' us on Facebook
Follow us on Facebook

Follow us on Twitter
 Twitter Logo

Pin us on Pinterest

 

Donate

donate