Programming new projections

99 views
Skip to first unread message

Roland Karlsson

unread,
Jun 16, 2017, 5:06:25 PM6/16/17
to hugin and other free panoramic software
Hi,

I have some photo projects on my mind that would need other output projections.

I am a fluent programmer in C.

I have downloaded the Hugin package and have been taking a short look.
A bit confusing, searching for cylindrical gives nearly 1k hits in 250 files.

So - now I need some advice.

1. Is this doable with a reasonable amount of work?

2. What is then the best approach?

3. Shall I do this for myself, or is it reasonable that it might be merged to the project?

4. Do mercurial have forks, like in github, so you can easily get info on what
other people are working with?

/Roland

Terry Duell

unread,
Jun 16, 2017, 6:48:19 PM6/16/17
to hugi...@googlegroups.com
Hello Roland,

On Sat, 17 Jun 2017 03:30:06 +1000, Roland Karlsson
<roland.v...@gmail.com> wrote:

> Hi,
>
> I have some photo projects on my mind that would need other output
> projections.


What output projections do you need?

Cheers,
--
Regards,
Terry Duell

Roland Karlsson

unread,
Jun 17, 2017, 2:45:49 PM6/17/17
to hugin and other free panoramic software


On Saturday, June 17, 2017 at 12:48:19 AM UTC+2, Tduell wrote:
Hello Roland,

What output projections do you need?


In the best of worlds I could define a projection easily whenever I want one :)

And yes - I understand that the mathematics might be hairy - but that is not my problem. It is more of a hands on how to actually do it with everything around.

One possible projection I am think about is a generalization of cylindrical or Mercator.

Instead of a cylinder, there could be a square (or a rectangular or a polygon) pillar with round corners.

The sides of the polygon could then be parallel to flat surface where I do not want distortion.

This can be generalized even further, making a polyhedron with round corners.

T. Modes

unread,
Jun 18, 2017, 3:57:12 AM6/18/17
to hugin and other free panoramic software
Hi,

Hugin uses libpano13 for the geometric transformations. So a new projection needs to be added to libpano13. In this case you have to implement the forward and backward transformation.
And then Hugin needs only some minor tweaks for the new projection.


Am Samstag, 17. Juni 2017 20:45:49 UTC+2 schrieb Roland Karlsson:

Instead of a cylinder, there could be a square (or a rectangular or a polygon) pillar with round corners.
except for the round corners this sounds similar to the existing biplane and triplane projections.
 

Erik Krause

unread,
Jun 18, 2017, 11:46:15 AM6/18/17
to hugin and other free panoramic software
Am 17.06.2017 um 20:45 schrieb Roland Karlsson:

> In the best of worlds I could define a projection easily whenever I want
> one:)

Isn't this more easily done with mathmap?

https://www.complang.tuwien.ac.at/schani/mathmap/

See here for examples:
https://www.flickr.com/groups/40193487@N00/discuss/72157604625488382/

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

Roland Karlsson

unread,
Jun 18, 2017, 5:03:49 PM6/18/17
to hugin and other free panoramic software
Downloaded libpano and found that I need to hack math.c to define the transforms.
I also have to hack some more files, like adjust.c, filter.c, remap.c, parser.c, pan.h, ...
Actually more than I think might be worth it.
And ... then I have not touched Hugin yet.

I was hoping to get some hints about short cuts :)
Where to concentrate. Things that do not need to be done.

Roland Karlsson

unread,
Jun 18, 2017, 5:16:52 PM6/18/17
to hugin and other free panoramic software
Hi.

Mathmap is a general transformation tool for images. It might take an already rendered pano, probably in eqvirectangular view, and then converts it to some projections of your choice. You write a script that do it for you.

The scripts look a but hairy, but it is probably just a small threshold for understanding what to do. One thing that sounds a bit scary is though that there is lots of talk about the tool crashing for your scripts.

There is a simpler, similar tool called Panojector. https://github.com/vitroid/Panojector where you add actual code instead of a script.

There is also a similar commercial tool that is made for only do this kind of conversions called Flexify. http://www.flamingpear.com/flexify-2.html In this case you cannot add any projections.

Roland Karlsson

unread,
Jun 20, 2017, 3:35:58 PM6/20/17
to hugin and other free panoramic software
BTW - what is the relation between hugin and nona? Are the different tools that both use libpano (and other stuff)?

And in that case - which one to use?

/Roland
Message has been deleted

RizThon

unread,
Jun 20, 2017, 8:37:18 PM6/20/17
to hugi...@googlegroups.com
https://wiki.panotools.org/Nona
> --
> A list of frequently asked questions is available at:
> http://wiki.panotools.org/Hugin_FAQ
> ---
> You received this message because you are subscribed to the Google Groups
> "hugin and other free panoramic software" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to hugin-ptx+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/hugin-ptx/058398c5-94ac-4147-804f-1f91cfd9244e%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages