The fire management in rack type warehouses is a very important and essential element. Usually, a fire is first produced smoke, then a flame is produced, leading to a fire. Generally, smoke detection systems have smoke detectors installed in all of the rack spaces and detect smoke early on and deliver the correct location. However, if there is not enough space in the rack to install smoke detectors, or if all racks do not have smoke detectors installed, one smoke detector is installed at the top of the rack to manage the surrounding racks. If the smoke detector detects smoke in this configuration, it is not possible to determine which of the grouped racks is generating smoke. Therefore, this study proposes a system to efficiently locate the position of the smoke-producing racks. For this purpose, the camera is installed on a stacker crane that loads and leaves products in a rack warehouse. Image frames are transmitted in real time from fixed cameras so that the difference images are calculated reliably. The images obtained detect the direction of smoke using a technique called dense optical flow, an algorithm that detects the movement of an object. The purpose of this paper is to develop a highly reliable fire detection system that detects the location of the racks in which smoke occurs by moving the stacker cranes in the detected direction and repeatedly.