COnverting 2D images to 3D cutting files

Page 1 of 2 12 LastLast
Results 1 to 20 of 36

Thread: COnverting 2D images to 3D cutting files

  1. #1
    Registered
    Join Date
    Aug 2005
    Location
    australia
    Posts
    276
    Downloads
    0
    Uploads
    0

    Default COnverting 2D images to 3D cutting files

    Well, I have set out to search for the holly grail as it would seem... My aim is to turn our wedding photo's to a 3D Surface file for machining.

    I thought of starting simple (Bmp/jpeg of objects) and moving to Complex (tif /gif portrates)

    so the aim:

    Convert BMP's to grey scale

    Modify the number of colours to give the correct pospective

    Asign a value or weight to the shade of grey

    create a polygon mesh to render

    ability to add curves to corrctly define shape ? (maybe an option)

    add a surface to mesh

    increase resolution

    save as DXF or other CNC format.

    when it came to portrates I had thought of applying a standard Mesh to indicate the main features of a face and give the colours / shades points of reference with respect to the rest of the facial features


    anythoughts ideas or code would be great as I have little experience but willing to learn

    Similar Threads:


  2. #2
    Registered tobyaxis's Avatar
    Join Date
    Jan 2006
    Location
    USA
    Posts
    4396
    Downloads
    0
    Uploads
    0

    Thumbs up BobArt ProX

    BobArt ProX will do this for you. Unless you want or have the money to spend more. I'm sure Lakeside will be around soon to show you some of the awsome stuff he does with it. I have ProX but rarely use it for anything but Playing. It's a good value for the dollar and you can most likely get it for around $500-$650.

    Catia, Mastercam, Surfcam, and DelCam if you have the $$$$$$$$$$$$$$$$$$

    Toby D.
    "Imagination and Memory are but one thing, but for divers considerations have divers names"
    Schwarzwald

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

    www.refractotech.com


  3. #3
    Member
    Join Date
    Mar 2006
    Location
    Boston
    Posts
    1625
    Downloads
    0
    Uploads
    0

    Default

    Salty my old friend if you want send me a jpeg I'll run it though bobart if you like



  4. #4
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0
    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

    JointCAM - CNC Dovetails & Box Joints
    [URL]http://www.g-forcecnc.com/jointcam.html[/URL]

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  5. #5
    Registered
    Join Date
    Aug 2005
    Location
    australia
    Posts
    276
    Downloads
    0
    Uploads
    0

    Default

    here is the file I was playing with

    the steps I have taken so far .....

    send the Jpeg thru Image-dig this creates a txt file of 1,1,2 (ie X,y,z,) the next line of the text file is obviously 1,2,(and the new height) this height is directly related to the weighting placed against the shade of grey it reads in the pixel,

    I then using Excel (see attached also ) modified the X , Y , Z values slightly so if the z height was less than 10% it = Zero, if the z height was greater than 90% it =90% and so as to limit the spikes I said if the material is 19mm thick and the depth of cut is 12mm then (12/19)/255 [255 being the number of shades of grey available]

    I then said if X1,Y1 to X1,Ynext # was the same value only count it the first and last time they are the same [this way I dont need to list all the Y points along the X row that have the same continious height]

    I then used a bit of magic and to the values I added the Leters to relect the X Y and Z feilds This I imported to wayne Hills G-code to DXF converter...

    Problem now being I have a very Saw-tooth line x1y1 to x1y99 and at it'd completion I have a carage return to the start of the next line x2y1 an so on (see the attached DXF)

    My next quest was to try the same image in profiler6 - this give a net type image moving left to right then Right to Left and once at the Top it then moves to the Bottom and than from the Bottom to the Top again [ problem being with an image 10x244 you get 333,245 lines of Gcode it takes over 3 hours to covert to a DXF and a long time to mover around the screen in MC9

    I decided that as we are learning MasterCam 9.1 at TECH I would try and import the txt file from Image-dig as an ASCII file and select input type as points this should now give me a point cloud and I was hoping to create a surface from here BUT NO-ONE HAS BEEN ABLE TO HELP ME AT TECH....

    Attached Images Attached Images
    Attached Files Attached Files


  6. #6
    Registered
    Join Date
    Aug 2005
    Location
    UK
    Posts
    597
    Downloads
    0
    Uploads
    0

    Default

    Hi Salty,

    Many have chased this 'holly-grail' and the bottom line is all have failed, well no one can reliably turn all 2D images into machinable 3D data.

    You will find software suppliers with examples of photographs that appear to convert to 3D, but these are few and far between. So always be very careful and check the software with your own photographs before paying the $'s

    The problem is that a 2D image simply doesn't contain sufficient information to automatically create a 3D model. Your brain is incredibly clever at identifying whats raised and recessed, especially on peoples faces (which is what most people are trying to machine).

    Software is pretty dumb and simply converts shades of grey to a 3D height. So a photo's of people with black hair will always result in flat heads. Also, people who smile with nice white teeth end up looking like bugs bunny. It is possible to use image editing software such as Photoshop to modify the images, but again don't be fooled by this because it requires considerable skill and time.

    If you model and machine photo's at very low depth then the problems of shadow, highlight, teeth, eye's, glasses and hair colour are less evident but become very apparent when machined higher / with more volume.

    We developed PhotoVCarve to offer a totally different approach that although not 3D will always give an good result.

    An approach that does kind of produce a 3D effect is to machine a Lithophane of the photograph. This is machined into a translucent material such as Corain or Plexigla and gives a very interesting effect. PhotoVCarve will also machine stunning Lithophanes.

    There's more info about lithophanes on our web site.

    If you do manage to find a reliable method of converting photographs into 3D you'll get rich very quick!

    I hope this helps,

    Tony Mac



  7. #7
    Registered
    Join Date
    Aug 2005
    Location
    australia
    Posts
    276
    Downloads
    0
    Uploads
    0

    Default

    thanks for that I am currently on your web page trying you look at the tutorial but can't seem to stay connected to view the getting started (cute Puppies) video, can it be downloaded ?

    Salty



  8. #8
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    180
    Downloads
    0
    Uploads
    0

    Default

    You mentioned Excel. I did the similar thing a while back. With Excel, you can run a Visual Basic program in the background to do things you really can't do with the spreadsheet part. If you can write a basic progam, it makes things easier.

    Anyway, I got around the "carrage return" problem by saving the Z heights in an array, and then reading a line from left to right, and then the next from right to left, etc. so the tool would not have to re-trace.

    The next fundamental problem (in addition to the ones Tony Mac addressed) is the tool size and under-laping or overlapping lines. There is a way around this, too, if you are interested in programming.

    Richard



  9. #9
    Registered
    Join Date
    Aug 2005
    Location
    australia
    Posts
    276
    Downloads
    0
    Uploads
    0

    Default

    Richard, I am keen to learn,
    I was doing a lot of the data moving/manipulation by have as by VB skills are only in thier infant stage, I had thought of running a COON's Patch on all the Z heights for a given X-axis, this whould help elminate some of the colour spiking due to shading issues..

    also I have thought of using less colours (wide brush type technique)

    I have a friend who does some green screen and movie effects, he also does a bit of CGI, When I mentioned to him my aim he got really excited... but to date I have not heard from him>>>

    I wonder if you couldn't scan an object knowing the rules of relection and shading place a curved line on a portion of the SCOURCE FILE this would not give the radius of the object and the shading would help define the shape (have a a look at the attached PIC)

    <EDIT>
    Sorry the lines are not that clear I selected RED as a colour but it has been displayed as BROWN .... Not happy, Jan!

    Attached Images Attached Images
    Last edited by Salty72; 08-03-2006 at 08:33 PM.


  10. #10
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    180
    Downloads
    0
    Uploads
    0

    Default

    I really don't use the "Visual" part of it. It is 99% Basic. The only thing different is the code to get the inputs from the spreadsheet, and write the results to the spreadsheet. You can also read and write to files just like in any Basic language. I really only use the spreadsheet for the input and output that you would normally have to type in any.

    Somewhere I posted a simple program that drills holes in an X,Y pattern. I will try to find it and post the link.
    Here it is: http://www.cnczone.com/forums/showpo...91&postcount=6

    Last edited by rweatherly; 08-03-2006 at 09:36 PM.


  11. #11
    Registered
    Join Date
    Mar 2005
    Location
    Romania
    Posts
    339
    Downloads
    8
    Uploads
    0

    Default

    Hi,

    I have downloaded your excel file and tried, but when I hit the Gcode generator it gave me an error. It seems that generating gcode part is missing. I would like to try this program bmp2xyz, could you, please upload the missing part also? (from second sheet of your excel file - there is the path).

    Thank you.

    Zoltan



  12. #12
    Registered
    Join Date
    Aug 2005
    Location
    australia
    Posts
    276
    Downloads
    0
    Uploads
    0

    Default

    I 'm guessing the path is where you want the file to go once generated

    as to the GCode you can have a look at the code by putting the workbook into design mode and then right click on button and select show code



  13. #13
    Registered
    Join Date
    Aug 2005
    Location
    UK
    Posts
    597
    Downloads
    0
    Uploads
    0

    Default

    Hi Salty,

    If you are still having connection problems when lnking to the video please use this link,

    http://www.vectric.com/WebSite/Vectr...te_puppies.zip

    I hope this works for you,

    Tony Mac



  14. #14
    Registered
    Join Date
    Aug 2005
    Location
    australia
    Posts
    276
    Downloads
    0
    Uploads
    0

    Default

    thanks, Tony.

    I have come to the realisaton that the problem is the interpritation of images (from a human perspective this is based on experiance) the brain takes an object and using previous shapes, fits them into the new object to form a picture relative to the "topic" of concern

    Take for example the image below what is it...

    Attached Images Attached Images


  15. #15
    Registered
    Join Date
    Aug 2005
    Location
    UK
    Posts
    597
    Downloads
    0
    Uploads
    0

    Default

    Exactly - the picture could well be anything from a piece of cheese, a closeup of a human hair or even a sketch of a Giraffe's neck. Very ambiguous., but the brain can start to make assumptions based on the amount of information it see's - the computer program is 'blind' when it comes to 'real things'.

    So what is the picture?

    Tony



  16. #16
    Registered
    Join Date
    Aug 2005
    Location
    australia
    Posts
    276
    Downloads
    0
    Uploads
    0

    Default

    it's a Giraffe walking past a window

    and what I was thinking is to take a "Control" object.... this is, a predifined net or shape that when overlaid onto the image to be machined will redifine the colouration to provide shading that is a more accurate representation of the 3D object trying to be machined..

    Remeber just like the Giraffe if the image is a 75% solution of it's intended output than the brain will take care of the rest and as per characteratures (Sp) although they don't provide a carbon copy of the victum they do represent them to a degree that can be associated to the person in question,



  17. #17
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    180
    Downloads
    0
    Uploads
    0

    Default

    zoltan-

    I will check the file that was uploaded, and will upload the missing program(s) later today.



  18. #18
    Registered
    Join Date
    Mar 2005
    Location
    Romania
    Posts
    339
    Downloads
    8
    Uploads
    0

    Default

    Hi,

    Thank you. I figure out the issue. I have changed the path and made a gcode.nc gcode file and placed it on the path. When the code was generated it was writen in gcode.nc. It is ok for me.

    Zoltan



  19. #19


  20. #20
    Registered
    Join Date
    Aug 2005
    Location
    australia
    Posts
    276
    Downloads
    0
    Uploads
    0

    Default

    here is something, that - although not from a related software post. Does explaine what I'm looking for slightly.

    Attached Files Attached Files


Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

COnverting 2D images to 3D cutting files

COnverting 2D images to 3D cutting files