SlideShare a Scribd company logo
1 of 9
Download to read offline
Week 9
โหลดไฟล์ภาพที่จะทาเข้ามายังโปรแกรม
กด add folder เลือกไฟล์ แล้วกด เลือก
กดเซฟ แล้วกดปิด
กด browse for folder
แล้วกดเลือก
คำสั่งแรกในกำรเรียกรูปภำพ อยู่ในรูปตัวแปร คือ DEM =……………………………………..
มี 1095 row 643 column รำยละเอียด cellsize = 30
ต่อไปเรียกดูภำพ
สีน้ำเงิน คือ ต่ำสุด สีน้ำตำลแดงๆ คือ สูงมำกกกกกกกกกกกกก
ภำพที่ได้มำยังไม่ชัดพอ เลยใช้คำสั่งว่ำ...........เพื่อให้ภำพมีทรวดทรงมำกขึ้น โดย.............
1 คือ ช่วงระยะห่ำงของสี gradient คือ เฉดสี มำกสุด 8 สี ม่วง ครำม น้ำเงิน เขียว เหลือง แสด แดง ดำ
Hillshade ใช้วัดพลังงำนแสงอำทิตย์ได้ มุมมองกำรรับแสงอำทิตย์
ต่อไปตัดรูป โดยคำสั่ง >> DEMc = crop(DEM,sub2ind(DEM.size,[150 350],[150 350]));
เพื่อโชว์ภำพ 3 มิติ ขึ้นมำ โดยคำสั่ง serf
กำหนดตัวแปรค่ำควำมสูง โดย >> [Z,x,y] = GRIDobj2mat(DEMc); สกัดข้อมูลรูปภำพ ให้กลำยเป็นตัวเลข
จำกนั้นใช้คำสั่ง >> surf(x,y,double(Z))
ขั้นต่อไป คือกำร Export โดยใช้ >> GRIDobj2ascii(DEMc,'text.txt');
จะออกมำเป็นตัวเลข ล้วนๆ
>> GRIDobj2geotiff(DEMc,'test.tif'); ได้เป็นภำพ
Fillsinks แบ่งภำพทั้งหมดใน DEM
FD = FLOWobj(DEMf); DEMf คือ ผ่ำนกำรทำ fillsink แล้ว
A = flowacc(FD);
imageschs(DEM,dilate(sqrt(A),ones(5)),'colormap',flipud(copper));
เส้นจำงๆ คือ สูงสุด บริเวณกลำงๆ ในภำพเป็นหินอัคนี แตกตัวเป็นกำบแผ่น
DB = drainagebasins(FD);
DB = shufflelabel(DB);
เป็นกำรโชว์แผ่นป้ ำย
ต่อไปพิมพ์
nrDB = numel(unique(DB.Z(:)))-1; % nr of drainage basins
STATS = regionprops(DB.Z,'PixelIdxList','Area','Centroid');
imageschs(DEM,DB);
hold on
for run = 1:nrDB;
if STATS(run).Area*DB.cellsize^2 > 10e6;
[x,y] = ind2coord(DB,...
sub2ind(DB.size,...
round(STATS(run).Centroid(2)),...
round(STATS(run).Centroid(1))));
text(x,y,...
num2str(round(STATS(run).Area * DB.cellsize^2/1e6)),...
'BackgroundColor',[1 1 1]);
end
end
hold off
title('drainage basins (numbers refer to drainage basin area in km^2)')
ภำพที่ได้ คือ (หน่วยเป็นตำรำงกิโลเมตร) แบ่งลุ่มน้ำตำมลักษณะธรณีวิทยำ

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Week10

  • 2. กด add folder เลือกไฟล์ แล้วกด เลือก กดเซฟ แล้วกดปิด กด browse for folder
  • 4. คำสั่งแรกในกำรเรียกรูปภำพ อยู่ในรูปตัวแปร คือ DEM =…………………………………….. มี 1095 row 643 column รำยละเอียด cellsize = 30 ต่อไปเรียกดูภำพ สีน้ำเงิน คือ ต่ำสุด สีน้ำตำลแดงๆ คือ สูงมำกกกกกกกกกกกกก ภำพที่ได้มำยังไม่ชัดพอ เลยใช้คำสั่งว่ำ...........เพื่อให้ภำพมีทรวดทรงมำกขึ้น โดย.............
  • 5. 1 คือ ช่วงระยะห่ำงของสี gradient คือ เฉดสี มำกสุด 8 สี ม่วง ครำม น้ำเงิน เขียว เหลือง แสด แดง ดำ Hillshade ใช้วัดพลังงำนแสงอำทิตย์ได้ มุมมองกำรรับแสงอำทิตย์ ต่อไปตัดรูป โดยคำสั่ง >> DEMc = crop(DEM,sub2ind(DEM.size,[150 350],[150 350])); เพื่อโชว์ภำพ 3 มิติ ขึ้นมำ โดยคำสั่ง serf กำหนดตัวแปรค่ำควำมสูง โดย >> [Z,x,y] = GRIDobj2mat(DEMc); สกัดข้อมูลรูปภำพ ให้กลำยเป็นตัวเลข จำกนั้นใช้คำสั่ง >> surf(x,y,double(Z))
  • 6. ขั้นต่อไป คือกำร Export โดยใช้ >> GRIDobj2ascii(DEMc,'text.txt'); จะออกมำเป็นตัวเลข ล้วนๆ >> GRIDobj2geotiff(DEMc,'test.tif'); ได้เป็นภำพ
  • 7. Fillsinks แบ่งภำพทั้งหมดใน DEM FD = FLOWobj(DEMf); DEMf คือ ผ่ำนกำรทำ fillsink แล้ว A = flowacc(FD); imageschs(DEM,dilate(sqrt(A),ones(5)),'colormap',flipud(copper)); เส้นจำงๆ คือ สูงสุด บริเวณกลำงๆ ในภำพเป็นหินอัคนี แตกตัวเป็นกำบแผ่น DB = drainagebasins(FD); DB = shufflelabel(DB); เป็นกำรโชว์แผ่นป้ ำย
  • 8. ต่อไปพิมพ์ nrDB = numel(unique(DB.Z(:)))-1; % nr of drainage basins STATS = regionprops(DB.Z,'PixelIdxList','Area','Centroid'); imageschs(DEM,DB); hold on for run = 1:nrDB; if STATS(run).Area*DB.cellsize^2 > 10e6; [x,y] = ind2coord(DB,... sub2ind(DB.size,... round(STATS(run).Centroid(2)),... round(STATS(run).Centroid(1)))); text(x,y,... num2str(round(STATS(run).Area * DB.cellsize^2/1e6)),... 'BackgroundColor',[1 1 1]); end end
  • 9. hold off title('drainage basins (numbers refer to drainage basin area in km^2)') ภำพที่ได้ คือ (หน่วยเป็นตำรำงกิโลเมตร) แบ่งลุ่มน้ำตำมลักษณะธรณีวิทยำ