File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -211,8 +211,10 @@ namespace cv
211
211
212
212
if ( descriptors.needed () )
213
213
{
214
- Mat& desc = descriptors. getMatRef () ;
214
+ Mat desc;
215
215
impl.Compute_Descriptors (keypoints, desc);
216
+ // TODO optimize this copy
217
+ desc.copyTo (descriptors);
216
218
217
219
CV_Assert ((!desc.rows || desc.cols == descriptorSize ()));
218
220
CV_Assert ((!desc.rows || (desc.type () == descriptorType ())));
Original file line number Diff line number Diff line change @@ -151,8 +151,9 @@ namespace cv
151
151
152
152
if ( descriptors.needed () )
153
153
{
154
- Mat& desc = descriptors. getMatRef () ;
154
+ Mat desc;
155
155
impl.Feature_Description (keypoints, desc);
156
+ desc.copyTo (descriptors);
156
157
157
158
CV_Assert ((!desc.rows || desc.cols == descriptorSize ()));
158
159
CV_Assert ((!desc.rows || (desc.type () == descriptorType ())));
You can’t perform that action at this time.
0 commit comments