Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

How to Acquire a Line from Curved Object in a Photo ?

bayviewboom
Advocate

How to Acquire a Line from Curved Object in a Photo ?

bayviewboom
Advocate
Advocate

hi

 

Summary:
- How can i make a line that follows the center of the pipe in the photo?
- If not possible, then how to get a line from one edge of an object in a photo?

 

PVCPTRAP-sm.jpg

 

As a beginner, i'm having a tough time with this. 

 


Details:
i want to create a 3D pipe from a photo of a curved pipe.

 

It seems advisable to use the pipe tool for pipes. The pipe tool requires a line. So i want to derive a line that follows the contour of the pipe in my photo.

 

If i use just the inner edge for my line (or just the outer edge), then i think the curve might be distorted. Therefor, it's ideal to make a line that follows the center of the pipe in the photo? But since i could not figure out how to do that, i'm trying to get a line from one edge of the pipe in the photo.

 

But not having success with that either. Here are my failed attempts to generate a line from an edge.

 


First failed attempt:
Fusion Outlining. My expectation is that if Fusion auto-generates an outline of the face, then that would really be a line, not a body or face.

- Use external tool to perform edge detect on the photo. 

 

handle-outline-clean.png

 

- Convert the image to an SVG using an external converter.
- Import SVG into Fusion.
- Use Project tool to project the face of the object.
- Perform outlining steps in this screencast.

 

I followed the steps depicted in this screencast, but i didn't get any outline. It seemed i did everything exactly as in the video, but no outline was produced-- i was just left with the original object. Maybe i need to convert my import into a body first?

 


Second failed attempt:
DXG. My hope is that Fusion would recognize the DXF of an edge of the object as a single line.

- First, use a drawing program to erase everything in the edge-only photo (above) except one edge.

 

handle-outline-clean-line-sm.jpg


- Convert the image of the edge to an SVG using an external converter.
- Convert the SVG to a DXF with an external converter.
- Import the DXF into Fusion.

 

But didn't work. Fusion thinks the DXF is just a very narrow face with edges-- not a line.

 


To restate:
- How can i make a line that follows the center of the pipe in the photo?
- If not possible, then how to get a line from one edge of an object in a photo?

 

Attached:
- Original photo.
- SVG. (plz append .svg extension -- this forum strangely does not allow SVG attachments)
- DXF.

 

 

Thx!

0 Likes
Reply
Accepted solutions (1)
2,922 Views
27 Replies
Replies (27)

daniel_lyall
Mentor
Mentor

What is wrong with doing what you have been shown what to do already. The pipe tool uses a centerline for its path not an edge so that why I showed useing a centerline in the screencast 


Win10 pro | 16 GB ram | 4 GB graphics Quadro K2200 | Intel(R) 8Xeon(R) CPU E5-1620 v3 @ 3.50GHz 3.50 GHz

Daniel Lyall
The Big Boss
Mach3 User
My Websight, Daniels Wheelchair Customisations.
Facebook | Twitter | LinkedIn

0 Likes

davebYYPCU
Consultant
Consultant

Insert your graphic as a canvass, size correctly, its not so accurate for width, 

 

draw the closest centre line, and use pipe, 

 

Might help....

0 Likes

bayviewboom
Advocate
Advocate

moved

0 Likes

bayviewboom
Advocate
Advocate

@davebYYPCU wrote:

Insert your graphic as a canvass, size correctly, its not so accurate for width, 

 

draw the closest centre line, and use pipe, 

 

Might help....


 

thx Dave, but did you mean manually draw free-hand? i don't trust my drawing skills to get an accurate line. I'd rather let the tool do the drawing. 

0 Likes

bayviewboom
Advocate
Advocate

oh i get it now. When you did the offset of the curve, you got a line. 

 

https://forums.autodesk.com/t5/fusion-360-design-validate/screencast-for-bayviewboom/m-p/7814468/hig...

 

i just duplicated that-- converting one edge of my SVG produced a simple line, which i could then convert to a pipe. Great! Thx for that. 

 

Issue now is that i'd like to convert all the many tiny segments in my curve in the SVG into a single line. I asked about that over here, and you said it's been solved. If possible, plz share the solution. Or, a way to quickly select multiple segments in a curve, without accidentally missing any segments (some are quite tiny). 

 

