Lab 1 Dip
Lab 1 Dip
#PART D
We are working with a TIFF file (mandril_gray.tif), which is a lossless format.
Therefore, image is most likely lossless, meaning there is no data loss due to
compression, and the image retains all of its original quality.
plt.axis('off')
# Red channel
plt.subplot(2, 2, 2)
plt.imshow(R, cmap='gray')
plt.title('Red Channel')
plt.axis('off')
# Green channel
plt.subplot(2, 2, 3)
plt.imshow(G, cmap='gray')
plt.title('Green Channel')
plt.axis('off')
# Blue channel
plt.subplot(2, 2, 4)
plt.imshow(B, cmap='gray')
plt.title('Blue Channel')
plt.axis('off')
plt.show()
#PART C:
The Red, Green, and Blue channels represent the intensity of their respective colors
in the image. Brighter areas in each channel indicate stronger color intensity, while
darker areas show less or no presence of that color. Each channel is visualized in
grayscale, highlighting how much red, green, or blue contributes to the original image.
UNIVERSITY OF ENGINEERING AND TECHNNOLOGY, TAXILA
DEPARTMENT OF ELECTRICAL ENGINEERING
plt.axis('off')
plt.tight_layout()
plt.show()
UNIVERSITY OF ENGINEERING AND TECHNNOLOGY, TAXILA
DEPARTMENT OF ELECTRICAL ENGINEERING