Layer.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. //
  2. // This file is auto-generated. Please don't modify it!
  3. //
  4. #pragma once
  5. #ifdef __cplusplus
  6. //#import "opencv.hpp"
  7. #import "opencv2/dnn.hpp"
  8. #import "opencv2/dnn/dnn.hpp"
  9. #else
  10. #define CV_EXPORTS
  11. #endif
  12. #import <Foundation/Foundation.h>
  13. #import "Algorithm.h"
  14. @class Mat;
  15. NS_ASSUME_NONNULL_BEGIN
  16. // C++: class Layer
  17. /**
  18. * This interface class allows to build new Layers - are building blocks of networks.
  19. *
  20. * Each class, derived from Layer, must implement allocate() methods to declare own outputs and forward() to compute outputs.
  21. * Also before using the new layer into networks you must register your layer by using one of REF: dnnLayerFactory "LayerFactory" macros.
  22. *
  23. * Member of `Dnn`
  24. */
  25. CV_EXPORTS @interface Layer : Algorithm
  26. #ifdef __cplusplus
  27. @property(readonly)cv::Ptr<cv::dnn::Layer> nativePtrLayer;
  28. #endif
  29. #ifdef __cplusplus
  30. - (instancetype)initWithNativePtr:(cv::Ptr<cv::dnn::Layer>)nativePtr;
  31. + (instancetype)fromNative:(cv::Ptr<cv::dnn::Layer>)nativePtr;
  32. #endif
  33. #pragma mark - Methods
  34. //
  35. // void cv::dnn::Layer::finalize(vector_Mat inputs, vector_Mat& outputs)
  36. //
  37. /**
  38. * Computes and sets internal parameters according to inputs, outputs and blobs.
  39. * @param outputs vector of already allocated output blobs
  40. *
  41. * If this method is called after network has allocated all memory for input and output blobs
  42. * and before inferencing.
  43. */
  44. - (void)finalize:(NSArray<Mat*>*)inputs outputs:(NSMutableArray<Mat*>*)outputs NS_SWIFT_NAME(finalize(inputs:outputs:));
  45. //
  46. // void cv::dnn::Layer::run(vector_Mat inputs, vector_Mat& outputs, vector_Mat& internals)
  47. //
  48. /**
  49. * Allocates layer and computes output.
  50. * @deprecated This method will be removed in the future release.
  51. */
  52. - (void)run:(NSArray<Mat*>*)inputs outputs:(NSMutableArray<Mat*>*)outputs internals:(NSMutableArray<Mat*>*)internals NS_SWIFT_NAME(run(inputs:outputs:internals:)) DEPRECATED_ATTRIBUTE;
  53. //
  54. // int cv::dnn::Layer::outputNameToIndex(String outputName)
  55. //
  56. /**
  57. * Returns index of output blob in output array.
  58. * @see `inputNameToIndex()`
  59. */
  60. - (int)outputNameToIndex:(NSString*)outputName NS_SWIFT_NAME(outputNameToIndex(outputName:));
  61. //
  62. // C++: vector_Mat cv::dnn::Layer::blobs
  63. //
  64. @property Mat* blobs;
  65. //
  66. // C++: String cv::dnn::Layer::name
  67. //
  68. @property (readonly) NSString* name;
  69. //
  70. // C++: String cv::dnn::Layer::type
  71. //
  72. @property (readonly) NSString* type;
  73. //
  74. // C++: int cv::dnn::Layer::preferableTarget
  75. //
  76. @property (readonly) int preferableTarget;
  77. @end
  78. NS_ASSUME_NONNULL_END