Welcome to RetouchPRO, the web community for retouchers.
You are currently viewing as an unregistered guest which gives you limited access. Registration is fast, simple and absolutely free so please, join RetouchPRO today!
If you have any problems with the registration process or your account login, please contact us. If you've forgotten your password, click here.
| | Software Photoshop, Paintshop Pro, Painter, etc., and all their various plugins. Of course, you can also discuss all other programs, as well. | 
02-10-2006, 07:27 AM
|  | Senior Member | | Join Date: Feb 2005 Location: Lancashire (UK)
Posts: 1,112
| | | FilterMeister - General Information (byRo: this thread was split from another much longer one - so some posts may seem out of context)
FilterMeister (FM) is a plug-in for Adobe Photoshop®-compatible graphics programs with the ability to create professional plug-in filters which can be distributed on a royalty-free basis.
It’s available here http://www.filtermeister.com
There are loads of samples and documentation at the site and there is a User group here. http://groups.yahoo.com/group/FMML/
we can share filters and ideas and perhaps learn the C+ style language.
Ken
Last edited by byRo : 05-06-2006 at 12:17 PM.
Reason: byRo: Thread split
| 
02-10-2006, 07:42 AM
|  | Moderator | | Join Date: May 2004 Location: Goiânia, Brazil
Posts: 1,536
| | | A question... How many folks aroud here already have experience with FilterMeister?
I started messing around in Filter Factory, but the interface was sooo ugly that I lost interest.
Now I'm getting fired up again.
Rô | 
02-17-2006, 12:32 PM
|  | Moderator | | Join Date: May 2004 Location: Goiânia, Brazil
Posts: 1,536
| | Quote: |
Originally Posted by Cameraken I must start reading that manual. | I just did!
Something I picked up. is that the Border code done this way is very inefficient.
You will be testing every single pixel in the image, to just alter a few of them which happen to be the border area.
Much quicker, in terms of execution time, would be to set up some loops to change only the borders. (Although, admittedly, in this case, it probably isn't really worth it).
Talking of execution speed...
I've been tearing apart the "Recursive Gaussian Blur" code.
I noticed that the author does not use X and Y, but instead uses x_start, x_end, y_start and y_end.
I, thinking how clever I was  , substituted the X and Y into the code - which then ran 6 times slower. Stroker? Help! What's going on?
Rô | 
02-17-2006, 12:59 PM
|  | Senior Member | | Join Date: Jan 2005
Posts: 309
| | | When you have an image in FM, the dimensions are 0 to X and 0 to Y. Actually, I think it's X-1 and Y-1.
Now, the preview can only show so much. The viewable part of the image in the preview is x_start to x_end and y_start to y_end. When you use these, you are only processing only what is in the preview instead of the entire image.
The suck part is when using isTilable=False. This is going to be the case when using recursive Gauss. When previewing with rG, just the preview is processed and all is fine. However, once you click Okay, the entire image is now one big tile instead of little chunks. Add buffer usage and memory can sky rocket. This means that rG will bog down with bigger images when you click Okay, but should be fine while previewing.
Make sense?
edit:
Just found out my 8 year old is being taught French in school (public). Her reading level is very advanced, so she is in a special class. Just had to share that.
Last edited by Stroker : 02-17-2006 at 01:05 PM.
| 
02-17-2006, 02:47 PM
|  | Moderator | | Join Date: May 2004 Location: Goiânia, Brazil
Posts: 1,536
| | Quote: |
Originally Posted by Stroker Now, the preview can only show so much. The viewable part of the image in the preview is x_start to x_end and y_start to y_end. When you use these, you are only processing only what is in the preview instead of the entire image. | That explains it PERFECTLY! Thanks. Quote: |
Originally Posted by Stroker Just found out my 8 year old is being taught French in school (public). Her reading level is very advanced, so she is in a special class. Just had to share that. | Pleased to hear -you must be very proud! (I hated French whan I was at school, but that's probably because I HAD to take it - now I speak Portuguese all day!)
Rô | 
03-01-2006, 07:41 AM
|  | Moderator | | Join Date: May 2004 Location: Goiânia, Brazil
Posts: 1,536
| | OK, stroker, here's some to start....
1) The "OnCtl" handler gets activated whenever something happens in a control (or in the dialog?). The "ForEveryTile" also gets activated. If I set a control to "no event" (or something like that) can I avoid the "ForEveryTile";
2) It seems that every time the ForEveryTile starts, the image buffers (pget / tget / t2get) get cleared. Right?
3) Inside the "OnFilterStart" handler, I don't have access to x_start etc. ( OK, that's pretty obvious) but can I still access the source pixels (src(x,y,z))?
4) If I want to do an initial one-off transformed image (like in my equalization plugin) and don't want to keep on recalculating the same thing needlessly, I imagine (based on question 2 and 3) that I could calculate the "transform" in the "OnFilterStart" handler and then would have to store in an array (memory). Right?
5) Seems that the scope of variables is only within the handler. If I want to pass a value between handlers (or iterations) the options would be: a) A control on the dialog;
b) Use the variable array ( get(), put()) - assuming that this doesn't get cleared every time. Does it?
c) Stored in memory. 6) Seems that I remember you sneaked in something like "extendedui", what's that?
7) Where's your secret supply of FM info?
OK, you don't have to reply to 7) if it really is a secret, OK?
Rô | 
03-01-2006, 05:05 PM
|  | Senior Member | | Join Date: Jan 2005
Posts: 309
| | 1. I'm not sure. I'll look into this.
2. See #1, but I'm fairly sure buffers are cleared.
3. You should have access to those variables. Try this: Code: %ffp
OnFilterStart:{
Info("%d %d",x_start,x_end);
return false;
} If you zoom in/out and pan, you should get x_start et al.
4. This one is kind of tricky. Currently it has to be hacked using a system global variable. Code: %ff
OnFilterStart:{
if (i9==0){
i9=123456;
// more code here to run once
}
return false;
}
OnCtl(n):{
if ((n==CTL_CANCEL || n==CTL_OK) && e==FME_CLICKED) i9=0; //RESET IT
return false;
} It's an ugly hack, but it works. If you plan on moving ctl_preview, ctl_zoom, or ctl_progress, you have to use this hack and setCtlPos().
A truly run once structure is in the works. I think it is called OnFilterInit. Personally, I'm partial to OnFilterAlpha.
5. A common method is to use a control and hide it. I'm pretty sure get() and put() are global. Arrays ala allocArray() are global. There are some named variables that are global, like i9 k0 str0, but I don't know too much about these.
6. "extendedui" is for drop-down lists. Combobox, I believe. I can't remember what it does off the top of my head, but I know I like it so I just use it automatically. Should be in UserGuide.pdf.
7. The docs (HTML and PDF), FMML archive, source codes, and lots of time reading. I also keep a notebook - a honker 3' D-ring by my right elbow. I've been at it for close to a year and I'm only just starting to feel the groove.
Roland, you should check out the FM Mailing List (FMML). Lots of good FM users there including the developers. Sounds like you might be getting too big for my breaches and you will need their help more than mine soon enough. Kudos.
Last edited by Stroker : 03-01-2006 at 05:12 PM.
| 
03-01-2006, 05:42 PM
|  | Moderator | | Join Date: May 2004 Location: Goiânia, Brazil
Posts: 1,536
| | Thanks, Stroker, really appreciate the help.
I've just done a couple of hours wandering around FMML, what a pity it isn't all neat and organized like RetouchPRO.
I'll be setting up some test codes for the points still in doubt. Get back to you later.
Rô | 
03-01-2006, 07:31 PM
|  | Senior Member | | Join Date: Feb 2005 Location: Lancashire (UK)
Posts: 1,112
| | | Question 7.
Google “FilterMeister Code”. Apart from FilterMeisters own Web page you get straight back here.
Thanks to Stroker this thread IS THE best supply of FM info.
Ken. | 
03-02-2006, 06:26 PM
|  | Moderator | | Join Date: May 2004 Location: Goiânia, Brazil
Posts: 1,536
| | Quote: |
Originally Posted by Stroker 5. A common method is to use a control and hide it. I'm pretty sure get() and put() are global. Arrays ala allocArray() are global. There are some named variables that are global, like i9 k0 str0, but I don't know too much about these. | I made up this little test routine ( using ctl(0) as the run-once flag): Code: %ffp
ctl(0): CHECKBOX , "Initialize" , pos=(285,50), size=(40,12), Val = 1
ctl(1): PUSHBUTTON, "GO" , pos=(285,70), size=(40,12)
ForEveryTile:{
if (ctl(0)) { //Initialize the filter
i0 = 199; // init i0
put( 199, 0); // init i(0)
allocArray(0,1,0,0,1);
putArray(0,0,0,0,199); // init array()
setCtlVal(0,0); // end of initialize routine
}
//Normal tile processing
Info( "Values \ni0 is %i \nget(0) is %i \narray is %i", i0, get(0), getArray(0,0,0,0));
i0++; //increment i0
put(get(0)+1,0); //increment i(0)
putArray(0,0,0,0,getArray(0,0,0,0)+1); //increment array()
return true;
} First time through all get set to 199 by the initialize routine, next time ( pressing "GO") the i0 and array get incremented, but the get(0) just returns zero.
So, yes, i0 ( up to i9) and arrays are global, the "put/get array" is not. Quote: |
Originally Posted by Stroker A truly run once structure is in the works. I think it is called OnFilterInit. | I had been thinking that the OnFilterStart is what would do this function, however maybe combining this with an initialize flag I can get it to work like OnFilterInit.
Last edited by byRo : 03-02-2006 at 06:33 PM.
| 
03-04-2006, 05:06 AM
|  | Senior Member Patron | | Join Date: Jun 2004
Posts: 730
| | | is it just me or do none of the examples in the tutorials compile? I managed to get the blur example to compile by changing 'true' to return true... but some of them are like for(y=0; y and then they go onto the next line so I cant fill in the blanks because I dont know what they should be | 
03-04-2006, 06:28 AM
|  | Senior Member | | Join Date: Feb 2005 Location: Lancashire (UK)
Posts: 1,112
| | | Hi Nancy.
It’s nice to see you here.
I have never had a problem compiling any of the examples I have tried (I have not tried them all)
The ‘Border Code’ (Post 8) is straight from the manual.
I have tried most of the example source code which is downloaded with FilterMeister, and again, never had a problem.
One problem I have had occasionally is in the formatting of the code.
Try this.
Instead of copying and pasting straight to FM. First paste the code to Notepad. Then copy the code from Notepad and Paste this to FM.
If that does not help then can you give a specific example of code that is not compiling.
Ken | 
03-04-2006, 08:04 AM
|  | Senior Member Patron | | Join Date: Jun 2004
Posts: 730
| | This is straight out the manual - for blend and labelled example Code: %ffp
//This example blends the image with a mirrored version of itself
ctl(0): "Ratio",range=(0,255),val=128
ctl(1): combobox(vscroll),action=preview, color=#FFFFFF,fontcolor=#0000ff, size=(50,200),
text="Normal\nDissolve\nThreshold\nThreshold 2\nMultiply\nScreen\nOverlay\nSoft Light\nHard Light\nDodge\nBurn\nDarken\nLighten\nExclusion\nDifference\nNegDif 1\nNegDif 2\nSubtract\nAdd\nExpose",
val=0
ForEveryTile:
{
for (y=y_start; y
updateProgress(y,y_end);
for (x=x_start; x
for (z=0; z
pset(x, y, z, blend (src(x,y,z), src(X-x,Y-y,z) , z, ctl(1),ctl(0)) );
}}}
return true;
} The for loops are incomplete
This example is one from the tutorials Code: %ffp
Category: "FM Tutorial"
Title: "Blur II"
Author: "Ilyich the Toad"
ctl[0]:"Blur &Width",range=(2,scaleFactor*X/2),val=3,pagesize=3,linesize=1
ctl[1]:"Blur &Height",range=(2,scaleFactor*Y/2),val=3,pagesize=3,linesize=1
ForEveryTile:
{
int kernelheight; int kernelwidth;
int xlook; int ylook;
int sum; int amount; int progress;
setCtlRange(0,2,scaleFactor*X/2); setCtlRange(1,2,scaleFactor*Y/2);
kernelheight=max(ctl(1)/scaleFactor, 1); //avoiding zero kernel on small preview
kernelwidth=max(ctl(0)/scaleFactor, 1); //avoiding zero kernel on small preview
progress=0;
// --------------------------------
// Blur - first pass (along X-axis)
// --------------------------------
for (y=0; y < Y; y++) {
if(updateProgress(progress,2*Y)) break;
progress++;
for (x=0; x < X; x++) {
for (z= 0; z < Z; z++) {
sum=0; amount=0;
for (xlook=0; xlook<kernelwidth; xlook++)
{
sum+= src((x+xlook-kernelwidth/2),y,z);
amount++;
}; //accumulate pixels in a raw
tset(x,y,z,sum/amount); //divide the sum onto kernel size
}
}
}
// ---------------------------------
// Blur - second pass (along Y-axis)
// ---------------------------------
for (y=0; y < Y; y++) {
if(updateProgress(progress, 2*Y)) break;
progress++;
for (x=0; x < X; x++) {
for (z= 0; z < Z; z++) {
sum=0; amount=0;
for (ylook=0; ylook<kernelheight; ylook++)
{
sum+= tget(x,(y+ylook-kernelheight/2),z);
amount++;
}; //accumulate pixels in a column
pset(x,y,z,sum/amount); //divide the sum onto kernel size
}
}
}
updateProgress(0, 100);
true;
} It doesnt compile because the last line says 'true' instead of 'return true'. | 
03-04-2006, 11:31 AM
|  | Moderator | | Join Date: May 2004 Location: Goiânia, Brazil
Posts: 1,536
| | Hi, Nancy, good to see you around here.
Working with Filtermeister is a bit like trying to get into Deep Paint - very little organized information at all. You just have to keep reading around and trying to piece the stuff together. Stroker and I, can probably help out with most things if you need.
This is the first one corrected: Code: %ffp
//This example blends the image with a mirrored version of itself
ctl(0): "Ratio",range=(0,255),val=128
ctl(1): combobox(vscroll),action=preview, color=#FFFFFF,fontcolor=#0000ff, size=(50,200),
text="Normal\nDissolve\nThreshold\nThreshold 2\nMultiply\nScreen\nOverlay\nSoft Light\nHard Light\nDodge\nBurn\nDarken\nLighten\nExclusion\nDifference\nNegDif 1\nNegDif 2\nSubtract\nAdd\nExpose",
val=0
ForEveryTile:
{
for (y=y_start; y<y_end; y++) {
updateProgress(y,y_end);
for (x=x_start; x<x_end; x++) {
for (z=0; z<Z; z++) {
pset(x, y, z, blend (src(x,y,z), src(X-x,Y-y,z) , z, ctl(1),ctl(0)) );
}}}
return true;
} As for the second one - the final line should be " return true;" (which basically means that this part of the code is going to affect the output image)
Anything else you need, your wish is my command.
Rô | 
03-05-2006, 09:40 AM
|  | Senior Member | | Join Date: Feb 2005 Location: Lancashire (UK)
Posts: 1,112
| | Craig (Kraellin) requested a masking filter here http://www.retouchpro.com/forums/showthread.php?t=12957
I can’t find any way to make this selection in one go.
The magic wand will select the painting quite easily using a setting of 10 and making several ‘Adds’
Using colour range or Hue/sat will not work.
Any Ideas?
Ken. Code: Ctl(0): "Red Min", Pos=(280,10),val=255,track
Ctl(1): "Red Max", Pos=(280,20),val=255,track
Ctl(2): "Green Min", Pos=(280,30),val=255,track
Ctl(3): "Green Max", Pos=(280,40),val=255,track
Ctl(4): "Blue Min", Pos=(280,50),val=255,track
Ctl(5): "Blue Max", Pos=(280,60),val=255,track
R: ctl(1) > ctl(0) & r > ctl(0) & r < ctl(1)? A=255 :r
G: ctl(3) > ctl(2) & g > ctl(2) & g < ctl(3)? A=255 :g
B: ctl(5) > ctl(4) & b > ctl(4) & b < ctl(5)? A=255 :b |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -6. The time now is 10:44 PM. | |
|