Abstract: In the computer vision, there are various post-processing algorithms to improve the performance of image processing algorithms. In this study, our goal is a speed optimization for the median filter for binary images. To output a median value, a sorting algorithm is used. The sorting algorithm has a common feature that the throughput exponentially increases as the amount of data to be sorted increases. we proposed a speed optimization method of a median filter for a binary image using an integral image. The feature of a binary image is that its pixels consist of 0 and 1 values. Using this feature, instead of using a sorting algorithm to output a median value, the median value can be calculated by calculating the number of 1's in the mask area using the integral image.