Search found 52 matches

by alosca
2012-06-22T22:19:41-07:00
Forum: Users
Topic: From 8-connected to 4-connected lines
Replies: 35
Views: 98481

Re: From 8-connected to 4-connected lines

Just an example where things can go wrong. In some situations, "-morphology thicken '2>:0,1,1,0'" turns pixels on when they shouldn't. For example, in the left case below we have more pixels turned on than necessary, filling the 3x2 block shown on the middle picture: http://www.imagenoir.c...
by alosca
2012-06-22T18:26:39-07:00
Forum: Users
Topic: From 8-connected to 4-connected lines
Replies: 35
Views: 98481

Re: From 8-connected to 4-connected lines

We are almost there! I have tried Thicken with the 2x2 rotated kernels, '2>:1,0,0,1' and the results are almost what we want except that it ended up adding 2x2 full blocks whenever we have a T (and its rotated versions) with a missing junction point, i.e. the pattern below (0 = black, X = white) 000...
by alosca
2012-06-21T13:19:51-07:00
Forum: Users
Topic: From 8-connected to 4-connected lines
Replies: 35
Views: 98481

Re: From 8-connected to 4-connected lines

Many thanks for the suggestion. I tried plus and customised kernels but they didn't work. Here is a piece of an example image, http://www.imagenoir.com/magick/result_2.png I like to think that the right kernel + morphological operation will do it but I didn't come up with the right combination yet. ...
by alosca
2012-06-20T17:24:31-07:00
Forum: Users
Topic: From 8-connected to 4-connected lines
Replies: 35
Views: 98481

From 8-connected to 4-connected lines

Hello, Is there a quick way to convert 8-connected lines to 4-connected lines? I tried with Thicken, HMT, but to no avail. I have to transform a bunch of binary images containing 8-conn edges so I can use a program that only accepts 4-conn lines (connected components, not available yet on IM). An al...
by alosca
2012-06-02T20:39:25-07:00
Forum: Bugs
Topic: evaluate-sequence fails on 6.7.7-2_0 Q16
Replies: 2
Views: 7808

Re: evaluate-sequence fails on 6.7.7-2_0 Q16

I re-activated 6.7.7-2 and the error is gone only when limiting to a single thread, -limit thread 1. Any way this can be fixed to take advantage of all available cores? I assume -limit thus actually limits the number of threads/cores. I am using Macports to get the latest IM so I am not sure I can c...
by alosca
2012-06-02T00:08:13-07:00
Forum: Bugs
Topic: evaluate-sequence fails on 6.7.7-2_0 Q16
Replies: 2
Views: 7808

evaluate-sequence fails on 6.7.7-2_0 Q16

I am getting the following Abort when trying -evaluate-sequence on four tiff images ($l below is a shell variable) after an upgrade yesterday to 6.7.7-2_0+q16 on OS X using Macports. I switched back to 6.7.6-0_0+q16 and things are back to normal. The image files are fine. A bug? Running on x86_64 Da...
by alosca
2011-10-25T11:51:55-07:00
Forum: Users
Topic: identify -unique doesn't work
Replies: 6
Views: 12089

Re: identify -unique doesn't work

Thanks! That works.
by alosca
2011-10-21T15:52:43-07:00
Forum: Users
Topic: identify -unique doesn't work
Replies: 6
Views: 12089

Re: identify -unique doesn't work

In which release should -unique work? I have

identify --version
Version: ImageMagick 6.7.1-0 2011-07-26 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP HDRI

and it is not working. Just checking to see if it still is an open bug.
Thanks!
by alosca
2011-07-29T11:36:50-07:00
Forum: Users
Topic: Thinning to truly 8-connected skeletons
Replies: 12
Views: 19391

Re: Thinning to truly 8-connected skeletons

Got it! I don't know why but what I had in mind was that for every pixel in the image you apply all the kernels in the given set before moving to the next pixel. But in fact, you apply a kernel to the entire image and then repeat for every kernel in the sequence using either the original (non iterat...
by alosca
2011-07-29T00:56:29-07:00
Forum: Users
Topic: Thinning to truly 8-connected skeletons
Replies: 12
Views: 19391

Re: Thinning to truly 8-connected skeletons

I confirmed: we need 45 degrees rotations, not only 90, to generate all kernels necessary to detect the gaps we are interested: For knight-move gaps: 3@: 0,1,0 -,0,0 -,0,1; For X,Y,-,T and their rotation variants: 3@: 0,-,0 1,0,1 0,-,0 A total of 12 kernels will do it: kernel2image.sh -40.4 -ml '%[n...
by alosca
2011-07-29T00:23:38-07:00
Forum: Users
Topic: Thinning to truly 8-connected skeletons
Replies: 12
Views: 19391

Re: Thinning to truly 8-connected skeletons

I am confused: isn't the pixel under the origin of the kernel the only pixel that gets changed after a morphological operation? The origin travels over all pixels in the image and perform convolution only where there is an absolute match with the kernel? If so, why the need for union addition as you...
by alosca
2011-07-28T01:00:40-07:00
Forum: Users
Topic: Thinning to truly 8-connected skeletons
Replies: 12
Views: 19391

Re: Thinning to truly 8-connected skeletons

Very very nice! Thanks for the suggestions. Hmmm also note that your kernel (to find knight-move gaps) '3@: 0,1,0 0,0,0 0,0,1 ' would actually match two pixels in the gap between the two on pixels, making a 4-connected skeleton. I am not sure I got this, I think I might be missing some understanding...
by alosca
2011-07-27T00:40:09-07:00
Forum: Users
Topic: Thinning to truly 8-connected skeletons
Replies: 12
Views: 19391

Re: Thinning to truly 8-connected skeletons

I mistakenly thought was a 9th kernel, but as you said, another 4 kernels to the already 8 in skeleton:2, 50% more expensive. Indeed, it would be cheaper to run LineJunctions:3> at the end, as it only needs to be done once. I think the kernels in gap1.gif and gap2.gif pictures are all distinct, no? ...
by alosca
2011-07-26T23:30:33-07:00
Forum: Users
Topic: Thinning to truly 8-connected skeletons
Replies: 12
Views: 19391

Re: Thinning to truly 8-connected skeletons

Thanks for the tip. It couldn't be simpler! I wonder why Skeleton:2 does not include this T junction kernel so thinning can produce a truly 8-connected skeleton, as it is suggested in http://www.imagemagick.org/Usage/morphology/#thinning_skeleton But maybe using -morphology Thinning 'LineJunctions:3...
by alosca
2011-07-26T16:51:10-07:00
Forum: Users
Topic: Thinning to truly 8-connected skeletons
Replies: 12
Views: 19391

Thinning to truly 8-connected skeletons

I have been using -morphology Thinning:-1 Skeleton:2 to create one pixel wide skeleton lines from binary images. Works great! The results are *almost* 8-connected skeletons as T junctions still have the junction point turned on - we need them off to make truly 8-conn lines. I have also tried Thinnin...