nona: Remap image from Ricoh Theta to little planet?

399 views
Skip to first unread message

Felix E. Klee

unread,
May 25, 2014, 5:20:07 PM5/25/14
to hugi...@googlegroups.com
Input:

<http://sites.inka.de/klee/hugin/2014-05-25+02_input.jpg>

Screen shot of Theta app, which shows desired type of output:

<http://sites.inka.de/klee/hugin/2014-05-25+02_output.jpg>

To get started, I created `script.nona`:

    p w600 h600 f3 nJPEG E12.3
    i f4 v360 n"input.jpg"

I run with Hugin’s nona 2013.0.0:

    nona -o output script.nona

The result: A black image `output.jpg`.

What am I doing wrong?

PS: Sorry if this message appears twice. I first tried posting by email to the list address, but so far that message didn't appear.

Felix E. Klee

unread,
May 26, 2014, 12:16:48 PM5/26/14
to hugi...@googlegroups.com
By the way, it would be helpful if someone could reproduce the problem
on a different system. Maybe it's unique to Hugin 2013 / Windows 7, or -
that's actually my suspicion - I'm doing something wrong.

Necessary data (see my previous post):

* <http://sites.inka.de/klee/hugin/2014-05-25+02_input.jpg>

* `script.nona`:

p w600 h600 f3 nJPEG E12.3
i f4 v360 n"input.jpg"

* Command line:

nona -o output script.nona

Problem: Output is black.

T. Modes

unread,
May 26, 2014, 3:52:33 PM5/26/14
to hugi...@googlegroups.com
Hi Felix,


Am Montag, 26. Mai 2014 18:16:48 UTC+2 schrieb Felix E. Klee:

  * `script.nona`:

        p w600 h600 f3 nJPEG E12.3
        i f4 v360 n"input.jpg"


the problem is that your script contains several errors. I would recommend to create the pto file in the GUI/Hugin and then you can use nona for the remapping.

Brandan

unread,
May 26, 2014, 9:32:19 PM5/26/14
to hugi...@googlegroups.com
http://ultrawide.wordpress.com/2008/11/20/how-to-create-a-little-planet-using-hugin/

That allowed me to make the attached image. Is something like that what you had in mind?

Near as I can tell hugin does not make the nice clear black outline and just blends edge outward forever.
planet.jpg

Felix E. Klee

unread,
May 27, 2014, 11:13:03 AM5/27/14
to hugi...@googlegroups.com
Thanks a lot, Brandon, that's very helpful!

It took me a while to get a similar result in Hugin 2013:

1. Via the menu “Interface” switched Hugin into the advanced interface.

Rationale: It seems that in the simple interface it is not possible
to stitch a panorama from just one input image.

2. In the tab “Photos” added: shot.jpg

Clicked the image and set as lens type: Equirectangular

3. Switched to tab “Stitcher”.

Set projection: Stereographic

Set field of view: 240

Set canvas size: 600 × 600

4. Via the menu “View” opened the preview window.

Selected “Auto” for auto update of the preview.

Clicked “Num. Trans.”, and set for pitch: 90

5. In the tab “Sticher” clicked: Stich!

Felix E. Klee

unread,
May 27, 2014, 1:07:57 PM5/27/14
to hugi...@googlegroups.com
On Mon, May 26, 2014 at 9:52 PM, T. Modes <Thomas...@gmx.de> wrote:
> I would recommend to create the pto file in the GUI/Hugin and then you
> can use nona for the remapping.

Thanks, that's what I did in the end. I edited the `pto` file down to:

p f4 w1500 h1500 v240 R0 nJPEG
i w3584 h1792 f4 v360 r-90 p50 y-90 n"input.jpg"

T. Modes

unread,
May 27, 2014, 1:57:23 PM5/27/14
to hugi...@googlegroups.com

This is a property of the stereographic projection. If you want a black circular outline, apply a crop rectangle to the input image (mask out the upper part of the equirectangular image).

Felix E. Klee

unread,
May 27, 2014, 2:00:14 PM5/27/14
to hugi...@googlegroups.com
On Tue, May 27, 2014 at 7:57 PM, T. Modes <Thomas...@gmx.de> wrote:
> This is a property of the stereographic projection. If you want a black
> circular outline, apply a crop rectangle to the input image (mask out the
> upper part of the equirectangular image).

Or maybe add a black frame around the input image?

Not that I want this. In fact for the use case I have in mind I prefer
the image without the black outline.
Reply all
Reply to author
Forward
0 new messages