smoothing issue
-
Dear Respected friends. good morning. i hope you are fine. I need your help. I have a problem with smoothing of output. I have this code .. it exports stair stepping. Can you help me.?
int Imax = 10;
for ( int I=0; I= sharpeningThreshold_percentage/2. && jstart == 0 ) {
k0 = k;
jstart = 1;
}if ( 100. \* fabs(v2 -v1) / v1 >= sharpeningThreshold\_percentage ) { v1 = v2; k1 = k; jstart = 0; for ( int kk=k0; kk<=k; kk++ ) v\[(iy\*nx+ix)\*nz + kk\] = v1; k0 = k1; break; } v\[(iy\*nx+ix)\*nz + k\] = v1; } if ( k >= nz-1 ) break; } } } if ( I < Imax-1 ) smooth(10, 1, v, nx, ny, nz); } // sharpening -smoothing I-loop closed } // if sharpeningThreshold\_percentage closed
}
-
Dear Respected friends. good morning. i hope you are fine. I need your help. I have a problem with smoothing of output. I have this code .. it exports stair stepping. Can you help me.?
int Imax = 10;
for ( int I=0; I= sharpeningThreshold_percentage/2. && jstart == 0 ) {
k0 = k;
jstart = 1;
}if ( 100. \* fabs(v2 -v1) / v1 >= sharpeningThreshold\_percentage ) { v1 = v2; k1 = k; jstart = 0; for ( int kk=k0; kk<=k; kk++ ) v\[(iy\*nx+ix)\*nz + kk\] = v1; k0 = k1; break; } v\[(iy\*nx+ix)\*nz + k\] = v1; } if ( k >= nz-1 ) break; } } } if ( I < Imax-1 ) smooth(10, 1, v, nx, ny, nz); } // sharpening -smoothing I-loop closed } // if sharpeningThreshold\_percentage closed
}
-
You did not state what the problem is. What are you expecting from your code? What do you get instead that makes you say it is problematic?
"I'm neither for nor against, on the contrary." John Middle
Dear Friend. The code works. But the output comes as stair steps. But, this is because of this sharpening .. and I want to alter . if you can give idea how to make the smoothing. v2 is the velocity of second layer. and v1 is velocity of first layer. maximum iterations is 10 with the percentage of threshold .. problem is that it gives sharp stair stepping. while I want to make like smooth signal in output. If you can guide.