473,516 Members | 3,277 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Image processing

2 New Member
I've got a black background picture drawn inside a white box
How to detect the white box and print it in picture box
Attached Images
File Type: jpg Untitled.jpg (1.6 KB, 113 views)
Feb 24 '12 #1
3 1045
GaryTexmo
1,501 Recognized Expert Top Contributor
I'm sorry, I'm a little confused about what you want to do. Are you asking how to find the white rectangle within the black one?

If so, this image analysis is pretty non-trivial... probably beyond of "help boards" like bytes, as it's not our job to write our code for you ;) That said, I think an exact rectangle detection algorithm shouldn't be too hard... at least an inefficient one.

Perhaps you could start scanning your image, knowing the background is one colour (ie, black). Search each pixel on each line until you find the foreground colour (ie, white). Once you have, note the position of the top-left corner. From there, scan right until you stop encountering the foreground and hit the background. This will be your top-right corner. From the top left and top right corners, search down until you find the background colour again. Now you've got the bottom left and right corners respectively and can build a rectangle from that. You may wish to examine the volume of your rectangle to see if there are any other coloured pixels in it... this will tell you if it's not a real rectangle shape. Also, make sure you account for the cases where the white rectangle is aligned with the edge of the image so you don't try to access an out of bounds index.

That should work as a fairly basic algorithm... I think. I've frankly never tried it... but give it a shot and let me know how it works out :)
Feb 25 '12 #2
engaya
2 New Member
Thanks for the reply

I know algorithm well and have already been scanning each pixel but my problem in artificial intelligence
not need your code
Feb 25 '12 #3
GaryTexmo
1,501 Recognized Expert Top Contributor
I... don't know what you're asking here...
Feb 26 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
4071
by: Alexandre Fayolle | last post by:
Hello, I'm about to start a project which will involve some greyscale image processing using morphological operators (erosion, dilation, distance transforms...), and I was wondering if these operators were available in Python through some open source libraries. A quick google search returned pymorphpro, which is unfortunately not free...
0
1421
by: Andreas Håkansson | last post by:
Hiya! I'm currently looking for a good image processig component (classes) to use in a project. I do not want to controls (winform or webform) since I will be doing this with code. I actually do not need my image processing functionality, mainly * Resizing
2
1721
by: Maxwell2006 | last post by:
Hi, I am developing a simple image upload asp.net page and I am looking for a simple image processing component to be able to change the image resolution of jpg images and also reduce the kilobyte size of them (optimise for web)
10
4402
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
5
2364
by: edurand | last post by:
Hi, We are are pleased to announce the version 3.0 of the image processing library 'Filters'. You can use it in Python, and we have provided tutorials and samples in Python, with for exemple conversion from/to PIL image format. Have a look at : http://filters.sourceforge.net/ it's open source of course
3
2539
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.
26
5254
by: mohangupta13 | last post by:
can anyone help me where to find the best image processing library for c++ mohan gupta
5
1994
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...
0
2001
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...
0
7276
marktang
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...
0
7182
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...
1
7142
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...
0
7548
tracyyun
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...
1
5110
isladogs
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...
0
4773
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3267
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...
0
3259
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1624
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.