Skip to content
Snippets Groups Projects
Commit d38fcd92 authored by Rony Abecidan's avatar Rony Abecidan
Browse files

Update create_domains.py

parent b1f1e416
No related branches found
No related tags found
No related merge requests found
......@@ -81,18 +81,18 @@ def sharpen(alpha):
def blurry(img):
return cv2.blur(img,(10,10))
def compress(fq):
def sub_function(im):
return compress_img(im,fq)
return sub_function
def compress_img(img,fq=100):
encode_param = [int(cv2.IMWRITE_JPEG_QUALITY), fq]
result, encimg = cv2.imencode('.jpg',img,encode_param)
img = cv2.imdecode(encimg, 1)
return img
def compress(fq):
def sub_function(im):
return compress_img(im,fq)
return sub_function
def extract_patches_for_classification(fake_path,mask_path,real,fake,position,windows=(128,128,3),stride=None,transformation=None,seed=2021,nb_patch_max=2):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment