Professional Documents
Culture Documents
-1 0 1
-1 0 1 %for left
Reading an image (jpg, bmp, png, tif): -1 0 1
image = imread (‘image.ext’);
1 0 -1
1 0 -1 %for right
Showing an image (jpg, bmp, png, tif): 1 0 -1
imshow (‘image.ext’);
Kernel sobel:
Showing some of image in one figure/screen: -1 0 1
subplot (m,n,p); imread(‘img.ext’); -2 0 2 %for left
-1 0 1
%annotation: 1 0 -1
2 0 -2 %for right
%m = total row
1 0 -1
%n = total column
%p = image position
Kernel laplace:
Making a new screen/figure: -1 -1 -1
-1 8 -1 %trial 1
figure;
-1 -1 -1
1 -2 1
Conversion from RGB to grayscale: -2 4 -2 %trial 2
gray = rgb2gray(image); 1 -2 1