import cv2 
import numpy as np
from img_aug import Img_aug
import os

a=1
aug = Img_aug() 
augment_num = 50
save_path = 'C:/Users/SD/Desktop/pill_aug/Mode_Cough_S/'  

file_llst =  os.listdir('C:/Users/SD/Desktop/pill_img/Mode_Cough_S') 

for file_name in file_llst:
  img = cv2.imread('C:/Users/SD/Desktop/pill_img/Mode_Cough_S/{}'.format(file_name))
  images_aug = aug.seq.augment_images([img for i in range(augment_num)])
  for num,aug_img in enumerate(images_aug):
    cv2.imwrite(save_path+'Mode_Cough_S_{}.jpg'.format(a),aug_img)  
    a+=1
  print('Complete augmenting images')      

            
 
 