<h2 dir="auto">System information (version)</h2>
<ul dir="auto">
<li>OpenCV =&gt; 4.1.1-pre</li>
<li>Operating System / Platform =&gt; Windows 10 64 Bit</li>
<li>Compiler =&gt; Visual Studio 2019</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">Trying to load <em>cv::cuda::CascadeClassifier</em>, get error on create:</p>
<blockquote>
<p dir="auto">OpenCV(4.1.1-pre) D:\opencv-master\modules\core\include\opencv2/core/private.cuda.hpp:113: error: (-213:The function/feature is not implemented) The called functionality is disabled for current build or platform in function 'throw_no_cuda'</p>
</blockquote>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto"><code class="notranslate">int main() { String path = "absolute_path_to\\haarcascade_frontalface_alt2_cuda.xml"; try { Ptr &lt;cv::cuda::CascadeClassifier&gt; cascade_gpu = cv::cuda::CascadeClassifier::create(path); } catch (Exception&amp; e) { cout &lt;&lt; e.msg; } }</code></p>
<p dir="auto">getCudaEnabledDeviceCount() == 0 method return 1<br>
Build info below</p>
<blockquote>
<p dir="auto">General configuration for OpenCV 4.1.1-pre =====================================<br>
Version control:               unknown<br>
Extra modules:<br>
Location (extra):            D:/opencv_contrib-master/modules<br>
Version control (extra):     unknown<br>
Platform:<br>
Timestamp:                   2019-06-26T21:39:05Z<br>
Host:                        Windows 10.0.17763 AMD64<br>
CMake:                       3.15.0-rc1<br>
CMake generator:             Visual Studio 16 2019<br>
CMake build tool:            D:/IDE Files/VS Community 2019/MSBuild/Current/Bin/MSBuild.exe<br>
MSVC:                        1921<br>
CPU/HW features:<br>
Baseline:                    SSE SSE2 SSE3<br>
requested:                 SSE3<br>
Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX<br>
requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX<br>
SSE4_1 (15 files):         + SSSE3 SSE4_1<br>
SSE4_2 (2 files):          + SSSE3 SSE4_1 POPCNT SSE4_2<br>
FP16 (1 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX<br>
AVX (4 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX<br>
AVX2 (28 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2<br>
AVX512_SKX (4 files):      + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX<br>
C/C++:<br>
Built as dynamic libs?:      YES<br>
C++ Compiler:                D:/IDE Files/VS Community 2019/VC/Tools/MSVC/14.21.27702/bin/Hostx64/x64/cl.exe  (ver 19.21.27702.2)<br>
C++ flags (Release):         /DWIN32 /D_WINDOWS /W4 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP8   /MD /O2 /Ob2 /DNDEBUG<br>
C++ flags (Debug):           /DWIN32 /D_WINDOWS /W4 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP8   /MDd /Zi /Ob0 /Od /RTC1<br>
C Compiler:                  D:/IDE Files/VS Community 2019/VC/Tools/MSVC/14.21.27702/bin/Hostx64/x64/cl.exe<br>
C flags (Release):           /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise       /MP8    /MD /O2 /Ob2 /DNDEBUG<br>
C flags (Debug):             /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise       /MP8  /MDd /Zi /Ob0 /Od /RTC1<br>
Linker flags (Release):      /machine:x64  /INCREMENTAL:NO<br>
Linker flags (Debug):        /machine:x64  /debug /INCREMENTAL<br>
ccache:                      NO<br>
Precompiled headers:         YES<br>
Extra dependencies:          cudart_static.lib nppc.lib nppial.lib nppicc.lib nppicom.lib nppidei.lib nppif.lib nppig.lib nppim.lib nppist.lib nppisu.lib nppitc.lib npps.lib cublas.lib cufft.lib -LIBPATH:C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/lib/x64<br>
3rdparty dependencies:<br>
OpenCV modules:<br>
To be built:                 aruco bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev datasets dpm face features2d flann fuzzy gapi hfs highgui img_hash imgcodecs imgproc line_descriptor ml objdetect optflow phase_unwrapping photo plot quality reg rgbd saliency shape stereo stitching structured_light superres surface_matching tracking ts video videoio videostab xfeatures2d ximgproc xobjdetect xphoto<br>
Disabled:                    world<br>
Disabled by dependency:      dnn_objdetect text<br>
Unavailable:                 cnn_3dobj cvv dnn freetype hdf java js matlab ovis python2 python3 sfm viz<br>
Applications:                tests perf_tests apps<br>
Documentation:               NO<br>
Non-free algorithms:         NO<br>
Windows RT support:            NO<br>
GUI:<br>
Win32 UI:                    YES<br>
VTK support:                 NO<br>
Media I/O:<br>
ZLib:                        build (ver 1.2.11)<br>
JPEG:                        build-libjpeg-turbo (ver 2.0.2-62)<br>
WEBP:                        build (ver encoder: 0x020e)<br>
PNG:                         build (ver 1.6.37)<br>
TIFF:                        build (ver 42 - 4.0.10)<br>
JPEG 2000:                   build (ver 1.900.1)<br>
OpenEXR:                     build (ver 2.3.0)<br>
HDR:                         YES<br>
SUNRASTER:                   YES<br>
PXM:                         YES<br>
PFM:                         YES<br>
Video I/O:<br>
DC1394:                      NO<br>
FFMPEG:                      YES (prebuilt binaries)<br>
avcodec:                   YES (58.35.100)<br>
avformat:                  YES (58.20.100)<br>
avutil:                    YES (56.22.100)<br>
swscale:                   YES (5.3.100)<br>
avresample:                YES (4.0.0)<br>
GStreamer:                   NO<br>
DirectShow:                  YES<br>
Media Foundation:            YES<br>
DXVA:                      YES<br>
Parallel framework:            Concurrency<br>
Trace:                         YES (with Intel ITT)<br>
Other third-party libraries:<br>
Intel IPP:                   2019.0.0 Gold [2019.0.0]<br>
at:                   D:/opencv-master/build/3rdparty/ippicv/ippicv_win/icv<br>
Intel IPP IW:                sources (2019.0.0)<br>
at:                D:/opencv-master/build/3rdparty/ippicv/ippicv_win/iw<br>
Lapack:                      NO<br>
Eigen:                       NO<br>
Custom HAL:                  NO<br>
NVIDIA CUDA:                   YES (ver 10.1, CUFFT CUBLAS)<br>
NVIDIA GPU arch:             30 35 37 50 52 60 61 70 75<br>
NVIDIA PTX archs:<br>
cuDNN:                         NO<br>
OpenCL:                        YES (NVD3D11)<br>
Include path:                D:/opencv-master/3rdparty/include/opencl/1.2<br>
Link libraries:              Dynamic load<br>
Python (for build):            D:/IDE Files/Python3.7/python.exe<br>
Java:<br>
ant:                         NO<br>
JNI:                         NO<br>
Java wrappers:               NO<br>
Java tests:                  NO<br>
Install to:                    D:/opencv-master/build/install</p>
</blockquote>
<hr>
<p dir="auto">CPU CascadeClassifire works well<br>
Can someone help?</p>
<p dir="auto">This PR (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="379219861" data-permission-text="Title is private" data-url="https://github.com/opencv/opencv_contrib/issues/1889" data-hovercard-type="pull_request" data-hovercard-url="/opencv/opencv_contrib/pull/1889/hovercard" href="https://github.com/opencv/opencv_contrib/pull/1889">#1889</a>) removed objdetect related classes such as cv::cuda::CascadeClassifier. For me, the best part about OpenCV (recently moved to contrib).</p>
<p dir="auto">The pull request states it is obsolete. If so, what is the replacement? I have not seen anything similar. Please do not suggest DNN as it is far slower and not equivalent at all.</p>
<p dir="auto">I am still unable to use OpenCV 4.X due to this PR.</p>