marta-marta commited on
Commit
c76e029
·
1 Parent(s): 9f580f1

Made edits to match the changes made in Piecewise_Box_Functions

Browse files
Data_Generation/Shape_Generation_Functions.py CHANGED
@@ -8,7 +8,7 @@ from Data_Generation.Piecewise_Box_Functions import back_slash_array, basic_box_
8
  def basic_box(additional_pixels, density, image_size):
9
  A = basic_box_array(image_size) # Creates the outside edges of the box
10
  # Increase the thickness of each part of the box
11
- A = add_pixels(A, additional_pixels, image_size)
12
  return A*density
13
 
14
 
@@ -18,7 +18,7 @@ def horizontal_vertical_box_split(additional_pixels, density, image_size):
18
  A = update_array(A, hot_dog_array(image_size), image_size)
19
  A = update_array(A, hamburger_array(image_size), image_size)
20
  # Increase the thickness of each part of the box
21
- A = add_pixels(A, additional_pixels, image_size)
22
  return A*density
23
 
24
 
@@ -31,35 +31,35 @@ def diagonal_box_split(additional_pixels, density, image_size):
31
 
32
  # Adds pixels to the thickness of each component of the box
33
  # Increase the thickness of each part of the box
34
- A = add_pixels(A, additional_pixels, image_size)
35
  return A*density
36
 
37
 
38
  def back_slash_box(additional_pixels, density, image_size):
39
  A = basic_box_array(image_size) # Initializes A matrix with 0 values
40
  A = update_array(A, back_slash_array(image_size), image_size)
41
- A = add_pixels(A, additional_pixels, image_size)
42
  return A * density
43
 
44
 
45
  def forward_slash_box(additional_pixels, density, image_size):
46
  A = basic_box_array(image_size) # Initializes A matrix with 0 values
47
  A = update_array(A, forward_slash_array(image_size), image_size)
48
- A = add_pixels(A, additional_pixels, image_size)
49
  return A * density
50
 
51
 
52
  def hot_dog_box(additional_pixels, density, image_size):
53
  A = basic_box_array(image_size) # Initializes A matrix with 0 values
54
  A = update_array(A, hot_dog_array(image_size), image_size)
55
- A = add_pixels(A, additional_pixels, image_size)
56
  return A * density
57
 
58
 
59
  def hamburger_box(additional_pixels, density, image_size):
60
  A = basic_box_array(image_size) # Initializes A matrix with 0 values
61
  A = update_array(A, hamburger_array(image_size), image_size)
62
- A = add_pixels(A, additional_pixels, image_size)
63
  return A * density
64
 
65
 
@@ -69,7 +69,7 @@ def x_plus_box(additional_pixels, density, image_size):
69
  A = update_array(A, hamburger_array(image_size), image_size)
70
  A = update_array(A, forward_slash_array(image_size), image_size)
71
  A = update_array(A, back_slash_array(image_size), image_size)
72
- A = add_pixels(A, additional_pixels, image_size)
73
  return A * density
74
 
75
 
@@ -79,7 +79,7 @@ def forward_slash_plus_box(additional_pixels, density, image_size):
79
  A = update_array(A, hamburger_array(image_size), image_size)
80
  A = update_array(A, forward_slash_array(image_size), image_size)
81
  # A = update_array(A, back_slash_array(image_size), image_size)
82
- A = add_pixels(A, additional_pixels, image_size)
83
  return A * density
84
 
85
 
@@ -88,7 +88,7 @@ def back_slash_plus_box(additional_pixels, density, image_size):
88
  A = update_array(A, hot_dog_array(image_size), image_size)
89
  A = update_array(A, hamburger_array(image_size), image_size)
90
  A = update_array(A, back_slash_array(image_size), image_size)
91
- A = add_pixels(A, additional_pixels, image_size)
92
  return A * density
93
 
94
 
@@ -97,7 +97,7 @@ def x_hot_dog_box(additional_pixels, density, image_size):
97
  A = update_array(A, hot_dog_array(image_size), image_size)
98
  A = update_array(A, forward_slash_array(image_size), image_size)
99
  A = update_array(A, back_slash_array(image_size), image_size)
100
- A = add_pixels(A, additional_pixels, image_size)
101
  return A * density
102
 
103
 
@@ -106,7 +106,7 @@ def x_hamburger_box(additional_pixels, density, image_size):
106
  A = update_array(A, hamburger_array(image_size), image_size)
107
  A = update_array(A, forward_slash_array(image_size), image_size)
108
  A = update_array(A, back_slash_array(image_size), image_size)
109
- A = add_pixels(A, additional_pixels, image_size)
110
  return A * density
111
 
112
 
@@ -115,7 +115,7 @@ def forward_slash_hot_dog_box(additional_pixels, density, image_size):
115
  A = basic_box_array(image_size) # Initializes A matrix with 0 values
116
  A = update_array(A, hot_dog_array(image_size), image_size)
117
  A = update_array(A, forward_slash_array(image_size), image_size)
118
- A = add_pixels(A, additional_pixels, image_size)
119
  return A * density
120
 
121
 
@@ -123,7 +123,7 @@ def forward_slash_hamburger_box(additional_pixels, density, image_size):
123
  A = basic_box_array(image_size) # Initializes A matrix with 0 values
124
  A = update_array(A, hamburger_array(image_size), image_size)
125
  A = update_array(A, forward_slash_array(image_size), image_size)
126
- A = add_pixels(A, additional_pixels, image_size)
127
  return A * density
128
 
129
 
