Re: [hugin-ptx] Microscopy set of images and stitching them by using Hugin without image deformation

2014-03-23 Thread Marius Loots
Hallo Mario,

Thursday, March 20, 2014, 8:30:17 PM, you wrote:
Mario> As the title sais, I recently obtained several images from a simple 
sample
Mario> with a microscope. And I would like to stitch them without deforming 
them.
Mario> How can it be done using Hugin?

It is relatively easy and you get good results. This is a workflow I
use, written up (in 2007) for an older version of hugin, but easily adapted for
the newest versions. As mentioned, it is based on the tutorial for
scans. I am not at the moment able to update for the
newest version, but have added some comments in brackets where I can
remember changes from the older version. Will update as soon as I can:

---
I am stitching microscope images on a daily basis and think I have
sorted out most of the glitches in this regard with the current
version of hugin on the windows platform. The results can be seen at:
http://histoweb.co.za/
Not all of these are stitches, and this is a scratch-pad of projects,
but look at the links labeled "Lae vergroting" or "Oorsig".

This is the workflow I follow, based on and modified from the
scanning tutorial at http://hugin.sourceforge.net/tutorials/scans/:

1. Software used: Windows XP, Hugin 0.7 beta 4, autopano 1.03 and
   enblend 3.0
   (now using the 2012 version of hugin and on a newer machine; hugin
2013 has changes in the layout that makes the workflow a lot more
difficult for slides; using hugin's CPFind without Celeste and NOT
looking for vertical control points. Steps 2, 3 and 4 is skipped and
control points generated after step 10)

2. Images: 2880 x 2304 pixels in all sorts of orientations and
   directions. I have used both tiff and jpeg but have settled on jpeg
   in favour of smaller initial sizes as a compromise in favour of
   storage and handling. The quality difference are small if not
   unnoticeable.
   (faster pc now means faster stitches, so image dimensions not relevant
   anymore)

3. Place all images into a directory together with autopano. Run
   autopano with the following command: autopano.exe /project:hugin

4. Open the resulting project file in hugin

