From 1c6abfaca85a4d0b2d10db942a94d470765e7bd6 Mon Sep 17 00:00:00 2001 From: "MinJi.CH" <81309465+SUMMERLOVE7@users.noreply.github.com> Date: Sat, 10 Dec 2022 14:11:39 +0900 Subject: [PATCH] Fix coordinate for img comb --- src/jamoComb5.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jamoComb5.py b/src/jamoComb5.py index 7688bd0..12465f9 100644 --- a/src/jamoComb5.py +++ b/src/jamoComb5.py @@ -25,18 +25,18 @@ def jamoComb5(): src4 = cv2.imread('./crop/'+str(k)+'.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[20:rows+20, 80:cols+80] = src2 + src1[20:rows+20, 60:cols+60] = src2 #cv2.imshow('cho', src1) width, height = src3.shape[:2] - src1[75:width+75, 70:70+height] = src3 + src1[75:width+75, 50:50+height] = src3 #cv2.imshow('jung', src1) width, height = src4.shape[:2] - src1[110:width+110, 80:80+height] = src4 + src1[110:width+110, 60:60+height] = src4 #cv2.imshow('jong', src1) cv2.imwrite(path+'/letter'+str(i).zfill(3)+"_"+ str(j-19).zfill(4)+"_"+str(k).zfill(3) + ".png", src1)