In order to speed up the bilateral filtering algorithm, a fast bilateral filtering algorithm based on raised cosine with compressibility factor (BRCF) is proposed. The BRCF uses a raised cosine function with a compression coefficient to replace Gaussian function as the range kernel function, and uses a limited number of linear convolution calculations to achieve bilateral filtering. Then, the improved BRCF (IBRCF) with a compression factor is proposed to accelerate the convergence rate of the raised cosine function. Compared to the published raised cosine algorithm, Taylor polynomial algorithm, and Gaussian polynomial algorithm, the computer simulation results show that the proposed IBRCF has a faster convergence rate with almost the same peak signal-to-noise ratio. After filtered seven images by various algorithms, the running time of the new IBRCF algorithm was confirmed to be less than 1/5 of Gaussian polynomial algorithm, while Gaussian polynomial algorithm was faster than the published raised cosine algorithm and Taylor polynomial algorithm. The mathematical proofs and algorithm flowcharts of the IBRCF algorithm are described in this paper in detail.