Comments (2)
Hi Fabian, nice to hear you are trying new things in pyRANSAC3D library =)
Restricting the volume from a cuboid seems to be a simple mathematical problem, but for most cases it isn't. Your solution as you presented above will only work if the faces of the cuboid are perfectly aligned to the inertial frame (the length of the cuboid is in the X axis, for example). If this condition is not met, you will measure a 3d kind-of-diagonal of the cuboid which will definitely give you the wrong volume.
The problem you are facing can be solved with minimum bounded rectangle (MBR) (https://en.wikipedia.org/wiki/Minimum_bounding_rectangle) algorithm or, in your case, minimum volume cuboid. A possible way to solve is to make a projection of the points with the candidate plane equation, and transform this in a 2d problem which can apply a MBR algorithm to calculate the width and height of a rectangle. Using the three different dimensions from this algorithm you can calculate its approximate volume.
There might be other solutions such as working with the face's equation to rotate the cuboid to the inertial frame but it seems to be more complicated. I recomend the MBR algorithm by dbworth to start with:
https://github.com/dbworth/minimum-area-bounding-rectangle
from pyransac-3d.
Thanks, Leonardo for your kind and informative reply! Your explanation for why specifying volumes is not that straightforward makes a lot of sense. I am trying to look a bit more into the MBR and also into other possibilities.
from pyransac-3d.
Related Issues (20)
- filename aux.py prevents installation on windows HOT 2
- Cylinder Fitting HOT 6
- Should this line be pt_samples[3,:] instead of pt_samples[3,0]? HOT 2
- Distance to plane HOT 2
- Bad plane fitting (maybe bad parameter) HOT 2
- error running the the test_plane.py HOT 2
- RANSAC Plane from 3 and 4 points fails HOT 2
- Wrong filepath when calling pyransac3d from test folder.
- Disable printing the number of points HOT 5
- Interest in threading? HOT 5
- How to find other planes of an object? HOT 1
- Getting Runtime error when fitting. HOT 3
- Wrong center for detecting circles HOT 1
- Intercepetion for line parallel to one axis doesn't make sense
- finding random shapes HOT 1
- add callback function argument to fit function for progress output
- Sphere fitting gives cryptic error message if less than 4 points are provided
- Cannot fit a space circle
- Cuboid with just 3 planes? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyransac-3d.