Detection of medical information such as osteophyte on spine x-ray images is an important task for spine x-ray image retrieval. Curve matching can be used to match partial shapes for image retrieval. Using a curve segment that contains osteophyte information as the query for matching provides more accurate retrieval information than whole shape matching. This paper presents curve matching methods for matching curve segments that have different number of data points and different data point distribution. Dynamic programming (DP) is implemented to allow merging of the data points in the process of curve matching, which minimizes the impact of having different data point distribution. Two shape representation methods using line segments and multiple open triangles have been evaluated in conjunction with DP. This paper focuses on the improvement on the original DP to allow merging points on the query curve using a modified multiple open triangle shape representation method. It also includes matching result comparisons between two shape representation methods and between merging and non-merging query data points using multiple open triangles.