Hi!
I am developing an application in ASP.NET that takes an image, that have
been created with a digital camera or camera phone, and processes it, to
get data from it. The image taken by the user will be of a square in some
kind of magazine or newpaper, with a white background and the border of the
square should be black.
What I am trying to do is to find the square, or the corners of the square,
in the image, using ASP.NET code. If the user always took the picture
directly above the square without any rotation and blur this would not be a
big problem. But that is hardly not the case most of the times.
What I have managed to do so far is to convert the image to gray scale and
then made some kind of thresholding so I will end up with just white and
black pixels. This will make the square very visible in the image, but so
will other dark object, even if alot is taken out in the tresholding.
Finding one of the corners in the square, and always be positively sure
that you have found it, would solve alot. Then I think I can manage to do
the rest. In my solution now, I will sometimes find a corner, but it does
not work for many images.
Does some one have an idea of how to solve this problem? I have tried
different ways of search for objects in the image by looking at all pixels,
but I really dont know how to see the difference between the corner of the
square and an object.
Is it possible to search for patterns in the image? like if I search the
image after objects that are similar to a corner of a square.
I would really like some help with this problem. All kinds of ideas are
welcomed!
Best Regards
Andreas Viklund
UMEA, Sweden
--
Message posted via http://www.dotnetmonster.com 2 1990
Hi Andreas,
You've got quite a problem on your hands. Let's try to analyze it and see
what pops out: What I am trying to do is to find the square, or the corners of the square, in the image, using ASP.NET code. If the user always took the picture directly above the square without any rotation and blur this would not be a big problem. But that is hardly not the case most of the times.
Here's the first problem: People don't do what they're supposed to do (as
you seem to be aware). Not only is the user not always going to get the
picture directly above the square, but, impish beings that humans are, I
would venture to guess that some of these images might not even have a
square in them. Why, they might even be porn pictures!
The blur issue also creates a difficult situation. If the edges of the
square could be counted on to be crisp, it wouldn't be a problem. You would
just start with each outside edge, get all the pixels in a line, see if they
were all black, and after that move in towards the center until they are NOT
all black. This would give you the inside position and measurements of the
square. Of course, that would be assuming that the square is aligned
correctly, which is hardly a certainty.
Is it possible to search for patterns in the image? like if I search the image after objects that are similar to a corner of a square.
Yes, it's possible. Pattern-recognition is a rather sophisticated science,
but if you have the algorithms and/or the time and resources, you can write
an app that can find patterns in any image. In this case, the pattern is
relatively simple: a square. But as we mentioned, the blur and alignment
issues could make it very difficult. The alignment issue could be handled by
doing various transforms until one found the alignment, or it could be done
by finding a straight black line (assuming that the blur was NOT an issue,
and assuming that there IS a square in the image.
It would help if we knew more about what sort of images these are, and what
they're used for. So far, you've described the square nicely enough, but
what is in the rest of the image? Knowing that could make the job of finding
your pattern much easier (or harder!).
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
"Andreas Viklund via DotNetMonster.c om" <fo***@DotNetMo nster.com> wrote in
message news:db******** *************** *******@DotNetM onster.com... Hi! I am developing an application in ASP.NET that takes an image, that have been created with a digital camera or camera phone, and processes it, to get data from it. The image taken by the user will be of a square in some kind of magazine or newpaper, with a white background and the border of the square should be black.
What I am trying to do is to find the square, or the corners of the square, in the image, using ASP.NET code. If the user always took the picture directly above the square without any rotation and blur this would not be a big problem. But that is hardly not the case most of the times.
What I have managed to do so far is to convert the image to gray scale and then made some kind of thresholding so I will end up with just white and black pixels. This will make the square very visible in the image, but so will other dark object, even if alot is taken out in the tresholding.
Finding one of the corners in the square, and always be positively sure that you have found it, would solve alot. Then I think I can manage to do the rest. In my solution now, I will sometimes find a corner, but it does not work for many images.
Does some one have an idea of how to solve this problem? I have tried different ways of search for objects in the image by looking at all pixels, but I really dont know how to see the difference between the corner of the square and an object.
Is it possible to search for patterns in the image? like if I search the image after objects that are similar to a corner of a square.
I would really like some help with this problem. All kinds of ideas are welcomed!
Best Regards
Andreas Viklund UMEA, Sweden
-- Message posted via http://www.dotnetmonster.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Deepa |
last post by:
Hi All,
I'm facing problem displaying image of size 5000X5000 .My window size
is smaller than image size so i'm not able to see the complete image.i
can use scroll bars to view the image but i need to rotate the image
and the see the result everytime.
For this my boss has given me suggestion to display only 20% of the
image on window ,and rotation has to be applied to original copy.
|
by: jasonshohet |
last post by:
I read recently that: "if a before-image was made before an
interruption in database processing, you use the before-image dump &
simply begin processing again from just before the last transaction.
Any checkpoints are irrelevant."
I'm not a dba here, so bear with me... What I don't understand is, why
are checkpoints irrelevant when you did a before image dump? Why not
begin from the last checkpoint? Probably part of my problem is...
|
by: Jigar Mehta |
last post by:
Hye Friends!!,
Happy New Year!!
I am Jigar Mehta from India. Currently I am working on a project in
which I need to compress some images on the harddisk... I want to make an
engine that reads whole BMP image and then compress it.. The target location
can be of any type.. BMP, TIFF, JPG or any.. Some data loss will be
negligible because all the images are having very high resolution with
32-bit colors (taken from digi-cam).
|
by: |
last post by:
Hi,
we are planning to rewrite an extisting C++ image processing
application/library in C#. Now several question arouse where I hope you can
help me:
So far we allocated a block of memory as image buffer, handed this to a
driver dll and got raw image data back in this buffer. We then handed this
buffer by reference to another C++ dll to do base image processing on it.
Alternativly we copy an area of the whole image to a newly...
|
by: stonny |
last post by:
Hi, I am converting my matlab program into C/C++. I need to change some
image processing toolbox functions into C/C++, such as edge detection,
mathematical morphology.
Is there any place that I can download some open source program to
release my load?
Many Thanks
Dexin
| |
by: Enrique Cruiz |
last post by:
Hello all,
I am currently implementing a fairly simple algorithm. It scans a
grayscale image, and computes a pixel's new value as a function of its
original value. Two passes are made, first horizontally and second
vertically. The problem I have is that the vertical pass is 3 to 4
times slower than the horizontal, although the code is _exactly_ the
same in both cases?!
The code itself is very simple. There are 2 loops to scan through...
|
by: birensubudhi |
last post by:
hey guys,can anyone tell me what is image processing,
how to do it using C.
IN KSHITIJ 2007 held at IIT kgp a que by INFOSYS is asked,
they hav given an image then cut in different orientation ,put in a
abstract(unordered) manner & asked to jumble it using C
PROGRAMMING to get the real image.
|
by: Peter Oliphant |
last post by:
The Image class allows loading a bitmap from a graphic file. So far I've
gotten it to work with JPG and BMP files.
What other graphic file formats are supported in this way? Is this fixed
based on the .NET Framework used (e.g., the Image class defines which
formats can be used), or can different file formats be added after-the-fact
(end-user capability in contrast to developer implementation)?
Also, is it possible to save an image in...
|
by: whisk3rs |
last post by:
Hello, I have a conceptual question. I need to write a program that
will take as input a list of images and then process each image
individually (extract useful features from the image)
Processing each image takes about 20 seconds, and I would like to
utilize all available cores / CPUs on a machine to do processing in
parallel - for simplicity, I think it'd be easier for now to have each
core process an individual image (rather than have...
|
by: tavares |
last post by:
(Our apologies for cross-posting.
We appreciate if you kindly distribute this information by your co-
workers and colleagues.)
***************************************************************************
Symposium “Image Processing and Data Visualization”
2nd South-East European Conference on Computational Mechanics (SEECCM
2009)
Island of Rhodes, Greece, 22-24 June 2009
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |