![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Coding Post your Coding for opensource projects here. |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
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 |
|
#2
| ||||
| ||||
| 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 |
|
#4
| ||||
| ||||
|
__________________ Gerry Mach3 2010 Screenset http://home.comcast.net/~cncwoodworker/2010.html (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#5
| |||
| |||
| 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.... |
| Sponsored Links |
|
#6
| |||
| |||
| 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 |
|
#8
| |||
| |||
| 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
| |||
| |||
| 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! Last edited by Salty72; 08-03-2006 at 08:33 PM. |
|
#10
| |||
| |||
| 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. |
| Sponsored Links |
|
#11
| |||
| |||
| 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 |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |