It has become possible to observe neural activity in freely moving animals via calcium imaging using a microscope, which could not be observed previously. However, it remains difficult to extract the dynamics of nerve cells from the recorded imaging data. In this study, we greatly improved the stability, and robustness of the cell activity estimation method via non-negative matrix decomposition with shrinkage estimation of the baseline. In addition, by improving the initial state of the iterative algorithm using a newly proposed method to extract the shape of the cell via image processing, a solution could be obtained with a small number of iterations. These methods were applied to artificial and real data, and their effectiveness was confirmed.