I ported the Matlab code that was written by Li, Xu, Gui and Fox for their paper Level Set Evolution Without Re-initialization: A New Variational Formulation, into Python. Li et al. use level sets with a new approach and are able to segment an image succesfully. Some screenshots as well as the code itself is below.
Code
Code
Thanks for the code, I intend to use it in a project, what license applies to it? GPL?
ReplyDeleteYes it is GPL
ReplyDeleteI want to implement the same for lip segmentation. How can I input the image of lip in jpg format to this code ?
ReplyDeleteplt.imread should be able to display jpg files. If not u can convert the image with ImageMagic convert command
DeleteThis comment has been removed by the author.
ReplyDeleteCould you please add the link to the original Matlab source?
ReplyDeleteI do not have the link nor the Matlab files anymore. Sorry.
DeleteThis comment has been removed by the author.
ReplyDeleteHi,
ReplyDeleteI don't understand how to compile the code, can you help me please? When I begin with plot_phi, I have the error "name'phi' is not defined" and when I begin with active1, "plot_phi is not defined".
I dont maintain the active-.py files anymore, the only codes you'll need are in the pde_level.tex. There are two blocks inside the tex file, copy them to seperate files, add import numpy as np and import matploblib.pylab as plt to the beginning of both, and run them, they will generate the png outputs seen in the doc.
ReplyDeleteThanks a lot,
ReplyDeleteHave a good day
Juliette
This is very interesting, You are a very skilled blogger. I have joined your rss feed and look forward to seeking more of your great post. Also, I have shared your site in my social networks! https://python.engineering/pylatex-module-in-python/
ReplyDelete