Created
July 17, 2020 15:53
-
-
Save mguludag/58dad11c55d1f179fc5b465fd44ed6e6 to your computer and use it in GitHub Desktop.
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> | |
| class MyCropLayer : public cv::dnn::Layer | |
| { | |
| public: | |
| explicit MyCropLayer(const cv::dnn::LayerParams ¶ms); | |
| static cv::Ptr<cv::dnn::Layer> create(cv::dnn::LayerParams ¶ms); | |
| virtual bool getMemoryShapes(const std::vector<std::vector<int>> &inputs, | |
| const int requiredOutputs, | |
| std::vector<std::vector<int>> &outputs, | |
| std::vector<std::vector<int>> &internals) const CV_OVERRIDE; | |
| virtual void forward(std::vector<cv::Mat *> &input, | |
| std::vector<cv::Mat> &output, | |
| std::vector<cv::Mat> &internals) CV_OVERRIDE; | |
| virtual void forward(cv::InputArrayOfArrays inputs_arr, | |
| cv::OutputArrayOfArrays outputs_arr, | |
| cv::OutputArrayOfArrays internals_arr) CV_OVERRIDE; | |
| }; | |
| #endif // MYCROPLAYER_HPP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment