2c4db5b8def6e4f6f0666d1d559a531357c7c347,data/imageWrapper.py,ImageWrapper,add_noise,#ImageWrapper#,54
Before Change
jitter = np.zeros_like(rgb_img)
jitter[:,:,1] = noise
if self.should_activate(self):
image_name = self.get_name_path("noisy")
noisy_image = cv2.add(self.image, jitter)
combined = np.vstack((self.image[:math.ceil(height/2),:,:], noisy_image[math.ceil(height/2):,:,:]))
cv2.imwrite(image_name,combined)
def brighten(self):
print("Brightening...")
image_for_brightening = Image.fromarray(self.image)
enhancer = ImageEnhance.Brightness(image_for_brightening)
After Change
noise = np.random.randint(0,50, (height, width))
jitter = np.zeros_like(rgb_img)
jitter[:,:,1] = noise
image_name = self.get_name_path("noisy")
noisy_image = cv2.add(self.image, jitter)
combined = np.vstack((self.image[:math.ceil(height/2),:,:], noisy_image[math.ceil(height/2):,:,:]))
print(image_name)
cv2.imwrite(image_name,combined)
def brighten(self, max_brighten=13):
print("Brightening...")
image_for_brightening = Image.fromarray(self.image)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: thoughtworksarts/EmoPy
Commit Name: 2c4db5b8def6e4f6f0666d1d559a531357c7c347
Time: 2017-12-19
Author: sweber@thoughtworks.com
File Name: data/imageWrapper.py
Class Name: ImageWrapper
Method Name: add_noise
Project Name: thoughtworksarts/EmoPy
Commit Name: 2c4db5b8def6e4f6f0666d1d559a531357c7c347
Time: 2017-12-19
Author: sweber@thoughtworks.com
File Name: data/imageWrapper.py
Class Name: ImageWrapper
Method Name: flip
Project Name: thoughtworksarts/EmoPy
Commit Name: 2c4db5b8def6e4f6f0666d1d559a531357c7c347
Time: 2017-12-19
Author: sweber@thoughtworks.com
File Name: data/imageWrapper.py
Class Name: ImageWrapper
Method Name: rotate