Sun 31 Jul 2016 08:44:52 PM UTC, comment #15:
Thanks a lot for all the fixes. Pushed without changes http://hg.code.sf.net/p/octave/image/rev/beb0382042e3
|
Sun 31 Jul 2016 08:13:39 PM UTC, comment #14:
To get the documentation into "sync" again, I have attached another PATCH, with V5 in its filename.
(file #38059)
|
Sun 31 Jul 2016 06:59:45 PM UTC, comment #13:
I think this leaves the documentation out of sync since they mention thresh being multiplied by different factors.
I have pushed http://hg.code.sf.net/p/octave/image/rev/ee99dba2cc5b after small editorial changes (using double quotes for strings, remove trailing whitespace, etc). It will be part of the next minor release (2.6.0).
|
Sun 31 Jul 2016 06:16:33 PM UTC, comment #12:
Yes, the only difference between Prewitt, Sobel and Kirsch is the used edge finding matrix, supplied by fspecial. (Roberts has the additional difference of a slightly different auto threshold value and two additional return values.)
Carne, I've done the small performance change that you've mentioned in your last comment. And no, I wasn't intentionally coding for Nd images.
The accordingly changed PATCH will be attached as a file with V4 in its name.
(file #38058)
|
Sun 31 Jul 2016 05:27:29 PM UTC, comment #11:
So after this change, there's no difference between the sobel, prewitt, and kirsch methods? Or am I missing something?
A small performance fix. In place operators reduce memory usage, so instead of:
use:
Also, use `sum (abs (x(:)))` (unless you really are coding for ND and want to normalize each plane by the sum of that plane, and on which case specify the dimension number as part of the call to sum).
|
Sun 31 Jul 2016 03:35:23 PM UTC, comment #10:
Here is the promised new PATCH (the file with V3 in it). It should be applied on top of the current code version in the image repository.
A summary what this patch is supposed to do:
- clarify calculation with squared quantities (Sobel/Prewitt/Kirsch, Roberts)
- normalize the edge operator matrix (Sobel/Prewitt/Kirsch, Roberts)
- adapt calculation of auto threshold (Sobel/Prewitt/Kirsch, Roberts)
- keep edge strength before thinning step (Sobel/Prewitt/Kirsch, Roberts)
- use imfilter instead of conv2 (Roberts)
- add new tests for Prewitt and Roberts methods (Matlab compatible)
Please let me know if something is unclear or something misbehaves in this patch.
(file #38057)
|
Fri 15 Jul 2016 11:37:26 PM UTC, comment #9:
Yes, I can wait. If all goes well, I will make the new release either in August or early September.
|
Fri 15 Jul 2016 11:39:40 AM UTC, comment #8:
@Carne: Thank you for your feedback.
Those pushed changes seem wrong to me at some delicate points. If you can wait a couple of weeks, I will try to generate a patch to eventually fix this.
|
Thu 14 Jul 2016 05:33:10 PM UTC, comment #7:
The day you submit this patch, was also the day (well, 1 day difference) that edge was rewritten to reduce code duplication and got a load of new tests. This meant that your patch didn't apply anymore but now that I did merge it, it automatically applied to all the other methods.
http://hg.code.sf.net/p/octave/image/rev/87110623b042
I'm sorry this took such a long time.
(file #37874)
|
Thu 10 Dec 2015 07:38:34 PM UTC, comment #6:
Here is an slightly improved version of my last PATCH. (In the one before I forgot to implement the return value thresh.)
Its still only about the SOBEL method, but could easily extended to the other filter based edge methods.
(file #35690)
|
Wed 09 Dec 2015 10:01:33 PM UTC, comment #5:
Here is a new PATCH that includes all the discussed topics in this bug report, it also makes all the new tests for the Sobel method pass. The Sobel edge detection should be much more Matlab compatible now.
The patch currently only covers the SOBEL edge detection method. But the very same changes should also be applied to the
- Prewitt
- Roberts (maybe slightly different changes necessary?)
- Kirsch (this one is not implemented in Matlab though)
edge detection methods.
Please
- test this patch
- if you have time: extend the changes of this patch also to the other three mentioned edge detection method.
(file #35681)
|
Wed 02 Dec 2015 10:37:19 PM UTC, comment #4:
so conv2(im, h1, "same") gives spurious edges on the borders while imfilter(im, h1, "replicate") doesn't.
So it seems that imfilter is better than conv2.
imfilter with "replicate" has zero edges on the borders, which also seems to be good.
What do you think?
|
Wed 02 Dec 2015 10:22:24 PM UTC, comment #3:
I also think that using "imfilter(...,'replicate')" instead of the old "conv2" should help to make those edge methods (Robert, Sobel, Prewitt) more Matlab compatible, and also make the results really better. The current implementation over emphasises the image borders otherwise.
|
Wed 02 Dec 2015 04:19:14 PM UTC, comment #2:
Thank you for the tests. I have pushed them http://hg.code.sf.net/p/octave/image/rev/29d86b1f7930
Are you still investigating if your proposed fix on comment #0 is the right fix or should I push that as well?
|
Wed 02 Dec 2015 07:26:48 AM UTC, comment #1:
Attached test file for Sobel filter.
Octave fails in most of them :-(
(file #35610)
|
Sun 29 Nov 2015 08:39:00 PM UTC, original submission:
Start working on BIST for edge, I have found this:
the correct result is:
If we replace lines 175-176
We get the correct result, tough I do not know if this is the correct fix. The problem is that the borders get high values, so
the threshold is wrong.
BTW, this simple example can be served as first test for edge.
|