Hi. I dont; understand how use if conditionals in wolfram. If NeedOtsu is true I should use Binirize, If NeedOtsu is false I should use my function. I tryed to use this but there is Error: Tag Binarize in Binarize[]/;True is Protected. >> What is wrong?
It depends on what syntax you are using. You can try something like this:
myProcedure /; NeedOtsu := Binarize[something]; myProcedure /; Not[NeedOtsu] := myFunction[something]
Hello Dmitry,
At the risk of proposing the obvious, have you tried:
myProcedure[something_]:=If[NeedOtsu,Binarize[something],myFunction[something]]
?
OL.