With the popularity of laptops, cell phones, PDAs, GPS devices, RFID, and intelligent electronics in the post-PC era, computing devices have become cheaper, more mobile, more distributed, and more pervasive in daily life. It is now possible to construct, from commercial off-the-shelf (COTS) components, a wallet size embedded system with the equivalent capability of a 90’s PC. Such embedded systems can be supported with scaled down Windows or Linux operating systems. From this perspective, the emergence of wireless sensor networks (WSNs) is essentially the latest trend of Moore’s Law toward the miniaturization and ubiquity of computing devices. Typically, a wireless sensor node (or simply sensor node) consists of sensing, computing, communication, actuation, and power components. These components are integrated on a single or multiple boards, and packaged in a few cubic inches. With state-of-the-art, low-power circuit and networking technologies, a sensor node powered by 2 AA batteries can last for up to three years with a 1% low duty cycle working mode. A WSN usually consists of tens to thousands of such nodes that communicate through wireless channels for information sharing and cooperative processing. WSNs can be deployed on a global scale for environmental monitoring and habitat study, over a battle field for military surveillance and reconnaissance, in emergent environments for search and rescue, in factories for condition based maintenance, in buildings for infrastructure health monitoring, in homes to realize smart homes, or even in bodies for patient monitoring [60; 76; 124; 142]. After the initial deployment (typically ad hoc), sensor nodes are responsible for self-organizing an appropriate network infrastructure, often with multi-hop connections between sensor nodes. The onboard sensors then start collecting acoustic, seismic, infrared or magnetic information about the environment, using either continuous or event driven working modes. Location and positioning information can also be obtained through the global positioning system (GPS) or local positioning algorithms. This information can be gathered from across the network and appropriately processed to construct a global view of the monitoring phenomena or objects. The basic philosophy behind WSNs is that, while the capability of each individual sensor node is limited, the aggregate power of the entire network is sufficient for the required mission. In a typical scenario, users can retrieve information of interest
from a WSN by injecting queries and gathering results from the so-called base stations (or sink nodes), which behave as an interface between users and the network. In this way, WSNs can be considered as a distributed database. It is also envisioned that sensor networks will ultimately be connected to the Internet, through which global information sharing becomes feasible. The era of WSNs is highly anticipated in the near future. In September 1999, WSNs w
Collinearity Equations
Kinds of product that can be derived by the collinearity equation
- Space Resection By Collinearity
- Space Intersection By Collinearity
- Interior Orientation
- Relative Orientation
- Absolute Orientation
- Self-Calibration
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2021/10/introduction-to-simultaneous-localization-and-mapping-slam-a-presentation-from-gareth-cross/
Independent game developer (and former technical lead of state estimation at Skydio) Gareth Cross presents the “Introduction to Simultaneous Localization and Mapping (SLAM)” tutorial at the May 2021 Embedded Vision Summit.
This talk provides an introduction to the fundamentals of simultaneous localization and mapping (SLAM). Cross aims to provide foundational knowledge, and viewers are not expected to have any prerequisite experience in the field.
The talk consists of an introduction to the concept of SLAM, as well as practical design considerations in formulating SLAM problems. Visual inertial odometry is introduced as a motivating example of SLAM, and Cross explains how this problem is structured and solved.
Autonomous vehicles primary need is to have a robust and precise perception of the surrounding environment. To achieve accurate results in autonomous driving a combination of several different sensors is used. This technique is commonly known as sensor fusion.
However, a critical aspect of autonomous driving perception is also the reactivity: we do not only need to perform sensor fusion properly, but we also have to respect real time requirements. The latter are fundamental to guarantee predictability of the system, avoid anomalous situations and prevent hazards.
Performing fusion online is not trivial because sensors returns a lot of data and process them may be time consuming. The solution we present is an alignment of the sensors, which combines information from LiDAR and cameras, that is performed once in preprocessing and allow us to exploit the precomputed matching in real time.
Location-based Services (LBSs) are IT services for providing information that has been created, compiled, selected, or filtered taking into consideration the current locations of the users or those of other persons or mobile objects.
Object detection is a computer technology related to computer vision and image processing that deals with detecting instances of semantic objects of a certain class (such as humans, buildings, or cars) in digital images and videos.
A Small Helping Hand from me to my Engineering collegues and my other friends in need of Object Detection
This is about Image segmenting.We will be using fuzzy logic & wavelet transformation for segmenting it.Fuzzy logic shall be used because of the inconsistencies that may occur during segementing or
This is a short presentation given in the context of a computational design course for MSc architectural engineering students. It is hopefully insightful for other engineering students as well.
With the popularity of laptops, cell phones, PDAs, GPS devices, RFID, and intelligent electronics in the post-PC era, computing devices have become cheaper, more mobile, more distributed, and more pervasive in daily life. It is now possible to construct, from commercial off-the-shelf (COTS) components, a wallet size embedded system with the equivalent capability of a 90’s PC. Such embedded systems can be supported with scaled down Windows or Linux operating systems. From this perspective, the emergence of wireless sensor networks (WSNs) is essentially the latest trend of Moore’s Law toward the miniaturization and ubiquity of computing devices. Typically, a wireless sensor node (or simply sensor node) consists of sensing, computing, communication, actuation, and power components. These components are integrated on a single or multiple boards, and packaged in a few cubic inches. With state-of-the-art, low-power circuit and networking technologies, a sensor node powered by 2 AA batteries can last for up to three years with a 1% low duty cycle working mode. A WSN usually consists of tens to thousands of such nodes that communicate through wireless channels for information sharing and cooperative processing. WSNs can be deployed on a global scale for environmental monitoring and habitat study, over a battle field for military surveillance and reconnaissance, in emergent environments for search and rescue, in factories for condition based maintenance, in buildings for infrastructure health monitoring, in homes to realize smart homes, or even in bodies for patient monitoring [60; 76; 124; 142]. After the initial deployment (typically ad hoc), sensor nodes are responsible for self-organizing an appropriate network infrastructure, often with multi-hop connections between sensor nodes. The onboard sensors then start collecting acoustic, seismic, infrared or magnetic information about the environment, using either continuous or event driven working modes. Location and positioning information can also be obtained through the global positioning system (GPS) or local positioning algorithms. This information can be gathered from across the network and appropriately processed to construct a global view of the monitoring phenomena or objects. The basic philosophy behind WSNs is that, while the capability of each individual sensor node is limited, the aggregate power of the entire network is sufficient for the required mission. In a typical scenario, users can retrieve information of interest
from a WSN by injecting queries and gathering results from the so-called base stations (or sink nodes), which behave as an interface between users and the network. In this way, WSNs can be considered as a distributed database. It is also envisioned that sensor networks will ultimately be connected to the Internet, through which global information sharing becomes feasible. The era of WSNs is highly anticipated in the near future. In September 1999, WSNs w
Collinearity Equations
Kinds of product that can be derived by the collinearity equation
- Space Resection By Collinearity
- Space Intersection By Collinearity
- Interior Orientation
- Relative Orientation
- Absolute Orientation
- Self-Calibration
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2021/10/introduction-to-simultaneous-localization-and-mapping-slam-a-presentation-from-gareth-cross/
Independent game developer (and former technical lead of state estimation at Skydio) Gareth Cross presents the “Introduction to Simultaneous Localization and Mapping (SLAM)” tutorial at the May 2021 Embedded Vision Summit.
This talk provides an introduction to the fundamentals of simultaneous localization and mapping (SLAM). Cross aims to provide foundational knowledge, and viewers are not expected to have any prerequisite experience in the field.
The talk consists of an introduction to the concept of SLAM, as well as practical design considerations in formulating SLAM problems. Visual inertial odometry is introduced as a motivating example of SLAM, and Cross explains how this problem is structured and solved.
Autonomous vehicles primary need is to have a robust and precise perception of the surrounding environment. To achieve accurate results in autonomous driving a combination of several different sensors is used. This technique is commonly known as sensor fusion.
However, a critical aspect of autonomous driving perception is also the reactivity: we do not only need to perform sensor fusion properly, but we also have to respect real time requirements. The latter are fundamental to guarantee predictability of the system, avoid anomalous situations and prevent hazards.
Performing fusion online is not trivial because sensors returns a lot of data and process them may be time consuming. The solution we present is an alignment of the sensors, which combines information from LiDAR and cameras, that is performed once in preprocessing and allow us to exploit the precomputed matching in real time.
Location-based Services (LBSs) are IT services for providing information that has been created, compiled, selected, or filtered taking into consideration the current locations of the users or those of other persons or mobile objects.
Object detection is a computer technology related to computer vision and image processing that deals with detecting instances of semantic objects of a certain class (such as humans, buildings, or cars) in digital images and videos.
A Small Helping Hand from me to my Engineering collegues and my other friends in need of Object Detection
This is about Image segmenting.We will be using fuzzy logic & wavelet transformation for segmenting it.Fuzzy logic shall be used because of the inconsistencies that may occur during segementing or
This is a short presentation given in the context of a computational design course for MSc architectural engineering students. It is hopefully insightful for other engineering students as well.
Preliminaries of Analytic Geometry and Linear Algebra 3D modellingPirouz Nourian
from my lecture notes for the course Geo1004 (2015), 3D modelling of the built environment, at TU Delft, faculty of Architecture and the Built Environment
https://github.com/telecombcn-dl/dlmm-2017-dcu
Deep learning technologies are at the core of the current revolution in artificial intelligence for multimedia data analysis. The convergence of big annotated data and affordable GPU hardware has allowed the training of neural networks for data analysis tasks which had been addressed until now with hand-crafted features. Architectures such as convolutional neural networks, recurrent neural networks and Q-nets for reinforcement learning have shaped a brand new scenario in signal processing. This course will cover the basic principles and applications of deep learning to computer vision problems, such as image classification, object detection or text captioning.
Object detection is a central problem in computer vision and underpins many applications from medical image analysis to autonomous driving. In this talk, we will review the basics of object detection from fundamental concepts to practical techniques. Then, we will dive into cutting-edge methods that use transformers to drastically simplify the object detection pipeline while maintaining predictive performance. Finally, we will show how to train these models at scale using Determined’s integrated deep learning platform and then serve the models using MLflow.
What you will learn:
Basics of object detection including main concepts and techniques
Main ideas from the DETR and Deformable DETR approaches to object detection
Overview of the core capabilities of Determined’s deep learning platform, with a focus on its support for effortless distributed training
How to serve models trained in Determined using MLflow
Build Your Own 3D Scanner: Surface ReconstructionDouglas Lanman
Build Your Own 3D Scanner:
Surface Reconstruction
http://mesh.brown.edu/byo3d/
SIGGRAPH 2009 Courses
Douglas Lanman and Gabriel Taubin
This course provides a beginner with the necessary mathematics, software, and practical details to leverage projector-camera systems in their own 3D scanning projects. An example-driven approach is used throughout; each new concept is illustrated using a practical scanner implemented with off-the-shelf parts. The course concludes by detailing how these new approaches are used in rapid prototyping, entertainment, cultural heritage, and web-based applications.
Manifold Blurring Mean Shift algorithms for manifold denoising, report, 2012Florent Renucci
(General) To retrieve a clean dataset by deleting outliers.
(Computer Vision) the recovery of a digital image that has been contaminated by additive white Gaussian noise.
Transformer Architectures in Vision
[2018 ICML] Image Transformer
[2019 CVPR] Video Action Transformer Network
[2020 ECCV] End-to-End Object Detection with Transformers
[2021 ICLR] An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
Artificial Intelligence, Machine Learning and Deep LearningSujit Pal
Slides for talk Abhishek Sharma and I gave at the Gennovation tech talks (https://gennovationtalks.com/) at Genesis. The talk was part of outreach for the Deep Learning Enthusiasts meetup group at San Francisco. My part of the talk is covered from slides 19-34.
Lecture notes of the course Future Models I (AR1TWF030), The Why Factory, Directed by Prof. Winy Mass, TU Delft, Faculty of Architecture and Built Environment
Lecture notes of the course Future Models I (AR1TWF030), The Why Factory, Directed by Prof. Winy Mass, TU Delft, Faculty of Architecture and Built Environment
Lecture notes of the course Future Models I (AR1TWF030), The Why Factory, Directed by Prof. Winy Mass, TU Delft, Faculty of Architecture and Built Environment
Lecture notes of the course Future Models I (AR1TWF030), The Why Factory, Directed by Prof. Winy Mass, TU Delft, Faculty of Architecture and Built Environment
Ar1 twf030 lecture2.1: Geometry and Topology in Computational DesignPirouz Nourian
Lecture notes of the course Future Models I (AR1TWF030), The Why Factory, Directed by Prof. Winy Mass, TU Delft, Faculty of Architecture and Built Environment
Welcome to WIPAC Monthly the magazine brought to you by the LinkedIn Group Water Industry Process Automation & Control.
In this month's edition, along with this month's industry news to celebrate the 13 years since the group was created we have articles including
A case study of the used of Advanced Process Control at the Wastewater Treatment works at Lleida in Spain
A look back on an article on smart wastewater networks in order to see how the industry has measured up in the interim around the adoption of Digital Transformation in the Water Industry.
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
Student information management system project report ii.pdfKamal Acharya
Our project explains about the student management. This project mainly explains the various actions related to student details. This project shows some ease in adding, editing and deleting the student details. It also provides a less time consuming process for viewing, adding, editing and deleting the marks of the students.
Hierarchical Digital Twin of a Naval Power SystemKerry Sado
A hierarchical digital twin of a Naval DC power system has been developed and experimentally verified. Similar to other state-of-the-art digital twins, this technology creates a digital replica of the physical system executed in real-time or faster, which can modify hardware controls. However, its advantage stems from distributing computational efforts by utilizing a hierarchical structure composed of lower-level digital twin blocks and a higher-level system digital twin. Each digital twin block is associated with a physical subsystem of the hardware and communicates with a singular system digital twin, which creates a system-level response. By extracting information from each level of the hierarchy, power system controls of the hardware were reconfigured autonomously. This hierarchical digital twin development offers several advantages over other digital twins, particularly in the field of naval power systems. The hierarchical structure allows for greater computational efficiency and scalability while the ability to autonomously reconfigure hardware controls offers increased flexibility and responsiveness. The hierarchical decomposition and models utilized were well aligned with the physical twin, as indicated by the maximum deviations between the developed digital twin hierarchy and the hardware.
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)MdTanvirMahtab2
This presentation is about the working procedure of Shahjalal Fertilizer Company Limited (SFCL). A Govt. owned Company of Bangladesh Chemical Industries Corporation under Ministry of Industries.
Overview of the fundamental roles in Hydropower generation and the components involved in wider Electrical Engineering.
This paper presents the design and construction of hydroelectric dams from the hydrologist’s survey of the valley before construction, all aspects and involved disciplines, fluid dynamics, structural engineering, generation and mains frequency regulation to the very transmission of power through the network in the United Kingdom.
Author: Robbie Edward Sayers
Collaborators and co editors: Charlie Sims and Connor Healey.
(C) 2024 Robbie E. Sayers
Point Cloud Processing: Estimating Normal Vectors and Curvature Indicators using Eigenvectors
1. 1Challenge the future
Basic Point Cloud Processing
Estimating Normal Vectors and Curvature Indicators
Ir. Pirouz Nourian
PhD candidate & Instructor, chair of Design Informatics, since 2010
MSc in Architecture 2009
BSc in Control Engineering 2005
Geo1004, Geomatics Master Track
Directed by Dr. ir. Sisi Zlatannova
2. 2Challenge the future
How do we make a computer ‘see’ what we understand from this?
What do you make of this?
What is this all about?
3. 3Challenge the future
Data to Information: LIDAR to LOD2
How do we make sense out of such big data?
Image courtesy of GEOCONNEXION
?
4. 4Challenge the future
SOFTWARE APPLICATIONS
• FME, Safe Software
• LASTools, rapidlasso
• Point Cloud Library (PCL)
• Cloud Compare
• MeshLab
• LP360 QCoherent
A NEW VERSION OF TOIDAR! YES!
http://opentopo.sdsc.eduInformation from:
6. 6Challenge the future
LASTools, rapidlasso
filtering, clipping, reprojecting, compression, classification, DSM, DTM, TIN, contours bare-earth
de facto standards for
point cloud data:
.las
.laz
8. 8Challenge the future
Point Cloud Library PCL
point clouds, visualization, processing, segmentation, filtering,
feature estimation, registration
Using this library in Rhino?
9. 9Challenge the future
Cloud Compare
Implements PCL and more methods, handy to use for point
cloud processing
Image from software.informer.com
10. 10Challenge the future
MeshLab
Has some surface reconstruction methods, handy to have when
working with point clouds.
Image from https://danieleferdani.wordpress.com/
12. 12Challenge the future
Part 1 finished
We will continue with one specific way of dealing with point
clouds and estimating normal vectors and curvatures…
14. 14Challenge the future
A Curvature-Based Approach to Point Cloud
Segmentation & Feature Detection
Removing
Outliers
Elevation
Classification
Slope
Classification
Aspect
Classification
Region-Growing
Segmentation
Point Cloud
of a Building
Noise
reduction
Forming
Neighbourhoods:
e.g. KNN or Range
Forming
Covariance
Matrices for
Neighbourhoods
Using PCA, Estimating:
Normal Vectors &
Curvature Indicators
Normal
Vectors
Curvature
Indicators
Eigen
System
Triangulation
Mesh
Surface
15. 15Challenge the future
Different Approaches for Finding Fitting Planes/Edges
1. Using curvature values computed (estimated) by eigenvalues of
covariance matrices, to run a segmentation algorithm based on region
growing.
2. Using Octree Voxels, to detect edge voxels, remove them and create
segments.
3. Using Hough transform on a 2.5D point cloud, converting to the
parameter space and using DBScan clustering method to find
clusters of parameters, each of which correspond to a segment in a
point cloud.
4. And a few more in the literature…
16. 16Challenge the future
Different Approaches for Finding Fitting Planes/Edges
Region growing based on
normals and curvature Segmentation usingOctree voxels Hough transformation
17. 17Challenge the future
Different Approaches for Finding Fitting Planes/Edges:
our experience!
Curvature based region
growing
Voxel based region
growing
Hough transform
Noise management Fair Good Good
Density variation
management
Fair Fair Good
Efficiency Good Good Poor
Ambiguity of vantage
point management
Fair Good Good
Avoiding priori
knowledge
Good Good Poor
Ease of further
processing
Good Poor Poor
18. 18Challenge the future
Neighbourhoods of Points
Fixed Distance Neighbors (FDN) and K-Nearest Neighbors (KNN)
• Rabbani, T., van den Heuvel, F., & Vosselmann, G. (2006). Segmentation of point clouds using smoothness
constraint. International Archives of Photogrammetry, Remote Sensing and Spatial Information
Sciences, 36(5), 248-253.
• Pauling, Frederick, Michael Bosse, and Robert Zlot. "Automatic segmentation of 3d laser point clouds by
ellipsoidal region growing." Australasian Conference on Robotics and Automation. 2009.
The idea is to form neighborhoods based on [squared] distance
These two options are usually provided. Apart from normal vector
estimation KNN can be useful also for removal of outliers.
19. 19Challenge the future
Fitting Planes to Neighbourhoods
The idea is that the underlying surface is a 2-manifold; therefore it
resembles a 2D plane locally
Least Square Plane Fitting Estimation Problem
Principal Component Analysis Problem
Intuition: Defining plane as the locus of lines that have
direction vectors perpendicular to a normal vector;
considering an origin for the plane in questions, we can
consider the plane as the locus of points A such that A-
O is perpendicular to N.
20. 20Challenge the future
Fitting Planes to Neighbourhoods
The idea is that the underlying surface is a 2-manifold; therefore it
resembles a 2D plane locally, we look at ellipsoids showing local
dispersions
Images courtesy of Olga Sorkine
21. 21Challenge the future
How to estimate normals using PCA
The idea is that the underlying surface is a 2-manifold; therefore it
resembles a 2D plane locally
• Pauly, Mark, Markus Gross, and Leif P. Kobbelt. "Efficient simplification of
point-sampled surfaces." Proceedings of the conference on
Visualization'02. IEEE Computer Society, 2002.
• Hoppe, H., DeRose, T., Duchamp, T., McDonald, J., Stuetzle, W. Surface
reconstruction from unorganized points. SIGGRAPH 92, 1992
• Shaffer, E., Garland, M. Efficient Adaptive Simplification of Massive
Meshes. IEEE Visualization 01, 2001
22. 22Challenge the future
How to estimate normals using PCA
We form a covariance matrix for each neighborhood, showing how
neighbors are dispersed around their average (centroid).
This will be a 3
by 3 symmetric
matrix!
23. 23Challenge the future
How to estimate normals using PCA
We form a covariance matrix for each neighborhood, showing how
neighbors are dispersed around their average (centroid).
This will be a 3
by 3 symmetric
matrix!
Form an Eigen system for this matrix using a
linear algebra library, and the first eigenvector
corresponding to least eigenvalue will be the
normal vector at each neighbourhood.
Explanation follows…
PCL implementation:
http://pointclouds.org/documentation/tutorials/normal_estimation.php
24. 24Challenge the future
How to estimate curvature using PCA
The idea is to use an indication of change along the normal vector
Jolliffe, I. Principle Component Analysis. Springer-Verlag, 1986
25. 25Challenge the future
How to do all this in code?
• We try not to reinvent the wheel; the idea is to use free open
source libraries like Math.NET and Accord.NET
• We are not the first people dealing with such issues, these are
generally matters of data mining and machine learning
• We can find KNN neighbourhoods using
Accord.NET http://accord-framework.net/
• We can find eigenvalues and eigenvectors
using MetaNumerics.dll, MathNet.dll or
Accord.NET
• You will receive example code implementing
MetaNumerics
26. 26Challenge the future
Fitting Planes to Neighbourhoods
How do we minimize the error in fitting a plane to the
mentioned neighbourhood? First we define it…
Images courtesy of Olga Sorkine
27. 27Challenge the future
An explanation after Olga Sorkine:
• Input points:
• Centroid:
• Vectors from the centroid:
m
29. 29Challenge the future
Continued…
m
m minimizes SSD, formally it is the
“arg min” of the following function
(to be minimized), i.e. the argument
that makes it reach its minimum. and
it can be shown that m is the
centroid C
Solving this turns out to be equal to
solving an Eigen system for the
covariance matrix; you can see how…
31. 31Challenge the future
Long story short…
We find eigenvalues and eigenvectors of the covariance matrices…
What was this all about? Segmenting the point cloud taking into
account [underlying] surface variations, in search of smooth patches,
made disjoint by edges (where we find high curvature/variation).
Therefore we can use the above estimated vectors and values for
such a segmentation.
35. 35Challenge the future
•Constrained minimization – Lagrange multipliers
Continued from lecture notes of Olga Sorkine…
Given this equality in
differentiation of vector
valued functions
36. 36Challenge the future
•Constrained minimization – Lagrange multipliers
Continued from lecture notes of Olga Sorkine…
maximize f(x, y) subject to g(x, y) = c.
Lagrangian:
The prblem is transformed to finding a ‘’staionary
point for the Langrangian at which the partial
derivatives of Lagrangian function are zero.
37. 37Challenge the future
•Constrained minimization – Lagrange multipliers
Continued from lecture notes of Olga Sorkine…
This one means that the
normal vector is
normalized, meaning its
length is equal to 1; why,
because the dot product
of a vector by itself gives
the squared length
38. 38Challenge the future
How to form covariance matrices in code?
VB.NET (confirm and debug for yourself)
If(Pts.Count > 3) Then
Dim CovMatrices As New list(Of Meta.Numerics.Matrices.SymmetricMatrix)
For j As Integer=0 To Pts.Count - 1
Dim CovM As New Meta.Numerics.Matrices.SymmetricMatrix(3)
Dim Neighbors As List(Of Integer) = DirectCast(Neigh(j), List(Of Integer))
Dim Centroid As New Point3d
Dim NPts As New List(Of Point3d)
For Each neighbor As Integer In Neighbors
Centroid = Centroid + Pts(neighbor)
NPts.Add(Pts(neighbor))
Next
Centroid = Centroid / Neighbors.Count
Dim CiCBar As New RectangularMatrix(3, Neighbors.Count)
For k As Integer=0 To Neighbors.count - 1
Dim Diff As point3d = Pts(Neighbors(k)) - Centroid
CiCBar(0, k) = Diff.X
CiCBar(1, k) = Diff.y
CiCBar(2, k) = Diff.z
Next
CovM = CiCBar.MultiplySelfByTranspose()
CovM = (1 / (Neighbors.count - 1)) * CovM
CovMatrices.Add(CovM)
Next
A = CovMatrices(0).ToArray()
C = CovMatrices
End If
39. 39Challenge the future
How to form covariance matrices in code?
C#.NET (confirm and debug for yourself)
if ((Pts.Count > 3)) {
List<Meta.Numerics.Matrices.SymmetricMatrix> CovMatrices = new List<Meta.Numerics.Matrices.SymmetricMatrix>();
for (int j = 0; j <= Pts.Count - 1; j++) {
Meta.Numerics.Matrices.SymmetricMatrix CovM = new Meta.Numerics.Matrices.SymmetricMatrix(3);
List<int> Neighbors = (List<int>)Neigh(j);
Point3d Centroid = new Point3d();
List<Point3d> NPts = new List<Point3d>();
foreach (int neighbor in Neighbors) {
Centroid = Centroid + Pts(neighbor);
NPts.Add(Pts(neighbor));
}
Centroid = Centroid / Neighbors.Count;
RectangularMatrix CiCBar = new RectangularMatrix(3, Neighbors.Count);
for (int k = 0; k <= Neighbors.count - 1; k++) {
point3d Diff = Pts(Neighbors(k)) - Centroid;
CiCBar(0, k) = Diff.X;
CiCBar(1, k) = Diff.y;
CiCBar(2, k) = Diff.z;
}
CovM = CiCBar.MultiplySelfByTranspose();
CovM = (1 / (Neighbors.count - 1)) * CovM;
CovMatrices.Add(CovM);
}
A = CovMatrices(0).ToArray();
C = CovMatrices;
}
41. 41Challenge the future
Grid Surface Reconstruction
Pseudo-Code
Define a new Mesh with a list of Vertices and a list of Faces
Mesh.Vertices=Points
For j as Integer=0 to V-2//choose only bottom-left corners as pivot points
For i As Integer=0 To U - 2
define n0,n1,n2,n3 As Integer
n0 = j * U + I //bottom-left
n1 = n0 + 1 //bottom-right
n2 = n0 + U //top-right
n3 = n1 + U //top-left
Define face As new MeshFace(n0, n1, n3, n2)
Mesh.Faces.AddFace(face)
Next
Next
42. 42Challenge the future
Grid Surface Reconstruction
VB.NET
Dim M As New Mesh
M.Vertices.AddVertices(P)
If Not C Is Nothing Then
M.VertexColors.AppendColors(C.toArray)
For j As Integer=0 To V - 2
For i As Integer=0 To U - 2
Dim n0,n1,n2,n3 As Integer
n0 = j * U + i
n1 = n0 + 1
n2 = n0 + U
n3 = n1 + U
Dim face As MeshFace = New MeshFace(n0, n1, n3, n2)
M.Faces.AddFace(face)
Next
Next
with two nested loops
43. 43Challenge the future
Grid Surface Reconstruction
VB.NET
Dim M As New Mesh
M.Vertices.AddVertices(P)
If Not C Is Nothing Then
M.VertexColors.AppendColors(C.toArray)
For i As Integer=0 To U * (V - 1) - 1
If (i Mod u) < u - 1 Then
Dim n0,n1,n2,n3 As Integer
n0 = i
n1 = n0 + 1
n2 = n0 + U
n3 = n1 + U
Dim face As MeshFace = New MeshFace(n0, n1, n3, n2)
M.Faces.AddFace(face)
End If
Next
with one loop
44. 44Challenge the future
Grid Surface Reconstruction
C#.NET
Mesh M = new Mesh();
M.Vertices.AddVertices(P);
if ((C != null))
M.VertexColors.AppendColors(C.toArray);
for (int i = 0; i <= U * (V - 1) - 1; i++) {
if ((i % u) < u - 1) {
int n0 = 0;
int n1 = 0;
int n2 = 0;
int n3 = 0;
n0 = i;
n1 = n0 + 1;
n2 = n0 + U;
n3 = n1 + U;
MeshFace face = new MeshFace(n0,
n1, n3, n2);
M.Faces.AddFace(face);
}
}
with one loop
45. 45Challenge the future
Simple Estimation of Normal
Vectors Pseudo-Code
Form an empty list of normal vectors
Define deviation as a double
For each point as Point3d in the point cloud
find neighbors
fit a plane to neighbors
Get the normal of this plane and put it out as the normal of the point
form a vector from the vantage point VP to point=VP-point and call it dir
if this normal.dir>0 then
Add the normal to the list of normals
Else
Add –normal to the list of normals
End
Next
46. 46Challenge the future
Estimation Normal Vectors
C#.NET
List<Vector3d> Normals = new List<Vector3d>();
Point3dList PCList = new Point3dList();
PCList.AddRange(x);
double Dev = MD;
foreach (Point3d point in PCList) {
dynamic Neighbors = PCList.FindAll(V => V.DistanceTo(point) < D);
plane NP = default(Plane);
Plane.FitPlaneToPoints(Neighbors, NP, Dev);
if (NP.Normal * (VP - point) > 0) {
Normals.Add(NP.Normal);
} else {
Normals.Add(-NP.Normal);
}
}
A = Normals;
B = PCList.FindAll(VT => VT.DistanceTo(x(654)) < D);
47. 47Challenge the future
Estimation Normal Vectors
VB.NET
Dim Normals As New list(Of Vector3d)
Dim PCList As New point3dlist
PClist.AddRange(x)
Dim Dev As Double = MD
For Each point As point3d In PClist
Dim Neighbors = PClist.FindAll(Function(V) V.distanceto(point) < D)
Dim NP As plane
Plane.FitPlaneToPoints(Neighbors, NP, Dev)
If NP.Normal * (VP - point) > 0 Then
Normals.Add(NP.Normal)
Else
Normals.Add(-NP.Normal)
End if
Next
A = Normals
B = PClist.FindAll(Function(VT) VT.DistanceTo(x(654)) < D)
48. 48Challenge the future
Basics of Scripting in Rhino + GH
• VB.NET (Sub[routine], Function, ByVal, ByRef)
• C#.NET (Void, [Functions], [val],ref)
• Python (defs)
Basic concepts of systems and modules, Inputs & Outputs
Private Sub RunScript(ByVal x As Object, ByVal y As Object, ByRef A As
Object)
End Sub
'<Custom additional code>
'</Custom additional code>
Function plus(A As Integer, B As Integer) As
Integer
Return A + B
End Function
private void RunScript(object x, object y, ref object A)
{
}
// <Custom additional code>
// </Custom additional code>
public int plus(int a, int b)
{
return a + b;
}
def plus(a,b):
return a+b
Nothing visible.
49. 49Challenge the future
Basics of Scripting in Rhino + GH
• Rhinocommon
• Rhinoscript
• Grasshopper Kernel
Rhinocommon
Library of
Geometry
Operations
VB.NET. C#.NET &
Python
Grasshopper Kernel
Library of Some
Special Geometry
Operations
VB.NET. C#.NET &
Python
Rhionscript (with [Iron]Python)
Operations as in Rhino Command Line
Python
http://4.rhino3d.com/5/rhinocommon/Rhinocommon SDK:
Grasshopper SDK: [Rhino]Command: GrasshopperGetSDKDocumentation
Rhinoscript Syntax SDK: [GH Python]Help: Rhinoscript syntax help
50. 50Challenge the future
Questions? p.nourian@tudelft.nl
• I will give you the tools we have developed so far as open
source;
• You will make them better using the following libraries;
• Using either Math.NET or MetaNumerics is a must;
• Using Accord.NET is a big plus!
• If you are using Python, use similar libraries such as SciPy
• If you want to do something else let us discuss it now!