Go4Expert (http://www.go4expert.com/)
-   Programming (http://www.go4expert.com/forums/programming-forum/)
-   -   Extracting co-ordinates from Images (http://www.go4expert.com/forums/extracting-co-ordinates-images-t5189/)

Rufe0 10Jul2007 21:33

Extracting co-ordinates from Images
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

DaWei 11Jul2007 01:56

Re: Extracting co-ordinates from Images
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.

Rufe0 11Jul2007 02:51

Re: Extracting co-ordinates from Images
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/lib....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.

All times are GMT +5.5. The time now is 22:50.