Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Embedded .NETCF
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.
Posted 18-Oct-10 19:37pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 George Jonsson 175
1 Kornfeld Eliyahu Peter 169
2 Zoltán Zörgő 139
3 PIEBALDconsult 130
4 OriginalGriff 120
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,107
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,342


Advertise | Privacy | Mobile
Web04 | 2.8.141220.1 | Last Updated 20 Oct 2010
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100