Search found 90 matches

by HugoRune
2009-08-17T17:36:25-07:00
Forum: Users
Topic: using a sobel operator - edge detection
Replies: 56
Views: 121979

Re: using a sobel operator - edge detection

QUESTION: what about the four other blur operators which I identified as using 'bias' All of them only uses gaussian kernels, and as such probably has no need for bias. Having bias set for convolve, then accidentally using -blur could cause a lot of confusion. My preferance would be to remove 'bias...
by HugoRune
2009-08-17T17:32:39-07:00
Forum: Users
Topic: Quality loss with eps files
Replies: 3
Views: 10205

Re: Quality loss with eps files

There are some tools that deal especially with eps, like http://www.ifa.hawaii.edu/~kaiser/misc/epsfcompose http://home.clara.net/nox/software/epsmerge/ I have however used none of them. My latex skills are a bit rusty, but I remember simply using \subfigure in latex to put several images next to ea...
by HugoRune
2009-08-17T08:12:00-07:00
Forum: Users
Topic: Processing tick boxes on forms. A method.
Replies: 3
Views: 10142

Re: Processing tick boxes on forms. A method.

Nice work! Thanks for sharing it! I am having some trouble figuring out the batch file structure, but I think the labels are missing. Could you add them? (:checkline, :processfile, ...) [edit: I think they are all there now, but I am still a bit confused about the program flow] Is this all one big f...
by HugoRune
2009-08-17T04:34:07-07:00
Forum: Users
Topic: The recipe for "GIMP/Artistic Filters/Photocopy"
Replies: 10
Views: 49171

Re: The recipe for "GIMP/Artistic Filters/Photocopy"

Unfortunately, your image still has some green in the grass area so is not graycale. So it needs some kind of adjustment or simply conversion to grayscale at the end. ah yes, I was experimenting how it works if I do a "color-copy" effect, i.e preserve a bit of color For a pure grayscale i...
by HugoRune
2009-08-17T04:24:52-07:00
Forum: Users
Topic: using a sobel operator - edge detection
Replies: 56
Views: 121979

Re: using a sobel operator - edge detection

So nominally IM will make too large a result from any edge filter. The result will be amplified by 1/2 the sum of the absolute value of the kernel elements. Small edge values will be brighter by this factor and large edge values will be clipped at 1. So to avoid clipping at 1 in non-hdri, you need ...
by HugoRune
2009-08-16T19:47:51-07:00
Forum: Users
Topic: The recipe for "GIMP/Artistic Filters/Photocopy"
Replies: 10
Views: 49171

Re: The recipe for "GIMP/Artistic Filters/Photocopy"

There is however a slight problem with large almost-black areas in this case. if such an area is larger than the blur radius, it will have white holes in it how about convert taj_orig.jpg -modulate 100,10 ( +clone -blur 0x3 +level 10%x100% ) +swap -compose divide -composite -blur 0x1 -linear-stretch...
by HugoRune
2009-08-16T18:48:44-07:00
Forum: Users
Topic: using a sobel operator - edge detection
Replies: 56
Views: 121979

Re: using a sobel operator - edge detection

(i just looked up the normalization, here it is just in case anyone else is interested in the code) /* Normalize kernel. */ ... gamma=0.0; for (i=0; i < (long) (width*width); i++) gamma+=kernel ; gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma); for (i=0; i < (long) (width*width); i++...
by HugoRune
2009-08-16T17:51:22-07:00
Forum: Users
Topic: using a sobel operator - edge detection
Replies: 56
Views: 121979

Re: using a sobel operator - edge detection

doing some tests, it appears that the convolution is normalized by the sum of the absolute values of the kernel values. So in this case, 1,2,1,0,0,0,-1,-2,-1, even though they add to zero, the normalization will be to divide by 8. I cannot reproduce that. On my version, it looks like no normalizati...
by HugoRune
2009-08-16T17:09:31-07:00
Forum: Users
Topic: The recipe for "GIMP/Artistic Filters/Photocopy"
Replies: 10
Views: 49171

Re: The recipe for "GIMP/Artistic Filters/Photocopy"

i checked the description from gimp photocopy.c /* * Photocopy algorithm * ----------------- * Mask radius = radius of pixel neighborhood for intensity comparison * Threshold = relative intensity difference which will result in darkening * Ramp = amount of relative intensity difference before total ...
by HugoRune
2009-08-16T16:19:10-07:00
Forum: Users
Topic: using a sobel operator - edge detection
Replies: 56
Views: 121979

Re: using a sobel operator - edge detection

This should be sufficent and should be equivalent to abs(X) + abs(Y) I think we are misunderstanding each other. I know that I can do the equivalent of abs(X) + abs(Y) to get a good approximation of the sobel operator. Indeed, that is probably what I will use in most cases, since it is faster than ...
by HugoRune
2009-08-16T13:24:35-07:00
Forum: Users
Topic: using a sobel operator - edge detection
Replies: 56
Views: 121979

Re: using a sobel operator - edge detection

but I was pointing out if you are using abs, then no point for -compose multiply on both then -compose plus -evaluate pow 0.5 Sorry, I don't follow. Do you mean that I can leave out a step and still get the same result? As far as I understand there are two standard ways to calculate a sobel: The ex...
by HugoRune
2009-08-16T03:57:45-07:00
Forum: Users
Topic: using a sobel operator - edge detection
Replies: 56
Views: 121979

Re: using a sobel operator - edge detection

right about the bias and the solarize -negate. But my other point was that your abs and sqrt of square are redundant. That was why I suggested you either do the abs or the compose mutliply -evaluate pow 0.5. You don't need both. They are redundant in principle, but I need the abs to work around non...
by HugoRune
2009-08-15T19:49:53-07:00
Forum: Users
Topic: using a sobel operator - edge detection
Replies: 56
Views: 121979

Re: using a sobel operator - edge detection

But why do you need the solarize etc after the -convolve. Why negate. Seems like you can just use -solarize 50% -level 0x50%, if you really need it at all. Does that work equally? I think it should. No, that does not work (see images below). The -solarize is a negation of the brighter colors, you n...
by HugoRune
2009-08-15T15:37:55-07:00
Forum: Users
Topic: using a sobel operator - edge detection
Replies: 56
Views: 121979

Re: using a sobel operator - edge detection

I suspect without HDRI and no bias, your derivatives are getting clipped at zero for the negative values. So you may need to do like I did with the bias: convert ( zelda3.JPG -convolve "-1,0,1,-2,0,2,-1,0,1" -evaluate multiply 0.25 -bias 50% ) ^ ( zelda3.JPG -convolve "1,2,1,0,0,0,-1...
by HugoRune
2009-08-15T14:10:44-07:00
Forum: Users
Topic: using a sobel operator - edge detection
Replies: 56
Views: 121979

Re: using a sobel operator - edge detection

Did you try my code directly? and don't add the bias. it should work fine under Q16 no HDRI. I wrote my scripts under Q16 no HDRI and they worked. Now i am confused. I tried your code, but I do not get the same results as you: your zelda3_grad3.png http://www.fmwconcepts.com/misc_tests/zelda3_grad3...