Sie sind auf Seite 1von 5

Stitch Panorama

2005 Thomas R. Metcalf Permission is granted to copy, distribute and/or modify this document under the terms of the !" #ree $ocumentation %icense, &ersion '.2 or any later (ersion published by the #ree )oft*are #oundation+ *ith no ,n(ariant )ections, no #ront-.o(er Te/ts, and no 0ac1-.o(er Te/ts.

History
(ersion 0.2, 2005 3une 4

Introduction
Stitch Panorama is a ,MP plug-in *hich ta1es t*o digital images and o(erlays one atop the other to ma1e a panorama. 5ith multiple applications of stitch panorama, any number of images can be combined into a large panorama. This documentation assumes that you are already familiar *ith ,MP. )ome things you *ill need to 1no* to run Stitch Panorama are ho* to load and sa(e images, ho* to 6oom and pan around an image, ho* to ma1e a selection in an image, ho* to crop an image, and ho* to flatten an image.

Installation
Requirements:

,MP (ersion 2.2 compiled to include python support. The plug-in *as de(eloped using ,MP (ersion 2.2.2 on a #edora .ore 7 %inu/ system. The plug-in may *or1 *ith other (ersions of ,MP or other operating systems, but this has not been tested.

Installation Procedure: !ote8 ,n the distribution, the plug-in code name includes the (ersion number. , drop the (ersion number belo* for clarity and call the program stitch.py, though in the distribution it *ill be called stitch_0.9.3.py 9or *hate(er the latest (ersion is:. Linux: Remo(e any old (ersions of stitch.py from your plug-in directory. .opy stitch.py to your gimp plug-in directory, e.g. ;/.gimp-2.2/plug-ins, then restart gimp and stitch panorama should appear in the <tns/"tils menu. Ma1e sure stitch.py is e/ecutable 9chmod =/ stitch.py:. Windows: %i1ely something similar to %inu/, but , don>t 1no* for sure since , don>t run *indo*s. ?ou *ill probably ha(e to edit the (ery first line of stitch.py to point to python on your system.

Making a Panorama
Step 1: Run Stitch Panorama
,f stitch.py *as installed correctly, and if your ,MP has python support compiled in, then Stitch Panorama should appear in the ,MP <tns/"tils menu. )elect Stitch Panorama to run the plug-in.

Step 2: Select Images


@fter selecting stitch panorama in the <tns/"tils menu, a dialog *ill open as1ing you to select or load the t*o images to be stitched together into a panorama. ?ou can load images from a file, or you can use any image that is already open in ,MP. The t*o images are designated the reference image and the transformed image. 5hen the panorama is created, the reference image is left alone and the transformed image is *arped onto the reference image. ,n most cases it *ill not matter *hich image is selected as the reference image. Ao*e(er, if one image is cleaner or straighter or other*ise better, it should be selected as the reference image. ,f you *ish to ma1e a panorama out of more than t*o images, you *ill run stitch panorama multiple times. ,n this case, the panorama should be set as the reference image rather than the transformed image.

Step 3: Set Control Points


Bnce you ha(e set the reference and transformed images, the main control panel *ill open. ?our first tas1 is to set multiple control points. @ control point is actually t*o points, one in each image, pointing to the same image feature. To add control points, clic1 on Set !dit "iew #ontrol Points. The control point editor *ill open. To set each control point, ma1e a selection in each image surrounding the same image feature, and press $dd. The program *ill do a correlation bet*een the t*o selected regions to precisely set the control point. Aence, your selections need not be (ery precise, Cust ma1e sure that the selections co(er the same image feature. The simplest thing to do is to use the rectangle select tool to select the feature in each image, though any method of selection *ill *or1. "se the 6oom tool to 6oom in on the region containing the image feature before ma1ing the selections. ,f you don>t 6oom in first, you are li1ely to select a region that is too large. The larger the selection region, the longer it *ill ta1e to do the correlation, so the selected regions should be as small as possible *hile still co(ering some feature. ?ou can turn off the correlation by unchec1ing correlate control points in the main control *indo*, but this is not recommended. ,t is faster, but the final panorama is Duite sensiti(e to the control points and is not li1ely to be acceptable *ithout the correlation. ,f the correlation is not used, the control point is set to the center of the selection in each image. 5hen selecting a control point, do not use any image feature *hich might change *ith time. ,f it has changed bet*een the t*o e/posures, the resulting panorama *ill not be satisfactory. E/amples of changing features *ould be people, clouds, lea(es, *ater, etc. .ontinue adding control points. The more control points you add, the better the

panorama *ill be. ,f you thin1 you might need to refer to the control points again in a future ,MP session, you can sa(e them in a file *ith the Sa%e button. 0e sure to note *hich images 9reference and transformed: the file corresponds to. ,f you &estore a control point file for the *rong images, or if you s*ap the reference and transformed images, the panorama *ill be completely *rong. ?ou can chec1 the Duality of the control points using the #orr and !rror columns in the control point table. The correlation 9#orr: should be close to one. ,f it is less than 0.F5 or so, the control point is suspect and you should consider deleting and redoing it. To delete a control point, select it *ith the button ne/t to it in the control point list and press 'elete. The !rror column is al*ays 0.0 until you ha(e set at least four control points. The error column sho*s ho* far off each control point is from the *arping computed using all the control points. ,f the Duality of the control points is good, the error comes from distortion in the images, or a change in perspecti(e bet*een the images, and should be smaller than '0 or 20 pi/els for most decent camera lenses. ,f you erroneously set a control point using features in the t*o images *hich are not the same, the errors *ill be much larger. The last column, labeled color, includes a chec1bo/ for each control point. The chec1bo/ indicates *hether or not that control point *ill be used in color balancing. ,f it is chec1ed, the color at that control point *ill be used to match colors bet*een the reference and transformed images. ,f it is not chec1ed, it *ill not be used for color matching, but *ill still be used in o(erlaying the transformed image onto the reference image. There is a limit of '5 control points that can be chec1ed for use in the color balance. ,f a chec1bo/ is labeled (edge), that control point is close to the edge of one of the images, and using that control point in the color balance is not recommended. 5hen you are satisfied *ith the control points, press $ccept to close the control point editor.

Step 4: Stitch the Panorama


5ith control points set, you are ready to stitch together your panorama. .lic1 on the Stitch Panorama button. $epending on the si6e of your images, the speed of your computer, and ho* much free memory your computer has, it can ta1e a *hile to complete the panorama. ,f it ta1es more than, say, fi(e minutes, lac1 of memory is the li1ely culprit 9panoramas are *ig imagesG:. There are a number of options a(ailable8

Interpolation Method. %ea(e this set to cu*ic. Linear or +one are faster, but you *ill not be happy *ith the result. Blend Size. ,f you plan to blend the image edges 9belo*:, this sets the si6e, as a fraction of the image o(erlap, of the blended region. Color Radius. 5hen balancing color bet*een the images, the colors at the control points are used. The color radius sets the si6e of the region around the control points *hich is a(eraged to deri(e the colors used in the color matching. Supersample. This should almost al*ays be set. ,t gi(es the *arping of the transformed image onto the reference image a better Duality. Color balance. ,f set, the colors at the control points *ill be matched so that the colors of the t*o images are corrected for any discrepancies 9such as

e/posure differences:. ,f the colors are o(ercorrected, it may help to redo the panorama *ith a larger (alue of the color radius.

Blend images. ,f set, the t*o images in the panorama *ill be smoothly blended together using layer mas1s. ,f this is not set, there can be harsh edges in the panorama. Remove distortion. ,f set, remo(e the distortion in the images. This can be (ery time consuming. ,f you are in a hurry, unchec1 this option. Ao*e(er, the resulting panorama may not be acceptable if the distortion errors in the control points are substantial.

Step 5: Check the Panorama and rerun if necessary


Bnce the panorama has be computed, it *ill be displayed as a ne* image. ,t contains t*o layers, one for the reference image and one for the transformed image. ,f you are satisfied, you can close the original reference and transformed images and thenflatten and sa(e the panorama. "se the 6oom tool to chec1 the panorama carefully before closing the reference and transformed images. ,f you are not satisfied, close the panorama, but do not close the original reference and transformed images. )o long as the original t*o images are left open, you can rerun Stitch Panorama, and the control points *ill not need to be reentered. ?ou can add control points in regions *here the panorama *as not acceptable, and redo the panorama. )o long as you 1eep the original reference and transformed images open, you can rerun the panorama as many times as you need to until you get the desired result. ,f you are satisfied *ith the panorama and plan to add another image to the panorama, you must flatten the panorama before using the panorama as the reference image. ?ou should also crop the panorama to eliminate any blan1 areas.

Frequently Asked Questions


'. Ho man! control points are required" ?ou must set at least one, ho*e(er, the more you set, the better the panorama *ill be. '0 to '5 control points, *ell spread out o(er the o(erlapping region of the images, is normally enough. ,f your panorama has some areas that are not matching *ell, add a control point in those areas and redo the panorama. 2. #hen setting control points$ ho large should the selections be" ,t is important that enough of the image feature be co(ered to permit a good correlation. Ao*e(er, the larger the selection, the more time it *ill ta1e to compute the optimum control point location. @ selection that is at least '0 pi/els by '0 pi/els or so should be fine. !ote that a 20 by 20 pi/el region may ta1e up to four times longer to compute than a '0 pi/el by '0 pi/el region. 7. #hat ma%es a good image &eature to use as a control point" There should be a lot of structure in the image feature to get a good correlation. @ blan1 blue s1y, for e/ample, *ill not *or1. The feature should be relati(ely small to a(oid a lengthy calculation of the control point. !e(er use a person, or a cloud, or anything else that changes or mo(es *ith time. @ fi/ed feature li1e a part of a building or a roc1 *or1s best. 2. Ho much overlap should there be bet een the re&erence and trans&ormed images" The more the better, but if at least'/7 of the images are o(erlapping, you should get a decent result. 5hen ta1ing multiple pictures for a panorama, be sure that all the pictures are ta1en from the same location to a(oid differences in perspecti(e.

Support
)orry, there is none. ?ou are on your o*n. Aopefully, by playing around *ith a fe* panoramas, you *ill Duic1ly get the hang of the plug-in. ,f you find this plug-in useful, you may use PayPal to contribute to future de(elopment efforts 9send to helicity7'2-stitchHyahoo.com:. This is neither reDuired nor e/pected, but *ould be appreciated. )orry, but you *ill get nothing for your money other than the 1no*ledge that you are supporting the de(elopment of free soft*are. ?ou are still on your o*n 8-:.

Das könnte Ihnen auch gefallen