Search found 52 matches
- 2013-02-15T11:07:08-07:00
- Forum: Users
- Topic: Kernels used by LineJunctions
- Replies: 6
- Views: 23239
Re: Kernels used by LineJunctions
Very sophisticated! Thanks for the information. The line junction detection is working well.
- 2013-02-14T13:05:15-07:00
- Forum: Users
- Topic: Kernels used by LineJunctions
- Replies: 6
- Views: 23239
Re: Kernels used by LineJunctions
Haha, I was taking the '0's to be background. Impressive that any combination of Y's and T's would produce the right junctions.
Thanks for the clarifications.
Thanks for the clarifications.
- 2013-02-13T15:40:37-07:00
- Forum: Users
- Topic: Kernels used by LineJunctions
- Replies: 6
- Views: 23239
Re: Kernels used by LineJunctions
Thanks for responding. Indeed, the results are always correct. I was just wondering what kernels are actually used in LineJunctions given that the 3x3 kernel centered at the small white disk on the red pixel in the picture above is neither a T nor a Y in any rotation. As far as I understand a HMT ...
- 2013-02-11T15:58:49-07:00
- Forum: Users
- Topic: Kernels used by LineJunctions
- Replies: 6
- Views: 23239
Kernels used by LineJunctions
It says on IM Usage page (Morphology of Shapes) that The default 'LineJunctions' kernel set only uses the first two junction definitions (the 'Y' and diagonal 'T' junctions), in the following way... 'LineJunctions:1@ ; LineJunctions:2>' I created this kernel set for LineJunctions using kernel2image ...
- 2012-07-01T22:42:17-07:00
- Forum: Users
- Topic: From 8-connected to 4-connected lines
- Replies: 35
- Views: 103293
Re: From 8-connected to 4-connected lines
Were these at 'v' -> 't' junctions? Perhaps it was these thickens that produces the 2 sets of 2x2 blocks that was later removed by the skeletion thin? I can't tell without further analysis. And I suspect doing analysis based on a single example might not be conclusive to cover all possible cases ...
- 2012-06-30T16:39:15-07:00
- Forum: Users
- Topic: From 8-connected to 4-connected lines
- Replies: 35
- Views: 103293
Re: From 8-connected to 4-connected lines
Below is what I have found to work to obtain 4-connected lines from 8-connected lines: convert 8conn.png -verbose \ -morphology thicken '3>:-,0,-,1,-,1,0,1,0' \ --- fill junction pixels by thickenning V's to get full T's -morphology thicken '3>:-,0,0,1,-,0,0,1,-' \ --- fill in diagonal pixels to ...
- 2012-06-29T00:19:40-07:00
- Forum: Users
- Topic: From 8-connected to 4-connected lines
- Replies: 35
- Views: 103293
Re: From 8-connected to 4-connected lines
While preparing a final example I stumbled in the following apparently discrepancy, i.e., I ran exactly the same command on same images and obtain slightly different counts for "Changed", see asterisks below. Is this of concern? bamboo [426] : convert 8conn.pgm -verbose -morphology thicken '3>:0,1 ...
- 2012-06-26T21:04:59-07:00
- Forum: Users
- Topic: From 8-connected to 4-connected lines
- Replies: 35
- Views: 103293
Re: From 8-connected to 4-connected lines
I will put a final example shortly with as few operations as possible. I was hoping to use something less expensive than Skeleton:3 as it seems only a few iterations are necessary to get the desired result (I am not sure if only because this is a small example). convert result_2_8to4.pgm -verbose ...
- 2012-06-26T01:41:45-07:00
- Forum: Users
- Topic: From 8-connected to 4-connected lines
- Replies: 35
- Views: 103293
Re: From 8-connected to 4-connected lines
What do you get if you use a 4-connected skeleton kernel set on the 2x2 blocks? http://www.imagemagick.org/Usage/morphology/#skeleton Specifically, skeleton:3 kernel set which I regard as the best. (though is not the default in IM as it was found later) Does it thin those blocks? Yes, the 2x2 ...
- 2012-06-25T16:46:32-07:00
- Forum: Users
- Topic: From 8-connected to 4-connected lines
- Replies: 35
- Views: 103293
Re: From 8-connected to 4-connected lines
Even after filling the V to get full T there are situations where a 2x2 block is still present as it is shown in the example below (crop from the 8to4 image above posted by Fred). So, I think there is more to it than closing the V. When I run in a large image there are lots of these blocks. yes I ...
- 2012-06-25T16:35:40-07:00
- Forum: Users
- Topic: From 8-connected to 4-connected lines
- Replies: 35
- Views: 103293
Re: From 8-connected to 4-connected lines
Thanks for the info on virtual-pixel. I will experiment with it. By the way, it is not that the boundaries are not properly 4-connected but HMT was reporting these 2x2 blocks on the boundaries when in fact none where shown on the processed image. I edited my previous post. Please check it. You asked ...
- 2012-06-25T12:11:17-07:00
- Forum: Users
- Topic: From 8-connected to 4-connected lines
- Replies: 35
- Views: 103293
Re: From 8-connected to 4-connected lines
Even after filling the V to get full T there are situations where a 2x2 block is still present as it is shown in the example below (crop from the 8to4 image above posted by Fred). So, I think there is more to it than closing the V. When I run in a large image there are lots of these blocks. Any ...
- 2012-06-23T22:51:34-07:00
- Forum: Users
- Topic: From 8-connected to 4-connected lines
- Replies: 35
- Views: 103293
Re: From 8-connected to 4-connected lines
I have already tried that order and others and it shouldn't make any difference at all as we can always have rotated versions of the pattern in the image thus any order is equally possible and plausible.
- 2012-06-23T02:08:40-07:00
- Forum: Users
- Topic: From 8-connected to 4-connected lines
- Replies: 35
- Views: 103293
Re: From 8-connected to 4-connected lines
Here is what works so far for me (Edited: well, not really :shock: found some cases it fails) convert 8conn.pgm -verbose -morphology thicken '3>:0,1,-,1,0,-,-,-,-' -morphology thinning '3>:1,0,0,1,1,0,1,1,1' 4conn.pgm Thicken:1.0 #1 => Changed 339 (re-iterate) Thicken:1.1 #2 => Changed 381 (re ...
- 2012-06-22T23:11:01-07:00
- Forum: Users
- Topic: From 8-connected to 4-connected lines
- Replies: 35
- Views: 103293
Re: From 8-connected to 4-connected lines
Many thanks Fred for going the extra mile on this! It worked well on that example and, after a close inspection, the result is indeed a (almost) 4-connected line. It seems this is the right kernel when used with Thicken (or almost, see below). I tried -morphology thicken '3>:0,1,-,1,0,-,-,-,-' and ...