SlideShare a Scribd company logo
Panoramic Video in Environmental Monitoring
         Software Development and Applications

Presented by Jay W. Johnson
Advisor: Cheng-Chien Liu, Ph.D.
Laboratory of Remote Sensing and Earth Environment Monitoring
Earth Sciences Department, National Cheng Kung University
Python experience
• Started learning Python last summer when I took a
  tutorial on scripting for ArcGIS

• Programming
  • Computational Fluid Dynamics
     • 2D Shallow water model, heat equation, orbiting masses, etc.
     • NumPy, MatPlotLib, Visual Python
  • Evolutionary Computation
     • Genetic algorithms, optimization methods
  • Image Processing
     • Like the following project…
Ladybug3 360° Spherical Camera


                Point Grey Research (PGR) based in Canada.
                • Advanced digital camera products.
Example of panoramic output
• Extract frames from the recorded video as a panoramic JPEGs.
Global Earth Observation and Data Analysis Center - NCKU
Ladybug3 360°Monitoring Application?
 Environmental Spherical Camera
             • Time-series comparison of one location
                  • Track changes in environment conditions
                     • Road and roadside deformation
                     • Landslide enlargement or revegetation
             • Get information about the 3-dimensional space
                  • Measure distances and sizes
                     • Road and lane width
                     • Landslide size
Landslide application




 • Software matches position and orientation within video streams.
 • Images can be exported to another application for image processing .
Accurate GPS data is needed
                     • GPS data issues
                         • Most devices sample once
                           every second
                         • Inaccurate up to several
                           meters
                     • Ladybug software issues
                         • Does not orientate images
                           when outputting panoramas
                            • Calculate this and edit the
                              images before publishing
                         • Does not output a set of
                           evenly spaced images


              North(?)
How to get accurate GPS data

• IMU (inertial measurement unit)
  • An additional instrument to connect to a laptop
  • Does not help with previously recorded video
• Visual odometry (a.k.a ego-motion)
  • Calculating the change in a camera’s position and orientation
    from a series of related images
  • Topic in robot localization: such as robotic planet rovers
Setup and modules
• Python (x,y) on Windows 7
  • Includes many useful modules.
     • NumPy, VPython, OpenCV, PIL, Tkinter, etc.
        • Note: make sure the modules you want are checked during install.
     • Spyder IDE
• The only module I downloaded separately was pexif.
  • Add or edit EXIF data in JPEG images.


• Ladybug API (camera control and video stream access)

• SIFT (scale invariant feature transform) demo program
Ladybug API + ctypes = API Wrapper
• PGR provides the C/C++ API library (ladybug.dll)
• Adapted only the methods related to accessing video files

• Ctypes: Loading a DLL
libc = ctypes.CDLL('ladybug') # loads the ladybug.dll
• Accessing methods
libc.ladybugGetCameraUnitImageCenter(context, cameraNum, centerX, centerY )
• C++ memory management
   • ctypes.create_string_buffer( bytesize )
centerX = ctypes.create_string_buffer(8)
         (run method)
centerX = struct.unpack('d', centerX )[0]
• Pythonified API method
ladybug.GetCameraUnitImageCenter(cameraNum ) => centerX, centerY



                                           Ladybug API
                                          Interface Class                Ladybug3
                                             (Python)                   Application
Ladybug API Library                   Ladybug API Wrapper                (Python)
     (C/C++)                             (Python:ctypes)
SIFT – Scale-Invariant Feature Transform
• Algorithm developed and published by David Lowe in 1999
• SIFT finds thousands of unique points within a single-band PGM image.
subprocess.call( sift_fname+'<'+PGMfilename+'>'+outfname+'.key', shell=True)
• Each point is given a numerical description of 128 values.
• These numeric descriptions are similar despite rotation, scaling, affine
  distortion and lighting.
