patchGNU Octave - Patches: patch #8571, image package: three deconvolution...

 
 

patch #8571: image package: three deconvolution routines (Wiener, RL, RLTV)

Submitted by:  None
Submitted on:  Mon 17 Nov 2014 02:03:02 PM UTC  
 
Category: NonePriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOriginator Email: -unavailable-
Open/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 19 Feb 2015 12:53:33 AM UTC, comment #4:

Wed 18 Feb 2015 08:35:57 GMT, comment #3:

>> I don't want to end up with 6 deconvolution functions
>> that are very similar but not quite.
>>
>
> I had thought that the problem currently is not that there are too many deconvolution function in Octave, but that there is none at all.


Yes, that is true now. But adding then now to have them removed one day when we get a Matlab compatible version, that will create problems.

> If you have a matlab compatible deconvolution implementation however, I agree that this should be included instead, even though it does not support regularization for Richardson-Lucy deconvolution, AFAIK.
>
> It might be best to provide our deconvolution routines not as part of the image package, but as a separate optional addon, because they are complementary to what matlab has built in, and are thus also useful for matlab users. Is there any other repository for octave contributions?


If there are something these implementations can do, I will try to merge them into Matlab compatible versions. Kinda like graythresh has an extra option to select different algorithms.

> Concerning the dimension, I wonder whether there is a way to avoid the discrimination of two cases, because Octave has different convolution functions for one and two dimensionc ([fft]conv versus [fft]conv2).


It also has convn which you can use when you want to support N dimensions. The image package also now has a corresponding fftconvn.

Carnë Draug <carandraug>
Project Member
Wed 18 Feb 2015 08:35:57 AM UTC, comment #3:

> I don't want to end up with 6 deconvolution functions
> that are very similar but not quite.
>

I had thought that the problem currently is not that there are too many deconvolution function in Octave, but that there is none at all.

If you have a matlab compatible deconvolution implementation however, I agree that this should be included instead, even though it does not support regularization for Richardson-Lucy deconvolution, AFAIK.

It might be best to provide our deconvolution routines not as part of the image package, but as a separate optional addon, because they are complementary to what matlab has built in, and are thus also useful for matlab users. Is there any other repository for octave contributions?

Thanks for pointing me to padarray.

Concerning the dimension, I wonder whether there is a way to avoid the discrimination of two cases, because Octave has different convolution functions for one and two dimensionc ([fft]conv versus [fft]conv2).

Christoph Dalitz <dalitz>
Tue 17 Feb 2015 05:06:18 PM UTC, comment #2:

I am unsure of accepting this patch since Matlab has equivalent functions and you are already telling us that your functions behave different. I don't want to end up with 6 deconvolution functions that are very similar but not quite. Even if you are not able to implement all the options, can you at least make it Matlab compatible?

Also, a few comments about the coding before being accepted:

1. when checking input, do not simply disp a message and then return, use error(). If there is an error, we want an error to be throw. Simply calling return will allow the computation to continue (and then misteriously fail later)

2. use the postpad, prepad, or padarray functions (you probably want the padarray function). Do not do these things yourself since they are a pain to read and therefore maintain:

3. do not have separate code for 1 and 2 dimensions, we want to support an arbitrary number of dimensions. This is the same operation, it does not matter the number of dimensions.

4. do not compute the otf yourself from the psf. The functions psf2otf and otf2psf are now part of the image package (development version).

5. I will need an email address for both Fabian Schmitt as well since he's also claiming copyright ownership of the deconvWiener and deconvRL functions

Carnë Draug <carandraug>
Project Member
Tue 18 Nov 2014 11:57:36 PM UTC, comment #1:

Thanks for your contribution. Retitling to suggest for inclusion in the image package. The image package maintainer will probably notice this and have further comments or suggestions.

Mike Miller <mtmiller>
Project Administrator
Mon 17 Nov 2014 02:03:02 PM UTC, original submission:

Dear octave developers,

here are three deconvolution routines implemented as *.m files, which I have recently implemented for a research project:

deconvWiener, deconvRL, deconvRLTV

The attached archive includes these three function files, test data ("image.csv", "psf.csv"), and a testscript "testdeconv.m" for running all three functions on the testdata.

I have not used the function names of matlab (deconvwnr, deconvlucy), because my implementations behave somewhat differently:

Matlab's deconvwnr only works when image and psf have exactly the same size, and it supports additional parameters, which I do not understand.

Matlab's deconvlucy uses a different algorithm, while my implementation uses the original algorithm by Richardson and Lucy, so that the results of both functions differ.

Please send me a short confirmation when this submission has arrived.

Thanks,

Christoph Dalitz

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #32452:  octave-contrib.tgz added by None (364KiB - application/x-compressed-tar - Please see the "Original submission" text for archive content)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dalitz (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 18 Nov 2014 11:57:36 PM UTCmtmillerSummaryThree deconvolution routines (Wiener, RL, RLTV)=>image package: three deconvolution routines (Wiener, RL, RLTV)
    Mon 17 Nov 2014 02:03:02 PM UTCNoneAttached File-=>Added octave-contrib.tgz, #32452

    Back to the top


    Powered by Savane 3.1-cleanup1