[Papywizard] 360/180 Preset Generator  

Everything you need to motorize your head
no avatar
sjhenry
Member
 
Topic author
Posts: 146
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 10, 2009 1:43 am
Location: Colorado, USA
Info

[Papywizard] 360/180 Preset Generator

by sjhenry » Mon Jul 20, 2009 2:23 am

As the name suggest, this preset generator is used to generate 360/180 preset using any focal length.

1. What is it?
This html/javascript program creates a PW preset for 360/180 pano.

2. Where is the screen shot?
a) Picture 2 shows an initial opening screen
b) Picture 3 shows an preset generated screen

3. How to install?
a) Open notepad or any text editor
b) Copy the following code (remove the "Code:" part)
c) Paste that in the text editor
d) Save it with a name (like pw_360_preset.html)
e) Double click on the name. It will be opened in the default browser.
f) You can create a shortcut as well (see Picture 1).

4. What is the system requirement?
A modern browser - latest version of any browser. I wrote it in html/javascript combination so that it works in most of the browsers. I tested it in IE and Firefox. It works find on these browsers. The javascript needs to be enabled on the browser. The script uses very premitive javascript so it should work in most browsers without any modifications. If you find that it is not running in a browser, please post it in this thread to figure out a solution.

5. What are the fields on the screen?
a) Crop Factor: This dropdown box shows all the possible sensor crop for the DSLR currently available.
Some example,
choose 1.0 for full frame DSLR/film cameras irrespective of camera maker
choose 1.3 for Canon 1D series
choose 1.5 for Nikon crop cameras like D40 etc
choose 1.6 for Canon Rebel series
choose 2.0 for 4/3 and micro 4/3 system
Note that if you use any point and shoot camera, use the crop factor of 1.0 and its 35mm equivalent focal length. For example, Canon A590 has 140mm (35mm equivalent) at tele end. So use crop factor of 1.0 and focal length of 140mm.
b) Aspect Ratio: Choose the maximum sensor aspect ratio for a given camera. Mostly it is 3:2 ration for DSLR.
Some camera offer in camera crop of 4:3 and 16:9. It is best to use the native aspect of the sensor.
c) Overlap: This is the overlap percentage between the adjustant shots in yaw and pitch axis.
d) Orientation: Orientation of the camera when taking the mosaic - Landscape or Portrait.
e) Focal Length: The focal length of the lens used. Don't do any conversion here. If you use 50mm lens on a 1.6 crop body, just enter 50 and not 80.
f) Width in Pixels: Source Camera sensor width in pixels. The default value is populated with Rebel XSI sensor width 4272.
g) Height in Pixels: Source camera sensor height in pixels. The default value is populated with Rebel XSI Sensor height 2848.
h) Generate (button): Press this button to generate the preset.
i) Preset (text area): The generated preset will be shown here.

6. How to use it?
Select a value that matches your camera.
Select the correct aspect ratio for your camera.
Select an overlap percentage.
Select the orientation of the camera.
Enter the focal length of the lens.
Enter the Source Camera sensor width in pixels (whole number)
Enter the Source camera sensor height in pixels (whole number)
Press the "Generate" button.

This creates a preset in the bottom text area. The preset name will be 35<2 digit crop factor><orientation>_<focal length>_<rows>_<columns>. Now copy this to a file same as the preset name with an extension of .xml.
For example, you use Canon 450D in portrait with 50 mm lens. The preset name will be 3516P_100_17_57.

Load this preset file into the PW using File->Import Preset File menu.

Once you set the home position correctly, then select the preset (3516P_100_17_57) and take the mosaic.

7) what is in the tooltip?
a) The tooltip has a Source section where the format used, focal length used, rows and columns are mentioned.
b) The tooltip also has a Target section which shows the resultant horizontal, vertical FOV and sizes for the mosaic and for 360/180.

Code: Select all
        <tooltip>
            Source:
                Format: 35mm (1.6 Crop, 3:2 Aspect Ratio, Portrait orientation)
                Focal Length: 100mm lens, overlap: 25%, Horizontal FOV: 6.4, Vertical FOV: 10.7
                Rows: 17, Columns: 57
            Target:
                For 360/180, Horizontal Size: 119880, Vertical Size: 59940
                Mosaic Horizontal FOV: 368.0, Vertical FOV: 184.0
                Mosaic Horizontal Size: 122544, Vertical Size: 61272
        </tooltip>

If you have any other questions/feedback about this program, please post it in this thread.


Jones

The HTML code is below. Save it in pw_360_preset.html

