nareshmlx/opencv-pr huggingface dataset:
**File:** modules/gapi/test/common/gapi_video_tests_common.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -321,6 +321,35 @@ inline GComputation runOCVnGAPIOptFlowPipeline(TestFunctional& testInst,
     return c;
 }
 
+inline void testBackgroundSubtractorStreaming(cv::GStreamingCompiled& gapiBackSub,
+                                              const cv::Ptr<cv::BackgroundSubtractor>& pOCVBackSub,
+                                              const int diffPercent, const int tolerance,
+                                              const double lRate, const std::size_t testNumFrames)
+{
+    cv::Mat frame, gapiForeground, ocvForeground;
```

Review comment:
For what? It works in this view. Why do we need extra characters?
**File:** modules/gapi/test/common/gapi_video_tests_inl.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -8,6 +8,7 @@
 #define OPENCV_GAPI_VIDEO_TESTS_INL_HPP
 
 #include "gapi_video_tests.hpp"
+#include <opencv2/gapi/streaming/cap.hpp>
 
 namespace opencv_test
 {
@@ -88,6 +89,49 @@ TEST_P(BuildPyr_CalcOptFlow_PipelineTest, AccuracyTest)
     compareOutputsOptFlow(outOCV, outGAPI);
```

Review comment:
I need to discuss.
**File:** modules/gapi/src/backends/cpu/gcpuvideo.cpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...
**Review Line:** 86

**Code Changes:**
```diff
 };
 
+GAPI_OCV_KERNEL_ST(GCPUBackgroundSubtractor,
+                   cv::gapi::video::GBackgroundSubtractor,
+                   cv::BackgroundSubtractor)
+{
+    static void setup(const cv::GMatDesc&, const cv::gapi::video::BackgroundSubtractorParams& bsParams,
+                      std::shared_ptr<cv::BackgroundSubtractor>& state,
+                      const cv::GCompileArgs&)
+    {
+        if (bsParams.operation == cv::gapi::video::TYPE_BS_MOG2)
```

Review comment:
Dead code? It is better to wrap huge blocks of code through `#if 0` instead of C++ comments. Also please left comment that is it commented? `TODO` for GPU support or something just doesn't work.
**File:** modules/gapi/src/backends/cpu/gcpuvideo.cpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -80,12 +80,40 @@ GAPI_OCV_KERNEL(GCPUCalcOptFlowLKForPyr, cv::gapi::video::GCalcOptFlowLKForPyr)
     }
 };
 
+GAPI_OCV_KERNEL_ST(GCPUBackgroundSubtractor,
+                   cv::gapi::video::GBackgroundSubtractor,
+                   cv::BackgroundSubtractor)
+{
+    static void setup(const cv::GMatDesc&, const cv::gapi::video::BackgroundSubtractorParams& bsParams,
+                      std::shared_ptr<cv::BackgroundSubtractor>& state,
```

Review comment:
> outdated obviously it is not.
**File:** modules/gapi/test/common/gapi_video_tests_common.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -321,6 +321,35 @@ inline GComputation runOCVnGAPIOptFlowPipeline(TestFunctional& testInst,
     return c;
 }
 
+inline void testBackgroundSubtractorStreaming(cv::GStreamingCompiled& gapiBackSub,
+                                              const cv::Ptr<cv::BackgroundSubtractor>& pOCVBackSub,
+                                              const int diffPercent, const int tolerance,
+                                              const double lRate, const std::size_t testNumFrames)
+{
+    cv::Mat frame, gapiForeground, ocvForeground;
```

Review comment:
It's just for clearance and consistency, to be obvious that it's a `cv::` function
**File:** modules/gapi/test/common/gapi_video_tests_inl.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -8,6 +8,7 @@
 #define OPENCV_GAPI_VIDEO_TESTS_INL_HPP
 
 #include "gapi_video_tests.hpp"
+#include <opencv2/gapi/streaming/cap.hpp>
 
 namespace opencv_test
 {
@@ -88,6 +89,49 @@ TEST_P(BuildPyr_CalcOptFlow_PipelineTest, AccuracyTest)
     compareOutputsOptFlow(outOCV, outGAPI);
```

Review comment:
I meant that several strings above there is the 1% allowed difference, so I just wondered why it's changed
**File:** modules/gapi/test/common/gapi_video_tests_common.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -321,6 +321,35 @@ inline GComputation runOCVnGAPIOptFlowPipeline(TestFunctional& testInst,
     return c;
 }
 
+inline void testBackgroundSubtractorStreaming(cv::GStreamingCompiled& gapiBackSub,
+                                              const cv::Ptr<cv::BackgroundSubtractor>& pOCVBackSub,
+                                              const int diffPercent, const int tolerance,
+                                              const double lRate, const std::size_t testNumFrames)
+{
+    cv::Mat frame, gapiForeground, ocvForeground;
```

Review comment:
Got it. It looks OK if you want to preserve this way of comparison However, there are a lot of different comparison functions for `Mat`s in our `gapi_tests_common.hpp` so I suggest you to try one of them instead of `compareBackSubResults` For example, `AbsSimilarPoints()` could probably fit
**File:** modules/gapi/test/common/gapi_video_tests_inl.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -8,6 +8,7 @@
 #define OPENCV_GAPI_VIDEO_TESTS_INL_HPP
 
 #include "gapi_video_tests.hpp"
+#include <opencv2/gapi/streaming/cap.hpp>
 
 namespace opencv_test
 {
@@ -88,6 +89,49 @@ TEST_P(BuildPyr_CalcOptFlow_PipelineTest, AccuracyTest)
     compareOutputsOptFlow(outOCV, outGAPI);
```

Review comment:
Rework test. Please take a look.
**File:** modules/gapi/include/opencv2/gapi/video.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -62,6 +62,73 @@ G_TYPED_KERNEL(GCalcOptFlowLKForPyr,
         return std::make_tuple(empty_array_desc(), empty_array_desc(), empty_array_desc());
     }
 };
+
+enum BackgroundSubtractorType
+{
+    TYPE_BS_MOG2,
+    TYPE_BS_KNN
+};
```

Review comment:
`const GMatDesc&`, please
**File:** modules/gapi/include/opencv2/gapi/video.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -62,6 +62,73 @@ G_TYPED_KERNEL(GCalcOptFlowLKForPyr,
         return std::make_tuple(empty_array_desc(), empty_array_desc(), empty_array_desc());
     }
 };
+
+enum BackgroundSubtractorType
+{
+    TYPE_BS_MOG2,
+    TYPE_BS_KNN
+};
```

Review comment:
Addressed.
**File:** modules/gapi/include/opencv2/gapi/video.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...
**Review Line:** 243

**Code Changes:**
```diff
 
+/** @brief Gaussian Mixture-based or K-nearest neighbours-based Background/Foreground Segmentation Algorithm.
+The operation generates a foreground mask.
+
+@return Output image is foreground mask, i.e. 8-bit unsigned 1-channel (binary) matrix @ref CV_8UC1.
+
+@note Functional textual ID is "org.opencv.video.BackgroundSubtractor"
+
+@param src input image: Floating point frame is used without scaling and should be in range [0,255].
+@param bsParams Set of initialization parameters for Background Subtractor kernel.
+*/
```

Review comment:
I think it's not the high-priority issue, we can add the description later. Please, keep this comment somewhere
**File:** modules/gapi/include/opencv2/gapi/video.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -62,6 +62,73 @@ G_TYPED_KERNEL(GCalcOptFlowLKForPyr,
         return std::make_tuple(empty_array_desc(), empty_array_desc(), empty_array_desc());
     }
 };
+
+enum BackgroundSubtractorType
+{
+    TYPE_BS_MOG2,
+    TYPE_BS_KNN
+};
```

Review comment:
Will return to it in further PRs
**File:** modules/gapi/test/common/gapi_video_tests_common.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -321,6 +321,35 @@ inline GComputation runOCVnGAPIOptFlowPipeline(TestFunctional& testInst,
     return c;
 }
 
+inline void testBackgroundSubtractorStreaming(cv::GStreamingCompiled& gapiBackSub,
+                                              const cv::Ptr<cv::BackgroundSubtractor>& pOCVBackSub,
+                                              const int diffPercent, const int tolerance,
+                                              const double lRate, const std::size_t testNumFrames)
+{
+    cv::Mat frame, gapiForeground, ocvForeground;
```

Review comment:
This function doesn't require `opencv_video` module, so it should better be moved upper, before #HAVE_VIDEO guard. If you will preserve it, of course (remind you to see comment below)
**File:** modules/gapi/test/common/gapi_video_tests_inl.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -8,6 +8,7 @@
 #define OPENCV_GAPI_VIDEO_TESTS_INL_HPP
 
 #include "gapi_video_tests.hpp"
+#include <opencv2/gapi/streaming/cap.hpp>
 
 namespace opencv_test
 {
@@ -88,6 +89,49 @@ TEST_P(BuildPyr_CalcOptFlow_PipelineTest, AccuracyTest)
     compareOutputsOptFlow(outOCV, outGAPI);
```

Review comment:
You call this function here, but it is defined under #HAVE_VIDEO guard. Thus it wouldn't compile without opencv_video module. So you should define this function under #else (use examples after :370 in gapi_video_tests_common.hpp, e.g. runOCVnGAPIOptFlowLK)
**File:** modules/gapi/test/common/gapi_video_tests_inl.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -8,6 +8,7 @@
 #define OPENCV_GAPI_VIDEO_TESTS_INL_HPP
 
 #include "gapi_video_tests.hpp"
+#include <opencv2/gapi/streaming/cap.hpp>
 
 namespace opencv_test
 {
@@ -88,6 +89,49 @@ TEST_P(BuildPyr_CalcOptFlow_PipelineTest, AccuracyTest)
     compareOutputsOptFlow(outOCV, outGAPI);
```

Review comment:
It is not good to include a CPU-only header in tests common for different backends. If you have to use some backend-specific things (it's a structure here), we should consider some other solutions. I'll try to find out
**File:** modules/gapi/test/common/gapi_video_tests_common.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -321,6 +321,35 @@ inline GComputation runOCVnGAPIOptFlowPipeline(TestFunctional& testInst,
     return c;
 }
 
+inline void testBackgroundSubtractorStreaming(cv::GStreamingCompiled& gapiBackSub,
+                                              const cv::Ptr<cv::BackgroundSubtractor>& pOCVBackSub,
+                                              const int diffPercent, const int tolerance,
+                                              const double lRate, const std::size_t testNumFrames)
+{
+    cv::Mat frame, gapiForeground, ocvForeground;
```

Review comment:
What do you think on it then?
**File:** modules/gapi/test/common/gapi_video_tests_common.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -321,6 +321,35 @@ inline GComputation runOCVnGAPIOptFlowPipeline(TestFunctional& testInst,
     return c;
 }
 
+inline void testBackgroundSubtractorStreaming(cv::GStreamingCompiled& gapiBackSub,
+                                              const cv::Ptr<cv::BackgroundSubtractor>& pOCVBackSub,
+                                              const int diffPercent, const int tolerance,
+                                              const double lRate, const std::size_t testNumFrames)
+{
+    cv::Mat frame, gapiForeground, ocvForeground;
```

Review comment:
Please, this is for consistency.
**File:** modules/gapi/include/opencv2/gapi/video.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -62,6 +62,73 @@ G_TYPED_KERNEL(GCalcOptFlowLKForPyr,
         return std::make_tuple(empty_array_desc(), empty_array_desc(), empty_array_desc());
     }
 };
+
+enum BackgroundSubtractorType
+{
+    TYPE_BS_MOG2,
+    TYPE_BS_KNN
+};
```

Review comment:
the string is too long
**File:** modules/gapi/include/opencv2/gapi/video.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...
**Review Line:** 112

**Code Changes:**
```diff
+    whether a pixel is close to that sample.
+    @param detect If true, the algorithm will detect shadows and mark them. It decreases the
+    speed a bit, so if you do not need this feature, set the parameter to false.
+    @param lRate The value between 0 and 1 that indicates how fast the background model is learnt.
+    Negative parameter value makes the algorithm to use some automatically chosen learning rate.
+    */
+    BackgroundSubtractorParams(BackgroundSubtractorType op, int histLength,
+                               double thrshld, bool detect, double lRate) : operation(op),
+                                                                            history(histLength),
+                                                                            threshold(thrshld),
+                                                                            detectShadows(detect),
```

Review comment:
`lRate` parameter is not described
**File:** modules/gapi/include/opencv2/gapi/video.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...
**Review Line:** 114

**Code Changes:**
```diff
+    speed a bit, so if you do not need this feature, set the parameter to false.
+    @param lRate The value between 0 and 1 that indicates how fast the background model is learnt.
+    Negative parameter value makes the algorithm to use some automatically chosen learning rate.
+    */
+    BackgroundSubtractorParams(BackgroundSubtractorType op, int histLength,
+                               double thrshld, bool detect, double lRate) : operation(op),
+                                                                            history(histLength),
+                                                                            threshold(thrshld),
+                                                                            detectShadows(detect),
+                                                                            learningRate(lRate){}
+};
```

Review comment:
please, make parameters const
**File:** modules/gapi/test/common/gapi_video_tests_common.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -321,6 +321,35 @@ inline GComputation runOCVnGAPIOptFlowPipeline(TestFunctional& testInst,
     return c;
 }
 
+inline void testBackgroundSubtractorStreaming(cv::GStreamingCompiled& gapiBackSub,
+                                              const cv::Ptr<cv::BackgroundSubtractor>& pOCVBackSub,
+                                              const int diffPercent, const int tolerance,
+                                              const double lRate, const std::size_t testNumFrames)
+{
+    cv::Mat frame, gapiForeground, ocvForeground;
```

Review comment:
please, const reference parameters where applicable
**File:** modules/gapi/test/common/gapi_video_tests_common.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -321,6 +321,35 @@ inline GComputation runOCVnGAPIOptFlowPipeline(TestFunctional& testInst,
     return c;
 }
 
+inline void testBackgroundSubtractorStreaming(cv::GStreamingCompiled& gapiBackSub,
+                                              const cv::Ptr<cv::BackgroundSubtractor>& pOCVBackSub,
+                                              const int diffPercent, const int tolerance,
+                                              const double lRate, const std::size_t testNumFrames)
+{
+    cv::Mat frame, gapiForeground, ocvForeground;
```

Review comment:
is it still necessary to include?
**File:** modules/gapi/test/common/gapi_video_tests_common.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -321,6 +321,35 @@ inline GComputation runOCVnGAPIOptFlowPipeline(TestFunctional& testInst,
     return c;
 }
 
+inline void testBackgroundSubtractorStreaming(cv::GStreamingCompiled& gapiBackSub,
+                                              const cv::Ptr<cv::BackgroundSubtractor>& pOCVBackSub,
+                                              const int diffPercent, const int tolerance,
+                                              const double lRate, const std::size_t testNumFrames)
+{
+    cv::Mat frame, gapiForeground, ocvForeground;
```

Review comment:
This parameter should be `shared_ptr` or `cv::Ptr`
**File:** modules/gapi/test/common/gapi_video_tests_inl.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...
**Review Line:** 133

**Code Changes:**
```diff
+        pOCVBackSub = cv::createBackgroundSubtractorKNN(histLength, thr,
+                                                        detectShadows);
+
+    // Allowing 1% difference of all pixels between G-API and reference OpenCV results
+    testBackgroundSubtractorStreaming(gapiBackSub, pOCVBackSub, 1, 1, learningRate, testNumFrames);
+}
+#endif
 } // opencv_test
 
 #endif // OPENCV_GAPI_VIDEO_TESTS_INL_HPP
```

Review comment:
You can merge this test with previous by setting the type of the subtractor as a test parameter
**File:** modules/gapi/test/common/gapi_video_tests_inl.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -8,6 +8,7 @@
 #define OPENCV_GAPI_VIDEO_TESTS_INL_HPP
 
 #include "gapi_video_tests.hpp"
+#include <opencv2/gapi/streaming/cap.hpp>
 
 namespace opencv_test
 {
@@ -88,6 +89,49 @@ TEST_P(BuildPyr_CalcOptFlow_PipelineTest, AccuracyTest)
     compareOutputsOptFlow(outOCV, outGAPI);
```

Review comment:
Maybe you should test more different configurations. You can make all of it test parameters
**File:** modules/gapi/test/common/gapi_video_tests_inl.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -8,6 +8,7 @@
 #define OPENCV_GAPI_VIDEO_TESTS_INL_HPP
 
 #include "gapi_video_tests.hpp"
+#include <opencv2/gapi/streaming/cap.hpp>
 
 namespace opencv_test
 {
@@ -88,6 +89,49 @@ TEST_P(BuildPyr_CalcOptFlow_PipelineTest, AccuracyTest)
     compareOutputsOptFlow(outOCV, outGAPI);
```

Review comment:
You should keep the pointer as `shared_ptr` or `cv::Ptr`
**File:** modules/gapi/include/opencv2/gapi/video.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -62,6 +62,73 @@ G_TYPED_KERNEL(GCalcOptFlowLKForPyr,
         return std::make_tuple(empty_array_desc(), empty_array_desc(), empty_array_desc());
     }
 };
+
+enum BackgroundSubtractorType
+{
+    TYPE_BS_MOG2,
+    TYPE_BS_KNN
+};
```

Review comment:
`Structure for the Background Subtractor operation's initialization parameters.`
**File:** modules/gapi/include/opencv2/gapi/video.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -62,6 +62,73 @@ G_TYPED_KERNEL(GCalcOptFlowLKForPyr,
         return std::make_tuple(empty_array_desc(), empty_array_desc(), empty_array_desc());
     }
 };
+
+enum BackgroundSubtractorType
+{
+    TYPE_BS_MOG2,
+    TYPE_BS_KNN
+};
```

Review comment:
Does this parameter's meaning differ depending on the type of subtractor? It is said in the constructor
**File:** modules/gapi/include/opencv2/gapi/video.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -62,6 +62,73 @@ G_TYPED_KERNEL(GCalcOptFlowLKForPyr,
         return std::make_tuple(empty_array_desc(), empty_array_desc(), empty_array_desc());
     }
 };
+
+enum BackgroundSubtractorType
+{
+    TYPE_BS_MOG2,
+    TYPE_BS_KNN
+};
```

Review comment:
`Negative value makes the algorithm use automatically chosen learning rate.`
**File:** modules/gapi/include/opencv2/gapi/video.hpp
**Change Type:** modified
**Context:** PR #18674: GAPI: New BackgroundSubtractor stateful kernel - New BackgroundSubtractor kernel represents 2 types of operation such as: - Background Subt...

**Code Changes:**
```diff
@@ -62,6 +62,73 @@ G_TYPED_KERNEL(GCalcOptFlowLKForPyr,
         return std::make_tuple(empty_array_desc(), empty_array_desc(), empty_array_desc());
     }
 };
+
+enum BackgroundSubtractorType
+{
+    TYPE_BS_MOG2,
+    TYPE_BS_KNN
+};
```

Review comment:
`neighbour-based`, without spaces. They are confusing a bit