Question: 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

The solution is in Java code The RANSAC algorithm is as follows:This is what I currently have: Here is an example of PointCloud1.xyzCan you help me figure out how to implement the RANSAC algorithm?

The RANSAC algorithm is as follows:

Thanks nce this solution must follow the object-oriented paradigm, your program must

This is what I currently have:

be composed of a set classes. Specifically, it must include, among others,the following classes: - The Point3D class that includes get X, get

Here is an example of PointCloud1.xyz

Y and get Z methods returning double - public double getX() -

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!