Windows CE上的快速高斯模糊 [英] fast gaussian blur on windows CE

查看:154
本文介绍了Windows CE上的快速高斯模糊的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有人知道可以在1或2秒内对Windows CE屏幕截图(低分辨率)执行高斯模糊的库(托管库或本机库)?

我用C#找到了一台PC,大约花了10秒钟.

我的目标是使屏幕模糊并在屏幕中间绘制一个焦点对准的弹出框,我拥有进行alpha混合的必要工具,等等,但是事实证明,找到任何一种图像处理库都是一个挑战.

Does anyone know of a library (managed or native) that can perform a gaussian blur of a windows CE screenshot (low res) in 1 or 2 seconds?

I found a PC one in C# and it took around 10 seconds.

My objective is to blur out the screen and paint an in focus popup box in the middle of the screen, I have the necessary tools for the alpha blending and so forth, but finding any sort of image manipulation library is proving to be a challenge.

推荐答案

加快高斯模糊的技巧是利用其可分离性.也就是说,您可以在x方向上进行一次遍历(每行),而在y方向上进行遍历(每列向下).比使用方形内核快得多.在维基百科中查找高斯模糊";第一个外部链接甚至包含一些代码.对于您的应用程序,您也可以尝试非常积极地截断内核. (我猜是7x7甚至5x5会给您可以接受的结果.)
[edit]使用定标整数算术而不是float可能会获得更大的加速.请记住,您不需要NASA的镀金锤子即可将钉子钉入木板!一块石头可以做到这一点.[/edit]


彼得

要回答此问题,请在其上添加评论和/或修改您的问题.投票,并接受是否愿意.
The trick to speeding up gaussian blur is to take advantage of its separability. That is, you can do one pass in the x direction (along each single row) and one pass in the y direction (down each column). Much faster than using a square kernel. Look up wikipedia for "gaussian blur"; the first external link even includes some code. For your application, you can affort to truncate the kernel pretty aggressively too. (I''m guessing 7x7 or even 5x5 will give you an acceptable result.)
[edit] You can probably get even more speedup using scaled integer arithmetic rather than float. Remember that you don''t need NASA''s gold-plated hammer to whack a nail into a plank! A lump of rock can do that job.[/edit]


Peter

To respond to this answer, add a comment to it and/or modify your question. Vote, and accept if you like it.


这篇关于Windows CE上的快速高斯模糊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