Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The solution is in Java code The RANSAC algorithm is as follows: This is what I currently have: Here is an example of PointCloud1.xyz Can

The solution is in Java code

image text in transcribedimage text in transcribedimage text in transcribed

The RANSAC algorithm is as follows:

image text in transcribed

This is what I currently have:

image text in transcribedimage text in transcribed

Here is an example of PointCloud1.xyz

image text in transcribed

Can you help me figure out how to implement the RANSAC algorithm? Thanks

nce this solution must follow the object-oriented paradigm, your program must be composed of a set classes. Specifically, it must include, among others, the following classes: - The Point3D class that includes get X, get Y and get Z methods returning double - public double getX() - public double getr() - public double getz() - The Plane3D class that includes - A constructor from 3 points - public Plane3D (Point3D p1, Point3D p2, Point3D p3) A constructor from parameters - public Plane3D (double a, double b, double c, double d) A getDistance method that returns the distance from a point to the plane - public double getdistance (Point3D pt) - The PointCloud class that includes A constructor from a xyz file - Pointcloud(string filename) An empty constructor that constructs an empty point cloud - Pointcloud() A addPoint method that adds a point to the point cloud - public void addPoint (Point3D pt) A getPoint method that returns a random point from the cloud - Point 3 getpoint() A save method that saves the point cloud into a xyz file - public void save(string filename) An iterator method that returns an iterator to the points in the cloud - Iterator iterator () - This iterator should include hasNext, next and remove methods (e.g. the iterator from an ArrayList) - The PlaneRANSAC class that includes A constructor that takes as input a point cloud - public PlaneRANSAC (PointCloud pe) setter and getter for the epsilon value - public void setEps(double eps) - public double geteps() a method that returns the estimated number of iterations required to obtain a certain level of confidence to identify a plane made of a certain percentage of points - public int getNumberofiterations (double confidence, double percentageofpointsonPlane) a run method that runs the RANSAC algorithm for identifying the dominant plane of the point cloud (only one plane) - public void run (int numberofiterations, String filename) - filename being the xyz file that will contain the points of the dominant plane - this method will also remove the plane points from the point cloud We ask you to implement the RANSAC algorithm to identify the three most dominant planes in a cloud of 3D points. As input, we give you three point clouds, given in the xyz format, they are: - PointCloud 1.xyz - PointCloud2.xyz - PointCloud3.xyz For each of these files, you must find the three dominant planes. Your ouput will therefore be, for each point cloud, three xyz files containing the list of points that belong to the dominant planes. You also provide the xyz file of the full point cloud in which you have removed the points belonging to the dominant planes. These files are named by appending pX to the point cloud filename. For example, for the first point cloud, the output files should be: - PointCloud 1 pl.xyz - PointCloud 1 p2.xyz - PointCloud 1 p 3.xyz - PointCloud1 p0.xyz // this is the original cloud without the planes's points RANSAC is an iterative algorithm that is used to identify a geometric entity (or model) from a set of data that contains a large amount of outliers (data that does not belong to the model). It proceeds by randomly drawing the minimum number of samples required to estimate the parameters of a model instance and then validate it by counting the number of additional samples that support the computed model. In our case, we are looking for a planar structure, made of several points, while the majority of the points in the set are outside that plane. The seek geometric entity is therefore a plane of the form. ax+by+cz=d. A minimum of 3 points is required to compute the equation of a plane. Alsorithm RANSAC for the case of plane identification in 3 D proceeds as follows : 1. Initially, no dominant plane has been found, and the best support is set to 0 (see Step 5.) 2. Randomly draw 3 points from the point cloud. 3. Compute the plane equation from these 3 points. 4. Count the number of points that are at a distance less than eps ( ) from that plane. This number is the support for the current plane. 5. If the current support is higher than the best support value, then the current plane becomes the current dominant plane and its support is the new best support. 6. Repeat 2 to 5 until we are confident to have found the dominant plane. 7. Remove the points that belong to the dominant plane from the point cloud. Save these points in a new file. Step 6. raises the following question: how many iterations should we perform if we want to be almost certain (let's say at 99\%) that we have found the dominant plane? First, suppose that the percentage of points that support the dominant plane is p% of the total number of points in the cloud. The probability of randomly picking three points that belong to this plane is therefore p3%. We can then conclude that the probability of picking a set of random that contains at least one outlier is (1p3)%. If we pick k random triplets of points, the probability that these sets always contains an outlier is (1p3)k%. Consequently, the probability of finding at least one set made of 3 points that belongs to the dominant plane is 1(1p3)k% We must therefore find the value of k that give us a confidence probability of, let's say, C=99% k=log(1C)/log(1p3)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions