From 271f2bcf86d9f35047a51c33aa048bec2fb2e1d1 Mon Sep 17 00:00:00 2001 From: Hamdi Sahloul Date: Thu, 23 Aug 2018 18:47:13 +0900 Subject: [PATCH] UMat::getMat(): Utilize `ACCESS_READ` instead of 0 --- modules/optflow/src/sparse_matching_gpc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/optflow/src/sparse_matching_gpc.cpp b/modules/optflow/src/sparse_matching_gpc.cpp index d7b920d14..46cfede69 100644 --- a/modules/optflow/src/sparse_matching_gpc.cpp +++ b/modules/optflow/src/sparse_matching_gpc.cpp @@ -278,7 +278,7 @@ bool ocl_getAllDCTDescriptorsForImage( const Mat *imgCh, std::vector< GPCPatchDe (int)globSize[0], (int)globSize[1], (int)patchRadius ) .run( 2, globSize, 0, true ) == false ) return false; - Mat cpuOut = out.getMat( 0 ); + Mat cpuOut = out.getMat( ACCESS_READ ); for ( int i = 0; i + 2 * patchRadius < sz.height; ++i ) for ( int j = 0; j + 2 * patchRadius < sz.width; ++j ) descr.push_back( *cpuOut.ptr< GPCPatchDescriptor >( i * globSize[1] + j ) );