본문 바로가기

Language/Python

Python으로 문자 추출하기 - 이미지 전처리 Python을 사용해 이미지에서 텍스트 추출하는 방법으로 tesseract를 설치했었다 오늘은 이미지를 불러와서 텍스트 추출하는 방법과 이미지 전처리에 대해 알아보겠다 1. 이미지 불러오기 path = "C:/Users/****/" testimg = cv2.imread(path+"파일명.jpg", cv2.IMREAD_COLOR) 불러올 이미지 path와 파일명을 넣고 컬러파일을 불러온다. 2. 이미지 리사이즈 imageHeight, imageWidth = testimg.shape[:2] resizeHeight = int(0.3 * imageHeight) resizeWidth = int(0.3 * imageWidth) img = cv2.resize(testimg, (resizeWidth, resizeHei.. 더보기
Python으로 문자 추출하기 -설치 OCR AI라고 이미지에 있는 글자를 알아내는 기술이 있다! 대기업에서 만든 것들을 가져다 쓰면 됨 구글에서 만든 Tesseract, Google Cloud Vision 네이버에서 만든 Clova가 있다. 오늘은 Tesseract를 사용해서 해보도록 하겠슴니다 https://github.com/UB-Mannheim/tesseract/wiki GitHub - UB-Mannheim/tesseract: Tesseract Open Source OCR Engine (main repository) Tesseract Open Source OCR Engine (main repository) - GitHub - UB-Mannheim/tesseract: Tesseract Open Source OCR Engine (main.. 더보기
[Python] pandas 사용해서 엑셀데이터 분석 import pandas as pd #pandas 사용 score = pd.read_excel('/Users/wkrdm/Python/db_score.xlsx', #파일경로 header = 0, #컬럼명 지정 skipfooter = 3, #밑에서 3줄 생략 (필요없는 부분) usecols = 'A:H') #불러올 컬럼 구간 print(score.head(3)) #위에서 3줄 출력 print(score.tail(3)) #밑에서 3줄 출력 score.info() #정보 출력 #pandas의 dataframe 클래스 RangeIndex: 92 entries, 0 to 91#0~91까지 총 92rows Data columns (total 8 columns):#총 8개의 컬럼 # Column Non-Null Cou.. 더보기

728x90
LIST