Loading modules/optflow/src/pcaflow.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -328,7 +328,8 @@ void OpticalFlowPCAFlow::getSystem( OutputArray AOut, OutputArray b1Out, OutputA Mat b2 = b2Out.getMat(); ocl::Kernel kernel( "fillDCTSampledPoints", _ocl_fillDCTSampledPointsSource ); size_t globSize[] = {features.size(), basisSize.width, basisSize.height}; CV_Assert(basisSize.width > 0 && basisSize.height > 0); size_t globSize[] = {features.size(), (size_t)basisSize.width, (size_t)basisSize.height}; kernel .args( cv::ocl::KernelArg::ReadOnlyNoSize( Mat( features ).getUMat( ACCESS_READ ) ), cv::ocl::KernelArg::WriteOnlyNoSize( A ), (int)features.size(), (int)basisSize.width, Loading Loading @@ -376,7 +377,8 @@ void OpticalFlowPCAFlow::getSystem( OutputArray A1Out, OutputArray A2Out, Output Mat b2 = b2Out.getMat(); ocl::Kernel kernel( "fillDCTSampledPoints", _ocl_fillDCTSampledPointsSource ); size_t globSize[] = {features.size(), basisSize.width, basisSize.height}; CV_Assert(basisSize.width > 0 && basisSize.height > 0); size_t globSize[] = {features.size(), (size_t)basisSize.width, (size_t)basisSize.height}; kernel .args( cv::ocl::KernelArg::ReadOnlyNoSize( Mat( features ).getUMat( ACCESS_READ ) ), cv::ocl::KernelArg::WriteOnlyNoSize( A ), (int)features.size(), (int)basisSize.width, Loading modules/optflow/src/sparse_matching_gpc.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -267,7 +267,9 @@ bool ocl_getAllDCTDescriptorsForImage( const Mat *imgCh, std::vector< GPCPatchDe const Size sz = imgCh[0].size(); ocl::Kernel kernel( "getPatchDescriptor", ocl::optflow::sparse_matching_gpc_oclsrc, format( "-DPATCH_RADIUS_DOUBLED=%d -DCV_PI=%f -DSQRT2_INV=%f", PATCH_RADIUS_DOUBLED, CV_PI, SQRT2_INV ) ); size_t globSize[] = {sz.height - 2 * patchRadius, sz.width - 2 * patchRadius}; CV_Assert(sz.height - 2 * patchRadius > 0); CV_Assert(sz.width - 2 * patchRadius > 0); size_t globSize[] = {(size_t)(sz.height - 2 * patchRadius), (size_t)(sz.width - 2 * patchRadius)}; UMat out( globSize[0] * globSize[1], GPCPatchDescriptor::nFeatures, CV_64F ); if ( kernel Loading modules/ximgproc/samples/colorize.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -338,11 +338,11 @@ void drawTrajectoryByReference(cv::Mat& img) if(drawByReference) { cv::circle(img, cv::Point2d(x, y), 0.1, cv::Scalar(blue, green, red), -1); cv::circle(img, cv::Point2d(x, y), 1, cv::Scalar(blue, green, red), -1); } else { cv::circle(img, cv::Point2d(x, y), 0.1, cv::Scalar(draw_b, draw_g, draw_r), -1); cv::circle(img, cv::Point2d(x, y), 1, cv::Scalar(draw_b, draw_g, draw_r), -1); } } } Loading Loading
modules/optflow/src/pcaflow.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -328,7 +328,8 @@ void OpticalFlowPCAFlow::getSystem( OutputArray AOut, OutputArray b1Out, OutputA Mat b2 = b2Out.getMat(); ocl::Kernel kernel( "fillDCTSampledPoints", _ocl_fillDCTSampledPointsSource ); size_t globSize[] = {features.size(), basisSize.width, basisSize.height}; CV_Assert(basisSize.width > 0 && basisSize.height > 0); size_t globSize[] = {features.size(), (size_t)basisSize.width, (size_t)basisSize.height}; kernel .args( cv::ocl::KernelArg::ReadOnlyNoSize( Mat( features ).getUMat( ACCESS_READ ) ), cv::ocl::KernelArg::WriteOnlyNoSize( A ), (int)features.size(), (int)basisSize.width, Loading Loading @@ -376,7 +377,8 @@ void OpticalFlowPCAFlow::getSystem( OutputArray A1Out, OutputArray A2Out, Output Mat b2 = b2Out.getMat(); ocl::Kernel kernel( "fillDCTSampledPoints", _ocl_fillDCTSampledPointsSource ); size_t globSize[] = {features.size(), basisSize.width, basisSize.height}; CV_Assert(basisSize.width > 0 && basisSize.height > 0); size_t globSize[] = {features.size(), (size_t)basisSize.width, (size_t)basisSize.height}; kernel .args( cv::ocl::KernelArg::ReadOnlyNoSize( Mat( features ).getUMat( ACCESS_READ ) ), cv::ocl::KernelArg::WriteOnlyNoSize( A ), (int)features.size(), (int)basisSize.width, Loading
modules/optflow/src/sparse_matching_gpc.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -267,7 +267,9 @@ bool ocl_getAllDCTDescriptorsForImage( const Mat *imgCh, std::vector< GPCPatchDe const Size sz = imgCh[0].size(); ocl::Kernel kernel( "getPatchDescriptor", ocl::optflow::sparse_matching_gpc_oclsrc, format( "-DPATCH_RADIUS_DOUBLED=%d -DCV_PI=%f -DSQRT2_INV=%f", PATCH_RADIUS_DOUBLED, CV_PI, SQRT2_INV ) ); size_t globSize[] = {sz.height - 2 * patchRadius, sz.width - 2 * patchRadius}; CV_Assert(sz.height - 2 * patchRadius > 0); CV_Assert(sz.width - 2 * patchRadius > 0); size_t globSize[] = {(size_t)(sz.height - 2 * patchRadius), (size_t)(sz.width - 2 * patchRadius)}; UMat out( globSize[0] * globSize[1], GPCPatchDescriptor::nFeatures, CV_64F ); if ( kernel Loading
modules/ximgproc/samples/colorize.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -338,11 +338,11 @@ void drawTrajectoryByReference(cv::Mat& img) if(drawByReference) { cv::circle(img, cv::Point2d(x, y), 0.1, cv::Scalar(blue, green, red), -1); cv::circle(img, cv::Point2d(x, y), 1, cv::Scalar(blue, green, red), -1); } else { cv::circle(img, cv::Point2d(x, y), 0.1, cv::Scalar(draw_b, draw_g, draw_r), -1); cv::circle(img, cv::Point2d(x, y), 1, cv::Scalar(draw_b, draw_g, draw_r), -1); } } } Loading