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)

2)

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.