Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Ortner, Joshua
ai4hdr_backend
Commits
a79f1de3
Commit
a79f1de3
authored
Jan 20, 2021
by
josh
Browse files
example images
parent
05bd31fd
Changes
8
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
a79f1de3
...
...
@@ -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

## Slices
\ No newline at end of file
__pycache__/ai4hdr_utils.cpython-36.pyc
View file @
a79f1de3
No preview for this file type
ai4hdr_utils.py
View file @
a79f1de3
...
...
@@ -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
),
...
...
example_images/GeoEye_After011310.jpg
0 → 100644
View file @
a79f1de3
735 KB
example_images/GeoEye_Slice-0-0.jpg
0 → 100644
View file @
a79f1de3
233 KB
example_images/GeoEye_Slice-0-512.jpg
0 → 100644
View file @
a79f1de3
225 KB
example_images/GeoEye_Slice-512-0.jpg
0 → 100644
View file @
a79f1de3
235 KB
example_images/GeoEye_Slice-512-512.jpg
0 → 100644
View file @
a79f1de3
222 KB
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment