from imgaug import augmenters as iaa
import imgaug as ia
import cv2
ia.seed(42)
image = cv2.imread("test.png") # two example images
image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
alpha_r = [0.3,0.5,1]
for a in alpha_r:
rotate = iaa.Canny(alpha=a)
image_aug = rotate(image=image)
cv2.imwrite("canny_a"+str(a)+".png", image_aug)
The code is used to aug image just one time with different canny alpha setting, but the output is not what I want, it looks like iaa is working on the last image all the time.
canny_a0.3.png is OK.
canny_a0.5.png is not OK, looks like not aug on image, but aug on canny_a0.3.png.
canny_a1.png is not OK, a black image shows.
I run this code:
The code is used to aug image just one time with different canny alpha setting, but the output is not what I want, it looks like iaa is working on the last image all the time. canny_a0.3.png is OK. canny_a0.5.png is not OK, looks like not aug on image, but aug on canny_a0.3.png. canny_a1.png is not OK, a black image shows.
how can I aug one image just one time? Thank you!