Image selection tool for lucky imaging

Hi
When we do lucky imaging we get hundred, even thousand, images. When after the sum of the images, we see an airplane or satellite trace in the image it is quite boring to find the faulty image.

Would it be possible to add in the selection image window:

  • a column with FWHM to complete the roundness column
  • a column with a mark to identify image with potentially a line inside.

In order to identify those images, I made a small utility based on OpenCV under C# whose the concepts could be adapted to SIRIL:

  • Gaussian blur of the image
  • Threshold of the image with a threshold (mean + 2 stedDev) to binarize the image
  • Convert image to 8b format
  • Use HoughLinesP function.
  • If the result has a dimension > 0, then line is suspected.

Mat src = new Mat();
double[,] M_img;
OpenCvSharp.LineSegmentPoint[] linesP = new LineSegmentPoint[4];
Mat dst1 = new Mat();
Mat dst = new Mat();
Mat dst2 = new Mat();
double threshold;

M_img = FITSImage.ReadImageArrayOnly(fileEntries[Index], null, false);
src = new Mat(M_img.GetLength(0), M_img.GetLength(1), MatType.CV_64F,M_img);
Cv2.MeanStdDev(src, out mean, out stdDev);
threshold = mean.Val0 + 2 * stdDev.Val0;
Cv2.GaussianBlur(src, dst1, new Size(3, 3), 3);
Cv2.Threshold(dst1, dst, threshold, 65535, ThresholdTypes.Binary);
dst.ConvertTo(dst2, MatType.CV_8U);
linesP = Cv2.HoughLinesP(dst2, 1, Math.PI / 180, 100, 500, 10);
if(linesP.Count() > 0)
Etat = true;
else
Etat = false;

dataGridView.Rows.Add(i, Path.GetFileName(FileName), Etat, linesP.Count());

Best regards

Hi,

regarding adding a column in the sequence list, it would be quite difficult as sorting by one column or the other would not give quite a good grip on selection. Instead,we are currently adding a graphical selection tool to the Plot tab. Just plot FWHM vs roundness and you’ll be able to select the images you want to keep or exclude. See demo below.
Regarding detecting the trails, we are also onto this at the moment, with the exact same algo from opencv :wink: