mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-04 08:50:41 +08:00
Enable ruff RUF002 rule (#11377)
* Enable ruff RUF002 rule * Fix --------- Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
@ -74,9 +74,9 @@ def detect_high_low_threshold(
|
||||
image_shape, destination, threshold_low, threshold_high, weak, strong
|
||||
):
|
||||
"""
|
||||
High-Low threshold detection. If an edge pixel’s gradient value is higher
|
||||
High-Low threshold detection. If an edge pixel's gradient value is higher
|
||||
than the high threshold value, it is marked as a strong edge pixel. If an
|
||||
edge pixel’s gradient value is smaller than the high threshold value and
|
||||
edge pixel's gradient value is smaller than the high threshold value and
|
||||
larger than the low threshold value, it is marked as a weak edge pixel. If
|
||||
an edge pixel's value is smaller than the low threshold value, it will be
|
||||
suppressed.
|
||||
|
@ -182,7 +182,7 @@ class IndexCalculation:
|
||||
Atmospherically Resistant Vegetation Index 2
|
||||
https://www.indexdatabase.de/db/i-single.php?id=396
|
||||
:return: index
|
||||
−0.18+1.17*(self.nir−self.red)/(self.nir+self.red)
|
||||
-0.18+1.17*(self.nir-self.red)/(self.nir+self.red)
|
||||
"""
|
||||
return -0.18 + (1.17 * ((self.nir - self.red) / (self.nir + self.red)))
|
||||
|
||||
|
Reference in New Issue
Block a user