Beispiel #1
0
void kmeans(pixel* clusterKernel,cluster* cluster,Image toSegment,unsigned K){
  int i,k;

  for (i = 0; i < 10; i++) {
    
    for (k = 0; k < K; k++) {
      cluster[K].nbPixel=0;
    }

    segmentation(clusterKernel,cluster,K,toSegment->matrix,toSegment->height,toSegment->length);
    
    #pragma omp parallel for 
    for (k = 0; k < K; k++) {
      updateKernel(clusterKernel,cluster,k);  
    }
    

  }  

}
GaussianBlur::GaussianBlur(int sigma, double size) :
    _sigma(sigma),
    _size(size)
{
    updateKernel(sigma, size);
}