@@ -159,25 +159,15 @@ void cv::cuda::cartToPolar(InputArray _xy, OutputArray _mag, OutputArray _angle,
159
159
GpuMat_<float > magc (mag);
160
160
GpuMat_<float > anglec (angle);
161
161
162
+ gridTransformUnary (globPtr<float2 >(xy), globPtr<float >(magc), magnitude_interleaved_func<float2 >(), stream);
163
+
162
164
if (angleInDegrees)
163
165
{
164
- auto f1 = magnitude_interleaved_func<float2 >();
165
- auto f2 = direction_interleaved_func<float2 , true >();
166
- cv::cudev::tuple<decltype (f1), decltype (f2)> f12 = cv::cudev::make_tuple (f1, f2);
167
- gridTransformTuple (globPtr<float2 >(xy),
168
- tie (magc, anglec),
169
- f12,
170
- stream);
166
+ gridTransformUnary (globPtr<float2 >(xy), globPtr<float >(anglec), direction_interleaved_func<float2 , true >(), stream);
171
167
}
172
168
else
173
169
{
174
- auto f1 = magnitude_interleaved_func<float2 >();
175
- auto f2 = direction_interleaved_func<float2 , false >();
176
- cv::cudev::tuple<decltype (f1), decltype (f2)> f12 = cv::cudev::make_tuple (f1, f2);
177
- gridTransformTuple (globPtr<float2 >(xy),
178
- tie (magc, anglec),
179
- f12,
180
- stream);
170
+ gridTransformUnary (globPtr<float2 >(xy), globPtr<float >(anglec), direction_interleaved_func<float2 , false >(), stream);
181
171
}
182
172
183
173
syncOutput (mag, _mag, stream);
@@ -191,7 +181,7 @@ void cv::cuda::cartToPolar(InputArray _xy, OutputArray _magAngle, bool angleInDe
191
181
CV_Assert ( xy.type () == CV_32FC2 );
192
182
193
183
GpuMat magAngle = getOutputMat (_magAngle, xy.size (), CV_32FC2, stream);
194
-
184
+
195
185
if (angleInDegrees)
196
186
{
197
187
gridTransformUnary (globPtr<float2 >(xy),
0 commit comments