Astronomy Python - Mars Planet Surface - Creating Sharpen Image from Blur Image

  In Astronomy, sometimes the images send by satellite/telescope could be Blur and one would be interested to make the image Sharpe.

The Kernel (it is matrix representation) is to process the image -from Blur image to Sharpe Image.

Convolution Matrix, Mask, Matrix/Array are the other names given to the Kernel.

                          Below is the example of Mars Surface Blur Image

Image Credit: NASA/JPL-Caltech

Below is the processed image which has now become Sharpe Image 




Please  open both images to see the effect.7Below is the python code used.

******************************************************************

# load the required packages

import cv2

import numpy as np


# load the image into system memory

image = cv2.imread('E:\\astronomy_related\\blurr_to_clear_image\\marssurface_blurr.jpg', flags=cv2.IMREAD_COLOR)


# display the blurr image to the screen

cv2.imshow('Mars Surface blurr', image)

cv2.waitKey()

cv2.destroyAllWindows()


# display the sharpen image based on below kernel

kernel = np.array([[0, -1, 0],

                   [-1, 5,-1],

                   [0, -1, 0]])

image_sharp = cv2.filter2D(src=image, ddepth=-1, kernel=kernel)

cv2.imshow('Mars Surface Sharpened', image_sharp)

cv2.waitKey()

cv2.destroyAllWindows()

*************************************************************

Credits

code credit-

https://www.analyticsvidhya.com/blog/2021/08/sharpening-an-image-using-opencv-library-in-python/

Image Credit: NASA/JPL-Caltech/ASU

Mars Perseverance Sol 696: Left Mastcam-Z Camera. NASA's Mars Perseverance rover acquired this image using its Left Mastcam-Z camera. Mastcam-Z is a pair of cameras located high on the rover's mast.This image was acquired on Feb. 3, 2023 (Sol 696) at the local mean solar time of 11:26:37.

https://mars.nasa.gov/mars2020-raw-images/pub/ods/surface/sol/00696/ids/edr/browse/zcam/ZR0_0696_0728723655_223EBY_N0330000ZCAM03533_1100LMJ01_800.jpg



Comments

Popular posts from this blog

Astronomy Python - Webb's First Deep Field - Marking the Edges of the Galaxies

Online Observatory for Meteor Scatter Detection - Radio Astronomy.