FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 05-19-2012, 07:28 PM
Michael Mol
 
Default merging or fitting images together

On Sat, May 19, 2012 at 12:38 AM, Philip Webb <purslow@ca.inter.net> wrote:
> 120518 Michael Mol wrote:
>> Remarkably simple. Probably because I was only stitching two photos.
>
> -- details snipped --
>
> Thanks : that gives me a 3rd method to pursue.
>
> NB in your result there are some badly curved lines :
> bottom right, the front of the tram is badly distorted ;
> centre top, the sides of buildings are curved outwards ;
> also, the bottom of the photo has been lost, eg the L-side man's eyes,
> & the result if smaller than the other *2 *results achieved earlier.

It's inevitable that you're going to lose some of the image. That's a
function of reprojecting the stitched image.

The distortions are very probably due to an incorrect focal length
setting--something that's going to be impossible to get correct. But I
likely could have corrected by forcing Hugin to treat it like lens
aberrations, and getting it to correct for it that way. That would
indeed take a great deal of time.

>
> No complaint at all ! -- but clearly all methods require some practice.

The problem here is that there's missing source data. (Details below)

> I've added your result to my I/net 'test' examples (I hope that's ok).

np. I was going to share an ImageShack link, but I realized I wasn't
sure whether by "keep the image off-list" you meant "don't attach the
image" or "don't show the image on the list".

>
> Any other suggestions are welcome -- apparently this is of interest -- ,
> but I will turn to other priorities & investigate panoramas a bit later.
>
> BTW the location is Steelhouse Lane with Snow Hill Sta in the background
> (I stated it incorrectly before) in May 1953 just before the final trams.
> The photo was taken with a Zeiss Ikon camera, a well-reputed make :
> perhaps you can find the focal width on the I/net somewhere.

Now here's where the fun begins. According to Wikipedia, the Zeiss
Ikon is 35mm SLR...but that's about all you're going to get from it.

Really, everything else of interest is in the lens.

Being an SLR, the lens can (and will) be swapped out by the
photographer as circumstance demands. Each lens is going to have
different aberration characteristics, but that's not nearly as
important as the other difference: Without knowing the lens used, you
know next to nothing about the focal length and field of view. (The
two values can be derived from each other, as long as you know the
frame size...which we do.)

Worse, if the photographer was not using a prime lens[1], and was
instead using a lens with variable zoom, you can't easily know what
the real focal length was, as this will change depending on how far
the photographer has zoomed in. Now, I suppose that if you knew the
physical sizes of a couple fixed lines in each picture, where the two
lines were some not-insignificant distance apart, you may be able to
roughly calculate the focal length.

But, really, without knowing the focal length, getting the stitch
right is going to be guess-and-check.

Incidentally, this is one reason why digital photography is awesome.
Almost everything interesting you may need to know about the shot is
going to get stored in the EXIF data in the image files. My camera
stores the lens focal length at the time of snap; if I have a zoom
lens on, it records the exact focal length the lens happened to be on.
It's quite nice.

[1] This isn't "prime" as "excellent" or "high grade"..."prime" in
this context means it has a fixed focal length. It may have additional
implications, but that's the largest functional relevance: a "prime
lens" is a lens with a fixed focal length, a lens which doesn't have a
variable zoom capability.[2]

[2] I'm dribbling in a lot of semi-relevant technical stuff in here
for those who are following the thread for informational purposes.
--
:wq
 
Old 05-20-2012, 02:01 AM
Stroller
 
Default merging or fitting images together

On 19 May 2012, at 20:28, Michael Mol wrote:
> …
> Worse, if the photographer was not using a prime lens[1], and was
> instead using a lens with variable zoom, you can't easily know what
> the real focal length was, as this will change depending on how far
> the photographer has zoomed in.

Throughout everything else you said I was thinking something like this.

Zoom lenses were much less common even 2 or 3 decades ago.

For a long time, a 50mm prime was the common kit lens, rather than the 18-105mm zoom which is sold today.

This was because, on a camera using 35mm film, a 50mm focal length gives a field of view very close to that seen naturally by the human eye.

Wikipedia states that "the first modern film zoom lens was designed around 1950 by Roger Cuvillier" and Canon's official website (the "Canon Camera Museum" pages) states that "The history of Canon's zoom lens goes back to 1954."

Since the photos are stated go have been taken in 1953 it seems highly unlikely that the photographer was using a highly expensive and cutting-edge zoom lens. I doubt many people would have been able to afford these zoom lenses when they were first released.

It seems to me safer to assume that the lens is a 50mm.

