When a pipe is partially filled with a given working liquid, the relationship between the electromotive force (EMF) measured by the sensor (flowmeter) and the average velocity is nonlinear and non-monotonic. This relationship varies with the inclination of the pipe, the fluid density, the pipe wall friction coefficient, and other factors. Therefore, existing measurement methods cannot meet the accuracy requirements of many industrial applications. In this study, a new processing method is proposed by which the flow rate can be measured with an ordinary electromagnetic flowmeter even if the pipe is only partially filled. First, a B-spline curve fitting method is applied to a limited set of measurements. Second, matrix inversion required in the B-spline curve method is optimized in order to reduce the number of needed computations. Dedicated experimental tests prove that the proposed method can effectively measure the average flow velocity of the fluid. When the fluid level of the pipeline is between 50% and 100%, the relative error is less than 3.5%.