:: AForge.NET Framework :: Articles :: Forums ::

Image pixels

The forum is to discuss topics related to different areas of image processing and computer vision.

Image pixels

Postby csanch11 » Mon Mar 21, 2016 5:08 am

What does it mean when you set image pixels to one or zero? Is setting a pixel to 1 make it black, and setting a pixel to 0 make it white?
Posts: 1
Joined: Mon Mar 21, 2016 5:06 am

Re: Image pixels

Postby andrew.kirillov » Mon Mar 21, 2016 8:16 am

It really depends on image processing library/SDK you use. In most cases 0 is black. For white it depends on library, image representation, bits per pixel. When you deal with 8 bpp grayscale images, then white is represented by 255 usually. So pixel values' range is [0, 255]. Some libraries choose to represent pixels' values with floating point numbers and so chose [0, 1] range (this is more math oriented way).
With best regards,

Interested in supporting AForge.NET Framework?
User avatar
Site Admin, AForge.NET Developer
Posts: 3453
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

Return to Image Processing and Computer Vision