The conventional local block matching algorithms are fast but have an accuracy issue, making them unsuitable to be implemented on real-time applications. This paper studies a local block matching algorithm with different cost computations, combining a cost aggregation with various blocks' shape and sizes, using the computer and StereoPi. Compared to other local block matching algorithms, the Ranking-Gradient-Similarity Multi-Block (RGSMB) algorithm can extract information with a higher cost uniqueness within the predefined local window. Using KITTI 2015 as input data, RGSMB has better accuracy than other local block matching approaches. It is at least 5% better than Census Transform (CT), 23% better than Ranking Transform (RT), and 62% better than Sum of Absolute Differences (SAD) in terms of accuracy. Furthermore, it can achieve lower computational costs on the StereoPi, a low-cost computer vision embedded system. The RGSMB can achieve 2.5 fps with the right image resolution and parameter settings.