Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6351197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:57:20+00:00 2026-05-24T21:57:20+00:00

I have implemented a nice algorithm ( Non Local Means ) for reducing noise

  • 0

I have implemented a nice algorithm (“Non Local Means“) for reducing noise in image.
It is based on it’s Matlab implementation.

The problem with NLMeans is that the original algorithm is slow even on compiled languages like c/c++ and i am trying to run it using scripting language.

One of best solutions is to use improved Blockwise NLMeans algorithm which is ~60-80 times faster. The problem is that the paper which describes it is written in a complex mathematical language and it’s really hard for me to understand an idea and program it
(yes, i didn’t learn math at college).

That is why i am desperately looking for a pseudo code of this algorithm.

(modification of original Matlab implementation would be just perfect)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:57:22+00:00Added an answer on May 24, 2026 at 9:57 pm

    I admit, I was intrigued until I saw the result – 260+ seconds on a dual core, and that doesn’t assume the overhead of a scripting language, and that’s for the Optimized Block Non Local Means filter.

    Let me break down the math for you – My idea of pseudo-code is writing in Ruby.

    Non Local Means Filtering

    Assume an image that’s 200 x 100 pixels (20000 pixels total), which is a pretty tiny image. We’re going to have to go through 20,000 pixels and evaluate each one on the weighted average of the other 19,999 pixels: [Sorry about the spacing, but the equation is interpreted as a link without it]

    NL [v] (i) = ∑ w(i,j)v(j) [j ∈ I]

    where 0 ≤ w(i,j) ≤ 1 and ∑j w(i,j) = 1

    Understandably, this last part can be a little confusing, but this is really nothing more than a convolution filter the size of the whole image being applied to each pixel.

    Blockwise Non Local Means Filtering

    The blockwise implementation takes overlapping sets of voxels (volumetric pixels – the implementation you pointed us to is for 3D space). Presumably, taking a similar approach, you could apply this to 2D space, taking sets of overlapping pixels. Let’s see if we can describe this…

    NL [v] (ijk) = 1/|Ai|∑ w(ijk, i)v(i)

    Where A is a vector of the pixels to be estimated, and similar circumstances as above are applied.

    [NB: I may be slightly off; It’s been a few years since I did heavy image processing]

    Algorithm

    In all likelihood, we’re talking about reducing complexity of the algorithm at a minimal cost to reduction quality. The larger the sample vector, the higher the quality as well as the higher the complexity. By overlapping then averaging the sample vectors from the image then applying that weighted average to each pixel we’re looping through the image far fewer times.

    • Loop through the image to collect the sample vectors and store their weighted average to an array.
    • Apply each weighted average (a number between 0 and 1) to each pixel times the pixels value.

    Pretty simple, but the processing time is going to be horrid with larger images.

    Final Thoughts

    You’re going to have to make some tough decisions. If you’re going to use a scripting language, you’re already dealing with significant interpretive overhead. It’s far from optimal to use a scripting language for heavy duty image processing. If you’re not processing medical images, in all likelihood, there are far better algorithms to use with lesser O’s.

    Hope this is helpful… I’m not terribly good at making a point clearly and concisely, so if I can clarify anything, let me know.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hai Thanks for everything. I have successfully implemented clean URL in local. Very nice
I have implemented tracing based on System.Diagnostics. I am also using a System.Diagnostics.TextWriterTraceListener, and
We have implemented a drag and drop feature that shows a nice simple representation
I have a nice interface, and I want to implement one member of it
An enum in Java implements the Comparable interface. It would have been nice to
I have implemented what I thought was a pretty decent representation of MVC in
I have implemented a simple file upload-download mechanism. When a user clicks a file
I have implemented a python webserver. Each http request spawns a new thread. I
I have implemented a SAX parser in Java by extending the default handler. The
I have implemented VirtualPathProvider class so I can keep all my views in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.