From 0ff629f2f7f71806dba86f2b42b0a6f11d1d782a Mon Sep 17 00:00:00 2001 From: "MinJi.CH" <81309465+SUMMERLOVE7@users.noreply.github.com> Date: Sat, 10 Dec 2022 14:12:32 +0900 Subject: [PATCH] Fix coordinate for img comb --- src/jamoComb4.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jamoComb4.py b/src/jamoComb4.py index 0e3ae35..45f6a71 100644 --- a/src/jamoComb4.py +++ b/src/jamoComb4.py @@ -25,15 +25,15 @@ def jamoComb4(): src3 = cv2.imread('./crop/'+str(j)+'.png') rows, cols, channels = src2.shape #로고파 일 픽셀값 저장 - roi = src1[50:rows+50,50:cols+50] #로고파일 픽셀값을 관심영역(ROI)으로 저장함. + #roi = src1[50:rows+50,50:cols+50] #로고파일 픽셀값을 관심영역(ROI)으로 저장함. gray = cv2.cvtColor(src2, cv2.COLOR_BGR2GRAY) #로고파일의 색상을 그레이로 변경 ret, mask = cv2.threshold(gray, 160, 255, cv2.THRESH_BINARY) #배경은 흰색으로, 그림을 검정색으로 변경 - src1[30:rows+30, 80:cols+80] = src2 + src1[30:rows+30, 60:cols+60] = src2 #cv2.imshow('jaem', src1) width, height = src3.shape[:2] - src1[90:width+90, 70:70+height] = src3 + src1[90:width+90, 50:50+height] = src3 #cv2.imshow('moem', src1) cv2.imwrite(path+'/letter'+str(i).zfill(3)+"_"+ str(j-19).zfill(4)+ ".png", src1)