2

我们正在从事一个涉及使用 EMGU 的项目,特别是 OpenCV 的 SVM 功能,我们在 Ubuntu 平台上使用 Mono 时遇到问题,而在 Windows 上没有这个问题。当我们调用 Emgu.CV.ML.SVM.Train 方法时,问题就出现了。所有参数都是正确的,我们无法调试包装的代码......

我们试图增加共享内存和其他技巧,但它不起作用。你有什么主意吗?谢谢安杰洛

Unhandled Exception: Emgu.CV.CvException: OpenCV: requested size is negative or too big
  at Emgu.CV.CvInvoke.CvErrorHandler (Int32 status, System.String funcName, System.String errMsg, System.String fileName, Int32 line, IntPtr userData) [0x00000] 
  at (wrapper native-to-managed) Emgu.CV.CvInvoke:CvErrorHandler (int,intptr,intptr,intptr,int,intptr)
  at (wrapper managed-to-native) Emgu.CV.ML.MlInvoke:CvSVMTrain (intptr,intptr,intptr,intptr,intptr,Emgu.CV.ML.Structure.MCvSVMParams)
  at Emgu.CV.ML.SVM.Train (Emgu.CV.Matrix`1 trainData, Emgu.CV.Matrix`1 responses, Emgu.CV.Matrix`1 varIdx, Emgu.CV.Matrix`1 sampleIdx, Emgu.CV.ML.SVMParams parameters) [0x00000] 
  at Segmentation.ImageFeatures.LeafHog.TrainModel (IDictionary`2 dicInOutImage) [0x00000] 
  at Segmentation.ImageSegmentators.Composite.TrainModel (IDictionary`2 dicInOutImage) [0x00000] 
  at Segmentation.ImageSegmentators.CompositionMlpRprop.TrainModel (IDictionary`2 dicInOutImage) [0x00000] 
  at Segmentation.GeneticConfig.ChromoCreator.GetASegmentation (IConfigChromosome configChromosome, IDictionary`2 dicInOutImageTrain) [0x00000] 
  at Segmentation.GeneticConfig.ConfigChromoProvider.AddChromosomeIfNew (IConfigChromosome chromo) [0x00000] 
  at Segmentation.GeneticConfig.ConfigChromosome.Generate () [0x00000] 
  at Segmentation.GeneticConfig.ConfigChromosome..ctor (Int32 chromoLength, IConfigChromoProvider cProvider) [0x00000] 
  at Segmentation.GeneticConfig.ConfigChromosome.CreateNew () [0x00000] 
  at AForge.Genetic.Population..ctor (Int32 size, IChromosome ancestor, IFitnessFunction fitnessFunction, ISelectionMethod selectionMethod) [0x00000] 
  at SegmentationCLI.Program.Main (System.String[] args) [0x00000] 
4

0 回答 0