Synthetic image gen
Compare changes
- fima authored
+ 45
− 27
@@ -38,7 +38,9 @@ def overlay_rgb_images(background, foreground, alpha=0.5):
@@ -38,7 +38,9 @@ def overlay_rgb_images(background, foreground, alpha=0.5):
@@ -49,27 +51,42 @@ def overlay_rgb_images(background, foreground, alpha=0.5):
@@ -49,27 +51,42 @@ def overlay_rgb_images(background, foreground, alpha=0.5):
def generate_volume(final_shape=(128,128,128), scale=0.05, order=1, max_value=255, threshold=0.5, gamma=1.0, dtype="uint8", base_shape=(128,128,128)):
@@ -77,25 +94,25 @@ def generate_volume(final_shape=(128,128,128), scale=0.05, order=1, max_value=25
@@ -77,25 +94,25 @@ def generate_volume(final_shape=(128,128,128), scale=0.05, order=1, max_value=25
dist = np.sqrt((i-base_shape[0]/2)**2+(j-base_shape[1]/2)**2+(k-base_shape[2]/2)**2) / np.sqrt(3*((base_shape[0]/2)**2))
@@ -106,13 +123,14 @@ def generate_volume(final_shape=(128,128,128), scale=0.05, order=1, max_value=25
@@ -106,13 +123,14 @@ def generate_volume(final_shape=(128,128,128), scale=0.05, order=1, max_value=25
\ No newline at end of file