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

  • Thread starter fog37
  • Start date
  • #1
1,282
85
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!
 

Answers and Replies

  • #2
anorlunda
Staff Emeritus
Insights Author
9,812
6,930
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
DaveC426913
Gold Member
20,009
3,278
When enlarging a bitmap image, are the graphical pixels enlarged?
The short answer is yes.
 
  • #4
1,282
85
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
hutchphd
Science Advisor
Homework Helper
3,574
2,751
You need to understand Moire patterns. Look it up.
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
russ_watters
Mentor
21,017
7,709
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.
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.
Does the size of the pixels on the screen ever play a role?
No.
 
  • #7
sophiecentaur
Science Advisor
Gold Member
2020 Award
26,545
5,575
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.
 
  • #8
1,282
85
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
anorlunda
Staff Emeritus
Insights Author
9,812
6,930
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
sophiecentaur
Science Advisor
Gold Member
2020 Award
26,545
5,575
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).
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
hutchphd
Science Advisor
Homework Helper
3,574
2,751
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
sophiecentaur
Science Advisor
Gold Member
2020 Award
26,545
5,575
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.
 
  • #13
russ_watters
Mentor
21,017
7,709
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
sophiecentaur
Science Advisor
Gold Member
2020 Award
26,545
5,575
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
gmax137
Science Advisor
2,004
1,376
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
sophiecentaur
Science Advisor
Gold Member
2020 Award
26,545
5,575
Yep. Just like a noil painting!
 
  • #17
tech99
Gold Member
2,231
860
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
hutchphd
Science Advisor
Homework Helper
3,574
2,751
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
sophiecentaur
Science Advisor
Gold Member
2020 Award
26,545
5,575
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.
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.
 
  • #20
tech99
Gold Member
2,231
860
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
sophiecentaur
Science Advisor
Gold Member
2020 Award
26,545
5,575
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
sophiecentaur
Science Advisor
Gold Member
2020 Award
26,545
5,575
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.
 
  • #23
Drakkith
Staff Emeritus
Science Advisor
21,304
5,145
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
sophiecentaur
Science Advisor
Gold Member
2020 Award
26,545
5,575
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
Drakkith
Staff Emeritus
Science Advisor
21,304
5,145
How long is a piece of string?
I always say “never make generalizations.”.
I'm not sure what you mean, Sophie.
 

Related Threads on Pixelation of bitmap images (pixel size, pixel density, resolution)

  • Last Post
Replies
9
Views
4K
  • Last Post
Replies
3
Views
2K
Replies
3
Views
21K
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
16
Views
2K
  • Last Post
Replies
2
Views
765
Replies
17
Views
2K
  • Last Post
Replies
3
Views
7K
Top