how to remove stars (background stars) from image?

8 views (last 30 days)
124.JPG
i want to remove stars from above image.
  7 Comments
Walter Roberson
Walter Roberson on 23 Apr 2019
The requirement expressed is to remove "stars". We as outside observers without information about how the image was created, do not know what parts of the image are "stars" and which are not stars. So we have to apply our knowledge of what stars are and how they show up in images.
What do we know about stars? This: that stars have an absolute brightness separate from an apparent brightness, and therefore we cannot rely upon the brightness of dots as the only measure to determine whether any particular dot is a star or not.
The task of removing the stars would be pointless if the only thing in the image is stars -- the task would reduce down to making the entire image black. We have two possibilities at this point:
  1. That everything or nearly everything in the image is stars and the wrong question has been asked; or
  2. That there are non-stars in the image that are either shining or reflecting light. The nature of these objects is unknown to us, and their inherent brightness or the inherent brightness that they are reflecting to us is unknown to us.
These non-stars in the image: are they at a fixed distance and known range of inherent brightness and is it known that there are no dust clouds scattering the light, such that we can calculate a range of aparent brightness of the non-stars and then tentatively filter leaving only that range of brightnesses, which is a method that might accidentally leave in some stars that happen to have an apparent brightness in that band of brightnesses ?
Because if they are not at a fixed distance, then we have to assume that some of them are potentially close enough as to appear bright, possibly brighter than some of the stars.
Or is it a composite image, in which stars and non-stars were carefully blended together into a single image, and the task is to somehow figure out which are the stars and which are the non-stars?
Is the same field of view available in spectrogram form so that we can examine relative portions of elements based upon their ionization lines, and use that to deduce which pixels correspond to stars (each star class has a known elemental distribution range)?
Is the same field of view available in radio frequency form, that we could analyze to figure out which pixels correspond to stars and which correspond instead to ionized gas such as planetary nebula?
When I look at the image, it looks to me as if it is a modestly high angle telescopic image, possibly of one of the Constellations. If so, then nearly everything in the image is likely to be stars or galaxies or galactic clouds, as the magnification does not appear to be enough to bring out planetary nebula or highly energetic gas clouds -- and certainly not brown dwarfs ("failed stars" are, by definition, not stars.)

Sign in to comment.

Accepted Answer

KALYAN ACHARJYA
KALYAN ACHARJYA on 23 Apr 2019
Here forced all pixels (those all pixels having more than 150) to zero(black)
You can edit the as per your requirements-
im1=imread('star_image.jpeg');
im2=rgb2gray(im1);
idx=find(im2>150);
im2(idx)=0;
imshow(im2);
777.png
Is this you are looking for?
Please accept the answer, only if the answered is as per your question.

More Answers (1)

Uday Kumar
Uday Kumar on 7 Oct 2019
Error using rgb2gray>parse_inputs (line 80)
MAP must be a m x 3 array.
Error in rgb2gray (line 52)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!