Closed annimesh2809 closed 7 years ago
Merging #11 into master will decrease coverage by
0.99%
. The diff coverage is0%
.
@@ Coverage Diff @@
## master #11 +/- ##
=======================================
- Coverage 99.39% 98.39% -1%
=======================================
Files 8 9 +1
Lines 494 499 +5
=======================================
Hits 491 491
- Misses 3 8 +5
Impacted Files | Coverage Δ | |
---|---|---|
src/ImageSegmentation.jl | 100% <ø> (ø) |
:arrow_up: |
src/clustering.jl | 0% <0%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 70155ee...5959ce1. Read the comment docs.
The output of this implementation is a tuple (weights, centers). weight[pix][Ci]
denotes the membership of pixel with "linear index" pix
in the class with index Ci
. So, even in the case of offset images we can directly use parent(img)
because we are working with linear indices. I have changed the code accordingly.
I will send a PR to Clustering.jl
for the core algorithm once you approve the changes.
LGTM!
I have written wrappers for both kmeans
and fuzzycmeans
that dispatch over the functions from Clustering.jl
.
An implementation of the standard fuzzy c-means algorithm as stated in this paper. This implementation requires input to be of a similar form as that required by k-means in
Clustering.jl
. A wrapper has been written for images and works for general N-dimensional offset images. The output is a tuple of membership weights and segment centers. Tests and doc will be added soon.Demo: Original image:![org](https://user-images.githubusercontent.com/15063205/29327447-c4106dfa-820c-11e7-85a5-7b07187ee412.png)
Applying fuzzy cmeans on image with C = 4, eps_ = 0.001 and fuzziness = 1.8
![c4](https://user-images.githubusercontent.com/15063205/29327840-238b03f2-820e-11e7-903a-844124fd5196.png)
Original:![so](https://user-images.githubusercontent.com/15063205/29328005-a62b0c58-820e-11e7-9c4d-7b42a8201cb6.png)
Applying fuzzy cmeans with C = 4, eps_ = 0.002 and fuzziness = 1.8![si](https://user-images.githubusercontent.com/15063205/29328054-c5ba6d3e-820e-11e7-9684-53e47811cb37.png)