i write a c# console to invoke this dll. it works well. but when i invoke this dll in gh , it makes rhino crash.
here is my c++code.
array<int>^ SAP::recogMarkerID(System::String ^path)
{
std::string p = msclr::interop::marshal_as<std::string>(path);
cv::Mat img = cv::imread(p, 1);
std::vector<cv::Point2f> pts;
std::vector<int> IDD;
std::vector<int> IDDD;
cSAp->recogMarkers(img, pts, IDD);
std::vector<int> coordinates;
if (pts.size() != 0)
{
for (size_t i = 0; i < IDD.size(); i++)
{
coordinates.push_back(IDD[i]);
}
}
array<int>^cc = gcnew array<int>(coordinates.size()+1);;
for (size_t i = 0; i < coordinates.size(); i++)
{
cc[i] = coordinates[i];
}
cc[coordinates.size()] = -1;
return cc;
}
and this how i invoke in c# or gh
float[] p = new float[1];
p = SS.recogMarker(path);