Commit a79f1de3 authored by josh's avatar josh
Browse files

example images

parent 05bd31fd
......@@ -14,5 +14,11 @@ Note: if the slice size doesn't fit evenly into the size of
## Example run
```bash
python sliceImage.py ../image_database/GeoEye_After011310.jpg base 512 512 ../image_database/
```
\ No newline at end of file
python sliceImage.py ./example_images/GeoEye_After011310.jpg GeoEye_Slice 512 512 ./example_images/
```
## Example run result
## Original Image
![](example_images/GeoEye_After011310.jpg)
## Slices
\ No newline at end of file
......@@ -50,7 +50,7 @@ def sliceImage( imagePath: str, newFileBase: str, newSize: tuple, newPath: str )
# process image
for i in range( 0, maxWidth, newWidth ):
for j in range( 0, maxHeight, newHeight ):
slicePath = newPath.joinpath( "{}_{}-{}.jpg".format( newFileBase, i, j ) )
slicePath = newPath.joinpath( "{}-{}-{}.jpg".format( newFileBase, i, j ) )
newSliceCount += 1
newPaths.append( slicePath )
cv2.imwrite( str( slicePath ),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment