How Spatial Resolution of a Digitized Image is Different from Brightness Resolution in MATLAB?


MATLAB is an efficient tool to process and manipulate digital images. In MATLAB, a digital image is specified as a two-dimensional matrix where the elements of the matrix represent the pixel intensity of the image. When the pixel intensity of a digital image is represented as a 2D matrix, then it is known as spatial domain. For any digital image specified in 2D matrix form or spatial domain, there is a term 'spatial resolution' which describes how sharply we can see the objects in the image.

Also, there is another term 'brightness resolution' which describes pixel intensity of the image. In this tutorial, I will explain how the spatial resolution is different from brightness resolution in the case of a digital image. Here, I will also explain both types of resolutions of a digital image individually with the help of example programs in MATLAB programming.

What is Spatial Resolution of a Digital Image?

Spatial resolution is a piece of information about a digital image that describes how clearly, we can see the objects in the image. The spatial resolution of a digital image is measured in terms of pixels per unit area like pixels per cm.

In a digital image which has high spatial resolution, we can see the objects more clearly. For example, a digital image which has a spatial resolution of 720 x 300 will depict objects less clear as compared to a digital image having a spatial resolution of 1920 x 1080. Here, the first number, i.e. 720 or 1920 represents the spatial resolution in width and the second number, i.e. 300 or 1080 represents the spatial resolution in height.

Therefore, the spatial resolution of an image can be easily changed by changing the size of the image.

Example

The following MATLAB program demonstrates how we can change the spatial resolution of an image.

% MATLAB program to change the spatial resolution of a digital image
% Read the input image
img = imread('https://www.tutorialspoint.com/assets/questions/media/14304-1687425236.jpg');

% Change spatial resolution of the image 
reduced_image = imresize(img, 0.5);
bigger_image = imresize(img, 1.5);

% Display the input, reduced, and bigger images
subplot(1, 3, 1); imshow(img); title('Input Image');
subplot(1, 3, 2); imshow(reduced_image); title('Reduced Image');
subplot(1, 3, 3); imshow(bigger_image); title('Bigger Image');

Output

Explanation

In this MATLAB example, the input image is our original image which has its default spatial resolution. The second image 'Reduced Image' has a spatial resolution reduced by 50% of the original image. The third image 'Bigger Image' has a spatial resolution 50% greater than that of the original image.

Therefore, when observe these three images, we will find that the second image depicts its objects less clearly as compared to the original image, while the third image having higher spatial resolution will depict the objects more clearly as compared to the original image.

This is how the spatial resolution of a digital image plays a vital role in digital images and we can change the spatial resolution of an image using MATLAB programming as highlighted in the above example.

Let us now discuss about the brightness resolution of a digital image.

What is Brightness Resolution of a Digital Image?

Brightness resolution of a digital image is the measure of light or luminous intensity in the image. In other words, a 2D matrix that describes the intensity level of pixels of a digital image is called brightness domain and the resolution which describes the luminous intensity of an image is called brightness resolution.

As the spatial resolution directly defines the quality of an image, on the other hand, the brightness does not impact the quality of the image. Brightness resolution just describes the pixel intensities of an image.

Similar to spatial resolution, we can also use MATLAB to change the brightness resolution of a digital image. The following MATLAB code explains how we can change the brightness resolution of an image.

Example

% MATLAB program to change brightness resolution of an image
% Read the input image
img = imread('https://www.tutorialspoint.com/assets/questions/media/14304-1687425236.jpg');

% Change the brightness to create a darker and a brighter version of the image
dark_img = img - 50;
bright_img = img + 50;

% Display the input, darkened, and brightened images
subplot(1, 3, 1); imshow(img); title('Input Image');
subplot(1, 3, 2); imshow(dark_img); title('Darkened Image');
subplot(1, 3, 3); imshow(bright_img); title('Brightened Image');

Output

Explanation

In this example, we can observe the differences among the output images.

After getting enough knowledge about spatial resolution and brightness resolution, let us now discuss the differences between them.

Difference between Spatial Resolution and Brightness Resolution

The key differences between spatial resolution and brightness resolution of a digital image are listed in the following table:

Parameter

Spatial Resolution

Brightness Resolution

Definition

The spatial resolution is the parameter that describes the clarity level of a digital image in terms of pixels per unit area of the image.

The brightness resolution is the parameter that describes the intensity levels of pixels of a digital image.

Role

Spatial resolution provides information about sharpness of the image.

Brightness resolution provides information about accuracy of different shades of intensities.

Unit of measurement

Pixels per unit area like pixels per cm is used to describe the spatial resolution of a digital image.

Brightness resolution of a digital image is measured in bits, such as 16-bits.

Relation with image quality

Spatial resolution defines the quality of a digital image.

Brightness resolution is not related to image quality, but it improves the appearance of the image.

Image enhancement

Spatial resolution enhances a digital image by increasing the number of pixels per unit area of the image.

Brightness resolution enhances an image by increasing the intensity levels or bit depth of the image.

MATLAB techniques

In MATLAB, the spatial resolution of a digital image can be changed by resizing or resampling the image

In MATLAB, the brightness resolution can be changed by using histogram equalization.

Applications

Spatial resolution is used to scientific and medical image, microscopy, etc. where fine detailed image is required

Brightness resolution is important in general photography and graphics design applications.

Conclusion

In this tutorial, we explained the concept of spatial resolution and brightness resolution of digital images and how to change these resolutions using MATLAB. Here, we also listed the key differences between spatial resolution and brightness resolution.

In conclusion, the spatial resolution of a digital image is related to clarity of the image, whereas brightness resolution is related to pixel intensities of the image.

Updated on: 07-Sep-2023

111 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements