Pixelation of bitmap images (pixel size, pixel density, resolution)

In summary, the pixelation of an enlarged bitmap image is not due to a mismatch between the image resolution and the screen's resolution. The enlargement is done by increasing the size of the graphical pixels to a point where we see the discrete color transitions. Filtering takes care of any odd effects caused by the number of camera pixels per cm.
  • #1
fog37
1,569
108
TL;DR Summary
understanding the causes of pixelation in bitmap images
Hello Forum,

I am attempting to understand what causes pixelation when a bitmap (jpg, png, etc.) image is enlarged.

Bitmap images have a resolution indicated as the number of pixels along the width and height of the image itself. On the other hand, computer monitors also have a physical resolution indicating how many pixels fit inside a squared inch area on a physical computer screen. The number of pixels is important as well as the size of each pixel: the smaller the pixel the better, the higher the pixel density the better.

What causes the pixelation effect when we enlarge a bitmap image? At the end of the day, even vector images are always displayed as a bitmap (pixels on a screen) but the image scaling is accomplished via mathematical formulas which "recalculate" the scaled shape to be displayed. This does not happen for bitmap images..

Is the pixelation of an enlarged bitmap image due to a mismatch between the image resolution and the screen's resolution? I don't think so.
The pixel size and density of the monitor are both fixed. When enlarging a bitmap image, are the graphical pixels enlarged?

Thank you!
 
Engineering news on Phys.org
  • #2
What would you expect if it was enlarged to the point where a single pixed filled almost the whole screen?
 
  • Like
Likes phinds and fog37
  • #3
fog37 said:
When enlarging a bitmap image, are the graphical pixels enlarged?
The short answer is yes.
 
  • #4
anorlunda said:
What would you expect if it was enlarged to the point where a single pixed filled almost the whole screen?
That would be single color. The screen would be completely monotone.

The graphical pixel of a bitmap image always occupies multiple physical pixels of the screen. So in essence the enlargement of a bitmap image is done by increasing the size of the graphical pixels to a point where we see the discrete color transitions...

Does the size of the pixels on the screen ever play a role?
 
  • #5
You need to understand Moire patterns. Look it up.
fog37 said:
The graphical pixel of a bitmap image always occupies multiple physical pixels of the screen.
That is usually true but not always. If I view 2K TV on 720P that is not so. What is your point? The answer is emphatically yes.
 
  • #6
fog37 said:
The graphical pixel of a bitmap image always occupies multiple physical pixels of the screen.
Not if the image resolution is higher than the screen resolution.
fog37 said:
So in essence the enlargement of a bitmap image is done by increasing the size of the graphical pixels to a point where we see the discrete color transitions...
Yes.
fog37 said:
Does the size of the pixels on the screen ever play a role?
No.
 
  • Like
Likes fog37
  • #7
fog37 said:
Summary:: understanding the causes of pixelation in bitmap images

Bitmap images have a resolution indicated as the number of pixels along the width and height of the image itself. On the other hand, computer monitors also have a physical resolution indicating how many pixels fit inside a squared inch area on a physical computer screen
Yes, the amount of information in the original image is one thing and the density of display elements is another thing. The 'quality' of the displayed image will be a result of both these are relevant. Ideally, designing a display system will take into account both these.
The business of recording a digital image is very complicated. The density of camera pixels on a line has to be at least twice the highest spatial frequency of any detail in the picture. Cameras usually have a blurry filter (a Nyquist filter) on the surface of the sensor array to 'soften' the image that the lens produces and avoids 'aliases'. So what comes out will be a set of squares (or rectangles) of uniform brightness of one pixel pitch. To display the camera image on a fine pitch display, you don't have to display coarse rectangles (pixellation). You can filter (that's spatial filtering) so that the displayed pixels can vary in brightness over the coarse pixels and present a much better looking (softer) picture that would be quite good enough to view from a longer distance than normal.
The number of camera pixels per cm need not be related to the number of display pixels. You might imagine that would cause odd effects but the right filtering takes care of it. Whenever a signal is sampled, it's essential to use the correct filtering at the input and at the output, to get the best result.
There's a good example of how fine text is displayed. The original text characters are plain black on white but the display often has a range of greys so 8point text looks much smoother than it would with just black or white squares.
 
  • Like
Likes .Scott
  • #8
russ_watters said:
Not if the image resolution is higher than the screen resolution.

Yes.

No.
Generally, is the image resolution (pixels per inch) higher than the screen resolution? That does not seem possible...

The screen resolution is the ultimate bottleneck as it defines the smallest size pixel that an image can have, correct?
 
  • #9
Even if the TV screen had infinite resolution, if you enlarge the image enough you will begin to see the individual pixels of the image. That's why I asked about the limiting case with only one image pixel visible on the screen.

Either the pixel density of the screen has no relation to your question, or I don't understand the question.
 
  • #10
fog37 said:
The screen resolution is the ultimate bottleneck
That's one way of looking at things but there are dozens of relevant factors at work. It's a bit of a game of Top Trumps, actually. The ultimate limit is the amount of information in the original image. That depends on the camera resolution. This includes the quality of the lens and the bit reduced file size. The optics of a cheap 20MPx phone camera can be really rubbish and the high pixel count is there mainly for advertising purposes. The early high quality digital cameras used to have 6MPx images and they could be stunning. The quality you get from high end phone cameras is achieved by some very clever image processing to make your average scene 'look very good'. The sort of thing we're talking about here is more basic than that.
Presenting an image. involves a choice of viewing distance and screen size. Pixels are often much smaller than the eye's resolving power for normal viewing and I don't know of many displays that I have seen with noticeable pixel sizes (you don't usually kneel in front of a 4K TV screen to watch a programme).
anorlunda said:
if you enlarge the image enough you will begin to see the individual pixels of the image
Not necessarily significant. If the image is properly filtered, the steps between adjacent pixels can be invisible. The 'Nyquist Post Filtering' is largely done by the eye because the system will have been designed with appropriate viewing distance and screen size but appropriate low pass filtering can get rid of the pixel edges without significant loss of the actual detail you can see. (Having box-car shaped response is of no actual benefit.)
 
  • Like
Likes .Scott, russ_watters and hutchphd
  • #11
For an image, the fundamental resolution is determined by the information content of the image. For a bitmap this is typically the (number of pixels)x(24 bits per pixel). This information can be displayed at any resolution and size you choose but the information content will not change. Whether it appears pixelated depends upon the display resolution or the bitmap resolution (whichever is worse), and your distance from the display.
Also there are some smart ways to smooth and interpolate the bitmap to ameliorate the perceived pixilation but these are various forms of magic.

Edit: I see I just restated stuff...oh well...
 
  • Like
Likes russ_watters and sophiecentaur
  • #12
hutchphd said:
Also there are some smart ways to smooth and interpolate the bitmap to ameliorate the perceived pixilation but these are various forms of magic.
Clever methods but they all come down to the right Nyquist Post Filter which allows the reconstruction of the original scene. The eye of the viewer contributes somewhat to this filtering - unless you happen to be an Elf!
PS Too much effort in the filtering would actually be poor engineering because it would involve, at the very least, extra delay, which makes motion portrayal more and more difficult.
 
  • Like
Likes hutchphd
  • #13
fog37 said:
Generally, is the image resolution (pixels per inch) higher than the screen resolution? That does not seem possible...

The screen resolution is the ultimate bottleneck as it defines the smallest size pixel that an image can have, correct?
Image resolution is a function of how it is captured, and is not expressed in pixels per inch, usually just pixels (image size, not resolution). Sometimes it is captured at the same image size as the expected screen, but it could be higher or lower.

I guess you could say the screen resolution is the "ultimate bottleneck", but I'm not sure how useful that is.
 
  • Like
Likes sophiecentaur
  • #14
russ_watters said:
I guess you could say the screen resolution is the "ultimate bottleneck", but I'm not sure how useful that is.
The speed of a convoy is the speed of the slowest ship.
you need to define the whole channel in detail. A small or low res display is still fine for photo editing because you can zoom in on a detail and fix it. I had a neighbor who worked with extreme high res images and had them photo printed on A0 paper. His ‘modest’ iMac was quite adequate for his work. So the context counts.
It’s typical of salespeople to describe performance in selective terms and it’s not good to get involved in that game.
The real answer to the OP is to define what you want first and the required performance of each part in the chain will eventually reveal itself. The OP shouldn’t get too involved in a chain with mis-matched elements in it.
 
  • Like
Likes fog37, DaveC426913 and russ_watters
  • #15
sophiecentaur said:
photo printed on A0 paper
I had to look up A0, it is 841*1189 mm. Close to ANSI E drawing size at 34*44 inches. That's a big photo print!
 
  • Like
Likes fog37 and sophiecentaur
  • #16
Yep. Just like a noil painting!
 
  • Like
Likes fog37
  • #17
I have seen low definition analogue television images which were displayed on a mechanical scanner. The scanning spot was made into a shape like a diamond, so that in the vertical plane it overlapped adjacent lines, thereby reducing the aliasing. The results using this system were really spectacular, even with small number of lines, no line structure or pixelation being visible. It is noticeable that B/W analogue TV does not use pixelation along a line, so there is no sampling going on, whereas in the vertical direction we have sampling, so the highest spatial frequency in the vertical direction is half the number of lines.
 
  • #18
tech99 said:
It is noticeable that B/W analogue TV does not use pixelation along a line, so there is no sampling going on,
But there is an associated bandwidth and so the result is similar.
 
  • #19
tech99 said:
The scanning spot was made into a shape like a diamond, so that in the vertical plane it overlapped adjacent lines, thereby reducing the aliasing.
That's a form of spatial filtering with different weightings over the area of the scanning shape. (Pretty clever tho'!). I haven't sussed out how aliasing is reduced. I will have to think about that one.
tech99 said:
TV does not use pixelation along a line, so there is no sampling going on
Strictly, there is still temporal sampling and adding interlace manages to double the sample rate which is very handy because the frame frequency falls in an important value for our motion / flicker perception.
 
  • Like
Likes fog37
  • #20
Sampling will double the frequency spectrum required for an analogue signal, as the sampling frequency is double the maximum frequency and the sampled signal lies both sides of the sampling frequency. That is why the vertical resolution is halved by the line structure.
 
  • Like
Likes sophiecentaur
  • #21
tech99 said:
Sampling will double the frequency spectrum required for an analogue signal, as the sampling frequency is double the maximum frequency and the sampled signal lies both sides of the sampling frequency. That is why the vertical resolution is halved by the line structure.
There is more to it than that. The spectrum of the TV signal, will be a comb of line frequency components at 16.625Hz (for stationary pictures) so the 'doubling' of frequency doesn't take the overall spectrum out to twice the video bandwidth- which is what your statement implies. Doubling the fine frequency structure is not a problem. When there is motion, the line frequency components are broken up into further field frequency lines.
We should stop now or Pandora's Box will open and hell will break loose.

The differences between analogue and digital information systems are many and subtle. The 'information' in an analogue signal is not easy to define because you can specify the amplitude to any degree of accuracy you choose. Once you sample and quantise, the information content is better defined.
There are many apparent paradoxes, particularly when you introduce quantisation (which any digital system is stuck with). We use the term Quantisation Noise but it's really Quantisation Distortion, for instance (programme dependent and not due to hot electrons). It's just that your average programme material produces a very noise-like distortion which sounds gritty for low frequency low amplitude signals.
 
  • Like
Likes .Scott and hutchphd
  • #22
tech99 said:
Sampling will double the frequency spectrum required for an analogue signal,
When you sample a signal, you are basically modulating the sampling waveform with the input signal. The sampling waveform may have a very wide spectrum - or not. If you amplitude modulate a carrier, the total spectrum will be twice that of the baseband signal (two sidebands). That's the price you pay for being able to use Radio in its simplest form. But, of course, you actually only need to send one sideband (and no carrier) if you use the appropriate modulator and demodulator, so no extra bandwidth needed. Sampling (and then simple digitally coding) a signal will also have a spectral penalty if that's all you do but with appropriate coding and modulation, you can squeeze the original signal into less spectrum space (digital TV allows dozens of channels in the space taken up by just four or five analogue channels). Analogue transmission 'wastes' a vast amount of capacity because of the implicit amount of information that describes a single varying voltage of the signal is greater than actually needed. Definition of Information as in Shannon's signalling theories is not the same as the information in an analogue signal.
Digitising opened up a way of making a much better use of the radio waves.
 
  • Informative
Likes hutchphd
  • #23
fog37 said:
The graphical pixel of a bitmap image always occupies multiple physical pixels of the screen.
Download this 6200x6200 Hubble Deep Field Image: https://svs.gsfc.nasa.gov/30946
Then open it up and zoom out so that the entire image fits on your screen.
You will find that there are about 15 image pixels per screen pixel.
 
  • Like
Likes sophiecentaur, hutchphd, fog37 and 1 other person
  • #24
Drakkith said:
Download this 6200x6200 Hubble Deep Field Image: https://svs.gsfc.nasa.gov/30946
Then open it up and zoom out so that the entire image fits on your screen.
You will find that there are about 15 image pixels per screen pixel.
How long is a piece of string?
I always say “never make generalizations.”.
 
  • #25
sophiecentaur said:
How long is a piece of string?
I always say “never make generalizations.”.
I'm not sure what you mean, Sophie.
 
  • #26
Drakkith said:
I'm not sure what you mean, Sophie.
He means he's still using his 640x480 VGA screen. :oldbiggrin:
(which makes 15:1 off by an order-of-magnitude)
 
  • Like
  • Haha
Likes sophiecentaur and russ_watters
  • #27
DaveC426913 said:
He means he's still using his 640x480 VGA screen. :oldbiggrin:
(which makes 15:1 off by an order-of-magnitude)
Yes, I should have clarified that I did the math for a 1920x1080 display.
 
  • Like
Likes russ_watters
  • #28
Drakkith said:
I'm not sure what you mean, Sophie.
It was just that there were two posts making the opposite generalisations. Both situations can occur so the 'length of the piece of string' will depend on the circs.
Sorry for being obscure.
 
  • #29
DaveC426913 said:
He means he's still using his 640x480 VGA screen. :oldbiggrin:
(which makes 15:1 off by an order-of-magnitude)
Or perhaps using my 4K monitor to display the first picture I ever took on a mobile phone.
 
  • #30
tech99 said:
It is noticeable that B/W analogue TV does not use pixelation along a line, so there is no sampling going on, whereas in the vertical direction we have sampling, so the highest spatial frequency in the vertical direction is half the number of lines.
First, I will use the term "pixelation" as you just did - although it's important to note that this is not how it is being used in the rest of this thread.

All common TV camera's create horizontal pixelation except for vidicon tubes. I am excluding the original mechanical scanners as being "uncommon".

Since this is an interlaced signal, the highest spatial frequency in the vertical direction is more specifically: half the number of lines in a frame (in contrast to a field).
 
  • Like
Likes sophiecentaur
  • #31
.Scott said:
All common TV camera's create horizontal pixelation
I'd say it's more like Sampling. "Pixellation" only applies to 2D data and TV moves, so the temporal requirements are very relevant. If they wanted to just increase the resolution, they could slow the horizontal scan rate and use more lines - which would make movement even more jerky and flickery.
This is one of those topics that is very hard to keep on the rails of 'one point at a time'.
 
  • #32
sophiecentaur said:
The speed of a convoy is the speed of the slowest ship.
I'll open up Pandora's box a bit.
When analyzing the effects of image capture, transmission, storage, retrieval, processing, and viewing, heavy use is made of the spatial frequency domain. In essence, each spatial frequency is a separate "convoy" - unless you want to open the Box all the way.

This is all grist for a course in Digital Signal processing - which I suspect both of us have taken.
 
  • Like
Likes pbuk

FAQ: Pixelation of bitmap images (pixel size, pixel density, resolution)

What is pixelation in bitmap images?

Pixelation is the visual effect that occurs when a bitmap image is enlarged beyond its original resolution, causing individual pixels to become visible and creating a blocky, low-quality appearance.

How is pixel size related to pixelation?

Pixel size refers to the physical dimensions of a pixel in an image. The larger the pixel size, the more visible they will be when the image is enlarged, resulting in a more pixelated appearance.

What is pixel density and how does it affect pixelation?

Pixel density is the number of pixels per unit of physical measurement in an image, typically measured in pixels per inch (PPI). Higher pixel density means more pixels are packed into a smaller area, resulting in a higher quality image with less pixelation when enlarged.

How does resolution impact pixelation?

Resolution refers to the total number of pixels in an image, typically measured in width x height. The higher the resolution, the more pixels are available to create a smooth, detailed image, reducing the likelihood of pixelation when enlarged.

Can pixelation be fixed in a bitmap image?

While it is possible to reduce the appearance of pixelation in a bitmap image through image editing software, it is not possible to completely remove it without sacrificing image quality. It is best to use high-resolution images to avoid pixelation in the first place.

Similar threads

Back
Top