Access to the transformation matrix ofthe stitched images

Asked by Ali Agnaou

Hi,

I’m currently developing a panoramic streaming camera module. I developed a stitching algorithms but the results aren’t that good.
When I used the Hugin Panorama software to stitch 2 images from the 2 cameras of the panoramic camera module, I got a better result and I want to get the transformation Matrix applied on each image to use it in my application to stitch in real-time my steaming feed.

My question is : how can I get this transformation matrices that are applied on the images to stitch to use them in my code?

I would be grateful if someone can help.

Best regards,
Ali Agnaou

Question information

Language:
English Edit question
Status:
Solved
For:
Hugin Edit question
Assignee:
No assignee Edit question
Solved by:
tmodes
Solved:
Last query:
Last reply:
Revision history for this message
Ali Agnaou (aagnaou939) said (last edit ):
#1

I found that I can export a PTStitcher script and I didn't understand the information in it, here is what I got :

# output image lines
o w960 h1080 f0 Tpp0 Tpy0 TrX0 TrY0 TrZ0 a0 b-0.0597741828925032 c0 d0 e0 g0 p1.87836502625055 r0.438356140017208 t0 v50 y-17.75 n"vlcsnap-2023-10-25-14h23m26s939.png"
o w960 h1080 f0 Tpp0 Tpy0 TrX0 TrY0 TrZ0 a0 b-0.0597741828925032 c0 d0 e0 g0 p1.20033870040725 r-4.23791760983191 t0 v50 y17.7299509482447 n"\vlcsnap-2023-10-25-14h23m42s436.png"

Can Extract the transformation matrices from these 2 lines abouve? if so how can I do that?

Revision history for this message
tmodes (tmodes) said :
#2

Hugin/libpano is not using a transformation matrix. It calculates the transformation analytically.

Revision history for this message
Nicolas H (nhadji03) said :
#3

Hello,

@Ali Agnaou have you found a work around for your request or what the data in the PTStitcher script mean? I need to use it for my application as well!

Thank you

Revision history for this message
Ali Agnaou (aagnaou939) said :
#4

Hello,

@tmodes, could you please explain how Hugin/libpano calculates the transformation analytically?

Revision history for this message
Ali Agnaou (aagnaou939) said :
#5
Revision history for this message
Ali Agnaou (aagnaou939) said :
#6

I m still wotking on the matter @Nicolas H

Revision history for this message
Nicolas H (nhadji03) said :
#7

OK, I am working on it as well. I will keep you updated if I find a solution in this thread.

Revision history for this message
Best tmodes (tmodes) said :
#8

Sorry, but this can't described in short. You have to take a look into the source code.
libpano create a stack of functions which are then executed.

Revision history for this message
Ali Agnaou (aagnaou939) said :
#9

Thanks tmodes, that solved my question.

Revision history for this message
Nicolas H (nhadji03) said :
#10

Hey @aagnaou939,

I don't know your progress but I managed to find a link that can be useful.

https://wiki.panotools.org/PTStitcher_Readme

Hope it helps and I am not too late. Can you share your solution ?

N