G-API: Refine Semantic Segmentation Demo #23766
### Overview
* Supported demo working with camera id (e.g `--input=0`)
* Supported 3d output segmentation models (e.g `deeplabv3`)
* Supported `desync` execution
* Supported higher camera resolution
* Changed the color map to pascal voc (https://cloud.githubusercontent.com/assets/4503207/17803328/1006ca80-65f6-11e6-9ff6-36b7ef5b9ac6.png)
### Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [ ] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
Minor refactoring
Partially address review comments
Move DX-related stuff from the sample to a default source
Simplify the default OneVPL config
Address minor review comments
Add class for the default VPL source
WIP: Add initial stub for tests with description
Removing default vpl source and minor refactoring
Refactor default files
Fix build and application crash
Address review comments
Add test on VPL + OCL interaction compared to CPU behavior
Fix test
* cmake: Fix DirectX detection in mingw
The pragma comment directive is valid for MSVC only. So, the DirectX detection
fails in mingw. The failure is fixed by adding the required linking library
(here d3d11) in the try_compile() function in OpenCVDetectDirectX.cmake file.
Also add a message if the first DirectX check fails.
* gapi: Fix compilation with mingw
These changes remove MSVC specific pragma directive. The compilation fails at
linking time due to absence of proper linking library. The required libraries
are added in corresponding CMakeLists.txt file.
* samples: Fix compilation with mingw
These changes remove MSVC specific pragma directive. The compilation fails at
linking time due to absence of proper linking library. The required libraries
are added in corresponding CMakeLists.txt file.
[GAPI] Support basic inference in OAK backend
* Combined commit which enables basic inference and other extra capabilities of OAK backend
* Remove unnecessary target options from the cmakelist
G-API: oneVPL DX11 inference
* Draft GPU infer
* Fix incorrect subresource_id for array of textures
* Fix for TheOneSurface in different Frames
* Turn on VPP param configuration
* Add cropIn params
* Remove infer sync sample
* Remove comments
* Remove DX11AllocResource extra init
* Add condition for NV12 processing in giebackend
* Add VPP frames pool param configurable
* -M Remove extra WARN & INFOs, Fix custom MAC
* Remove global vars from example, Fix some comments, Disable blobParam due to OV issue
* Conflict resolving
* Revert back pointer cast for cv::any
GAPI: Add OAK backend
* Initial tests and cmake integration
* Add a public header and change tests
* Stub initial empty template for the OAK backend
* WIP
* WIP
* WIP
* WIP
* Runtime dai hang debug
* Refactoring
* Fix hang and debug frame data
* Fix frame size
* Fix data size issue
* Move test code to sample
* tmp refactoring
* WIP: Code refactoring except for the backend
* WIP: Add non-camera sample
* Fix samples
* Backend refactoring wip
* Backend rework wip
* Backend rework wip
* Remove mat encoder
* Fix namespace
* Minor backend fixes
* Fix hetero sample and refactor backend
* Change linking logic in the backend
* Fix oak sample
* Fix working with ins/outs in OAK island
* Trying to fix nv12 problem
* Make both samples work
* Small refactoring
* Remove meta args
* WIP refactoring kernel API
* Change in/out args API for kernels
* Fix build
* Fix cmake warning
* Partially address review comments
* Partially address review comments
* Address remaining comments
* Add memory ownership
* Change pointer-to-pointer to reference-to-pointer
* Remove unnecessary reference wrappers
* Apply review comments
* Check that graph contains only one OAK island
* Minor refactoring
* Address review comments
G-API: oneVPL merge DX11 acceleration
* Merge DX11 initial
* Fold conditions row in MACRO in utils
* Inject DeviceSelector
* Turn on DeviceSelector in DX11
* Change sharedLock logic & Move FMT checking in FrameAdapter c-tor
* Move out NumSuggestFrame to configure params
* Drain file source fix
* Fix compilation
* Force zero initializetion of SharedLock
* Fix some compiler warnings
* Fix integer comparison warnings
* Fix integers in sample
* Integrate Demux
* Fix compilation
* Add predefined names for some CfgParam
* Trigger CI
* Fix MultithreadCtx bug, Add Dx11 GetBlobParam(), Get rif of ATL CComPtr
* Fix UT: remove unit test with deprecated video from opencv_extra
* Add creators for most usable CfgParam
* Eliminate some warnings
* Fix warning in GAPI_Assert
* Apply comments
* Add VPL wrapped header with MSVC pragma to get rid of global warning masking
G-API: oneVPL - Performance: Add async decode pipeline & add cached pool
* Add async decode pipeline & intro cached pool
* Fix performacne test with checking OPENCV_EXTRA
* Add sip perf test with no VPL
* Fix misprint
* Remove empty line..
* Apply some comments
* Apply some comments
* Make perf test fail if no OPENCV_TEST_DATA_PATH declared
[G-API] Support postprocessing for not argmaxed outputs
* Support postprocessing for not argmaxed outputs
* Fix typo
* Add assert
* Remove static cast
* CamelCast to snake_case
* Fix windows warning
* Add static_cast to uint8_t
* Add const to variables
MTCNN 1st pnet simplification to ensure single graph input
* 1st pnet simplification to ensure single graph input
* address comment from Dmitry M regarding unused variable