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 1c6abfa commit 0ff629f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/jamoComb4.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0ff629f

Please sign in to comment.