Answers.Body: <p>To obtain the edges, you need to use an edge detector. Many exists, more or less efficient depending on the input image. Among the most broadly used are the Sobel and the Canny edge detectors that are implemented in many libraries for various programming languages. (Matlab, scikit-image in Python)</p>
  
  <p>To obtain straight lines from these edges, I suggest that you start by using the Hough transform also available in many libraries for various programming languages. (Matlab, scikit-image in Python)</p>
  
  <p>Lines output from the Hough transform are usually given in there parametric form. From there, it is easy to find the angles between the different lines. I imagine that some rules can be derived from there to identify a regular polygon that is in the image.</p>
  
  <p>Regarding obtaining 3D information from an image, note that there isn't enough information in a single 2D image to reconstruct its 3D coordinates, since we are projecting information into a lower dimensional space.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-10T19:37:21.837Z
Answers.LastActivityDate: 2018-04-12T15:12:47.653Z
Answers.LastEditDate: 2018-04-12T15:12:47.653Z
Answers.UserDisplayName: Eskapp
Body: <p>There is a lot of information on the internet about <code>image classification</code> and <code>object identification</code>. I want to know how I can extract (or create) geometric information from an image.</p>
  
  <p>For example, if the image classifier can identify that there is a sphere in the image, how can i generate 3d vertices's and edges from that knowledge?</p>
  
  <p><a href="https://i.sstatic.net/UixLL.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/UixLL.png" alt="enter image description here"></a></p>
  
  <p>I want to find all the edges and points on these shapes</p>
  
Tags: <machine-learning>
Title: Identifying geometry in images
UserDisplayName: Mark Markrowave Charlton
ThreadText: # Identifying geometry in images
  
  (Asked by: username_0 on 2017-06-28)
  
  There is a lot of information on the internet about `image classification` and `object identification`. I want to know how I can extract (or create) geometric information from an image.
  
  For example, if the image classifier can identify that there is a sphere in the image, how can i generate 3d vertices's and edges from that knowledge?
  
  [![enter image description here](https://i.sstatic.net/UixLL.png)](https://i.sstatic.net/UixLL.png)
  
  I want to find all the edges and points on these shapes
  
  **Tags:** machine-learning
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-08-10. Score: 1
  
  To obtain the edges, you need to use an edge detector. Many exists, more or less efficient depending on the input image. Among the most broadly used are the Sobel and the Canny edge detectors that are implemented in many libraries for various programming languages. (Matlab, scikit-image in Python)
  
  To obtain straight lines from these edges, I suggest that you start by using the Hough transform also available in many libraries for various programming languages. (Matlab, scikit-image in Python)
  
  Lines output from the Hough transform are usually given in there parametric form. From there, it is easy to find the angles between the different lines. I imagine that some rules can be derived from there to identify a regular polygon that is in the image.
  
  Regarding obtaining 3D information from an image, note that there isn't enough information in a single 2D image to reconstruct its 3D coordinates, since we are projecting information into a lower dimensional space.
  
  
  ---
  
  