border ¶
This module implements utilities for correcting dirty or damaged borders.
Classes:
-
FixBorderBrightness
–Utility class to adjust or correct brightness inconsistencies along clip borders.
Attributes:
IndexLike module-attribute
¶
IndexLike: TypeAlias = (
SupportsIndex | slice[SupportsIndex, SupportsIndex, SupportsIndex]
)
FixBorderBrightness ¶
FixBorderBrightness(
clip: VideoNode,
protect: bool | tuple[float, float] | list[tuple[float, float]] = True,
)
Bases: vs_object
Utility class to adjust or correct brightness inconsistencies along clip borders.
Initializes the class.
Parameters:
-
clip
¶VideoNode
) –Input clip.
-
protect
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:True
) –Protection configuration for pixel intensity ranges.
- If
True
, automatically determines safe low/high protection thresholds per plane using the clip's minimum and maximum allowed pixel values. - If
False
, disables protection (no clipping protection is applied). - If a tuple
(low, high)
is given, applies it as a protection range. - If a list of tuples is provided, applies individual protection ranges per plane.
- If
Methods:
-
fix_column
–Apply a correction multiplier to an entire column in a specific plane.
-
fix_row
–Apply a correction multiplier to an entire row in a specific plane.
-
process
–Apply all configured border corrections to the clip.
Attributes:
-
clip
–
Source code in vsdehalo/border.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
fix_column ¶
Apply a correction multiplier to an entire column in a specific plane.
Parameters:
-
num
¶int
) –Column index to correct.
-
value
¶float
) –Correction value.
-
plane_index
¶int
, default:0
) –Plane index to apply the correction to (default is 0).
Source code in vsdehalo/border.py
215 216 217 218 219 220 221 222 223 224 |
|
fix_row ¶
Apply a correction multiplier to an entire row in a specific plane.
Parameters:
-
num
¶int
) –Row index to correct.
-
value
¶float
) –Correction value.
-
plane_index
¶int
, default:0
) –Plane index to apply the correction to (default is 0).
Source code in vsdehalo/border.py
226 227 228 229 230 231 232 233 234 235 |
|
process ¶
Apply all configured border corrections to the clip.
Parameters:
-
**kwargs
¶Any
, default:{}
) –Additional arguments forwarded to vsexprtools.norm_expr.
Returns:
-
VideoNode
–A new clip with fixed borders applied.
Source code in vsdehalo/border.py
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
|