divide image region

R

Ruby Nadler

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
 
N

Nicholas Paldino [.NET/C# MVP]

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?
 
R

Ruby Nadler

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.

Nicholas Paldino said:
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]
- (e-mail address removed)

Ruby Nadler said:
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
 
H

henon

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.

AFAIK, you can manipulate images efficiently by using unsafe code
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top