Skip to content

Commit 8aa8f68

Browse files
committed
readme
1 parent c04b158 commit 8aa8f68

25 files changed

+49
-1
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
test-frames

README.md

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# `MedianFilter`
2+
3+
Package MedianFilter implements a simple library for image operations. The library can work with pngs or jpgs. Same functions can be used for both of those image types.
4+
5+
98% Test coverage
6+
7+
---
8+
#### Full Documentation:
9+
10+
https://godoc.org/github.com/KorayGocmen/MedianFilter
11+
12+
```go
13+
package main
14+
15+
import (
16+
"io/ioutil"
17+
"log"
18+
19+
"github.com/koraygocmen/MedianFilter"
20+
)
21+
22+
func main() {
23+
files, err := ioutil.ReadDir("./test-frames/")
24+
if err != nil {
25+
log.Fatal(err)
26+
}
27+
28+
var filePaths []string
29+
for _, f := range files {
30+
filePaths = append(filePaths, "./test-frames/"+f.Name())
31+
}
32+
33+
if err := MedianFilter.RemoveMovingObjs(filePaths, "./out.jpg"); err != nil {
34+
log.Fatal(err)
35+
}
36+
}
37+
```
38+
39+
## Result
40+
![input](github/input.gif)
41+
42+
to
43+
44+
![output](github/out.png)
45+
46+
### Thanks
47+
---
48+
49+
Nikolas Moya, for writing the very informative [Medium Article](https://medium.com/@nikolasmoya/simple-algorithm-to-remove-moving-objects-from-pictures-cdd3396c68e0) explaning the concept and providing the test frames used in this code.

github/input.gif

2.27 MB
Loading

github/out.png

218 KB
Loading

test-frames/00.png

232 KB
Loading

test-frames/01.png

222 KB
Loading

test-frames/02.png

224 KB
Loading

test-frames/03.png

219 KB
Loading

test-frames/04.png

234 KB
Loading

test-frames/05.png

229 KB
Loading

test-frames/06.png

221 KB
Loading

test-frames/07.png

221 KB
Loading

test-frames/08.png

233 KB
Loading

test-frames/09.png

221 KB
Loading

test-frames/10.png

219 KB
Loading

test-frames/11.png

224 KB
Loading

test-frames/12.png

217 KB
Loading

test-frames/13.png

223 KB
Loading

test-frames/14.png

224 KB
Loading

test-frames/15.png

223 KB
Loading

test-frames/16.png

232 KB
Loading

test-frames/17.png

227 KB
Loading

test-frames/18.png

224 KB
Loading

test-frames/19.png

221 KB
Loading

test-frames/20.png

220 KB
Loading

0 commit comments

Comments
 (0)