Some MATLAB image processing basics

Nothing much new here. I would just capture an image from my web camera and process it to identify something. I am actually making a small project to identify motion or intrusion into the field of view of the camera.

I will just put the images i got and the code. I am planning to implement this basics and construct the intrusion system around this.

 

for i=1:240,
for j=1:320,
zeros(i,j)=i;
end
end
figure; imshow(zeros);
for i=1:240,
for j=1:320,
if zeros(i,j) < 128
zeros(i,j)=0;
else
zeros(i,j)=255;
end
end
end
figure; imshow(zeros);

The result generates two images as below respectively:

1)

matlab

2)

matlab

In the above two images i have just done some pixel-wise threshold modification on figure 11 to obtain clear distinct images on figure 18.

figure 11 has been generated in the first part of the code . In the second half of the code i have assigned value based in a set threshold are 128 thus giving clear distinct black and white regions.

I will give the hand representation in the following post. This above example just give n example of pixel operations on an image.The capturing of image is not included here but you’l find it in one of my previous posts.

Advertisements

3 thoughts on “Some MATLAB image processing basics

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s