Commit d37d1a95 authored by josh's avatar josh

cleaning up readme

parent 3b812a79
# 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
![](TestResults/Slice/GeoEye_Original.jpg =512x512)
<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:
![](TestResults/MS/GeoEye_MS_Original.jpg)
## Result:
| Segmentation Image | Labels Image |
| ------------- | ------------- |
| ![](TestResults/MS/pyms-color-seg.jpg) | ![](TestResults/MS/pyms-labels-image.jpg) |
## "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 |
| ------------- | ------------- |
| ![](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:
![](TestResults/MS/GeoEye_MS_Original.jpg)
## 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.
......
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