Ask Your Question
0

How to replace the following opencv C api code into opencv c++ new api. [closed]

asked 2019-11-24 21:32:28 -0500

Gilal Nauman gravatar image

here is my code just help for replacing bellow lines i am working on codebook method 1- CvBGCodeBookModel* model = 0;

model = cvCreateBGCodeBookModel();
model->modMin[0] = 5;
model->modMin[1] = model->modMin[2] = 5;
model->modMax[0] = 15;
model->modMax[1] = model->modMax[2] = 15;
model->cbBounds[0] = model->cbBounds[1] = model->cbBounds[2] = 10;

2- cvBGCodeBookUpdate(model, yuvImage); 3- cvBGCodeBookClearStale(model, model->t / 2); 4- cvBGCodeBookDiff(model, yuvImage, ImaskCodeBook);

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by berak
close date 2019-11-25 01:48:06.768398

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-11-25 01:47:35 -0500

berak gravatar image

you can't. the code (and the idea behind it) were entirely removed in opencv3 already.

not only the api has changed, also the approach to background segmentation in general.

please use one of the existing bg subtraction models instead.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-11-24 21:32:28 -0500

Seen: 68 times

Last updated: Nov 25 '19