|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
divide image regionHi EveryOne,
Does some one knows a way or tool that knows how to divide image into regions with c# so if the image is like a table style i will now the positions of the columns? i can read the pixlels colors but it will be very slow. thanks Ruby,
Can you be a little more specific with what you are trying to do? What do you mean if the image is like a "table style"? Are you trying to place pieces of an image into a table? What is the end result of what you are trying to do? -- Show quote- Nicholas Paldino [.NET/C# MVP] - mvp@spam.guard.caspershouse.com "Ruby Nadler" <RubyNad***@discussions.microsoft.com> wrote in message news:48912885-B6BF-4D70-9243-29124576F2B8@microsoft.com... > Hi EveryOne, > Does some one knows a way or tool that knows how to divide image into > regions with c# so if the image is like a table style i will now the > positions of the columns? > i can read the pixlels colors but it will be very slow. > thanks > Hi Nicholas,
what i am trying to do is cut b&w image (like newspaper page) into columns and rows according to its layout. any idea? thanks. Show quote "Nicholas Paldino [.NET/C# MVP]" wrote: > Ruby, > > Can you be a little more specific with what you are trying to do? What > do you mean if the image is like a "table style"? Are you trying to place > pieces of an image into a table? > > What is the end result of what you are trying to do? > > > -- > - Nicholas Paldino [.NET/C# MVP] > - mvp@spam.guard.caspershouse.com > > "Ruby Nadler" <RubyNad***@discussions.microsoft.com> wrote in message > news:48912885-B6BF-4D70-9243-29124576F2B8@microsoft.com... > > Hi EveryOne, > > Does some one knows a way or tool that knows how to divide image into > > regions with c# so if the image is like a table style i will now the > > positions of the columns? > > i can read the pixlels colors but it will be very slow. > > thanks > > > > > On Nov 27, 5:44 am, Ruby Nadler <RubyNad***@discussions.microsoft.com>
wrote: > Hi Nicholas, AFAIK, you can manipulate images efficiently by using unsafe code> what i am trying to do is cut b&w image (like newspaper page) into columns > and rows according to its layout. > any idea? > thanks. > regions and pointer arithmetics. There is a simple example in C# 3.0 in a Nutshell which I remember: unsafe void RedFilter(int[,] bitmap) { int length = bitmap.Length; fixed (int* b= bitmap) { int* p = b; for(int i = 0; i < length; i++) *p++ &= 0xFF; } } This kind of iteration over a bitmap avoids runtime index checking and runtime type checking as you would have by accessing the bitmap via [x,y] hth, -- Henon my site: http://www.eqqon.com |
|||||||||||||||||||||||