Manual Alignment of Mosaic seems to get thrown out of the window

55 views
Skip to first unread message

Alex Moldovan

unread,
Aug 31, 2023, 11:03:10 AM8/31/23
to PTGui Support
So I've been using PTGui for stitching together images taken with a microscope and it's been working nearly seamlessly (no pun intended) for the last few years. Today (actually last night as I've now wasted 8+ hours on this) I found that PTGui doesn't look my images for a specific batch. 

Trying to use the project assistant and doing this as normal yields a horrible mess of unaligned photos and rotated images. Bearing in mind nothing needs rotating as the camera is kept the same distance is just shifted in the XY of the focal plane (not even tilting). 

So here are the things I've tried: 

1) I followed the instructions in the manual (yes I read it). No luck. 
2) I've tried switching off just the roll or just the pitch or just the yawn or combinations of each one nothing. 
3) I've tried iterating several times with the optimiser. 
And finally the thing I thought would fix everything... 

I manually , pain stainkly aligned 220 images by hand, calculated the Control Points between all overlapping images and prayed the optimiser would just snap everything into place and do the final movements... Here is the before from manual alignment. 
Manual_Stitch.png
And then the "optimised version" using the suggested mosaic settings in the docs: 
Screenshot 2023-08-31 150901.png
So I have a couple of questions: 

1) Does anyone know where I am going wrong (because clearly I am being an idiot) 
2) Is there any way to get PTGui to only translate the photos as opposed to rotate them? I thought unticking the "roll" for all images would do the trick (being around the lens axis ) 
3) Is there any other way to stitch together a mosaic/tiled image? (without using "align grid" which would require a robot realistically for what I do). 

Thank you in advance for anyone that takes the time to even read this :) 

Alex 

Alex Moldovan

unread,
Aug 31, 2023, 11:07:25 AM8/31/23
to pt...@googlegroups.com
I think I've answered my own question to fixing it... 

Turns out I had some control points that were whacky. Even though they shouldn't have been -.-". I tried getting rid of the "Worse" but that didn't work so I went to an earlier save where I had the manual placement done. I then deleted the control points and calculate only those for the overlapping images. And TADA! 

Screenshot 2023-08-31 160552.png

Fixed. Although it'd be nice to know how to restrict the rotation. 

Alex 

--
You received this message because you are subscribed to a topic in the Google Groups "PTGui Support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ptgui/X2KUoTNRt7k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ptgui+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ptgui/e555c7fb-0a6b-4e50-960f-d149f9b77777n%40googlegroups.com.

PTGui Support

unread,
Aug 31, 2023, 11:57:38 AM8/31/23
to pt...@googlegroups.com
Hi Alex,

Yes this would have been caused by bad control points.

You can tell PTGui to not rotate your images by not optimizing the Roll.
On the Optimizer tab, switch the optimizer settings to advanced mode.
Disable all Roll checkboxes. In the Image Parameters tab, ensure that
all images have a roll of 0.

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com

