I am trying to implement an edge detection method. Since it is impossible to copy here all lines I have copied just related codes. When I compile, I get this error:
Unable to cast object of type ‘Emgu.CV.Structure.Gray’ to type ‘System.IConvertible’.
I have already searched it but I couldn’t find something useful.
Is there any way to convert MyImage from Gray to Double?
Thanks in advance
Image<Gray,Byte> MyImage = null;
public Gray input_i(int x, int y, int z)
{
Gray input;
input = MyImage[x,y];
return input;
}
result[I] += hueckel_func.HueckelDisk(point_x, point_y, I) * Convert.ToDouble(input_i(point_a, point_b, I));
Just get the
Intensityproperty, it’s already adouble: