数图程序整理.docVIP

  • 10
  • 0
  • 约9.86千字
  • 约 10页
  • 2017-08-15 发布于重庆
  • 举报
数图程序整理.doc

下面是数图程序的整理(有一些删减,可能还会有点错漏),然后有一些程序觉得貌似可能应该不会考(07复合旋转变换、13 低通滤波),所以就没有粘贴出来。仅供参考啦。。。。。 05线性点运算 int i,j; for(j=0;jLie;j++) { for(i=0;iHang;i++) { long tempR,tempG,tempB; long temp,temp2; float a=-0.8,b=255; tempB=buffer[BytesPerPixel*(j*Lie+i)+0]; tempG=buffer[BytesPerPixel*(j*Lie+i)+1]; tempR=buffer[BytesPerPixel*(j*Lie+i)+2]; temp=(tempR+tempG+tempB)/3; temp2=a*temp+b; if(temp2255) temp2=255; if(temp20) temp2=0; DC.SetPixel(i,j,RGB(temp,temp,temp)); DC.SetPixel(i+Lie,j,RGB(temp2,temp2,temp2)); } } 06几何运算:图像旋转变换 int x0,y0,x,y; float pi=3.14; float B

文档评论(0)

1亿VIP精品文档

相关文档