Hi everyone!
I'm pretty new to C#, as I used to program in VB and VB.NET in the past (migration to C# is pretty easy I have to say).

I'm also into astrophotography and I'm developing a program to focus the telescope. A way to focus is to use a Bahtinov mask, that makes a particular diffraction pattern composed by an X and a line that moves up and down. The mask goes in front of the telescope and, when focus is close, here's what it is possible to see:

With perfect focus here's the pattern:

The aim of my program is to detect the X and the line, overlap lines highlight the pattern and calculate some sort of index by measuring the distance between the center of the X and the line. Basically here's what I want to achieve if the input is composed by the 2 pictures above:



Here's how my program works:
- Using Canon SDK libraries I get a snapshot from the camera (I haven't implemented this yet, as for my tests I'm using pictures I have);
- I have developed a class to apply convolution and threshold on the image to filter the data in the snapshot;
- Using AForge I detect the biggest blob (which should be the diffraction pattern);
- I detect the X and the line and overlap new lines.

The problem I how to implement the last point of my list. With AForge I can select the quadrilateral around the pattern, but I have no idea about how to detect the parts of the pattern.
Can anybody halp me with that?

Thank you!