@@ -131,7 +131,7 @@ def back_slash_hamburger_box(additional_pixels, density, image_size):
131
  A = basic_box_array(image_size) # Initializes A matrix with 0 values
132
  A = update_array(A, hamburger_array(image_size), image_size)
133
  A = update_array(A, back_slash_array(image_size), image_size)
134
- A = add_pixels(A, additional_pixels, image_size)
135
  return A * density
136
 
137
 
@@ -139,5 +139,5 @@ def back_slash_hot_dog_box(additional_pixels, density, image_size):
139
  A = basic_box_array(image_size) # Initializes A matrix with 0 values
140
  A = update_array(A, hot_dog_array(image_size), image_size)
141
  A = update_array(A, back_slash_array(image_size), image_size)
142
- A = add_pixels(A, additional_pixels, image_size)
143
  return A * density
 
8
  def basic_box(additional_pixels, density, image_size):
9
  A = basic_box_array(image_size) # Creates the outside edges of the box
10
  # Increase the thickness of each part of the box
11
+ A = add_pixels(A, additional_pixels)
12
  return A*density
13
 
14
 
 
18
  A = update_array(A, hot_dog_array(image_size), image_size)
19
  A = update_array(A, hamburger_array(image_size), image_size)
20
  # Increase the thickness of each part of the box
21
+ A = add_pixels(A, additional_pixels)
22
  return A*density
23
 
24
 
 
31
 
32
  # Adds pixels to the thickness of each component of the box
33
  # Increase the thickness of each part of the box
34
+ A = add_pixels(A, additional_pixels)
35
  return A*density
36
 
37
 
38
  def back_slash_box(additional_pixels, density, image_size):
39
  A = basic_box_array(image_size) # Initializes A matrix with 0 values
40
  A = update_array(A, back_slash_array(image_size), image_size)
41
+ A = add_pixels(A, additional_pixels)
42
  return A * density
43
 
44
 
45
  def forward_slash_box(additional_pixels, density, image_size):
46
  A = basic_box_array(image_size) # Initializes A matrix with 0 values
47
  A = update_array(A, forward_slash_array(image_size), image_size)
48
+ A = add_pixels(A, additional_pixels)
49
  return A * density
50
 
51
 
52
  def hot_dog_box(additional_pixels, density, image_size):
53
  A = basic_box_array(image_size) # Initializes A matrix with 0 values
54
  A = update_array(A, hot_dog_array(image_size), image_size)
55
+ A = add_pixels(A, additional_pixels)
56
  return A * density
57
 
58
 
59
  def hamburger_box(additional_pixels, density, image_size):
60
  A = basic_box_array(image_size) # Initializes A matrix with 0 values
61
  A = update_array(A, hamburger_array(image_size), image_size)
62
+ A = add_pixels(A, additional_pixels)
63
  return A * density
64
 
65
 
 
69
  A = update_array(A, hamburger_array(image_size), image_size)
70
  A = update_array(A, forward_slash_array(image_size), image_size)
71
  A = update_array(A, back_slash_array(image_size), image_size)
72
+ A = add_pixels(A, additional_pixels)
73
  return A * density
74
 
75
 
 
79
  A = update_array(A, hamburger_array(image_size), image_size)
80
  A = update_array(A, forward_slash_array(image_size), image_size)
81
  # A = update_array(A, back_slash_array(image_size), image_size)
82
+ A = add_pixels(A, additional_pixels)
83
  return A * density
84
 
85
 
 
88
  A = update_array(A, hot_dog_array(image_size), image_size)
89
  A = update_array(A, hamburger_array(image_size), image_size)
90
  A = update_array(A, back_slash_array(image_size), image_size)
91
+ A = add_pixels(A, additional_pixels)
92
  return A * density
93
 
94
 
 
97
  A = update_array(A, hot_dog_array(image_size), image_size)
98
  A = update_array(A, forward_slash_array(image_size), image_size)
99
  A = update_array(A, back_slash_array(image_size), image_size)
100
+ A = add_pixels(A, additional_pixels)
101
  return A * density
102
 
103
 
 
106
  A = update_array(A, hamburger_array(image_size), image_size)
107
  A = update_array(A, forward_slash_array(image_size), image_size)
108
  A = update_array(A, back_slash_array(image_size), image_size)
109
+ A = add_pixels(A, additional_pixels)
110
  return A * density
111
 
112
 
 
115
  A = basic_box_array(image_size) # Initializes A matrix with 0 values
116
  A = update_array(A, hot_dog_array(image_size), image_size)
117
  A = update_array(A, forward_slash_array(image_size), image_size)
118
+ A = add_pixels(A, additional_pixels)
119
  return A * density
120
 
121
 
 
123
  A = basic_box_array(image_size) # Initializes A matrix with 0 values
124
  A = update_array(A, hamburger_array(image_size), image_size)
125
  A = update_array(A, forward_slash_array(image_size), image_size)
126
+ A = add_pixels(A, additional_pixels)
127
  return A * density
128
 
129
 
 
131
  A = basic_box_array(image_size) # Initializes A matrix with 0 values
132
  A = update_array(A, hamburger_array(image_size), image_size)
133
  A = update_array(A, back_slash_array(image_size), image_size)
134
+ A = add_pixels(A, additional_pixels)
135
  return A * density
136
 
137
 
 
139
  A = basic_box_array(image_size) # Initializes A matrix with 0 values
140
  A = update_array(A, hot_dog_array(image_size), image_size)
141
  A = update_array(A, back_slash_array(image_size), image_size)
142
+ A = add_pixels(A, additional_pixels)
143
  return A * density