Astronomy Python - Hubble Ultra Deep Field - Invert Colors

 In Astronomy, while studying Deep Field images, it would be necessary to invert the color of the image, to find out the object with a lesser magnitude.

Deep Field images contains 10,000 of galaxies or stars with varying magnitudes.

Below is the original image(left) and color inverted image(right).


Image credit-NASA, ESA, and S. Beckwith (STScI) and the HUDF Team

Below is the short  python code used.

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

import cv2

image = cv2.imread("E:\\astronomy_related\\invert_image_colors\\HUD.jpg", 0)

inverted_image = cv2.bitwise_not(image)

cv2.imwrite("E:\\astronomy_related\\invert_image_colors\\HUD_inverted.jpg", inverted_image )

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

Credits-

Image Credit- NASA, ESA, and S. Beckwith (STScI) and the HUDF Team

https://esahubble.org/images/heic0406a/

code credit-

https://www.delftstack.com/howto/python/opencv-invert-image/




Comments

Popular posts from this blog

Astronomy Python - Crab Nebula - Combine RGB channel images into One Image

Python code to fetch Eta Carinae nebula FITS image and Display

Smart Telescopes - Interesting videos from Youtube.