36
edits
Changes
→Analysis
The kernels:
setSamples - goes through the entire image and collects samples from the image (the current pixel and the next x number of pixels).
__global__ void setSamples(cv::cuda::PtrStepSz<float> samples, cv::cuda::PtrStepSz<uchar> img, int dimC) {
int i = blockIdx.y*blockDim.y + threadIdx.y;
}
}
calculateDistance - goes through the image and computes the difference between the samples and the centers from the input image.
__global__ void calculateDistance(cv::cuda::PtrStepSz<float> centers, cv::cuda::PtrStepSz<float> samples, int k, int N, int dim, double* minval, float* D) {
}
__global__ void generateImage(cv::cuda::PtrStepSz<uchar> out, cv::cuda::PtrStepSz<int> indices, cv::cuda::PtrStepSz<float> centers, int dim) {