Code: Select all
<!--
 ! This program is to generate preset for the Papywizard
 ! program. This program can be used for commercial and/or
 ! non-commercial use for free.
 !
 ! Author: Jones Henry Subbiah (C) 2009.
 !
 ! Disclaimer: The user assumes the responsibility of any
 ! any demage using the preset. The author is not responsible
 ! for anything.
 !
 ! The preset generated assumes top-center (zenith) corner of the pano
 ! is the home position that is yaw = 0, and pitch = 0. The
 ! name of the preset will be 35mmformat_focallength_rows_columns
 !
 ! History of changes:
 ! ====================
 ! 0.1        Initial public version
 ! 0.2        Fixed a bug in yaw_skip_pos, pitch_skip_pos
 !                  (affected only when Portrait as source orientation)
 ! 0.3        Fixed a bug in calculating the vertical shots required
 ! 0.4        Added history of changes
 ! 0.5        Removed the base exclusion logic for the 180 degrees
 !
-->

<html>
 <head>
  <title>Papywizard 360 Preset Generator</title>
  <script language="Javascript">
    var FRAME_WIDTH = 36.0;
    var FRAME_HEIGHT = 24.0;
    var OPTIMUM_DEGREES = 10.0;
    var BASE_EXCLUSION = 0.0;
    var DEBUG = false;
    var pval = "";

    /*
     * This function appends the message to the text box.
     */
    function write ( message )
    {
        pval += message + "\n";
    }

    /*
     * This function appends debug messages to the text box.
     */
    function debug ( message )
    {
        if ( DEBUG )
            write ( message );
    }

    /*
     * This function calculates the angular field of view.
     */
    function calculate_fov ( frame_length, focal_length )
    {
        return ( 2 * Math.atan ( frame_length / ( 2 * focal_length ) ) * 180 / Math.PI );
    }

    /*
     * This function validates the input.
     * Input validation is done only for text box fields.
     */
    function validate_input()
    {

        if ( isNaN ( parseFloat ( document.main.fl.value ) ) )
        {
            alert ( "Enter a valid focal length" );
            document.main.fl.focus();
            return false;
        }

        return true;
    }

    /*
     * This function rounds a number to a single decimal precision.
     * The trick to is to add 0.05 to the number and truncate at the first
     * decimal position.
     */
    function round21 ( number )
    {
        nnum = number + 0.05;
        nums = nnum.toString();
        numa = nums.split('.');
        return ( numa[0] + '.' + numa[1].charAt(0) );
    }

    /*
     * This function finds the number of yaw positions to skip.
     */
    function yaw_skip_pos ( hfov, vfov )
    {
        var yaw = 0.0;
        var ydiff = 0;

        while ( 1 )
        {
            if ( yaw > OPTIMUM_DEGREES )
            {
                break;
            }
            ydiff++;
            yaw += hfov;
        }

        debug ( "ydiff: " + ydiff );

        if ( ydiff < 1 )
            ydiff = 1;

        debug ( "ydiff: " + ydiff );

        return ( ydiff );
    }

    /*
     * This function finds the number of pitch positions to skip.
     */
    function pitch_skip_pos ( hfov, vfov )
    {
        var pitch = 0.0;
        var pdiff = 0;
        while ( 1 )
        {
            if ( pitch > OPTIMUM_DEGREES )
            {
                break;
            }
            pdiff++;
            pitch += vfov;
        }
        debug ( "pdiff: " + pdiff );

        if ( pdiff < 1 )
            pdiff = 1;

        debug ( "pdiff: " + pdiff );

        return ( pdiff );
    }

    /*
     * This function initializes all the position of the pano.
     * The position is of the form "row,col,pitch,yaw".
     * Each position of the pano is represented here in the String array.
     */
    function initialize_positions ( hfov, vfov, prows, pcols )
    {
        var pos = new Array ( prows * pcols );
        var yaw = 0.0;
        var pitch = Number ( round21 ( vfov / 2 ) );

        for ( ctr1 = 0; ctr1 < prows; ctr1++ )
        {
            for ( ctr2 = 0; ctr2 < pcols; ctr2++ )
            {
                pos[ctr1 * pcols + ctr2] = ( ctr1 + 1 ) + "," + ( ctr2 + 1 ) + "," + round21 ( pitch, 1 ) + "," + round21 ( yaw, 1 );
                yaw += hfov;
            }
            pitch += vfov;
            yaw = 0;
        }

        for ( ctr1 = 0; ctr1 < pos.length; ctr1++ )
        {
            debug ( "pos[" + ctr1 + "]: " + pos[ctr1] );
        }

        return ( pos );
    }

    /*
     * This function initializes the row, paired row values.
     * The array index is the row number and the array value is the paired row number.
     */
    function initialize_rows ( prows )
    {
        var prs = new Array ( prows );

        for ( ctr1 = 0; ctr1 < prows; ctr1++ )
        {
            prs[ctr1] = -1;
            debug ( "prs[" + ctr1 + "]: " + prs[ctr1] );
        }

        return ( prs );
    }

    /*
     * This function finds the row used already as a paired row.
     */
    function find_paired_row ( prs, prow )
    {
        for ( var ctr = 0; ctr < prs.length; ctr++ )
        {
            if ( prs[ctr] == prow )
            {
                return ( ctr );
            }
        }

        return ( -1 );
    }

    /*
     * This function finds the row and its corresponding paired row.
     */
    function calculate_paired_row ( prs, pdiff )
    {
        var prows = prs.length;

        for ( var ctr = 0; ctr < prows; ctr++ )
        {
            if ( ctr + pdiff < prows )
            {
                prs[ctr] = ctr + pdiff;
            }

            var prw = find_paired_row ( prs, ctr );
            debug ( 'prw: ' + prw );

            if ( prw != -1 )
            {
                debug ( 'here' );
                prs[ctr] = -2;
            }
        }

        for ( ctr1 = 0; ctr1 < prows; ctr1++ )
        {
            debug ( "prs[" + ctr1 + "]: " + prs[ctr1] );
        }

        return ( prs );
    }

    /*
     * This function writes the "pict" element of the preset XML.
     */
    function print_shoot ( pos )
    {
        var val = pos.split(',');
        write ( '            <pict yaw="' + Number ( val[3] ).toFixed(1) + '" pitch="-' + Number ( val[2] ).toFixed(1) + '"/> <!-- ' + Number ( val[0] ).toFixed(0) + ',' + Number ( val[1] ).toFixed(0) + ' -->' );
    }

    /*
     * This function creates the normal move of the head.
     * The normal move is defined as
     *     row 1 as left-to-right
     *     row 2 as right-to-left
     *     row 3 as left-to-right
     *     ...
     */
    function do_normal_move ( prows, pcols, pos )
    {
        for ( var ridx = 0; ridx < prows; ridx++ )
        {
            if ( ( ridx + 1 ) % 2 == 1 )
            {
                var cidx = 0;
                write ( "            <!-- arrange columns left to right in row " + ( ridx + 1 ) + " starting from column " + ( cidx + 1 ) + " -->" );

                for ( ; cidx < pcols; cidx++ )
                {
                    print_shoot ( pos[ridx*pcols+cidx] );
                }
            }
            else
            {
                var cidx = pcols - 1;
                write ( "            <!-- arrange columns right to left in row " + ( ridx + 1 ) + " starting from column " + ( cidx + 1 ) + " -->" );

                for ( ; cidx >= 0; cidx-- )
                {
                    print_shoot ( pos[ridx*pcols+cidx] );
                }
            }
        }
    }

    /*
     * This function creates the special move of the head.
     * The special move is done by moving the head around 10.0 degrees like
     *    row1 columns that have around 10.0 move
     *    row3(paired row) columns that are reverse from the initial row
     *    row2 (non-paired row) columns that are 10.0 degrees apart in the repeating order
     */
    function do_special_move ( prows, pcols, pos, prs, ydiff, pdiff )
    {
        var c = new Array ( pcols );
        var cnt = 0;
        for ( var ridx = 0; ridx < prows; ridx++ )
        {
            if ( prs[ridx] == -2 )
            {
             continue;
            }
            else if ( prs[ridx] == -1 )
            {
                write ( "            <!-- columns in row " + ( ridx + 1 ) + " is not paired -->" );

                for ( var ctr = 0; ctr <= ( ydiff + 1 ); ctr++ )
                {
                    if ( ( ydiff + 1 ) >= ( ctr + 1 ) )
                    {
                         cnt = 0;

                         for ( var cidx = ctr; cidx < pcols; cidx += ydiff + 1 )
                         {
                             c[cnt++] = ridx * pcols + cidx;
                         }

                         if ( ( ctr + 1 ) % 2 == 0 && pcols > 10 )
                         {
                             write ( "            <!-- arrange columns right to left in row " + ( ridx + 1 ) + " starting from column " + ( ctr + 1 ) + " -->" );

                             for ( var aidx = cnt - 1; aidx >= 0; aidx-- )
                             {
                              print_shoot ( pos[c[aidx]] );
                             }
                         }
                         else
                         {
                             write ( "            <!-- arrange columns left to right in row " + ( ridx + 1 ) + " starting from column " + ( ctr + 1 ) + " -->" );

                             for ( var aidx = 0; aidx < cnt; aidx++ )
                             {
                                 print_shoot ( pos[c[aidx]] );
                             }
                         }
                    }
                }
            }
            else
            {
                write ( "            <!-- columns in row " + ( ridx + 1 ) + " is paired with row " + ( prs[ridx] + 1 ) + " -->" );
                for ( var ctr = 0; ctr < ydiff + 1; ctr++ )
                {
                    if ( ctr + ydiff < pcols )
                    {
                        cnt = 0;
                        write ( "            <!-- arrange columns left to right in row " + ( ridx + 1 ) + " starting from column " + ( ctr + 1  ) + " -->" );

                        for ( var cidx = ctr;  cidx < pcols; cidx += ydiff + 1 )
                        {
                            print_shoot ( pos[ridx*pcols+cidx] );
                            c[cnt++] = cidx + 1;
                        }
                    }

                    if ( prs[ridx] < prows && c[cnt-1] > 0 )
                    {
                        write ( "            <!-- arrange columns right to left in row " + ( prs[ridx] + 1 ) + " starting from column " + c[cnt-1] + " -->" );

                        for ( var cidx = cnt - 1; cidx >= 0; cidx-- )
                        {
                            print_shoot ( pos[prs[ridx]*pcols+c[cidx]-1] );
                        }
                    }
                }
            }
        }
    }

    /*
     * This function is the main function that creates the full preset XML.
     */
    function do_preset()
    {
        var thfov = 0.0;
        var hfov = 0.0;
        var tvfov = 0.0;
        var vfov = 0.0;
        var focal_length = 0.0;
        var crop_factor = 0.0;
        var overlap = 0.0;
        var ratio = 0.0;
        var prows = 0;
        var pcols = 0;
        var ar = '';
        var wip = 0;
        var hip = 0;
        var scan_pixel = 0;
        var eff_vert = 0.0;

        pval = "";

        if ( validate_input() )
        {
            focal_length = parseFloat ( document.main.fl.value );
            crop_factor = parseFloat ( document.main.cf.options[document.main.cf.selectedIndex].value );
            overlap = parseFloat ( document.main.ol.options[document.main.ol.selectedIndex].value );
            ar = (document.main.r.options[document.main.r.selectedIndex].value).split ( ',' );
            ratio = parseFloat ( ar[1] );
            orientation = document.main.or.value;
            wip = parseInt ( document.main.wip.value );
            hip = parseInt ( document.main.hip.value );

            debug ( "focal_length: " + focal_length );
            debug ( "crop_factor: " + crop_factor );
            debug ( "overlap: " + overlap );
            debug ( "ratio: " + ratio );
            debug ( "orientation: " + orientation );
            debug ( "wip: " + wip );
            debug ( "hip: " + hip );

            thfov = calculate_fov ( FRAME_WIDTH / crop_factor, focal_length );
            hfov = thfov * ( 1.0 - overlap / ratio / 100.0 );
            hfov = Number ( round21 ( hfov ) );
            tvfov = calculate_fov ( FRAME_HEIGHT / crop_factor, focal_length );
            vfov = tvfov * ( 1.0 - overlap / 100.0 );
            vfov = Number ( round21 ( vfov ) );

            if ( orientation == 'P' )
            {
                var tmp = hfov;
                hfov = vfov;
                vfov = tmp;
            }

            debug ( "hfov: " + hfov );
            debug ( "vfov: " + vfov );

            //eff_vert = ( 180.0 - BASE_EXCLUSION - vfov / 2 );
            eff_vert = 180.0;
            prows = Math.ceil ( eff_vert / vfov );
            pcols = Math.ceil ( 360.0 / hfov );

            debug ( "eff_vert: " + eff_vert );
            debug ( "prows: " + prows );
            debug ( "pcols: " + pcols );

            scan_pixel = Math.round ( wip / thfov );
            debug ( "scan_pixel: " + scan_pixel );

            var pos = initialize_positions ( hfov, vfov, prows, pcols );
            var prs = initialize_rows ( prows );
            var ydiff = yaw_skip_pos ( hfov, vfov );
            var pdiff = pitch_skip_pos ( hfov, vfov );
            prs = calculate_paired_row ( prs, pdiff );

            write ( '<?xml version="1.0" encoding="utf-8"?>\n' );
            write ( '<papywizard>\n' );
            write ( '    <preset name="35' + ( crop_factor * 10 ) + orientation + '_' + focal_length + '_' + prows + '_' + pcols + '">' );
            write ( '        <tooltip>' );
            write ( '            Source:' );
            write ( '                Format: 35mm (' + crop_factor + ' Crop, ' + ar[0] + ' Aspect Ratio' + ', ' + ( orientation == 'L' ? 'Landscape' : 'Portrait' ) + ' orientation)' );
            write ( '                Focal Length: ' + focal_length + 'mm lens, overlap: ' + overlap + '%, Horizontal FOV: ' + hfov + ', Vertical FOV: ' + vfov );
            write ( '                Rows: ' + prows + ', Columns: ' + pcols );
            var target_hfov = ( hfov * pcols + thfov * overlap / 100.0 ).toFixed(1);
            var target_vfov = ( vfov * prows + tvfov * overlap / 100.0 ).toFixed(1);
            write ( '            Target:' );
            write ( '                For 360/180, Horizontal Size: ' + Math.round ( 360 * scan_pixel ) + ', Vertical Size: ' + Math.round ( 180 * scan_pixel ) );
            write ( '                Mosaic Horizontal FOV: ' + target_hfov + ', Vertical FOV: ' + target_vfov );
            write ( '                Mosaic Horizontal Size: ' + Math.round ( target_hfov * scan_pixel ) + ', Vertical Size: ' + Math.round ( target_vfov * scan_pixel ) );
            write ( '        </tooltip>' );
            write ( '        <shoot>' );

            if ( hfov > OPTIMUM_DEGREES )
            {
                do_normal_move ( prows, pcols, pos );
            }
            else
            {
                do_special_move ( prows, pcols, pos, prs, ydiff, pdiff );
            }

            write ( '        </shoot>' );
            write ( '    </preset>\n' );
            write ( '</papywizard>' );

            document.main.preset.value = pval;
        }
    }
  </script>
 </head>
 <body onload="document.main.preset.value = '';document.main.fl.focus();" bgcolor="#cccccc">
  <form name="main">
   <table border="0" cellpadding="2" cellspacing="2" width="800">
    <tr>
     <td>Crop Factor</td>
     <td>
      <select name="cf" style="width:100px">
       <option value="1.0">1.0</option>
       <option value="1.3">1.3</option>
       <option value="1.5">1.5</option>
       <option value="1.6" selected>1.6</option>
       <option value="1.7">1.7</option>
       <option value="1.8">1.8</option>
       <option value="2.0">2.0</option>
      </select>
     </td>
     <td>Aspect Ratio</td>
     <td>
      <select name="r" style="width:100px">
       <option value="3:2,1.500000" selected>3:2</option>
       <option value="4:3,1.333333">4:3</option>
       <option value="5:4,1.250000">5:4</option>
       <option value="16:9,1.777778">16:9</option>
      </select>
     </td>
     <td>
      Overlap
     </td>
     <td>
      <select name="ol" style="width:100px">
       <option value="20">20</option>
       <option value="25" selected>25</option>
       <option value="30">30</option>
       <option value="35">35</option>
       <option value="40">40</option>
       <option value="45">45</option>
       <option value="50">50</option>
      </select>
      %
     </td>
    </tr>
    <tr>
     <td>Orientation</td>
     <td>
      <select name="or" style="width:100px">
       <option value="L">Landscape</option>
       <option value="P" selected>Portrait</option>
      </select>
     </td>
     <td>Focal Length</td>
     <td>
      <input type="text" name="fl" style="width:100px" value="100">
     </td>
     <td>Width in Pixels</td>
     <td>
      <input type="text" name="wip" style="width:100px" value="4272">
     </td>
    </tr>
    <tr>
     <td>Preset</td>
     <td> </td>
     <td>Height in Pixels</td>
     <td>
      <input type="text" name="hip" style="width:100px" value="2848">
     </td>
     <td> </td>
     <td>
      <input type="button" value="Generate" style="width:100px" onClick="do_preset();">
     </td>
    </tr>
    <tr>
     <td colspan="6">
      <textarea name="preset" rows="18" cols="95"></textarea>
     </td>
    </tr>
   </table>
  </form>
 </body>
