|
I have tried writing a plugin that does the same thing as the "Thresholding"
command in the menu to a 8-bit greyscale picture. But it doesen't seem to
work. I'm not sure how the "Thresholding" command works, but I recorded a
macro which made it seem as the command involved both setting a threshold
then "Convert to mask". But when I run my program what I set my threshold to
doesn't seem to have any inpact on how the image looks after I do the
"Convert to mask", which is what I want.
How do I use the threshold to decide which pixels will be white/black in the
processed picture? Why doesn't my solution work?
Here is the relevant code from the program:
dstp.setThreshold(200, 255, dstp.getLutUpdateMode());
treshy = new Thresholder();
treshy.run("Convert to Mask");
"dstp" is is a ImageProcessor
Also, what is LutUpdateMode? I'm not quite sure what it's for.
//Susanna
|