I am making a database from a randomly modified picture and i want to save each modification. This is my code but i have an error with the integer i inside the for loop.
How can i then save the pictures and use i for their names ?
import numpy as np
import cv2
import random
import os
image = cv2.imread('positive/30.jpg')
def modif_img(img):
#HERE IS WHERE I MODIFY MY PICTURE
return img
nbr = 3
for i in nbr:
newImage = modif_img(image)
#cv2.imshow("New image", newImage)
path = './positive/30'
cv2.imwrite(os.path.join(path, 'a' + str(i) + '.bmp'), newImage)