I think the symbolslist method is in other context, so the glyphValues variable does not exist in it.
You should add as a parameter the glyphValues to the symbolslist method:
public void symbolslist(byte[] glyphValues)
{
resMatching = CheckForMatching(Glyph_1, glyphValues);
if (resMatching != -1)
{
this.Invoke(new MethodInvoker(delegate
{
getidbox.Text = ("1");
checkdatabase();
}));
}
}
And now you can call the method:
if (confidence >= minConfidenceLevel)
{
symbolslist(glyphValues);
ImgRes.Image = glyphImage.ToManagedImage();
ImgRes2.Image = glyphImage.ToManagedImage();
}