On Sun, 2010-06-27 at 16:59 +0200, Jan Martin wrote:
> Hi all,
>
> I need your help with stitching these frames extracted from a YouTube
> video.
> There is nearly no overlapping.
>
> http://bit.ly/aEYOZD
>
> Can this be done at all?
It can be done (with some difficulty). There is a small gap in the image
I produced though, since neither image covers that area.
> If so how? (I am a beginner)
* Split the input images in two. Save each half as a separate
image.
* Load the the two images in Hugin.
* Set their projection to circular fisheye. Use an initial field
of view of about 185 degrees.
* On the control points tab, place a few control points linking
matching features on both sides of the images. Pick features in
the distance as there is some paralax error (when you have
choice at all, since the overlap is so narrow). Hugin might try
to guess more accurate positions but I found it just made them
worse in this case, so I turned of auto fine-tune from the
bottom right of the tab. The more control points the better, but
they must all be positioned accurately.
* On the optimiser tab, optimise positions & view. Hugin then
finds a reasonable angle for the second image in relation to the
first, and a more likely field of view for the camera.
* On the crop tab, shrink the circle slightly for each image to
crop out the black outline of the image. Ignore the bit cut off
the side for now.
* On the Mask tab, remove the black bit cropped out from the sides
of the circle. Select an image, press add new mask, then click
to place the corners of a polygon that covers the black bits
that should be in the circle. Repeat for the other image.
* Use a preview window to check it looks OK. There will be some
error on the bits closest to the camera, and a hole on one side,
but the bits in the distance should line up.
* On the Stitcher tab, press calculate optimal size.
* Stitch or send to batch.
>
> Please post the .pto and pto.mk files.
Attached. I named the images 00000001l.png for the left of 00000001.jpg
and 00000001r.png for the right.
--
You received this message because you are subscribed to the Google Groups
"hugin and other free panoramic software" group.
A list of frequently asked questions is available at:
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at http://groups.google.com/group/hugin-ptx# makefile for panorama stitching, created by hugin
# Tool configuration
NONA=nona
PTSTITCHER=PTStitcher
PTMENDER=PTmender
PTBLENDER=PTblender
PTMASKER=PTmasker
PTROLLER=PTroller
ENBLEND=enblend
ENFUSE=enfuse
SMARTBLEND=smartblend.exe
HDRMERGE=hugin_hdrmerge
RM=rm
EXIFTOOL=exiftool
# Project parameters
HUGIN_PROJECTION=2
HUGIN_HFOV=360
HUGIN_WIDTH=826
HUGIN_HEIGHT=413
# options for the programs
NONA_LDR_REMAPPED_COMP=
NONA_OPTS=
ENBLEND_OPTS=-m1536 -w -f826x413
ENBLEND_LDR_COMP=
ENBLEND_HDR_COMP=
HDRMERGE_OPTS=-m avg -c
ENFUSE_OPTS=-m1536 -w
EXIFTOOL_COPY_ARGS=-ImageDescription -Make -Model -Artist -WhitePoint
-Copyright -GPS:all -DateTimeOriginal -CreateDate -UserComment -ColorSpace
-OwnerName -SerialNumber
# the output panorama
LDR_REMAPPED_PREFIX=00000001
LDR_REMAPPED_PREFIX_SHELL=00000001
HDR_STACK_REMAPPED_PREFIX=00000001_hdr_
HDR_STACK_REMAPPED_PREFIX_SHELL=00000001_hdr_
LDR_EXPOSURE_REMAPPED_PREFIX=00000001_exposure_layers_
LDR_EXPOSURE_REMAPPED_PREFIX_SHELL=00000001_exposure_layers_
PROJECT_FILE=/home/james/Desktop/tests/00000001.pto
PROJECT_FILE_SHELL=/home/james/Desktop/tests/00000001.pto
LDR_BLENDED=00000001.png
LDR_BLENDED_SHELL=00000001.png
LDR_STACKED_BLENDED=00000001_fused.png
LDR_STACKED_BLENDED_SHELL=00000001_fused.png
LDR_EXPOSURE_LAYERS_FUSED=00000001_blended_fused.png
LDR_EXPOSURE_LAYERS_FUSED_SHELL=00000001_blended_fused.png
HDR_BLENDED=00000001_hdr.exr
HDR_BLENDED_SHELL=00000001_hdr.exr
# first input image
INPUT_IMAGE_1=/home/james/Desktop/tests/00000001l.png
INPUT_IMAGE_1_SHELL=/home/james/Desktop/tests/00000001l.png
# all input images
INPUT_IMAGES=/home/james/Desktop/tests/00000001l.png\
/home/james/Desktop/tests/00000001r.png
INPUT_IMAGES_SHELL=/home/james/Desktop/tests/00000001l.png\
/home/james/Desktop/tests/00000001r.png
# remapped images
LDR_LAYERS=000000010000.tif\
000000010001.tif
LDR_LAYERS_SHELL=000000010000.tif\
000000010001.tif
# remapped images (hdr)
HDR_LAYERS=00000001_hdr_0000.exr\
00000001_hdr_0001.exr
HDR_LAYERS_SHELL=00000001_hdr_0000.exr\
00000001_hdr_0001.exr
# remapped maxval images
HDR_LAYERS_WEIGHTS=00000001_hdr_0000_gray.pgm \
00000001_hdr_0001_gray.pgm
HDR_LAYERS_WEIGHTS_SHELL=00000001_hdr_0000_gray.pgm\
00000001_hdr_0001_gray.pgm
# stacked images
HDR_STACKS_NUMBERS = 0 1
HDR_STACK_0 = 00000001_stack_hdr_0000.exr
HDR_STACK_0_SHELL = 00000001_stack_hdr_0000.exr
HDR_STACK_0_INPUT = 00000001_hdr_0000.exr
HDR_STACK_0_INPUT_SHELL = 00000001_hdr_0000.exr
HDR_STACK_1 = 00000001_stack_hdr_0001.exr
HDR_STACK_1_SHELL = 00000001_stack_hdr_0001.exr
HDR_STACK_1_INPUT = 00000001_hdr_0001.exr
HDR_STACK_1_INPUT_SHELL = 00000001_hdr_0001.exr
HDR_STACKS = $(HDR_STACK_0) $(HDR_STACK_1)
HDR_STACKS_SHELL = $(HDR_STACK_0_SHELL) $(HDR_STACK_1_SHELL)
# number of image sets with similar exposure
LDR_EXPOSURE_EXPOSURE_LAYERS_NUMBERS = 0
LDR_EXPOSURE_LAYER_0 = 00000001_exposure_00.png
LDR_EXPOSURE_LAYER_0_SHELL = 00000001_exposure_00.png
LDR_EXPOSURE_LAYER_0_INPUT = 00000001_exposure_layers_0000.tif\
00000001_exposure_layers_0001.tif
LDR_EXPOSURE_LAYER_0_INPUT_SHELL = 00000001_exposure_layers_0000.tif\
00000001_exposure_layers_0001.tif
LDR_EXPOSURE_LAYER_0_INPUT_PTMENDER = 000000010000.tif\
000000010001.tif
LDR_EXPOSURE_LAYER_0_INPUT_PTMENDER_SHELL = 000000010000.tif\
000000010001.tif
LDR_EXPOSURE_LAYER_0_EXPOSURE = 1
LDR_EXPOSURE_LAYERS = $(LDR_EXPOSURE_LAYER_0)
LDR_EXPOSURE_LAYERS_SHELL = $(LDR_EXPOSURE_LAYER_0_SHELL)
LDR_EXPOSURE_LAYERS_REMAPPED = 00000001_exposure_layers_0000.tif\
00000001_exposure_layers_0001.tif
LDR_EXPOSURE_LAYERS_REMAPPED_SHELL = 00000001_exposure_layers_0000.tif\
00000001_exposure_layers_0001.tif
# stacked images for enfuse or other automatic exposure blending tools
LDR_STACKS_NUMBERS = 0 1
LDR_STACK_0 = 00000001_stack_ldr_0000.tif
LDR_STACK_0_SHELL = 00000001_stack_ldr_0000.tif
LDR_STACK_0_INPUT = 00000001_exposure_layers_0000.tif
LDR_STACK_0_INPUT_SHELL = 00000001_exposure_layers_0000.tif
LDR_STACK_1 = 00000001_stack_ldr_0001.tif
LDR_STACK_1_SHELL = 00000001_stack_ldr_0001.tif
LDR_STACK_1_INPUT = 00000001_exposure_layers_0001.tif
LDR_STACK_1_INPUT_SHELL = 00000001_exposure_layers_0001.tif
LDR_STACKS = $(LDR_STACK_0) $(LDR_STACK_1)
LDR_STACKS_SHELL = $(LDR_STACK_0_SHELL) $(LDR_STACK_1_SHELL)
DO_LDR_BLENDED = 1
TEMP_FILES_SHELL = $(LDR_LAYERS_SHELL)
all: $(LDR_BLENDED)
clean:
-$(RM) $(TEMP_FILES_SHELL)
test:
@echo -n 'Checking nona...'
@-$(NONA) --help > /dev/null 2>&1 && echo '[OK]' || echo '[FAILED]'
@echo -n 'Checking enblend...'
@-$(ENBLEND) -h > /dev/null 2>&1 && echo '[OK]' || echo '[FAILED]'
@echo -n 'Checking enfuse...'
@-$(ENFUSE) -h > /dev/null 2>&1 && echo '[OK]' || echo '[FAILED]'
@echo -n 'Checking hugin_hdrmerge...'
@-$(HDRMERGE) -h > /dev/null 2>&1 && echo '[OK]' || echo '[FAILED]'
@echo -n 'Checking exiftool...'
@-$(EXIFTOOL) -ver > /dev/null 2>&1 && echo '[OK]' || echo '[FAILED]'
# Rules for ordinary TIFF_m output
000000010000.tif: /home/james/Desktop/tests/00000001l.png $(PROJECT_FILE)
$(NONA) $(NONA_OPTS) $(NONA_LDR_REMAPPED_COMP) -r ldr -m TIFF_m -o
$(LDR_REMAPPED_PREFIX_SHELL) -i 0 $(PROJECT_FILE_SHELL)
000000010001.tif: /home/james/Desktop/tests/00000001r.png $(PROJECT_FILE)
$(NONA) $(NONA_OPTS) $(NONA_LDR_REMAPPED_COMP) -r ldr -m TIFF_m -o
$(LDR_REMAPPED_PREFIX_SHELL) -i 1 $(PROJECT_FILE_SHELL)
# Rules for merge to hdr output
00000001_hdr_0000.exr: /home/james/Desktop/tests/00000001l.png $(PROJECT_FILE)
$(NONA) $(NONA_OPTS) -r hdr -m EXR_m -o
$(HDR_STACK_REMAPPED_PREFIX_SHELL) -i 0 $(PROJECT_FILE_SHELL)
00000001_hdr_0001.exr: /home/james/Desktop/tests/00000001r.png $(PROJECT_FILE)
$(NONA) $(NONA_OPTS) -r hdr -m EXR_m -o
$(HDR_STACK_REMAPPED_PREFIX_SHELL) -i 1 $(PROJECT_FILE_SHELL)
# Rules for exposure layer output
00000001_exposure_layers_0000.tif: /home/james/Desktop/tests/00000001l.png
$(PROJECT_FILE)
$(NONA) $(NONA_OPTS) $(NONA_LDR_REMAPPED_COMP) -r ldr -e 1 -m TIFF_m -o
$(LDR_EXPOSURE_REMAPPED_PREFIX_SHELL) -i 0 $(PROJECT_FILE_SHELL)
00000001_exposure_layers_0001.tif: /home/james/Desktop/tests/00000001r.png
$(PROJECT_FILE)
$(NONA) $(NONA_OPTS) $(NONA_LDR_REMAPPED_COMP) -r ldr -e 1 -m TIFF_m -o
$(LDR_EXPOSURE_REMAPPED_PREFIX_SHELL) -i 1 $(PROJECT_FILE_SHELL)
$(HDR_STACK_0) : $(HDR_STACK_0_INPUT)
$(HDRMERGE) $(HDRMERGE_OPTS) -o $(HDR_STACK_0_SHELL)
$(HDR_STACK_0_INPUT_SHELL)
$(HDR_STACK_1) : $(HDR_STACK_1_INPUT)
$(HDRMERGE) $(HDRMERGE_OPTS) -o $(HDR_STACK_1_SHELL)
$(HDR_STACK_1_INPUT_SHELL)
$(LDR_STACK_0) : $(LDR_STACK_0_INPUT)
$(ENFUSE) $(ENFUSE_OPTS) -o $(LDR_STACK_0_SHELL)
$(LDR_STACK_0_INPUT_SHELL)
- $(EXIFTOOL) -overwrite_original_in_place -TagsFromFile
$(INPUT_IMAGE_1_SHELL) $(EXIFTOOL_COPY_ARGS) $(LDR_STACK_0_SHELL)
$(LDR_STACK_1) : $(LDR_STACK_1_INPUT)
$(ENFUSE) $(ENFUSE_OPTS) -o $(LDR_STACK_1_SHELL)
$(LDR_STACK_1_INPUT_SHELL)
- $(EXIFTOOL) -overwrite_original_in_place -TagsFromFile
$(INPUT_IMAGE_1_SHELL) $(EXIFTOOL_COPY_ARGS) $(LDR_STACK_1_SHELL)
$(LDR_BLENDED) : $(LDR_LAYERS)
$(ENBLEND) $(ENBLEND_LDR_COMP) $(ENBLEND_OPTS) -o $(LDR_BLENDED_SHELL)
$(LDR_LAYERS_SHELL)
- $(EXIFTOOL) -overwrite_original_in_place -TagsFromFile
$(INPUT_IMAGE_1_SHELL) $(EXIFTOOL_COPY_ARGS) $(LDR_BLENDED_SHELL)
$(LDR_EXPOSURE_LAYER_0) : $(LDR_EXPOSURE_LAYER_0_INPUT)
$(ENBLEND) $(ENBLEND_LDR_COMP) $(ENBLEND_OPTS) -o
$(LDR_EXPOSURE_LAYER_0_SHELL) $(LDR_EXPOSURE_LAYER_0_INPUT_SHELL)
-$(EXIFTOOL) -overwrite_original_in_place -TagsFromFile
$(INPUT_IMAGE_1_SHELL) $(EXIFTOOL_COPY_ARGS) $(LDR_EXPOSURE_LAYER_0_SHELL)
$(LDR_STACKED_BLENDED) : $(LDR_STACKS)
$(ENBLEND) $(ENBLEND_LDR_COMP) $(ENBLEND_OPTS) -o
$(LDR_STACKED_BLENDED_SHELL) $(LDR_STACKS_SHELL)
- $(EXIFTOOL) -overwrite_original_in_place -TagsFromFile
$(INPUT_IMAGE_1_SHELL) $(EXIFTOOL_COPY_ARGS) $(LDR_STACKED_BLENDED_SHELL)
$(LDR_EXPOSURE_LAYERS_FUSED) : $(LDR_EXPOSURE_LAYERS)
$(ENFUSE) $(ENBLEND_LDR_COMP) $(ENFUSE_OPTS) -o
$(LDR_EXPOSURE_LAYERS_FUSED_SHELL) $(LDR_EXPOSURE_LAYERS_SHELL)
- $(EXIFTOOL) -overwrite_original_in_place -TagsFromFile
$(INPUT_IMAGE_1_SHELL) $(EXIFTOOL_COPY_ARGS) $(LDR_EXPOSURE_LAYERS_FUSED_SHELL)
$(HDR_BLENDED) : $(HDR_STACKS)
$(ENBLEND) $(ENBLEND_HDR_COMP) $(ENBLEND_OPTS) -o $(HDR_BLENDED_SHELL)
$(HDR_STACKS_SHELL)
$(LDR_REMAPPED_PREFIX)_multilayer.tif : $(LDR_LAYERS)
tiffcp $(LDR_LAYERS_SHELL) $(LDR_REMAPPED_PREFIX_SHELL)_multilayer.tif
$(LDR_REMAPPED_PREFIX)_fused_multilayer.tif : $(LDR_STACKS)
$(LDR_EXPOSURE_LAYERS)
tiffcp $(LDR_STACKS_SHELL) $(LDR_EXPOSURE_LAYERS_SHELL)
$(LDR_REMAPPED_PREFIX_SHELL)_fused_multilayer.tif
$(LDR_REMAPPED_PREFIX)_multilayer.psd : $(LDR_LAYERS)
PTtiff2psd -o $(LDR_REMAPPED_PREFIX_SHELL)_multilayer.psd
$(LDR_LAYERS_SHELL)
$(LDR_REMAPPED_PREFIX)_fused_multilayer.psd : $(LDR_STACKS)
$(LDR_EXPOSURE_LAYERS)
PTtiff2psd -o $(LDR_REMAPPED_PREFIX_SHELL)_fused_multilayer.psd
$(LDR_STACKS_SHELL) $(LDR_EXPOSURE_LAYERS_SHELL)
# hugin project file
#hugin_ptoversion 2
p f2 w826 h413 v360 E1 R0 n"TIFF_m c:NONE r:CROP"
m g1 i0 f0 m2 p0.00784314
# image lines
#-hugin autoCenterCrop=1 cropFactor=1
i w427 h428 f2 v186.354713642617 Ra0 Rb0 Rc0 Rd0 Re0 Eev1 Er1 Eb1 r0 p0 y0 TrX0
TrY0 TrZ0 j0 a0 b0 c0 d0 e0 g0 t0 Va1 Vb0 Vc0 Vd0 Vx0 Vy0 S0,426,0,428 Vm5 u10
n"00000001l.png"
#-hugin autoCenterCrop=1 cropFactor=1
i w427 h428 f2 v=0 Ra=0 Rb=0 Rc=0 Rd=0 Re=0 Eev1 Er1 Eb1 r-0.0369675555962819
p1.68240498393534 y-178.50269093977 TrX0 TrY0 TrZ0 j0 a=0 b=0 c=0 d=0 e=0 g=0
t=0 Va=0 Vb=0 Vc=0 Vd=0 Vx=0 Vy=0 S1,425,0,428 Vm5 u10 n"00000001r.png"
# specify variables that should be optimized
v v0
v r1
v p1
v y1
v
# control points
c n0 N1 x423.550888529887 y224.192245557351 X8 Y225 t0
c n0 N1 x424.24071082391 y197.978998384491 X11 Y198 t0
c n0 N1 x415.962843295638 y160.72859450727 X13.7741935483871 Y162.535483870968
t0
c n0 N1 x26 y133 X399.451612903226 Y132.920967741935 t0
c n0 N1 x411 y268.5 X9.5 Y267.5 t0
c n0 N1 x15 y151 X404 Y154 t0
c n0 N1 x13.5 y166 X412 Y166.5 t0
c n0 N1 x423 y235.5 X9 Y235 t0
c n0 N1 x423.5 y209.5 X6.5 Y210 t0
c n0 N1 x359 y72 X63 Y66.5 t0
# masks
k i0 t0 p"10 114 10 325 2 325 2 121"
k i1 t0 p"416 138 416 297 424 296 425 140"
#hugin_optimizeReferenceImage 0
#hugin_blender enblend
#hugin_remapper nona
#hugin_enblendOptions -m1536
#hugin_enfuseOptions -m1536
#hugin_hdrmergeOptions -m avg -c
#hugin_outputLDRBlended true
#hugin_outputLDRLayers false
#hugin_outputLDRExposureRemapped false
#hugin_outputLDRExposureLayers false
#hugin_outputLDRExposureBlended false
#hugin_outputLDRExposureLayersFused false
#hugin_outputHDRBlended false
#hugin_outputHDRLayers false
#hugin_outputHDRStacks false
#hugin_outputLayersCompression PACKBITS
#hugin_outputImageType png
#hugin_outputImageTypeCompression NONE
#hugin_outputJPEGQuality 100
#hugin_outputImageTypeHDR exr
#hugin_outputImageTypeHDRCompression