


"""simple docstring"""






import cva
import numpy as np


class     __lowerCamelCase  :

     '''simple docstring'''


     def __init__(      self    ,				__UpperCAmelCase    ,				__UpperCAmelCase							)       ->							Optional[int]:

          if k in (0.04, 0.06):
               _a    	=				k
               _a    	=				window_size
          else:
               raise ValueError('''invalid k value'''							)


     def __str__(      self							)       ->							str:
          return str(self.k							)





     def 							_UpperCAmelCase      (      self    ,				__UpperCAmelCase							)       ->							tuple[cva.Mat, list[list[int]]]:
          _a    	=				cva.imread(__UpperCAmelCase    ,				0							)
          _a	,      _a    	=				img.shape
          _a    	=				[]
          _a    	=				img.copy()
          _a    	=				cva.cvtColor(__UpperCAmelCase    ,				cva.COLOR_GRAY2RGB							)
          _a	,      _a    	=				np.gradient(__UpperCAmelCase							)
          _a    	=				dx**2
          _a    	=				dy**2
          _a    	=				dx * dy
          _a    	=				0.04
          _a    	=				self.window_size // 2
          for y in range(__UpperCAmelCase    ,				h - offset							):
               for x in range(__UpperCAmelCase    ,				w - offset							):
                    _a    	=				ixx[
                        y - offset : y + offset + 1, x - offset : x + offset + 1
                    ].sum()
                    _a    	=				iyy[
                        y - offset : y + offset + 1, x - offset : x + offset + 1
                    ].sum()
                    _a    	=				ixy[
                        y - offset : y + offset + 1, x - offset : x + offset + 1
                    ].sum()

                    _a    	=				(wxx * wyy) - (wxy**2)
                    _a    	=				wxx + wyy
                    _a    	=				det - k * (trace**2)
                    # Can change the value
                    if r > 0.5:
                         corner_list.append([x, y, r]							)
                         color_img.itemset((y, x, 0)    ,				0							)
                         color_img.itemset((y, x, 1)    ,				0							)
                         color_img.itemset((y, x, 2)    ,				255							)
          return color_img, corner_list


if __name__ == "__main__":
   __snake_case		=       HarrisCorner(0.04, 3)
   __snake_case		=       edge_detect.detect('''path_to_image''')
   cva.imwrite('''detect.png''', color_img)



"""simple docstring"""






def       A_   (   _lowerCAmelCase     :					Dict=2_81_23       ):






     """simple docstring"""

     _a    	=				[1] * (limit + 1)

     for i in range(2,     int(limit**0.5       ) + 1       ):
          sum_divs[i * i] += i
          for k in range(i + 1,     limit // i + 1       ):
               sum_divs[k * i] += k + i

     _a    	=				set()
     _a    	=				0

     for n in range(1,     limit + 1       ):
          if sum_divs[n] > n:
               abundants.add(_lowerCAmelCase       )

          if not any((n - a in abundants) for a in abundants       ):
               res += n

     return res


if __name__ == "__main__":
   print(solution())