</html>






Last edited by sjhenry on Wed Jul 22, 2009 1:26 am, edited 1 time in total.

User avatar
Paul
Member
 
Posts: 778
Likes: 0 post
Liked in: 0 post
Joined: Sat Aug 30, 2008 4:46 pm
Location: Bonn, Germany
Info

by Paul » Mon Jul 20, 2009 7:11 am

Thank's again Jones !

I just tried the calculation with crop 2 and 9mm FL, my uncomfortable xls-calc ends in 5-7-5 shots at +55 0 -55 degree, I decrease the no of pics for the tilted rows with cosine of angle. The diff is 7 pics.

Do you assume homeposition at Zenith?
Last edited by Paul on Mon Jul 20, 2009 7:51 am, edited 1 time in total.
Paul

close, but no cigar ... ... ...

User avatar
jplorge
Member
 
Posts: 214
Likes: 0 post
Liked in: 0 post
Joined: Sun Oct 05, 2008 11:42 pm
Location: Belgium
Info

by jplorge » Mon Jul 20, 2009 7:25 am

Last edited by jplorge on Mon Jul 20, 2009 7:25 am, edited 1 time in total.
Jean-Pierre
Merlin/Orion firmware : 01.09.81 panohead + Papywizard on XP PC and Linux Ubuntu 9.1 & Nokia 800
Manfrotto 303 PAN HEAD with Nikon D70 + Nikon 18-70 in kit - Nikon 80-200 F 2.8 old - Sigma 10-20
Assembly : Ptgui 9.1.3

