By considering all orderings of the input samples, which are discrete-time continuous-valued, it is shown here that a weighted median (WM) filter of span N can be specified unambiguously by 2(N-1) consistent linear inequalities relating the weights. This specification is identical to that of a self-dual threshold function with the same weights. It is also shown that WM filters with symmetric weights can be specified by ternary threshold functions. Based on these inequalities, properties of WM filters which can be used to check equivalence of some WM filters are derived.