我正在尝试从另一张图像中减去1张图像,类似于这样:
Image<Gray, float> result, secondImage;
Image<Gray, byte> firstImage;
result = firstImage - secondImage;
但是它会出现错误。
Operator '-' cannot be applied to operands of type 'Emgu.CV.Image<Emgu.CV.Structure.Gray,byte>' and 'Emgu.CV.Image<Emgu.CV.Structure.Gray,float>'
也许我需要先将firstImage转换为
Image<Gray, float>
类型。但我不知道该怎么做。