In this article, we will see how to use
CRTP,std::variantandstd::visitto increase our code performances.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if(NOT CMAKE_VERSION VERSION_LESS 3.10) | |
| include_guard() | |
| endif() | |
| if(NOT COMMAND FetchContent_Populate) | |
| if(CMAKE_VERSION VERSION_LESS 3.11) | |
| message(STATUS "Fetching FetchContent.cmake") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /**************************************************************************************************** | |
| * | |
| * This example shows dnn edge detection vs canny | |
| * dnn edge detection slower than canny but its more realistic on most cases | |
| * | |
| *****************************************************************************************************/ | |
| #include "mycroplayer.hpp" | |
| #include <iostream> | |
| #include <string> | |
| #include <vector> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "mycroplayer.hpp" | |
| MyCropLayer::MyCropLayer(const cv::dnn::LayerParams ¶ms) | |
| : cv::dnn::Layer(params) | |
| {} | |
| cv::Ptr<cv::dnn::Layer> MyCropLayer::create(cv::dnn::LayerParams ¶ms) | |
| { | |
| return cv::Ptr<Layer>(new MyCropLayer(params)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef MYCROPLAYER_HPP | |
| #define MYCROPLAYER_HPP | |
| #include <opencv2/core.hpp> | |
| #include <opencv2/dnn.hpp> | |
| #include <opencv2/dnn/layer.details.hpp> | |
| #include <opencv2/dnn/shape_utils.hpp> | |
| #include <opencv2/highgui.hpp> | |
| #include <opencv2/imgproc.hpp> | |
| #include <opencv2/opencv.hpp> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <PublishedMedia id="472" release="Windows Blue November RTM Slipstream"> | |
| <Files> | |
| <File id="147320"> | |
| <FileName>9600.17053.winblue_refresh.141120-0031_x64fre_client_CoreSingleLanguage_ar-sa-IR5_CSLA_X64FRER_AR-SA_ESD.esd</FileName> | |
| <LanguageCode>ar-sa</LanguageCode> | |
| <Language>Arabic</Language> | |
| <Edition>Windows 8.1 Single Language</Edition> | |
| <Architecture>64-bit (x64)</Architecture> | |
| <Size>2797351968</Size> |