I'm trying to process images and try them to save them. I am able to process it but image are not getting saved in folder
code - Taken from github
import cv2, glob, numpy
def scaleRadius(img,scale):
x=img[int(img.shape[0]/2),:,:].sum(1)
r=(x>x.mean()/10).sum()/2
s=scale*1.0/r
return cv2.resize(img,(0,0),fx=s,fy=s)
scale =512
for f in (glob.glob("pdr/*.jpeg")):
a=cv2.imread(f)
a=scaleRadius(a,scale)
b=numpy.zeros(a.shape)
cv2.circle(b,(int(a.shape[1]/2),int(a.shape[0]/2)),int(scale*0.9),(1,1,1),-1,8,0)
aa=cv2.addWeighted(a,4,cv2.GaussianBlur(a,(0,0),scale/30),-4,128)*b+128*(1-b)
cv2.imwrite(str(scale)+"_"+f,aa)
Code executes well but it output does not get saved
cv2.imwrite()in order to save the images. The code on github was posted to guide others using it. That does not mean you blindly copy it and expect it to work wonders.