View Single Post
Old 11th September 2004, 23:44   #9  |  Link
Vectrangle
Registered User
 
Join Date: Sep 2004
Location: Byron Bay, Australia
Posts: 20


Quote:
Originally posted by AS Hi, I want to apologise if I sounded rude and unenthusiastic.
Not at all, the more problems you can find, the better! That's the great thing about sharing your script with others, someone will always see things that you didn't

However I think the issues you had can be aleviated significantly by tweaking the other parameters! My recommended values in my comments were only after brief testing, so please play around with them

Quote:
Looking at the edges on the shirts, I think they're (slightly) thickened.
Using strength=255 is an excellent idea, you can clearly see what the filter is doing. What happens is that any dot (unfortunately my method thinks dots are lines too) or part of a line that is only _slightly_ darker than surrounds will be darkened too, but only slightly (in proportion to how much darker they are). Normally this wouldn't be noticed, but with such a huge strengthing it becomes obvious that the slightly darker pixels that occur either side of a line, and normally not considered part of the line by your eye (in the original picture) are darkened, thus thickening the line. also you can see that some noise specks are darkened too.

This is what the threshold parameter is for! It will ignore these pixels that are only slightly darker. Try turning it up to 10 or even higher, and see how it goes. In my comments in the script I say to leave it at 1, but clearly I was wrong! (although if you try it you will see that threshold=1 is a lot better than threshold=0)

[EDIT]After a quick test I realized 10 is probably too high, as it stops darkening some of the weaker lines. I think a threshold of around 4, with some line thinning, will ultimately be the best option. Please play around with threshold and tell me what you think

Quote:
Indeed, most of the time it's quite beneficial. But because now it's actually darkened, those slight imperfection -- those jags along the edge -- is also amplified.In this case, a very low thinning would disguise this.
I'm working on the thinning idea, but it's a much more complicated process than darkening I did find a quick and cheap little thinning method, but I'm not sure how well it will work. I'll post it later for you to test

Quote:
Look at the third strip/belt, slightly right and down a bit from middle of the pic, you will see two white lines with a very thin gap in between. After applying the filter, it gets treated as an edge and darkened!
Aha! This is a problem I forsaw already, even though I hadn't seen an actual example of it until you found this one (pats self on back ^^). My fear that this would occur is the reason I added the luma_cap parameter, if you lower luma_cap then your problem should go away

Quote:
So all in all, if you ever got around doing the edge thinning part,it might be preferrable as a standalone filter, as it might come handy for other purpose as well (ie, side-effects that are benefitial)
I will probably include just a 'quick and simple' thinning algorithm into FastLineDarken, that can be turned on through a parameter, and then work on making a more accurate (and definately slower) line thinner for stand alone use.

So yeah to summarize, try increasing threshold and lowering luma_cap, and if you find good values for both please post them

Last edited by Vectrangle; 11th September 2004 at 23:55.
Vectrangle is offline   Reply With Quote