Kamis, 19 Maret 2009

Median Filtering

There are two ways that can do for improve image quality. The first is Point Processing, and the second is Mask Processing. Point processing work with operation point of each pixel, and Mask Processing work with mask operation.
One of mask processing is median filtering. Filtering is image enhancenent technique in spatial domain, and this method is linear filtering. In median filtering we take a mask , for example 3x3, and from this we get the values of each pixel. From this values we do to sort , so we get a median value to replace one value that is in center position.
Example:

With image in above, we use 3x3 mask filtering. The values of pixels, after sorted is 115, 119, 120, 123, 124, 125, 126, 127, 150. we get a median value is 124, and the value 150 is replaced by 124. This method is apllied to image with salt and pepper image. With various constant noise from 0.1 to 0.5 we can compare 3x3 median filtering and 9x9 median filtering.

Senin, 09 Februari 2009

Approximation with Lagrange Interpolation

Approximation is a method to know a function from a set of point that known. There are two kind of approximation. First is common approximation, well-known as interpolation, that the function must be through all point that known. Second is special approximation, that the function approaching the point that known.
One method that used in common approximation is Lagrange Interpolation. This methode produced a polinomial function. Give a set of point example (x1,y1), (x2,y2), (x3,y3)......(xn,yn). With Lagrange Interpolation we get polinomial P(x) below:Li(x) is Lagrange Function. This method implemented in Matlab so we get this script. x1, x2, x3...xn saved in bx. y1, y2, y3....yn saved in by. bx and by is array.

Senin, 12 Januari 2009

Matlab Script for Gauss Elimination

Gauss Elimination is one method to solve linear equation system. From linear equation system is made a matrix that consist a number of coeffisien unknown variable and their constant. This matrix is changed to upper/lower triangle matrix... and is changed one more to identity matrix. this process is shown above:

From this linear equation system we got matrix above:

This matrix must be a triangle matrix :
And must be an identity matrix :
I have ascript to make a diagonal matrix, that shown above:

And more script to make an identity matrix