how to vertically scan an image in c#
-
how do i scan an image column wise in c# . i need help with the code . i wanted to read the next pixel of the same column .please help im a beginner in image processing Thanks in advance
-
how do i scan an image column wise in c# . i need help with the code . i wanted to read the next pixel of the same column .please help im a beginner in image processing Thanks in advance
well if your image is a bitmap you can create a 2D array of pixels then loop through columns and rows actually just use:
Bitmap b = new Bitmap(filepath);
for(int i = 0; i < b.Width; i++)//Columns
{
for(int j = 0; j < b.Height; j++)//Rows
{
Color c = b.GetPixel(i, j);
//or do what ever you want with the pixel
}
} -
well if your image is a bitmap you can create a 2D array of pixels then loop through columns and rows actually just use:
Bitmap b = new Bitmap(filepath);
for(int i = 0; i < b.Width; i++)//Columns
{
for(int j = 0; j < b.Height; j++)//Rows
{
Color c = b.GetPixel(i, j);
//or do what ever you want with the pixel
}
}do u mean i can use getpixel and setpixel method to solve this....i was intending to use unsafe code so that it could be faster....
-
do u mean i can use getpixel and setpixel method to solve this....i was intending to use unsafe code so that it could be faster....
-
i am trying to segment characters from a string of characters in a license plate image....i want to scan my image column wise so that i can extract every character ....so i need to find how many black pixels are present in a column....
-
i am trying to segment characters from a string of characters in a license plate image....i want to scan my image column wise so that i can extract every character ....so i need to find how many black pixels are present in a column....
Good luck lol :P You do have to go through the pixels though, so I would stay with my GetPixel() suggestion. I dont know of another alternative to getting the pixels sorry :( (unless you read the file yourself, but then you would have to store pixels as an array, and loop through them yourself) Just out of interest - what algorithms will you be using to detect the letters?
-
Good luck lol :P You do have to go through the pixels though, so I would stay with my GetPixel() suggestion. I dont know of another alternative to getting the pixels sorry :( (unless you read the file yourself, but then you would have to store pixels as an array, and loop through them yourself) Just out of interest - what algorithms will you be using to detect the letters?
-
There's some articles on CP that deal with OCR. Would still be a challenge, I guess :)
I are troll :)
-
ahhh.. V.Interesting. Might take a look at doing something like that if i ever get the free time lol The office MODI method looks like the simplist approach, cant say that be good for speed thou :P
thanku all ........if any 1 can still help i'll be highly obliged..........