no avatar
Gordon
Member
 
Posts: 357
Likes: 0 post
Liked in: 0 post
Joined: Wed Oct 08, 2008 12:18 pm
Location: Deep in the woods, UK
Info

by Gordon » Mon Jul 20, 2009 2:44 pm

jhenry is the generator king....

Gordon
2000th Member :D

GigaPixel Experimenter
Gigapan Beta Unit, Canon Powershot S5IS, Canon 350D, Nikon D40, Manfrotto Tripod, BT-Serial + Papywizard on Nokia 770, Fully-Operational Merlin the Wizard Unit!!!

no avatar
sjhenry
Member
 
Topic author
Posts: 146
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 10, 2009 1:43 am
Location: Colorado, USA
Info

by sjhenry » Tue Jul 21, 2009 1:16 am

Paul,

Yes. It is assuming the zenith as the home position. Fro this preset to work, the camera has to point upwards and that position should be set to Home position.

Jones

no avatar
sjhenry
Member
 
Topic author
Posts: 146
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 10, 2009 1:43 am
Location: Colorado, USA
Info

by sjhenry » Tue Jul 21, 2009 1:18 am

Jean-Pierre,

Thanks for hosting it in your site. I'll keep the current version in this forum only. You can update it to your site when new version is available.

Jones

