foreach (string filepath in imageFiles)
{
string fileName = System.IO.Path.GetFileNameWithoutExtension(filepath);
try
{
string[] nameNum = fileName.Split('_');
Mat mat = CvInvoke.Imread(filepath);
Matrix mat2 = new Matrix(mat.Rows, mat.Cols);
mat.ConvertTo(mat2, DepthType.Cv64F);
list[int.Parse(nameNum[1])][int.Parse(nameNum[1])] = mat2;
}
catch (ReflectionTypeLoadException ex)
{
foreach (Exception inner in ex.LoaderExceptions)
{
MessageBox.Show(inner.Message);
// write details of "inner", in particular inner.Message
}
throw;
}
< /code>
Это мой код для WPF, я Тринг, чтобы прочитать некоторые файлы изображений, используя emugcv.
при запуске mat mat = cvinvoke.imread (filepath); < /code>
это происходит < /p>
System.Reflection.ReflectionTypeLoadException:
“Unable to load one or more of the requested types.
Could not load file or assembly 'NationalInstruments.NiLmClientDLL,
Version=17.5.40.49152, Culture=neutral, PublicKeyToken=dc6ad606294fc298'.
Честно говоря, я не понимаю, почему эта ошибка связана с национальными частями, и я не знаю, как это исправить.>
[code]foreach (string filepath in imageFiles) { string fileName = System.IO.Path.GetFileNameWithoutExtension(filepath); try { string[] nameNum = fileName.Split('_'); Mat mat = CvInvoke.Imread(filepath); Matrix mat2 = new Matrix(mat.Rows, mat.Cols); mat.ConvertTo(mat2, DepthType.Cv64F);
list[int.Parse(nameNum[1])][int.Parse(nameNum[1])] = mat2; } catch (ReflectionTypeLoadException ex) { foreach (Exception inner in ex.LoaderExceptions) { MessageBox.Show(inner.Message); // write details of "inner", in particular inner.Message } throw;
} < /code> Это мой код для WPF, я Тринг, чтобы прочитать некоторые файлы изображений, используя emugcv.
при запуске mat mat = cvinvoke.imread (filepath); < /code>
это происходит < /p> System.Reflection.ReflectionTypeLoadException: “Unable to load one or more of the requested types.
Could not load file or assembly 'NationalInstruments.NiLmClientDLL, Version=17.5.40.49152, Culture=neutral, PublicKeyToken=dc6ad606294fc298'. [/code] Честно говоря, я не понимаю, почему эта ошибка связана с национальными частями, и я не знаю, как это исправить.>