Skip to content

Devyanshu/image-split-with-overlap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

Split any image with any degree of overlap.

Divide image of any size into smaller images of fixed size with any degree of overlapping.

Overlapping means some part of the previous image is repeated in the current image. For example, 50% overlap means half of the previous image is repeated in the current image, both horizontally and vertically.

If the image is not completely divisible, the degree of overlapping on the boundary images are increased such that they become divisible.

The splitting of the image is done from left to right, top to bottom. This is the reason why the left-most and bottom images have often more overlapping.

Example

Sample Image(580x435)

Sample Image

Splitted images(150x150) with 0% overlap

Splitted Image Splitted Image Splitted Image Splitted Image
Splitted Image Splitted Image Splitted Image Splitted Image
Splitted Image Splitted Image Splitted Image Splitted Image
The images in the last row and column are overlapped to adjust for splitting to size 150x150, because the height and width of the original image is not completely divisible by 150.

Splitted images(150x150) with 10% overlap

Splitted Image Splitted Image Splitted Image Splitted Image Splitted Image
Splitted Image Splitted Image Splitted Image Splitted Image Splitted Image
Splitted Image Splitted Image Splitted Image Splitted Image Splitted Image
Splitted Image Splitted Image Splitted Image Splitted Image Splitted Image
The images in the last row and column have more than 10% overlapping to adjust for splitting to size 150x150, because the height and width of the original image is not completely divisible by 150.

Splitted images(150x150) with 50% overlap

Splitted Image Splitted Image Splitted Image Splitted Image Splitted Image Splitted Image Splitted Image
Splitted Image Splitted Image Splitted Image Splitted Image Splitted Image Splitted Image Splitted Image
Splitted Image Splitted Image Splitted Image Splitted Image Splitted Image Splitted Image Splitted Image
Splitted Image Splitted Image Splitted Image Splitted Image Splitted Image Splitted Image Splitted Image
Splitted Image Splitted Image Splitted Image Splitted Image Splitted Image Splitted Image Splitted Image

Image splitting can be used to

  • Get fixed size images from image of any size.
  • Generate partial fingerprints from any given fingerprint sample.