The Mumford Shah method is to find the minimal function of the following functional $$F(u,K)=\int_{\Omega\setminus K}(u-u_0)^2+\alpha\int_{\Omega\setminus K}|\nabla u|^2+\beta Length(K),$$ where $\Omega$ is a bounded domain in $\mathbb R^2$, $K$ is the set of discontinuities, $u_0$ is the initial image($0\leq u_0\leq1$) and $\alpha,\beta$ are two non-negative constants.
Q :
How to determine the constants $\alpha,\beta$?
What is the relation to the Level-Set-Method?
PS: If you could give reference of the MATLAB code, it will be more grateful.