Make your own free website on Tripod.com

First Image processing and machine vision Project By Ukrit Himakoun 47541594

First problem

all of project files are here! but read below first!
You have to download my "function1" and use it to convert my picture "test1.gif"

How to use it


Run your matlab and follow this instruction below!
>>im = imread('test1.gif') if you put this file on your matlab work folder
>>func1(im);

My reason to solve this problem


first I find the average of the intensity of the picture We can see that the different between object and background is so much so I use for-loop to traverse around the picture and when I found that which pixel value lesser than or greater graythreshpoint it will turns to black or white
you can do like this also
>> X = imread('test1.gif');
>> Z = im2bw(X,graythresh(X));
>>imshow(~Z);
use this command to find graythreshpoint and make a black-white color by use graythresh point as divider.

this is the result




First problem


You have to download my "function2" and use it to convert my picture "test2.gif"

How to use it


Run your matlab and follow this instruction below!
>>im = imread('test2.gif') if you put this file on your matlab work folder
>>func2(im);

My reason to solve this problem


As I done with the first problem but this picture you can see that it consist of so many close point intensity so I have to divide my picture in to 9-pieces and use the technic as the first solution and finally we will find the object.

this is the result