Locating pixels 'x' position in image

Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Nov 2008
Posts: 43
Reputation: kiddo39 is an unknown quantity at this point 
Solved Threads: 0
kiddo39 kiddo39 is offline Offline
Light Poster

Re: Locating pixels 'x' position in image

 
0
  #11
May 20th, 2009
I think I figured it out:

  1. y = 0
  2. for x in range(width):
  3. if pixel_dict[(x,y)][2] > 0:
  4. print( "(%d, %d): %s"% (x, y, pixel_dict[(x, y)]) )
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,072
Reputation: jlm699 is a jewel in the rough jlm699 is a jewel in the rough jlm699 is a jewel in the rough jlm699 is a jewel in the rough 
Solved Threads: 269
Sponsor
jlm699's Avatar
jlm699 jlm699 is online now Online
Knows where his Towel is

Re: Locating pixels 'x' position in image

 
0
  #12
May 21st, 2009
Originally Posted by kiddo39 View Post
I think I figured it out:

  1. y = 0
  2. for x in range(width):
  3. if pixel_dict[(x,y)][2] > 0:
  4. print( "(%d, %d): %s"% (x, y, pixel_dict[(x, y)]) )
Well? Did it work? Do you think you figured it out or did you figure it out?
1. Use Code Tags.
2. Homework? Show Effort.
3. Keep discussions on the forum: no PMs
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 43
Reputation: kiddo39 is an unknown quantity at this point 
Solved Threads: 0
kiddo39 kiddo39 is offline Offline
Light Poster

Re: Locating pixels 'x' position in image

 
0
  #13
May 21st, 2009
Yes it worked....I did finally figure it out.
Reply With Quote Quick reply to this message  
Reply

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




Views: 854 | Replies: 12
Thread Tools Search this Thread



Tag cloud for Python
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC