Source Code
-----------
- Download the source code from
- [here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/introduction/display_image/display_image.cpp).
+ @add_toggle_cpp
+ - **Downloadable code**: Click
- [here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/introduction/display_image/display_image.cpp)
++ [here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/introduction/display_image/display_image.cpp)
+
+ - **Code at glance:**
+ @include samples/cpp/tutorial_code/introduction/display_image/display_image.cpp
+ @end_toggle
+
+ @add_toggle_python
+ - **Downloadable code**: Click
- [here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/introduction/display_image/display_image.py)
++ [here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/introduction/display_image/display_image.py)
+
+ - **Code at glance:**
+ @include samples/python/tutorial_code/introduction/display_image/display_image.py
+ @end_toggle
- @include cpp/tutorial_code/introduction/display_image/display_image.cpp
Explanation
-----------
virtual bool supportBackend(int backendId) CV_OVERRIDE
{
return backendId == DNN_BACKEND_OPENCV ||
+ backendId == DNN_BACKEND_CUDA ||
(backendId == DNN_BACKEND_HALIDE && haveHalide() && axis == 1) ||
- ((backendId == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 || backendId == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH) && haveInfEngine() && axis == 1);
+ (((backendId == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 && !blobs.empty()) ||
+ backendId == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH) && axis == 1);
}
virtual bool setActivation(const Ptr<ActivationLayer>& layer) CV_OVERRIDE