README.md 1.48 KB
Newer Older
Ortner, Joshua's avatar
Ortner, Joshua committed
1
2
# ai4hdr_backend

3
4
5
6
7
## "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.

8
9
10
11
12
13
14
15
## 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:
16
```bash
17
python sliceImage.py ./sliceImageResults/GeoEye_Original.jpg GeoEye_Slice 512 512 ./sliceImageResults/
josh's avatar
josh committed
18
19
```

20
## Example run result:
josh's avatar
readme    
josh committed
21
## Original Image: 1180x1180
22
![](sliceImageResults/GeoEye_Original.jpg)
josh's avatar
josh committed
23

josh's avatar
readme    
josh committed
24
## Slice 1: 512x512
25
![](sliceImageResults/GeoEye_Slice-0-0.jpg)
josh's avatar
josh committed
26

josh's avatar
readme    
josh committed
27
## Slice 2: 512x512
28
![](sliceImageResults/GeoEye_Slice-0-512.jpg)
josh's avatar
josh committed
29

josh's avatar
readme    
josh committed
30
## Slice 3: 512x512
31
![](sliceImageResults/GeoEye_Slice-512-0.jpg)
josh's avatar
josh committed
32

josh's avatar
readme    
josh committed
33
## Slice 4: 512x512
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
![](sliceImageResults/GeoEye_Slice-512-512.jpg)

## "meanShift.py" program:
Uses the mean shift algorithm to create a segmentation mask for an image.

## Command line arguments:
 - arg1: image file used for segmentation
 - arg2: file name to save segmentation

 ## Example run:
 ```bash
python meanShift.py meanShiftResults/GeoEye_MS_Original.jpg meanShiftResults/GeoEye_MS_Segmented
```

 ## Example run result:
 ## Original Image:
 ![](meanShiftResults/GeoEye_MS_Original.jpg)

 ## Segmentation Image:
 ![](meanShiftResults/GeoEye_MS_Segmented.jpg)

 ## Program run time:
 This program takes roughly 20 seconds to run, tested on an AMD FX(tm)-4300 Quad-Core Processor