__init__.pyi 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. __all__: list[str] = []
  2. import cv2.typing
  3. import typing as _typing
  4. # Enumerations
  5. CCM_3x3: int
  6. CCM_3X3: int
  7. CCM_4x3: int
  8. CCM_4X3: int
  9. CCM_TYPE = int
  10. """One of [CCM_3x3, CCM_3X3, CCM_4x3, CCM_4X3]"""
  11. INITIAL_METHOD_WHITE_BALANCE: int
  12. INITIAL_METHOD_LEAST_SQUARE: int
  13. INITIAL_METHOD_TYPE = int
  14. """One of [INITIAL_METHOD_WHITE_BALANCE, INITIAL_METHOD_LEAST_SQUARE]"""
  15. COLORCHECKER_Macbeth: int
  16. COLORCHECKER_MACBETH: int
  17. COLORCHECKER_Vinyl: int
  18. COLORCHECKER_VINYL: int
  19. COLORCHECKER_DigitalSG: int
  20. COLORCHECKER_DIGITAL_SG: int
  21. CONST_COLOR = int
  22. """One of [COLORCHECKER_Macbeth, COLORCHECKER_MACBETH, COLORCHECKER_Vinyl, COLORCHECKER_VINYL, COLORCHECKER_DigitalSG, COLORCHECKER_DIGITAL_SG]"""
  23. COLOR_SPACE_sRGB: int
  24. COLOR_SPACE_S_RGB: int
  25. COLOR_SPACE_sRGBL: int
  26. COLOR_SPACE_S_RGBL: int
  27. COLOR_SPACE_AdobeRGB: int
  28. COLOR_SPACE_ADOBE_RGB: int
  29. COLOR_SPACE_AdobeRGBL: int
  30. COLOR_SPACE_ADOBE_RGBL: int
  31. COLOR_SPACE_WideGamutRGB: int
  32. COLOR_SPACE_WIDE_GAMUT_RGB: int
  33. COLOR_SPACE_WideGamutRGBL: int
  34. COLOR_SPACE_WIDE_GAMUT_RGBL: int
  35. COLOR_SPACE_ProPhotoRGB: int
  36. COLOR_SPACE_PRO_PHOTO_RGB: int
  37. COLOR_SPACE_ProPhotoRGBL: int
  38. COLOR_SPACE_PRO_PHOTO_RGBL: int
  39. COLOR_SPACE_DCI_P3_RGB: int
  40. COLOR_SPACE_DCI_P3_RGBL: int
  41. COLOR_SPACE_AppleRGB: int
  42. COLOR_SPACE_APPLE_RGB: int
  43. COLOR_SPACE_AppleRGBL: int
  44. COLOR_SPACE_APPLE_RGBL: int
  45. COLOR_SPACE_REC_709_RGB: int
  46. COLOR_SPACE_REC_709_RGBL: int
  47. COLOR_SPACE_REC_2020_RGB: int
  48. COLOR_SPACE_REC_2020_RGBL: int
  49. COLOR_SPACE_XYZ_D65_2: int
  50. COLOR_SPACE_XYZ_D65_10: int
  51. COLOR_SPACE_XYZ_D50_2: int
  52. COLOR_SPACE_XYZ_D50_10: int
  53. COLOR_SPACE_XYZ_A_2: int
  54. COLOR_SPACE_XYZ_A_10: int
  55. COLOR_SPACE_XYZ_D55_2: int
  56. COLOR_SPACE_XYZ_D55_10: int
  57. COLOR_SPACE_XYZ_D75_2: int
  58. COLOR_SPACE_XYZ_D75_10: int
  59. COLOR_SPACE_XYZ_E_2: int
  60. COLOR_SPACE_XYZ_E_10: int
  61. COLOR_SPACE_Lab_D65_2: int
  62. COLOR_SPACE_LAB_D65_2: int
  63. COLOR_SPACE_Lab_D65_10: int
  64. COLOR_SPACE_LAB_D65_10: int
  65. COLOR_SPACE_Lab_D50_2: int
  66. COLOR_SPACE_LAB_D50_2: int
  67. COLOR_SPACE_Lab_D50_10: int
  68. COLOR_SPACE_LAB_D50_10: int
  69. COLOR_SPACE_Lab_A_2: int
  70. COLOR_SPACE_LAB_A_2: int
  71. COLOR_SPACE_Lab_A_10: int
  72. COLOR_SPACE_LAB_A_10: int
  73. COLOR_SPACE_Lab_D55_2: int
  74. COLOR_SPACE_LAB_D55_2: int
  75. COLOR_SPACE_Lab_D55_10: int
  76. COLOR_SPACE_LAB_D55_10: int
  77. COLOR_SPACE_Lab_D75_2: int
  78. COLOR_SPACE_LAB_D75_2: int
  79. COLOR_SPACE_Lab_D75_10: int
  80. COLOR_SPACE_LAB_D75_10: int
  81. COLOR_SPACE_Lab_E_2: int
  82. COLOR_SPACE_LAB_E_2: int
  83. COLOR_SPACE_Lab_E_10: int
  84. COLOR_SPACE_LAB_E_10: int
  85. COLOR_SPACE = int
  86. """One of [COLOR_SPACE_sRGB, COLOR_SPACE_S_RGB, COLOR_SPACE_sRGBL, COLOR_SPACE_S_RGBL, COLOR_SPACE_AdobeRGB, COLOR_SPACE_ADOBE_RGB, COLOR_SPACE_AdobeRGBL, COLOR_SPACE_ADOBE_RGBL, COLOR_SPACE_WideGamutRGB, COLOR_SPACE_WIDE_GAMUT_RGB, COLOR_SPACE_WideGamutRGBL, COLOR_SPACE_WIDE_GAMUT_RGBL, COLOR_SPACE_ProPhotoRGB, COLOR_SPACE_PRO_PHOTO_RGB, COLOR_SPACE_ProPhotoRGBL, COLOR_SPACE_PRO_PHOTO_RGBL, COLOR_SPACE_DCI_P3_RGB, COLOR_SPACE_DCI_P3_RGBL, COLOR_SPACE_AppleRGB, COLOR_SPACE_APPLE_RGB, COLOR_SPACE_AppleRGBL, COLOR_SPACE_APPLE_RGBL, COLOR_SPACE_REC_709_RGB, COLOR_SPACE_REC_709_RGBL, COLOR_SPACE_REC_2020_RGB, COLOR_SPACE_REC_2020_RGBL, COLOR_SPACE_XYZ_D65_2, COLOR_SPACE_XYZ_D65_10, COLOR_SPACE_XYZ_D50_2, COLOR_SPACE_XYZ_D50_10, COLOR_SPACE_XYZ_A_2, COLOR_SPACE_XYZ_A_10, COLOR_SPACE_XYZ_D55_2, COLOR_SPACE_XYZ_D55_10, COLOR_SPACE_XYZ_D75_2, COLOR_SPACE_XYZ_D75_10, COLOR_SPACE_XYZ_E_2, COLOR_SPACE_XYZ_E_10, COLOR_SPACE_Lab_D65_2, COLOR_SPACE_LAB_D65_2, COLOR_SPACE_Lab_D65_10, COLOR_SPACE_LAB_D65_10, COLOR_SPACE_Lab_D50_2, COLOR_SPACE_LAB_D50_2, COLOR_SPACE_Lab_D50_10, COLOR_SPACE_LAB_D50_10, COLOR_SPACE_Lab_A_2, COLOR_SPACE_LAB_A_2, COLOR_SPACE_Lab_A_10, COLOR_SPACE_LAB_A_10, COLOR_SPACE_Lab_D55_2, COLOR_SPACE_LAB_D55_2, COLOR_SPACE_Lab_D55_10, COLOR_SPACE_LAB_D55_10, COLOR_SPACE_Lab_D75_2, COLOR_SPACE_LAB_D75_2, COLOR_SPACE_Lab_D75_10, COLOR_SPACE_LAB_D75_10, COLOR_SPACE_Lab_E_2, COLOR_SPACE_LAB_E_2, COLOR_SPACE_Lab_E_10, COLOR_SPACE_LAB_E_10]"""
  87. LINEARIZATION_IDENTITY: int
  88. LINEARIZATION_GAMMA: int
  89. LINEARIZATION_COLORPOLYFIT: int
  90. LINEARIZATION_COLORLOGPOLYFIT: int
  91. LINEARIZATION_GRAYPOLYFIT: int
  92. LINEARIZATION_GRAYLOGPOLYFIT: int
  93. LINEAR_TYPE = int
  94. """One of [LINEARIZATION_IDENTITY, LINEARIZATION_GAMMA, LINEARIZATION_COLORPOLYFIT, LINEARIZATION_COLORLOGPOLYFIT, LINEARIZATION_GRAYPOLYFIT, LINEARIZATION_GRAYLOGPOLYFIT]"""
  95. DISTANCE_CIE76: int
  96. DISTANCE_CIE94_GRAPHIC_ARTS: int
  97. DISTANCE_CIE94_TEXTILES: int
  98. DISTANCE_CIE2000: int
  99. DISTANCE_CMC_1TO1: int
  100. DISTANCE_CMC_2TO1: int
  101. DISTANCE_RGB: int
  102. DISTANCE_RGBL: int
  103. DISTANCE_TYPE = int
  104. """One of [DISTANCE_CIE76, DISTANCE_CIE94_GRAPHIC_ARTS, DISTANCE_CIE94_TEXTILES, DISTANCE_CIE2000, DISTANCE_CMC_1TO1, DISTANCE_CMC_2TO1, DISTANCE_RGB, DISTANCE_RGBL]"""
  105. # Classes
  106. class ColorCorrectionModel:
  107. # Functions
  108. @_typing.overload
  109. def __init__(self, src: cv2.typing.MatLike, constcolor: CONST_COLOR) -> None: ...
  110. @_typing.overload
  111. def __init__(self, src: cv2.typing.MatLike, colors: cv2.typing.MatLike, ref_cs: COLOR_SPACE) -> None: ...
  112. @_typing.overload
  113. def __init__(self, src: cv2.typing.MatLike, colors: cv2.typing.MatLike, ref_cs: COLOR_SPACE, colored: cv2.typing.MatLike) -> None: ...
  114. def setColorSpace(self, cs: COLOR_SPACE) -> None: ...
  115. def setCCM_TYPE(self, ccm_type: CCM_TYPE) -> None: ...
  116. def setDistance(self, distance: DISTANCE_TYPE) -> None: ...
  117. def setLinear(self, linear_type: LINEAR_TYPE) -> None: ...
  118. def setLinearGamma(self, gamma: float) -> None: ...
  119. def setLinearDegree(self, deg: int) -> None: ...
  120. def setSaturatedThreshold(self, lower: float, upper: float) -> None: ...
  121. def setWeightsList(self, weights_list: cv2.typing.MatLike) -> None: ...
  122. def setWeightCoeff(self, weights_coeff: float) -> None: ...
  123. def setInitialMethod(self, initial_method_type: INITIAL_METHOD_TYPE) -> None: ...
  124. def setMaxCount(self, max_count: int) -> None: ...
  125. def setEpsilon(self, epsilon: float) -> None: ...
  126. def run(self) -> None: ...
  127. def getCCM(self) -> cv2.typing.MatLike: ...
  128. def getLoss(self) -> float: ...
  129. def get_src_rgbl(self) -> cv2.typing.MatLike: ...
  130. def get_dst_rgbl(self) -> cv2.typing.MatLike: ...
  131. def getMask(self) -> cv2.typing.MatLike: ...
  132. def getWeights(self) -> cv2.typing.MatLike: ...
  133. def infer(self, img: cv2.typing.MatLike, islinear: bool = ...) -> cv2.typing.MatLike: ...