Win8 Metro(C#)数字图像处理--2.63图像指数增强
2024-09-01 00:43:21
原文:Win8 Metro(C#)数字图像处理--2.63图像指数增强
[函数名称]
指数增强 WriteableBitmap IndexenhanceProcess(WriteableBitmap src)
[函数代码]
<strong> /// <summary>
/// Enhanced index process.
/// </summary>
/// <param name="src">The source image.</param>
/// <returns></returns>
public static WriteableBitmap IndexenhanceProcess(WriteableBitmap src)////指数增强
{
if (src != null)
{
int w = src.PixelWidth;
int h = src.PixelHeight;
WriteableBitmap srcImage = new WriteableBitmap(w, h);
byte[] temp = src.PixelBuffer.ToArray();
byte[] tempMask = (byte[])temp.Clone();
for (int i = 0; i < tempMask.Length; i++)
{
temp[i] = (byte)((1.0 / 255.0) * (double)(tempMask[i] * tempMask[i]));
}
Stream sTemp = srcImage.PixelBuffer.AsStream();
sTemp.Seek(0, SeekOrigin.Begin);
sTemp.Write(temp, 0, w * 4 * h);
return srcImage;
}
else
{
return null;
}
}</strong>
[图像效果]
最后,分享一个专业的图像处理网站(微像素),里面有很多源代码下载:
最新文章
- html5新增标签和属性
- UBUNTU 10.04上安装和使用HAMACHI
- 也谈自动化平台的搭建,另附高大上的名字---无人值守定时巡检系统(selenium+testng+ant+jenkins)
- MYSQL单双向同步
- IBM Domino 9 出现 Server Controller 未在主机上运行或未在端口2050监听 解决方案
- 透析Express.js
- K3数据库表结构
- strcpy函数实现
- cf 559a **
- Spring MVC 和 Spring 总结
- Unity 内置着色器(转)
- JXL获取excel批注
- Int16 Int32 Int64
- CentOS7 安装JDK
- Linux几种关机(重启)相关命令
- 获取linux帮助命令
- 2019年一次java知识点总结
- 分布式计算(四)Azkaban安装
- 2017-2018-2 20165228 实验四《Android程序设计》实验报告
- (9)模板层 - templates(模板语言、语法、取值、过滤器、变量的使用)
热门文章
- [Ramda] Refactor to Point Free Functions with Ramda using compose and converge
- 【codeforces 750F】New Year and Finding Roots
- 【SAE 部署 JavaWeb 项目报 404 错误】
- 数字图像处理原理与实践(MATLAB版)勘误表
- SpringBoot JPA 专题
- CentOS7 下的mysql安装与配置
- kindeditor 4 上传下载文件
- JAVA自带API的压缩与解压
- Windows远程连接Ubuntu (远程桌面和XDMCP)
- javascript 次序li