Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

改善插值缩放 #5

Open
3 of 4 tasks
tumuyan opened this issue Mar 22, 2022 · 1 comment
Open
3 of 4 tasks

改善插值缩放 #5

tumuyan opened this issue Mar 22, 2022 · 1 comment

Comments

@tumuyan
Copy link
Owner

tumuyan commented Mar 22, 2022

问题

  • magick-x0.5 处理后,导出失败

改善

  • 下拉列表预设多种缩小倍率
  • 预设其他缩小算法

思路

  • 为resize-ncnn增加de-nearest模式。假设a图片是从A图使用nearest算法放大x倍而来的,那么输入a后,通过算法自动计算相邻像素的相似性得到x,把a使用nearest算法缩小x倍可以得到与图A非常相似的图b。当输入图片真的为nearest算法放大的图片时,效果比较理想;当计算x错误时,不输出结果。这个算法不确定是否有人做过,暂且命名为de-nearest。
@tumuyan
Copy link
Owner Author

tumuyan commented Mar 26, 2022

de-nearest模式的算法还是太过粗糙.

  1. 当图像使用nearest算法放大后, 增加边框或者裁切画面,会导致错误
  2. 当图像包含大面积纯色内容时,缩放倍率会算错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant