In the second phase, the recognition of the detected object takes place, usually e.g. the book. A rectangular cropping frame is calculated around the detected object, which contains the object completely with as little additional margin as possible. In order for this frame to fit as exactly as possible on a rectangular object such as a book, the page orientation (phase 1) should be applied beforehand. This phase is often referred to as trimming, because it removes the mostly dark edges of the image.