## 2 Theoretical Background
### Classical and Fuzzy Hough Transforms
The reason for performing this multiplication step is to determine the gradient magnitude domain, where the polyp edges are most likely to be present within the whole gradient domain. As an example, we received images like (Figure 5b,d,f,h) for [PERSON], Prewitt, Roberts, and Sobel techniques. (It is visible, that in contrast with the full gradient subplot (Figure 4f), subplots (Figure 5b,d,f,h) contain the gradient values only where the edge mask value is 1, i.e., where the white pixels are located in subplots (Figure 5a,c,e,g). Figure 4: 1 st row: (**a**) The original image of the sample (111) from database CVC-Clinic [9], (**b**) the preprocessed image version, and (**c**) its ground truth polyp mask. 2 nd row: (**d**) The mask contour, (**e**) the extended contour ring mask, i.e., the 3 nearest neighbors in all directions for all the contour pixels, and (**f**) the gradient magnitude filtered image. Normalizing: To make the proposed approach universally applicable, for all the pictures in all the databases, the gradient-weighted edges pixels were normalized into the interval [0, 1] for each image separately. 9. Counting the number of the edge pixels located inside the ring mask, (this number serves as the reference: it is the number of the useful edge pixels). 10. Calculating the final evaluation metrics: Considering our application requirements, two quantities were introduced to evaluate each of the four implemented edge detection methods. For each image of the three studied databases, the statistics calculated in the previous steps (the total number of pixels in the polyp mask contour, the total number of edge pixels resulted from each edge detection method, and the total number of edge pixels inside the ring mask) were used in composition the following two metrics. 1. The first evaluation parameter, i.e., the one referring to the calculation efficiency, is defined by the ratio between the number of edge pixels in the ring mask around the polyp contour and the total number of edge pixels in the entire image, \[R\_calc=\frac{(No.\:of\:edge\:pixels\:in\:the\:ring\:mask)}{(Total\:No.\:of\: edge\:pixels)}.\] (14) This ratio represents the quality of the edge detection method with regard to the Hough transforms and polyp detection. \(R\_calc\) values' range is between 0 and 1. The higher this ratio is, the fewer non-mask contour edges are identified, and the less unneeded calculation is required in the classical or fuzzy Hough transform. Figure 8 shows the values of this metric resulting from Canny, Prewitt, Roberts, and Sobel filtering techniques for the three databases. 2. The second evaluation parameter, i.e., the metric referring to the goodness of the edge pixels finding the ideal polyp contour (derived from the ground truth mask), is given by the ratio between the number of edge pixels in the ring mask and the number of pixels in the database polyp mask contour, \[R\_edge=\frac{(No.\:of\:edge\:pixels\:in\:the\:ring\:mask)}{(No.\:of\:pixels\:in\: mask\:contour)}.\] (15) In ideal case, this ratio should be as close to 1 as possible. Figure 7 displays the values of this metric resulting from all edge detection techniques for all studied databases. We have to note that the detected edge pixels in the ring mask may not exactly be the same as the edge pixels in the manually drawn database mask contour, but it still could be used for finding the polyp. 11. Selecting the most appropriate edge detection technique: Canny method detects a wide range of fine edges and gives a dense detailed edges map. It also tends to connect edge pixels to continuous edge lines, in contrast with the other three techniques. Figure 6 clearly shows the large difference between the total number of edge pixels resulting from Canny and the other three edge detection methods. Prewitt, Roberts, and Sobel have very similar results for the majority of samples.