Skip to content

Commit 53f67ef

Browse files
committed
minor docs
1 parent 4e2930b commit 53f67ef

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,28 @@ go get github.com/LdDl/gocv-blob
2222
```
2323

2424
p.s. do not be worried when you see *can't load package: package github.com/LdDl/gocv-blob: no Go files....* - this is just warning.
25+
2526
## Usage
2627

27-
@todo
28+
It's pretty straightforward (pseudocode'ish)
29+
```go
30+
// 1. Define global set of blobs
31+
global_blobs = blob.NewBlobiesDefaults()
32+
33+
// 2. Define new blob objects
34+
new_blob1 = blob.NewBlobie(image.Rectangle, how many points to store in track, class ID of object , class name of object)
35+
new_blob2 = blob.NewBlobie(image.Rectangle, how many points to store in track, class ID of object , class name of object)
36+
37+
// 3. Append data to temporary set of blobs
38+
tmp_blobs = []*blob.Blobie{}
39+
tmp_blobs = append(tmp_blobs, new_blob1)
40+
tmp_blobs = append(tmp_blobs, new_blob2)
41+
42+
// 4. Compare blobs ()
43+
global_blobs.MatchToExisting(tmp_blobs)
44+
45+
// 5. Repeat 2-4 every time when you find new objects on images. MatchToExisting() will update existing blobs and register new ones.
46+
```
2847

2948
## Support
3049

0 commit comments

Comments
 (0)