Main Content

gather

Retrieve cornerPoints from the GPU

Description

example

pointsCPU = gather(pointsGPU) returns a cornerPoints object with data gathered from the GPU for the Location and Metric properties.

Examples

collapse all

Read an image.

I = imread('cameraman.tif')
I = 256×256 uint8 matrix

   156   159   158   155   158   156   159   158   157   158   158   159   160   160   160   158   163   161   162   160   164   160   165   163   161   163   161   164   165   162   161   165   165   164   166   165   164   166   167   165   165   164   170   166   167   167   170   168   169   166
   160   154   157   158   157   159   158   158   158   160   155   156   159   158   160   157   165   159   161   158   162   162   161   163   159   162   164   163   164   165   169   164   163   165   161   163   165   168   167   165   164   163   169   169   169   170   170   169   170   170
   156   159   158   155   158   156   159   158   157   158   158   159   160   160   160   158   163   161   162   160   164   160   165   163   161   163   161   164   165   162   161   165   165   164   166   165   164   166   167   165   165   164   170   166   167   167   170   168   169   166
   160   154   157   158   157   159   158   158   158   160   155   156   159   158   160   157   165   159   161   158   162   162   161   163   159   162   164   163   164   165   169   164   163   165   161   163   165   168   167   165   164   163   169   169   169   170   170   169   170   170
   156   153   155   159   159   155   156   155   155   157   155   154   154   158   162   157   157   158   157   159   161   160   161   157   157   156   159   160   161   164   158   161   163   158   164   165   165   162   160   160   166   169   166   164   164   167   167   164   168   164
   155   155   155   157   156   159   152   158   156   158   152   153   159   156   157   161   160   158   161   159   159   159   161   162   162   160   165   160   162   159   164   163   165   164   167   167   167   164   169   166   166   172   165   166   169   170   169   169   170   170
   156   153   157   156   153   155   154   155   157   156   155   156   155   157   158   160   157   160   161   162   162   159   161   158   155   159   160   162   161   158   163   166   165   161   164   167   165   168   168   170   165   166   168   169   168   169   169   170   170   166
   159   159   156   158   156   159   157   161   162   157   157   159   161   156   163   158   159   161   158   163   163   163   157   162   159   166   163   159   168   167   165   162   168   168   167   171   170   169   167   170   170   171   172   172   172   170   174   172   172   176
   158   155   158   154   156   160   162   155   159   161   156   161   160   155   158   161   162   162   161   163   158   156   165   160   164   160   164   161   167   167   167   168   167   170   167   171   174   169   170   171   175   170   171   168   168   168   171   171   174   170
   155   154   157   158   160   160   159   160   158   161   160   160   158   161   158   160   162   159   163   161   156   159   158   159   159   161   161   162   165   163   165   167   167   169   164   169   167   168   166   166   168   165   166   168   167   169   169   171   168   171
      ⋮

Create a GPU array object.

I = gpuArray(I);

Find and display Harris features in the image.

pointsGPU = detectHarrisFeatures(I);
imshow(I); 
hold on;
plot(pointsGPU.selectStrongest(50));

Copy the corner points to the CPU for further processing.

pointsCPU = gather(pointsGPU);

Input Arguments

collapse all

GPU points, specified as a cornerPoints object.

Version History

Introduced in R2012a

See Also