10.5mm fisheye batch defish Hugin nona

Started Jun 21, 2012 | Discussions thread
ForumParentFirstPreviousNextNext unread
Flat view
_sem_
Veteran MemberPosts: 4,311
Like?
10.5mm fisheye batch defish Hugin nona
Jun 21, 2012

I've been looking for a comfortable way of mild-defishing the Nikkor 10.5mm fisheye, preferably for LR4. Unfortunately, the Fisheye Hemi PS plugin does not work in LR (yet?). I've got several comfortable options for defishing to rectilinear, but that tends so produce poor corners.

There is the free Hugin panorama software that may be abused for very nice defishing to a number of different projections. However, the GUI is a bit clumsy - I'd really prefer something I could run directly from LR or at least with little interaction.

I found a script for batch defishing images of the Samyang 8mm which runs the Hugin/nona over all images located in the same folder
http://www.flickr.com/groups/fish-eye/discuss/72157622921262553/ (xxk89xx)

http://www.personal-view.com/talks/discussion/3373/any-7mm-lenses-that-you-would-recommend/p1 (duartix)

With small modifications it seems to work at least approximately with the 10.5mm on D90

defish-panini.bat for the Panini equirectangular projection:

@echo off
set width=4288
set height=2848
mkdir panini
for /f %%a IN ('dir /b *.jpg') do (
echo Defishing %%a
echo p f16 w%width% h%height% v140 n"JPEG" > > defish.pto
echo o w%width% h%height% f2 v140 y0 p0 r0 n"%%a" > > defish.pto
echo m i0 > > defish.pto
"C:\Program Files\Hugin\bin\nona.exe" -o panini/P_%%a defish.pto
del defish.pto)

defish-rectilinear.bat for the rectilinear projection:

@echo off
set width=4288
set height=2848
mkdir rectilinear
for /f %%a IN ('dir /b *.jpg') do (
echo Defishing %%a
echo p f0 w%width% h%height% v115.702 n"JPEG" > > defish.pto
echo o w%width% h%height% f2 v140 y0 p0 r0 n"%%a" > > defish.pto
echo m i0 > > defish.pto
"C:\Program Files\Hugin\bin\nona.exe" -o rectilinear/R_%%a defish.pto
del defish.pto)

Explanation of the parameters here:
http://hugin.sourceforge.net/docs/nona/nona.txt

So, I first process my NEFs in LR4, export those fishy images I'd like to defish to jpg (could be 16-bit tif too if desired) in the same folder, run the batch, import the defished images to LR4, remove the surplus images.

Some remaining questions:

1. Should one adjust the parameters for the Nikkor 10.5mm, in particular the horizontal angle v140, v115.702... I've noticed I see different numbers running Hugin interactively but I don't know where to put them, and the last tab in Hugin is quite confusing once you start typing in numbers
How to find the correct numbers for other available projections?

2. Would somebody know the lens distortion parameters a,b,c, for the 10.5mm?

3. What to change with images in portrait orientation & how to automate processing in both orientations at once?

4. How to change filenames from P_????????.jpg to ????????_P.jpg (NOT ????????.jpg_P.jpg)?

Nikon 1 V1 Nikon D90
If you believe there are incorrect tags, please send us this post using our feedback form.
ForumParentFirstPreviousNextNext unread
Flat view
ForumParentFirstPreviousNextNext unread
Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark post MMy threads
Color scheme? Blue / Yellow