/external/ceres-solver/internal/ceres/ |
D | canonical_views_clustering.cc | 65 vector<int>* centers, 71 const vector<int>& centers) const; 73 void ComputeClusterMembership(const vector<int>& centers, 89 vector<int>* centers, in ComputeCanonicalViewsClustering() argument 93 cv.ComputeClustering(options, graph, centers, membership); in ComputeCanonicalViewsClustering() 102 vector<int>* centers, in ComputeClustering() argument 105 CHECK_NOTNULL(centers)->clear(); in ComputeClustering() 121 ComputeClusteringQualityDifference(*view, *centers); in ComputeClustering() 133 (centers->size() >= options_.min_views)) { in ComputeClustering() 137 centers->push_back(best_view); in ComputeClustering() [all …]
|
D | canonical_views_clustering.h | 105 vector<int>* centers,
|
/external/opencv3/modules/features2d/src/ |
D | blobdetector.cpp | 79 …virtual void findBlobs(InputArray image, InputArray binaryImage, std::vector<Center> ¢ers) con… 190 …ctorImpl::findBlobs(InputArray _image, InputArray _binaryImage, std::vector<Center> ¢ers) const in findBlobs() 194 centers.clear(); in findBlobs() 291 centers.push_back(center); in findBlobs() 314 std::vector < std::vector<Center> > centers; in detect() local 326 for (size_t j = 0; j < centers.size(); j++) in detect() 328 … double dist = norm(centers[j][ centers[j].size() / 2 ].location - curCenters[i].location); in detect() 329 …isNew = dist >= params.minDistBetweenBlobs && dist >= centers[j][ centers[j].size() / 2 ].radius &… in detect() 332 centers[j].push_back(curCenters[i]); in detect() 334 size_t k = centers[j].size() - 1; in detect() [all …]
|
/external/opencv3/modules/core/src/ |
D | kmeans.cpp | 108 int* centers = &_centers[0]; in generateCentersPP() local 113 centers[0] = (unsigned)rng % N; in generateCentersPP() 117 dist[i] = normL2Sqr(data + step*i, data + step*centers[0], dims); in generateCentersPP() 148 centers[k] = bestCenter; in generateCentersPP() 155 const float* src = data + step*centers[k]; in generateCentersPP() 172 centers(_centers) in KMeansDistanceComputer() 180 const int K = centers.rows; in operator ()() 181 const int dims = centers.cols; in operator ()() 191 const float* center = centers.ptr<float>(k); in operator ()() 212 const Mat& centers; member in cv::KMeansDistanceComputer [all …]
|
/external/opencv3/3rdparty/libwebp/enc/ |
D | analysis.c | 80 const int centers[NUM_MB_SEGMENTS], in SetSegmentAlphas() 83 int min = centers[0], max = centers[0]; in SetSegmentAlphas() 88 if (min > centers[n]) min = centers[n]; in SetSegmentAlphas() 89 if (max < centers[n]) max = centers[n]; in SetSegmentAlphas() 95 const int alpha = 255 * (centers[n] - mid) / (max - min); in SetSegmentAlphas() 96 const int beta = 255 * (centers[n] - min) / (max - min); in SetSegmentAlphas() 148 int centers[NUM_MB_SEGMENTS]; in AssignSegments() local 165 centers[k++] = min_a + (n * range_a) / (2 * nb); in AssignSegments() 180 while (n < nb - 1 && abs(a - centers[n + 1]) < abs(a - centers[n])) { in AssignSegments() 197 displaced += abs(centers[n] - new_center); in AssignSegments() [all …]
|
/external/opencv3/modules/flann/include/opencv2/flann/ |
D | hierarchical_clustering_index.h | 108 …void chooseCentersRandom(int k, int* dsindices, int indices_length, int* centers, int& centers_len… in chooseCentersRandom() argument 124 centers[index] = dsindices[rnd]; in chooseCentersRandom() 127 … DistanceType sq = distance(dataset[centers[index]], dataset[centers[j]], dataset.cols); in chooseCentersRandom() 149 …void chooseCentersGonzales(int k, int* dsindices, int indices_length, int* centers, int& centers_l… in chooseCentersGonzales() argument 156 centers[0] = dsindices[rnd]; in chooseCentersGonzales() 164 … DistanceType dist = distance(dataset[centers[0]],dataset[dsindices[j]],dataset.cols); in chooseCentersGonzales() 166 … DistanceType tmp_dist = distance(dataset[centers[i]],dataset[dsindices[j]],dataset.cols); in chooseCentersGonzales() 177 centers[index] = dsindices[best_index]; in chooseCentersGonzales() 200 …void chooseCentersKMeanspp(int k, int* dsindices, int indices_length, int* centers, int& centers_l… in chooseCentersKMeanspp() argument 210 centers[0] = dsindices[index]; in chooseCentersKMeanspp() [all …]
|
D | kmeans_index.h | 107 …void chooseCentersRandom(int k, int* indices, int indices_length, int* centers, int& centers_lengt… in chooseCentersRandom() argument 123 centers[index] = indices[rnd]; in chooseCentersRandom() 126 … DistanceType sq = distance_(dataset_[centers[index]], dataset_[centers[j]], dataset_.cols); in chooseCentersRandom() 148 …void chooseCentersGonzales(int k, int* indices, int indices_length, int* centers, int& centers_len… in chooseCentersGonzales() argument 155 centers[0] = indices[rnd]; in chooseCentersGonzales() 163 … DistanceType dist = distance_(dataset_[centers[0]],dataset_[indices[j]],dataset_.cols); in chooseCentersGonzales() 165 … DistanceType tmp_dist = distance_(dataset_[centers[i]],dataset_[indices[j]],dataset_.cols); in chooseCentersGonzales() 176 centers[index] = indices[best_index]; in chooseCentersGonzales() 199 …void chooseCentersKMeanspp(int k, int* indices, int indices_length, int* centers, int& centers_len… in chooseCentersKMeanspp() argument 209 centers[0] = indices[index]; in chooseCentersKMeanspp() [all …]
|
D | flann_base.hpp | 279 …nst Matrix<typename Distance::ElementType>& points, Matrix<typename Distance::ResultType>& centers, in hierarchicalClustering() argument 285 int clusterNum = kmeans.getClusterCenters(centers); in hierarchicalClustering()
|
/external/webp/src/enc/ |
D | analysis.c | 77 const int centers[NUM_MB_SEGMENTS], in SetSegmentAlphas() 80 int min = centers[0], max = centers[0]; in SetSegmentAlphas() 85 if (min > centers[n]) min = centers[n]; in SetSegmentAlphas() 86 if (max < centers[n]) max = centers[n]; in SetSegmentAlphas() 92 const int alpha = 255 * (centers[n] - mid) / (max - min); in SetSegmentAlphas() 93 const int beta = 255 * (centers[n] - min) / (max - min); in SetSegmentAlphas() 149 int centers[NUM_MB_SEGMENTS]; in AssignSegments() local 170 centers[k] = min_a + (n * range_a) / (2 * nb); in AssignSegments() 185 while (n + 1 < nb && abs(a - centers[n + 1]) < abs(a - centers[n])) { in AssignSegments() 202 displaced += abs(centers[n] - new_center); in AssignSegments() [all …]
|
/external/opencv3/modules/cudaimgproc/src/cuda/ |
D | hough_circles.cu | 130 …__global__ void buildCentersList(const PtrStepSzi accum, unsigned int* centers, const int threshol… in buildCentersList() argument 149 centers[idx] = val; in buildCentersList() 154 int buildCentersList_gpu(PtrStepSzi accum, unsigned int* centers, int threshold) in buildCentersList_gpu() argument 166 buildCentersList<<<grid, block>>>(accum, centers, threshold); in buildCentersList_gpu() 180 …__global__ void circlesAccumRadius(const unsigned int* centers, const unsigned int* list, const in… in circlesAccumRadius() argument 190 unsigned int val = centers[blockIdx.x]; in circlesAccumRadius() 229 …int circlesAccumRadius_gpu(const unsigned int* centers, int centersCount, const unsigned int* list… in circlesAccumRadius_gpu() argument 243 …circlesAccumRadius<<<grid, block, smemSize>>>(centers, list, count, circles, maxCircles, dp, minRa… in circlesAccumRadius_gpu()
|
/external/opencv3/modules/calib3d/misc/java/test/ |
D | Calib3dTest.java | 196 Mat centers = new Mat(); in testFindCirclesGridMatSizeMat() local 198 assertFalse(Calib3d.findCirclesGrid(img, new Size(5, 5), centers)); in testFindCirclesGridMatSizeMat() 206 assertTrue(Calib3d.findCirclesGrid(img, new Size(5, 5), centers)); in testFindCirclesGridMatSizeMat() 208 assertEquals(25, centers.rows()); in testFindCirclesGridMatSizeMat() 209 assertEquals(1, centers.cols()); in testFindCirclesGridMatSizeMat() 210 assertEquals(CvType.CV_32FC2, centers.type()); in testFindCirclesGridMatSizeMat() 217 Mat centers = new Mat(); in testFindCirclesGridMatSizeMatInt() local 219 … assertFalse(Calib3d.findCirclesGrid(img, new Size(3, 5), centers, Calib3d.CALIB_CB_CLUSTERING in testFindCirclesGridMatSizeMatInt() 231 assertTrue(Calib3d.findCirclesGrid(img, new Size(3, 5), centers, Calib3d.CALIB_CB_CLUSTERING in testFindCirclesGridMatSizeMatInt() 234 assertEquals(15, centers.rows()); in testFindCirclesGridMatSizeMatInt() [all …]
|
/external/opencv3/modules/cudaimgproc/src/ |
D | hough_circles.cpp | 64 int buildCentersList_gpu(PtrStepSzi accum, unsigned int* centers, int threshold); 65 …int circlesAccumRadius_gpu(const unsigned int* centers, int centersCount, const unsigned int* list… 188 unsigned int* centers = list_.ptr<unsigned int>(1); in detect() local 204 int centersCount = buildCentersList_gpu(accum_, centers, votesThreshold_); in detect() 220 …cudaSafeCall( cudaMemcpy(oldBuf, centers, centersCount * sizeof(ushort2), cudaMemcpyDeviceToHost) … in detect() 292 …cudaSafeCall( cudaMemcpy(centers, newBuf, newCount * sizeof(unsigned int), cudaMemcpyHostToDevice)… in detect() 298 …int circlesCount = circlesAccumRadius_gpu(centers, centersCount, srcPoints, pointsCount, result_.p… in detect()
|
/external/opencv3/doc/py_tutorials/py_ml/py_kmeans/py_kmeans_opencv/ |
D | py_kmeans_opencv.markdown | 28 -# **flags** : This flag is used to specify how initial centers are taken. Normally two flags are 34 centers. 37 -# **centers** : This is array of centers of clusters. 79 compactness,labels,centers = cv2.kmeans(z,2,None,criteria,10,flags) 81 This gives us the compactness, labels and centers. In this case, I got centers as 60 and 207. Labels 90 # Now plot 'A' in red, 'B' in blue, 'centers' in yellow 93 plt.hist(centers,32,[0,256],color = 'y')
|
/external/opencv3/modules/flann/include/opencv2/ |
D | flann.hpp | 518 int hierarchicalClustering(const Mat& features, Mat& centers, const ::cvflann::KMeansIndexParams& p… in hierarchicalClustering() argument 528 CV_Assert(centers.type() == CvType<DistanceType>::type()); in hierarchicalClustering() 529 CV_Assert(centers.isContinuous()); in hierarchicalClustering() 530 …ann::Matrix<DistanceType> m_centers((DistanceType*)centers.ptr<DistanceType>(0), centers.rows, cen… in hierarchicalClustering() 538 FLANN_DEPRECATED int hierarchicalClustering(const Mat& features, Mat& centers, const ::cvflann::KMe… in hierarchicalClustering() argument 544 return hierarchicalClustering< L2<ELEM_TYPE> >(features, centers, params); in hierarchicalClustering() 547 return hierarchicalClustering< L1<ELEM_TYPE> >(features, centers, params); in hierarchicalClustering()
|
/external/opencv3/modules/calib3d/src/ |
D | calibinit.cpp | 1110 cv::AutoBuffer<CvPoint2D32f> centers( quad_count ); in icvCleanFoundConnectedQuads() local 1128 centers[i] = ci; in icvCleanFoundConnectedQuads() 1151 CvPoint2D32f temp = centers[skip]; // temporarily make index 'skip' the same as in icvCleanFoundConnectedQuads() 1152 … centers[skip] = center; // pattern center (so it is not counted for convex hull) in icvCleanFoundConnectedQuads() 1153 CvMat pointMat = cvMat(1, quad_count, CV_32FC2, centers); in icvCleanFoundConnectedQuads() 1155 centers[skip] = temp; in icvCleanFoundConnectedQuads() 1194 centers[min_box_area_index] = centers[quad_count]; in icvCleanFoundConnectedQuads() 1952 std::vector<Point2f> centers; in findCirclesGrid() local 1965 circlesGridClusterFinder.findGrid(points, patternSize, centers); in findCirclesGrid() 1966 Mat(centers).copyTo(_centers); in findCirclesGrid() [all …]
|
D | circlesgrid.cpp | 138 …dGrid(const std::vector<cv::Point2f> &points, cv::Size _patternSize, std::vector<Point2f>& centers) in findGrid() argument 141 centers.clear(); in findGrid() 188 parsePatternPoints(patternPoints, rectifiedPatternPoints, centers); in findGrid() 392 …nPoints, const std::vector<cv::Point2f> &rectifiedPatternPoints, std::vector<cv::Point2f> ¢ers) in parsePatternPoints() argument 397 centers.clear(); in parsePatternPoints() 415 centers.push_back(patternPoints.at(indicesbuf[0])); in parsePatternPoints() 422 centers.clear(); in parsePatternPoints() 816 Mat CirclesGridFinder::rectifyGrid(Size detectedGridSize, const std::vector<Point2f>& centers, in rectifyGrid() argument 819 CV_Assert( !centers.empty() ); in rectifyGrid() 825 … getDirection(centers[0], centers[detectedGridSize.width - 1], centers[centers.size() - 1]) < 0; in rectifyGrid() [all …]
|
D | circlesgrid.hpp | 65 …d(const std::vector<cv::Point2f> &points, cv::Size patternSize, std::vector<cv::Point2f>& centers); 74 …Points, const std::vector<cv::Point2f> &rectifiedPatternPoints, std::vector<cv::Point2f> ¢ers); 152 …static cv::Mat rectifyGrid(cv::Size detectedGridSize, const std::vector<cv::Point2f>& centers, con…
|
/external/opencv3/samples/cpp/ |
D | delaunay2.cpp | 81 vector<Point2f> centers; in paint_voronoi() local 82 subdiv.getVoronoiFacetList(vector<int>(), facets, centers); in paint_voronoi() 101 circle(img, centers[i], 3, Scalar(), FILLED, LINE_AA, 0); in paint_voronoi()
|
D | kmeans.cpp | 40 Mat centers; in main() local 58 3, KMEANS_PP_CENTERS, centers); in main()
|
/external/opencv/ml/src/ |
D | mlem.cpp | 576 CvMat* centers = 0; in kmeans() local 595 CV_CALL( centers = cvCreateMat( nclusters, dims, CV_64FC1 )); in kmeans() 602 CV_CALL( cvConvert( centers0, centers )); in kmeans() 625 const double* c = (double*)(centers->data.ptr + k*centers->step); in kmeans() 658 CV_SWAP( centers, old_centers, temp ); in kmeans() 659 cvZero( centers ); in kmeans() 667 double* c = (double*)(centers->data.ptr + k*centers->step); in kmeans() 693 double* c = (double*)(centers->data.ptr + k*centers->step); in kmeans() 754 cvReleaseMat( ¢ers ); in kmeans()
|
D | ml_inner_functions.cpp | 267 CvMat* centers = _centers; in icvGenerateRandomClusterCenters() local 286 CV_CALL(centers = cvCreateMat (num_of_clusters, dim, CV_32FC1)); in icvGenerateRandomClusterCenters() 295 CV_CALL(centers = cvCreateMat (num_of_clusters, dim, CV_64FC1)); in icvGenerateRandomClusterCenters() 308 CV_CALL(cvGetCol (centers, ¢ers_comp, i)); in icvGenerateRandomClusterCenters() 314 if( (cvGetErrStatus () < 0) || (centers != _centers) ) in icvGenerateRandomClusterCenters() 315 cvReleaseMat (¢ers); in icvGenerateRandomClusterCenters() 317 return _centers ? _centers : centers; in icvGenerateRandomClusterCenters() 1414 const CvMat* centers, CvMat* dst_centers, in cvWritebackLabels() argument 1469 if( dst_centers && (!centers || centers->data.ptr != dst_centers->data.ptr) ) in cvWritebackLabels() 1473 if( !centers ) in cvWritebackLabels() [all …]
|
/external/opencv3/apps/traincascade/ |
D | old_ml_inner_functions.cpp | 267 CvMat* centers = _centers; in icvGenerateRandomClusterCenters() local 286 CV_CALL(centers = cvCreateMat (num_of_clusters, dim, CV_32FC1)); in icvGenerateRandomClusterCenters() 295 CV_CALL(centers = cvCreateMat (num_of_clusters, dim, CV_64FC1)); in icvGenerateRandomClusterCenters() 308 CV_CALL(cvGetCol (centers, ¢ers_comp, i)); in icvGenerateRandomClusterCenters() 314 if( (cvGetErrStatus () < 0) || (centers != _centers) ) in icvGenerateRandomClusterCenters() 315 cvReleaseMat (¢ers); in icvGenerateRandomClusterCenters() 317 return _centers ? _centers : centers; in icvGenerateRandomClusterCenters() 1340 const CvMat* centers, CvMat* dst_centers, in cvWritebackLabels() argument 1395 if( dst_centers && (!centers || centers->data.ptr != dst_centers->data.ptr) ) in cvWritebackLabels() 1399 if( !centers ) in cvWritebackLabels() [all …]
|
/external/opencv3/modules/core/perf/ |
D | perf_math.cpp | 37 Mat labels, centers; variable 56 attempts, KMEANS_PP_CENTERS, centers); in TEST_CYCLE()
|
/external/opencv/cxcore/src/ |
D | cxutils.cpp | 48 CvMat* centers = 0; in cvKMeans2() local 94 CV_CALL( centers = cvCreateMat( cluster_count, dims, CV_64FC1 )); in cvKMeans2() 108 cvZero( centers ); in cvKMeans2() 115 double* c = (double*)(centers->data.ptr + k*centers->step); in cvKMeans2() 140 double* c = (double*)(centers->data.ptr + k*centers->step); in cvKMeans2() 178 double* c = (double*)(centers->data.ptr + k*centers->step); in cvKMeans2() 211 CV_SWAP( centers, old_centers, temp ); in cvKMeans2() 236 cvReleaseMat( ¢ers ); in cvKMeans2()
|
/external/opencv/cv/src/ |
D | cvhough.cpp | 872 CvSeq *nz, *centers; in icvHoughCirclesGradient() local 892 CV_CALL( centers = cvCreateSeq( CV_32SC1, sizeof(CvSeq), sizeof(int), storage )); in icvHoughCirclesGradient() 970 cvSeqPush(centers, &base); in icvHoughCirclesGradient() 974 center_count = centers->total; in icvHoughCirclesGradient() 979 cvCvtSeqToArray( centers, sort_buf ); in icvHoughCirclesGradient() 982 cvClearSeq( centers ); in icvHoughCirclesGradient() 983 cvSeqPushMulti( centers, sort_buf, center_count ); in icvHoughCirclesGradient() 992 for( i = 0; i < centers->total; i++ ) in icvHoughCirclesGradient() 994 int ofs = *(int*)cvGetSeqElem( centers, i ); in icvHoughCirclesGradient()
|