Cara processing image yang akan digunakan adalah Histogram Equalization :
Berikut adalah coding yang dapat di gunakan dalam image processing software (SciLab).
-->GBR =
ReadImage('D:\aerial.tiff');
-->imshow(GBR);
-->[counts,
cells]=imhist(GBR);
-->scf(0); plot2d3(cells,
counts, rect=[0,0, 256, max(counts)]);
-->cumulative_sum =
cumsum(counts);
-->cumsum_max =
max(cumulative_sum);
-->cdf =
cumulative_sum/cumsum_max;
-->scf(1); plot2d(cells, cdf,
rect=[0, 0, 256, max(cdf)]);
-->function inv_linearCDF =
invLinearCDF(y)
-->y = y*255;
-->inv_linearCDF = round(y);
-->endfunction
-->K = GBR;
-->for i = 1:256
--> new_x = invLinearCDF(cdf(i));
-->K (find(GBR==i-1)) = new_x;
-->end
-->imshow(K)
***Penjelasannya dilanjut besok ya..
No comments:
Post a Comment