|
This is a script written in MATLAB to stitch several overlapping images together. The user manually marks corresponding pairs of points between adjacent images first. The script is then executed to calculate the forward homographies, final mosaic size and then the backward homographies. Finally, the destination scan algorithm is used to produce the final image. Alpha blending was also implemented to remove visible seams that might arise at the edges of the original images. I took four images of the Fullerton Hotel in Singapore to prepare for the photo stitching exercise:
I then marked out 16 pairs of corresponding points for each pair of adjacent images, although theorectically 4 pairs will be sufficient. A sample of the corresponding points for a pair of adjacent images are as such:
Once all the markings have been done, I executed the MATLAB script and the final mosaic is obtained. Alpha blending is applied to remove visible seams that might exist after the images are placed together.
This is a simple MATLAB script which uses Singular Value Decomposition (SVD) to compress images. SVD can be used to provide the best lower-rank approximation to a matrix M, and thus be used for image compression. The idea is to use only the first k singular values/vectors of M so they form a lower-ranked matrix which is a good approximation to the original matrix M. This is usually fine because the lower singular values/vectors are small and can be sacrificed to reduce amount of data needed for representation. For a m x n matrix, we can actually store only (m+n+1 n)*k numbers which can be much smaller than the original mn numbers. As can be seen below, the SVD compression brings about little visible loss in quality when suitable values of k are chosen..
It is possible to choose k such that the "compressed image" ends up with a larger file size, which defeats the purpose of this technique. This implies that k must be chosen with k with care.
This is an OpenGL program written to create 2D image morphing. Image morphing is usually used to create special effects in movies so that we can see a smooth change from one image to another. The algorithm is a feature-based image morphing algorithm as described by Beier and Neely at SIGGRAPH 1992. The official website of the paper is available online. Please visit the website to find out more about it. In this example, an image of a cat is morphed to a dog (and back) smoothly.
Users are required to define pairs of tracking regions manually. The blue highlighted lines below show a pair of such tracking lines.
Note: User Interface and program template created by Dr Anthony Fang. |
|