Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Ortner, Joshua
ai4hdr_backend
Commits
d37d1a95
Commit
d37d1a95
authored
Jan 21, 2021
by
josh
Browse files
cleaning up readme
parent
3b812a79
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
d37d1a95
# ai4hdr_backend
## "sliceImage.py" program:
Slices an image into even sized tiles.
Note: if the slice size doesn't fit evenly into the size of
the original image, pixels will be lost.
## Command line arguments:
-
arg1: name of image file used for slicing
-
arg2: file name used as base for all slices
-
arg3: width of new slices
-
arg4: height of new slices
-
arg5: directory to save slices
## Example run:
```
bash
python ./Scripts/sliceImage.py ./TestResults/Slice/GeoEye_Original.jpg GeoEye_Slice 512 512 ./TestResults/Slice/
```
## Example run result:
## Original Image: 1180x1180, resized to 512x512 for viewing

<img
src=
"TestResults/Slice/GeoEye_Original.jpg"
width=
"100"
height=
"100"
>
| Slice 1: 512x512 | Slice 2: 512x512 |
| ------------- | ------------- |
| !
[](
TestResults/Slice/GeoEye_Slice-0-0.jpg
)
| !
[](
TestResults/Slice/GeoEye_Slice-0-512.jpg
)
|
| Slice 3: 512x512 | Slice 4: 512x512 |
| ------------- | ------------- |
| !
[](
TestResults/Slice/GeoEye_Slice-512-0.jpg
)
| !
[](
TestResults/Slice/GeoEye_Slice-512-512.jpg
)
|
## "meanShiftSeg.py" program:
-
Uses the pymeanshift library to create a segmented images
-
Install pymeanshift: pip install git+git://github.com/fjean/pymeanshift.git
## Command line arguments:
-
arg1: image file used for segmentation
-
arg2: directory to save results
-
arg3: base name for results files
-
arg4: spatial radius for ms algo
-
arg5: range radius for ms algo
-
arg6: min density for ms algo
## Example run:
```
bash
python ./Scripts/meanShiftSeg.py ./TestResults/MS/GeoEye_MS_Original.jpg ./TestResults/MS pyms 6 6 50
```
## Example run result:
## Original Image:

## Result:
| Segmentation Image | Labels Image |
|
-------------
|
-------------
|
|

|

|
## "initDB.py" program:
-
Sets up the base file structure for an image database at a given location.
...
...
@@ -161,6 +103,62 @@ python Scripts/importAndProcessImage.py TestResults/MS/GeoEye_MS_Original.jpg ..
└── GeoEye-0-0.jpg
```
## "sliceImage.py" program:
Slices an image into even sized tiles.
Note: if the slice size doesn't fit evenly into the size of
the original image, pixels will be lost.
## Command line arguments:
- arg1: name of image file used for slicing
- arg2: file name used as base for all slices
- arg3: width of new slices
- arg4: height of new slices
- arg5: directory to save slices
## Example run:
```
bash
python ./Scripts/sliceImage.py ./TestResults/Slice/GeoEye_Original.jpg GeoEye_Slice 512 512 ./TestResults/Slice/
```
## Example run result:
## Original Image: 1180x1180, resized to 512x512 for viewing
<img src="TestResults/Slice/GeoEye_Original.jpg" width="512" height="512">
| Slice 1: 512x512 | Slice 2: 512x512 |
| ------------- | ------------- |
|  |  |
| Slice 3: 512x512 | Slice 4: 512x512 |
| ------------- | ------------- |
|  |  |
## "meanShiftSeg.py" program:
- Uses the pymeanshift library to create a segmented images
- Install pymeanshift: pip install git+git://github.com/fjean/pymeanshift.git
## Command line arguments:
- arg1: image file used for segmentation
- arg2: directory to save results
- arg3: base name for results files
- arg4: spatial radius for ms algo
- arg5: range radius for ms algo
- arg6: min density for ms algo
## Example run:
```bash
python ./Scripts/meanShiftSeg.py ./TestResults/MS/GeoEye_MS_Original.jpg ./TestResults/MS pyms 6 6 50
```
## Example run result:
## Original Image:

## Result:
| Segmentation Image | Labels Image |
| ------------- | ------------- |
| !
[](
TestResults/MS/pyms-color-seg.jpg
)
| !
[](
TestResults/MS/pyms-labels-image.jpg
)
|
## "meanShift3Channel.py" program:
Uses the mean shift algorithm to create a segmentation mask for an image.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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