patchGNU Octave - Patches: patch #9365, image package: new function...


patch #9365: image package: new function deconvwnr.m

Submitted by:  Hartmut <hardy>
Submitted on:  Mon 29 May 2017 09:53:54 PM UTC  
Category: Forge : new functionPriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Thu 01 Jun 2017 07:16:41 PM UTC, comment #3:

(I've now managed to push my new-deconvwnr bookmark to my bitbucket repo. I hope that makes the reviewing work easier.)

Hartmut <hardy>
Wed 31 May 2017 08:20:52 PM UTC, comment #2:

Yes, I was aware of patch #8571, but I haven't had a close look at it before. Now I have looked at the deconvWiener function there:

  • Their default value for K is 500, mine (and Matlab's) is 0. But 0 gives nearly allways useless results.
  • I haven't compared theirs and mine input checking...
  • Their core algorithm is:
  • my core algorithm is:
  • So the core algorithm is IDENTICAL. Which is no wonder, we both took it from the Gonzalez-Woods book, that is mentioned in the Matlab help. They do a bit more padding and fftshift-ing around. I do some more avoiding to divide by zero.
  • I have tested my function to be Matlab compatible. At least for the given test cases. I don't know how Matlab compatible their's is. But they are probably not doing too bad in this respect.
  • I've already built in Nd image support.
  • My tests are properly included in the function code as %!test lines. But my test data are just some dumb number arrays. Not very instructive to read. But making sure the code will still properly work in a couple of years.
  • They have a nice test image included, it's also an instructive demo. I'd like to include some more test images into Octave somewhere, as well (as brought to the maintainers mailinglist by Avinoam lately.) But currently I do not know how to include nice test images into a contributed Octave function.

In this case (just one hand full of code lines for the core algorithm), it was easier for me to do a fresh implementation of deconvwnr, than trying to adapt other people's code.

Mercurial note: Carnë , does it increase your workload if I create new "branches" for each new function in my own bitbucket repo in the future? This repo is really only for this only purpose of making reviewing easier. I think this "commit with bookmark" feature is just not implemented in my TortoiseHG...

Hartmut <hardy>
Wed 31 May 2017 12:42:24 AM UTC, comment #1:

I haven't looked at this yet but are you aware of patch #8571 which implements some deconvolution functions but in a Matlab incompatible manner?

> [...] was unable to commit my (still only local) bookmark
> "new-deconvwnr" to the bitbucket repository, using TortoiseHG. If
> you tell me how to do this, I can also add a bookmark to this
> commit.

In command line, it's just 'hg push -B bookmark-name'. I have no idea about using TortoiseHg though.

Carnë Draug <carandraug>
Project Member
Mon 29 May 2017 09:53:54 PM UTC, original submission:

I've written the function "deconvwnr.m" for the image package.

This function applies a Wiener deconvolution filter to an image. The algorithm is taken from the book that is cited on the Mathworks help page for this function (Gonzalez Woods).

You can find the new function in my bitbucket repository:

This time the commit is part of the "default" branch, there. But I was unable to commit my (still only local) bookmark "new-deconvwnr" to the bitbucket repository, using TortoiseHG. If you tell me how to do this, I can also add a bookmark to this commit.

Please let me know any comments or feedback on this.

Hartmut <hardy>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #40813:  deconvwnr (V1).m added by hardy (18KiB - text/x-objcsrc)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by hardy (Submitted the item)
  • -unavailable- added by hardy
  • -unavailable- added by hardy

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 29 May 2017 09:53:54 PM UTChardyAttached File-=>Added deconvwnr (V1).m, #40813
      Carbon-Copy-=>Added avinoam
      Carbon-Copy-=>Added carandraug

    Back to the top

    Powered by Savane 3.1-cleanup1