triangulation

Triangulated points are shifted and rotated but reasonable otherwise

Triangulated points are shifted and rotated but reasonable otherwise Question: I have two different views of a football game, I use a 2d pose estimator on both views to get 2d poses and then I map the different 2d poses(currently by hand) in the two different cameras such that I know the corresponding poses. I …

Total answers: 1

Harvest data and attributes from Shewchuk's Triangle

Harvest data and attributes from Shewchuk's Triangle Question: Lets say I have an area with regions and I execute a constrained Delaunay with Rufat’s implementation of Shewchuk’s Triangle (python) import numpy as np import triangle as tr import matplotlib.pyplot as plt # data vertices = [[0, 0], [5, 0], [5, 5], [0, 5], [1, 1], …

Total answers: 1

PyVista mesh triangulation – vertex indices

PyVista mesh triangulation – vertex indices Question: I have a triangulated mesh that I generated with the Delaunay 3D function in PyVista. I would like to calculate the surface area of the mesh adding up the areas of all the triangles. Is there a way to obtain the indices of the simplices triangles from the …

Total answers: 1

cv2 triangulatePoints always returns same Z value

cv2 triangulatePoints always returns same Z value Question: I am trying to get 3D points using cv2.triangulatePoints but it always returns almost same Z value. My output looks like this: As it seen, all points are in almost same Z value. There is no depth. Here is my triangulation: def triangulate(self, proj_mat1, pts0, pts1): proj_mat0 …

Total answers: 2

Need help in understanding error for cv2.undistortPoints()

Need help in understanding error for cv2.undistortPoints() Question: I am trying to triangulate points from a projector and a camera using Structured Light in OpenCV Python. In this process I have a list of tuples that match one to one between the camera and the projector. I am passing this to cv2.undistortedPoints() as below: camera_normalizedPoints …

Total answers: 2

How do I detect a crash in an external module in Python?

How do I detect a crash in an external module in Python? Question: I am using the Triangle module to generate constrained Delaunay triangulations (available at http://www.lfd.uci.edu/~gohlke/pythonlibs/). In some instances, the function triangle.triangulate crashes, and windows says ‘Python.exe has stopped responding’. I have tried using try/except structures as in the following example, which crashes inconsistently. …

Total answers: 4

How to get center of set of points using Python

How to get center of set of points using Python Question: I would like to get the center point(x,y) of a figure created by a set of points. How do I do this? Asked By: Dominik Szopa || Source Answers: If you mean centroid, you just get the average of all the points. x = …

Total answers: 4