Hello Dmitry,
At the risk of proposing the obvious, have you tried:
myProcedure[something_]:=If[NeedOtsu,Binarize[something],myFunction[something]]
?
OL.
It depends on what syntax you are using. You can try something like this:
myProcedure /; NeedOtsu := Binarize[something]; myProcedure /; Not[NeedOtsu] := myFunction[something]