samdobson / image_slicer

Split images into tiles. Join the tiles back together.
http://samdobson.github.io/image_slicer
MIT License
151 stars 73 forks source link

Image Slicer gives reduced number of patches than expected #28

Open ranjithasubramaniam opened 4 years ago

ranjithasubramaniam commented 4 years ago

I am using image slicer to slice a 32x32x3 image into 8x8 patches (total of 64 patches needed). print(Image.open(image).size) ## image is the input image and it outputs (32,32), tiles = image_slicer.slice(image, number_tiles=64,save=False)

When I join them back, I could get only 24x24x3 image (Could visualize only 6x6 patches and the last 2x2 patches are ignored). join = image_slicer.join(tiles) print(join.size) ## outputs (24,24)

But the same works fine without any issue while using 128x128x3 image. I am not sure why the image size matters here and produces an unexpected output.