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.

1370 lines
73 KiB

1 month ago
  1. <?xml version="1.0"?>
  2. <doc>
  3. <assembly>
  4. <name>AForge.Vision</name>
  5. </assembly>
  6. <members>
  7. <member name="T:AForge.Vision.Motion.BlobCountingObjectsProcessing">
  8. <summary>
  9. Motion processing algorithm, which counts separate moving objects and highlights them.
  10. </summary>
  11. <remarks><para>The aim of this motion processing algorithm is to count separate objects
  12. in the motion frame, which is provided by <see cref="T:AForge.Vision.Motion.IMotionDetector">motion detection algorithm</see>.
  13. In the case if <see cref="P:AForge.Vision.Motion.BlobCountingObjectsProcessing.HighlightMotionRegions"/> property is set to <see langword="true"/>,
  14. found objects are also highlighted on the original video frame. The algorithm
  15. counts and highlights only those objects, which size satisfies <see cref="P:AForge.Vision.Motion.BlobCountingObjectsProcessing.MinObjectsWidth"/>
  16. and <see cref="P:AForge.Vision.Motion.BlobCountingObjectsProcessing.MinObjectsHeight"/> properties.</para>
  17. <para><note>The motion processing algorithm is supposed to be used only with motion detection
  18. algorithms, which are based on finding difference with background frame
  19. (see <see cref="T:AForge.Vision.Motion.SimpleBackgroundModelingDetector"/> and <see cref="T:AForge.Vision.Motion.CustomFrameDifferenceDetector"/>
  20. as simple implementations) and allow extract moving objects clearly.</note></para>
  21. <para>Sample usage:</para>
  22. <code>
  23. // create instance of motion detection algorithm
  24. IMotionDetector motionDetector = new ... ;
  25. // create instance of motion processing algorithm
  26. BlobCountingObjectsProcessing motionProcessing = new BlobCountingObjectsProcessing( );
  27. // create motion detector
  28. MotionDetector detector = new MotionDetector( motionDetector, motionProcessing );
  29. // continuously feed video frames to motion detector
  30. while ( ... )
  31. {
  32. // process new video frame and check motion level
  33. if ( detector.ProcessFrame( videoFrame ) > 0.02 )
  34. {
  35. // check number of detected objects
  36. if ( motionProcessing.ObjectsCount > 1 )
  37. {
  38. // ...
  39. }
  40. }
  41. }
  42. </code>
  43. </remarks>
  44. <seealso cref="T:AForge.Vision.Motion.MotionDetector"/>
  45. <seealso cref="T:AForge.Vision.Motion.IMotionDetector"/>
  46. </member>
  47. <member name="P:AForge.Vision.Motion.BlobCountingObjectsProcessing.HighlightMotionRegions">
  48. <summary>
  49. Highlight motion regions or not.
  50. </summary>
  51. <remarks><para>The property specifies if detected moving objects should be highlighted
  52. with rectangle or not.</para>
  53. <para>Default value is set to <see langword="true"/>.</para>
  54. <para><note>Turning the value on leads to additional processing time of video frame.</note></para>
  55. </remarks>
  56. </member>
  57. <member name="P:AForge.Vision.Motion.BlobCountingObjectsProcessing.HighlightColor">
  58. <summary>
  59. Color used to highlight motion regions.
  60. </summary>
  61. <remarks>
  62. <para>Default value is set to <b>red</b> color.</para>
  63. </remarks>
  64. </member>
  65. <member name="P:AForge.Vision.Motion.BlobCountingObjectsProcessing.MinObjectsWidth">
  66. <summary>
  67. Minimum width of acceptable object.
  68. </summary>
  69. <remarks><para>The property sets minimum width of an object to count and highlight. If
  70. objects have smaller width, they are not counted and are not highlighted.</para>
  71. <para>Default value is set to <b>10</b>.</para>
  72. </remarks>
  73. </member>
  74. <member name="P:AForge.Vision.Motion.BlobCountingObjectsProcessing.MinObjectsHeight">
  75. <summary>
  76. Minimum height of acceptable object.
  77. </summary>
  78. <remarks><para>The property sets minimum height of an object to count and highlight. If
  79. objects have smaller height, they are not counted and are not highlighted.</para>
  80. <para>Default value is set to <b>10</b>.</para>
  81. </remarks>
  82. </member>
  83. <member name="P:AForge.Vision.Motion.BlobCountingObjectsProcessing.ObjectsCount">
  84. <summary>
  85. Number of detected objects.
  86. </summary>
  87. <remarks><para>The property provides number of moving objects detected by
  88. the last call of <see cref="M:AForge.Vision.Motion.BlobCountingObjectsProcessing.ProcessFrame(AForge.Imaging.UnmanagedImage,AForge.Imaging.UnmanagedImage)"/> method.</para></remarks>
  89. </member>
  90. <member name="P:AForge.Vision.Motion.BlobCountingObjectsProcessing.ObjectRectangles">
  91. <summary>
  92. Rectangles of moving objects.
  93. </summary>
  94. <remarks><para>The property provides array of moving objects' rectangles
  95. detected by the last call of <see cref="M:AForge.Vision.Motion.BlobCountingObjectsProcessing.ProcessFrame(AForge.Imaging.UnmanagedImage,AForge.Imaging.UnmanagedImage)"/> method.</para></remarks>
  96. </member>
  97. <member name="M:AForge.Vision.Motion.BlobCountingObjectsProcessing.#ctor">
  98. <summary>
  99. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.BlobCountingObjectsProcessing"/> class.
  100. </summary>
  101. </member>
  102. <member name="M:AForge.Vision.Motion.BlobCountingObjectsProcessing.#ctor(System.Boolean)">
  103. <summary>
  104. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.BlobCountingObjectsProcessing"/> class.
  105. </summary>
  106. <param name="highlightMotionRegions">Highlight motion regions or not (see <see cref="P:AForge.Vision.Motion.BlobCountingObjectsProcessing.HighlightMotionRegions"/> property).</param>
  107. </member>
  108. <member name="M:AForge.Vision.Motion.BlobCountingObjectsProcessing.#ctor(System.Int32,System.Int32)">
  109. <summary>
  110. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.BlobCountingObjectsProcessing"/> class.
  111. </summary>
  112. <param name="minWidth">Minimum width of acceptable object (see <see cref="P:AForge.Vision.Motion.BlobCountingObjectsProcessing.MinObjectsWidth"/> property).</param>
  113. <param name="minHeight">Minimum height of acceptable object (see <see cref="P:AForge.Vision.Motion.BlobCountingObjectsProcessing.MinObjectsHeight"/> property).</param>
  114. </member>
  115. <member name="M:AForge.Vision.Motion.BlobCountingObjectsProcessing.#ctor(System.Int32,System.Int32,System.Drawing.Color)">
  116. <summary>
  117. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.BlobCountingObjectsProcessing"/> class.
  118. </summary>
  119. <param name="minWidth">Minimum width of acceptable object (see <see cref="P:AForge.Vision.Motion.BlobCountingObjectsProcessing.MinObjectsWidth"/> property).</param>
  120. <param name="minHeight">Minimum height of acceptable object (see <see cref="P:AForge.Vision.Motion.BlobCountingObjectsProcessing.MinObjectsHeight"/> property).</param>
  121. <param name="highlightColor">Color used to highlight motion regions.</param>
  122. </member>
  123. <member name="M:AForge.Vision.Motion.BlobCountingObjectsProcessing.#ctor(System.Int32,System.Int32,System.Boolean)">
  124. <summary>
  125. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.BlobCountingObjectsProcessing"/> class.
  126. </summary>
  127. <param name="minWidth">Minimum width of acceptable object (see <see cref="P:AForge.Vision.Motion.BlobCountingObjectsProcessing.MinObjectsWidth"/> property).</param>
  128. <param name="minHeight">Minimum height of acceptable object (see <see cref="P:AForge.Vision.Motion.BlobCountingObjectsProcessing.MinObjectsHeight"/> property).</param>
  129. <param name="highlightMotionRegions">Highlight motion regions or not (see <see cref="P:AForge.Vision.Motion.BlobCountingObjectsProcessing.HighlightMotionRegions"/> property).</param>
  130. </member>
  131. <member name="M:AForge.Vision.Motion.BlobCountingObjectsProcessing.ProcessFrame(AForge.Imaging.UnmanagedImage,AForge.Imaging.UnmanagedImage)">
  132. <summary>
  133. Process video and motion frames doing further post processing after
  134. performed motion detection.
  135. </summary>
  136. <param name="videoFrame">Original video frame.</param>
  137. <param name="motionFrame">Motion frame provided by motion detection
  138. algorithm (see <see cref="T:AForge.Vision.Motion.IMotionDetector"/>).</param>
  139. <remarks><para>Processes provided motion frame and counts number of separate
  140. objects, which size satisfies <see cref="P:AForge.Vision.Motion.BlobCountingObjectsProcessing.MinObjectsWidth"/> and <see cref="P:AForge.Vision.Motion.BlobCountingObjectsProcessing.MinObjectsHeight"/>
  141. properties. In the case if <see cref="P:AForge.Vision.Motion.BlobCountingObjectsProcessing.HighlightMotionRegions"/> property is
  142. set to <see langword="true"/>, the found object are also highlighted on the
  143. original video frame.
  144. </para></remarks>
  145. <exception cref="T:AForge.Imaging.InvalidImagePropertiesException">Motion frame is not 8 bpp image, but it must be so.</exception>
  146. <exception cref="T:AForge.Imaging.UnsupportedImageFormatException">Video frame must be 8 bpp grayscale image or 24/32 bpp color image.</exception>
  147. </member>
  148. <member name="M:AForge.Vision.Motion.BlobCountingObjectsProcessing.Reset">
  149. <summary>
  150. Reset internal state of motion processing algorithm.
  151. </summary>
  152. <remarks><para>The method allows to reset internal state of motion processing
  153. algorithm and prepare it for processing of next video stream or to restart
  154. the algorithm.</para></remarks>
  155. </member>
  156. <member name="T:AForge.Vision.Motion.CustomFrameDifferenceDetector">
  157. <summary>
  158. Motion detector based on difference with predefined background frame.
  159. </summary>
  160. <remarks><para>The class implements motion detection algorithm, which is based on
  161. difference of current video frame with predefined background frame. The <see cref="P:AForge.Vision.Motion.CustomFrameDifferenceDetector.MotionFrame">difference frame</see>
  162. is thresholded and the <see cref="P:AForge.Vision.Motion.CustomFrameDifferenceDetector.MotionLevel">amount of difference pixels</see> is calculated.
  163. To suppress stand-alone noisy pixels erosion morphological operator may be applied, which
  164. is controlled by <see cref="P:AForge.Vision.Motion.CustomFrameDifferenceDetector.SuppressNoise"/> property.</para>
  165. <para><note>In the case if precise motion area's borders are required (for example,
  166. for further motion post processing), then <see cref="P:AForge.Vision.Motion.CustomFrameDifferenceDetector.KeepObjectsEdges"/> property
  167. may be used to restore borders after noise suppression.</note></para>
  168. <para><note>In the case if custom background frame is not specified by using
  169. <see cref="M:AForge.Vision.Motion.CustomFrameDifferenceDetector.SetBackgroundFrame(System.Drawing.Bitmap)"/> method, the algorithm takes first video frame
  170. as a background frame and calculates difference of further video frames with it.</note></para>
  171. <para>Unlike <see cref="T:AForge.Vision.Motion.TwoFramesDifferenceDetector"/> motion detection algorithm, this algorithm
  172. allows to identify quite clearly all objects, which are not part of the background (scene) -
  173. most likely moving objects.</para>
  174. <para>Sample usage:</para>
  175. <code>
  176. // create motion detector
  177. MotionDetector detector = new MotionDetector(
  178. new CustomFrameDifferenceDetector( ),
  179. new MotionAreaHighlighting( ) );
  180. // continuously feed video frames to motion detector
  181. while ( ... )
  182. {
  183. // process new video frame and check motion level
  184. if ( detector.ProcessFrame( videoFrame ) > 0.02 )
  185. {
  186. // ring alarm or do somethng else
  187. }
  188. }
  189. </code>
  190. </remarks>
  191. <seealso cref="T:AForge.Vision.Motion.MotionDetector"/>
  192. </member>
  193. <member name="P:AForge.Vision.Motion.CustomFrameDifferenceDetector.DifferenceThreshold">
  194. <summary>
  195. Difference threshold value, [1, 255].
  196. </summary>
  197. <remarks><para>The value specifies the amount off difference between pixels, which is treated
  198. as motion pixel.</para>
  199. <para>Default value is set to <b>15</b>.</para>
  200. </remarks>
  201. </member>
  202. <member name="P:AForge.Vision.Motion.CustomFrameDifferenceDetector.MotionLevel">
  203. <summary>
  204. Motion level value, [0, 1].
  205. </summary>
  206. <remarks><para>Amount of changes in the last processed frame. For example, if value of
  207. this property equals to 0.1, then it means that last processed frame has 10% difference
  208. with defined background frame.</para>
  209. </remarks>
  210. </member>
  211. <member name="P:AForge.Vision.Motion.CustomFrameDifferenceDetector.MotionFrame">
  212. <summary>
  213. Motion frame containing detected areas of motion.
  214. </summary>
  215. <remarks><para>Motion frame is a grayscale image, which shows areas of detected motion.
  216. All black pixels in the motion frame correspond to areas, where no motion is
  217. detected. But white pixels correspond to areas, where motion is detected.</para>
  218. <para><note>The property is set to <see langword="null"/> after processing of the first
  219. video frame by the algorithm in the case if custom background frame was not set manually
  220. by using <see cref="M:AForge.Vision.Motion.CustomFrameDifferenceDetector.SetBackgroundFrame(System.Drawing.Bitmap)"/> method (it will be not <see langword="null"/>
  221. after second call in this case). If correct custom background
  222. was set then the property should bet set to estimated motion frame after
  223. <see cref="M:AForge.Vision.Motion.CustomFrameDifferenceDetector.ProcessFrame(AForge.Imaging.UnmanagedImage)"/> method call.</note></para>
  224. </remarks>
  225. </member>
  226. <member name="P:AForge.Vision.Motion.CustomFrameDifferenceDetector.SuppressNoise">
  227. <summary>
  228. Suppress noise in video frames or not.
  229. </summary>
  230. <remarks><para>The value specifies if additional filtering should be
  231. done to suppress standalone noisy pixels by applying 3x3 erosion image processing
  232. filter. See <see cref="P:AForge.Vision.Motion.CustomFrameDifferenceDetector.KeepObjectsEdges"/> property, if it is required to restore
  233. edges of objects, which are not noise.</para>
  234. <para>Default value is set to <see langword="true"/>.</para>
  235. <para><note>Turning the value on leads to more processing time of video frame.</note></para>
  236. </remarks>
  237. </member>
  238. <member name="P:AForge.Vision.Motion.CustomFrameDifferenceDetector.KeepObjectsEdges">
  239. <summary>
  240. Restore objects edges after noise suppression or not.
  241. </summary>
  242. <remarks><para>The value specifies if additional filtering should be done
  243. to restore objects' edges after noise suppression by applying 3x3 dilatation
  244. image processing filter.</para>
  245. <para>Default value is set to <see langword="false"/>.</para>
  246. <para><note>Turning the value on leads to more processing time of video frame.</note></para>
  247. </remarks>
  248. </member>
  249. <member name="M:AForge.Vision.Motion.CustomFrameDifferenceDetector.#ctor">
  250. <summary>
  251. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.CustomFrameDifferenceDetector"/> class.
  252. </summary>
  253. </member>
  254. <member name="M:AForge.Vision.Motion.CustomFrameDifferenceDetector.#ctor(System.Boolean)">
  255. <summary>
  256. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.CustomFrameDifferenceDetector"/> class.
  257. </summary>
  258. <param name="suppressNoise">Suppress noise in video frames or not (see <see cref="P:AForge.Vision.Motion.CustomFrameDifferenceDetector.SuppressNoise"/> property).</param>
  259. </member>
  260. <member name="M:AForge.Vision.Motion.CustomFrameDifferenceDetector.#ctor(System.Boolean,System.Boolean)">
  261. <summary>
  262. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.CustomFrameDifferenceDetector"/> class.
  263. </summary>
  264. <param name="suppressNoise">Suppress noise in video frames or not (see <see cref="P:AForge.Vision.Motion.CustomFrameDifferenceDetector.SuppressNoise"/> property).</param>
  265. <param name="keepObjectEdges">Restore objects edges after noise suppression or not (see <see cref="P:AForge.Vision.Motion.CustomFrameDifferenceDetector.KeepObjectsEdges"/> property).</param>
  266. </member>
  267. <member name="M:AForge.Vision.Motion.CustomFrameDifferenceDetector.ProcessFrame(AForge.Imaging.UnmanagedImage)">
  268. <summary>
  269. Process new video frame.
  270. </summary>
  271. <param name="videoFrame">Video frame to process (detect motion in).</param>
  272. <remarks><para>Processes new frame from video source and detects motion in it.</para>
  273. <para>Check <see cref="P:AForge.Vision.Motion.CustomFrameDifferenceDetector.MotionLevel"/> property to get information about amount of motion
  274. (changes) in the processed frame.</para>
  275. </remarks>
  276. </member>
  277. <member name="M:AForge.Vision.Motion.CustomFrameDifferenceDetector.Reset">
  278. <summary>
  279. Reset motion detector to initial state.
  280. </summary>
  281. <remarks><para>Resets internal state and variables of motion detection algorithm.
  282. Usually this is required to be done before processing new video source, but
  283. may be also done at any time to restart motion detection algorithm.</para>
  284. <para><note>In the case if custom background frame was set using
  285. <see cref="M:AForge.Vision.Motion.CustomFrameDifferenceDetector.SetBackgroundFrame(System.Drawing.Bitmap)"/> method, this method does not reset it.
  286. The method resets only automatically generated background frame.
  287. </note></para>
  288. </remarks>
  289. </member>
  290. <member name="M:AForge.Vision.Motion.CustomFrameDifferenceDetector.SetBackgroundFrame(System.Drawing.Bitmap)">
  291. <summary>
  292. Set background frame.
  293. </summary>
  294. <param name="backgroundFrame">Background frame to set.</param>
  295. <remarks><para>The method sets background frame, which will be used to calculate
  296. difference with.</para></remarks>
  297. </member>
  298. <member name="M:AForge.Vision.Motion.CustomFrameDifferenceDetector.SetBackgroundFrame(System.Drawing.Imaging.BitmapData)">
  299. <summary>
  300. Set background frame.
  301. </summary>
  302. <param name="backgroundFrame">Background frame to set.</param>
  303. <remarks><para>The method sets background frame, which will be used to calculate
  304. difference with.</para></remarks>
  305. </member>
  306. <member name="M:AForge.Vision.Motion.CustomFrameDifferenceDetector.SetBackgroundFrame(AForge.Imaging.UnmanagedImage)">
  307. <summary>
  308. Set background frame.
  309. </summary>
  310. <param name="backgroundFrame">Background frame to set.</param>
  311. <remarks><para>The method sets background frame, which will be used to calculate
  312. difference with.</para></remarks>
  313. </member>
  314. <member name="T:AForge.Vision.Motion.GridMotionAreaProcessing">
  315. <summary>
  316. Motion processing algorithm, which performs grid processing of motion frame.
  317. </summary>
  318. <remarks><para>The aim of this motion processing algorithm is to do grid processing
  319. of motion frame. This means that entire motion frame is divided by a grid into
  320. certain amount of cells and the motion level is calculated for each cell. The
  321. information about each cell's motion level may be retrieved using <see cref="P:AForge.Vision.Motion.GridMotionAreaProcessing.MotionGrid"/>
  322. property.</para>
  323. <para><para>In addition the algorithm can highlight those cells, which have motion
  324. level above the specified threshold (see <see cref="P:AForge.Vision.Motion.GridMotionAreaProcessing.MotionAmountToHighlight"/>
  325. property). To enable this it is required to set <see cref="P:AForge.Vision.Motion.GridMotionAreaProcessing.HighlightMotionGrid"/>
  326. property to <see langword="true"/>.</para></para>
  327. <para>Sample usage:</para>
  328. <code>
  329. // create instance of motion detection algorithm
  330. IMotionDetector motionDetector = new ... ;
  331. // create instance of motion processing algorithm
  332. GridMotionAreaProcessing motionProcessing = new GridMotionAreaProcessing( 16, 16 );
  333. // create motion detector
  334. MotionDetector detector = new MotionDetector( motionDetector, motionProcessing );
  335. // continuously feed video frames to motion detector
  336. while ( ... )
  337. {
  338. // process new video frame
  339. detector.ProcessFrame( videoFrame );
  340. // check motion level in 5th row 8th column
  341. if ( motionProcessing.MotionGrid[5, 8] > 0.15 )
  342. {
  343. // ...
  344. }
  345. }
  346. </code>
  347. </remarks>
  348. <seealso cref="T:AForge.Vision.Motion.MotionDetector"/>
  349. <seealso cref="T:AForge.Vision.Motion.IMotionDetector"/>
  350. </member>
  351. <member name="P:AForge.Vision.Motion.GridMotionAreaProcessing.HighlightColor">
  352. <summary>
  353. Color used to highlight motion regions.
  354. </summary>
  355. <remarks>
  356. <para>Default value is set to <b>red</b> color.</para>
  357. </remarks>
  358. </member>
  359. <member name="P:AForge.Vision.Motion.GridMotionAreaProcessing.HighlightMotionGrid">
  360. <summary>
  361. Highlight motion regions or not.
  362. </summary>
  363. <remarks><para>The property specifies if motion grid should be highlighted -
  364. if cell, which have motion level above the
  365. <see cref="P:AForge.Vision.Motion.GridMotionAreaProcessing.MotionAmountToHighlight">specified value</see>, should be highlighted.</para>
  366. <para>Default value is set to <see langword="true"/>.</para>
  367. <para><note>Turning the value on leads to additional processing time of video frame.</note></para>
  368. </remarks>
  369. </member>
  370. <member name="P:AForge.Vision.Motion.GridMotionAreaProcessing.MotionAmountToHighlight">
  371. <summary>
  372. Motion amount to highlight cell.
  373. </summary>
  374. <remarks><para>The property specifies motion level threshold for highlighting grid's
  375. cells. If motion level of a certain cell is higher than this value, then the cell
  376. is highlighted.</para>
  377. <para>Default value is set to <b>0.15</b>.</para>
  378. </remarks>
  379. </member>
  380. <member name="P:AForge.Vision.Motion.GridMotionAreaProcessing.MotionGrid">
  381. <summary>
  382. Motion levels of each grid's cell.
  383. </summary>
  384. <remarks><para>The property represents an array of size
  385. <see cref="P:AForge.Vision.Motion.GridMotionAreaProcessing.GridHeight"/>x<see cref="P:AForge.Vision.Motion.GridMotionAreaProcessing.GridWidth"/>, which keeps motion level
  386. of each grid's cell. If certain cell has motion level equal to 0.2, then it
  387. means that this cell has 20% of changes.</para>
  388. </remarks>
  389. </member>
  390. <member name="P:AForge.Vision.Motion.GridMotionAreaProcessing.GridWidth">
  391. <summary>
  392. Width of motion grid, [2, 64].
  393. </summary>
  394. <remarks><para>The property specifies motion grid's width - number of grid' columns.</para>
  395. <para>Default value is set to <b>16</b>.</para>
  396. </remarks>
  397. </member>
  398. <member name="P:AForge.Vision.Motion.GridMotionAreaProcessing.GridHeight">
  399. <summary>
  400. Height of motion grid, [2, 64].
  401. </summary>
  402. <remarks><para>The property specifies motion grid's height - number of grid' rows.</para>
  403. <para>Default value is set to <b>16</b>.</para>
  404. </remarks>
  405. </member>
  406. <member name="M:AForge.Vision.Motion.GridMotionAreaProcessing.#ctor">
  407. <summary>
  408. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.GridMotionAreaProcessing"/> class.
  409. </summary>
  410. </member>
  411. <member name="M:AForge.Vision.Motion.GridMotionAreaProcessing.#ctor(System.Int32,System.Int32)">
  412. <summary>
  413. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.GridMotionAreaProcessing"/> class.
  414. </summary>
  415. <param name="gridWidth">Width of motion grid (see <see cref="P:AForge.Vision.Motion.GridMotionAreaProcessing.GridWidth"/> property).</param>
  416. <param name="gridHeight">Height of motion grid (see <see cref="P:AForge.Vision.Motion.GridMotionAreaProcessing.GridHeight"/> property).</param>
  417. </member>
  418. <member name="M:AForge.Vision.Motion.GridMotionAreaProcessing.#ctor(System.Int32,System.Int32,System.Boolean)">
  419. <summary>
  420. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.GridMotionAreaProcessing"/> class.
  421. </summary>
  422. <param name="gridWidth">Width of motion grid (see <see cref="P:AForge.Vision.Motion.GridMotionAreaProcessing.GridWidth"/> property).</param>
  423. <param name="gridHeight">Height of motion grid (see <see cref="P:AForge.Vision.Motion.GridMotionAreaProcessing.GridHeight"/> property).</param>
  424. <param name="highlightMotionGrid">Highlight motion regions or not (see <see cref="P:AForge.Vision.Motion.GridMotionAreaProcessing.HighlightMotionGrid"/> property).</param>
  425. </member>
  426. <member name="M:AForge.Vision.Motion.GridMotionAreaProcessing.#ctor(System.Int32,System.Int32,System.Boolean,System.Single)">
  427. <summary>
  428. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.GridMotionAreaProcessing"/> class.
  429. </summary>
  430. <param name="gridWidth">Width of motion grid (see <see cref="P:AForge.Vision.Motion.GridMotionAreaProcessing.GridWidth"/> property).</param>
  431. <param name="gridHeight">Height of motion grid (see <see cref="P:AForge.Vision.Motion.GridMotionAreaProcessing.GridHeight"/> property).</param>
  432. <param name="highlightMotionGrid">Highlight motion regions or not (see <see cref="P:AForge.Vision.Motion.GridMotionAreaProcessing.HighlightMotionGrid"/> property).</param>
  433. <param name="motionAmountToHighlight">Motion amount to highlight cell (see <see cref="P:AForge.Vision.Motion.GridMotionAreaProcessing.MotionAmountToHighlight"/> property).</param>
  434. </member>
  435. <member name="M:AForge.Vision.Motion.GridMotionAreaProcessing.ProcessFrame(AForge.Imaging.UnmanagedImage,AForge.Imaging.UnmanagedImage)">
  436. <summary>
  437. Process video and motion frames doing further post processing after
  438. performed motion detection.
  439. </summary>
  440. <param name="videoFrame">Original video frame.</param>
  441. <param name="motionFrame">Motion frame provided by motion detection
  442. algorithm (see <see cref="T:AForge.Vision.Motion.IMotionDetector"/>).</param>
  443. <remarks><para>Processes provided motion frame and calculates motion level
  444. for each grid's cell. In the case if <see cref="P:AForge.Vision.Motion.GridMotionAreaProcessing.HighlightMotionGrid"/> property is
  445. set to <see langword="true"/>, the cell with motion level above threshold are
  446. highlighted.</para></remarks>
  447. <exception cref="T:AForge.Imaging.InvalidImagePropertiesException">Motion frame is not 8 bpp image, but it must be so.</exception>
  448. <exception cref="T:AForge.Imaging.UnsupportedImageFormatException">Video frame must be 8 bpp grayscale image or 24/32 bpp color image.</exception>
  449. </member>
  450. <member name="M:AForge.Vision.Motion.GridMotionAreaProcessing.Reset">
  451. <summary>
  452. Reset internal state of motion processing algorithm.
  453. </summary>
  454. <remarks><para>The method allows to reset internal state of motion processing
  455. algorithm and prepare it for processing of next video stream or to restart
  456. the algorithm.</para></remarks>
  457. </member>
  458. <member name="T:AForge.Vision.Motion.IMotionDetector">
  459. <summary>
  460. Interface of motion detector algorithm.
  461. </summary>
  462. <remarks><para>The interface specifies methods, which should be implemented
  463. by all motion detection algorithms - algorithms which perform processing of video
  464. frames in order to detect motion. Amount of detected motion may be checked using
  465. <see cref="P:AForge.Vision.Motion.IMotionDetector.MotionLevel"/> property. Also <see cref="P:AForge.Vision.Motion.IMotionDetector.MotionFrame"/> property may
  466. be used in order to see all the detected motion areas. For example, the <see cref="P:AForge.Vision.Motion.IMotionDetector.MotionFrame"/> property
  467. is used by motion processing algorithms for further motion post processing, like
  468. highlighting motion areas, counting number of detected moving object, etc.
  469. </para></remarks>
  470. <seealso cref="T:AForge.Vision.Motion.MotionDetector"/>
  471. <seealso cref="T:AForge.Vision.Motion.IMotionProcessing"/>
  472. </member>
  473. <member name="P:AForge.Vision.Motion.IMotionDetector.MotionLevel">
  474. <summary>
  475. Motion level value, [0, 1].
  476. </summary>
  477. <remarks><para>Amount of changes in the last processed frame. For example, if value of
  478. this property equals to 0.1, then it means that last processed frame has 10% of changes
  479. (however it is up to specific implementation to decide how to compare specified frame).</para>
  480. </remarks>
  481. </member>
  482. <member name="P:AForge.Vision.Motion.IMotionDetector.MotionFrame">
  483. <summary>
  484. Motion frame containing detected areas of motion.
  485. </summary>
  486. <remarks><para>Motion frame is a grayscale image, which shows areas of detected motion.
  487. All black pixels in the motion frame correspond to areas, where no motion is
  488. detected. But white pixels correspond to areas, where motion is detected.</para></remarks>
  489. </member>
  490. <member name="M:AForge.Vision.Motion.IMotionDetector.ProcessFrame(AForge.Imaging.UnmanagedImage)">
  491. <summary>
  492. Process new video frame.
  493. </summary>
  494. <param name="videoFrame">Video frame to process (detect motion in).</param>
  495. <remarks><para>Processes new frame from video source and detects motion in it.</para></remarks>
  496. </member>
  497. <member name="M:AForge.Vision.Motion.IMotionDetector.Reset">
  498. <summary>
  499. Reset motion detector to initial state.
  500. </summary>
  501. <remarks><para>Resets internal state and variables of motion detection algorithm.
  502. Usually this is required to be done before processing new video source, but
  503. may be also done at any time to restart motion detection algorithm.</para>
  504. </remarks>
  505. </member>
  506. <member name="T:AForge.Vision.Motion.IMotionProcessing">
  507. <summary>
  508. Interface of motion processing algorithm.
  509. </summary>
  510. <remarks><para>The interface specifies methods, which should be implemented
  511. by all motion processng algorithms - algorithm which perform further post processing
  512. of detected motion, which is done by motion detection algorithms (see <see cref="T:AForge.Vision.Motion.IMotionDetector"/>).
  513. </para></remarks>
  514. <seealso cref="T:AForge.Vision.Motion.MotionDetector"/>
  515. <seealso cref="T:AForge.Vision.Motion.IMotionDetector"/>
  516. </member>
  517. <member name="M:AForge.Vision.Motion.IMotionProcessing.ProcessFrame(AForge.Imaging.UnmanagedImage,AForge.Imaging.UnmanagedImage)">
  518. <summary>
  519. Process video and motion frames doing further post processing after
  520. performed motion detection.
  521. </summary>
  522. <param name="videoFrame">Original video frame.</param>
  523. <param name="motionFrame">Motion frame provided by motion detection
  524. algorithm (see <see cref="T:AForge.Vision.Motion.IMotionDetector"/>).</param>
  525. <remarks><para>The method does father post processing of detected motion.
  526. Type of motion post processing is specified by specific implementation
  527. of the <see cref="T:AForge.Vision.Motion.IMotionProcessing"/> interface - it may motion
  528. area highlighting, motion objects counting, etc.</para></remarks>
  529. </member>
  530. <member name="M:AForge.Vision.Motion.IMotionProcessing.Reset">
  531. <summary>
  532. Reset internal state of motion processing algorithm.
  533. </summary>
  534. <remarks><para>The method allows to reset internal state of motion processing
  535. algorithm and prepare it for processing of next video stream or to restart
  536. the algorithm.</para>
  537. <para><note>Some motion processing algorithms may not have any stored internal
  538. states and may just process provided video frames without relying on any motion
  539. history etc. In this case such algorithms provide empty implementation of this method.</note></para>
  540. </remarks>
  541. </member>
  542. <member name="T:AForge.Vision.Motion.MotionAreaHighlighting">
  543. <summary>
  544. Motion processing algorithm, which highlights motion areas.
  545. </summary>
  546. <remarks><para>The aim of this motion processing algorithm is to highlight
  547. motion areas with grid pattern of the <see cref="P:AForge.Vision.Motion.MotionAreaHighlighting.HighlightColor">specified color</see>.
  548. </para>
  549. <para>Sample usage:</para>
  550. <code>
  551. // create motion detector
  552. MotionDetector detector = new MotionDetector(
  553. /* motion detection algorithm */,
  554. new MotionAreaHighlighting( ) );
  555. // continuously feed video frames to motion detector
  556. while ( ... )
  557. {
  558. // process new video frame
  559. detector.ProcessFrame( videoFrame );
  560. }
  561. </code>
  562. </remarks>
  563. <seealso cref="T:AForge.Vision.Motion.MotionDetector"/>
  564. <seealso cref="T:AForge.Vision.Motion.IMotionDetector"/>
  565. </member>
  566. <member name="P:AForge.Vision.Motion.MotionAreaHighlighting.HighlightColor">
  567. <summary>
  568. Color used to highlight motion regions.
  569. </summary>
  570. <remarks>
  571. <para>Default value is set to <b>red</b> color.</para>
  572. </remarks>
  573. </member>
  574. <member name="M:AForge.Vision.Motion.MotionAreaHighlighting.#ctor">
  575. <summary>
  576. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.MotionAreaHighlighting"/> class.
  577. </summary>
  578. </member>
  579. <member name="M:AForge.Vision.Motion.MotionAreaHighlighting.#ctor(System.Drawing.Color)">
  580. <summary>
  581. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.MotionAreaHighlighting"/> class.
  582. </summary>
  583. <param name="highlightColor">Color used to highlight motion regions.</param>
  584. </member>
  585. <member name="M:AForge.Vision.Motion.MotionAreaHighlighting.ProcessFrame(AForge.Imaging.UnmanagedImage,AForge.Imaging.UnmanagedImage)">
  586. <summary>
  587. Process video and motion frames doing further post processing after
  588. performed motion detection.
  589. </summary>
  590. <param name="videoFrame">Original video frame.</param>
  591. <param name="motionFrame">Motion frame provided by motion detection
  592. algorithm (see <see cref="T:AForge.Vision.Motion.IMotionDetector"/>).</param>
  593. <remarks><para>Processes provided motion frame and highlights motion areas
  594. on the original video frame with <see cref="P:AForge.Vision.Motion.MotionAreaHighlighting.HighlightColor">specified color</see>.</para>
  595. </remarks>
  596. <exception cref="T:AForge.Imaging.InvalidImagePropertiesException">Motion frame is not 8 bpp image, but it must be so.</exception>
  597. <exception cref="T:AForge.Imaging.UnsupportedImageFormatException">Video frame must be 8 bpp grayscale image or 24/32 bpp color image.</exception>
  598. </member>
  599. <member name="M:AForge.Vision.Motion.MotionAreaHighlighting.Reset">
  600. <summary>
  601. Reset internal state of motion processing algorithm.
  602. </summary>
  603. <remarks><para>The method allows to reset internal state of motion processing
  604. algorithm and prepare it for processing of next video stream or to restart
  605. the algorithm.</para></remarks>
  606. </member>
  607. <member name="T:AForge.Vision.Motion.MotionBorderHighlighting">
  608. <summary>
  609. Motion processing algorithm, which highlights border of motion areas.
  610. </summary>
  611. <remarks><para>The aim of this motion processing algorithm is to highlight
  612. borders of motion areas with the <see cref="P:AForge.Vision.Motion.MotionBorderHighlighting.HighlightColor">specified color</see>.
  613. </para>
  614. <para><note>The motion processing algorithm is supposed to be used only with motion detection
  615. algorithms, which are based on finding difference with background frame
  616. (see <see cref="T:AForge.Vision.Motion.SimpleBackgroundModelingDetector"/> and <see cref="T:AForge.Vision.Motion.CustomFrameDifferenceDetector"/>
  617. as simple implementations) and allow extract moving objects clearly.</note></para>
  618. <para>Sample usage:</para>
  619. <code>
  620. // create motion detector
  621. MotionDetector detector = new MotionDetector(
  622. /* motion detection algorithm */,
  623. new MotionBorderHighlighting( ) );
  624. // continuously feed video frames to motion detector
  625. while ( ... )
  626. {
  627. // process new video frame
  628. detector.ProcessFrame( videoFrame );
  629. }
  630. </code>
  631. </remarks>
  632. <seealso cref="T:AForge.Vision.Motion.MotionDetector"/>
  633. <seealso cref="T:AForge.Vision.Motion.IMotionDetector"/>
  634. </member>
  635. <member name="P:AForge.Vision.Motion.MotionBorderHighlighting.HighlightColor">
  636. <summary>
  637. Color used to highlight motion regions.
  638. </summary>
  639. <remarks>
  640. <para>Default value is set to <b>red</b> color.</para>
  641. </remarks>
  642. </member>
  643. <member name="M:AForge.Vision.Motion.MotionBorderHighlighting.#ctor">
  644. <summary>
  645. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.MotionBorderHighlighting"/> class.
  646. </summary>
  647. </member>
  648. <member name="M:AForge.Vision.Motion.MotionBorderHighlighting.#ctor(System.Drawing.Color)">
  649. <summary>
  650. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.MotionBorderHighlighting"/> class.
  651. </summary>
  652. <param name="highlightColor">Color used to highlight motion regions.</param>
  653. </member>
  654. <member name="M:AForge.Vision.Motion.MotionBorderHighlighting.ProcessFrame(AForge.Imaging.UnmanagedImage,AForge.Imaging.UnmanagedImage)">
  655. <summary>
  656. Process video and motion frames doing further post processing after
  657. performed motion detection.
  658. </summary>
  659. <param name="videoFrame">Original video frame.</param>
  660. <param name="motionFrame">Motion frame provided by motion detection
  661. algorithm (see <see cref="T:AForge.Vision.Motion.IMotionDetector"/>).</param>
  662. <remarks><para>Processes provided motion frame and highlights borders of motion areas
  663. on the original video frame with <see cref="P:AForge.Vision.Motion.MotionBorderHighlighting.HighlightColor">specified color</see>.</para>
  664. </remarks>
  665. <exception cref="T:AForge.Imaging.InvalidImagePropertiesException">Motion frame is not 8 bpp image, but it must be so.</exception>
  666. <exception cref="T:AForge.Imaging.UnsupportedImageFormatException">Video frame must be 8 bpp grayscale image or 24/32 bpp color image.</exception>
  667. </member>
  668. <member name="M:AForge.Vision.Motion.MotionBorderHighlighting.Reset">
  669. <summary>
  670. Reset internal state of motion processing algorithm.
  671. </summary>
  672. <remarks><para>The method allows to reset internal state of motion processing
  673. algorithm and prepare it for processing of next video stream or to restart
  674. the algorithm.</para></remarks>
  675. </member>
  676. <member name="T:AForge.Vision.Motion.MotionDetector">
  677. <summary>
  678. Motion detection wrapper class, which performs motion detection and processing.
  679. </summary>
  680. <remarks><para>The class serves as a wrapper class for
  681. <see cref="T:AForge.Vision.Motion.IMotionDetector">motion detection</see> and
  682. <see cref="T:AForge.Vision.Motion.IMotionProcessing">motion processing</see> algorithms, allowing to call them with
  683. single call. Unlike motion detection and motion processing interfaces, the class also
  684. provides additional methods for convenience, so the algorithms could be applied not
  685. only to <see cref="T:AForge.Imaging.UnmanagedImage"/>, but to .NET's <see cref="T:System.Drawing.Bitmap"/> class
  686. as well.</para>
  687. <para>In addition to wrapping of motion detection and processing algorthms, the class provides
  688. some additional functionality. Using <see cref="P:AForge.Vision.Motion.MotionDetector.MotionZones"/> property it is possible to specify
  689. set of rectangular zones to observe - only motion in these zones is counted and post procesed.</para>
  690. <para>Sample usage:</para>
  691. <code>
  692. // create motion detector
  693. MotionDetector detector = new MotionDetector(
  694. new SimpleBackgroundModelingDetector( ),
  695. new MotionAreaHighlighting( ) );
  696. // continuously feed video frames to motion detector
  697. while ( ... )
  698. {
  699. // process new video frame and check motion level
  700. if ( detector.ProcessFrame( videoFrame ) > 0.02 )
  701. {
  702. // ring alarm or do somethng else
  703. }
  704. }
  705. </code>
  706. </remarks>
  707. </member>
  708. <member name="P:AForge.Vision.Motion.MotionDetector.MotionDetectionAlgorithm">
  709. <summary>
  710. Motion detection algorithm to apply to each video frame.
  711. </summary>
  712. <remarks><para>The property sets motion detection algorithm, which is used by
  713. <see cref="M:AForge.Vision.Motion.MotionDetector.ProcessFrame(AForge.Imaging.UnmanagedImage)"/> method in order to calculate
  714. <see cref="P:AForge.Vision.Motion.IMotionDetector.MotionLevel">motion level</see> and
  715. <see cref="P:AForge.Vision.Motion.IMotionDetector.MotionFrame">motion frame</see>.
  716. </para></remarks>
  717. </member>
  718. <member name="P:AForge.Vision.Motion.MotionDetector.MotionProcessingAlgorithm">
  719. <summary>
  720. Motion processing algorithm to apply to each video frame after
  721. motion detection is done.
  722. </summary>
  723. <remarks><para>The property sets motion processing algorithm, which is used by
  724. <see cref="M:AForge.Vision.Motion.MotionDetector.ProcessFrame(AForge.Imaging.UnmanagedImage)"/> method after motion detection in order to do further
  725. post processing of motion frames. The aim of further post processing depends on
  726. actual implementation of the specified motion processing algorithm - it can be
  727. highlighting of motion area, objects counting, etc.
  728. </para></remarks>
  729. </member>
  730. <member name="P:AForge.Vision.Motion.MotionDetector.MotionZones">
  731. <summary>
  732. Set of zones to detect motion in.
  733. </summary>
  734. <remarks><para>The property keeps array of rectangular zones, which are observed for motion detection.
  735. Motion outside of these zones is ignored.</para>
  736. <para>In the case if this property is set, the <see cref="M:AForge.Vision.Motion.MotionDetector.ProcessFrame(AForge.Imaging.UnmanagedImage)"/> method
  737. will filter out all motion witch was detected by motion detection algorithm, but is not
  738. located in the specified zones.</para>
  739. </remarks>
  740. </member>
  741. <member name="M:AForge.Vision.Motion.MotionDetector.#ctor(AForge.Vision.Motion.IMotionDetector)">
  742. <summary>
  743. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.MotionDetector"/> class.
  744. </summary>
  745. <param name="detector">Motion detection algorithm to apply to each video frame.</param>
  746. </member>
  747. <member name="M:AForge.Vision.Motion.MotionDetector.#ctor(AForge.Vision.Motion.IMotionDetector,AForge.Vision.Motion.IMotionProcessing)">
  748. <summary>
  749. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.MotionDetector"/> class.
  750. </summary>
  751. <param name="detector">Motion detection algorithm to apply to each video frame.</param>
  752. <param name="processor">Motion processing algorithm to apply to each video frame after
  753. motion detection is done.</param>
  754. </member>
  755. <member name="M:AForge.Vision.Motion.MotionDetector.ProcessFrame(System.Drawing.Bitmap)">
  756. <summary>
  757. Process new video frame.
  758. </summary>
  759. <param name="videoFrame">Video frame to process (detect motion in).</param>
  760. <returns>Returns amount of motion, which is provided <see cref="P:AForge.Vision.Motion.IMotionDetector.MotionLevel"/>
  761. property of the <see cref="P:AForge.Vision.Motion.MotionDetector.MotionDetectionAlgorithm">motion detection algorithm in use</see>.</returns>
  762. <remarks><para>See <see cref="M:AForge.Vision.Motion.MotionDetector.ProcessFrame(AForge.Imaging.UnmanagedImage)"/> for additional details.</para>
  763. </remarks>
  764. </member>
  765. <member name="M:AForge.Vision.Motion.MotionDetector.ProcessFrame(System.Drawing.Imaging.BitmapData)">
  766. <summary>
  767. Process new video frame.
  768. </summary>
  769. <param name="videoFrame">Video frame to process (detect motion in).</param>
  770. <returns>Returns amount of motion, which is provided <see cref="P:AForge.Vision.Motion.IMotionDetector.MotionLevel"/>
  771. property of the <see cref="P:AForge.Vision.Motion.MotionDetector.MotionDetectionAlgorithm">motion detection algorithm in use</see>.</returns>
  772. <remarks><para>See <see cref="M:AForge.Vision.Motion.MotionDetector.ProcessFrame(AForge.Imaging.UnmanagedImage)"/> for additional details.</para>
  773. </remarks>
  774. </member>
  775. <member name="M:AForge.Vision.Motion.MotionDetector.ProcessFrame(AForge.Imaging.UnmanagedImage)">
  776. <summary>
  777. Process new video frame.
  778. </summary>
  779. <param name="videoFrame">Video frame to process (detect motion in).</param>
  780. <returns>Returns amount of motion, which is provided <see cref="P:AForge.Vision.Motion.IMotionDetector.MotionLevel"/>
  781. property of the <see cref="P:AForge.Vision.Motion.MotionDetector.MotionDetectionAlgorithm">motion detection algorithm in use</see>.</returns>
  782. <remarks><para>The method first of all applies motion detection algorithm to the specified video
  783. frame to calculate <see cref="P:AForge.Vision.Motion.IMotionDetector.MotionLevel">motion level</see> and
  784. <see cref="P:AForge.Vision.Motion.IMotionDetector.MotionFrame">motion frame</see>. After this it applies motion processing algorithm
  785. (if it was set) to do further post processing, like highlighting motion areas, counting moving
  786. objects, etc.</para>
  787. <para><note>In the case if <see cref="P:AForge.Vision.Motion.MotionDetector.MotionZones"/> property is set, this method will perform
  788. motion filtering right after motion algorithm is done and before passing motion frame to motion
  789. processing algorithm. The method does filtering right on the motion frame, which is produced
  790. by motion detection algorithm. At the same time the method recalculates motion level and returns
  791. new value, which takes motion zones into account (but the new value is not set back to motion detection
  792. algorithm' <see cref="P:AForge.Vision.Motion.IMotionDetector.MotionLevel"/> property).
  793. </note></para>
  794. </remarks>
  795. </member>
  796. <member name="M:AForge.Vision.Motion.MotionDetector.Reset">
  797. <summary>
  798. Reset motion detector to initial state.
  799. </summary>
  800. <remarks><para>The method resets motion detection and motion processing algotithms by calling
  801. their <see cref="M:AForge.Vision.Motion.IMotionDetector.Reset"/> and <see cref="M:AForge.Vision.Motion.IMotionProcessing.Reset"/> methods.</para>
  802. </remarks>
  803. </member>
  804. <member name="T:AForge.Vision.Motion.SimpleBackgroundModelingDetector">
  805. <summary>
  806. Motion detector based on simple background modeling.
  807. </summary>
  808. <remarks><para>The class implements motion detection algorithm, which is based on
  809. difference of current video frame with modeled background frame.
  810. The <see cref="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.MotionFrame">difference frame</see> is thresholded and the
  811. <see cref="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.MotionLevel">amount of difference pixels</see> is calculated.
  812. To suppress stand-alone noisy pixels erosion morphological operator may be applied, which
  813. is controlled by <see cref="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.SuppressNoise"/> property.</para>
  814. <para><note>In the case if precise motion area's borders are required (for example,
  815. for further motion post processing), then <see cref="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.KeepObjectsEdges"/> property
  816. may be used to restore borders after noise suppression.</note></para>
  817. <para>As the first approximation of background frame, the first frame of video stream is taken.
  818. During further video processing the background frame is constantly updated, so it
  819. changes in the direction to decrease difference with current video frame (the background
  820. frame is moved towards current frame). See <see cref="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.FramesPerBackgroundUpdate"/>
  821. <see cref="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.MillisecondsPerBackgroundUpdate"/> properties, which control the rate of
  822. background frame update.</para>
  823. <para>Unlike <see cref="T:AForge.Vision.Motion.TwoFramesDifferenceDetector"/> motion detection algorithm, this algorithm
  824. allows to identify quite clearly all objects, which are not part of the background (scene) -
  825. most likely moving objects. And unlike <see cref="T:AForge.Vision.Motion.CustomFrameDifferenceDetector"/> motion
  826. detection algorithm, this algorithm includes background adaptation feature, which allows it
  827. to update its modeled background frame in order to take scene changes into account.</para>
  828. <para><note>Because of the adaptation feature of the algorithm, it may adopt
  829. to background changes, what <see cref="T:AForge.Vision.Motion.CustomFrameDifferenceDetector"/> algorithm can not do.
  830. However, if moving object stays on the scene for a while (so algorithm adopts to it and does
  831. not treat it as a new moving object any more) and then starts to move again, the algorithm may
  832. find two moving objects - the true one, which is really moving, and the false one, which does not (the
  833. place, where the object stayed for a while).</note></para>
  834. <para><note>The algorithm is not applicable to such cases, when moving object resides
  835. in camera's view most of the time (laptops camera monitoring a person sitting in front of it,
  836. for example). The algorithm is mostly supposed for cases, when camera monitors some sort
  837. of static scene, where moving objects appear from time to time - street, road, corridor, etc.
  838. </note></para>
  839. <para>Sample usage:</para>
  840. <code>
  841. // create motion detector
  842. MotionDetector detector = new MotionDetector(
  843. new SimpleBackgroundModelingDetector( ),
  844. new MotionAreaHighlighting( ) );
  845. // continuously feed video frames to motion detector
  846. while ( ... )
  847. {
  848. // process new video frame and check motion level
  849. if ( detector.ProcessFrame( videoFrame ) > 0.02 )
  850. {
  851. // ring alarm or do somethng else
  852. }
  853. }
  854. </code>
  855. </remarks>
  856. <seealso cref="T:AForge.Vision.Motion.MotionDetector"/>
  857. </member>
  858. <member name="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.DifferenceThreshold">
  859. <summary>
  860. Difference threshold value, [1, 255].
  861. </summary>
  862. <remarks><para>The value specifies the amount off difference between pixels, which is treated
  863. as motion pixel.</para>
  864. <para>Default value is set to <b>15</b>.</para>
  865. </remarks>
  866. </member>
  867. <member name="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.MotionLevel">
  868. <summary>
  869. Motion level value, [0, 1].
  870. </summary>
  871. <remarks><para>Amount of changes in the last processed frame. For example, if value of
  872. this property equals to 0.1, then it means that last processed frame has 10% difference
  873. with modeled background frame.</para>
  874. </remarks>
  875. </member>
  876. <member name="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.MotionFrame">
  877. <summary>
  878. Motion frame containing detected areas of motion.
  879. </summary>
  880. <remarks><para>Motion frame is a grayscale image, which shows areas of detected motion.
  881. All black pixels in the motion frame correspond to areas, where no motion is
  882. detected. But white pixels correspond to areas, where motion is detected.</para>
  883. <para><note>The property is set to <see langword="null"/> after processing of the first
  884. video frame by the algorithm.</note></para>
  885. </remarks>
  886. </member>
  887. <member name="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.SuppressNoise">
  888. <summary>
  889. Suppress noise in video frames or not.
  890. </summary>
  891. <remarks><para>The value specifies if additional filtering should be
  892. done to suppress standalone noisy pixels by applying 3x3 erosion image processing
  893. filter. See <see cref="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.KeepObjectsEdges"/> property, if it is required to restore
  894. edges of objects, which are not noise.</para>
  895. <para>Default value is set to <see langword="true"/>.</para>
  896. <para><note>Turning the value on leads to more processing time of video frame.</note></para>
  897. </remarks>
  898. </member>
  899. <member name="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.KeepObjectsEdges">
  900. <summary>
  901. Restore objects edges after noise suppression or not.
  902. </summary>
  903. <remarks><para>The value specifies if additional filtering should be done
  904. to restore objects' edges after noise suppression by applying 3x3 dilatation
  905. image processing filter.</para>
  906. <para>Default value is set to <see langword="false"/>.</para>
  907. <para><note>Turning the value on leads to more processing time of video frame.</note></para>
  908. </remarks>
  909. </member>
  910. <member name="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.FramesPerBackgroundUpdate">
  911. <summary>
  912. Frames per background update, [1, 50].
  913. </summary>
  914. <remarks><para>The value controls the speed of modeled background adaptation to
  915. scene changes. After each specified amount of frames the background frame is updated
  916. in the direction to decrease difference with current processing frame.</para>
  917. <para>Default value is set to <b>2</b>.</para>
  918. <para><note>The property has effect only in the case if <see cref="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.MillisecondsPerBackgroundUpdate"/>
  919. property is set to <b>0</b>. Otherwise it does not have effect and background
  920. update is managed according to the <see cref="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.MillisecondsPerBackgroundUpdate"/>
  921. property settings.</note></para>
  922. </remarks>
  923. </member>
  924. <member name="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.MillisecondsPerBackgroundUpdate">
  925. <summary>
  926. Milliseconds per background update, [0, 5000].
  927. </summary>
  928. <remarks><para>The value represents alternate way of controlling the speed of modeled
  929. background adaptation to scene changes. The value sets number of milliseconds, which
  930. should elapse between two consequent video frames to result in background update
  931. for one intensity level. For example, if this value is set to 100 milliseconds and
  932. the amount of time elapsed between two last video frames equals to 350, then background
  933. frame will be update for 3 intensity levels in the direction to decrease difference
  934. with current video frame (the remained 50 milliseconds will be added to time difference
  935. between two next consequent frames, so the accuracy is preserved).</para>
  936. <para>Unlike background update method controlled using <see cref="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.FramesPerBackgroundUpdate"/>
  937. method, the method guided by this property is not affected by changes
  938. in frame rates. If, for some reasons, a video source starts to provide delays between
  939. frames (frame rate drops down), the amount of background update still stays consistent.
  940. When background update is controlled by this property, it is always possible to estimate
  941. amount of time required to change, for example, absolutely black background (0 intensity
  942. values) into absolutely white background (255 intensity values). If value of this
  943. property is set to 100, then it will take approximately 25.5 seconds for such update
  944. regardless of frame rate.</para>
  945. <para><note>Background update controlled by this property is slightly slower then
  946. background update controlled by <see cref="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.FramesPerBackgroundUpdate"/> property,
  947. so it has a bit greater impact on performance.</note></para>
  948. <para><note>If this property is set to 0, then corresponding background updating
  949. method is not used (turned off), but background update guided by
  950. <see cref="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.FramesPerBackgroundUpdate"/> property is used.</note></para>
  951. <para>Default value is set to <b>0</b>.</para>
  952. </remarks>
  953. </member>
  954. <member name="M:AForge.Vision.Motion.SimpleBackgroundModelingDetector.#ctor">
  955. <summary>
  956. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.SimpleBackgroundModelingDetector"/> class.
  957. </summary>
  958. </member>
  959. <member name="M:AForge.Vision.Motion.SimpleBackgroundModelingDetector.#ctor(System.Boolean)">
  960. <summary>
  961. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.SimpleBackgroundModelingDetector"/> class.
  962. </summary>
  963. <param name="suppressNoise">Suppress noise in video frames or not (see <see cref="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.SuppressNoise"/> property).</param>
  964. </member>
  965. <member name="M:AForge.Vision.Motion.SimpleBackgroundModelingDetector.#ctor(System.Boolean,System.Boolean)">
  966. <summary>
  967. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.SimpleBackgroundModelingDetector"/> class.
  968. </summary>
  969. <param name="suppressNoise">Suppress noise in video frames or not (see <see cref="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.SuppressNoise"/> property).</param>
  970. <param name="keepObjectEdges">Restore objects edges after noise suppression or not (see <see cref="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.KeepObjectsEdges"/> property).</param>
  971. </member>
  972. <member name="M:AForge.Vision.Motion.SimpleBackgroundModelingDetector.ProcessFrame(AForge.Imaging.UnmanagedImage)">
  973. <summary>
  974. Process new video frame.
  975. </summary>
  976. <param name="videoFrame">Video frame to process (detect motion in).</param>
  977. <remarks><para>Processes new frame from video source and detects motion in it.</para>
  978. <para>Check <see cref="P:AForge.Vision.Motion.SimpleBackgroundModelingDetector.MotionLevel"/> property to get information about amount of motion
  979. (changes) in the processed frame.</para>
  980. </remarks>
  981. </member>
  982. <member name="M:AForge.Vision.Motion.SimpleBackgroundModelingDetector.Reset">
  983. <summary>
  984. Reset motion detector to initial state.
  985. </summary>
  986. <remarks><para>Resets internal state and variables of motion detection algorithm.
  987. Usually this is required to be done before processing new video source, but
  988. may be also done at any time to restart motion detection algorithm.</para>
  989. </remarks>
  990. </member>
  991. <member name="T:AForge.Vision.Motion.TwoFramesDifferenceDetector">
  992. <summary>
  993. Motion detector based on two continues frames difference.
  994. </summary>
  995. <remarks><para>The class implements the simplest motion detection algorithm, which is
  996. based on difference of two continues frames. The <see cref="P:AForge.Vision.Motion.TwoFramesDifferenceDetector.MotionFrame">difference frame</see>
  997. is thresholded and the <see cref="P:AForge.Vision.Motion.TwoFramesDifferenceDetector.MotionLevel">amount of difference pixels</see> is calculated.
  998. To suppress stand-alone noisy pixels erosion morphological operator may be applied, which
  999. is controlled by <see cref="P:AForge.Vision.Motion.TwoFramesDifferenceDetector.SuppressNoise"/> property.</para>
  1000. <para>Although the class may be used on its own to perform motion detection, it is preferred
  1001. to use it in conjunction with <see cref="T:AForge.Vision.Motion.MotionDetector"/> class, which provides additional
  1002. features and allows to use moton post processing algorithms.</para>
  1003. <para>Sample usage:</para>
  1004. <code>
  1005. // create motion detector
  1006. MotionDetector detector = new MotionDetector(
  1007. new TwoFramesDifferenceDetector( ),
  1008. new MotionAreaHighlighting( ) );
  1009. // continuously feed video frames to motion detector
  1010. while ( ... )
  1011. {
  1012. // process new video frame and check motion level
  1013. if ( detector.ProcessFrame( videoFrame ) > 0.02 )
  1014. {
  1015. // ring alarm or do somethng else
  1016. }
  1017. }
  1018. </code>
  1019. </remarks>
  1020. <seealso cref="T:AForge.Vision.Motion.MotionDetector"/>
  1021. </member>
  1022. <member name="P:AForge.Vision.Motion.TwoFramesDifferenceDetector.DifferenceThreshold">
  1023. <summary>
  1024. Difference threshold value, [1, 255].
  1025. </summary>
  1026. <remarks><para>The value specifies the amount off difference between pixels, which is treated
  1027. as motion pixel.</para>
  1028. <para>Default value is set to <b>15</b>.</para>
  1029. </remarks>
  1030. </member>
  1031. <member name="P:AForge.Vision.Motion.TwoFramesDifferenceDetector.MotionLevel">
  1032. <summary>
  1033. Motion level value, [0, 1].
  1034. </summary>
  1035. <remarks><para>Amount of changes in the last processed frame. For example, if value of
  1036. this property equals to 0.1, then it means that last processed frame has 10% difference
  1037. with previous frame.</para>
  1038. </remarks>
  1039. </member>
  1040. <member name="P:AForge.Vision.Motion.TwoFramesDifferenceDetector.MotionFrame">
  1041. <summary>
  1042. Motion frame containing detected areas of motion.
  1043. </summary>
  1044. <remarks><para>Motion frame is a grayscale image, which shows areas of detected motion.
  1045. All black pixels in the motion frame correspond to areas, where no motion is
  1046. detected. But white pixels correspond to areas, where motion is detected.</para>
  1047. <para><note>The property is set to <see langword="null"/> after processing of the first
  1048. video frame by the algorithm.</note></para>
  1049. </remarks>
  1050. </member>
  1051. <member name="P:AForge.Vision.Motion.TwoFramesDifferenceDetector.SuppressNoise">
  1052. <summary>
  1053. Suppress noise in video frames or not.
  1054. </summary>
  1055. <remarks><para>The value specifies if additional filtering should be
  1056. done to suppress standalone noisy pixels by applying 3x3 erosion image processing
  1057. filter.</para>
  1058. <para>Default value is set to <see langword="true"/>.</para>
  1059. <para><note>Turning the value on leads to more processing time of video frame.</note></para>
  1060. </remarks>
  1061. </member>
  1062. <member name="M:AForge.Vision.Motion.TwoFramesDifferenceDetector.#ctor">
  1063. <summary>
  1064. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.TwoFramesDifferenceDetector"/> class.
  1065. </summary>
  1066. </member>
  1067. <member name="M:AForge.Vision.Motion.TwoFramesDifferenceDetector.#ctor(System.Boolean)">
  1068. <summary>
  1069. Initializes a new instance of the <see cref="T:AForge.Vision.Motion.TwoFramesDifferenceDetector"/> class.
  1070. </summary>
  1071. <param name="suppressNoise">Suppress noise in video frames or not (see <see cref="P:AForge.Vision.Motion.TwoFramesDifferenceDetector.SuppressNoise"/> property).</param>
  1072. </member>
  1073. <member name="M:AForge.Vision.Motion.TwoFramesDifferenceDetector.ProcessFrame(AForge.Imaging.UnmanagedImage)">
  1074. <summary>
  1075. Process new video frame.
  1076. </summary>
  1077. <param name="videoFrame">Video frame to process (detect motion in).</param>
  1078. <remarks><para>Processes new frame from video source and detects motion in it.</para>
  1079. <para>Check <see cref="P:AForge.Vision.Motion.TwoFramesDifferenceDetector.MotionLevel"/> property to get information about amount of motion
  1080. (changes) in the processed frame.</para>
  1081. </remarks>
  1082. </member>
  1083. <member name="M:AForge.Vision.Motion.TwoFramesDifferenceDetector.Reset">
  1084. <summary>
  1085. Reset motion detector to initial state.
  1086. </summary>
  1087. <remarks><para>Resets internal state and variables of motion detection algorithm.
  1088. Usually this is required to be done before processing new video source, but
  1089. may be also done at any time to restart motion detection algorithm.</para>
  1090. </remarks>
  1091. </member>
  1092. </members>
  1093. </doc>