I am wondering if anyone has a [rather] simple approach to detecting
the location of boxes and/or lines on an image. For example, if I
have an image of a form, and want to find out where all of the boxes
and/or lines the form contains for input, how would one find the
location of them? I have seen many more complicated examples such as
detecting edges and highlighting them but none as simple as finding
them and returning a position. 10 8682
On Fri, 02 May 2008 08:31:06 -0700, Benny <be***********@gmail.comwrote:
I am wondering if anyone has a [rather] simple approach to detecting
the location of boxes and/or lines on an image. For example, if I
have an image of a form, and want to find out where all of the boxes
and/or lines the form contains for input, how would one find the
location of them? I have seen many more complicated examples such as
detecting edges and highlighting them but none as simple as finding
them and returning a position.
Well, if you have an algorithm that highlights in some way detected
elements in an image, you could modify it simply to return coordinate
information about those elements.
Beyond that, it's not really possible to suggest alternatives. We don't
know nearly enough about your input data to know whether there's some sort
of shortcut you could take to analyzing the image. Edge detection is
certainly one possibility, but if you have more information about the
input data it's possible you could take advantage of that to simplify the
problem.
Pete
On May 2, 11:46*am, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
On Fri, 02 May 2008 08:31:06 -0700, Benny <bennyandli...@gmail.comwrote:
I am wondering if anyone has a [rather] simple approach to detecting
the location of boxes and/or lines on an image. *For example, if I
have an image of a form, and want to find out where all of the boxes
and/or lines the form contains for input, how would one find the
location of them? *I have seen many more complicated examples such as
detecting edges and highlighting them but none as simple as finding
them and returning a position.
Well, if you have an algorithm that highlights in some way detected *
elements in an image, you could modify it simply to return coordinate *
information about those elements.
Beyond that, it's not really possible to suggest alternatives. *We don't*
know nearly enough about your input data to know whether there's some sort*
of shortcut you could take to analyzing the image. *Edge detection is *
certainly one possibility, but if you have more information about the *
input data it's possible you could take advantage of that to simplify the *
problem.
Pete
Thanks for your reply Pete. The problem is simply this:
A form is scanned, lets take a W2 for example. That scanned document
is saved as an image. With that image I want to use a C# application
to detect areas on the form that require input, using our example:
First Name has a box to fill in. I want to find the cooridinates of
that box and use it for future reference.
Please tell me if my example helps clarify the need.
On Fri, 02 May 2008 10:19:58 -0700, Benny <be***********@gmail.comwrote:
A form is scanned, lets take a W2 for example.
Is that a typical form? That is, all forms will have the same kind of
printing and layout as the W2?
That scanned document
is saved as an image. With that image I want to use a C# application
to detect areas on the form that require input, using our example:
First Name has a box to fill in. I want to find the cooridinates of
that box and use it for future reference.
Please tell me if my example helps clarify the need.
Only slightly.
The fact is, edge detection algorithms should help you to find straight
lines that make graphical boxes and underlines found on forms. What is it
about those that you are having problems with? What have you tried so
far? Why doesn't it work?
This newsgroup isn't really appropriate for "I've got this big, general
problem that I want someone else to solve". It's more a forum for helping
people with very specific issues that might come up while writing a C#
program using the .NET Framework.
If you have such specific issues that you need assistance with, I'm sure
help can be provided. But your question is pretty broad. It's not really
clear what exactly you're looking for help with, other than perhaps having
someone else solve the entire problem.
Pete
On May 2, 12:34*pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
On Fri, 02 May 2008 10:19:58 -0700, Benny <bennyandli...@gmail.comwrote:
A form is scanned, lets take a W2 for example.
Is that a typical form? *That is, all forms will have the same kind of *
printing and layout as the W2?
That scanned document
is saved as an image. *With that image I want to use a C# application
to detect areas on the form that require input, using our example:
First Name has a box to fill in. *I want to find the cooridinates of
that box and use it for future reference.
Please tell me if my example helps clarify the need.
Only slightly.
The fact is, edge detection algorithms should help you to find straight *
lines that make graphical boxes and underlines found on forms. *What is it *
about those that you are having problems with? *What have you tried so *
far? *Why doesn't it work?
This newsgroup isn't really appropriate for "I've got this big, general *
problem that I want someone else to solve". *It's more a forum for helping *
people with very specific issues that might come up while writing a C# *
program using the .NET Framework.
If you have such specific issues that you need assistance with, I'm sure *
help can be provided. *But your question is pretty broad. *It's not really *
clear what exactly you're looking for help with, other than perhaps having*
someone else solve the entire problem.
Pete
The reason i posted in the C# forum is because I am a C# developer
looking for a solution to detect these areas of an image using C#. I
don't need an entire solution, per say, just an idea where to look or
an example of a simple method to use C# to detect lines in an image.
The only reason I can't be more specific is because I have not worked
with images in C# so have no point of reference to what specifically I
am looking for.
To outline, the two things I need to know is this:
Using C#, how do I detect a box (or a square) within an image?
Once I have that reference to the box, how do I determine the location
of that box (using C#)?
On Fri, 02 May 2008 11:54:46 -0700, Benny <be***********@gmail.comwrote:
[...]
To outline, the two things I need to know is this:
Using C#, how do I detect a box (or a square) within an image?
I don't understand why you say you "don't need an entire solution", and
then follow that up with a broad question like that? How would one answer
that question without providing the entire solution?
Once I have that reference to the box, how do I determine the location
of that box (using C#)?
I also don't understand that question. If you've detected a box and have
a reference to it, doesn't that imply that you already know the location?
As a general bit of advice: in C#/.NET, you have two basic ways to get at
image data. You can access individual pixels using the GetPixel() method
of the Bitmap class. Or you can use LockBits() of the Bitmap class to
retrieve a byte-array representation of the image data. Probably you're
going to want the latter for performance reasons.
You can keep hoping for a tutorial on edge-detection here, but I suspect
you'd be better off researching specific algorithmic details and using
this newsgroup for the aspects of the problem that are actually specific
to C# and/or .NET.
Pete
On May 2, 2:04*pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
On Fri, 02 May 2008 11:54:46 -0700, Benny <bennyandli...@gmail.comwrote:
[...]
To outline, the two things I need to know is this:
Using C#, how do I detect a box (or a square) within an image?
I don't understand why you say you "don't need an entire solution", and *
then follow that up with a broad question like that? *How would one answer *
that question without providing the entire solution?
Once I have that reference to the box, how do I determine the location
of that box (using C#)?
I also don't understand that question. *If you've detected a box and have *
a reference to it, doesn't that imply that you already know the location?
As a general bit of advice: in C#/.NET, you have two basic ways to get at *
image data. *You can access individual pixels using the GetPixel() method *
of the Bitmap class. *Or you can use LockBits() of the Bitmap class to *
retrieve a byte-array representation of the image data. *Probably you're*
going to want the latter for performance reasons.
You can keep hoping for a tutorial on edge-detection here, but I suspect *
you'd be better off researching specific algorithmic details and using *
this newsgroup for the aspects of the problem that are actually specific *
to C# and/or .NET.
Pete
A general "Here's a good link for edge detection using C#" would have
been good enough. Quite honestly, I believe that even your bit on how
to retrieve the image data is more informative than "we can't come up
with a whole solution for you." Since it is a broader topic a broad
reference would really have been suffice. I guess I will proceed
wasting time digging through the 10k results from Google since the
advice/reference given is slim to none. Thanks anyways.
"Benny" <be***********@gmail.comwrote:
I guess I will proceed wasting time digging through the 10k results
from Google since the advice/reference given is slim to none. Thanks
anyways.
Or you could try posting on a newsgroup that's actually relevant, like
comp.graphics.algorithms. The fact that you're using C# as a language
doesn't automatically make every problem a C# problem. Maybe you have a
dog, but that doesn't mean you should ask on rec.pets.dogs about how to
detect a box in an image.
Eq.
On May 2, 8:54 pm, Benny <bennyandli...@gmail.comwrote:
On May 2, 12:34 pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
On Fri, 02 May 2008 10:19:58 -0700, Benny <bennyandli...@gmail.comwrote:
A form is scanned, lets take a W2 for example.
Is that a typical form? That is, all forms will have the same kind of
printing and layout as the W2?
That scanned document
is saved as an image. With that image I want to use a C# application
to detect areas on the form that require input, using our example:
First Name has a box to fill in. I want to find the cooridinates of
that box and use it for future reference.
Please tell me if my example helps clarify the need.
Only slightly.
The fact is, edge detection algorithms should help you to find straight
lines that make graphical boxes and underlines found on forms. What is it
about those that you are having problems with? What have you tried so
far? Why doesn't it work?
This newsgroup isn't really appropriate for "I've got this big, general
problem that I want someone else to solve". It's more a forum for helping
people with very specific issues that might come up while writing a C#
program using the .NET Framework.
If you have such specific issues that you need assistance with, I'm sure
help can be provided. But your question is pretty broad. It's not really
clear what exactly you're looking for help with, other than perhaps having
someone else solve the entire problem.
Pete
The reason i posted in the C# forum is because I am a C# developer
looking for a solution to detect these areas of an image using C#. I
don't need an entire solution, per say, just an idea where to look or
an example of a simple method to use C# to detect lines in an image.
The only reason I can't be more specific is because I have not worked
with images in C# so have no point of reference to what specifically I
am looking for.
To outline, the two things I need to know is this:
Using C#, how do I detect a box (or a square) within an image?
this is a classical pattern recognition task. believe me, you wouldn't
want to implement every detail for recognizing rectangles/squares
yourself unless you can simplify the problem to a trivial case. it is
usually done using image processing libraries. however, I am pretty
sure there are not much if any C# libraries that offer such
functionality. the most effective way is to use one of many c++
libraries (IPP, OpenCV, etc) via interop.
-- henon
-------------------
my c# blog: http://www.eqqon.com/index.php/User:Henon
On May 2, 11:24 pm, "Paul E Collins" <find_my_real_addr...@CL4.org>
wrote:
"Benny" <bennyandli...@gmail.comwrote:
I guess I will proceed wasting time digging through the 10k results
from Google since the advice/reference given is slim to none. Thanks
anyways.
Or you could try posting on a newsgroup that's actually relevant, like
comp.graphics.algorithms. The fact that you're using C# as a language
doesn't automatically make every problem a C# problem. Maybe you have a
dog, but that doesn't mean you should ask on rec.pets.dogs about how to
detect a box in an image.
Eq.
detecting a box in an image is not a language specific problem.
however, it *is* some sort of a c# problem because there are no c#
libs around for this kind of task (at least I don't know any good ones
that are directly usable from c#). so the real problem is, which of
the available libraries can be easily made use of from within c#. ;)
-- henon
-----------------
my c# blog: http://www.eqqon.com/index.php/User:Henon
Maybe http://code.google.com/p/aforge/
a C# lib for image processing.... you can use blob counter class to extract
shapes from images
hope that this helps
Regards
"henon" wrote:
On May 2, 11:24 pm, "Paul E Collins" <find_my_real_addr...@CL4.org>
wrote:
"Benny" <bennyandli...@gmail.comwrote:
I guess I will proceed wasting time digging through the 10k results
from Google since the advice/reference given is slim to none. Thanks
anyways.
Or you could try posting on a newsgroup that's actually relevant, like
comp.graphics.algorithms. The fact that you're using C# as a language
doesn't automatically make every problem a C# problem. Maybe you have a
dog, but that doesn't mean you should ask on rec.pets.dogs about how to
detect a box in an image.
Eq.
detecting a box in an image is not a language specific problem.
however, it *is* some sort of a c# problem because there are no c#
libs around for this kind of task (at least I don't know any good ones
that are directly usable from c#). so the real problem is, which of
the available libraries can be easily made use of from within c#. ;)
-- henon
-----------------
my c# blog: http://www.eqqon.com/index.php/User:Henon This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jake |
last post by:
Hi,
I have a page with a bunch of thumbnails that when clicked, open the full
size image in a new window. They are all different sizes and its a bit
unprofessional looking. I'd like to find a...
|
by: mphanke |
last post by:
Hi,
I would like to place an Icon on an Image. If the mouse is over this
Icon, I want to display the associated text in a tooltip.
How would I do this? Any ideas? My last request wasn't...
|
by: deja |
last post by:
I have a frameset like this:
<FRAMESET cols="25%,75%">
<FRAME src="page1.html" name="directory">
<FRAME src="page2.html" name="display">
</FRAMESET>
page2.html has an image like this:
...
|
by: aiki727 via DotNetMonster.com |
last post by:
Hello everyone,
Where do I store a bitmap or jpeg that I am using for a forms background
image when I deploy the application? Or do I link these files to the app
during the deployment?
Thanks...
|
by: Martin Larsen |
last post by:
Hi,
I have a script for a CMS that preloads an image by setting the SRC
attribute. The problem is that the location of the image as seens from
the final HTML page depends on whether the CMS has...
|
by: sagarlotiya |
last post by:
Hi
I have made one javascript which allows me to add note on image using css and javascript. Every thing works fine.
But following problme occurs.
I want to display allthe notes on image when we...
|
by: KalariaNitya |
last post by:
Hello All,
in windows application(vb.net) i have one button control
i want to relocate that button on Second button's click event.
means old location is:184, 111
i want new location :59, 375...
|
by: laredotornado |
last post by:
Hi,
Does anyone have code that detects if a field has been entered in PO
Box format? I'm trying to prevent users from entering PO Boxes for
shipping addresses.
Thanks, - Dave
|
by: tarek01 |
last post by:
I know this can be done with JavaScript, but can PHP detect when a page finishes loading? Once it has confirmed the page is loaded, it would execute an event.
What about detecting when an image...
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: GKJR |
last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
| |