We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57988c2 commit b7877b7Copy full SHA for b7877b7
albumentations/augmentations/transforms.py
@@ -685,10 +685,13 @@ def get_params_dependent_on_targets(self, params):
685
x = []
686
y = []
687
688
- for rand_x in range(0, width, 10):
689
- rand_y = math.tan(angle) * (rand_x - flare_center_x) + flare_center_y
+ def line(t):
+ return (flare_center_x + t * math.cos(angle), flare_center_y + t * math.sin(angle))
690
+
691
+ for t_val in range(-flare_center_x, width - flare_center_x, 10):
692
+ rand_x, rand_y = line(t_val)
693
x.append(rand_x)
- y.append(2 * flare_center_y - rand_y)
694
+ y.append(rand_y)
695
696
for _i in range(num_circles):
697
alpha = random.uniform(0.05, 0.2)
0 commit comments