File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -378,6 +378,13 @@ MattingResult::MattingResult(const MattingResult& res) {
378
378
}
379
379
380
380
void MattingResult::Clear () {
381
+ alpha.clear ();
382
+ foreground.clear ();
383
+ shape.clear ();
384
+ contain_foreground = false ;
385
+ }
386
+
387
+ void MattingResult::Free () {
381
388
std::vector<float >().swap (alpha);
382
389
std::vector<float >().swap (foreground);
383
390
std::vector<int64_t >().swap (shape);
Original file line number Diff line number Diff line change @@ -316,9 +316,12 @@ struct FASTDEPLOY_DECL MattingResult : public BaseResult {
316
316
317
317
MattingResult () {}
318
318
MattingResult (const MattingResult& res);
319
- // / Clear detection result
319
+ // / Clear matting result
320
320
void Clear ();
321
321
322
+ // / Free matting result
323
+ void Free ();
324
+
322
325
void Reserve (int size);
323
326
324
327
void Resize (int size);
You can’t perform that action at this time.
0 commit comments