Images and videos are often interfered with and affected by various noises. To filter out noise, researchers have proposed many filtering algorithms. bilateral filtering is a nonlinear filtering technique that can retain detailed information such as image edges well while denoising. However, it is a difficult task to implement fast and high-precision bilateral filtering algorithms in hardware platforms. In this paper, for the optimization of bilateral filtering algorithms, we analyze the gradient bilateral filtering and the piecewise approximate bilateral filtering algorithm that can be implemented in hardware, respectively. Then, we analyze and compare the implementation and optimization of bilateral filtering algorithms on FPGA and VLSI hardware architectures, and finally, make suggestions for choosing the appropriate bilateral filtering algorithms and hardware architectures for different purposes.