作业帮 > 综合 > 作业

灰度图像时0到255之间的像素,哪个函数能把它变成0到1之间的

来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:综合作业 时间:2024/05/07 18:33:17
灰度图像时0到255之间的像素,哪个函数能把它变成0到1之间的
灰度图像时0到255之间的像素,哪个函数能把它变成0到1之间的
用这个函数:void cvNormalize( const CvArr* src,CvArr* dst,double a=1,double b=0,int norm_type=CV_L2,const CvArr* mask=NULL );
还有
我这个控件设定的高度是510,宽度是10,
我写了一个染色的函数,fun.
public static Bitmap fun(Bitmap Bmp)
{
int j=255;
int width=Bmp.width;
int Height=Bmp.Height;
BitmapData data = Bmp.LockBits(new Rectangle(0,0,width,height),ImageLockMode.ReadWrite,PixelFormat.Format24bppRgb);
unsafe
{
byte* p = (byte*)data.Scan0;//p是位图像素首地址.
int offset = data.Stride - width *3;
for (int y =0; y