Pixel is a 2D or 3D? please answer me. thanks

15 views (last 30 days)
Pixel is a 2D or 3D? please answer me. thanks

Accepted Answer

Image Analyst
Image Analyst on 11 Sep 2015
A grayscale, indexed, or binary image is 2D. A true color, RGB image is 3D. Just look at how many values you get if you specify two values (row and column) as the "independent variables".
  6 Comments
Muhammad Sohail
Muhammad Sohail on 11 Sep 2015
Thanks stephen, but still i dont have clear answer of that whether a pixel can have any dimension or not? if it has any dimension what will be the context for that? and what dimension in that context it have.. :(
Stephen23
Stephen23 on 11 Sep 2015
Edited: Stephen23 on 11 Sep 2015
@Muhammad Sohail: Don't confuse a pixel (a point on an image) with the data that is used to define that pixel.
I think you are actually asking about how many dimensions the pixel data has, in which case the dimensions of that data depends on how the image is encoded (it might be 2D, 3D, etc, as Image Analyst explained). The only way to know is to read about that image format, and check that particular image. Here is a good introduction to common ways of encoding/storing image data:
You can see on that page that depending on how the image is encoded the data that encodes a pixel may be 2D or 3D (or other dimensions), but by definition they all encode a single pixel (point of that image). The indexed image uses a 2D matrix, while the RGB image uses a 3D matrix, yet the pixels of the image are exactly the same in the example images.
A pixel is strictly defined as a point/element of a 2D image. An element of a 3D image (such as used in VR and games) is called a voxel, not a pixel.

Sign in to comment.

More Answers (2)

Mike Garrity
Mike Garrity on 11 Sep 2015
I think that the best answer for what a pixel "is" is Alvy Ray Smith's A Pixel Is Not A Little Square memo.
  3 Comments
Mike Garrity
Mike Garrity on 11 Sep 2015
Yes but ... In most cases a CCD well doesn't end up being a pixel because demosaicing is performed to combine values from multiple wells behind different color filters to create the final pixel.
There's usually an antialiasing filter in there too. These have the effect of smearing some of the light from the edges of the well into the neighboring well to prevent artifacts from features which are smaller than the width of the well.
And then on display, antialiasing schemes such as ClearType take advantage of the internal structure of the "pixel" to increase the apparent resolution.
There are cases where you can think of a pixel as being a little square, but there are also a lot of cases where that mental model is going to get you into trouble. I think that Alvy was correct to tell us not to get too comfortable with that mental model.
Image Analyst
Image Analyst on 11 Sep 2015
True, the birefringent anti-aliasing filter over the sensor does give a duplicate image that makes the square a bit sheared. I thought demosaicing was just done on the "missing" pixels, and there of course it's just an interpolation, or estimate, of what the value would be there in the missing spot. So, yes, 2/3 of the pixels will not be exactly a square with really straight, sharp, crisp edges. But on the pixels that are actually there, don't they just deliver those unaltered (not demosaiced and affected by neighboring pixels)?
And of course cameras might add their own secret sauce to the final image they deliver such as dead pixel removal, various color enhancements (some of which you can specify/control and some that you have no control over), and perhaps edge enhancements or other special effects.

Sign in to comment.


Thorsten
Thorsten on 11 Sep 2015
A pixel is a "picture element", or the basic element of a digital image. The most common image formats are binary images, where the pixel can be either 0 or 1, gray scale images where the pixel can take values 0, 1, 2,..., 255 (8bit) or RGB color images, where the pixel is defined by three 8-bit values for Red, Green, and Blue, respectively.
  1 Comment
Muhammad Sohail
Muhammad Sohail on 11 Sep 2015
Thanks Thorsten it really help me, as am new to this field so different questions raising in mind... :)

Sign in to comment.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!