Repository navigation
Segmentation: Implemention of a simple Chan-Vese Algorithm - #1957
Conversation
| @@ -0,0 +1,25 @@ | |||
| """ This is an example to illustrate the us of the Chan-Vese Algorithm. | |||
There was a problem hiding this comment.
Please, give a more detailed description including: main idea of the algorithm / difference from other segmentation algorithms already presented in skimage. Also, couple of reference links would be nice.
|
@GGoussar thanks for the contribution, this looks really interesting! |
|
For sure, we'll need some tests for this feature. You may consider some toy cases and also add 1 test for any of the images we supply (https://github.com/scikit-image/scikit-image/tree/master/skimage/data). |
|
@soupault Thank you for your comments. I will do my best to correct the problems you have highlighted as soon as I can, hopefully within the next couple of days. |
|
@emmanuelle and I have been talking about getting Chan-Vese into the library since EuroSciPy 2011 or 12 :D I'm very happy to see it happen! |
|
Thank you for the input. Having reread the code I realise I might have to rewrite parts of it to reduce redundencies. I also have not corrected everything yet. |
|
My apologies for the delay. I have been rather busy wih other things over the last week, and I have barely had any time to work on this code. I still need to reread the code and see what I can change to make it clearer. In the mean time, let me know how I could improve the comments for the example, which is what I did in this last commit. |
|
@GGoussar regarding the gallery example: |
|
Right. Sorry, I somehow forgot about that. |
|
If you want to get fancy, you can have text, code, and figures spaced out however you like! It's not used as often as it could be, but yields great results. See for example the gallery example for Seam Carving to get the hang of this. You don't even have to call |
| .. [1] An Active Contour Model without Edges, Tony Chan and | ||
| Luminita Vese, Scale-Space Theories in Computer Vision, 1999 | ||
| .. [2] Chan-Vese Segmentation, Pascal Getreuer Image Processing On | ||
| Line, 2 (2012), pp. 214�224. |
…g that release_template has been reset to a proper state.
soupault
left a comment
There was a problem hiding this comment.
I think this is ready to be merged. A great starting point for further enhancements and optimizations :).
|
Pinging contributors via @pep8speaks by pushing to their branches: |
|
Hello @GGoussar! Thanks for updating the PR.
|
|
Thank you for your patience and thanks for the different contributors. That's an awesome contribution. |
|
@GGoussar congratulations! Looking forward to seeing a faster multichannel version! 😉 |
|
Thank you everyone for supporting me in doing this. I was (and still am) inexperienced with this, so you have my deepest gratitude for your patience. |
…age#1957) Implemention of a Chan-Vese Algorithm
…age#1957) Implemention of a Chan-Vese Algorithm
|
Dear all, |
|
If I remember correctly, it's an approximation of equation (22) in the article by Pascal Getreuer (http://www.ipol.im/pub/art/2012/g-cv/article.pdf, page 5/11). I did not look too much into it, but from what I understand, it stems from trying to separate phi at step n from phi at step n+1 in equation (21). My apologies, I'm not a mathematician, so please let me know if I've made a mistake. By the way,it's only an approximation because unlike what is proposed in that article, this algorithm is not semi-implicit. I don't think there is a way to do it efficiently in python (although if that is the case, I would very much like to hear it). |
|
That makes sense. Thanks! |

I have implemented a simple Chan-Vese Algorithm in the segmentation module based mostly on matlab code by Yue Wu freely available at http://www.mathworks.com/matlabcentral/fileexchange/23445-chan-vese-active-contours-without-edges
Let me know what needs to be changed, improved or corrected and whether I have made any mistakes in the actual implementation of the algorithm.
This is part of a student project supervised by Olivier Debeir who is a contributor for this library. This is also my first time contributing to such a project, so please bear with me.
.