• Matches are found by finding the pair of points that minimize the
  Euclidean distance between the 128 descriptors.




                              333.96 819.11 30.39 0.894                                    333.96 819.11 30.39 0.894
                              25 104 41 12 1 1 0 1 45 107 89 35 2 0 0 0 123 123 4 0        25 104 41 12 1 1 0 1 45 107 89 35 2 0 0 0 123 123 4 0
                              0 0 0 0 8 5 0 0 0 0 0 0 30 52 14 5 4 1 0 2                   0 0 0 0 8 5 0 0 0 0 0 0 30 52 14 5 4 1 0 2
                              88 49 11 14 17 4 4 16 123 96 0 0 0 0 1 16 31 11 8 8          88 49 11 14 17 4 4 16 123 96 0 0 0 0 1 16 31 11 8 8
                              0 0 0 0 31 66 11 0 0 0 0 2 123 41 3 0 1 0 24 123             0 0 0 0 31 66 11 0 0 0 0 2 123 41 3 0 1 0 24 123
                              123 14 10 15 0 0 13 123 21 5 53 122 0 0 0 2 26 25 0 0        123 14 10 15 0 0 13 123 21 5 53 122 0 0 0 2 26 25 0 0
                              0 0 0 0 123 114 6 0 0 0 0 13 48 47 75 86 0 0 0 19            0 0 0 0 123 114 6 0 0 0 0 13 48 47 75 86 0 0 0 19
                              0 2 50 123 1 0 0 0                                           0 2 50 123 1 0 0 0
                         203.11 894.09 102.38 1.601                                   506.14 375.76 103.55 1.994
                         82 54 0 4 6 0 0 0 161 161 0 0 0 0 0 1 89 37 0 0              0 0 12 119 19 0 0 1 47 4 7 40 12 0 0 12 102 3 0 0
                         0 3 3 0 0 0 0 0 0 0 0 0 118 11 0 5 6 0 0 22                  0 0 0 31 4 0 0 0 1 0 0 0 0 0 17 104 5 0 0 0
                         161 86 24 0 0 0 0 89 128 53 97 5 0 0 0 8 0 0 3 0             148 40 10 25 3 0 0 11 154 100 0 0 1 0 0 30 34 8 0 3
                         0 0 0 0 82 40 0 1 4 0 0 6 124 161 161 3 0 0 0 18             42 20 0 2 2 0 2 36 5 0 0 2 142 6 1 5 1 0 0 83
                         9 32 161 30 0 0 0 1 0 0 7 0 0 0 0 0 4 4 0 0                  154 20 0 0 0 0 0 118 48 2 0 0 6 19 1 10 20 0 0 12
                         0 0 0 0 3 12 16 0 0 0 0 0 0 0 23 3 0 0 0 0                   2 0 0 13 128 22 1 0 0 0 0 154 154 35 14 0 0 0 0 142
                         00000000                                                     18 4 2 0 0 0 0 5
SIFT flow vectors
OpenCV
• Importing OpenCV
   • import cv
   • import cv2
   • import cv2.cv as cv       #for trying older examples
• Pythonified interface
   • cv2 removes the need for creating empty buffers before calling a
     method and the need to copy arrays into a cv type matrix.

   • cv example of calculating a homography
s = cv.CreateMat(len(bottom_matches), 2, cv.CV_32F)
d = cv.CreateMat(len(bottom_matches), 2, cv.CV_32F)
for match in range(len(bottom_matches)):
          s[match,0] = x1bot[match]
          s[match,1] = y1bot[match]
          d[match,0] = x2bot[match]
          d[match,1] = y2bot[match]
H = cv.CreateMat(3, 3, cv.CV_32F) # BUFFER FOR RETURN VALUE
cv.FindHomography(s, d, H, cv.CV_RANSAC)

   • cv2 version: Directly use numpy arrays      views are not allowed,
source = matches[bottom_matches][:,0:2].copy()   need to copy
destin = matches[bottom_matches][:,2:4].copy()
H, mask = cv2.findHomography(source, destin, cv2.RANSAC)
Homography derived flow field
Perspective transform

PIL –
  src_image.transform( dst_size, Image.PERSPECTIVE, transformation_data )


OpenCV –
  cv2.warpPerspective( src_image, transformation_matrix, dst_size )



A series of transformed
images from one camera
3D object
selection and
manipulation

• Create 3D objects from scene

• Add structures or objects
Adding GPS data to JPEGs with pexif
• Open a JPEG file
jpeg = pexif.JpegFile.fromFile( filename )


• Use set_geo method
jpeg.set_geo(GPSLatitude, GPSLongitude )


• Adding altitude data
jpeg.exif.primary.GPS.GPSAltitude = [pexif.Rational(GPSAltitude * 10, 10)]


• Overwrite file or save to new location
jpeg.writeFile( filename )
Closing remarks
• A lot of error is accumulated during the process
  • Image resolution and resulting matched points
  • Instability in the camera view
  • Differentiating road flow vectors from that of other objects
• Still a work in progress
  • The goal here is to have a simple method to correct panoramic
    image orientation and location through image analysis for a quick
    look up of related views in multiple videos.
  • Then expand the functions with depth map generation and
    measuring objects within a panoramic image.
End of line…
                      Jay W. Johnson
                     python@boun.cr

References
 • Lowe, D.: Distinctive image features from scale-invariant keypoints.
   International Journal of Computer Vision, 60(2):91–110, 2004.
 • Hu, R., Shi, R., Shen, I.F., Chen, W.: Video stabilization using scale-invariant
   features. In: IV 2007 11th International Conference on Information
   Visualization, pp. 871-877 (2007)
 • Hartley, R., Zisserman, A.: Multiple View Geometry in Computer Vision. ,
   Cambridge University Press, New York, NY, 2000
Panoramic Video in Environmental Monitoring Software Development and Applications

More Related Content

What's hot

