Department of Electronics and Communication Engineering School of Engineering and Technology Digital Image Processing CIA-1_COMPONENT-1 Report Submitted by Parthasarathy M (2062629) from 7BTELCS Of B. Tech Electronics and Computer Engineering [with specialization in AI &ML] 1 Extraction of properties of stars in an astronomical image Aim The aim of this project is to detect and measure the properties of stars in an astronomical image. Objective: The objective is to implement an image processing technique using MATLAB that can identify and mark the stars in an image. Further, it aims to extract and display the properties of these detected stars, such as their locations and areas. Tool: For my image processing project, I utilized MATLAB Online, which provided a convenient and accessible software environment for my work. Methodology The methodology involves several steps: 1. Image Acquisition: This involves loading an astronomical image into the MATLAB environment for processing. 2. Preprocessing: If the image is in color, it's converted to grayscale since color information is not necessary for star detection in this scenario. 3. Normalization: The grayscale image is converted to double precision and normalized to a range between 0 and 1. This enhances contrast and ensures consistent processing regardless of the original image's scale. 4. Star Detection: The processed image is subjected to a local maximum detection operation. This operation identifies all local maxima in the image, which are likely candidates for stars, given that stars are generally brighter than their immediate surroundings. 2 5. Measurement: The connected components (potential stars) are measured for their properties. The properties extracted include their central coordinates (Centroid), areas, and perimeters. 6. Display The original image is displayed with the detected stars marked on it. This serves as a visual confirmation of the star detection process. MATLAB Script %Image Processing toolbox installed in MATLAB. % First, read an astronomical image img = imread('stars.png'); % Convert to grayscale image if it's not if size(img, 3) == 3 img = rgb2gray(img); end % Display the image figure, imshow(img), title('Original Image'); % Convert the image to double precision, and normalize it img = im2double(img); img = (img - min(img(:))) / (max(img(:)) - min(img(:))); % Find local maxima (stars should appear as local maxima) localMax = imextendedmax(img, 0.5); % Adjust the 0.5 threshold as needed % Display the local maxima figure, imshow(localMax), title('Local Maxima'); % Measure properties of the connected components (the stars) cc = bwconncomp(localMax); stats = regionprops('table',cc,'Centroid','Area','Perimeter'); % Display the centroid locations of the detected stars figure, imshow(img), hold on, title('Detected Stars'); scatter(stats.Centroid(:,1), stats.Centroid(:,2), 'r'); Result We can identify the stars in an astronomical image and extract their properties. The effectiveness of this method may vary depending on the quality and characteristics of the 3 input image. For complex images or advanced applications, more sophisticated image processing techniques may be required. Conclusion Image processing is a powerful tool in astronomy, enabling automated analysis of vast amounts of data. While this project presents a simple example, similar techniques are used in real-world applications, often with much more complexity and sophistication. As astronomical imaging technology continues to advance, image processing techniques will continue to play a crucial role in unlocking new discoveries about the universe. Input: The input would be an astronomical image, ideally containing numerous stars against a dark background. For example, you might have a black and white image of a portion of the night sky, filled with tiny white dots representing various stars and other celestial bodies. Output: The output would be the same image with the detected stars highlighted. The highlighting could be done in various ways—in this case, the code specifies that detected stars are marked with red dots at their centroids. So, your output would be the same black and white image of the night sky, but with red dots marking the identified stars. 4