Exemplo n.º 1
0
void Clustering::clusterConfidentIndices() {
	int numConfidentIndices = detectionResult->confidentIndices.size();
	std::vector<float> distances;
	distances.resize(numConfidentIndices*(numConfidentIndices-1)/2);
	calcDistances(distances.data());
	std::vector<int> clusterIndices;
	clusterIndices.resize(numConfidentIndices);
	cluster(distances.data(), clusterIndices.data());
	if(detectionResult->numClusters == 1) {
		calcMeanRect(&detectionResult->confidentIndices);
		//TODO: Take the maximum confidence as the result confidence.
	}
}
Exemplo n.º 2
0
void Clustering::clusterConfidentIndices() {
	int numConfidentIndices = detectionResult->confidentIndices->size();
	float * distances = new float[numConfidentIndices*(numConfidentIndices-1)/2];
	calcDistances(distances);
	int * clusterIndices = new int[numConfidentIndices];
	cluster(distances, clusterIndices);
	if(detectionResult->numClusters == 1) {
		calcMeanRect(detectionResult->confidentIndices);
		//TODO: Take the maximum confidence as the result confidence.
	}


}
Exemplo n.º 3
0
    void Clustering::clusterConfidentIndices() {
        size_t numConfidentIndices = detectionResult->confidentIndices->size();
        size_t numDistances = numConfidentIndices * (numConfidentIndices - 1) / 2;
        float* distances = new float[numDistances] {};

        calcDistances(distances);
        cluster(distances);

        if (detectionResult->numClusters == 1) {
            calcMeanRect(detectionResult->confidentIndices);
            //TODO: Take the maximum confidence as the result confidence.
        }

        delete[]distances;
        distances = NULL;
    }