برنامه نویسی متلب
-
سللام دوستان اینجا کسی هست که بتونه برنامه زیر رو به متلب تبدیل کنه
Img2D findSurf ( double GSV, double sigma , Img3D f , int maxRounds , double stabilityLimit )
{ Img2D h = new Img2D( f . width , f . height );
double F = 1.0; double rho = −1.0 / GSV; int round = 0;
while ( cont ) { round++; double movement = 0;
for ( int x = 0; x < h. width (); x++)
{ for ( int y = 0; y < h. height (); y++) {
// The current depth of u
int d = h. getPixel (x ,y ); // Upward movement
double upF = rho∗f . getPixel (x ,y ,d ); // New location double
newD = d + F + upF; // Updating of the sheets position
h. putPixel (x ,y , newD); // Movement of the surface
movement += F + upF;
}
} // Surface tension
h. doGaussianBlur (h , sigma );
if (movement < stabilityLimit ) break; if ( round > maxRounds) break;
} return h;
} -
این پست پاک شده!