Currently recognition of various organs on computed tomography images is one of the most common activities performed by a radiologist in order to diagnose a patient. Due to a large amount of data this analysis is highly timeconsuming. However, with the current state of technological progress, it has become possible to automatize this process. In this contribution an automatic liver detection algorithm has been created. It identifies a liver in a series of pictures in DICOM format which are the result of spiral computed tomography. The algorithm is based on the methods of digital image processing. Additional steps have been taken to increase the accuracy of the process and eliminate objects with similar density. The algorithm identifies blood vessels and simulates the curve defined by a ribcage of a patient. This algorithm has been implemented in C++ as an integral part of an application with graphical user interface. In order to create this application, the following libraries have been used: OpenCV, DCMTK, and Qt. The process of design, implementation, and testing of the algorithm is described in this paper.