MCPcopy Create free account
hub / github.com/creatale/node-dv / generateRandomCenter

Function generateRandomCenter

deps/opencv/modules/core/src/matrix.cpp:2531–2537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2529{
2530
2531static void generateRandomCenter(const vector<Vec2f>& box, float* center, RNG& rng)
2532{
2533 size_t j, dims = box.size();
2534 float margin = 1.f/dims;
2535 for( j = 0; j < dims; j++ )
2536 center[j] = ((float)rng*(1.f+margin*2.f)-margin)*(box[j][1] - box[j][0]) + box[j][0];
2537}
2538
2539class KMeansPPDistanceComputer : public ParallelLoopBody
2540{

Callers 1

kmeansMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected