With the development of calcium imaging, neuroscientists have been able to study neural activity with a higher spatial resolution. However, the real-time processing of calcium imaging is still a big challenge for future experiments and applications. Most neuroscientists have to process their imaging data offline due to the time-consuming of most existing calcium imaging analysis methods. We proposed a novel online neural signal processing framework for calcium imaging and established an Optical Brain-Computer Interface System (OBCIs) for decoding neural signals in real-time. We tested and evaluated this system by classifying the calcium signals obtained from the primary motor cortex of mice when the mice were performing a lever-pressing task. The performance of our online system could achieve above 80% in the average decoding accuracy. Our preliminary results show that the online neural processing framework could be applied to future closed-loop OBCIs studies.