Skip to content

Commit d24215e

Browse files
v2.3: added Clear and GrabCut functions
1 parent 7e42662 commit d24215e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mainwindow.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,6 @@ void MainWindow::on_pushButton_draw_clear_clicked()
379379

380380
void MainWindow::on_pushButton_draw_grabcut_clicked()
381381
{
382-
SaveUndo();
383-
384382
Mat result, background, foreground;
385383

386384
result = Mat::zeros(image.rows, image.cols, CV_8UC1);
@@ -412,6 +410,8 @@ void MainWindow::on_pushButton_draw_grabcut_clicked()
412410
cv::inRange(result, GC_PR_FGD, GC_PR_FGD, mask_tmp);
413411
mask.setTo(Vec3b(255,0,0), mask_tmp); // Maybe = blue
414412

413+
SaveUndo();
414+
415415
ShowSegmentation(); // show view back to previous state
416416
}
417417

0 commit comments

Comments
 (0)