Remove lines from bi-tonal images (Novice question)
Posted: 2017-08-24T12:14:40-07:00
I'm trying to replicate something like the following windows BAT command using C#. viewtopic.php?t=22338
The first part seems easy but the rest is lost in translation. What is the C# equiv to this command?
Code: Select all
convert Test2image.png -strip -write mpr:ORG ^
( +clone ^
-negate ^
-morphology Erode rectangle:50x1 ^
-mask mpr:ORG -morphology Dilate rectangle:50x1 ^
+mask ^
) ^
-compose Lighten -composite ^
( +clone ^
-morphology HMT "1x4:1,0,0,1" ^
) ^
-compose Lighten -composite ^
( +clone ^
-morphology HMT "1x3:1,0,1" ^
) ^
-compose Lighten -composite ^
( +clone ^
-morphology HMT "3x1:1,0,1" ^
) ^
-compose Lighten -composite ^
out.png
Code: Select all
myimage.Strip();
using (var mask = myimage.Clone())
{
mask.Negate();
mask.Morphology(MorphologyMethod.Erode, "rectangle:50x1");
// What is -mask and +mask?
}