On 31-08-2023 17:06, Alex Moldovan wrote:
> I think I've answered my own question to fixing it...
>
> Turns out I had some control points that were whacky. Even though they
> shouldn't have been -.-". I tried getting rid of the "Worse" but that
> didn't work so I went to an earlier save where I had the manual
> placement done. I then deleted the control points and calculate only
> those for the overlapping images. And TADA!
>
> Screenshot 2023-08-31 160552.png
>
> Fixed. Although it'd be nice to know how to restrict the rotation.
>
> Alex
>
> On Thu, Aug 31, 2023 at 4:03 PM Alex Moldovan <a.a.mo...@gmail.com
> <mailto:a.a.mo...@gmail.com>> wrote:
>
> So I've been using PTGui for stitching together images taken with a
> microscope and it's been working nearly seamlessly (no pun intended)
> for the last few years. Today (actually last night as I've now
> wasted 8+ hours on this) I found that PTGui doesn't look my images
> for a specific batch.
>
> Trying to use the project assistant and doing this as normal yields
> a horrible mess of unaligned photos and rotated images. Bearing in
> mind nothing needs rotating as the camera is kept the same distance
> is just shifted in the XY of the focal plane (not even tilting).
>
> So here are the things I've tried:
>
> 1) I followed the instructions in the manual (yes I read it). No luck.
> 2) I've tried switching off just the roll or just the pitch or just
> the yawn or combinations of each one nothing.
> 3) I've tried iterating several times with the optimiser.
> And finally the thing I thought would fix everything...
>
> I manually , pain stainkly aligned 220 images by hand, calculated
> the Control Points between all overlapping images and prayed the
> optimiser would just snap everything into place and do the final
> movements... Here is the before from manual alignment.
> Manual_Stitch.png
> And then the "optimised version" using the suggested mosaic settings
> in the docs:
> Screenshot 2023-08-31 150901.png
> So I have a couple of questions:
>
> 1) Does anyone know where I am going wrong (because clearly I am
> being an idiot)
> 2) Is there any way to get PTGui to only translate the photos as
> opposed to rotate them? I thought unticking the "roll" for all
> images would do the trick (being around the lens axis )
> 3) Is there any other way to stitch together a mosaic/tiled image?
> (without using "align grid" which would require a robot
> realistically for what I do).
>
> Thank you in advance for anyone that takes the time to even read
> this :)
>
> Alex
>
> --
> You received this message because you are subscribed to a topic in
> the Google Groups "PTGui Support" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ptgui/X2KUoTNRt7k/unsubscribe
> <https://groups.google.com/d/topic/ptgui/X2KUoTNRt7k/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to
> ptgui+un...@googlegroups.com
> <mailto:ptgui+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ptgui/e555c7fb-0a6b-4e50-960f-d149f9b77777n%40googlegroups.com <https://groups.google.com/d/msgid/ptgui/e555c7fb-0a6b-4e50-960f-d149f9b77777n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "PTGui Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ptgui+un...@googlegroups.com
> <mailto:ptgui+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ptgui/CACn5z1FuPqyvkNLBtamANWNdrL_am0HAf2zxZWzD5Nd8PKyhaA%40mail.gmail.com <https://groups.google.com/d/msgid/ptgui/CACn5z1FuPqyvkNLBtamANWNdrL_am0HAf2zxZWzD5Nd8PKyhaA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Alex Moldovan

unread,
Aug 31, 2023, 12:15:38 PM8/31/23
to pt...@googlegroups.com
Hey Joost, 

So this is the strange thing. I did that and it still threw it into disarray. Maybe the control points were causing it not to work properly. But I was getting some strange results even without rolling. I'll try it again for the next image :) 

Alex

Alex 

To unsubscribe from this topic, visit https://groups.google.com/d/topic/ptgui/X2KUoTNRt7k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ptgui+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ptgui/f9a19042-d857-40ba-9cd5-3a8a74b1a5e8%40ptgui.com.

John Houghton

unread,
Aug 31, 2023, 12:24:12 PM8/31/23
to PTGui Support
Alex,  It would be better to optimize all of the roll parameters with the "Link roll" option checked at the bottom of the advanced page of the optimizer.  Certainly the roll parameters should all be identical, but not necessarily exactly zero. By linking them they will all be kept the same but they will be free to take up the actual common roll value.

John

Erik Krause

unread,
Aug 31, 2023, 3:56:50 PM8/31/23
to pt...@googlegroups.com
Am 31.08.2023 um 17:06 schrieb Alex Moldovan:

> I had the manual placement done. I then deleted the control points
> and calculate only those for the overlapping images. And TADA!
If your images are in a regular grid, you can try "Align to Grid" from
the Project menu, then create control points for the overlapping images.

--
Erik Krause
http://www.erik-krause.de

Reply all
Reply to author
Forward
0 new messages