Allow me to start with the same image you have supplied op.jpg
close all;clc;clear all
Attached both start image and script to help reproduce result.
2. Amplify the image to avoid some too close stars overlapping and then alias would happen
3. Green minus Blue shows a good response to blur a bit the starts yet keeping sharpness of each peak
4. Comment, at this point imcontrast can be used to show what range of pixel values are most useful
instead one can manually perform the same pixel selection without imcontrast
5. Reducing the size of the image a bit to save time i next step finding 2D peaks
Use Natan's function FastPeakFind.m available here:
figure(5);imagesc(A2); hold on
FastPeakFind returns a single file list of coordinates that are the [x y] coordinates interleaved, to obtain the paired coordinates:
The amount of stars found is:
if you find this answer useful would you please be so kind to consider marking my answer as Accepted Answer?
To any other reader, if you find this answer useful please consider clicking on the thumbs-up vote link
thanks in advance for time and attention
A couple additional comments:
9.1. tried *imfindcircles* but all tested parameters did not return any result as close as the previous steps.
[centers, radii, metric] = imfindcircles(A21,[8 15],'ObjectPolarity','bright','Sensitivity',.94);
[centers, radii, metric] = imfindcircles(A21,[15 31],'Method','PhaseCode','ObjectPolarity','bright','Sensitivity',.94);
9.2. tried *findpeaks2.m* available from here:
2 minutes waiting and still busy.
radiiStrong5 = radii(1:5);
metricStrong5 = metric(1:5);