The invention discloses a median filtering method and device adapting to a pipeline architecture and a filter. The median filtering method comprises the following steps: S101, receiving a numerical sequence; S102, forming a first numerical value subsequence according to the filtering window, and finding out a numerical value median in the first numerical value subsequence; S103, arranging according to the numerical value sequence, sliding the filtering window, and changing the first numerical value sub-sequence in the first sequence window into a second numerical value sub-sequence after the filtering window is moved into a numerical value and moved out of the numerical value; S104, comparing the shift-in numerical value and the shift-out numerical value with a numerical value median in the first numerical value sub-sequence, and performing logical operation according to a comparison result to obtain a numerical value median in the second numerical value sub-sequence; S105, sliding thefiltering window, and circulating the steps S103 to S104 until the filtering of the numerical sequence is finished; and S106, sequentially storing the numerical value medians, and outputting a numerical value median sequence. According to the filtering algorithm, the logic structure is simple, maintenance of a complex data structure is avoided, the dependence on data in a cycle body is low, pipelining and parallelization are facilitated, and the effect of improving rapid calculation is achieved.