(drag and drop images into hugin,


5. Go to the Camera and Lens tab.
6. Select all the images.
7. Change degrees of view to 40.
8. None of the inherit boxes are ticked and all values are 0. Focal
   length and crop factor will change to some value, which I ignore
   (out of ignorance?).
9. Go to the Stitcher tab.
10. Change projection to rectilinear, Field of view Horizontal to 90
and Field of view vertical to 90.

(generate control points here)

11. Go to the Optimizer tab.
12. Select Custom Parameters.
13. Clear Yaw (y), Pitch (p), Distortion(a), Barrel (b) and Distortion
(c).
14. Select all images EXCLUDING the anchor image for each of roll (r),
view (v), x-shift (d) and y-shift (e). The anchor image will, in
each case, be the first image in the column.

In my setup this display the bug where, in the lens parameter
sections, all the images are labeled as the total number of images
in the project. But as the anchor image is the first in the
column, it is easy to tick the other boxes. I have never
experimented with making any of the other images the anchor, as my
process works fine for me.
15. Optimize.
16. The results are never 100% on, but am average control point
distance of more than 5 means something is wrong. Also see note
below on stitching many images.
17. Preview the result.
18. In the preview, NEVER touch the center icon.
19. Click the Fit icon to see the complete image.
20. Adjust the sliders if necessary to see all the edges of the image.
21. Go to the Camera and Lens Tab and select the first (anchor) image.
22. Adjust the Image Center Shift - Horizontal (d) and Vertical (e)
values to move the image across the field of view to get the
complete image into the center of the field. Optimize after each
adjustment and check the result.
23. Go to the Stitcher Tab.
24. Click Calculate optimal size.
25. Output options Image format: TIFF
26. Output options: Soft Blending
27. Compression LZW (although the result is not compressed).
28. Click Stitch now!

If you have a large number of images (large being an undetermined
number that I have been unable to quantify, the result will look
distorted. In this case, there are two approaches that I have
followed.

Case 1.
1. Optimize and accept the result.
2. Preview the result.
3. Click on the None Icon to remove all images, then add Image 0 and
   Image 1, by clicking on buttons below displayed images.
4. In the Hugin preferences, Misc Tab, make sure to tick the box that
   says Optimize and stitch only images selected in preview window.
5. Now Optimize as described above.
6. Go to the preview and add the next image.
7. Optimize, Preview, Add next, Rinse, Repeat.
8. As a final step, adjust the Image Center Shift as above.

Case 2 is the same as above, except do no optimize to start. Preview
and 

Re: [hugin-ptx] Re: Hugin 2014.rc1 and Python scripting, doesn't work

2014-03-23 Thread Robert Lesac
Hi,
There is no RC2 build for for Windows yet.
At least I can stop muck around trying to fix it.
Thanks!

On Sunday, March 23, 2014 5:43:16 PM UTC+1, Stefan Peter wrote:
>
> On 23.03.2014 15:41, Robert Lesac wrote: 
> > Update: 
> > Added PYTHONPATH (pointing to the hugin/bin) to my system variables, 
> > didn't help with Hugin, but Python now imports HSI successfully. 
>
> Python scripting was broken with RC1, try RC2 (no idea if RC2 has been 
> packaged for Mac though). 
>
>
> > 
> > On Sunday, March 23, 2014 2:35:14 PM UTC+1, Robert Lesac wrote: 
> > 
> > Hi, 
> > I wanted to try out the new scripting interface, but for the life of 
> > me can't get it to work. 
> > Setup: HuginSetup_2014.0.0-rc1_64bit_Windows_Python + Python 3.3.5 + 
> > Win7 64x 
> > From the Hugin interface all scripts return -1. 
> > 
> > Manually running a script complains about HSI not being available, 
> > so I copied HSI.* to the scripts directory and the script will run 
> > from the command line. 
> > From Hugin I still get the same error. 
> > 
> > Trying 'import hsi' from the Python interpreter just gets me a 
> > complaint 'ImportError: No module named 'hsi''. 
> > Seems to me it might be a path mixup, any ideas how to fix it? 
> > 
> > 
> > Thanks! 
> > 
> > -- 
> > 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/74fac189-a2bb-49a0-a150-a322bc0f8f6f%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/hugin-ptx/74fac189-a2bb-49a0-a150-a322bc0f8f6f%40googlegroups.com?utm_medium=email&utm_source=footer>.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>
> -- 
> "In summary, I think you are trying to solve a problem that may not 
> need to be solved, using a tool that is not meant to solve it, without 
> understanding what is causing your problems and without knowing how 
> the tool actually works in the first place :)" 
> Jeffrey J. Kosowsky on the backuppc mailing list 
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/d39fbf5a-cacd-48b8-83e4-b30c962ab2d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Re: Hugin 2014.rc1 and Python scripting, doesn't work

2014-03-23 Thread Stefan Peter
On 23.03.2014 15:41, Robert Lesac wrote:
> Update:
> Added PYTHONPATH (pointing to the hugin/bin) to my system variables,
> didn't help with Hugin, but Python now imports HSI successfully.

Python scripting was broken with RC1, try RC2 (no idea if RC2 has been
packaged for Mac though).

With kind regards

Stefan Peter


> 
> On Sunday, March 23, 2014 2:35:14 PM UTC+1, Robert Lesac wrote:
> 
> Hi,
> I wanted to try out the new scripting interface, but for the life of
> me can't get it to work.
> Setup: HuginSetup_2014.0.0-rc1_64bit_Windows_Python + Python 3.3.5 +
> Win7 64x
> From the Hugin interface all scripts return -1.
> 
> Manually running a script complains about HSI not being available,
> so I copied HSI.* to the scripts directory and the script will run
> from the command line.
> From Hugin I still get the same error.
> 
> Trying 'import hsi' from the Python interpreter just gets me a
> complaint 'ImportError: No module named 'hsi''.
> Seems to me it might be a path mixup, any ideas how to fix it?
> 
> 
> Thanks!
> 
> -- 
> 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+unsubscr...@googlegroups.com
> .
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/hugin-ptx/74fac189-a2bb-49a0-a150-a322bc0f8f6f%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.


-- 
"In summary, I think you are trying to solve a problem that may not
need to be solved, using a tool that is not meant to solve it, without
understanding what is causing your problems and without knowing how
the tool actually works in the first place :)"
Jeffrey J. Kosowsky on the backuppc mailing list



signature.asc
Description: OpenPGP digital signature


[hugin-ptx] Re: Hugin 2014.rc1 and Python scripting, doesn't work

2014-03-23 Thread Robert Lesac
Update:
Added PYTHONPATH (pointing to the hugin/bin) to my system variables, didn't 
help with Hugin, but Python now imports HSI successfully.

On Sunday, March 23, 2014 2:35:14 PM UTC+1, Robert Lesac wrote:
>
> Hi,
> I wanted to try out the new scripting interface, but for the life of me 
> can't get it to work.
> Setup: HuginSetup_2014.0.0-rc1_64bit_Windows_Python + Python 3.3.5 + Win7 
> 64x
> From the Hugin interface all scripts return -1.
>
> Manually running a script complains about HSI not being available, so I 
> copied HSI.* to the scripts directory and the script will run from the 
> command line.
> From Hugin I still get the same error.
>
> Trying 'import hsi' from the Python interpreter just gets me a complaint 
> 'ImportError: No module named 'hsi''.
> Seems to me it might be a path mixup, any ideas how to fix it?
>
>
> Thanks!
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/74fac189-a2bb-49a0-a150-a322bc0f8f6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[hugin-ptx] Hugin 2014.rc1 and Python scripting, doesn't work

2014-03-23 Thread Robert Lesac
Hi,
I wanted to try out the new scripting interface, but for the life of me 
can't get it to work.
Setup: HuginSetup_2014.0.0-rc1_64bit_Windows_Python + Python 3.3.5 + Win7 
64x
>From the Hugin interface all scripts return -1.

Manually running a script complains about HSI not being available, so I 
copied HSI.* to the scripts directory and the script will run from the 
command line.
>From Hugin I still get the same error.

Trying 'import hsi' from the Python interpreter just gets me a complaint 
'ImportError: No module named 'hsi''.
Seems to me it might be a path mixup, any ideas how to fix it?


Thanks!

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/b66baca8-aaac-4e53-b7fe-2c098f28ef7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.