next up previous contents
Next: 3.3.1 Assembly hints and Up: 3. Assembling infrared mosaics Previous: 3.2.5 Correcting on Windows   Contents


3.3 Assembling the mosaic

There are two main stages to mosaicing: first, the process of actually making the joins to assemble the image (this is semi-automatic), and a second optional and fully-automatic stage which searches the assembled mosaic for differences in brightness and balances them out.

VIPS includes a set of infrared images you can use to practise assembly. Click on Insert=>Image from file to get an image file load dialog (see §4.3 for an explanation of all the features of the file dialog). Click on the down button at the right end of the current directory line and select nip's main data directory from the list. It'll probably be at the end of the list and look something like /usr/local/vips-7.8/share/nip/data. The IR directory should appear in the directories list. Double click on that, and you should see six sample files. Drag with the left mouse button to select them all and click OK. Figure 3.2 shows how these images fit together.

Figure 3.2: How the sample images join up
\includegraphics[height=2in]{figs/mos2.eps}

As was explained above, mosaics are assembled by repeatedly joining pairs of images. Pop up image view windows for cd1.1.v and cd1.2.v, and position them side-by-side on the screen -- see Figure 3.3. You should be able to make out the overlapping area.

Figure 3.3: Ready to join cd1.1.v and cd1.2.v
\includegraphics[width=6in]{figs/scr22.PS}

Mark a point on each image by Ctrl-left-clicking on a feature you can see in both images, see Figure 3.4. Move a point after you've marked it by dragging on the label. You don't need to be exact: nip just uses the point you select as the start point for a search. It can cope with misses of up to about 10 pixels. See §4.2 to see how to create and edit points. You can use the display control bar to brighten the image if the overlap is very dark -- see §4.1.

Figure 3.4: Marking a tie-point
\includegraphics[width=6in]{figs/scr23.PS}

Now click on Mosaic=>Mosaic_translate=>Left_right. nip will use the two points you marked to determine the approximate overlap, and then search for the best way to join the two images. Open a viewer for the output image, and check that it joined them together correctly -- see Figure 3.5. See the manual page for im_lrmosaic(3) if you are interested in a technical description of the method used by the mosaic functions to find the exact overlap.

Figure 3.5: Joining cd1.1.v and cd1.2.v
\includegraphics[width=5in]{figs/scr24.PS}

Try moving one of your regions slightly -- you should find that the output image does not change. Despite the error in selection, VIPS was still able to find the correct overlap. Now try moving one of them a long way -- suddenly, the output image will jump and will obviously mismatch. VIPS has found the best overlap it could, within the 10 pixel margin of error, but it is not correct, and there is no error message.

Delete the joined image (right click on the thumbnail and select Remove), and click on Mosaic=>Mosaic_force=>Left_right instead. The force functions operate in the same way as the mosaic functions, but do not do a search. Try moving the tie-points again -- the joined image will change every time you move a point. The force functions are useful when the overlap is too small for the search to work correctly, or when the overlap area is very smooth and contains too few features for the search to find the exact overlap for you.

Delete the forced images, and mosaic them again. Now pop up viewers for the next pair, cd2.1.v and cd2.2.v, and join them too. Pop up viewers for the two rows, and position them one above the the other. Again, you should be able to see the overlapping area. Ctrl-left-click again to mark a pair of tie-points, and click on Mosaic=>Mosaic_translate=>Top_bottom.

Mosaicing proceeds in this manner: you make repeated left-right joins to assemble each row (or repeated top-bottom joins, if the data was grabbed in columns). When two rows have been assembled, you then make a top-bottom join to link the rows together. Eventually, you will have assembled the whole mosaic. There is a workspace file, $VIPSHOME/pics/IR/nip_mosaic.ws, which you can load to mosaic all the images. See Figure 3.6.

Figure 3.6: The entire mosaic
\includegraphics[width=5in]{figs/scr25.PS}



Subsections
next up previous contents
Next: 3.3.1 Assembly hints and Up: 3. Assembling infrared mosaics Previous: 3.2.5 Correcting on Windows   Contents
John Cupitt 2003-07-21