Image split and merge

Introduction


This project has two code:

cut_image.py make image split. each sub images can have Rotate, horizontal flip, vertical flip options. split images will save in '/sub' folder

merge_image.py make original image from sub images made by cut_image.py. sub images should place in '/sub' folder

Image should be not simple image. because merge algorithm is find out most similar edge between sub images.

Split 2x2 works well but 3x3, 3x4 may have bad result.

Usage


python cut_image.py --image_file_nameex.jpg--column_num 2 --row_num 2
python merge_image.py --input_file_name ./sub/ --column_num 2 --row_num 2 --output_filename merged_image

Example


2x2

image

3x3

image

4x3

image