资源简介
运行testpsmath.m,按任意键得到下一个效果的结果
代码片段和文件信息
function composite = blendfunc(base blend mode)
switch(mode)
case ‘lighten‘
composite = lighten(base blend);
case ‘darken‘
composite = darken(base blend);
case ‘multiply‘
composite = multiply(base blend);
case ‘screen‘
composite = screen(base blend);
case ‘overlay‘
composite = overlay(base blend);
case ‘softlight‘
composite = softlight(base blend);
case ‘colordodge‘
composite = colordodge(base blend);
case ‘colorburn‘
composite = colorburn(base blend);
case ‘lineardodge‘
composite = lineardodge(base blend);
case ‘linearburn‘
composite = linearburn(base blend);
case ‘difference‘
composite = difference(base blend);
case ‘vividlight‘
composite = vividlight(base blend);
case ‘pinlight‘
composite = pinlight(base blend);
case ‘hardmix‘
composite = hardmix(base blend);
case ‘exclusion‘
composite = exclusion(base blend);
case ‘linearlight‘
composite = linearlight(base blend);
otherwise
error(‘Incorrect blending option‘);
end
function composite = darken(base blend)
composite = min(base blend);
function composite = lighten(base blend)
composite = max(base blend);
function composite = multiply(base blend)
composite = base .* blend;
function composite = screen(base blend)
composite = base + blend .* (1.0 - base);
function composite = overlay(base blend)
composite = base + (blend - 0.5) .* (1.0 - abs(2.0 * base - 1.0));
function composite = softlight(base blend)
mask = blend > 0.5;
composite = base .* (2.0 * blend + base .* (1.0 - 2.0 * blend));
composite2 = sqrt(base) .* (2.0 * blend - 1.0) + 2.0 * base .* (1.0 - blend);
composite(mask) = composite2(mask);
function composite = colordodge(base blend)
mask = (blend ~= 1.0);
composite = blend;
composite2 = min(base ./ (1.0 - blend) 1.0);
composite(mask) = composite2(mask);
function composite = colorburn(base blend)
mask = (blend ~= 0.0);
composite = blend;
composite2 = max((1.0 - ((1.0 - base) ./ blend)) 0.0);
composite(mask) = composite2(mask);
function composite = difference(base blend)
composite = abs(base - blend);
function composite = vividlight(base blend)
mask = (blend > 0.5);
composite = colorburn(base 2.0 * blend);
composite2 = colordodge(base 2.0 * blend - 1.0);
composite(mask) = composite2(mask);
function composite = pinlight(base blend)
mask = (blend > 0.5);
composite = darken(base 2.0 * blend);
composite2 = lighten(base 2.0 * blend - 1.0);
composite(mask) = composite2(mask);
function composite = hardmix(base blend)
vivid_light = vividlight(base blend);
composite = zeros(size(base));
composite(vivid_light > 0.5) = 1.0;
function composite = linearburn(base blend)
composite = max(base + blend - 1.0 0.0);
function composite = lineardodge(b
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 25782 2010-05-07 22:08 PsBlend\ba
文件 53632 2010-05-07 22:07 PsBlend\Blend.jpg
文件 3349 2010-05-08 01:19 PsBlend\blendfunc.m
文件 1508 2010-05-08 01:23 PsBlend\testpsmath.m
目录 0 2010-05-08 01:20 PsBlend
文件 16 2010-05-08 01:25 PsBlend\ReadMe.txt
----------- --------- ---------- ----- ----
84287 6
相关资源
- 力导向图force-direct算法MATLAB实现含数
- 3-SPR并联平台Matlab运动学正解及工作空
- 小生境遗传算法源程序4
- 《现代数字信号处理》何子述 第三章
- CNN深度学习识别字符matlab
- 车牌识别matlab代码
- 粒子群算法优化RBF神经网络
- QPSK的MATLAB仿真程序
- 复杂网络matlab经典算法
- Maple Toolbox for MATLAB 工具箱使用介绍
- 非局部均值 图像去噪(matlab)
- 循环自相关函数matlab程序
- matlab一元线性回归
- 基于DVB-T标准的OFDM调制技术的MATLAB源
- Alamouti方案的matlab仿真
- 用MATLAB编写的svm源程序,可以实现支
- MATLAB绘制威布尔分布曲线.docx
- 故障树的MATLAB程序。
- 基于基于遗传算法matlab优化程序
- matlab ar模型卡尔曼滤波代码
- NSGA2-matlaB
-
buck-boost的simuli
nk电路仿真图 - 粒子群 matlab简单优化过的 TSP
- Matlab增量式PID算法仿真
- matlab 数据处理 求绝对误差 剔除粗
- 基于MATLAB的基带传输位同步信号提取
- 基于MATLAB的图像分割含GUI界面
- matlab写的GMM代码
- MATLAB ADOV 路由仿真代码
- turbo码的matlab仿真
评论
共有 条评论