Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

The solution is in java code Since this solution must follow the object-oriented paradigm, your program must be composed of a set f classes. Specifically,

The solution is in java code

image text in transcribedimage text in transcribedimage text in transcribed

Since this solution must follow the object-oriented paradigm, your program must be composed of a set f 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 - Point3D 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 pc) 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: - PointCloudl.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: - PointCloud1 pl.xyz - PointCloud1 p2.xyz - PointCloud1 p3.xyz - PointCloud1 p0.xyz // this is the original cloud without the planes's points

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions