1 | initial version |
Just guess (never tried this): may be it is worth do use ROI(1x1px), copy it to a new 1x1 oclMat and download this small matrix. Accoring to docs if you try download a part of oclMat then all matrix is transferring: "Data transfer between Mat and oclMat: ROI is a feature of OpenCV, which allow users process a sub rectangle of a matrix. When a CPU matrix which has ROI will be transfered to GPU, the whole matrix will be transfered and set ROI as CPU’s. In a word, we always transfer the whole matrix despite whether it has ROI or not." -- row(i).col(j) is a kind of ROI and this is your case.
2 | No.2 Revision |
Just guess (never tried this): may be it is worth do use ROI(1x1px), copy it to a new 1x1 oclMat and download this small matrix. Accoring to docs if you try download a part of oclMat then all matrix is transferring: transferred: "Data transfer between Mat and oclMat: ROI is a feature of OpenCV, which allow users process a sub rectangle of a matrix. When a CPU matrix which has ROI will be transfered to GPU, the whole matrix will be transfered and set ROI as CPU’s. In a word, we always transfer the whole matrix despite whether it has ROI or not." -- row(i).col(j) is a kind of ROI and this is your case.