fffflyfish
V2EX  ›  问与答

这个重建图像的效果怎么实现?

  •  
  •   fffflyfish · Oct 2, 2017 · 3090 views
    This topic created in 3170 days ago, the information mentioned may be changed or developed.

    大家好,今天研究了下遗传算法,找到了这个视频

    https://www.youtube.com/watch?v=iV-hah6xs2A

    觉得蛮有意思的,github 上也找了下,很多都是重建蒙娜丽莎的图片,类似这个 https://github.com/fogleman/primitive,但是貌似都不方便以网页的形式展示,我记得 V2EX 有位前辈的网页首页就是这个,求问怎么实现

    1 replies    2017-10-02 18:22:17 +08:00
    minami
        1
    minami  
       Oct 2, 2017
    假设用 N 段线段拟合原始图像 Io,拟合出的图像是 Ir,则可以定义损失函数 Loss=MSE(Io,Ir)。线段可以用两个坐标即四个数值来表示,所以可以用一个长度为 4N 的数组表示一个解。问题就转化成使用遗传算法优化解使得 Loss 最小,由于解是用数组表示,遗传算法的各种操作都是显然的。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3591 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 05:00 · PVG 13:00 · LAX 22:00 · JFK 01:00
    ♥ Do have faith in what you're doing.