NVIDIA CUDA简单的CUDA程序:图像二值化处理
常规的C++实现方法(假设图像为R8G8B8格式,每个像素4字节):int x, y;unsigned long offset = 0, p;unsigned char r, g, b, mi, ma;for(y = 0; y for(x = 0; x { p = ((unsigned long *)in)[offset]; b = ((unsigned char *)(&p))[0]; g = ((unsigned char *)(&p))[1]; r = ((unsigned c
转载
2010-08-12 10:57:00 ·
884 阅读 ·
0 评论