no avatar
sjhenry
Member
 
Topic author
Posts: 146
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 10, 2009 1:43 am
Location: Colorado, USA
Info

by sjhenry » Tue Jul 21, 2009 1:18 am

Gordon,

lol :lol: I hope that it helps many Papywizard users.

Jones

no avatar
sjhenry
Member
 
Topic author
Posts: 146
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 10, 2009 1:43 am
Location: Colorado, USA
Info

by sjhenry » Tue Jul 21, 2009 3:06 am

Paul,

I updated the script to generate correct number of pictures for the 360/180. The current script shows me 2X8 pictures in portrait or 3X5 for landscape mode with crop factor 2 and 9mm lens.

Let me know if the generated preset works for you.

Jones

User avatar
fma38
Moderator
 
Posts: 5850
Likes: 2 posts
Liked in: 2 posts
Joined: Wed Dec 07, 2005 6:21 pm
Location: Grenoble, France
Info

by fma38 » Tue Jul 21, 2009 7:00 am

But what if it is not possible to go to zenith position?
Frédéric

User avatar
Paul
Member
 
Posts: 778
Likes: 0 post
Liked in: 0 post
Joined: Sat Aug 30, 2008 4:46 pm
Location: Bonn, Germany
Info

by Paul » Tue Jul 21, 2009 7:10 am

