sunting_bcwl 2013-01-11 09:23 采纳率: 0%
浏览 4964

有谁知道photoshop的羽化算法是什么原理

哪位大牛知道photoshop羽化算法的原理?非常想了解一下

  • 写回答

1条回答

  • shiter 人工智能领域优质创作者 2015-01-13 14:34
    关注

    柔化效果
    void __fastcall TForm1::btnSmoothClick
    (TObject *Sender)
    {
    int red,green,blue;
    for(i=1;i< width-2;i++)
    for(j=1;j< height-2;j++){
    red=rgb[i-1][j-1].r_color+rgb[i][j-1].r
    _color+rgb[i+1][j-1].r_color+
    rgb[i-1][j].r_color+rgb[i][j].r
    _color+rgb[i+1][j].r_color+

             rgb[i-1][j+1].r_color+rgb[i][j+1].r
             _color+rgb[i+1][j+1].r_color;
    

    green=rgb[i-1][j-1].g_color+rgb[i][j-1].g
    _color+rgb[i+1][j-1].g_color+
    rgb[i-1][j].g_color+rgb[i][j].g
    _color+rgb[i+1][j].g_color+
    rgb[i-1][j+1].g_color+rgb[i][j+1].g
    _color+rgb[i+1][j+1].g_color;
    blue=rgb[i-1][j-1].b_color+rgb[i][j-1].b
    _color+rgb[i+1][j-1].b_color+
    rgb[i-1][j].b_color+rgb[i][j].b
    _color+rgb[i+1][j].b_color+
    rgb[i-1][j+1].b_color+rgb[i][j+1].b
    _color+rgb[i+1][j+1].b_color;
    bitmap- >Canvas- >Pixels[i][j]
    =RGB(red/9,green/9,blue/9);
    }
    Image1- >Picture- >Bitmap- >Assign(bitmap);
    }

    评论

报告相同问题?

悬赏问题

  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算