MauiKit Image Tools

mycroplayer.hpp
1/*****************************************************************************
2 * mycroplayer.hpp
3 *
4 * Created: 5/28/2020 2020 by mguludag
5 *
6 * Copyright 2020 mguludag. All rights reserved.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining
9 * a copy of this software and associated documentation files (the
10 * "Software"), to deal in the Software without restriction, including
11 * without limitation the rights to use, copy, modify, merge, publish,
12 * distribute, sublicense, and/or sell copies of the Software, and to
13 * permit persons to whom the Software is furnished to do so, subject to
14 * the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be
17 * included in all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
23 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
24 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
25 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 *****************************************************************************/
27#ifndef MYCROPLAYER_HPP
28#define MYCROPLAYER_HPP
29
30#include <opencv2/dnn.hpp>
31#include <opencv2/dnn/layer.details.hpp>
32#include <opencv2/dnn/shape_utils.hpp>
33
34namespace cv {
35namespace dnn {
36class MyCropLayer;
37}
38} // namespace cv
39
40class MyCropLayer : public cv::dnn::Layer
41{
42public:
43 explicit MyCropLayer(const cv::dnn::LayerParams &params);
44 static cv::Ptr<Layer> create(cv::dnn::LayerParams &params);
45 virtual bool getMemoryShapes(const std::vector<std::vector<int>> &inputs,
46 const int requiredOutputs,
47 std::vector<std::vector<int>> &outputs,
48 std::vector<std::vector<int>> &internals) const CV_OVERRIDE;
49 virtual void forward(std::vector<cv::Mat *> &input,
50 std::vector<cv::Mat> &output,
51 std::vector<cv::Mat> &internals) CV_OVERRIDE;
52 virtual void forward(cv::InputArrayOfArrays inputs_arr,
53 cv::OutputArrayOfArrays outputs_arr,
54 cv::OutputArrayOfArrays internals_arr) CV_OVERRIDE;
55};
56
57#endif // MYCROPLAYER_HPP
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Apr 11 2025 11:57:09 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.