The present invention relates to a median filter for replacing a value for an arbitrary point with a median within a window by surrounding a window with respect to an arbitrary point. The median filter sequentially receives data input serially, A sorter 22 for rearranging the data output from the shift register 21 in the order of magnitude, and a rearrangement unit 22 for rearranging the data by the sorter 22, A data selector 23 for detecting and outputting data corresponding to a maximum value among data, data corresponding to an intermediate value, and data corresponding to a minimum value, and a data selector 23 for selecting data corresponding to the maximum value and data A second comparator 25 for detecting a difference between the data corresponding to the intermediate value and the data corresponding to the minimum value, And a controller 26 for controlling the window size of the shift register 21 to be enlarged when the difference between the maximum value and the intermediate value is larger than the preset threshold value or the difference between the intermediate value and the minimum value is larger than the preset threshold value .
展开▼