Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to get pixel value of each pixel of a gray-scale or black-white image?  RSS feed

 
ashish donvir
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can any one suggest me the method to get actual pixel value of each pixel of a gray scale image?

i used this code to get pixel. But it just gives me red value of an pixel? I don't know that black-white or Gray Scale image contains RGB pixels or not, So please tell me that, the method i used is right or wrong? And also when i plotted histogram for my image it was exactly opposite to the imajeJ histogram for same image. So i guess my method to grab pixel of Gray Scale image is somewhere wrong

So If it is wrong what is the right way to get pixel.
here is my code

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!