SlideShare a Scribd company logo
1 of 35
Download to read offline
โปรแกรม MATLAB
clc เคลียทั้งหมด
โลเวกเตอร์
เมททิก
>> A = [123;456;789]
A =
123
456
789
>> A =[1 2 3;4 5 6;7 8 9]
A =
1 2 3
4 5 6
7 8 9
>> A(3,2)
ans =
8
>> B = [1:20]
B =
Columns 1 through 17
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Columns 18 through 20
18 19 20
>> B = [1:2:20]
B =
1 3 5 7 9 11 13 15 17 19
>> B = [0:2:20]
B =
0 2 4 6 8 10 12 14 16 18 20
>> whos
Name Size Bytes Class Attributes
A 3x3 72 double
B 1x11 88 double
ans 1x1 8 double
sun 1x1 8 double
x 5x1 40 double
y 1x5 40 double
>> x = sin(2)
x =
0.9093
>> x = cos(2)
x = -0.4161
ครั้ง2
เวกเตอร์ กราฟ
>> x = [5 7 28];
>> y = [1 2 3];
>> plot(x,y)
>> x = [5 7 28];
>> y = [1 2 3];
>> plot(x,y)
>> title('Your score')
>> xlabel('people')
>> ylabel('score')
>> plot(x,y,'red') เปลี่ยนสีกราฟ
>> plot(x,y,'--r') เปลี่ยนเส้นกราฟจากเส้นตรงเป็นเส้นประ
>> plot(x,y,'-+r') เพิ่มจุดบอกเข้าไปในเส้นกราฟ
>> plot(x,y,'-ro') เพิ่มจุดวงกลมเข้าไปในเส้นกราฟ
>> plot(x,y,'-.k') ทาให้เส้นกราฟเป็นเส้นประและจุด
ข้อมูลเส้นกราฟแต่ละเส้น
>> x = [2 5 7 8];
>> y = [3 5 9 8];
>> z = [2 6 9 4];
>> t = [1 2 3 4];
>> plot(x,t,'--r',y,t,'-.k',z,t,'-og')
แสดงข้อมูลกราฟ
>> legend('people','money','salary')
ย้ายข้อมูลกราฟ
legend('location','northwest')
>> figure
>> subplot(2,2,1)
>> subplot(2,2,1)
>> plot(x,t)
>> subplot(2,2,2)
>> plot(y,t)
>> subplot(2,2,3)
>> plot(z,t)
กราฟสามมิติ
[x,y] = meshgrid([-2:.2:2]);
Z = x.*exp(-x.^2-y.^2);
figure
surf(x,y,Z,gradient(Z))
gradient(Z)
colorbar
ภาพทางภูมิศาสตร์
topotoolbox-master
DEM
> DEM = GRIDobj('kidchakood.tif')
>> imagesc(DEM)
ปรับภาพให้เห็นชันเจนมากขึ้น
>> imageschs(DEM,min(gradient8(DEM),1))
ทาภาพทางภูมิสาศตร์ให้เป็นสามมิติ
>> DEMc = crop(DEM,sub2ind(DEM.size,[150 350],[150 350]));
>> [Z,x,y] = GRIDobj2mat(DEMc);
>> surf(x,y,double(Z))
GRIDobjascii(DEMc,'test.txt');
GRIDobj2geotiff(DEMc,'test.tif');
DEMf = fillsinks(DEM);
>> FD = FLOWobj(DEMf);
>> A = flowacc(FD);
>> imageschs(DEM,dilate(sqrt(A),ones(5)),'colormap',flipud(copper));
การปรับเปลี่ยนโทนสีของภาพ
a = imread(‘2.jpg’)
>> whos a
>> figure,imshow(a)
ปรับภาพให้เป็นสีเทา
i = rgb2gray(a)
figure,imshow(i)
b = imread('3.jpg')
>> p = imadjust(b)ปรับแก้ภาพให้คมชัด
>> figure,imshow(b)
>> figure,imshow(p)
>> imhist(b)กรองข้อมลภาพ
>> imhist(p)กรองข้อมลภาพ
>> bw = im2bw(a)ภาพขาวดา
figure,imshow(bw)
การทาภาพให้เป็นสามมิติ
เรียกภาพที่เราเลือก
vid = videoinput('winvideo', 1, 'MJPG_1280x720');
preview(vid)
for i=1:10
img=getsnapshot(vid);
fname=['Image',num2str(i)];
imwrite(img,fname,'jpg');
pause(2);
end
3D
ปรับให้เป็นสามมิติ
I1 = rgb2gray(imread('left.jpg'));
I2 = rgb2gray(imread('right.jpg'));
imshowpair(I1, I2,'montage');
title('I1 (left); I2 (right)');
figure;
imshowpair(I1,I2,'ColorChannels','red-cyan');
title('Composite Image (Red - Left Image, Cyan - Right Image)');
blobs1 = detectSURFFeatures(I1, 'MetricThreshold', 2000);
blobs2 = detectSURFFeatures(I2, 'MetricThreshold', 2000);
figure;
imshow(I1);
hold on;
plot(selectStrongest(blobs1, 30));
title('Thirty strongest SURF features in I1');
figure;
imshow(I2);
hold on;
plot(selectStrongest(blobs2, 30));
title('Thirty strongest SURF features in I2');
[features1, validBlobs1] = extractFeatures(I1, blobs1);
[features2, validBlobs2] = extractFeatures(I2, blobs2);
indexPairs = matchFeatures(features1, features2, 'Metric', 'SAD','MatchThreshold', 5);
matchedPoints1 = validBlobs1(indexPairs(:,1),:);
matchedPoints2 = validBlobs2(indexPairs(:,2),:);
figure;
showMatchedFeatures(I1, I2, matchedPoints1, matchedPoints2);
legend('Putatively matched points in I1', 'Putatively matched points in I2');
[fMatrix, epipolarInliers, status] = estimateFundamentalMatrix(matchedPoints1, matchedPoints2, 'Method',
'RANSAC','NumTrials', 10000, 'DistanceThreshold', 0.1, 'Confidence', 99.99);
if status ~= 0 || isEpipoleInImage(fMatrix, size(I1))|| isEpipoleInImage(fMatrix', size(I2))
error(['Either not enough matching points were found or ''the epipoles are inside the images. You may need to
''inspect and improve the quality of detected features ','and/or improve the quality of your images.']);
end
inlierPoints1 = matchedPoints1(epipolarInliers, :);
inlierPoints2 = matchedPoints2(epipolarInliers, :);
figure;
showMatchedFeatures(I1, I2, inlierPoints1, inlierPoints2);
legend('Inlier points in I1', 'Inlier points in I2');
[t1, t2] = estimateUncalibratedRectification(fMatrix,inlierPoints1.Location, inlierPoints2.Location, size(I2));
tform1 = projective2d(t1);
tform2 = projective2d(t2);
I1Rect = imwarp(I1, tform1, 'OutputView', imref2d(size(I1)));
I2Rect = imwarp(I2, tform2, 'OutputView', imref2d(size(I2)));
% transform the points to visualize them together with the rectified images
pts1Rect = transformPointsForward(tform1, inlierPoints1.Location);
pts2Rect = transformPointsForward(tform2, inlierPoints2.Location);
figure;
showMatchedFeatures(I1Rect, I2Rect, pts1Rect, pts2Rect);
legend('Inlier points in rectified I1', 'Inlier points in rectified I2');
Irectified = cvexTransformImagePair(I1, tform1, I2, tform2);
figure;
imshow(Irectified);
title('Rectified Stereo Images (Red - Left Image, Cyan - Right Image)');
cvexRectifyImages('left1.jpg', 'right1.jpg');
สร้างโปรแกรมปรับภาพ
guide เรียกคาสั่งโปนแกรม
ปรับแต่งโปรแกมเพิ่มคาสั่ง
สร้างปุมกดแต่ละคาสั่ง
สร้างพื้นที่สาหรับภาพ
เปลี่ยนสี ชือมุม
เรียกภาพที่ภูมิศาสตร์
เปลี่ยนสีภาพทางภูมิศาสตร์

More Related Content

Viewers also liked

CertainSafe MicroTokenization Technology Detailed Overview
CertainSafe MicroTokenization Technology Detailed OverviewCertainSafe MicroTokenization Technology Detailed Overview
CertainSafe MicroTokenization Technology Detailed OverviewSteven Russo
 
Zealous for the house john 2.12 17
Zealous for the house john 2.12 17Zealous for the house john 2.12 17
Zealous for the house john 2.12 17Unfailinglove
 
Ashot education and consultancy services (Pvt) Ltd
Ashot education and consultancy services (Pvt) LtdAshot education and consultancy services (Pvt) Ltd
Ashot education and consultancy services (Pvt) LtdASHOT Group
 
Informática práctica presentación
Informática práctica presentación Informática práctica presentación
Informática práctica presentación Daniela Maldonado
 
Compro 58670411 3304_aod
Compro 58670411 3304_aodCompro 58670411 3304_aod
Compro 58670411 3304_aodnontawatzj
 
10 pasos hacia la madurez y realización personal
10 pasos hacia la madurez y realización personal10 pasos hacia la madurez y realización personal
10 pasos hacia la madurez y realización personalVicky Salinas Méndez
 
Getting to Know Jesus The prerogative of the savior
 Getting to Know Jesus The prerogative of the savior Getting to Know Jesus The prerogative of the savior
Getting to Know Jesus The prerogative of the saviorUnfailinglove
 
A Framework for Improving e-Services Utilization in Rural Areas
A Framework for Improving e-Services Utilization in Rural AreasA Framework for Improving e-Services Utilization in Rural Areas
A Framework for Improving e-Services Utilization in Rural AreasSocial_worker_india
 
C lculo de ca¡da de tensi¢n en conductores de bt
C lculo de ca¡da de tensi¢n en conductores de btC lculo de ca¡da de tensi¢n en conductores de bt
C lculo de ca¡da de tensi¢n en conductores de btluis vasquez hernandez
 
Gratefulness is the key
Gratefulness is the keyGratefulness is the key
Gratefulness is the keyUnfailinglove
 
Powerpoint ftw
Powerpoint ftwPowerpoint ftw
Powerpoint ftwMel A
 
Seguridad en los centros de cómputo
Seguridad en los centros de cómputoSeguridad en los centros de cómputo
Seguridad en los centros de cómputoVicky Salinas Méndez
 
Service Coordination Overview Brochure
Service Coordination Overview BrochureService Coordination Overview Brochure
Service Coordination Overview BrochureBarry Newlin
 
First encounter john 1.43 51
First  encounter john 1.43 51First  encounter john 1.43 51
First encounter john 1.43 51Unfailinglove
 

Viewers also liked (20)

CertainSafe MicroTokenization Technology Detailed Overview
CertainSafe MicroTokenization Technology Detailed OverviewCertainSafe MicroTokenization Technology Detailed Overview
CertainSafe MicroTokenization Technology Detailed Overview
 
The Hurt Locker
The Hurt LockerThe Hurt Locker
The Hurt Locker
 
Revitalize your theme park
Revitalize your theme parkRevitalize your theme park
Revitalize your theme park
 
Zealous for the house john 2.12 17
Zealous for the house john 2.12 17Zealous for the house john 2.12 17
Zealous for the house john 2.12 17
 
Ashot education and consultancy services (Pvt) Ltd
Ashot education and consultancy services (Pvt) LtdAshot education and consultancy services (Pvt) Ltd
Ashot education and consultancy services (Pvt) Ltd
 
Como ser mas productivo
Como ser mas productivoComo ser mas productivo
Como ser mas productivo
 
Informática práctica presentación
Informática práctica presentación Informática práctica presentación
Informática práctica presentación
 
Gerencia de proyectos
Gerencia de proyectosGerencia de proyectos
Gerencia de proyectos
 
About My Self.
About My Self.About My Self.
About My Self.
 
Compro 58670411 3304_aod
Compro 58670411 3304_aodCompro 58670411 3304_aod
Compro 58670411 3304_aod
 
10 pasos hacia la madurez y realización personal
10 pasos hacia la madurez y realización personal10 pasos hacia la madurez y realización personal
10 pasos hacia la madurez y realización personal
 
Getting to Know Jesus The prerogative of the savior
 Getting to Know Jesus The prerogative of the savior Getting to Know Jesus The prerogative of the savior
Getting to Know Jesus The prerogative of the savior
 
A Framework for Improving e-Services Utilization in Rural Areas
A Framework for Improving e-Services Utilization in Rural AreasA Framework for Improving e-Services Utilization in Rural Areas
A Framework for Improving e-Services Utilization in Rural Areas
 
C lculo de ca¡da de tensi¢n en conductores de bt
C lculo de ca¡da de tensi¢n en conductores de btC lculo de ca¡da de tensi¢n en conductores de bt
C lculo de ca¡da de tensi¢n en conductores de bt
 
Gratefulness is the key
Gratefulness is the keyGratefulness is the key
Gratefulness is the key
 
Powerpoint ftw
Powerpoint ftwPowerpoint ftw
Powerpoint ftw
 
Verbal phrase karina
Verbal phrase karinaVerbal phrase karina
Verbal phrase karina
 
Seguridad en los centros de cómputo
Seguridad en los centros de cómputoSeguridad en los centros de cómputo
Seguridad en los centros de cómputo
 
Service Coordination Overview Brochure
Service Coordination Overview BrochureService Coordination Overview Brochure
Service Coordination Overview Brochure
 
First encounter john 1.43 51
First  encounter john 1.43 51First  encounter john 1.43 51
First encounter john 1.43 51
 

Similar to ศราวุธ 58670394

58670269 นายกฤตกวี นางาม กลุ่ม 3304 (1)
58670269 นายกฤตกวี นางาม กลุ่ม 3304 (1)58670269 นายกฤตกวี นางาม กลุ่ม 3304 (1)
58670269 นายกฤตกวี นางาม กลุ่ม 3304 (1)porprarungnapa
 

Similar to ศราวุธ 58670394 (6)

Week 11
Week 11Week 11
Week 11
 
Week 11
Week 11Week 11
Week 11
 
J2ME Game Concept
J2ME  Game ConceptJ2ME  Game Concept
J2ME Game Concept
 
Week13
Week13Week13
Week13
 
58670269 นายกฤตกวี นางาม กลุ่ม 3304 (1)
58670269 นายกฤตกวี นางาม กลุ่ม 3304 (1)58670269 นายกฤตกวี นางาม กลุ่ม 3304 (1)
58670269 นายกฤตกวี นางาม กลุ่ม 3304 (1)
 
Week13
Week13Week13
Week13
 

ศราวุธ 58670394