I guess focal length may change fractionally during focussing (as lenses are moved back and forth during as the focus ring is turned), however it may also be that a camera manufacturer designs a lens with a 48mm focal length (because that's easier to construct for some reason, or produces better images) and decides to sell it as 50mm because a 2mm difference in focal length makes no difference to the photographer.

Or it may be that the distortion is caused by lens distortion - perhaps Hugin is trying to compensate for that, and straightening up lines.

In any case, I might try re-doing the stitch a few times, each time telling Hugin the lens is 47mm, 48mm, 49mm, … 51mm, … 53mm. Perhaps you may find that one of those is perfectly spot on.

Stroller.
 
Old 05-20-2012, 06:33 AM
Philip Webb
 
Default merging or fitting images together

120519 Michael Mol wrote:
> According to Wikipedia, the Zeiss Ikon is 35mm SLR,
> but that's about all you're going to get from it.

No ! -- as Stroller pointed out, zoom lenses were invented only c 1950.
My stepfather's model was made in Germany c 1939
& had been mentioned to him as a good buy by a photo-expert friend.
After the traumas of England 1940, someone had sold it to a store,
which was offering it very cheaply, so he grabbed a very real bargain.
I didn't think of keeping it after he died, but it wb a collector's item:
I've put a photo I found on the I/net in my 'test' directory.

It didn't use 35 mm film, but '120' IIRC, a much larger format.
What was a typical focal length for a good camera in 1939 ?

This thread, tho' rather far from Gentoo itself,
has obviously been of interest to a number of people
& can serve as a resource for anyone searching the I/net
for advice how to make a panorama from smaller images,
but we shouldn't take it too far & images themselves belong elsewhere.

--
========================,,======================== ====================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca
 
Old 05-20-2012, 06:45 AM
Philip Webb
 
Default merging or fitting images together

120520 Stroller wrote:
> Zoom lenses were much less common even 2 or 3 decades ago.
> For a long time, a 50mm prime was the common kit lens,
> rather than the 18-105mm zoom which is sold today.
> This was because on a camera using 35mm film, a 50mm focal length
> gives a field of view very close to that seen naturally by the human eye.
> Wikipedia states that "the first modern film zoom lens was designed c 1950
> by Roger Cuvillier" and Canon's official website (the "Canon Camera Museum")
> states that "The history of Canon's zoom lens goes back to 1954."
> Since the photos are stated go have been taken in 1953
> it seems highly unlikely that the photographer was using
> a highly expensive and cutting-edge zoom lens. I doubt many people
> would have been able to afford these zoom lenses when first released.
> It seems to me safer to assume that the lens is a 50mm.

In fact, looking more closely at the picture of a ZI
which I've put up in my I/net 'test' dir (found on the I/net earlier),
it says 'F = 7,5 cm', so the lens appears to have been a 75 mm .

> I guess focal length may change fractionally during focussing
> -- as lenses are moved back and forth during as the focus ring is turned --
> however it may also be that a camera manufacturer designs a lens
> with a 48mm focal length because that's easier to construct for some reason
> or produces better images and decides to sell it as 50mm
> because a 2mm difference makes no difference to the photographer.
> Or it may be that the distortion is caused by lens distortion
> perhaps Hugin is trying to compensate for that, and straightening up lines.
> In any case, I might try re-doing the stitch a few times,
> each time telling Hugin the lens is 47mm, 48mm, 49mm, … 51mm, … 53mm.
> Perhaps you may find that one of those is perfectly spot on.

Thanks for the further lesson ! -- it sb tried at 75 mm .

--
========================,,======================== ====================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca
 
Old 05-20-2012, 09:48 PM
Michael Mol
 
Default merging or fitting images together

On Sat, May 19, 2012 at 10:01 PM, Stroller
<stroller@stellar.eclipse.co.uk> wrote:
>
> On 19 May 2012, at 20:28, Michael Mol wrote:
>> …
>> Worse, if the photographer was not using a prime lens[1], and was
>> instead using a lens with variable zoom, you can't easily know what
>> the real focal length was, as this will change depending on how far
>> the photographer has zoomed in.
>
> Throughout everything else you said I was thinking something like this.
>
> Zoom lenses were much less common even 2 or 3 decades ago.

Ah. Excellent point!

>
> For a long time, a 50mm prime was the common kit lens, rather than the 18-105mm zoom which is sold today.

18-105? I'm used to seeing 18-55.

>
> This was because, on a camera using 35mm film, a 50mm focal length gives a field of view very close to that seen naturally by the human eye.
>
> Wikipedia states that "the first modern film zoom lens was designed around 1950 by Roger Cuvillier" and Canon's official website (the "Canon Camera Museum" pages) states that "The history of Canon's zoom lens goes back to 1954."
>
> Since the photos are stated go have been taken in 1953 it seems highly unlikely that the photographer was using a highly expensive and cutting-edge zoom lens. I doubt many people would have been able to afford these zoom lenses when they were first released.
>
> It seems to me safer to assume that the lens is a 50mm.

Probably generally true. (Though as Philip later remarked, it turns
out the lens was likely a 75mm prime)

>
> I guess focal length may change fractionally during focussing (as lenses are moved back and forth during as the focus ring is turned), however it may also be that a camera manufacturer designs a lens with a 48mm focal length (because that's easier to construct for some reason, or produces better images) and decides to sell it as 50mm because a 2mm difference in focal length makes no difference to the photographer.
>
> Or it may be that the distortion is caused by lens distortion - perhaps Hugin is trying to compensate for that, and straightening up lines.

I don't think the 'Align' button in the wizard tries to optimize for
lens distortion...adjusting for lens distortion tends to take a fair
amount of time in terms of CPU, and far longer in terms of finding the
right sequence of control point optimizers, where an errant point
won't send the algorithm into mathematically weird territories.

>
> In any case, I might try re-doing the stitch a few times, each time telling Hugin the lens is 47mm, 48mm, 49mm, … 51mm, … 53mm. Perhaps you may find that one of those is perfectly spot on.

I tried it again, this time using 342 control points generated by
hugin-cpfinder and autopano-sift-c. (Several runs of the latter, with
100 points each, produces a good set of points). There wasn't anything
for celeste to pick up, so I used the "fine-tune all points" tool,
and then cleared the thirteen or so points which didn't have good
correlation.

Following that, I ran the control point optimizer in "anchored,
positional mode", checked the preview, and then ran the "everything
without translation" control point optimizer. Checking the preview
again, the panorama was way off-center, so I dragged it back into
place using the fast preview window.

Following that, I ran the exposure optimizer's "low dynamic range"
preset. In the preview, things looked OK. The leftmost portion will
never look all that great, as he captured the sun setting behind a
building (or maybe that's a water spot); that narrowed the usable area
of the dynamic range of the frame, and it's going to look kinda
grayish. If these source JPG files are scans of paper photos, I could
do a lot more with a new scan set using 16bpp TIFF or OpenEXR, and at
perhaps 600 or 1200 dpi instead of 72 or so. Might be able to recover
more detail out out of that leftmost section.

Anyway, the final Hugin pto file is here: http://pastebin.com/gudxvAEa

And the final stitch is here:
http://img407.imageshack.us/img407/2030/brum3068brum30702.jpg

Interesting exercise! The image is still a bit smaller than my first
pass (704x407 vs 785x413), but it's not cropped as tightly, the lines
on the tram are much straighter, and most of the nasty noise on the
leftmost portion has been dealt with. There's likely something that
can be done to blow the image up a bit more.

--
:wq
 
Old 05-21-2012, 12:33 AM
Philip Webb
 
Default merging or fitting images together

120520 Michael Mol wrote:
> as Philip later remarked, it turns out the lens was likely a 75mm prime

The picture of the camera looks exactly what I remember,
tho' there might have been different models with different lenses.
It was a very good camera for its time.

> The leftmost portion will never look all that great,
> as he captured the Sun setting behind a building
> or maybe that's a water spot

The Sun was indeed setting to the left at that time + date,
but the bluish blemish is some sort of physical decay in the negative,
which was stored in a cardboard box for c 55 yr without being touched.

> If these source JPG files are scans of paper photos

No, they're 2 overlapping scans of the same negative,
whose size is 58 x 43 mm = 2,3 x 1,7 inch .

> Anyway, the final Hugin pto file is here: http://pastebin.com/gudxvAEa

What is a 'pto' file ? -- I downloaded it & it's text.

> And the final stitch is here:
> http://img407.imageshack.us/img407/2030/brum3068brum30702.jpg

All Firefox gives me is a black window : can you check ?

--
========================,,======================== ====================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca
 
Old 05-21-2012, 01:06 AM
Michael Mol
 
Default merging or fitting images together

On Sun, May 20, 2012 at 8:33 PM, Philip Webb <purslow@ca.inter.net> wrote:
> 120520 Michael Mol wrote:
>> as Philip later remarked, it turns out the lens was likely a 75mm prime
>
> The picture of the camera looks exactly what I remember,
> tho' there might have been different models with different lenses.
> It was a very good camera for its time.

I'll say! Based on that pic, other things you've said, and the
information I found[1], that's an Ikonta 521 B with a Tessar f/3.5
lens, which appears to have been a high-end lens. Meanwhile, all of
the lenses for that camera appear to have been 75mm; the big
difference appears to be f-stop, which has an impact on
depth-of-field/bokeh. And an f/3.5 lens isn't something your modern
DSLR's kit lens can usually do.

[1] http://camerapedia.wikia.com/wiki/Zeiss_Ikon_Ikonta

>
>> The leftmost portion will never look all that great,
>> as he captured the Sun setting behind a building
>> or maybe that's a water spot
>
> The Sun was indeed setting to the left at that time + date,
> but the bluish blemish is some sort of physical decay in the negative,
> which was stored in a cardboard box for *c 55 yr *without being touched.
>
>> If these source JPG files are scans of paper photos
>
> No, they're *2 *overlapping scans of the same negative,
> whose size is *58 x 43 mm *= *2,3 x 1,7 inch .

Ah. Well, the same holds true; a higher-resolution scan of the source
image, stored in an HDR image format (such as 16-bit-per-channel TIFF,
16-bit-per-channel PNG, or OpenEXR) would ultimately give better
results. Any of the 16-bit-per-channel formats would increase the
available dynamic range (of the format, at least) by a factor of 16,
at least. (IIRC, JPEG models luminance in 12 bits, and, for monochrome
images, that's at least somewhat advantageous over 8-bit-per-channel
grayscale or RGB formats.)

>
>> Anyway, the final Hugin pto file is here: http://pastebin.com/gudxvAEa
>
> What is a 'pto' file ? -- I downloaded it & it's text.

It's a Hugin project file; you can load that file with Hugin. It
assumes the two source JPEG files are in the same directory.

>
>> And the final stitch is here:
>> http://img407.imageshack.us/img407/2030/brum3068brum30702.jpg
>
> All Firefox gives me is a black window : can you check ?

Works on my system. It comes up all-black in geeqie, though; I had to
load it in Chrome. Also loads fine in Gimp 2.6.

--
:wq
 
Old 05-21-2012, 04:09 PM
Stroller
 
Default merging or fitting images together

On 21 May 2012, at 02:06, Michael Mol wrote:
> ...
>>
>>> And the final stitch is here:
>>> http://img407.imageshack.us/img407/2030/brum3068brum30702.jpg
>>
>> All Firefox gives me is a black window : can you check ?
>
> Works on my system. It comes up all-black in geeqie, though; I had to
> load it in Chrome. Also loads fine in Gimp 2.6.

Blank here, too, in Mac Safari and if I download it and open in Preview.app

I can convert it to a .bmp using ImageMagick, however - what a wonderful result!

(This raises a thought - Philip might be best working entirely in .bmp or .tiff, having Hugin spit out .bmp or .tiff results and saving those as his "best quality" conversion for archive purposes. Then converting to .jpeg after that).

Stroller.
 
Old 05-21-2012, 04:31 PM
Michael Mol
 
Default merging or fitting images together

On Mon, May 21, 2012 at 12:09 PM, Stroller
<stroller@stellar.eclipse.co.uk> wrote:
>
> On 21 May 2012, at 02:06, Michael Mol wrote:
>> ...
>>>
>>>> And the final stitch is here:
>>>> http://img407.imageshack.us/img407/2030/brum3068brum30702.jpg
>>>
>>> All Firefox gives me is a black window : can you check ?
>>
>> Works on my system. It comes up all-black in geeqie, though; I had to
>> load it in Chrome. Also loads fine in Gimp 2.6.
>
> Blank here, too, in Mac Safari and if I download it and open in Preview.app
>
> I can convert it to a .bmp using ImageMagick, however - what a wonderful result!

I'm seriously wondering if there might not be something broken with
the .jpeg files I'm spitting out. That laptop (saffron) is in the
middle of an overdue emerge --update --deep --newuse @world, though.
(And I saw it was complaining about 19 blockers...) It may be overdue
for a depclean and some other maintenance. I haven't tweaked things
much, as it's my last functioning Gentoo box until I get kaylee and
inara fixed.

>
> (This raises a thought - Philip might be best working entirely in .bmp or .tiff, having Hugin spit out .bmp or .tiff results and saving those as his "best quality" conversion for archive purposes. Then converting to .jpeg after that).

Don't know much about his current process, so there's not a whole lot
of recommendations one could make. But it's definitely an interesting
problem!

--
:wq
 
Old 05-21-2012, 04:54 PM
Michael Mol
 
Default merging or fitting images together

On Mon, May 21, 2012 at 12:31 PM, Michael Mol <mikemol@gmail.com> wrote:

[snip]

> I'm seriously wondering if there might not be something broken with
> the .jpeg files I'm spitting out. That laptop (saffron) is in the
> middle of an overdue emerge --update --deep --newuse @world, though.
> (And I saw it was complaining about 19 blockers...) It may be overdue
> for a depclean and some other maintenance. I haven't tweaked things
> much, as it's my last functioning Gentoo box until I get kaylee and
> inara fixed.

Yeah, Windows Photo Viewer says "Windows Photo Viewer can't open this
picture because the file appears to be damaged, corrupted, or is too
large." Certainly not too large. I'd have to step through some
decoder's processing of the image to see what's broken about it.

--
:wq
 

Thread Tools




All times are GMT. The time now is 10:38 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org