@@ -94,9 +94,14 @@ class GAPI_EXPORTS GCPUContext
9494 {
9595 return outVecRef (output).wref <T>();
9696 }
97+ template <typename T> T& outOpaqueR (int output) // FIXME: the same issue
98+ {
99+ return outOpaqueRef (output).wref <T>();
100+ }
97101
98102protected:
99103 detail::VectorRef& outVecRef (int output);
104+ detail::OpaqueRef& outOpaqueRef (int output);
100105
101106 std::vector<GArg> m_args;
102107
@@ -145,12 +150,31 @@ template<typename U> struct get_in<cv::GArray<U> >
145150{
146151 static const std::vector<U>& get (GCPUContext &ctx, int idx) { return ctx.inArg <VectorRef>(idx).rref <U>(); }
147152};
153+ template <typename U> struct get_in <cv::GOpaque<U> >
154+ {
155+ static const U& get (GCPUContext &ctx, int idx) { return ctx.inArg <OpaqueRef>(idx).rref <U>(); }
156+ };
148157
149158// FIXME(dm): GArray<Mat>/GArray<GMat> conversion should be done more gracefully in the system
150159template <> struct get_in <cv::GArray<cv::GMat> >: public get_in<cv::GArray<cv::Mat> >
151160{
152161};
153162
163+ // FIXME(dm): GArray<Scalar>/GArray<GScalar> conversion should be done more gracefully in the system
164+ template <> struct get_in <cv::GArray<cv::GScalar> >: public get_in<cv::GArray<cv::Scalar> >
165+ {
166+ };
167+
168+ // FIXME(dm): GOpaque<Mat>/GOpaque<GMat> conversion should be done more gracefully in the system
169+ template <> struct get_in <cv::GOpaque<cv::GMat> >: public get_in<cv::GOpaque<cv::Mat> >
170+ {
171+ };
172+
173+ // FIXME(dm): GOpaque<Scalar>/GOpaque<GScalar> conversion should be done more gracefully in the system
174+ template <> struct get_in <cv::GOpaque<cv::GScalar> >: public get_in<cv::GOpaque<cv::Mat> >
175+ {
176+ };
177+
154178template <class T > struct get_in
155179{
156180 static T get (GCPUContext &ctx, int idx) { return ctx.inArg <T>(idx); }
@@ -229,6 +253,13 @@ template<typename U> struct get_out<cv::GArray<U>>
229253 return ctx.outVecR <U>(idx);
230254 }
231255};
256+ template <typename U> struct get_out <cv::GOpaque<U>>
257+ {
258+ static U& get (GCPUContext &ctx, int idx)
259+ {
260+ return ctx.outOpaqueR <U>(idx);
261+ }
262+ };
232263
233264template <typename , typename , typename >
234265struct OCVCallHelper ;
0 commit comments