thx Big Boss.

0 Likes

davebYYPCU
Consultant
Consultant

pipe.PNG

 

This pipe is best upgrade of that graphic Fusion will give you, 

the lines in the graphic are terrible compared to the sketch, hard to see the sketch but it is there, 

two straight ends and a three point spline in the hook section, very clean, 

 

You don't want accuracy, use an illustrator.

 

 

 

 

1 Like

bayviewboom
Advocate
Advocate

thx for showing what's possible. 

now if i can only figure out how you did that Smiley Frustrated

hrm, i have no idea how you did that.... 

 

what do you mean the lines in the graphic are "terrible"? You mean the original photo? That's why i ran edge-detect, shared above. The lines in my SVG seem very strong and clear. 

0 Likes

TrippyLighting
Consultant
Consultant

If the intention is to create a precise replica then trying to do that from a photo that clearly has a substantial degree of perspective distortion is not going to work.

 

The entire attempt to use 3rd party software to create a "precise"outline is invalidated by a photo that is by no means precise.

 

As such you'd do fine to simply creating a spline approximating the center of the shape, then make a pipe along it and adjust the spline (use the handles and avoid adding to many points)  until the  pipe fits the shape in the photo.

 

The attached model took less Han 5 minutes.

 

 


EESignature

0 Likes

bayviewboom
Advocate
Advocate

@daniel_lyall wrote:

The pipe tool uses a centerline for its path not an edge 


 

Really? In your video, it looks like you're creating an artificial centerline, by doing offset against one of the 2 edges, after selecting just one of the edges. Then you use the pipe tool on your manually-created offset line. It seems the pipe tool has no concept of a "center line" as you say. 

 

No?

 

Screenshot (115).jpg

0 Likes

bayviewboom
Advocate
Advocate

thx for the spline method and attachment, i'll check it out.

 

but @TrippyLighting, you need not be concerned about the accuracy of the photo. That's my problem, not yours. You're making an assumption-- you don't know if or how distorted the photo is. It's impossible for you to know that just by looking at that photo.

 

But that doesn't matter anyway-- i can use a more accurate photo later. Let's just assume the photo is accurate. That's not the question-- the question is how to make a line from an edge. 

 

---------

 

I'd like to somehow get a line from the graphic. 

 

Seems there are two possible ways:

 

- in my outline SVG, offset one edge. To do that, i need a way to select one edge comprised of maybe hundreds of segments. How to do that?

 

handle-outline-clean.png

 

- Or, erase all but one edge, and do offset on that edge (as demonstrated by @daniel_lyall) . But Fusion seems to recognize the object as a face with 2 edges. That produces a double-offset. 

 

Screenshot (112).jpg

0 Likes

davebYYPCU
Consultant
Consultant

All I did was (In fusion alone from your data)

Insert the canvass, and make it the right size, 24mm pipe?

 

Drew two straight lines, and connected them with a 3 point Spline, (3 black dots on the blue curve,) to approximate the hook.  As Trippy mentioned....

Created the pipe, and then adjusted the spline handles to make the curved pipe conform to the graphic, with consideration that neither of the graphic outlines are parallel.

 

If, you want to exactly follow the outline of the graphic edges,

You could do it the complicated way, 

 

trace both lines and sweep a profile using both lines for the sweep. (Sweep and guide rail)

 

Many ways to skin a cat. 

But you still got to work towards what your going to do with the outcome....

 

 

 

1 Like

TrippyLighting
Consultant
Consultant

bayviewboom wrote:

 

... You're making an assumption-- you don't know if or how distorted the photo is. It's impossible for you to know that just by looking at that photo...

 

 


 

That is incorrect! Any halfway decent hobby photographer can see the perspective distortion. Knowing the approximate distance form the object then photo was taken a pro can likely tell you what focal length lens that photograph was taken with.

If you make some educated guesses software can remove that perspective distortion to a degree.

 

 


EESignature

1 Like

bayviewboom
Advocate
Advocate

TrippyLighting wrote:

Any halfway decent hobby photographer can see the perspective distortion.

 

i completely disagree, you don't know the lighting conditions, you don't know the actual object dimensions or ratios, etc. You're guessing

 

