I’m trying to figure out the code in the Sobel filter example from CUDA SDK. But I have a problem when I try to apply the code to color image (lena.ppm).
[codebox]void loadDefaultImage( char* loc_exec) {
…
const char* image_filename = "<b>lena.ppm</b>";
…
}[/codebox]
I think the program has already provided a way to solve with color image, but when I run the program I got the result below
part of the difficulty is the call to glTexImage2D doing
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, imWidth, imHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
gets rid of the white screen (and replaces it with a grayscale image). a start…