Best way for "limit distance"
This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
Best way for "limit distance" | Joseph Heled | 30 Nov 01:25 |
Best way for "limit distance" | Joao S. O. Bueno Calligaris | 30 Nov 06:36 |
Best way for "limit distance" | Joao S. O. Bueno Calligaris | 30 Nov 08:24 |
Best way for "limit distance" | Øyvind Kolås | 02 Dec 17:02 |
Best way for "limit distance" | Joseph Heled | 02 Dec 22:12 |
Best way for "limit distance" | Øyvind Kolås | 03 Dec 00:27 |
Best way for "limit distance" | Joseph Heled | 03 Dec 01:26 |
Best way for "limit distance" | Joseph Heled | 03 Dec 01:59 |
Best way for "limit distance" | GSR - FR | 03 Dec 02:24 |
Best way for "limit distance"
(I think this has been discussed on the list before, but not sure where/when.)
What is the best way to achieve the following functionality -
Given two layers L1 and L2, I want L2 limited by it's distance from L1
Result
(This expression uses L1/L2 as placeholder for each pixel in all RGB channels)
Options:
A. Write a plugin
B. Write it as a script-fu (not sure if script-fu can iterate on pixels, and what is the speed implication). And I hate scheme.
C. Write it in python fu if I can compile it, but even though it is probably not as universally available as scrip-fu. Can I iterate over an image in python-fu?
D. I know I can do it with 5 layers and overlay modes. write this as a script-fu. Not elegant and requires loads of memory for large images.
Layer Mode
L1 Grain Merge
148 Darken Only
108 Lighten Only
L1 Grain Extract
L2 Normal
(148/108 stand for a layer filled with gray pixels (148,148,148)/(108,108,108)
E. Write a generic framework which allows any kind of expression(s) between layer(s) (Only kidding ...)
F. Anything better?
-Joseph
Best way for "limit distance"
On Monday 29 November 2004 22:25, Joseph Heled wrote:
(I think this has been discussed on the list before, but not sure where/when.)
What is the best way to achieve the following functionality -
Given two layers L1 and L2, I want L2 limited by it's distance from L1
Result
(This expression uses L1/L2 as placeholder for each pixel in all RGB channels)
Options:
A. Write a plugin
B. Write it as a script-fu (not sure if script-fu can iterate on pixels, and what is the speed implication). And I hate scheme.
C. Write it in python fu if I can compile it, but even though it is probably not as universally available as scrip-fu. Can I iterate over an image in python-fu?
This one, or the C plugin. In python fu you can iterate over pixels, and still have all the ase of use of the PDB API, and from the python language itself. But it's slow to interate over pixels. If you want more speed, you either have to go to C, or use a python extension called "pyrex"which allows one to declare C langauge objects within python syntax, therefore gaining speed.
But it so easy in python that I could write you the plug-in in little time - I just an not sure of what you want to achieve - Your "result" would be stored in the Layer 2 pixels? or on a 3 layer (/me thinks would be better)
D. I know I can do it with 5 layers and overlay modes. write this as a script-fu. Not elegant and requires loads of memory for large images.
Layer Mode
L1 Grain Merge 148 Darken Only
108 Lighten Only
L1 Grain Extract
L2 Normal(148/108 stand for a layer filled with gray pixels (148,148,148)/(108,108,108)
Brrr... But you could also use a pythonfu script to control teh creation and placement of these five layers.
E. Write a generic framework which allows any kind of expression(s) between layer(s) (Only kidding ...)
No kidding - I have this code written down. But I did this for old gimp 1.3.14, and never broguthit upt o date, or wrote an itnerface for writing or compiling the generic expresion.
I call it ¨ the custom layer mode", and I actually have plans to bring it back from the not-quite-dead.
I will do you a template for the python plugin for now. To compile it in posix systems, just add "--enable-python" to your confgure directives. Peope on gimp-users have info on building it for windows.
Regards,
F. Anything better?
Can't think of anything that surpasses "E". C will do for you, if you have patience each time you change yor source layers.
-Joseph
Best way for "limit distance"
Moin ..
I e written the python-fu to to that.
If someone else is interested, just mail me.
On Monday 29 November 2004 22:25, Joseph Heled wrote:
(I think this has been discussed on the list before, but not sure where/when.)
What is the best way to achieve the following functionality -
Given two layers L1 and L2, I want L2 limited by it's distance from L1
Result
(This expression uses L1/L2 as placeholder for each pixel in all RGB channels)
Options:
A. Write a plugin
B. Write it as a script-fu (not sure if script-fu can iterate on pixels, and what is the speed implication). And I hate scheme.
C. Write it in python fu if I can compile it, but even though it is probably not as universally available as scrip-fu. Can I iterate over an image in python-fu?
D. I know I can do it with 5 layers and overlay modes. write this as a script-fu. Not elegant and requires loads of memory for large images.
Layer Mode
L1 Grain Merge 148 Darken Only
108 Lighten Only
L1 Grain Extract
L2 Normal(148/108 stand for a layer filled with gray pixels (148,148,148)/(108,108,108)
E. Write a generic framework which allows any kind of expression(s) between layer(s) (Only kidding ...)
F. Anything better?
-Joseph
Best way for "limit distance"
On Tue, 30 Nov 2004 13:25:16 +1300, Joseph Heled wrote:
(I think this has been discussed on the list before, but not sure where/when.)
What is the best way to achieve the following functionality -
Given two layers L1 and L2, I want L2 limited by it's distance from L1
Result
Options: A. Write a plugin
B. Write it as a script-fu (not sure if script-fu can iterate on pixels, and what is the speed implication). And I hate scheme. C. Write it in python fu if I can compile it, but even though it is probably not as universally available as scrip-fu. Can I iterate over an image in python-fu? D. I know I can do it with 5 layers and overlay modes. write this as a script-fu. Not elegant and requires loads of memory for large images.
E. extend gluas to be able to pick an auxiliary drawable for
additional pixel sources,
(essentially resurrecting some code I initially had in a different
version of gluas, and write the expression in gluas).
( gluas is at http://pippin.gimp.org/plug-ins/gluas/ )
/pippin
Best way for "limit distance"
Thanks for the suggestion. Using Joao lead I use for now python-fu with the numarray extension. As far as I know such speedups are something scrip-fu is not capable off, and I truly hope one day script-fu will be phased out and python-fu (or any other sane scripting language) will take it's place.Others might disagree, but I don't consider perl sane :)
BTW, all this was part of a small evaluation of CCD noise removal method. If you
are interested, the details are in
http://pages.quicksilver.net.nz/pepe/d70/Nikon_D70_on_Linux.html#ISONoise
The results are quite dismaying. I appreciate any insight on the subject. However please note I am not looking for a solution for the specific image I used, but a generic one.
-Joseph
Øyvind Kolås wrote:
On Tue, 30 Nov 2004 13:25:16 +1300, Joseph Heled wrote:
(I think this has been discussed on the list before, but not sure where/when.)
What is the best way to achieve the following functionality -
Given two layers L1 and L2, I want L2 limited by it's distance from L1
Result
Options: A. Write a plugin
B. Write it as a script-fu (not sure if script-fu can iterate on pixels, and what is the speed implication). And I hate scheme. C. Write it in python fu if I can compile it, but even though it is probably not as universally available as scrip-fu. Can I iterate over an image in python-fu? D. I know I can do it with 5 layers and overlay modes. write this as a script-fu. Not elegant and requires loads of memory for large images.E. extend gluas to be able to pick an auxiliary drawable for additional pixel sources,
(essentially resurrecting some code I initially had in a different version of gluas, and write the expression in gluas).( gluas is at http://pippin.gimp.org/plug-ins/gluas/ )
/pippin
Best way for "limit distance"
On Fri, 03 Dec 2004 10:12:37 +1300, Joseph Heled wrote:
BTW, all this was part of a small evaluation of CCD noise removal method. If you are interested, the details are in
http://pages.quicksilver.net.nz/pepe/d70/Nikon_D70_on_Linux.html#ISONoiseThe results are quite dismaying. I appreciate any insight on the subject. However please note I am not looking for a solution for the specific image I used, but a generic one.
I think you are running with an old version of the gimp, the artifacts from the median filtering done in the Despeckle plugin doesn't look good at all in your image,. somehow it seems like the result I achieve in
might be similar to what you want (note that I have run it on the jpeg
version of
your original.) running with a radius of 1.
/pippin
Best way for "limit distance"
I am using gimp-2.2-pre2. I certainly get totally different results than you for the same setting. I would appreciate some advice on how to find out how can that be,
-Joseph
Øyvind Kolås wrote:
On Fri, 03 Dec 2004 10:12:37 +1300, Joseph Heled wrote:
BTW, all this was part of a small evaluation of CCD noise removal method. If you are interested, the details are in
http://pages.quicksilver.net.nz/pepe/d70/Nikon_D70_on_Linux.html#ISONoiseThe results are quite dismaying. I appreciate any insight on the subject. However please note I am not looking for a solution for the specific image I used, but a generic one.
I think you are running with an old version of the gimp, the artifacts from the median filtering done in the Despeckle plugin doesn't look good at all in your image,. somehow it seems like the result I achieve in
might be similar to what you want (note that I have run it on the jpeg version of
your original.) running with a radius of 1./pippin
Best way for "limit distance"
Øyvind Kolås wrote:
might be similar to what you want (note that I have run it on the jpeg version of
your original.) running with a radius of 1./pippin
I was careless and did not realize the jpeg will make such a big difference. I replaced the original on my page with a png file, which you can grab if you wish and see the problem for real.
While your settings are definitely better, personally I find the result not good enough. And as I mentioned, the speed of the plugin is a big deterrent as well.
-Joseph
Best way for "limit distance"
pepster@users.sourceforge.net (2004-12-03 at 1012.37 +1300):
BTW, all this was part of a small evaluation of CCD noise removal method. If you are interested, the details are in
http://pages.quicksilver.net.nz/pepe/d70/Nikon_D70_on_Linux.html#ISONoiseThe results are quite dismaying. I appreciate any insight on the subject. However please note I am not looking for a solution for the specific image I used, but a generic one.
I am having a deja vu... http://cimg.sf.net/ Wait, the other time was about fixing dust from scans. :]
GSR