but again, that's irrelevant to the topic of this thread. The accuracy of the photo is not related to the objective of obtaining the edges in an image. 

0 Likes

bayviewboom
Advocate
Advocate

@davebYYPCU THANK YOU VERY MUCH! for providing steps. I'm going to atttempt it. 

 

Meantime, i'm still trying to achieve the original request-- to derive a curved line directly from the image. 

 

This screencast shows two more approaches i tried.

 

To solve the problem of Fusion seeing the edge SVG as a face with two edges, i snipped out segment at each end of the object, thus allowing me to delete one edge entirely, and leaving the other edge by itself. I believe that produces a line that the pipe tool can work with. Progress: learned that double-click selects all the segments in a line 🙂

 

Screenshot (139).png

 

However, pipe tool still complains about the resulting line. 

 

Attempting to fix that, i did an offset, and tried the pipe tool on that offset. Different kind of error, but still no dice. i suspect it might be due to subtle imperfections in the imported graphic, although if you examine the original SVG it seems very clean and smooth. 

 

Screencast

 

I appreciate any ideas!

 

https://knowledge.autodesk.com/community/screencast/a3b0db79-32a4-4ab0-9400-2db2d6382524

0 Likes

TrippyLighting
Consultant
Consultant

@bayviewboom wrote:

@TrippyLighting wrote:

Any halfway decent hobby photographer can see the perspective distortion.

 

i completely disagree, you don't know the lighting conditions, you don't know the actual object dimensions or ratios, etc. You're guessing

 

but again, that's irrelevant to the topic of this thread. The accuracy of the photo is not related to the objective of obtaining the edges in an image. 


 

 

What factual knowledge are you basing your disagreement on ?

 

I am asking for knowledge that in my case was obtained by studying and practicing computer graphics and related areas for more than 20 years including a good number of siggraph papers on such subject as photogrammetry.

 


EESignature

0 Likes

bayviewboom
Advocate
Advocate

@TrippyLighting you complained recently about people hijacking threads. 

 

Your posts about distortion in photographs is off-topic in this thread. Please take it to another thread. 

 

thx

0 Likes

bayviewboom
Advocate
Advocate

@davebYYPCU wrote:

All I did was Drew two straight lines

 

by eye?

i'm trying to locate the center point without luck. See here

0 Likes

laughingcreek
Mentor
Mentor

bayviewboom wrote:

... although if you examine the original SVG it seems very clean and smooth. 

 No, not even close.  Below is a pic of the curvature combs on your SVG lines.  Fusion sucks at importing curves (dxf, svg, or otherwise).  These curves may start out life in another application as perfectly good geometry, but once imported into Fusion, they are frequently a mess.  Like these.  What's more, fusion has difficulty dealing with dirty geometry like this.  After seeing the curvature comb, it's really no surprise that the pipe command chokes on it. 

 

One piece of advise you will see over and over again in these forums is to ALWAYS rebuild your SVG curves with native fusion geometry before performing 3d commands with them.  This is admit ably a failing of fusion, but there it is.  Also, Fusion doesn't have tools for rebuilding lines automatically like Rhino and some other programs.

 

You may be able to eventually extract some kind of usable line out of this with a combination of different steps, but ultimately it's a dead end workflow. 

handle curvature comb.PNG

1 Like

bayviewboom
Advocate
Advocate

@laughingcreek wrote:

@bayviewboom wrote:

... although if you examine the original SVG it seems very clean and smooth. 

 No, not even close.  Below is a pic of the curvature combs on your SVG lines.  Fusion sucks at importing curves (dxf, svg, or otherwise).  These curves may start out life in another application as perfectly good geometry, but once imported into Fusion, they are frequently a mess.  Like these.  What's more, fusion has difficulty dealing with dirty geometry like this.  After seeing the curvature comb, it's really no surprise that the pipe command chokes on it. 

 

 

Many thanks for that insight. Now I understand how to do Curvature Comb Analysis .

 

 


@laughingcreek wrote:

You may be able to eventually extract some kind of usable line out of this with a combination of different steps, but ultimately it's a dead end workflow. 

 

If it works, and it's relatively simple, then it's not a dead end.

 

Would be useful. 

 

Thx

 

0 Likes