图像处理项目的遗传算法

发布于 2024-11-29 16:17:49 字数 353 浏览 3 评论 0原文

我正在考虑为学校启动一个项目,我将使用遗传算法来优化图像的数字锐化。我一直在 Photoshop 中尝试使用非锐化遮罩 (USM) 技术。基本上,我想创建一个软件来优化参数(即模糊半径、模糊类型、混合图像)以创建“最适合”的滤镜集。

在开始之前我正在快速规划这个项目,并且我想不出“选择”部分的良好适应功能。我如何确定滤镜组的“质量”,或测量图像的清晰度?

另外,我将使用 python(使用 Python Imaging Library)进行编程,因为它是我唯一精通的语言。我应该学习低级语言吗?

非常感谢任何有关任何事情的建议/提示。提前致谢!

tl;dr 如何衡量图像的“清晰度”程度?

I'm thinking of starting a project for school where I'll use genetic algorithms to optimize digital sharpening of images. I've been playing around with unsharp masking (USM) techniques in Photoshop. Basically, I want to create a software that optimizes the parameters (i.e. blur radius, types of blur, blending the image) to create the "best-fit" set of filters.

I'm sort of quickly planning this project before starting it, and I can't think of a good fitness function for the 'selection' part. How would I determine the 'quality' of the filter sets, or measure how sharp the image is?

Also, I will be programming using python (with the Python Imaging Library) since it's the only language I'm proficient with. Should I learn a low-level language instead?

Any advice/tips on anything is greatly appreciated. Thanks in advance!

tl;dr How do I measure how 'sharp' an image is?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

走野 2024-12-06 16:17:49

如果它用于调整参数,您可以拍摄已知图像并应用已知的模糊/低通滤波器。然后使用 GA+USM 算法对其进行锐化。利用原始图像计算您的适应度函数,例如可能像平均绝对误差一样简单。可能需要创建不同的数据集,例如风景图像(大部分是锐利的,焦点清晰,景深大),肖像图像(可能是大面积故意失焦和“柔和”),以及低噪声和嘈杂的图像。锐化噪声图像实际上是一个相当大的挑战。

绝对值得一看 Bruce Frasier 在 Photoshop 等锐化技术方面的工作。

此外,也可能值得查看 Imatest (www.imatest.com),看看是否有与锐度/分辨率有关的内容。最后,您还可以考虑分辨率图表。

最后,我严重怀疑 USM 是否存在一组理想参数,最佳参数将取决于图像,并且实际上是个人偏好(这就是为什么我建议从已知的清晰图像开始并将其模糊化)。理解图像的类型本身可能同样重要,也是非常有趣且具有挑战性的问题。尽管像图像方差和边缘直方图这样的基本色调学也许会揭示合适的线索。

无论如何,只是一个想法,希望上面的一些内容有用

if its for tuning parameters you could take a known image and apply a known blurring/low pass filter. Then sharpen this with your GA+USM algorithm. Calculate your fitness function making use of the original image, e.g maybe something as simple as the mean absolute error. May need to create different datasets, e.g. landscape images (mostly sharp, in focus with large depth of field), portrait images (could be large areas deliberately out of focus and "soft"), along with low noise and noisy images. Sharpening noisy images is actually quite a challenge.

It would definitely be worth taking a look at Bruce Frasier' work on sharpening techniques for Photoshop etc.

Also it might worth checking out Imatest (www.imatest.com) to see if there is anything regarding sharpness/resolution. And finally you might also consider resolution charts.

And finally I seroiusly doubt one set of ideal parameters exists for USM, the optimum parameters will be image dependant and indeed be a personal perference (thatwhy I suggest starting for a known sharp image and blurring it). Understanding the type of image is probably as important and in itself and very interesting and challenging problem. Although perhaps basic hueristics like image varinance and edge histogram would reveal suitable clues.

Anyway just a thought, hopefully some of the above is useful

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文