# Image Mosaic based on SIFT and RANSAC
**This is the project design of course *Digital Image Processing* (2017-2018, Fall) in Tsinghua University presented by Dr.Shengjin Wang**.
## Requirement
1. OpenCV 3.4.1 for python
2. OpenCV-Contrib 3.4.1
3. numpy 1.8.0rc1 or higher
## Intro
### SIFT
SIFT(Scale-invariant Feature Transform) is a computer vision algorithm presented by Dr.David Lowe in 1999. It can extract feature points of a image, and has been proved very efficient in Image Mosaic.
### RANSAC
RANSAC can be used to fit linear relation. Different from The Least Square Method, RANSAC is especially efficient for strong noisy data.
See [Report.pdf](https://github.com/raxxerwan/SIFT_RANSAC/blob/master/Report.pdf) for more detail.
## Images Set
Put all the images you want to mosaic in `./Pics/`. The image files should be named in ascending order. The algorithm will mosaic them from left to right according to the index of file names.
For example:
```
ROOT/
└----Pics/
|----table1.JPG
|----table2.JPG
|----table3.JPG
|----table4.JPG
└----table5.JPG
```
## Get Started!
Run:
```
python SIFT_Project.py
```
or:
```
python SIFT_Project.py --img_dir=YOUR_IMG_DIR --result_dir=YOUR_DIR --result_name=YOUR_NAME --format=YOUR_FORMAT
```
where:
```
--img_dir: The path of your images set. Default:'./Pics/'
--result_dir: Where the mosaic result should be saved. Default:'./Result/'
--result_name: The file name of the mosaic result. Default:'result.jpg'
--format: The file format of your images set. It can contain various format. Default:'jpg png'
```
The result image will be placed where you specify or in `./Result/` by default.
## Samples
### Before:
<img src="https://raw.githubusercontent.com/raxxerwan/SIFT_RANSAC/master/Pics/table1.JPG" width="50%" height="50%" />
<img src="https://raw.githubusercontent.com/raxxerwan/SIFT_RANSAC/master/Pics/table2.JPG" width="50%" height="50%" />
<img src="https://raw.githubusercontent.com/raxxerwan/SIFT_RANSAC/master/Pics/table3.JPG" width="50%" height="50%" />
<img src="https://raw.githubusercontent.com/raxxerwan/SIFT_RANSAC/master/Pics/table4.JPG" width="50%" height="50%" />
<img src="https://raw.githubusercontent.com/raxxerwan/SIFT_RANSAC/master/Pics/table5.JPG" width="50%" height="50%" />
### After:
![result.jpg](https://raw.githubusercontent.com/raxxerwan/SIFT_RANSAC/master/Result/result.jpg)
qq_41589836
- 粉丝: 0
- 资源: 4
最新资源
- hrnet关键点检测onnx模型
- chromedriver-win64-132.0.6808.0
- chromedriver-win64-132.0.6807.0
- chromedriver-win64-132.0.6806.0
- 带有界面的多线程爬虫软件源码,使用python爬取漫画图片,可采用多线程爬取,可做毕业设计
- chromedriver-win64-132.0.6804.0
- 我电脑的zsh配置,oh my zsh + powerlevel10k + Hack Nerd Font
- pcie xdma xilinx 上位机应用
- chromedriver-win64-132.0.6803.1
- chromedriver-win64-132.0.6803.0
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