sjhenry wrote:Paul,
I updated the script to generate correct number of pictures for the 360/180. The current script shows me 2X8 pictures in portrait or 3X5 for landscape mode with crop factor 2 and 9mm lens.

Let me know if the generated preset works for you.
Jones

it doesn't cover the 360x180:

Source:
Format: 35mm (2 Crop, 4:3 Aspect Ratio, Portrait orientation)
Focal Length: 9mm lens, overlap: 25%, Horizontal FOV: 50.5, Vertical FOV: 73.1
Rows: 2, Columns: 8
Target:
For 360/180, Horizontal Size: 16920, Vertical Size: 8460
Mosaic Horizontal FOV: 426.5, Vertical FOV: 163.0
Mosaic Horizontal Size: 20046, Vertical Size: 7661
Paul

close, but no cigar ... ... ...

User avatar
Paul
Member
 
Posts: 778
Likes: 0 post
Liked in: 0 post
Joined: Sat Aug 30, 2008 4:46 pm
Location: Bonn, Germany
Info

by Paul » Tue Jul 21, 2009 8:44 am

fma38 wrote:But what if it is not possible to go to zenith position?

Frederic:
What does PW, if the preset tries to move the Merlin beyond the Limits, when Limits are activated?
Does PW stop at limit and what is the effect to following movements?
Paul

close, but no cigar ... ... ...

User avatar
fma38
Moderator
 
Posts: 5850
Likes: 2 posts
Liked in: 2 posts
Joined: Wed Dec 07, 2005 6:21 pm
Location: Grenoble, France
Info

by fma38 » Tue Jul 21, 2009 9:30 am

Papywizard checks if a position is inside the limits. If not, the position is ignored, the next one is checked, and so on.

Note that you see what are the ignored position when you open the shooting dialog: they are displayed in red.
Frédéric

