Fast variability of optical objects is an interesting though poorly explored subject in modern astronomy. Real-time data processing and identification of transient celestial events in the images is very important for such study as it allows rapid follow-up with more sensitive instruments. We discuss an approach which we have developed for the RAPTOR project, a pioneering closed-loop system combining real-time transient detection with rapid follow-up. RAPTORs data processing pipeline is able to identify and localize an optical transient within seconds after the observation. The testing we performed so far have been confirming the effectiveness of our method for the optical transient detection. The software pipeline we have developed for RAPTOR can easily be applied to the data from other experiments.