dake Posted March 1, 2007 Share Posted March 1, 2007 Erode/dilate filter. The dilatation is one of the most simple way to remove scratches and noise from an uniform background.Updated version (0.2) :DLL : http://www.freewebs.com/dakepdn/ErodeDilate_v0.2.dllSRC : http://www.freewebs.com/dakepdn/ErodeDilateSrc_v0.2.rar ErodeDilate_v0.2.dll.zip Examples :With a higher intensity you can achieve kindoff artistic effects : Quote Link to comment Share on other sites More sharing options...
josh181830 Posted March 1, 2007 Share Posted March 1, 2007 so wuts the purpose of the plugin? Quote Link to comment Share on other sites More sharing options...
dake Posted March 1, 2007 Author Share Posted March 1, 2007 All pics editors have dilate and erode... except PDN The erode somehow looks like a rough version of the median filter, don't know if it may be useful. I sometimes used such filters in the past, to enhance contour detection for example. Quote Link to comment Share on other sites More sharing options...
Crazy Man Dan Posted March 1, 2007 Share Posted March 1, 2007 Sweet genius! I was actually thinking about this the other day. It's one thing that I really liked in The GIMP that I missed when working in PDN. And it seems to work rather well! Thank you! Quote I am not a mechanism, I am part of the resistance; I am an organism, an animal, a creature, I am a beast. ~ Becoming the Archetype Link to comment Share on other sites More sharing options...
dake Posted March 1, 2007 Author Share Posted March 1, 2007 Thanks, nice to hear you were looking for such feature and that I could help Quote Link to comment Share on other sites More sharing options...
barkbark00 Posted March 1, 2007 Share Posted March 1, 2007 Erode/dilate filter. The dilatation is one of the most simple way to remove scratches and noise from an uniform background. I understand that this is similar to the Median Blur effect. I used the Median Blur effect remove the power lines in the image below. With your plugin the edited areas were to blocky at any intensity to be useful. The Median Blur makes it less noticeable that the image was edited. Original: Edit: Quote Take responsibility for your own intelligence. -Rick Brewster Link to comment Share on other sites More sharing options...
Helio Posted March 2, 2007 Share Posted March 2, 2007 Good job, dake. I can already see very good use for this! Before: After: Quote v An excellent open–source strategy game—highly recommended. "I wish I had never been born," she said. "What are we born for?" "For infinite happiness," said the Spirit. "You can step out into it at any moment..." Link to comment Share on other sites More sharing options...
Rick Brewster Posted March 2, 2007 Share Posted March 2, 2007 This looks like the exact same as Median, except with a square shaped area instead of a circle shaped area. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
barkbark00 Posted March 2, 2007 Share Posted March 2, 2007 That has a cool crystalline look to it. This looks like the exact same as Median, except with a square shaped area instead of a circle shaped area. There's one other difference I can see... Median blur is more configurable. This would do well as a check box on the Median Blur effect...Square/Circle? Quote Take responsibility for your own intelligence. -Rick Brewster Link to comment Share on other sites More sharing options...
davidtayhs Posted March 2, 2007 Share Posted March 2, 2007 Could someone confirm if this plugin affects the 'Text' tool? After installing it, I couldn't insert any text onto a new layer. Succeeded after removing the new plugin. Wonder if this problem is peculiar to my notebook or whether it is a more widespread problem. Quote Link to comment Share on other sites More sharing options...
Crazy Man Dan Posted March 2, 2007 Share Posted March 2, 2007 My text tool remains unaffected. I can still add text as usual with the plugin installed. Quote I am not a mechanism, I am part of the resistance; I am an organism, an animal, a creature, I am a beast. ~ Becoming the Archetype Link to comment Share on other sites More sharing options...
Picc84 Posted March 2, 2007 Share Posted March 2, 2007 Awesome! I'll use this definatly.. It really looks like it could be more of a photo editing tool than a "Paint" tool... But its efficiant enough to be used as both! Quote Link to comment Share on other sites More sharing options...
dake Posted March 2, 2007 Author Share Posted March 2, 2007 The erode/dilate filter can be extended to have a smooth shape around the pixels (instead of a square). The filter basically works like this : you define a box around each source pixel (the box size is set by the intensity) and you find the brightest pixel in this small area (ie. the brightest neighbour in the source picture). The destination pixel is then replaced by the brightest pixel. The erode is exactly the same except that you use the darkest pixel. Now, instead of using a square area, one could use a circle, a star, whatever (though you must keep in mind that you can not have a large shape otherwise it would take ages to complete). I will try to add some shapes to see if it comes up with interesting effects, not to replace the median blur but to have some "crystalize" effects. To Rick : I have to check your median code but I would say it is different. A median blur is (by definition) not based on the brightest or darkest pixel in the area of interest but by the neighbour which is in the middle of the neighbours list after sorting. You may be interested in this : http://homepages.inf.ed.ac.uk/rbf/HIPR2/morops.htm Quote Link to comment Share on other sites More sharing options...
barkbark00 Posted March 2, 2007 Share Posted March 2, 2007 This is from the same website, but it covers spactial filters like the median filter. http://homepages.inf.ed.ac.uk/rbf/HIPR2/median.htm Quote Take responsibility for your own intelligence. -Rick Brewster Link to comment Share on other sites More sharing options...
dake Posted March 2, 2007 Author Share Posted March 2, 2007 Updated version, with some shapes to experiment : DLL : http://www.freewebs.com/dakepdn/ErodeDilate%5Fv0.2.dll SRC : http://www.freewebs.com/dakepdn/ErodeDilateSrc%5Fv0.2.rar Quote Link to comment Share on other sites More sharing options...
dake Posted March 2, 2007 Author Share Posted March 2, 2007 Barbark : I wish to code a filter similar to what is proposed by the powerful Greycstoration http://www.greyc.ensicaen.fr/~dtschump/greycstoration/demonstration.html but the maths are quite heavy, have to read some docs first Quote Link to comment Share on other sites More sharing options...
Bob Posted March 2, 2007 Share Posted March 2, 2007 Can you compress it in a zip rather than a rar? Quote No. Way. I've just seen Bob. And... *poof!*—just like that—he disappears into the mist again. ~Helio Link to comment Share on other sites More sharing options...
dake Posted March 2, 2007 Author Share Posted March 2, 2007 For a strange reason, Freewebs doesn't accept the zip (which is less than 750k) : FreeWebs accounts newer than 7 days are provisional and can only upload files up to 750K. Provisional users also can not upload .exe files. You can remove this provision immediately by signing up for a premium service. Quote Link to comment Share on other sites More sharing options...
barkbark00 Posted March 2, 2007 Share Posted March 2, 2007 I got the new dll working and it looks good. I like the whole shape option thing! Quote Take responsibility for your own intelligence. -Rick Brewster Link to comment Share on other sites More sharing options...
Illnab1024 Posted March 2, 2007 Share Posted March 2, 2007 Well, dake, I figured I would rehost the source as a ZIP file on my getpaint.net account. Link. Quote ~~ Link to comment Share on other sites More sharing options...
barkbark00 Posted March 2, 2007 Share Posted March 2, 2007 ...on my getpaint.net account... Stop bragging... :wink: Quote Take responsibility for your own intelligence. -Rick Brewster Link to comment Share on other sites More sharing options...
Helio Posted March 2, 2007 Share Posted March 2, 2007 Even better! Weird...(literally ) Quote v An excellent open–source strategy game—highly recommended. "I wish I had never been born," she said. "What are we born for?" "For infinite happiness," said the Spirit. "You can step out into it at any moment..." Link to comment Share on other sites More sharing options...
Crazy Man Dan Posted March 3, 2007 Share Posted March 3, 2007 I'm loving the update! I have noticed that, when used on shapes on transparent layers, you get rough edges. Is is possible to correct this? It works excellently on solid layers, though. Quote I am not a mechanism, I am part of the resistance; I am an organism, an animal, a creature, I am a beast. ~ Becoming the Archetype Link to comment Share on other sites More sharing options...
dake Posted March 3, 2007 Author Share Posted March 3, 2007 I will check this problem. Quote Link to comment Share on other sites More sharing options...
Ed Harvey Posted March 4, 2007 Share Posted March 4, 2007 To Rick : I have to check your median code but I would say it is different. A median blur is (by definition) not based on the brightest or darkest pixel in the area of interest but by the neighbour which is in the middle of the neighbours list after sorting. Dake, I'm sure Rick is well aware of the definition of a median filter To get a median filter as you defined above, you need to sort the values. If you have the values sorted, it is trivial to get the max or min value, or anywhere in between (the 'percentile'). Can you now see how the pdn Median filter is a somewhat more sophisticated version of yours (all be it with a circular neighbourhood selection) ? Ed Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.