I created this type:
public class ImageHolder :Image<Bgr,byte>
{
private String imagePath;
public ImageHolder(String path):base()
{
this.imagePath = path;
}
public String imgPathProperty
{
get
{
return imagePath;
}
set
{
imagePath = value;
}
}
}
Here is the instance of the class:
ImageHolder sd = new ImageHolder("path");
I need to get the base type of SignDetection type.
Image<Bgr,Byte> img = sd.BaseType;
Any idea how can I implement it?
Thank you in advance.
You don’t need to cast to “the base type”. Your
ImageHolderinstance is also anImage<Bgr,Byte>instance, so:Image<Bgr,Byte> img = sd;