You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.1 KiB

  1. //----------------------------------------------------------------------------
  2. // Copyright (C) 2004-2012 by EMGU. All rights reserved.
  3. //----------------------------------------------------------------------------
  4. using System;
  5. using Emgu.Util;
  6. namespace Emgu.CV.ML
  7. {
  8. /// <summary>
  9. /// A statistic model
  10. /// </summary>
  11. public abstract class StatModel : UnmanagedObject
  12. {
  13. /// <summary>
  14. /// Save the statistic model to file
  15. /// </summary>
  16. /// <param name="fileName">The file name where this StatModel will be saved</param>
  17. public void Save(String fileName)
  18. {
  19. MlInvoke.StatModelSave(_ptr, fileName, IntPtr.Zero);
  20. }
  21. /// <summary>
  22. /// Load the statistic model from file
  23. /// </summary>
  24. /// <param name="fileName">The file to load the model from</param>
  25. public void Load(String fileName)
  26. {
  27. MlInvoke.StatModelLoad(_ptr, fileName, IntPtr.Zero);
  28. }
  29. /// <summary>
  30. /// Clear the statistic model
  31. /// </summary>
  32. public void Clear()
  33. {
  34. MlInvoke.StatModelClear(_ptr);
  35. }
  36. }
  37. }