Skip to content

Commit

Permalink
Fix coordinate for img comb
Browse files Browse the repository at this point in the history
  • Loading branch information
SUMMERLOVE7 authored Dec 10, 2022
1 parent 717ec90 commit 1c6abfa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/jamoComb5.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1c6abfa

Please sign in to comment.