280 likes | 413 Views
Imageprocessing. An introduction. What is image processing?. image analysis patron recognition graphical manipulation datacompression data transmission multi media applications. 2. Global Image operation. Histogram Stretching Histogram Equalization Binarization/ Thresholding
E N D
Imageprocessing An introduction
What is image processing? • image analysis • patron recognition • graphical manipulation • datacompression • data transmission • multi media applications
2. Global Image operation • Histogram • Stretching • Histogram Equalization • Binarization/ Thresholding • Math on images
Histogram with MATLAB %y=imread('zand.jpg'); zon=zongray('mushroom2.jpg'); %zon equals contents of 'picuter' arraywaarde=zeros(1,256); % make an empty array[l,b]=size(zon); % measure picture size figure(1); % make a new picture image(zon); % show picture colormap(gray(256)); % set gray colormap for i=1:l % Go for every pixel from 1 to for j=1:b % Take care MATLAB arrays cannot start with 0! a=double(zon(i,j)); % Convert pixelvalue to double calculating with pixelvalues waarde(a+1)=waarde(a+1)+1; % if value is certain value add 1 for that value end end figure(2); % Make new (second figure) bar(waarde); % Give a bargraph of the result
Stretching(2) y=(x-64)*4
3. Local Operations • Smoothing • Low pass filtering • Edge detection • Directional edge detecting • Min-max operation • Sharpening • Special filters
Local operation • Make a new image depending on pixels in the neigtbourhood • filtering.gif
Smoothingwith mean filter filtering.gif
Edge detectionwith Laplacian operator(2) L[f(x,y)] = d2f / dx2 + d2f / dy2 d2f / dx2 = f(x+1, y) - 2f(x, y) + f(x-1, y) d2f / dy2 = f(x, y+1) - 2f(x, y) + f(x, y-1) L[f(x,y)] = -4f(x, y) + f(x+1), y) + f(x-1, y) + f(x, y+1) + f(x, y-1) (approx.)
demo Filters.exe
4. Morphologie • Erosion • Dilitation • Opening / closing • Conditional erosion • Skeleton
Erosion and Dilation8 and 4 connect influence 8-connect 4-connect
Erosion and Dilation with thresholdthreshold=1 (at least 8 must be there)
Erosion Dilation applications • Opening and closing. (For correct counting) • Deletes noise pixels • Makes connection at border lines • Skeleton • Perimeter determination
Conditional Erosion • Keep the last pixel • Keep connectednes • Keep the end-pixel of a string of pixels with 1 pixel
Image analysis • Labeling • Contour analysis