In the original image, there is a pixel point coordinate. How can the coordinate of the pixel point in the original image be calculated to correspond to the coordinate in the TIF image generated by PTGui? Can the conversion logic be provided?

31 views
Skip to first unread message

chenyuanrong

unread,
Sep 5, 2025, 4:39:22 AMSep 5
to PTGui Support
In the original image, there is a pixel point coordinate. How can the coordinate of the pixel point in the original image be calculated to correspond to the coordinate in the TIF image generated by PTGui? Can the conversion logic be provided?

17570607184089.png

PTGui Support

unread,
Sep 5, 2025, 5:34:16 AMSep 5
to pt...@googlegroups.com
Hi,

I'm sorry, this is not something I can provide. It would require
replicating the math of the entire processing pipeline math.

I can give you some pointers if you would like to try this:

Lens correction (a/b/c):
https://wiki.panotools.org/Lens_correction_model

and 6.43:
https://ptgui.com/support.html#6_43

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com

On 9/5/25 10:39, 'chenyuanrong' via PTGui Support wrote:
> In the original image, there is a pixel point coordinate. How can the
> coordinate of the pixel point in the original image be calculated to
> correspond to the coordinate in the TIF image generated by PTGui? Can
> the conversion logic be provided?
>
> 17570607184089.png
>
> --
> 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 visit https://groups.google.com/d/msgid/ptgui/
> e3b92e79-6329-4fda-8cee-e66270c6b463n%40googlegroups.com <https://
> groups.google.com/d/msgid/ptgui/e3b92e79-6329-4fda-8cee-
> e66270c6b463n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Erik Krause

unread,
Sep 5, 2025, 5:43:49 AMSep 5
to pt...@googlegroups.com
Am 05.09.25 um 10:39 schrieb 'chenyuanrong' via PTGui Support:

> In the original image, there is a pixel point coordinate. How can the
> coordinate of the pixel point in the original image be calculated to
> correspond to the coordinate in the TIF image generated by PTGui? Can the
> conversion logic be provided?

It's not trivial. You will have to deal with Euler angles, or more
precisely Tait-Bryan-angles:
https://en.wikipedia.org/wiki/Euler_angles#Tait%E2%80%93Bryan_angles

Furthermore, you will have to account for lens distortion correction and
(if used) viewpoint correction.

All these calculations - except viewpoint correction - is derived from
the open source Panorama Tools. You can find the source code online.

Just out of curiosity: why do you need to know that?
--
Erik Krause
http://www.erik-krause.de

chenyuanrong

unread,
Sep 5, 2025, 5:52:20 AMSep 5
to PTGui Support
I will perform YOLO recognition on the original image to obtain some coordinate point information. This data needs to be displayed on the TIFF image generated by PTGui. The transformation logic is quite complex. Could you provide command line instructions to help me perform this conversion?

Erik Krause

unread,
Sep 5, 2025, 7:42:13 AMSep 5
to pt...@googlegroups.com
Am 05.09.25 um 11:52 schrieb 'chenyuanrong' via PTGui Support:

> I will perform YOLO recognition on the original image to obtain some
> coordinate point information. This data needs to be displayed on the TIFF
> image generated by PTGui. The transformation logic is quite complex. Could
> you provide command line instructions to help me perform this conversion?

No, I'm sorry. You'll have to work that out for yourself.

But may be there are other options. Think about creating images with the
same dimensions as the original images and only the relevant pixels
colored in a machine-readable way. Then apply the project file from the
original panorama as a template (without aligning or optimization etc.)
to those images. The colored pixels will then be in the exact same
location in the panorama as the original area you marked. Any automatic
image processing (like ImageMagick or even php GD) should be able to
find those pixels and output the corresponding coordinates.

May be even an alpha channel works for that.

Keep in mind, that PTGui will interpolate colors along the edges of a
marked area. This can be avoided if you use Nearest Neighbor
interpolator (Create Panorama tab -> Advanced). But don't do that for
the original panorama!
Reply all
Reply to author
Forward
0 new messages