no avatar
sjhenry
Member
 
Topic author
Posts: 146
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 10, 2009 1:43 am
Location: Colorado, USA
Info

by sjhenry » Tue Jul 21, 2009 3:29 pm

Paul,

Yes. It is around 180 degrees. The reason is that I exclude about 20 degrees from 180 degrees due to the large head. I can remove that restriction. The reason I put that restriction is for larger focal length where it does not make any sense to take 2 or more rows of 30 plus shots taking the base of the head. Let me know if you want to remove the restriction.

Jones

User avatar
Paul
Member
 
Posts: 778
Likes: 0 post
Liked in: 0 post
Joined: Sat Aug 30, 2008 4:46 pm
Location: Bonn, Germany
Info

by Paul » Tue Jul 21, 2009 3:43 pm

Jones

I would like you remove the restriction.

Thanks ...

I did not get a proper stitch with just two rows for 9mm FL crop 3 4/3, it seems that it only works if the zenith and nadir has sufficient overlap too.

these two are 5-7-5 shots at 55,0,-55 degree
http://www.360cities.net/image/japanese-garden-bonn-1
http://www.360cities.net/image/japanese-garden-bonn-2

with 7-7-7 it was more difficult to stitch due the larger zenith and nadir overlapping
Paul

close, but no cigar ... ... ...

no avatar
sjhenry
Member
 
Topic author
Posts: 146
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 10, 2009 1:43 am
Location: Colorado, USA
Info

by sjhenry » Wed Jul 22, 2009 1:34 am

I removed the restriction in the script. When I did 40% overlap, I get a similar to your numbers like 8-8-8.

Jones

User avatar
gkaefer
Member
 
Posts: 3550
Likes: 0 post
Liked in: 15 posts
Joined: Tue Jun 09, 2009 1:01 pm
Location: Salzburg
Info

by gkaefer » Sun Jul 26, 2009 10:55 am

using the 360 preset generator with following values (and only in this combination) gives me an error and script failes:

crop 1.6
aspet 3:2
overlap 25
orientation landscape
focal length 18
width 3888
height 2592


portrait instead works
17 or 19 focal instead works
overlap 20 instead works

error I get:

Code: Select all
Details zum Fehler auf der Webseite

Benutzer-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
Zeitstempel: Sun, 26 Jul 2009 09:53:51 UTC

Meldung: 'numa.1' ist Null oder kein Objekt
Zeile: 90
Zeichen: 9
Code: 0
URI: file://192.168.0.200/georg/downloads/papywizzard/pw_preset/pw_360_preset.html

numa.1 is null or no object
line 90
character 9

(IE8 32 bit, Windows7RC64bit)

Liebe Gruesse,
Georg
Last edited by gkaefer on Sun Jul 26, 2009 10:58 am, edited 1 time in total.

User avatar
gkaefer
Member
 
Posts: 3550
Likes: 0 post
Liked in: 15 posts
Joined: Tue Jun 09, 2009 1:01 pm
Location: Salzburg
Info

by gkaefer » Sun Jul 26, 2009 2:14 pm

is it possible to create a sticky preset topic containing all links to the existing (four?) preset threads?
Liebe Gruesse,
Georg

User avatar
gkaefer
Member
 
Posts: 3550
Likes: 0 post
Liked in: 15 posts
Joined: Tue Jun 09, 2009 1:01 pm
Location: Salzburg
Info

by gkaefer » Sun Jul 26, 2009 4:53 pm

issue: setting focal length with preset generator CONTRA PW logfile value for focal length.
negative effects: no...(?)

1. I choose with the preset generator the focal length of my lens used to correct value, lets say 18mm.
2. important: the matrix register of pw contains a focal length lets say 111.1mm (IMAGE 02)
3. use this preset to take my pano (IMAGE 01)
4. the pw produces a logfile, containing a block <focal> wich hold the value set by matrix register and not set by preset. (IMAGE03)

autopano import does not affect this. using both version of logfiles (focal 18.0 and focal 111.1) for pw import module gives me same (correct) result.

Liebe Gruesse,
Georg






Last edited by gkaefer on Sun Jul 26, 2009 4:55 pm, edited 1 time in total.

User avatar
fma38
Moderator
 
Posts: 5850
Likes: 2 posts
Liked in: 2 posts
Joined: Wed Dec 07, 2005 6:21 pm
Location: Grenoble, France
Info

by fma38 » Sun Jul 26, 2009 7:05 pm

A preset file does not contain any focal information; then, when Papywizard writes the header of the xml data file, it reads its internal informations. If you didn't change the focal according to the one you are really using, then the header is wrong.

But this header is not used by APP; instead, it reads the real focal from the EXIF of the pictures, which is a much precious information.
Frédéric

