In Astronomy, Image taken by cameras would be based on specific filters(channels)-Red, Green, Blue. Below are the the images taken across 3 channels. Red(Left), Green(Centre), Blue(Right) Original image credit(single image which is not shown here)- Credits: NASA, ESA, J. Hester and A. Loll (Arizona State University) Below is result after combining above 3 channel images Below is the python code used. Original Carb Nebula image is spitted into 3 channels(as shown 3 gray images above) *************************************************** from PIL import Image # Open the red, green, and blue channel images red_channel = Image.open('E:\\astronomy_related\\rbg_one\\red.png') green_channel=Image.open('E:\\astronomy_related\\rbg_one\\green.png') blue_channel =Image.open('E:\\astronomy_related\\rbg_one\\blue.png') # Create a new RGB image result = Image.merge("RGB", (red_channel, green_channel, blue_channel)) # Save the result image result.save('E:\\astr
In Astronomy, there will be needs to extract Images from FITS format file for further analysis or research, Below is the Two steps code for "getting image link" and "fetching & displaying image from the link" The code uses python libraries such as PYVO, Astropy, Matplotlib STEP 1-excute below code to get url of the astronomical object import pyvo as vo from astropy.coordinates import SkyCoord from astropy.units import Quantity pos = SkyCoord.from_name('Eta Carina') #Eta Carina Nebula size = Quantity(0.5, unit="deg") sia_service = vo.dal.SIAService("http://dc.zah.uni-heidelberg.de/hppunion/q/im/siap.xml") sia_results = sia_service.search(pos=pos, size=size) sia_results -------------- its will list all FITS format image from online repository------------ <Table length=8> accref ...
In Astronomy, the image taken by telescopes of deep space field, galaxies, planets may appear to be complex - it may be difficult to find boundaries of objects when objects are too near. Or simply one would like to know the shape of the object. Edge detection technique is used in image processing for finding the boundaries of objects within the image. Edge detection would be very useful while analyzing such difficult images. Below is the sample image taken by James Webb telescope. Image Credits: NASA, ESA, CSA, STScI Below is grey image(left) and edge detection image(right) An edge detection operato r used in the above example is called as Canny edge detector Below is the python code used. ********************************************************************** import cv2 import numpy as np import matplotlib.pyplot as plt # read the image image = cv2.imread("E:\\astronomy_related\\edge_detection\\webb_first_deep_field.jpeg") # convert it to grayscale gray = cv2.cvtColor(ima
Comments
Post a Comment