TransientAreasSegmentationModule.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. //
  2. // This file is auto-generated. Please don't modify it!
  3. //
  4. #pragma once
  5. #ifdef __cplusplus
  6. //#import "opencv.hpp"
  7. #import "opencv2/bioinspired.hpp"
  8. #import "opencv2/bioinspired/transientareassegmentationmodule.hpp"
  9. #else
  10. #define CV_EXPORTS
  11. #endif
  12. #import <Foundation/Foundation.h>
  13. #import "Algorithm.h"
  14. @class Mat;
  15. @class Size2i;
  16. NS_ASSUME_NONNULL_BEGIN
  17. // C++: class TransientAreasSegmentationModule
  18. /**
  19. * class which provides a transient/moving areas segmentation module
  20. *
  21. * perform a locally adapted segmentation by using the retina magno input data Based on Alexandre
  22. * BENOIT thesis: "Le système visuel humain au secours de la vision par ordinateur"
  23. *
  24. * 3 spatio temporal filters are used:
  25. * - a first one which filters the noise and local variations of the input motion energy
  26. * - a second (more powerfull low pass spatial filter) which gives the neighborhood motion energy the
  27. * segmentation consists in the comparison of these both outputs, if the local motion energy is higher
  28. * to the neighborhood otion energy, then the area is considered as moving and is segmented
  29. * - a stronger third low pass filter helps decision by providing a smooth information about the
  30. * "motion context" in a wider area
  31. *
  32. * Member of `Bioinspired`
  33. */
  34. CV_EXPORTS @interface TransientAreasSegmentationModule : Algorithm
  35. #ifdef __cplusplus
  36. @property(readonly)cv::Ptr<cv::bioinspired::TransientAreasSegmentationModule> nativePtrTransientAreasSegmentationModule;
  37. #endif
  38. #ifdef __cplusplus
  39. - (instancetype)initWithNativePtr:(cv::Ptr<cv::bioinspired::TransientAreasSegmentationModule>)nativePtr;
  40. + (instancetype)fromNative:(cv::Ptr<cv::bioinspired::TransientAreasSegmentationModule>)nativePtr;
  41. #endif
  42. #pragma mark - Methods
  43. //
  44. // Size cv::bioinspired::TransientAreasSegmentationModule::getSize()
  45. //
  46. /**
  47. * return the sze of the manage input and output images
  48. */
  49. - (Size2i*)getSize NS_SWIFT_NAME(getSize());
  50. //
  51. // void cv::bioinspired::TransientAreasSegmentationModule::setup(String segmentationParameterFile = "", bool applyDefaultSetupOnFailure = true)
  52. //
  53. /**
  54. * try to open an XML segmentation parameters file to adjust current segmentation instance setup
  55. *
  56. * - if the xml file does not exist, then default setup is applied
  57. * - warning, Exceptions are thrown if read XML file is not valid
  58. * @param segmentationParameterFile : the parameters filename
  59. * @param applyDefaultSetupOnFailure : set to true if an error must be thrown on error
  60. */
  61. - (void)setup:(NSString*)segmentationParameterFile applyDefaultSetupOnFailure:(BOOL)applyDefaultSetupOnFailure NS_SWIFT_NAME(setup(segmentationParameterFile:applyDefaultSetupOnFailure:));
  62. /**
  63. * try to open an XML segmentation parameters file to adjust current segmentation instance setup
  64. *
  65. * - if the xml file does not exist, then default setup is applied
  66. * - warning, Exceptions are thrown if read XML file is not valid
  67. * @param segmentationParameterFile : the parameters filename
  68. */
  69. - (void)setup:(NSString*)segmentationParameterFile NS_SWIFT_NAME(setup(segmentationParameterFile:));
  70. /**
  71. * try to open an XML segmentation parameters file to adjust current segmentation instance setup
  72. *
  73. * - if the xml file does not exist, then default setup is applied
  74. * - warning, Exceptions are thrown if read XML file is not valid
  75. */
  76. - (void)setup NS_SWIFT_NAME(setup());
  77. //
  78. // String cv::bioinspired::TransientAreasSegmentationModule::printSetup()
  79. //
  80. /**
  81. * parameters setup display method
  82. * @return a string which contains formatted parameters information
  83. */
  84. - (NSString*)printSetup NS_SWIFT_NAME(printSetup());
  85. //
  86. // void cv::bioinspired::TransientAreasSegmentationModule::write(String fs)
  87. //
  88. /**
  89. * write xml/yml formated parameters information
  90. * @param fs : the filename of the xml file that will be open and writen with formatted parameters information
  91. */
  92. - (void)write:(NSString*)fs NS_SWIFT_NAME(write(fs:));
  93. //
  94. // void cv::bioinspired::TransientAreasSegmentationModule::run(Mat inputToSegment, int channelIndex = 0)
  95. //
  96. /**
  97. * main processing method, get result using methods getSegmentationPicture()
  98. * @param inputToSegment : the image to process, it must match the instance buffer size !
  99. * @param channelIndex : the channel to process in case of multichannel images
  100. */
  101. - (void)run:(Mat*)inputToSegment channelIndex:(int)channelIndex NS_SWIFT_NAME(run(inputToSegment:channelIndex:));
  102. /**
  103. * main processing method, get result using methods getSegmentationPicture()
  104. * @param inputToSegment : the image to process, it must match the instance buffer size !
  105. */
  106. - (void)run:(Mat*)inputToSegment NS_SWIFT_NAME(run(inputToSegment:));
  107. //
  108. // void cv::bioinspired::TransientAreasSegmentationModule::getSegmentationPicture(Mat& transientAreas)
  109. //
  110. /**
  111. * access function
  112. * return the last segmentation result: a boolean picture which is resampled between 0 and 255 for a display purpose
  113. */
  114. - (void)getSegmentationPicture:(Mat*)transientAreas NS_SWIFT_NAME(getSegmentationPicture(transientAreas:));
  115. //
  116. // void cv::bioinspired::TransientAreasSegmentationModule::clearAllBuffers()
  117. //
  118. /**
  119. * cleans all the buffers of the instance
  120. */
  121. - (void)clearAllBuffers NS_SWIFT_NAME(clearAllBuffers());
  122. //
  123. // static Ptr_TransientAreasSegmentationModule cv::bioinspired::TransientAreasSegmentationModule::create(Size inputSize)
  124. //
  125. /**
  126. * allocator
  127. * @param inputSize : size of the images input to segment (output will be the same size)
  128. */
  129. + (TransientAreasSegmentationModule*)create:(Size2i*)inputSize NS_SWIFT_NAME(create(inputSize:));
  130. @end
  131. NS_ASSUME_NONNULL_END