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 安装svn网络有问题怎么办
  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥15 latex怎么处理论文引理引用参考文献