2015-02-02 09:47:54 -0600 | asked a question | [OPENCV GPU] How can I convert GpuMat and Vector<Point2f> Hello, I am trying to implement a tracking solution in OpenCV 2.4.10 with GPU support. So first I am extracting GFTT points : Then I want to perform some computation on d_points before putting them in the PyrLKOpticalFlow tracker. So there is two solutions: Download in a vector<points2f> or directly work with d_points. 1) Download in a vector<point2f> I can easily download data in a vector of Points2f. For that I use the method: but I am not able to re-upload the modified data in d_points with the same structure (a GpuMat of 1 row, N columns, and Points2f data type). At best, I can obtain a structure like : GpuMat, 2 rows, N columns, and float data type; which is not readable by the PyrLKOpticalFlow tracker. I tried several things : 2) Directly modify the GpuMat d_points I found several way to access d_points element, but every time I try to cout them I have a segmentation fault. I know that d_points.cols = N and d_points.rows = 1. I tried this way : But if I cout I get a segmentation fault. And I also tried : But when I want to access pixel_ptr, I also get a segmentation fault. Is there a way to modify d_points (GpuMat with a special structure) or to access the data, modify it and re-upload it ? Thank you for help ! |