Page 2 of 2 FirstFirst 12
Results 13 to 19 of 19

Thread: Photo Silhoutte (Profile) in VB

  1. #13
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22215
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by IMSlo
    You probably know that Microsoft is giving away VB.NET 2005 Express, or at least were a few months ago.
    Thanks for the tip.

    http://msdn.microsoft.com/vstudio/express/vb/
    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)


  2. #14
    Moderator Switcher's Avatar
    Join Date
    Apr 2005
    Location
    mydxf.blogspot.com
    Posts
    3665
    Downloads
    0
    Uploads
    0
    Anyone, try the upgrade fom "VB.NET 2003" to "VB.NET Express 2005", is it worth it ?


  3. #15
    Registered
    Join Date
    Apr 2006
    Location
    Somewhere
    Posts
    402
    Downloads
    0
    Uploads
    0
    If you work with only black and white, it could be done with a boolean array, else with an if needed colorarray (long). PixelIsBlack(MaxXSize, MaxYSize). You give the program a looking direction, first to the right,up and down, depending upon the nearness of the next "True". The nearness of the next point is the root of (FoundaPointX - PointWhereIAmNowX)2 + (FoundAPointY - PointWhereIAmNowY)2. If this is ready you rotate the looking direction 90 degrees. Every touched point becomes "False". An array can be saved to disk. The disadvantage of SQL is that you have to define the software in a restricted language, I think less suitable for this application. An array will be a winner in speed (and debugging)

    Carel


  4. #16
    Registered
    Join Date
    May 2005
    Location
    USA
    Posts
    16
    Downloads
    0
    Uploads
    0
    fkaCarel I appreciate your suggestion but honestly I have no inkling of what you are saying.

    At least the thread is getting a little discussion now and that's what I wanted from the start.

    I would like to take a moment to state my goal/dream for this project. I stated in my opening post that my router has not earned its keep. I invision making a smaller more portable router and carrying it to craft shows, malls, etc for the purpose of cutting silhouttes on key chains, small wooden blocks, and even etching in granite. The target market ( I just about made a rhyme) for this would be young unmarried couples drunk on romance who might be willing to pay to have their silhouttes on a keychain that would be constantly with them. Another market might be parents/grandparents of small children. The procedure would be to take a picture with a digital camera, down load it into this program, make a suitable outline, make a G Code file and cut the outline. Of course the customer would be invited to look over my shoulder at the whole process and approve the outline before running G Code. The time limit for the whole process should be under 10 minutes. I keep talking about scaling the coordinates because these items will probably be no higher or wider than 1 1/2". Maybe yall can understand more about what I am up against after this explaination.

    Now back to the task at hand. It probably seems that I am bent on putting these coordinates in a database file. I am for at least two reasons. First I think it must be done in order to perform the vast amount of manipulation required. Secondly it has become a personal challenge. I have said several times that I would never try to learn another computer language. I have dabbled in GWBasic, QuickBasic, Pascal, dBaseIV and V, Clipper, MSAccess VBA, Bentley Microstation VBA, VB6 and now VB.Net. I don't claim to be an expert in any of these and in fact have forgotten most. I am very excited about and challenged by VB.Net. I want to at least scratch the surface of this powerful language.
    Will this program every really be used? Probably not. It's really a dream but even if it is not used I will have the satisfaction of having struggled with it until I conquered it.
    Please excuse my longwindedness.
    BTW I have my database set up but am having problems connecting to it.


  • #17
    Moderator Switcher's Avatar
    Join Date
    Apr 2005
    Location
    mydxf.blogspot.com
    Posts
    3665
    Downloads
    0
    Uploads
    0
    IMSlo,

    Do you have "101 VB.NET Samples" yet? I believe they have some database stuff. I havn't went thru all the samples yet, the samples I have looked at, are good.

    Here is a link for the download.

    http://www.microsoft.com/downloads/d...displaylang=en

    If for some reason you can't get the download to work, let me know ,I'll send it to you.






    .


  • #18
    Registered
    Join Date
    May 2005
    Location
    USA
    Posts
    16
    Downloads
    0
    Uploads
    0

    Switcher thanks for the link. I think I may already have those files and just forgotten about them. I have been out on the web looking for code for connecting to a database. I found code for connecting to an Access database. I feel much more comfortable with Access than SQL. I have inserted the code in my form and it works!!!! I have been trying to get something to work for 2 days. I feel much like the proverbial dog that caught the car. What am I gonna do with it?

    The next step is to populate the "Raw Coordinate" table with outline pixel coordinates. It will probably take me two more days to accomplish this.


  • #19
    Registered
    Join Date
    Apr 2006
    Location
    Somewhere
    Posts
    402
    Downloads
    0
    Uploads
    0
    A pity you don't get an inkling. My assumption is that you have created a black and white figure in a picture box. Let's assume the outline are black dots. You want to connect these dots. Print it and connect the dots on paper on the kitchentable and study how you do it. First you work to the right looking for the nearest dots. They can be upwards or downwards. If there are no more dots to connect, you rotate the paper 90 degrees and continue.

    Now back to the computer. I'm looking at this screen in 1024 * 768 resolution. If my screen is black and white every pixel can be read and written in an array of 1024(horizontal) by 768(vertical). If I call White (Not Black) "False" and Black "True" then a variable definition of:

    Private WorkScreen(1024, 768) As Boolean

    is perfectly valid. With this you can calculate the distance between your points, because they represent straight lines and triangles.

    Carel


  • Page 2 of 2 FirstFirst 12

    Posting Permissions



    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.