KNN CUDA

I need to extract red color from an image using CUDA and matlab. Can any one please help me?