Ask Your Question
0

OpenCV 4 and TermCriteria CV_TERMCRIT_ITER [closed]

asked 2020-11-26 08:27:48 -0600

marius gravatar image

Hi,

I am using OpenCV and Android Ndk. I recently upgraded from OpenCV 3.5.0 to OpenCV 4.5.0 and I have some errors:

I have this line here:

kmeans(samples, nbClusters, clusters, TermCriteria(CV_TERMCRIT_ITER|CV_TERMCRIT_EPS, 10000, 0.0001), nbAttempts, KMEANS_PP_CENTERS, centers );

that throws this errors:

error: use of undeclared identifier 'CV_TERMCRIT_ITER'
error: use of undeclared identifier 'CV_TERMCRIT_EPS'

Can somebody help to find a solution ? thank you

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by marius
close date 2020-11-26 08:52:48.264603

Comments

OpenCV have moved to remove the CV_ prefixed

supra56 gravatar imagesupra56 ( 2020-11-26 08:46:15 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2020-11-26 08:52:35 -0600

marius gravatar image

I used TermCriteria::MAX_ITER|TermCriteria::EPS and it works

edit flag offensive delete link more

Comments

Glad u solved problem

supra56 gravatar imagesupra56 ( 2020-11-26 09:02:23 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-11-26 08:27:48 -0600

Seen: 5,966 times

Last updated: Nov 26 '20