find the X-Y coordinate of the white pixels of the grayscale image using c#

Reply

Join Date: Jul 2009
Posts: 5
Reputation: learningthings is an unknown quantity at this point 
Solved Threads: 0
learningthings learningthings is offline Offline
Newbie Poster

find the X-Y coordinate of the white pixels of the grayscale image using c#

 
0
  #1
Sep 7th, 2009
Hi!

I have a grayscale image in my pictureBox. I want to box up the white pixels in the image using the rectangle. Can anyone teach me how to write the code. Thanks in advance ..

Best regards,
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,252
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 349
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Nearly a Posting Maven

Re: find the X-Y coordinate of the white pixels of the grayscale image using c#

 
0
  #2
Sep 7th, 2009
What do you mean by I want to box up the white pixels in the image using the rectangle. ?
Coordinates start in the upper left corner with (0,0).
Y coordinates increase by moving down.
X coordinates increase by moving left.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,793
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 698
Sponsor
Featured Poster
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: find the X-Y coordinate of the white pixels of the grayscale image using c#

 
0
  #3
Sep 7th, 2009
Do you mean you want to draw a rectangle around area that have all-white pixels? This will work OK if the areas are in fact only rectangular but I highly suspect you will find jagged edges with white pixels. How should that be handled?
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 5
Reputation: learningthings is an unknown quantity at this point 
Solved Threads: 0
learningthings learningthings is offline Offline
Newbie Poster

Re: find the X-Y coordinate of the white pixels of the grayscale image using c#

 
0
  #4
Sep 8th, 2009
Originally Posted by ddanbe View Post
What do you mean by I want to box up the white pixels in the image using the rectangle. ?
Coordinates start in the upper left corner with (0,0).
Y coordinates increase by moving down.
X coordinates increase by moving left.
Thanks for the reply and apologize for my poor English language

Box up mean indicate with rectangles where the white pixels of the image are.

I have a gray-scale image in the pictureBox and I want to draw a rectangle on the white pixels of the image. Now my problem is i don't know how to get the X-Y coordinate and size of the white pixels of the image for drawing the rectangle on them. As i m a beginer in programming, could you guide me how can i write it in c#. Thanks in advance.

best regards,
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,793
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 698
Sponsor
Featured Poster
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: find the X-Y coordinate of the white pixels of the grayscale image using c#

 
0
  #5
Sep 8th, 2009
Check out this thread:
http://www.daniweb.com/forums/thread215149.html

It does basically the same thing but uses a screen shot instead of a bitmap file. You can just change that section of the code out then it shows you how to find a pixel. After you have a working version of that code then post it up here and we'll go from there!
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 5
Reputation: learningthings is an unknown quantity at this point 
Solved Threads: 0
learningthings learningthings is offline Offline
Newbie Poster

Re: find the X-Y coordinate of the white pixels of the grayscale image using c#

 
0
  #6
Sep 8th, 2009
Originally Posted by sknake View Post
Do you mean you want to draw a rectangle around area that have all-white pixels? This will work OK if the areas are in fact only rectangular but I highly suspect you will find jagged edges with white pixels. How should that be handled?
Yes, I want to draw rectangles around area that have all-white pixels of the image. The white pixels will be within the rectangle. How can i write it in c#. Thanks a lot for the reply.

Best Regard,
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,793
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 698
Sponsor
Featured Poster
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: find the X-Y coordinate of the white pixels of the grayscale image using c#

 
0
  #7
Sep 8th, 2009
Upload your sample image
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Reply

Tags
image, picturebox

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C# Forum


Views: 1701 | Replies: 6
Thread Tools Search this Thread



Tag cloud for image, picturebox
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC