Extracting co-ordinates from Images

Discussion in 'Programming' started by Rufe0, Jul 10, 2007.

  1. Rufe0

    Rufe0 New Member

    Joined:
    Jul 10, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hi
    I need to extract the co-ordinates of pixels colour=black from an image file, a bitmap would be simplest I assume. Anyway I've tried to parse the bitmap into text so I can read it that way but I can't get what I need. I believe once I can get the information out of the file I can use info here http://en.wikipedia.org/wiki/Bitmap to work out which bits are which. Has anyone done this sort of thing before, can someone help me out here?

    PS using C# but prefer VB if I can get anyway with it.
    Thnx Rufe0
     
  2. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    http://www.daweidesigns.com
    Sure you can. Obviously, you should be looking to MSDN, not Wikipedia. They have a ton of stuff, including predefined structures and API functions, for dealing with .bmp files.
     
  3. Rufe0

    Rufe0 New Member

    Joined:
    Jul 10, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Finding it hard to find any useful information on there. One useful nuget I found so far on this site http://msdn2.microsoft.com/en-us/library/system.drawing.bitmap.getpixel.aspx a way to find the colour of a pixel at x,y but that means your going to have to find the total pixel size then go through every single pixel one by one to find the ones your looking for.

    For my aplication I will be using black and white images with only a couple of lines on but may be 1000x1000 pixels or more in size. If I could change the bitmap to a text string then I could just look through a string maybe a houndred charators long and find all the '0' charactors.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice