SlideShare a Scribd company logo
1 of 34
ภ า พ ส เ มื อ น จ ริ ง บ น วั ต ถุ ท า ง ก า ย ภ า พ
V i r t u a l o n P h y s i c a l O b j e c t s
โดย นางสาวอริ สรา จันทร์อาพร
ภาพสเมือนจริง
บนวัตถุทางกายภาพ
COMPUTER VISION BASE
TRACKING AR และ VUFORIA
โครงสร้าง VUFORIA™
กาหนดค่าVUFORIA™ให้จดจาวัตถุ
VUFORIA™ กับ
JME
ภาพสเมือนจริ งบน
วัตถุทางกายภาพ
ในบทนี้จะนาเสนอเกี่ยวกับประเภทต่างๆ ของ
computer vision-based tracking for
AR นอกจากนี้เราจะอธิบายให้คุณทราบถึง library การ
ติดตามสาหรับอุปกรณ์เคลื่อนที่ AR และ Vuforia™ โดย
Qualcomm® Inc. กับ library นี้เราจะสามารถ
สร้างแอพพลิเคชัน computer vision – based
AR ได้
C O M P U T E R V I S I O N B A S E
T R A C K I N G A R & V U F O R I A
Computer vision -
based tracking AR
& Vuforia™
ปัจจุบันนี้ , คุณจะสามารถใช้กล้องถ่ายรูปของ
สมาร์ทโฟน ในการแสดงโมเดลของคุณได้ โดยมีมุมมองของ
โลกแห่งความจริงเป็นพื้นหลัง Computer vision-
based AR ได้ก้าวไปอีกขั้น และประมวลผลเฟรมภาพ
แต่ละรูปเพื่อหารูปแบบที่คุ้นเคยในรูปจากกล้อง
โดยปกติแอพพลิเคชัน computer vision-
based AR ,
วัตถุระนาบ อย่างเช่น frame markers หรือการ
ติดตามเป้าหมายตามลักษณะทางธรรมชาติ ใช้ตาแหน่ง
กล้องในระบบพิกัดท้องถิ่นซึ่งตรงกันข้ามกับระบบพิกัด
สากลที่ใช้เซ็นเซอร์ AR
computer vision-based AR ช่วยให้สามารถ
ซ้อนทับเนื้อหาเสมือนจริงได้มากขึ้น
อัพเดทข้อมูลเกี่ยวกับกล้องเสมือนในรูปแบบ 3มิติ
มีเสถียรภาพมากขึ้นในระบบพิกัดท้องถิ่น
การเลือกวัตถุทางกายภาพ
เพื่อที่จะประสบความสาเร็จในการใช้คอมพิวเตอร์ที่ใช้
computer vision-based AR คุณต้องเข้าใจว่า วัตถุทาง
กายภาพใดที่คุณสามารถใช้กล้องเพื่อติดตามได้ โดยปัจจุบันมี
สองวิธีหลักในการดาเนินการ: Frame markers และ แบบ
เป้าหมายตามลักษณะทางธรรมชาติ
ทาความเข้ าใจเกี่ยวกับ
F r a m e m a r k e r ในช่วงแรกของ Augmented Reality บนสมาร์ท
โฟน
การใช้อัลกอริธึมที่มีประสิทธิภาพ นั้นมีความสาคัญมาก
อัลกอริทึมของ Computer vision นั้นใช้
Image analysis
complex geometric
algorithms
mathematical transformation
summing large number of
operation
ดังนั้น วิธีแรกของ computer vision-based AR คือ
การใช้วัตถุประเภทเรียบง่าย สามารถตรวจพบได้ด้วย
computationally low – demanding
algorithms
Fiducial markers
โดยทั่วไปเครื่องหมายนี้จะกาหนดไว้ที่ระดับสีเทาเรียบง่าย
ลำ ดับ ง ำ น อัล ก อ ริทึ ม
สำหรับกำรตรวจจับ
เครื่องหมำย
Camera Image ได้รับรูปภาพจากกล้องถ่ายรูป
Thresholding ระดับสีเทาจะแปลงเป็นภาพขาวดา
Rectangle Fitting
ขั้นตอนการตรวจหารูปทรงปิด (Rectangle Fitting)
และ
อาจเป็นรูปทรงสี่เหลี่ยมด้านขนาน เพื่อหาขอบภายในภาพ
ลำ ดั บ ง ำ น อั ล ก อ ริ ทึ ม
สำหรับกำรตรวจจับ
เครื่องหมำย
การตรวจสอบรูปแบบ (pattern checking)
รูปแบบภายในเส้นขอบของเครื่องหมายจะถูกแยกออก เพื่อระบุ
เครื่องหมาย นี่เป็นสิ่งสาคัญที่จะสามารถซ้อนทับเนื้อหาเสมือนจริงที่
แตกต่างกันได้จาก frame markers
ในขั้นตอนสุดท้าย การประมาณค่า (pose estimation)
นั่นคือการคานวณการแปลงและ การหมุนกล้องในระบบพิกัดภายใน
ของ frame markers
Pattern
Checking
Pose Estimation
ลำ ดับ ง ำ น อัล ก อ ริ ทึ ม
สำหรับกำรตรวจจับ
เครื่องหมำย
ในทางปฏิบัตินี่ไม่ใช่การคานวณเพียงครั้งเดียวแต่เป็นกระบวนการ
ที่เกิดขึ้นซ้าแล้วซ้าอีก เพื่อให้ได้ผลลัพธ์ที่ถูกต้องมากขึ้น
ในการประเมินความน่าเชื่อถือของกล้องถ่ายรูปความยาวอย่าง
น้อยหนึ่งด้าน (ความกว้างหรือความสูง) ของ Frame markers
จะต้องเป็นที่รู้จักในระบบนี้
ลำ ดับ ง ำ น อัล ก อ ริ ทึ ม
สำหรับกำรตรวจจับ
เครื่องหมำย
ทำ ควำ มเ ข้ำ ใจ
เ ป้ ำ ห ม ำ ย ต ำ ม ลัก ษ ณ ะ ท ำ ง ธ ร ร ม ช ำ ติ
นี่คือความสาเร็จของขั้นตอนการมองเห็น
คอมพิวเตอร์ขั้นสูงเพื่อตรวจจับและอธิบายบริเวณ
ใกล้เคียงของจุดสนใจ(หรือคุณลักษณะของจุด)
โดยจุดสนใจมีรายละเอียดคมชัด(เช่นมุม)
จุดสนใจจานวนมากสามารถพบได้ในภาพพื้นผิว
ที่มีเนื้อที่ดี (เช่นภาพของถนนที่ใช้ตลอดบทนี้):
ทาความเข้ าใจ
เป้ ำหมำยตำมลักษณะทำงธรรมชำติ
โ ค ร ง ส ร้ำ ง ข อ ง Vu f o r i a ™
โ ค ร ง ส ร้ำ ง ข อ ง Vu f o r i a ™
Vuforia™ เป็น AR library ที่ได้รับการเผยแพร่โดย
Qualcomm® Inc. library เป็น library ฟรี สาหรับใช้ในโครงการที่
ไม่ใช่เชิงพาณิชย์หรือทางการค้า โดย library นี้รองรับ frame markers
และ การติดตามเป้าหมายตามคุณลักษณะทางธรรมชาติ และทาได้หลายเป้าหมาย
รวมทั้งนี้มีการรวมกันของเป้าหมายหลายรายการ
นอกจากนี้library ยังมีฟังก์ชันการ
แสดงผลพื้นฐาน พีชคณิตเชิงเส้น
(เมตริกซ์/vector
transformation) และ ความสามารถ
ในการโต้ตอบ (ปุ่มเสมือน)
AR library ที่สามารถใช้ได้ทั้งบนระบบ
iOS และ Android และ มีการปรับปรุง
ประสิทธิภาพการทางานบนสมาร์ทโฟน
ที่ติดตั้งชิปเซ็ต Qualcomm®
หากต้องการใช้ library จาเป็นต้องทาตามขั้นตอนต่อไปนี้:
ฝึกและสร้าง Target หรือ markers
สร้าง library ในแบบของเรา
ปรับใช้แอพพลิเคชัน
ก ำ ร กำ ห น ด ค่ ำ ใ ห้
Vu f o r i a ™ จ ด จำ
วัต ถุ
ขั้นตอนแรกไปที่เว็บไซต์ www.developer.vuforia.com
การกาห น ด ค่ า ให้ Vu foria ™ จด จา วัต ถุ
สร้างฐานข้อมูลแรก โดยคลิกที่ Create Database, และพิมพ์ VuforiaJME
ฐานข้อมูลของคุณ ควรปรากฏในรายการ Device Database
สร้างฐานข้อมูลแรก โดยคลิกที่ Create Database, และพิมพ์ VuforiaJME
ฐานข้อมูลของคุณ ควรปรากฏในรายการ Device Database
การ กาหนดค่าให้ Vu foria ™ จด จา วัตถุ
การกาห น ด ค่า ให้ Vu foria ™ จดจา วัตถุ
การกาห น ด ค่ า ให้ Vu foria ™ จ ด จา วัต ถุ
ขั้นตอนสุดท้ายของเราในตอนนี้เราจะทาการ export เป้าหมายที่สร้างไว้
Unzip ไฟล์ที่ถูกบีบอัดไว้ จะมีไฟล์สองไฟล์: a. dat และ a . Xml
ทั้งสองไฟล์ถูกใช้เพื่อดาเนินการติดตามขณะ Vuforia™ runtime
ไฟล์ .dat จะระบุจุดสนใจจากภาพ
ไฟล์ .xml เป็นไฟล์สาหรับกาหนดค่า
ก า ร นา V u f o r i a ™ กั บ
J M o n k e y E n g i n e ( J M E )
ม า ใ ช้ ร่ ว ม กั น
การนา Vuforia™ กับ JME มาใช้ ร่ วมกัน
ในส่วนนี้จะแสดงวิธีการรวม Vuforia™ กับ JME โดยใช้ เป้าหมายการติดตาม
คุณลักษณะแบบธรรมชาติสาหรับจุดประสงค์นี้ดังนั้นเปิดโปรเจค VuforiaJME ใน
โปรแกรม Eclipse เพื่อเริ่มต้น
โฟลเดอร์ jni มี source code ภาษา C++, ซึ่งเป็นสิ่งจาเป็นสาหรับ Vuforia™
รวมไปถึงการรวมกันของ Vuforia™ กับ JME จะต้องรวบรวมโค้ด C + + , Java
และถ่ายโอนข้อมูล หากทาเสร็จแล้วจะต้องดาวน์โหลด และติดตั้ง Android NDK ก่อนที่
จะดาเนินการต่อ
The C++ integration
MathUtils.cpp และ MathUtils.h
VuforiaNative.cpp
Android.mk และ
Application.mk
เลเยอร์ C + + เป็นสิ่งสาคัญบนแอปพลิเคชันของตัวอย่าง ImageTarget
บนเว็บไซต์ Vuforia™ โฟลเดอร์ jni ประกอบด้วยไฟล์ต่อไปนี้:
VuforiNative.cpp
Java_com_ar4android_VuforiaJMEActivity_loadTrackerDat
a (JNIEnv.*, jobject):ฟังก์ชันสาหรับการโหลดเป้าหมายเฉพาะของเรา
virtual void QCAR_onUpdate (QCAR ::
State & state):ฟังก์ชันเพื่อค้นหาภาพกล้องถ่ายรูปและถ่ายโอนไปยังเลเยอร์ Java
Java_com_ar4android_VuforiaJME_updateTracking
(JNIEnv * env,jobject obj):
ฟังก์ชันนี้ใช้เพื่อค้นหาตาแหน่งของเป้าหมายและโอนไปยังเลเยอร์ Java
เ อ ก ส า ร อ้ า ง อิ ง
Jens Grubert , Dr.Rahael Grasset (2013) . “Augmented
Reality for Android Application Development”,(pp 73-
93).
THANK
YOU

More Related Content

Featured

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
ThinkNow
 
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
Kurio // The Social Media Age(ncy)
 

Featured (20)

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...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

Virtual on Physical Objects