no avatar
sjhenry
Member
 
Topic author
Posts: 146
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 10, 2009 1:43 am
Location: Colorado, USA
Info

by sjhenry » Fri Jul 31, 2009 1:57 pm

Goerg,

Thanks for the bug report. It sounds like a Javascript error within the round21 function. I have to add more checking before parsing the number. I'll fix it and upload a new version soon.

Jones

no avatar
Ludek007
New member
 
Posts: 7
Likes: 0 post
Liked in: 0 post
Joined: Wed Jun 03, 2009 1:50 pm
Info

by Ludek007 » Mon Aug 24, 2009 1:46 pm

Hi all,

360x180 full sphere pano?

Classic photo 30mm / FF
3 picts @ +75°
6 picts @ +39°
6 picts @ +16°
6 picts @ -16°
6 picts @ -39°
3 picts @ -75°

360/180 Preset Generator
Source:
Format: 35mm (1 Crop, 3:2 Aspect Ratio, Portrait orientation)
Focal Length: 30mm lens, overlap: 25%, Horizontal FOV: 32.7, Vertical FOV: 51.6
Rows: 4, Columns: 12
Target:
For 360/180, Horizontal Size: 32760, Vertical Size: 16380
Mosaic Horizontal FOV: 407.9, Vertical FOV: 217.3
Mosaic Horizontal Size: 37119, Vertical Size: 19774

360x180 SPHERE?

Regards
Ludek
Last edited by Ludek007 on Mon Aug 24, 2009 1:46 pm, edited 1 time in total.
5D mark II, Merlin, Nodal Ninja, special full vr 360°

User avatar
gkaefer
Member
 
Posts: 3550
Likes: 0 post
Liked in: 15 posts
Joined: Tue Jun 09, 2009 1:01 pm
Location: Salzburg
Info

by gkaefer » Sat Sep 05, 2009 5:07 pm

Dear Jones,

I've ongoing problems using your 360x180 preset generator.
problems results from how the pitch value range is definded.
The pitch values of the resulting presets are ranged from 0.0 to -180.0

but with this (I use it only with landscape mode, cant use portrait, because of NPP) APG has ongoing problems to position the images correct.

I can solve this by adding +90 to the pitch values of the resulting manually to each shoot line...
I would rather change your presetgenerator on correct place once ;-)

where have I to change which value so the resulting pitch values of the shootings are within the range +90 and -90 instead of 0 and -180?

manny thanks in advance,
Liebe Gruesse,
Georg

no avatar
sjhenry
Member
 
Topic author
Posts: 146
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 10, 2009 1:43 am
Location: Colorado, USA
Info

by sjhenry » Wed Oct 21, 2009 3:56 am

Georg,

As you found out, the current preset generator assumes the 360/180 as a rectangular sheet with the top-left as the 0 yaw and 0 pitch. You can change the values of yaw, pitch by changing the code in initialize_positions function. It starts with 0 yaw and 0 pitch. You can add your offset of 90 degree before the for loop.

I am also thinking of changing the assumption of "360/180 as a rectangular sheet with the top-left as the 0 yaw and 0 pitch" to take nadir shot, zenith shot and the rest of the FOV as a cylinder - the classical manual head way of doing things. I'll find sometime to do it and upload the script.

Jones

no avatar
ReverZ
New member
 
Posts: 4
Likes: 0 post
Liked in: 0 post
Joined: Mon Oct 19, 2009 11:15 pm
Info

by ReverZ » Tue Nov 10, 2009 2:01 am

Hi,

it would be great if you could change the generator to enable the "Cylinder + Zenith + Nadir" way.

Best Regards,
ReverZ
Last edited by ReverZ on Tue Nov 10, 2009 2:02 am, edited 1 time in total.

no avatar
solock
Member
 
Posts: 64
Likes: 0 post
Liked in: 0 post
Joined: Tue Apr 14, 2009 4:52 pm
Location: lehigh valley pa
Info

by solock » Sun Feb 07, 2010 7:08 pm

What is the overall goal of this app?

The reason I ask is it appears to me to be usefull for having some canned coverages, but it doesnt take into account the coverage at the poles as needing a lot less images, so in the end it gives you a preset, but wont necessarily speed the shooting of the first and last rows.

Amy I mistaken?

Can such a generator be made to make the first and last rows account for the lower necessary shots??

Thanks,

Steve
Canon 50D, 20D, 1D MKII
Tok 10-17FishEye,Canon 10-22, 24-70 2.8, 50 1.4, 70-200 2.8IS, 300 2.8,1.4x,2.0x
303SPH, Panosaurus, Merlin+Parallax Bluetooth+USB to PC and Nokia N810

Next

Who is online

Users browsing this forum: No registered users and 1 guest