Pixel is a 2D or 3D? please answer me. thanks
15 次查看(过去 30 天)
显示 更早的评论
Pixel is a 2D or 3D? please answer me. thanks
0 个评论
采纳的回答
Image Analyst
2015-9-11
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 个评论
Stephen23
2015-9-11
编辑:Stephen23
2015-9-11
@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.
更多回答(2 个)
Mike Garrity
2015-9-11
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 个评论
Mike Garrity
2015-9-11
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
2015-9-11
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.
Thorsten
2015-9-11
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.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!