IAP09 CUDA@MIT 6.963 - Lecture 01: High-Throughput Scientific Computing (Hans...
IAP09 CUDA@MIT 6.963 - Lecture 01: High-Throughput Scientific Computing (Hans...IAP09 CUDA@MIT 6.963 - Lecture 01: High-Throughput Scientific Computing (Hans...
IAP09 CUDA@MIT 6.963 - Lecture 01: High-Throughput Scientific Computing (Hans...
npinto
 
Box2D and libGDX
Box2D and libGDXBox2D and libGDX
Box2D and libGDX
Jussi Pohjolainen
 
libGDX: Tiled Maps
libGDX: Tiled MapslibGDX: Tiled Maps
libGDX: Tiled Maps
Jussi Pohjolainen
 
Owatch Virtual Gaming Center ─ 9D VR Cinema Simulator
Owatch Virtual Gaming Center ─ 9D VR Cinema SimulatorOwatch Virtual Gaming Center ─ 9D VR Cinema Simulator
Owatch Virtual Gaming Center ─ 9D VR Cinema Simulator
Owatch
 
AlphaGo and AlphaGo Zero
AlphaGo and AlphaGo ZeroAlphaGo and AlphaGo Zero
AlphaGo and AlphaGo Zero
☕ Keita Watanabe
 
Ujug07presentation
Ujug07presentationUjug07presentation
Ujug07presentation
Bill Adams
 
Owatch VR Theme Park Catalog 2018
Owatch VR Theme Park Catalog 2018Owatch VR Theme Park Catalog 2018
Owatch VR Theme Park Catalog 2018
John Zhang
 
Oracle Systems _ Tony Jambu _ Exadata The Facts and Myths behing a proof of c...
Oracle Systems _ Tony Jambu _ Exadata The Facts and Myths behing a proof of c...Oracle Systems _ Tony Jambu _ Exadata The Facts and Myths behing a proof of c...
Oracle Systems _ Tony Jambu _ Exadata The Facts and Myths behing a proof of c...
InSync2011
 
Guida Uso V Teng
Guida Uso V TengGuida Uso V Teng
Guida Uso V Teng
JacekKupras
 
Depth sensor independent body part localization in depth images using a multi...
Depth sensor independent body part localization in depth images using a multi...Depth sensor independent body part localization in depth images using a multi...
Depth sensor independent body part localization in depth images using a multi...
Rasmus Johansson
 

What's hot (10)

IAP09 CUDA@MIT 6.963 - Lecture 01: High-Throughput Scientific Computing (Hans...
IAP09 CUDA@MIT 6.963 - Lecture 01: High-Throughput Scientific Computing (Hans...IAP09 CUDA@MIT 6.963 - Lecture 01: High-Throughput Scientific Computing (Hans...
IAP09 CUDA@MIT 6.963 - Lecture 01: High-Throughput Scientific Computing (Hans...
 
Box2D and libGDX
Box2D and libGDXBox2D and libGDX
Box2D and libGDX
 
libGDX: Tiled Maps
libGDX: Tiled MapslibGDX: Tiled Maps
libGDX: Tiled Maps
 
Owatch Virtual Gaming Center ─ 9D VR Cinema Simulator
Owatch Virtual Gaming Center ─ 9D VR Cinema SimulatorOwatch Virtual Gaming Center ─ 9D VR Cinema Simulator
Owatch Virtual Gaming Center ─ 9D VR Cinema Simulator
 
AlphaGo and AlphaGo Zero
AlphaGo and AlphaGo ZeroAlphaGo and AlphaGo Zero
AlphaGo and AlphaGo Zero
 
Ujug07presentation
Ujug07presentationUjug07presentation
Ujug07presentation
 
Owatch VR Theme Park Catalog 2018
Owatch VR Theme Park Catalog 2018Owatch VR Theme Park Catalog 2018
Owatch VR Theme Park Catalog 2018
 
Oracle Systems _ Tony Jambu _ Exadata The Facts and Myths behing a proof of c...
Oracle Systems _ Tony Jambu _ Exadata The Facts and Myths behing a proof of c...Oracle Systems _ Tony Jambu _ Exadata The Facts and Myths behing a proof of c...
Oracle Systems _ Tony Jambu _ Exadata The Facts and Myths behing a proof of c...
 
Guida Uso V Teng
Guida Uso V TengGuida Uso V Teng
Guida Uso V Teng
 
Depth sensor independent body part localization in depth images using a multi...
Depth sensor independent body part localization in depth images using a multi...Depth sensor independent body part localization in depth images using a multi...
Depth sensor independent body part localization in depth images using a multi...
 

Viewers also liked

Graduation closing remarks
Graduation closing remarksGraduation closing remarks
Graduation closing remarks
Carie Justine Estrellado
 
closing program sample
closing program sampleclosing program sample
closing program sample
Rophelee Saladaga
 
Rintaro Tamaki, OECD Deputy Secretary-General - Opening and Closing Remarks
Rintaro Tamaki, OECD Deputy Secretary-General - Opening and Closing RemarksRintaro Tamaki, OECD Deputy Secretary-General - Opening and Closing Remarks
Rintaro Tamaki, OECD Deputy Secretary-General - Opening and Closing Remarks
OECD Directorate for Financial and Enterprise Affairs
 
Seminar Documentation
Seminar DocumentationSeminar Documentation
Seminar Documentation
Jan Dy
 
Sample seminar report
Sample seminar reportSample seminar report
Sample seminar report
Farman Khan
 
Special Types of Speech and examples
Special Types of Speech and examplesSpecial Types of Speech and examples
Special Types of Speech and examples
Lena Argosino
 
Letter writing: giving/asking for advice & letters of complaint
Letter writing: giving/asking for advice & letters of complaintLetter writing: giving/asking for advice & letters of complaint
Letter writing: giving/asking for advice & letters of complaint
Nanci Pensado
 
Email Writing Skills
Email Writing SkillsEmail Writing Skills
Email Writing Skills
Jaime Alfredo Cabrera
 

Viewers also liked (8)

Graduation closing remarks
Graduation closing remarksGraduation closing remarks
Graduation closing remarks
 
closing program sample
closing program sampleclosing program sample
closing program sample
 
Rintaro Tamaki, OECD Deputy Secretary-General - Opening and Closing Remarks
Rintaro Tamaki, OECD Deputy Secretary-General - Opening and Closing RemarksRintaro Tamaki, OECD Deputy Secretary-General - Opening and Closing Remarks
Rintaro Tamaki, OECD Deputy Secretary-General - Opening and Closing Remarks
 
Seminar Documentation
Seminar DocumentationSeminar Documentation
Seminar Documentation
 
Sample seminar report
Sample seminar reportSample seminar report
Sample seminar report
 
Special Types of Speech and examples
Special Types of Speech and examplesSpecial Types of Speech and examples
Special Types of Speech and examples
 
Letter writing: giving/asking for advice & letters of complaint
Letter writing: giving/asking for advice & letters of complaintLetter writing: giving/asking for advice & letters of complaint
Letter writing: giving/asking for advice & letters of complaint
 
Email Writing Skills
Email Writing SkillsEmail Writing Skills
Email Writing Skills
 

Similar to Panoramic Video in Environmental Monitoring Software Development and Applications

Roll grinding Six Sigma project
Roll grinding Six Sigma projectRoll grinding Six Sigma project
Roll grinding Six Sigma project
Tariq Aziz
 
Badripatro dissertation 09307903
Badripatro dissertation 09307903Badripatro dissertation 09307903
Badripatro dissertation 09307903
patrobadri
 
Applying your Convolutional Neural Networks
Applying your Convolutional Neural NetworksApplying your Convolutional Neural Networks
Applying your Convolutional Neural Networks
Databricks
 
Generic Framework for Knowledge Classification-1
Generic Framework  for Knowledge Classification-1Generic Framework  for Knowledge Classification-1
Generic Framework for Knowledge Classification-1
Venkata Vineel
 
Thesis-presentation: Tuenti Engineering
Thesis-presentation: Tuenti EngineeringThesis-presentation: Tuenti Engineering
Thesis-presentation: Tuenti Engineering
Marcus Ljungblad
 
.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups
.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups
.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups
NETFest
 
Elevation mapping using stereo vision enabled heterogeneous multi-agent robot...
Elevation mapping using stereo vision enabled heterogeneous multi-agent robot...Elevation mapping using stereo vision enabled heterogeneous multi-agent robot...
Elevation mapping using stereo vision enabled heterogeneous multi-agent robot...
Aritra Sarkar
 
Html5
Html5Html5
Html5
Sai Anjani
 
Fighting fraud: finding duplicates at scale (Highload+ 2019)
Fighting fraud: finding duplicates at scale (Highload+ 2019)Fighting fraud: finding duplicates at scale (Highload+ 2019)
Fighting fraud: finding duplicates at scale (Highload+ 2019)
Alexey Grigorev
 
VizzMaintenance Eclipse Plugin Metrics
VizzMaintenance Eclipse Plugin MetricsVizzMaintenance Eclipse Plugin Metrics
VizzMaintenance Eclipse Plugin Metrics
Zarko Acimovic
 
Quick Wikipedia Mining using Elastic Map Reduce
Quick Wikipedia Mining using Elastic Map ReduceQuick Wikipedia Mining using Elastic Map Reduce
Quick Wikipedia Mining using Elastic Map Reduce
ohkura
 
"3D from 2D: Theory, Implementation, and Applications of Structure from Motio...
"3D from 2D: Theory, Implementation, and Applications of Structure from Motio..."3D from 2D: Theory, Implementation, and Applications of Structure from Motio...
"3D from 2D: Theory, Implementation, and Applications of Structure from Motio...
Edge AI and Vision Alliance
 
1604.08848v1
1604.08848v11604.08848v1
1604.08848v1
Markus Höll
 
Life Cycle of Metrics, Alerting, and Performance Monitoring in Microservices
Life Cycle of Metrics, Alerting, and Performance Monitoring in MicroservicesLife Cycle of Metrics, Alerting, and Performance Monitoring in Microservices
Life Cycle of Metrics, Alerting, and Performance Monitoring in Microservices
Sean Chittenden
 
Graduating To Go - A Jumpstart into the Go Programming Language
Graduating To Go - A Jumpstart into the Go Programming LanguageGraduating To Go - A Jumpstart into the Go Programming Language
Graduating To Go - A Jumpstart into the Go Programming Language
Kaylyn Gibilterra
 
FV_IGARSS11.ppt
FV_IGARSS11.pptFV_IGARSS11.ppt
FV_IGARSS11.ppt
grssieee
 
FV_IGARSS11.ppt
FV_IGARSS11.pptFV_IGARSS11.ppt
FV_IGARSS11.ppt
grssieee
 
FV_IGARSS11.ppt
FV_IGARSS11.pptFV_IGARSS11.ppt
FV_IGARSS11.ppt
grssieee
 
FV_IGARSS11.ppt
FV_IGARSS11.pptFV_IGARSS11.ppt
FV_IGARSS11.ppt
grssieee
 
ENEI16 - WebGL with Three.js
ENEI16 - WebGL with Three.jsENEI16 - WebGL with Three.js
ENEI16 - WebGL with Three.js
José Ferrão
 

Similar to Panoramic Video in Environmental Monitoring Software Development and Applications (20)

Roll grinding Six Sigma project
Roll grinding Six Sigma projectRoll grinding Six Sigma project
Roll grinding Six Sigma project
 
Badripatro dissertation 09307903
Badripatro dissertation 09307903Badripatro dissertation 09307903
Badripatro dissertation 09307903
 
Applying your Convolutional Neural Networks
Applying your Convolutional Neural NetworksApplying your Convolutional Neural Networks
Applying your Convolutional Neural Networks
 
Generic Framework for Knowledge Classification-1
Generic Framework  for Knowledge Classification-1Generic Framework  for Knowledge Classification-1
Generic Framework for Knowledge Classification-1
 
Thesis-presentation: Tuenti Engineering
Thesis-presentation: Tuenti EngineeringThesis-presentation: Tuenti Engineering
Thesis-presentation: Tuenti Engineering
 
.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups
.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups
.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups
 
Elevation mapping using stereo vision enabled heterogeneous multi-agent robot...
Elevation mapping using stereo vision enabled heterogeneous multi-agent robot...Elevation mapping using stereo vision enabled heterogeneous multi-agent robot...
Elevation mapping using stereo vision enabled heterogeneous multi-agent robot...
 
Html5
Html5Html5
Html5
 
Fighting fraud: finding duplicates at scale (Highload+ 2019)
Fighting fraud: finding duplicates at scale (Highload+ 2019)Fighting fraud: finding duplicates at scale (Highload+ 2019)
Fighting fraud: finding duplicates at scale (Highload+ 2019)
 
VizzMaintenance Eclipse Plugin Metrics
VizzMaintenance Eclipse Plugin MetricsVizzMaintenance Eclipse Plugin Metrics
VizzMaintenance Eclipse Plugin Metrics
 
Quick Wikipedia Mining using Elastic Map Reduce
Quick Wikipedia Mining using Elastic Map ReduceQuick Wikipedia Mining using Elastic Map Reduce
Quick Wikipedia Mining using Elastic Map Reduce
 
"3D from 2D: Theory, Implementation, and Applications of Structure from Motio...
"3D from 2D: Theory, Implementation, and Applications of Structure from Motio..."3D from 2D: Theory, Implementation, and Applications of Structure from Motio...
"3D from 2D: Theory, Implementation, and Applications of Structure from Motio...
 
1604.08848v1
1604.08848v11604.08848v1
1604.08848v1
 
Life Cycle of Metrics, Alerting, and Performance Monitoring in Microservices
Life Cycle of Metrics, Alerting, and Performance Monitoring in MicroservicesLife Cycle of Metrics, Alerting, and Performance Monitoring in Microservices
Life Cycle of Metrics, Alerting, and Performance Monitoring in Microservices
 
Graduating To Go - A Jumpstart into the Go Programming Language
Graduating To Go - A Jumpstart into the Go Programming LanguageGraduating To Go - A Jumpstart into the Go Programming Language
Graduating To Go - A Jumpstart into the Go Programming Language
 
FV_IGARSS11.ppt
FV_IGARSS11.pptFV_IGARSS11.ppt
FV_IGARSS11.ppt
 
FV_IGARSS11.ppt
FV_IGARSS11.pptFV_IGARSS11.ppt
FV_IGARSS11.ppt
 
FV_IGARSS11.ppt
FV_IGARSS11.pptFV_IGARSS11.ppt
FV_IGARSS11.ppt
 
FV_IGARSS11.ppt
FV_IGARSS11.pptFV_IGARSS11.ppt
FV_IGARSS11.ppt
 
ENEI16 - WebGL with Three.js
ENEI16 - WebGL with Three.jsENEI16 - WebGL with Three.js
ENEI16 - WebGL with Three.js
 

More from pycontw

Network Security and Analysis with Python
Network Security and Analysis with PythonNetwork Security and Analysis with Python
Network Security and Analysis with Python
pycontw
 
Python on FreeBSD
Python on FreeBSDPython on FreeBSD
Python on FreeBSD
pycontw
 
讓 Python Script 擁有圖形化介面的簡單方法
讓 Python Script 擁有圖形化介面的簡單方法讓 Python Script 擁有圖形化介面的簡單方法
讓 Python Script 擁有圖形化介面的簡單方法
pycontw
 
CyberLink Meets Python
CyberLink Meets PythonCyberLink Meets Python
CyberLink Meets Python
pycontw
 
PyKinect: Body Iteration Application Development Using Python
PyKinect: Body Iteration Application Development Using PythonPyKinect: Body Iteration Application Development Using Python
PyKinect: Body Iteration Application Development Using Python
pycontw
 
Developing Python Apps on Windows Azure
Developing Python Apps on Windows AzureDeveloping Python Apps on Windows Azure
Developing Python Apps on Windows Azure
pycontw
 
Qt Quick GUI Programming with PySide
Qt Quick GUI Programming with PySideQt Quick GUI Programming with PySide
Qt Quick GUI Programming with PySide
pycontw
 
STAF 在自動化測試上的延伸應用 -- TMSTAF (TrendMicro STAF)
STAF 在自動化測試上的延伸應用 -- TMSTAF (TrendMicro STAF)STAF 在自動化測試上的延伸應用 -- TMSTAF (TrendMicro STAF)
STAF 在自動化測試上的延伸應用 -- TMSTAF (TrendMicro STAF)
pycontw
 
Grid Job Management
Grid Job ManagementGrid Job Management
Grid Job Management
pycontw
 
Small Python Tools for Software Release Engineering
Small Python Tools for Software Release EngineeringSmall Python Tools for Software Release Engineering
Small Python Tools for Software Release Engineering
pycontw
 
Python and Startup
Python and StartupPython and Startup
Python and Startup
pycontw
 
那些年 Python 攻佔了 GIS / The Year Python Takes Over GIS
那些年 Python 攻佔了 GIS / The Year Python Takes Over GIS那些年 Python 攻佔了 GIS / The Year Python Takes Over GIS
那些年 Python 攻佔了 GIS / The Year Python Takes Over GIS
pycontw
 
Introduction to Discrete-Event Simulation Using SimPy
Introduction to Discrete-Event Simulation Using SimPyIntroduction to Discrete-Event Simulation Using SimPy
Introduction to Discrete-Event Simulation Using SimPy
pycontw
 
Python and the Web
Python and the WebPython and the Web
Python and the Web
pycontw
 
Large-scale Array-oriented Computing with Python
Large-scale Array-oriented Computing with PythonLarge-scale Array-oriented Computing with Python
Large-scale Array-oriented Computing with Python
pycontw
 

More from pycontw (15)

Network Security and Analysis with Python
Network Security and Analysis with PythonNetwork Security and Analysis with Python
Network Security and Analysis with Python
 
Python on FreeBSD
Python on FreeBSDPython on FreeBSD
Python on FreeBSD
 
讓 Python Script 擁有圖形化介面的簡單方法
讓 Python Script 擁有圖形化介面的簡單方法讓 Python Script 擁有圖形化介面的簡單方法
讓 Python Script 擁有圖形化介面的簡單方法
 
CyberLink Meets Python
CyberLink Meets PythonCyberLink Meets Python
CyberLink Meets Python
 
PyKinect: Body Iteration Application Development Using Python
PyKinect: Body Iteration Application Development Using PythonPyKinect: Body Iteration Application Development Using Python
PyKinect: Body Iteration Application Development Using Python
 
Developing Python Apps on Windows Azure
Developing Python Apps on Windows AzureDeveloping Python Apps on Windows Azure
Developing Python Apps on Windows Azure
 
Qt Quick GUI Programming with PySide
Qt Quick GUI Programming with PySideQt Quick GUI Programming with PySide
Qt Quick GUI Programming with PySide
 
STAF 在自動化測試上的延伸應用 -- TMSTAF (TrendMicro STAF)
STAF 在自動化測試上的延伸應用 -- TMSTAF (TrendMicro STAF)STAF 在自動化測試上的延伸應用 -- TMSTAF (TrendMicro STAF)
STAF 在自動化測試上的延伸應用 -- TMSTAF (TrendMicro STAF)
 
Grid Job Management
Grid Job ManagementGrid Job Management
Grid Job Management
 
Small Python Tools for Software Release Engineering
Small Python Tools for Software Release EngineeringSmall Python Tools for Software Release Engineering
Small Python Tools for Software Release Engineering
 
Python and Startup
Python and StartupPython and Startup
Python and Startup
 
那些年 Python 攻佔了 GIS / The Year Python Takes Over GIS
那些年 Python 攻佔了 GIS / The Year Python Takes Over GIS那些年 Python 攻佔了 GIS / The Year Python Takes Over GIS
那些年 Python 攻佔了 GIS / The Year Python Takes Over GIS
 
Introduction to Discrete-Event Simulation Using SimPy
Introduction to Discrete-Event Simulation Using SimPyIntroduction to Discrete-Event Simulation Using SimPy
Introduction to Discrete-Event Simulation Using SimPy
 
Python and the Web
Python and the WebPython and the Web
Python and the Web
 
Large-scale Array-oriented Computing with Python
Large-scale Array-oriented Computing with PythonLarge-scale Array-oriented Computing with Python
Large-scale Array-oriented Computing with Python
 

Recently uploaded

How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 

Recently uploaded (20)

How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 

Panoramic Video in Environmental Monitoring Software Development and Applications

  • 1. Panoramic Video in Environmental Monitoring Software Development and Applications Presented by Jay W. Johnson Advisor: Cheng-Chien Liu, Ph.D. Laboratory of Remote Sensing and Earth Environment Monitoring Earth Sciences Department, National Cheng Kung University
  • 2. Python experience • Started learning Python last summer when I took a tutorial on scripting for ArcGIS • Programming • Computational Fluid Dynamics • 2D Shallow water model, heat equation, orbiting masses, etc. • NumPy, MatPlotLib, Visual Python • Evolutionary Computation • Genetic algorithms, optimization methods • Image Processing • Like the following project…
  • 3. Ladybug3 360° Spherical Camera Point Grey Research (PGR) based in Canada. • Advanced digital camera products.
  • 4. Example of panoramic output • Extract frames from the recorded video as a panoramic JPEGs.
  • 5. Global Earth Observation and Data Analysis Center - NCKU
  • 6. Ladybug3 360°Monitoring Application? Environmental Spherical Camera • Time-series comparison of one location • Track changes in environment conditions • Road and roadside deformation • Landslide enlargement or revegetation • Get information about the 3-dimensional space • Measure distances and sizes • Road and lane width • Landslide size
  • 7. Landslide application • Software matches position and orientation within video streams. • Images can be exported to another application for image processing .
  • 8. Accurate GPS data is needed • GPS data issues • Most devices sample once every second • Inaccurate up to several meters • Ladybug software issues • Does not orientate images when outputting panoramas • Calculate this and edit the images before publishing • Does not output a set of evenly spaced images North(?)
  • 9. How to get accurate GPS data • IMU (inertial measurement unit) • An additional instrument to connect to a laptop • Does not help with previously recorded video • Visual odometry (a.k.a ego-motion) • Calculating the change in a camera’s position and orientation from a series of related images • Topic in robot localization: such as robotic planet rovers
  • 10. Setup and modules • Python (x,y) on Windows 7 • Includes many useful modules. • NumPy, VPython, OpenCV, PIL, Tkinter, etc. • Note: make sure the modules you want are checked during install. • Spyder IDE • The only module I downloaded separately was pexif. • Add or edit EXIF data in JPEG images. • Ladybug API (camera control and video stream access) • SIFT (scale invariant feature transform) demo program
  • 11. Ladybug API + ctypes = API Wrapper • PGR provides the C/C++ API library (ladybug.dll) • Adapted only the methods related to accessing video files • Ctypes: Loading a DLL libc = ctypes.CDLL('ladybug') # loads the ladybug.dll • Accessing methods libc.ladybugGetCameraUnitImageCenter(context, cameraNum, centerX, centerY ) • C++ memory management • ctypes.create_string_buffer( bytesize ) centerX = ctypes.create_string_buffer(8) (run method) centerX = struct.unpack('d', centerX )[0] • Pythonified API method ladybug.GetCameraUnitImageCenter(cameraNum ) => centerX, centerY Ladybug API Interface Class Ladybug3 (Python) Application Ladybug API Library Ladybug API Wrapper (Python) (C/C++) (Python:ctypes)
  • 12. SIFT – Scale-Invariant Feature Transform • Algorithm developed and published by David Lowe in 1999 • SIFT finds thousands of unique points within a single-band PGM image. subprocess.call( sift_fname+'<'+PGMfilename+'>'+outfname+'.key', shell=True) • Each point is given a numerical description of 128 values. • These numeric descriptions are similar despite rotation, scaling, affine distortion and lighting. • Matches are found by finding the pair of points that minimize the Euclidean distance between the 128 descriptors. 333.96 819.11 30.39 0.894 333.96 819.11 30.39 0.894 25 104 41 12 1 1 0 1 45 107 89 35 2 0 0 0 123 123 4 0 25 104 41 12 1 1 0 1 45 107 89 35 2 0 0 0 123 123 4 0 0 0 0 0 8 5 0 0 0 0 0 0 30 52 14 5 4 1 0 2 0 0 0 0 8 5 0 0 0 0 0 0 30 52 14 5 4 1 0 2 88 49 11 14 17 4 4 16 123 96 0 0 0 0 1 16 31 11 8 8 88 49 11 14 17 4 4 16 123 96 0 0 0 0 1 16 31 11 8 8 0 0 0 0 31 66 11 0 0 0 0 2 123 41 3 0 1 0 24 123 0 0 0 0 31 66 11 0 0 0 0 2 123 41 3 0 1 0 24 123 123 14 10 15 0 0 13 123 21 5 53 122 0 0 0 2 26 25 0 0 123 14 10 15 0 0 13 123 21 5 53 122 0 0 0 2 26 25 0 0 0 0 0 0 123 114 6 0 0 0 0 13 48 47 75 86 0 0 0 19 0 0 0 0 123 114 6 0 0 0 0 13 48 47 75 86 0 0 0 19 0 2 50 123 1 0 0 0 0 2 50 123 1 0 0 0 203.11 894.09 102.38 1.601 506.14 375.76 103.55 1.994 82 54 0 4 6 0 0 0 161 161 0 0 0 0 0 1 89 37 0 0 0 0 12 119 19 0 0 1 47 4 7 40 12 0 0 12 102 3 0 0 0 3 3 0 0 0 0 0 0 0 0 0 118 11 0 5 6 0 0 22 0 0 0 31 4 0 0 0 1 0 0 0 0 0 17 104 5 0 0 0 161 86 24 0 0 0 0 89 128 53 97 5 0 0 0 8 0 0 3 0 148 40 10 25 3 0 0 11 154 100 0 0 1 0 0 30 34 8 0 3 0 0 0 0 82 40 0 1 4 0 0 6 124 161 161 3 0 0 0 18 42 20 0 2 2 0 2 36 5 0 0 2 142 6 1 5 1 0 0 83 9 32 161 30 0 0 0 1 0 0 7 0 0 0 0 0 4 4 0 0 154 20 0 0 0 0 0 118 48 2 0 0 6 19 1 10 20 0 0 12 0 0 0 0 3 12 16 0 0 0 0 0 0 0 23 3 0 0 0 0 2 0 0 13 128 22 1 0 0 0 0 154 154 35 14 0 0 0 0 142 00000000 18 4 2 0 0 0 0 5
  • 14. OpenCV • Importing OpenCV • import cv • import cv2 • import cv2.cv as cv #for trying older examples • Pythonified interface • cv2 removes the need for creating empty buffers before calling a method and the need to copy arrays into a cv type matrix. • cv example of calculating a homography s = cv.CreateMat(len(bottom_matches), 2, cv.CV_32F) d = cv.CreateMat(len(bottom_matches), 2, cv.CV_32F) for match in range(len(bottom_matches)): s[match,0] = x1bot[match] s[match,1] = y1bot[match] d[match,0] = x2bot[match] d[match,1] = y2bot[match] H = cv.CreateMat(3, 3, cv.CV_32F) # BUFFER FOR RETURN VALUE cv.FindHomography(s, d, H, cv.CV_RANSAC) • cv2 version: Directly use numpy arrays views are not allowed, source = matches[bottom_matches][:,0:2].copy() need to copy destin = matches[bottom_matches][:,2:4].copy() H, mask = cv2.findHomography(source, destin, cv2.RANSAC)
  • 16. Perspective transform PIL – src_image.transform( dst_size, Image.PERSPECTIVE, transformation_data ) OpenCV – cv2.warpPerspective( src_image, transformation_matrix, dst_size ) A series of transformed images from one camera
  • 17. 3D object selection and manipulation • Create 3D objects from scene • Add structures or objects
  • 18. Adding GPS data to JPEGs with pexif • Open a JPEG file jpeg = pexif.JpegFile.fromFile( filename ) • Use set_geo method jpeg.set_geo(GPSLatitude, GPSLongitude ) • Adding altitude data jpeg.exif.primary.GPS.GPSAltitude = [pexif.Rational(GPSAltitude * 10, 10)] • Overwrite file or save to new location jpeg.writeFile( filename )
  • 19. Closing remarks • A lot of error is accumulated during the process • Image resolution and resulting matched points • Instability in the camera view • Differentiating road flow vectors from that of other objects • Still a work in progress • The goal here is to have a simple method to correct panoramic image orientation and location through image analysis for a quick look up of related views in multiple videos. • Then expand the functions with depth map generation and measuring objects within a panoramic image.
  • 20. End of line… Jay W. Johnson python@boun.cr References • Lowe, D.: Distinctive image features from scale-invariant keypoints. International Journal of Computer Vision, 60(2):91–110, 2004. • Hu, R., Shi, R., Shen, I.F., Chen, W.: Video stabilization using scale-invariant features. In: IV 2007 11th International Conference on Information Visualization, pp. 871-877 (2007) • Hartley, R., Zisserman, A.: Multiple View Geometry in Computer Vision. , Cambridge University Press, New York, NY, 2000

Editor's Notes

  1. Records GPS data along with the video data into the same file.
  2. GEODAC . Rapidly respond to disasters with multi-temporal satellite imagery
  3. Can directly post JPEG images with GPS data directly to a GIS system like Google Earth.
  4. Goal is to quickly locate the same view from all available videos.
  5. Google Earth default is to place center of panoramic image facing north.
  6. Python (x,y) includes all the important modules you need to do scientific computing as well as good IDE and other programs.
  7. Because it is C++, you need to calculate ahead of time how big of a buffer to set aside and pass to the method for writing.
  8. FindHomography method finds the best translation of a plane from one image to the next.
  9. The set_geo method only adds lat and lon. Must use a less straightforward way to altitude.