Ask Your Question
0

BOWKMeansTrainer constructor

asked 2017-11-29 06:40:03 -0600

sama_z gravatar image

updated 2017-11-29 06:43:53 -0600

Hi, I have a question regarding BOWKMeansTrainer constructor. Would anyone please tell me what are the parameters of the constructor? I had a look at opencv document, but I could not find any useful information.

So far I know it has these parameters BOWKMeansTrainer::BOWKMeansTrainer(int clusterCount, const TermCriteria& termcrit=TermCriteria(), int attempts=3, int flags=KMEANS_PP_CENTERS ) And I know clusterCount is the dictionary size/number of clusters. I also guess that attempts is the K parameter for K-Mean. It means if it's 3 the trainer will calculate 3-Means/3 steps.

But I want to know what are the rests task?

Many thanks in advance,

Bests,

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-11-29 07:32:27 -0600

arigarcia gravatar image

See:

  • K is clusters number in TermCriteria you can to define iterations numbers and rules for terminations, for instance TermCriteria (EPS + MAX_ITER, 1000, 0.1), so when you iteration = MAX_ITER = 1000 or epsilon = 0.1 your running will stop
  • flag KMEANS_PP_CENTERS says that will run kmean++ algorithm;
  • attemps: number of initializations of the algorithm

See example in https://docs.opencv.org/3.3.0/de/d63/....

edit flag offensive delete link more

Comments

Thanks for the comment. Could you explain more about iteration? which iteration you mean? Is this means value from each clustering level? I know so far how K-means is working, but what is K-means plus plus? What are the differences between them?

sama_z gravatar imagesama_z ( 2017-11-29 08:27:14 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-11-29 06:40:03 -0600

Seen: 464 times

Last updated: Nov 29 '17