SlideShare a Scribd company logo
1 of 9
Download to read offline
1. a = imread (‘1.jpg’)
2. บอกรายละเอียดภาพ
whos a
3. คาสั่งโชว์ภาพ
figure,imshow(a)
4. คาสั่งแปลงภาพสีเป็นภาพสีเทา
g = rgb2gray(a)
figure,imshow(g)
5. แสดงรายเอียดสีของรูปภาพออกมาเป็นกราฟ
imhist(g)
6. เปลี่ยนจากภาพสีเป็นภาพขาว-ดา
bw = im2bw(a)
figure,imshow(bw)
7.เคลียร์หน้าจอ ด้วยคาสั่ง clc
8. b = imread('2.jpg')
figure,imshow(b)
9.แสดงค่าสีเป็นกราฟ ภาพตอนนี้ยังไม่ชัดูได้จากค่ากราฟ imhist(b)
10. แก้ไขรายละเอียดภาพ
ad = imadjust(b)
figure,imshow(ad)
imhist(ad)
เปรียบเทียบก่อนหลัง
11. C = [0 2 4 6; 8 10 12 14; 16 18 20 22];
image(C)
เคลียร์หน้าจอ ด้วยคาสั่ง clc
กล้องเว็ปแคม
1. คาสั่ง imaqtool เครื่องมือของการได้มาของข้อมูล
โค้ดเรียกกล้อง
vid = videoinput('winvideo', 1, 'MJPG_1280x720');
preview(vid)
for i=1:10 ถ่ายภาพตั้งแต่ 1 - 10
img=getsnapshot(vid); การถ่ายภาพ
fname=['Image',num2str(i)]; การเปลี่ยนจากตัวเลขเป็นตัวหนังสือ
imwrite(img,fname,'jpg'); การเขียนภาพ img,fnameบนพื้นฐานของนามสกุลjpg
pause(2);
end

More Related Content

Viewers also liked

Viewers also liked (19)

Week 10
Week 10Week 10
Week 10
 
Week 12
Week 12Week 12
Week 12
 
Week 9
Week 9Week 9
Week 9
 
See automation-engineers
See automation-engineersSee automation-engineers
See automation-engineers
 
M JYOTHSNA
M JYOTHSNAM JYOTHSNA
M JYOTHSNA
 
Los alimentos que combaten la celulitis
Los alimentos que combaten la celulitisLos alimentos que combaten la celulitis
Los alimentos que combaten la celulitis
 
La historia del computador
La historia del computadorLa historia del computador
La historia del computador
 
JYOTI SHARMA
JYOTI SHARMAJYOTI SHARMA
JYOTI SHARMA
 
Hypersonic vehicle
Hypersonic vehicleHypersonic vehicle
Hypersonic vehicle
 
Adrian Arrebola
Adrian ArrebolaAdrian Arrebola
Adrian Arrebola
 
Media Thriller Opening
Media Thriller OpeningMedia Thriller Opening
Media Thriller Opening
 
Flatnuts facebook complete
Flatnuts facebook completeFlatnuts facebook complete
Flatnuts facebook complete
 
Social Media - Let's Party
Social Media - Let's PartySocial Media - Let's Party
Social Media - Let's Party
 
The Art of Communicating
The Art of CommunicatingThe Art of Communicating
The Art of Communicating
 
Out of the Box Productions - Our pitch
Out of the Box Productions - Our pitchOut of the Box Productions - Our pitch
Out of the Box Productions - Our pitch
 
Mobile – social marketing
Mobile – social marketingMobile – social marketing
Mobile – social marketing
 
Virtual Classrooms
Virtual ClassroomsVirtual Classrooms
Virtual Classrooms
 
Static Shock Pitch Presentation
Static Shock Pitch PresentationStatic Shock Pitch Presentation
Static Shock Pitch Presentation
 
Social Media Introduction
Social Media IntroductionSocial Media Introduction
Social Media Introduction
 

Week 11