Hi my apologise for a late response but in case you haven't figured this
out yet I thought I'd give you an answer.
The section of code that draws the lines on the image is:
#region draw lines between the matched features
foreach (SURFTracker.MatchedSURFFeature matchedFeature in matchedFeatures)
{
PointF p = matchedFeature.ObservedFeature.Point.pt;
p.Y += modelImage.Height;
res.Draw(new LineSegment2DF(matchedFeature.SimilarFeatures[0].Feature.Point.pt, p), new Gray(0), 1);
}
#endregion
This "foreach" loop repeats for all the features matched in the image therefore the the size of "matchedFeatures" which is an array is the number of matches and lines to be drawn (Please note the s on the end of this variable). We can assign this value to a integer.
int num_lines = matchedFeatures.Length;
Now if you wish to display the number of lines to a label then you will have to re-create the project with windows form controls and display the result image in a picture box. You can the convert to num_lines integer to a string (num_lines.toString()).
To save you some time I have used the Hello world example as reference to draw the result on the black box left unused to the right of the results. At the end of your code copy and paste this:
int num_lines = matchedFeatures.Length;
MCvFont f = new MCvFont(FONT.CV_FONT_HERSHEY_COMPLEX, 1.0, 1.0);
res.Draw(num_lines.ToString(),ref f,new System.Drawing.Point(400, 100), new Gray(255));
ImageViewer.Show(res, String.Format("Matched in {0} milliseconds", watch.ElapsedMilliseconds));
NOTE This is already the last line in the example code.
ImageViewer.Show(res, String.Format("Matched in {0} milliseconds", watch.ElapsedMilliseconds));
What I am doing here is drawing the results directley onto the resultant image stored in the variable "res". An easy cheat way to quickly display your results, your answer should be 35.
Cheers
Chris