The FMMIS algorithm was compared with the Seed Region Growing (SRG) algorithm of [PERSON], and it was proven that the former is very fast and more effective in detecting defects in the \"bird's eye\" and \"freckle\" categories, as well as \"spot\", \"blueing\", and \"split\" (the number of true positives, i.e., correctly detected: TP \(<\) 50%) [17; 18; 19; 20; 21; 22]. The contribution of this team of authors is a compact approach for the optimization (cross cutting) of sawn timber. This approach consists of the following:  
1. An input material scanning system (scanner, resolution 76.2 dpi, 3 pixels/mm), which is responsible for recognizing and classifying the type of defects using vision techniques;
2. Cutting optimization algorithms depending on the type of defect in order to eliminate selected process stages;
3. A module for parameterizing the scanner operation conducted by the operator;
4. A sorting module and the semi-automatic stacking of the output material;
5. An integral cutting module with a sorting system;
6. A module for the semi-automatic unstacking of material for feeding to the cutting line. Thanks to the use of such component lines, it is possible to detect defects in wood with a diameter accuracy of up to 10 mm, the automatic determination of the type and size of the defect (e.g., healthy knot 25 mm), the automatic planning of sawn timber cutting, sorting according to scanning results, stacking elements into layers to eliminate the cumbersome and non-ergonomic process of manually taking elements from the table and spreading them on pallets, and facilitating the unstacking of the material, which will eliminate the cumbersome operation of taking sawn timber from the stack and feeding it to the conveyor. So far, human-operated optimizers have been responsible for identifying and classifying the type of defect in sawmills with lower efficiency. Their task is to cut out defective parts, e.g., knots. As a result, friezes and semi-finished products for further processing are created. Accuracy in cutting out defects involves cutting out the defect as sparingly as possible to obtain as much material as possible in a better class. This activity depends on the operator's precision and their assessment of the material from four sides. As a result of an inspection of the quality of the marking defects by the operator (waste binswere inspected in several sawmills in Poland--the result was the importance of defects according to employees), it was estimated that employees add approximately 50 mm to each defect. An employee marking several boards per minute constantly has to subjectively assess whether a given section should be cut or left whole. A solid and reliable calculation for each board throughout the entire operator's work is not possible due to the need to maintain production efficiency. During such an assessment of sawn timber, it is necessary to analyze not only the defects in the wood, but also their location (the customer may indicate in the specification that there is a possibility of knots, but only on one side and of a specific size). Thanks to the use of a material scanning system with cutting optimization algorithms using vision techniques in the lumber optimization line, it is possible to reduce the amount of waste and increase the amount of high-quality output material, eliminate the unnecessary cutting out of defects, correctly sort elements, optimize the cutting of resin around the knot, and increase the efficiency of the optimization process per number of people, improving the ergonomics of their work. Thanks to the use of simple hardware solutions (with a low cost of the machine) and high efficiency of defect detection using complex and specialized algorithms, the proposed solution is able to achieve a high degree of automation for many processes with low device efficiency.