KR102203937B1 - Object recognition apparatus in image drawing - Google Patents

Object recognition apparatus in image drawing Download PDF

Info

Publication number
KR102203937B1
KR102203937B1 KR1020190146375A KR20190146375A KR102203937B1 KR 102203937 B1 KR102203937 B1 KR 102203937B1 KR 1020190146375 A KR1020190146375 A KR 1020190146375A KR 20190146375 A KR20190146375 A KR 20190146375A KR 102203937 B1 KR102203937 B1 KR 102203937B1
Authority
KR
South Korea
Prior art keywords
pixel
line
unit
image
coordinate value
Prior art date
Application number
KR1020190146375A
Other languages
Korean (ko)
Inventor
문두환
유은섭
Original Assignee
경북대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 경북대학교 산학협력단 filed Critical 경북대학교 산학협력단
Priority to KR1020190146375A priority Critical patent/KR102203937B1/en
Application granted granted Critical
Publication of KR102203937B1 publication Critical patent/KR102203937B1/en

Links

Images

Classifications

    • G06K9/00476
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/42Document-oriented image-based pattern recognition based on the type of document
    • G06V30/422Technical drawings; Geographical maps
    • G06K9/32
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image

Abstract

According to one embodiment of the present invention, provided is a device for recognizing an object in an image drawing comprising: an image input module receiving image information of the image drawing; a database module storing information about symbols used in the image drawing; and a symbol recognition module calculating a predicted value in accordance with the similarity between an image received through the image input module and a symbol previously stored in the database module, and recognizing the symbol in the image drawing by matching the symbol having the highest predicted value and the image received through the image input module.

Description

이미지 도면 내 객체 인식 장치{OBJECT RECOGNITION APPARATUS IN IMAGE DRAWING}Object recognition device in image drawing {OBJECT RECOGNITION APPARATUS IN IMAGE DRAWING}

본 발명은 이미지 도면 내 객체 인식 장치에 관한 것이다.The present invention relates to an apparatus for recognizing an object in an image drawing.

공정 플랜트 (process plant) 산업에 사용되는 대표적인 도면으로 P&ID (piping and instrumentation diagram)가 있다.A typical drawing used in the process plant industry is P&ID (piping and instrumentation diagram).

P&ID는 PFD (process flow diagram, 공정흐름도)를 기준으로 작성이 되며 각 공정 (process)을 구성하는 주요 기자재 (equipment and materials)와 유체의 흐름을 상세하게 표현한다.P&ID is prepared based on PFD (process flow diagram), and it expresses in detail the main equipment and materials constituting each process and the flow of fluid.

따라서 P&ID는 플랜트의 기본 설계 (basic design)를 전달하는 기본 매체이며 상세 설계 (detail design), 구매 및 조달, 시공 (construction) 및 시운전 (commissioning)의 기본 자료로 활용된다.Therefore, P&ID is a basic medium that delivers the basic design of a plant and is used as basic data for detail design, purchase and procurement, construction, and commissioning.

디지털 P&ID는 도면을 구성하는 모든 객체들(objects)이 구조화되어 있고 컴퓨터로 처리가 가능한 형식을 가진다. 디지털 P&ID의 주요 구성 요소는 기호이며, 기호는 크게 피팅(fitting), 계장(instrumentation), 기기(equipment) 및 도면 참조(OPC, off-page connector)로 구분된다. 그리고 디지털 P&ID는 기호들을 연결하는 선 (line)들을 갖는다. 이 외에 디지털 P&ID는 외곽 경계 (outer border), 표제 (title box), 문자 (character) 및 표 (table)를 가진다.In digital P&ID, all objects constituting a drawing are structured and have a format that can be processed by a computer. The main component of a digital P&ID is a sign, and the sign is largely divided into fitting, instrumentation, equipment, and drawing reference (OPC, off-page connector). And the digital P&ID has lines connecting the symbols. In addition, digital P&IDs have an outer border, a title box, a character and a table.

디지털 P&ID는, 기호에 부여된 속성 중 하나인 태그 아이디 (tag ID)를 기준으로, 3D 설계 모델을 포함한 프로젝트 데이터베이스 (database)와의 연동이 가능하다. 이에 따라 현업에서는 디지털 P&ID를 지능형 P&ID라고 부르기도 한다.The digital P&ID can be linked with a project database including a 3D design model based on a tag ID, which is one of the attributes assigned to a symbol. Accordingly, digital P&IDs are sometimes referred to as intelligent P&IDs in the field.

플랜트의 설계, 조달, 시공을 담당하는 EPC(engineering, procurement and construction)사의 경우 디지털 P&ID를 대부분 적용하고 있다. 그러나 신규로 건설되는 플랜트에서도 FEED(front end engineering and design)단계에서 생성된 P&ID나 기자재 제작사에서 제공한 P&ID는 이미지 형식을 갖는 경우가 많다. 플랜트 운영사도 디지털 P&ID의 적용을 하고 있으나 장기간 운영 중인 노후 플랜트의 경우 대량의 P&ID가 이미지 형식으로 저장되어 있다.Most of the EPC (engineering, procurement and construction) companies in charge of plant design, procurement, and construction use digital P&IDs. However, even in newly constructed plants, P&IDs created in the FEED (front end engineering and design) stage or P&IDs provided by equipment manufacturers often have an image format. Plant operators are also applying digital P&IDs, but in the case of old plants that are operating for a long time, a large amount of P&IDs are stored in image format.

이에 따라 플랜트 산업에서 이미지 형식의 P&ID를 디지털 P&ID로 변환해야 하는 필요가 발생된다. 여기서 디지털화(digitalization)란 도면 이미지로부터 관련 응용 분야에서 의미 (meaning)를 갖는 상위 수준 (high-level) 객체를 인식하고 이로부터 필요한 정보를 추출하여 원본과 동일한 형식의 도면을 생성하는 것이다.Accordingly, there is a need to convert P&ID in image format to digital P&ID in the plant industry. Here, digitization refers to recognizing a high-level object having meaning in a related application field from a drawing image, extracting necessary information from it, and generating a drawing in the same format as the original.

그러나 현업에서는 현재는 이 과정이 대부분 수작업으로 이뤄지고 있다. 이로 인해 디지털 P&ID 로 변환하는 과정에서 많은 시간이 소모되고, 오류의 발생 가능성이 높으며, 작업자의 숙련도에 따라 품질이 달라지는 문제가 발생한다.However, in the field, this process is mostly done manually. As a result, a lot of time is consumed in the process of converting to a digital P&ID, the possibility of error is high, and the quality varies depending on the skill level of the operator.

따라서, 이미지 형식의 P&ID로부터 디지털 P&ID를 생성하기 위해 이미지 형식 P&ID에 포함된 각종 객체를 인식하여 추출하는 기술의 개발이 요구되고 있다.Accordingly, in order to generate a digital P&ID from a P&ID in an image format, there is a need to develop a technology for recognizing and extracting various objects included in an image format P&ID.

본 발명의 일 실시예는 이미지 형식의 도면 내 객체를 인식하고 추출하는 도면 객체 인식 장치를 제공하는 것을 목적으로 한다.An object of the present invention is to provide a drawing object recognition apparatus for recognizing and extracting an object in a drawing in an image format.

한편, 본 발명에서 이루고자 하는 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급하지 않은 또 다른 기술적 과제들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.Meanwhile, the technical problems to be achieved in the present invention are not limited to the technical problems mentioned above, and other technical problems that are not mentioned are clearly to those of ordinary skill in the technical field to which the present invention belongs from the following description. It will be understandable.

본 발명의 일 실시예에 따른 이미지 도면 내 객체를 인식하는 장치에 있어서, 상기 이미지 도면의 이미지 정보를 입력 받는 이미지 입력 모듈; 상기 이미지 도면에 사용된 기호에 관한 정보가 저장된 데이터베이스 모듈; 및 상기 이미지 입력 모듈을 통해 입력 받은 이미지와 상기 데이터베이스 모듈에 기 저장된 기호와의 유사도에 따라 예측 값을 산출하고, 상기 예측 값이 가장 높은 기호와 상기 이미지 입력 모듈을 통해 입력 받은 이미지를 매칭시킴으로써 상기 이미지 도면 내 기호를 인식하는 기호 인식 모듈을 포함한다.An apparatus for recognizing an object in an image drawing according to an embodiment of the present invention, comprising: an image input module receiving image information of the image drawing; A database module storing information on symbols used in the image drawing; And calculating a predicted value according to the similarity between the image input through the image input module and a symbol previously stored in the database module, and matching the symbol having the highest predicted value with the image input through the image input module. It includes a symbol recognition module that recognizes symbols in image drawings.

상기 이미지 도면 내 선을 한 픽셀 굵기로 압축한 후 상기 선의 위치 및 길이를 인식하는 선 인식 모듈을 더 포함할 수 있다.The line recognition module may further include a line recognition module for recognizing the position and length of the line after compressing the line in the image drawing to a thickness of one pixel.

상기 이미지 도면 상에서 검출된 직사각형 형상의 폐영역과 상기 폐영역의 외부에 존재하는 객체가 서로 연결되지 않은 경우 상기 폐영역을 표라고 인식하는 표 인식 모듈을 더 포함할 수 있다.A table recognition module for recognizing the closed area as a table when a rectangular closed area detected on the image drawing and an object existing outside the closed area are not connected to each other.

문자열 검출 딥러닝 모델인 CTPN(Connectionist Text Proposal Network)을 통해 문자를 인식하는 문자 인식 모듈을 더 포함할 수 있다.The character recognition module may further include a character recognition module that recognizes characters through a connectionist text proposal network (CTPN), which is a character string detection deep learning model.

상기 기호 인식 모듈은: 상기 이미지 도면 상에서 기호가 존재할 가능성이 높은 영역을 추출하는 모폴로지 연산부; 상기 모폴로지 연산부를 통해 추출된 영역 내의 각 픽셀을 중심으로 바운딩 박스를 설정하고, 상기 바운딩 박스 내의 이미지를 추출하는 이미지 추출부; 상기 이미지 추출부를 통해 추출된 이미지와 기 저장된 기호와의 유사도에 따라 예측 값을 산출하는 예측 값 산출부; 상기 예측 값 산출부를 통해 산출된 예측 값 중 가장 높은 값에 대응되는 기호와 상기 이미지 추출부를 통해 추출된 이미지를 매칭시키는 매칭부; 상기 매칭부에서 동일한 기호로 매칭된 바운딩 박스들을 그룹화 시키는 그룹핑부; 및 상기 그룹핑부를 통해 그룹화 된 바운딩 박스들 중 상기 예측 값이 가장 높은 바운딩 박스의 위치를 해당 기호의 실제 위치로 선정하는 위치 선정부를 포함할 수 있다.The symbol recognition module includes: a morphology calculating unit for extracting a region in which a symbol is likely to exist on the image drawing; An image extracting unit configured to set a bounding box centering on each pixel in the region extracted through the morphology operation unit and extract an image in the bounding box; A prediction value calculation unit that calculates a prediction value according to a similarity between the image extracted through the image extraction unit and a previously stored symbol; A matching unit for matching a symbol corresponding to a highest value among the predicted values calculated through the predicted value calculating unit and an image extracted through the image extracting unit; A grouping unit for grouping bounding boxes matched with the same symbol in the matching unit; And a position selector for selecting a position of a bounding box having the highest predicted value among bounding boxes grouped through the grouping unit as an actual position of a corresponding symbol.

상기 모폴로지 연산부는: 상기 기호 내부의 빈 공간을 채우는 닫기 모폴로지 연산 유닛; 및 상기 이미지 도면 상에서 배관에 해당하는 영역을 삭제하는 열기 모폴로지 연산 유닛을 포함할 수 있다.The morphology operation unit: a closing morphology operation unit filling an empty space inside the symbol; And an open morphology calculating unit that deletes an area corresponding to a pipe on the image drawing.

상기 이미지 추출부에서 설정된 상기 바운딩 박스는 상기 기 저장된 기호의 크기에 맞춰 조절이 가능할 수 있다.The bounding box set by the image extraction unit may be adjustable according to the size of the previously stored symbol.

상기 그룹핑부는: 상기 매칭부에서 동일한 기호로 매칭된 바운딩 박스인 공통 바운딩 박스를 추출하는 공통 바운딩 박스 추출 유닛; 상기 공통 바운딩 박스 중 최외곽에 위치한 바운딩 박스를 제 1 바운딩 박스로 설정하는 제 1 바운딩 박스 설정 유닛; 상기 공통 바운딩 박스 중 상기 제 1 바운딩 박스와 겹치는 면적의 비율이 기 설정된 값 이상인 바운딩 박스를 그룹화하는 그룹화 유닛; 및상기 그룹화된 바운딩 박스 중 상기 제 1 바운딩 박스와의 거리가 가장 먼 바운딩 박스를 제 2 바운딩 박스로 설정한 후, 상기 제 2 바운딩 박스를 상기 제 1 바운딩 박스로 재설정하는 그룹 확장 유닛을 포함할 수 있다.The grouping unit: a common bounding box extracting unit for extracting a common bounding box, which is a bounding box matched with the same symbol in the matching unit; A first bounding box setting unit configured to set a bounding box located at the outermost of the common bounding boxes as a first bounding box; A grouping unit for grouping bounding boxes in which a ratio of an area overlapping the first bounding box among the common bounding boxes is equal to or greater than a preset value; And a group expansion unit configured to reset the second bounding box to the first bounding box after setting a bounding box having the farthest distance from the first bounding box among the grouped bounding boxes as the second bounding box. I can.

상기 선 인식 모듈은: 상기 이미지 도면 상에서 사용 빈도가 가장 높은 선의 굵기인 최빈 선굵기를 식별하는 최빈 선굵기 식별부; 상기 이미지 도면 상에 존재하는 선의 굵기를 한 개의 픽셀로 압축하는 선 압축부; 서로 이어진 검은색 픽셀을 식별하여 각각의 선의 위치를 측정하는 선 위치 검출부; 및 상기 압축 과정에서 분리된 선을 병합시키는 선 병합부를 포함할 수 있다.The line recognition module includes: a mode line thickness identification unit for identifying a mode line thickness, which is a line thickness of the most frequently used line on the image drawing; A line compression unit compressing the thickness of a line existing on the image drawing into one pixel; A line position detection unit that identifies the black pixels connected to each other and measures the position of each line; And a line merging unit for merging the lines separated in the compression process.

상기 최빈 선굵기 식별부는: 상기 이미지 도면의 가장 왼쪽에서부터 오른쪽으로 한 픽셀씩 이동하며 연속한 검은색 픽셀 수를 측정하는 가로 선굵기 측정 유닛; 상기 이미지 도면의 가장 위쪽에서부터 아래쪽으로 한 픽셀씩 이동하며 연속한 검은색 픽셀 수를 측정하는 세로 선굵기 측정 유닛; 및 상기 가로 선굵기 측정 유닛과 상기 세로 선굵기 측정 유닛의 측정 결과를 통합한 후, 측정된 빈도수가 가장 높은 연속한 검은색 픽셀 수를 판단하는 최빈 선굵기 판단 유닛을 포함할 수 있다.The modest line thickness identification unit: a horizontal line thickness measurement unit that moves one pixel from the leftmost to the right side of the image drawing and measures the number of consecutive black pixels; A vertical line thickness measuring unit moving one pixel from the top to the bottom of the image drawing and measuring the number of consecutive black pixels; And a mode line thickness determination unit that integrates the measurement results of the horizontal line thickness measurement unit and the vertical line thickness measurement unit and determines the number of consecutive black pixels with the highest measured frequency.

상기 선 압축부는: 제 1 픽셀의 좌표 값이 (x, y)일 때, (x+1, y)의 좌표 값을 갖는 픽셀이 검은색인 경우 상기 제 1 픽셀을 흰색으로 변환하여 압축된 수직선을 추출하는 압축 수직선 추출 유닛; 및 제 2 픽셀의 좌표가 (x, y)일 때, (x, y+1)의 좌표 값을 갖는 픽셀이 검은색인 경우 상기 제 2 픽셀을 흰색으로 변환하여 압축된 수평선을 추출하는 압축 수평선 추출 유닛을 포함하고, 상기 (x+1, y)은 상기 (x, y)에서 한 픽셀 오른쪽에 위치한 픽셀의 좌표 값이고, 상기 (x, y+1)은 상기 (x, y)에서 한 픽셀 아래쪽에 위치한 픽셀의 좌표 값일 수 있다.The line compressing unit: When the coordinate value of the first pixel is (x, y), and the pixel having the coordinate value of (x+1, y) is black, converts the first pixel to white to generate a compressed vertical line. A compression vertical line extraction unit to extract; And when the coordinates of the second pixel are (x, y), and when the pixel having the coordinate value of (x, y+1) is black, the second pixel is converted to white to extract a compressed horizontal line. Including a unit, wherein (x+1, y) is a coordinate value of a pixel located to the right of one pixel in (x, y), and (x, y+1) is a pixel in (x, y) It may be a coordinate value of a pixel located below.

상기 선 위치 검출부는: 수직선 위치 검출 유닛; 및수평선 위치 검출 유닛을 포함할 수 있다.The line position detection unit: a vertical line position detection unit; And a horizontal position detection unit.

상기 수직선 위치 검출 유닛은: 상기 압축 수직선 추출 유닛을 통해 추출된 각각의 압축된 수직선들의 최상단 픽셀의 좌표 값; 및 수직선 탐지 커널의 최종 위치인 상기 각각의 압축된 수직선들의 최하단 픽셀의 좌표 값을 이용하여 상기 각각의 압축된 수직선들의 위치 및 길이를 검출하고 상기 수직선 탐지 커널은: 제 3 픽셀에 위치하고, 상기 제 3 픽셀의 최초 위치는 상기 각각의 압축된 수직선들의 최상단 픽셀이고, 상기 제 3 픽셀의 좌표 값이 (x, y)일 때, (x, y+1), (x-1, y+1) 또는 (x+1, y+1)의 좌표 값을 갖는 픽셀 중 검은색 픽셀의 좌표 값을 상기 제 3 픽셀의 좌표 값으로 재설정하는 것을 반복하고, 상기 (x, y+1)은 (x, y)에서 한 픽셀 아래쪽에 위치한 픽셀의 좌표 값이고, 상기 (x-1, y+1)은 (x, y)에서 한 픽셀 아래쪽임과 동시에 한 픽셀 왼쪽에 위치한 픽셀의 좌표 값이고, 상기 (x+1, y+1)은 (x, y)에서 한 픽셀 아래쪽임과 동시에 한 픽셀 오른쪽에 위치한 픽셀의 좌표 값일 수 있다.The vertical line position detection unit includes: a coordinate value of an uppermost pixel of each of the compressed vertical lines extracted through the compressed vertical line extraction unit; And the position and length of each of the compressed vertical lines using the coordinate values of the lowest pixel of each of the compressed vertical lines, which are the final positions of the vertical line detection kernel, and the vertical line detection kernel: is located at a third pixel, and the second The initial position of 3 pixels is the topmost pixel of each of the compressed vertical lines, and when the coordinate value of the third pixel is (x, y), (x, y+1), (x-1, y+1) Alternatively, resetting the coordinate value of the black pixel among the pixels having the coordinate value of (x+1, y+1) to the coordinate value of the third pixel is repeated, and the (x, y+1) is (x, y) is a coordinate value of a pixel located one pixel below, and (x-1, y+1) is a coordinate value of a pixel located one pixel below (x, y) and one pixel to the left, and the ( x+1, y+1) may be a coordinate value of a pixel located one pixel below (x, y) and one pixel right.

상기 수평선 위치 검출 유닛은: 상기 압축 수평선 추출 유닛을 통해 추출된 각각의 압축된 수평선들의 가장 왼쪽에 위치한 픽셀의 좌표 값; 및수평선 탐지 커널의 최종 위치인 상기 각각의 압축된 수평선들의 가장 오른쪽에 위치한 픽셀의 좌표 값을 이용하여 상기 각각의 압축된 수평선들의 위치 및 길이를 검출하고, 상기 수평선 탐지 커널은: 제 4 픽셀에 위치하고, 상기 제 4 픽셀의 최초 위치는 상기 각각의 압축된 수평선들의 가장 왼쪽에 위치한 픽셀이고, 상기 제 4 픽셀의 좌표 값이 (x, y)일 때, (x+1, y), (x+1, y-1) 또는 (x+1, y+1)의 좌표 값을 갖는 픽셀 중 검은색 픽셀의 좌표 값을 상기 제 4 픽셀의 좌표 값으로 재설정하는 것을 반복하고, 상기 (x+1, y)는 (x, y)에서 한 픽셀 오른쪽에 위치한 픽셀의 좌표 값이고, 상기 (x+1, y-1)은 (x, y)에서 한 픽셀 오른쪽임과 동시에 한 픽셀 위에 위치한 픽셀의 좌표 값이고, 상기 (x+1, y+1)은 (x, y)에서 한 픽셀 오른쪽임과 동시에 한 픽셀 아래쪽에 위치한 픽셀의 좌표 값일 수 있다.The horizontal line position detection unit may include: a coordinate value of a pixel located at the leftmost of each of the compressed horizontal lines extracted through the compressed horizontal line extraction unit; And a position and length of each of the compressed horizontal lines using a coordinate value of a pixel located at the rightmost side of each of the compressed horizontal lines, which is a final location of the horizontal line detection kernel, wherein the horizontal line detection kernel: Position, and the initial position of the fourth pixel is a pixel located at the leftmost of the compressed horizontal lines, and when the coordinate value of the fourth pixel is (x, y), (x+1, y), (x Resetting the coordinate value of the black pixel among the pixels having coordinate values of +1, y-1) or (x+1, y+1) to the coordinate value of the fourth pixel is repeated, and the (x+1) , y) is the coordinate value of the pixel located one pixel to the right of (x, y), and (x+1, y-1) is the coordinate value of the pixel located one pixel to the right of (x, y) It is a coordinate value, and (x+1, y+1) may be a coordinate value of a pixel located one pixel below and one pixel right from (x, y).

선 병합부는: 제 1 선의 끝점과 상기 제 1 선과 인접한 제 2 선의 시작점 간의 간격이 기 설정된 선 간격 이하인 경우 상기 제 1 선의 끝점과 상기 제 2 선의 시작점을 연결할 수 있다.The line merger may connect the end point of the first line and the start point of the second line when the distance between the end point of the first line and the start point of the second line adjacent to the first line is less than or equal to a preset line distance.

상기 기 설정된 선 간격은 상기 최빈 선굵기 식별부를 통해 식별된 최빈 선굵기에 따라 조절될 수 있다.The preset line spacing may be adjusted according to the modest line thickness identified through the modest line thickness identification unit.

상기 표 인식 모듈은: 제 1 수직선, 제 1 수평선, 제 2 수직선 및 제 2 수평선을 순차적으로 연결했을 때 상기 제 1 수직선의 시작점과 상기 제 2 수평선의 끝점이 일치하는 직사각형 형상의 폐영역을 식별하는 폐영역 식별부; 각 변이 상기 폐영역의 각 변으로부터 기 설정된 간격만큼 떨어진 직사각형 형상의 표 탐지 커널을 생성하는 표 탐지 커널 생성부; 및 상기 표 탐지 커널을 지나 상기 폐영역과 상기 폐영역 외부의 객체를 연결하는 선이 존재하지 않는 경우 상기 폐영역을 표라고 인식하는 표 인식부를 포함할 수 있다.The table recognition module: When the first vertical line, the first horizontal line, the second vertical line, and the second horizontal line are sequentially connected, the start point of the first vertical line and the end point of the second horizontal line coincide with each other in a rectangular closed area. A closed area identification unit; A table detection kernel generator for generating a rectangular table detection kernel in which each side is separated from each side of the closed area by a predetermined distance; And a table recognition unit for recognizing the closed area as a table when there is no line connecting the closed area and an object outside the closed area passing through the table detection kernel.

본 발명의 일 실시예에 따른 도면 객체 인식 장치는 이미지 형식의 도면 상에서 객체를 인식하고 추출할 수 있다.The drawing object recognition apparatus according to an embodiment of the present invention may recognize and extract an object from a drawing in an image format.

한편, 본 발명에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.On the other hand, the effects obtainable in the present invention are not limited to the above-mentioned effects, and other effects not mentioned will be clearly understood by those of ordinary skill in the art from the following description. I will be able to.

도 1은 본 발명의 일 실시예에 따른 도면 객체 인식 장치의 개략적인 구성을 나타낸 블록도이다.
도 2는 모폴로지 연산부를 통해 이미지 도면을 처리한 결과를 나타낸 도면이다.
도 3은 본 발명의 일 실시예에 따른 이미지 분류 딥러닝 모델의 구조를 개략적으로 나타낸 도면이다.
도 4는 도 3의 이미지 분류 딥러닝 모델을 통해 이미지 도면에서 사용되는 각 기호의 예측 결과를 예측 값을 통해 나타낸 도면이다.
도 5는 그룹핑부를 통해 동일한 기호로 매칭된 바운딩 박스들을 그룹화 한 모습을 나타낸 도면이다.
도 6은 위치 선정부를 통해 도 5의 그룹화 된 바운딩 박스들 중 실제 객체가 위치할 확률이 가장 높은 영역을 선택하는 모습을 나타낸 도면이다.
도 7은 최빈 선굵기 식별부를 통해 이미지 도면 상에서 가장 빈번하게 사용되는 선의 굵기를 식별하는 모습을 나타낸 도면이다.
도 8은 선 압축부를 통해 이미지 도면 내 선의 굵기를 한 개의 픽셀로 압축한 모습을 나타낸 도면이다.
도 9는 표 인식 모듈을 통해 이미지 도면 내 표를 인식하는 모습을 나타내는 도면이다.
1 is a block diagram showing a schematic configuration of an apparatus for recognizing a drawing object according to an embodiment of the present invention.
2 is a diagram illustrating a result of processing an image drawing through a morphology operation unit.
3 is a diagram schematically showing the structure of an image classification deep learning model according to an embodiment of the present invention.
FIG. 4 is a diagram showing prediction results of each symbol used in an image drawing through predicted values through the image classification deep learning model of FIG. 3.
5 is a diagram illustrating a grouping of bounding boxes matched with the same symbol through a grouping unit.
FIG. 6 is a diagram illustrating an example of selecting an area with the highest probability of an actual object being located among the grouped bounding boxes of FIG. 5 through a location selector.
7 is a diagram showing a state of identifying the most frequently used line thickness on an image drawing through a modest line thickness identification unit.
8 is a view showing a state in which the thickness of a line in an image drawing is compressed into one pixel through a line compression unit.
9 is a diagram illustrating a state in which a table in an image drawing is recognized through a table recognition module.

본 발명의 다른 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술 되는 실시 예를 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시 예에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 본 실시 예는 본 발명의 개시가 완전하도록 하고, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다.Other advantages and features of the present invention, and a method of achieving them will become apparent with reference to embodiments to be described later in detail together with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below, but may be implemented in various different forms, and only this embodiment is intended to complete the disclosure of the present invention, and to provide ordinary knowledge in the technical field to which the present invention pertains. It is provided to completely inform the scope of the invention to those who have it, and the invention is only defined by the scope of the claims.

만일 정의되지 않더라도, 여기서 사용되는 모든 용어들(기술 혹은 과학 용어들을 포함)은 이 발명이 속한 종래 기술에서 보편적 기술에 의해 일반적으로 수용되는 것과 동일한 의미를 가진다. 일반적인 사전들에 의해 정의된 용어들은 관련된 기술 그리고/혹은 본 출원의 본문에 의미하는 것과 동일한 의미를 갖는 것으로 해석될 수 있고, 그리고 여기서 명확하게 정의된 표현이 아니더라도 개념화되거나 혹은 과도하게 형식적으로 해석되지 않을 것이다.Even if not defined, all terms (including technical or scientific terms) used herein have the same meaning as commonly accepted by universal technology in the prior art to which this invention belongs. Terms defined by general dictionaries may be construed as having the same meaning as the related description and/or the text of this application, and not conceptualized or excessively formalized, even if not clearly defined herein. Won't.

본 명세서에서 사용된 용어는 실시 예들을 설명하기 위한 것이며 본 발명을 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 복수형도 포함한다. 명세서에서 사용되는 '포함한다' 및/또는 이 동사의 다양한 활용형들 예를 들어, '포함', '포함하는', '포함하고', '포함하며' 등은 언급된 조성, 성분, 구성요소, 단계, 동작 및/또는 소자는 하나 이상의 다른 조성, 성분, 구성요소, 단계, 동작 및/또는 소자의 존재 또는 추가를 배제하지 않는다. 본 명세서에서 '및/또는' 이라는 용어는 나열된 구성들 각각 또는 이들의 다양한 조합을 가리킨다.The terms used in the present specification are for describing exemplary embodiments and are not intended to limit the present invention. In this specification, the singular form also includes the plural form unless specifically stated in the phrase. As used in the specification,'includes' and/or various conjugated forms of this verb, for example,'includes','includes','includes','includes', etc. refer to the mentioned composition, ingredient, component, Steps, operations and/or elements do not preclude the presence or addition of one or more other compositions, components, components, steps, operations and/or elements. In the present specification, the term'and/or' refers to each of the listed components or various combinations thereof.

한편, 본 명세서 전체에서 사용되는 '~부', '~기', '~블록', '~모듈' 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미할 수 있다. 예를 들어 소프트웨어, FPGA 또는 ASIC과 같은 하드웨어 구성요소를 의미할 수 있다. 그렇지만 '~부', '~기', '~블록', '~모듈' 등이 소프트웨어 또는 하드웨어에 한정되는 의미는 아니다. '~부', '~기', '~블록', '~모듈'은 어드레싱할 수 있는 저장 매체에 있도록 구성될 수도 있고 하나 또는 그 이상의 프로세서들을 재생시키도록 구성될 수도 있다.Meanwhile, terms such as'~ unit','~ group','~ block', and'~ module' used throughout this specification may refer to a unit that processes at least one function or operation. For example, it can mean software, hardware components such as FPGAs or ASICs. However,'~bu','~gi','~block', and'~module' are not limited to software or hardware. The'~ unit','~ group','~ block', and'~ module' may be configured to be in an addressable storage medium, or may be configured to reproduce one or more processors.

따라서, 일 예로서 '~부', '~기', '~블록', '~모듈'은 소프트웨어 구성요소들, 객체지향 소프트웨어 구성요소들, 클래스 구성요소들 및 태스크 구성요소들과 같은 구성요소들과, 프로세스들, 함수들, 속성들, 프로시저들, 서브루틴들, 프로그램 코드의 세그먼트들, 드라이버들, 펌웨어, 마이크로 코드, 회로, 데이터, 데이터베이스, 데이터 구조들, 테이블들, 어레이들 및 변수들을 포함한다. 구성요소들과 '~부', '~기', '~블록', '~모듈'들 안에서 제공되는 기능은 더 작은 수의 구성요소들 및 '~부', '~기', '~블록', '~모듈'들로 결합되거나 추가적인 구성요소들과 '~부', '~기', '~블록', '~모듈'들로 더 분리될 수 있다.Therefore, as an example,'~ unit','~ group','~ block', and'~ module' are components such as software components, object-oriented software components, class components, and task components. S, processes, functions, properties, procedures, subroutines, segments of program code, drivers, firmware, microcode, circuits, data, databases, data structures, tables, arrays and Include variables. The functions provided in the components and'~Boo','~Gi','~Block', and'~Module' include a smaller number of elements and'~Boo','~Gi','~Block. It may be combined into','~modules' or further separated into additional components and'~unit','~group','~block', and'~module'.

이하, 본 명세서의 첨부된 도면을 참조하여 본 발명의 실시예를 상세하게 설명한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings of the present specification.

본 발명의 일 실시예에 따른 도면 객체 인식 장치(10)는 이미지 도면 상에서 기호, 문자, 선 및 표를 포함한 객체를 인식하고 이를 추출할 수 있다.The drawing object recognition apparatus 10 according to an embodiment of the present invention may recognize and extract an object including symbols, texts, lines, and tables on an image drawing.

이하에서는 도면 객체 인식 장치(10)의 각 구성과 함께 해당 구성의 기능에 대해 상세히 설명한다.Hereinafter, each component of the drawing object recognition apparatus 10 and functions of the component will be described in detail.

도 1은 본 발명의 일 실시예에 따른 도면 객체 인식 장치(10)의 개략적인 구성을 나타낸 블록도이다.1 is a block diagram showing a schematic configuration of a drawing object recognition apparatus 10 according to an embodiment of the present invention.

도 1을 참조하면, 도면 객체 인식 장치(10)는 기호 인식 모듈(100), 문자 인식 모듈(200), 선 인식 모듈(300), 표 인식 모듈(400), 이미지 입력 모듈(500) 및 데이터베이스 모듈(600)을 포함한다.Referring to FIG. 1, the drawing object recognition apparatus 10 includes a symbol recognition module 100, a character recognition module 200, a line recognition module 300, a table recognition module 400, an image input module 500, and a database. Includes module 600.

이미지 입력 모듈(500)은 이미지 도면의 이미지 정보를 입력받는다.The image input module 500 receives image information of an image drawing.

예를 들어, 이미지 입력 모듈(500)은 스캐너를 포함한 이미지 수신 장치로 제공될 수 있다.For example, the image input module 500 may be provided as an image receiving device including a scanner.

데이터베이스 모듈(600)은 이미지 도면에 사용된 기호에 관한 정보가 저장된다.The database module 600 stores information on symbols used in image drawings.

데이터베이스 모듈(600)에 저장되는 기호는 사용자의 필요에 따라 추가, 삭제 및 변경을 통해 업데이트가 가능하다.Symbols stored in the database module 600 can be updated through addition, deletion, and change according to the needs of the user.

기호 인식 모듈(100)은 이미지 입력 모듈(500)을 통해 입력 받은 이미지와 데이터베이스 모듈(600)에 기 저장된 기호와의 유사도에 따라 예측 값을 산출한다. 이후 예측 값이 가장 높은 기호와 이미지 입력부(500)를 통해 입력 받은 이미지를 매칭시킴으로써 이미지 도면 내 기호를 인식한다.The symbol recognition module 100 calculates a predicted value according to the similarity between the image input through the image input module 500 and the symbol previously stored in the database module 600. Thereafter, the symbol in the image drawing is recognized by matching the symbol having the highest predicted value with the image input through the image input unit 500.

기호 인식 모듈(100)은 모폴로지 연산부(110), 이미지 추출부(120), 예측 값 산출부(130), 매칭부(140), 그룹핑부(150) 및 위치 선정부(160)를 포함한다.The sign recognition module 100 includes a morphology operation unit 110, an image extraction unit 120, a prediction value calculation unit 130, a matching unit 140, a grouping unit 150, and a location selection unit 160.

도 2는 모폴로지 연산부(110)를 통해 이미지 도면을 처리한 결과를 나타낸 도면이다.FIG. 2 is a diagram illustrating a result of processing an image drawing through the morphology operation unit 110.

도 2를 참조하면, 모폴로지 연산부(110)는 닫기 모폴로지 연산 유닛(111) 및 열기 모폴로지 연산 유닛(112)를 포함한다.Referring to FIG. 2, the morphology calculation unit 110 includes a close morphology calculation unit 111 and an open morphology calculation unit 112.

닫기 모폴로지 연산 유닛(111)은 이미지 상에 존재하는 작은 구멍을 채울 수 있다. 즉, 이미지 도면 상에서 닫기 모폴로지 연산(close operation)을 수행함으로써 기호 내부의 빈 공간을 채울 수 있다.The close morphology operation unit 111 may fill a small hole existing on the image. That is, by performing a close operation on the image drawing, the empty space inside the symbol can be filled.

열기 모폴로지 연산 유닛(112)은 이미지 상에 존재하는 얇거나 좁은 연결 부분을 제거할 수 있다. 즉, 닫기 모폴로지 연산 유닛(111)에 의해 선처리된 이미지 도면 상에서 열기 모폴로지 연산(open operation)을 추가적으로 수행함으로써 배관에 해당하는 영역을 삭제할 수 있다.The open morphology operation unit 112 may remove a thin or narrow connection part existing on the image. That is, the area corresponding to the pipe may be deleted by additionally performing an open operation on the image drawing pre-processed by the closing morphology operation unit 111.

닫기 모폴로지 연산과 열기 모폴로지 연산을 수행하게 되면 도 2의 가장 오른쪽에 해당하는 영역이 추출되며, 이 영역은 이미지 도면 상에서 기호가 존재할 가능성이 높은 영역에 해당한다.When the close morphology operation and the open morphology operation are performed, the rightmost area of FIG. 2 is extracted, and this area corresponds to an area in which a symbol is likely to exist in the image drawing.

이미지 추출부(120)는 모폴로지 연산부(110)를 통해 추출된 영역 내의 각 픽셀을 중심으로 바운딩 박스를 설정하고, 바운딩 박스 내의 이미지를 추출한다.The image extracting unit 120 sets a bounding box centering on each pixel in the region extracted through the morphology operation unit 110 and extracts an image in the bounding box.

이 과정에서 슬라이딩 윈도우 방식이 적용될 수 있으며, 기호가 존재할 가능성이 높은 영역 내부의 각 픽셀을 중심으로 기 저장된 각각의 기호에 대응되는 크기의 바운딩 박스를 설정한 후 해당 바운딩 박스 내의 이미지를 추출한다.In this process, a sliding window method can be applied, and after setting a bounding box having a size corresponding to each of the previously stored symbols centering on each pixel inside the area where the symbol is likely to exist, the image in the bounding box is extracted.

이미지 도면에는 복수 개의 기호가 사용되는데 바운딩 박스의 크기는 이러한 복수 개의 기호에 맞춰 조절이 가능하다.A plurality of symbols are used in the image drawing, and the size of the bounding box can be adjusted according to the plurality of symbols.

예측 값 산출부(130)는 이미지 추출부(120)를 통해 추출된 이미지와 기 저장된 기호와의 유사도에 따라 예측 값을 산출한다.The predicted value calculating unit 130 calculates a predicted value according to the similarity between the image extracted through the image extracting unit 120 and a previously stored symbol.

예측 값 산출은 이미지 분류 딥러닝 모델을 통해 이루어진다.The prediction value is calculated through an image classification deep learning model.

본 발명의 이미지 분류 딥러닝 모델은 AlexNet을 기초로 하여 정의될 수 있다.The image classification deep learning model of the present invention may be defined based on AlexNet.

도 3은 본 발명의 이미지 분류 딥러닝 모델의 구조를 개략적으로 나타낸 도면이다.3 is a diagram schematically showing the structure of an image classification deep learning model of the present invention.

도 3을 참조하면, 합성곱 계층은 입력된 각 이미지에 대하여 일정 크기의 합성곱 필터를 이용하여 이미지의 픽셀 전체를 순회하며 각 지점에서의 출력 값을 계산하여 다음 뉴런으로 전달한다.Referring to FIG. 3, the convolutional layer traverses all pixels of an image using a convolution filter of a predetermined size for each input image, calculates an output value at each point, and transfers it to the next neuron.

합성곱 계층의 매개변수로는 필터의 크기, 필터의 수, 스트라이드(stride), 패딩(padding) 및 활성화 함수가 있다.The parameters of the convolutional layer include filter size, number of filters, stride, padding, and activation function.

필터의 크기는 입력 이미지의 픽셀을 순회하는 필터의 크기이고, 필터의 수는 이미지 1장에 사용되는 필터의 수이고, 스트라이드(stride)는 필터가 이미지의 픽셀을 이동하는 간격이다.The size of the filter is the size of the filter that traverses the pixels of the input image, the number of filters is the number of filters used for one image, and the stride is the interval at which the filter moves the pixels of the image.

패딩(padding)은 필터가 이미지를 스캔하기 전에 이미지를 사방으로 확장하는 크기이다. 이미지 인식에서 일반적으로 패딩ㄴ 값은 same으로 설정된다. 패딩 값 same은 합성곱 계층을 통과한 데이터의 크기가 통과하기 전의 크기와 같도록 입력 데이터의 크기를 확장한다.Padding is the amount by which the filter expands the image in all directions before scanning it. In image recognition, the padding value is generally set to the same. The padding value same expands the size of the input data so that the size of the data passing through the convolutional layer is the same as the size before passing through.

활성화 함수는 입력된 뉴런의 값이 기준 값을 넘을 경우 다음 뉴런으로 전달하는 함수이다. 완전 연결 계층은 인접한 계층의 모든 뉴런과 결합되어 있는 계층이다. 완전연결 계층의 매개변수로는 출력 데이터의 수와 활성화 함수가 있다.The activation function is a function that transfers the input neuron value to the next neuron when it exceeds the reference value. The fully connected layer is a layer that is associated with all neurons in an adjacent layer. The parameters of the fully connected layer include the number of output data and an activation function.

하지만, 본 발명의 도면 객체 인식 장치에서 사용되는 상기 개시된 딥러닝 모델에 한정되지 않으며, 공지된 다른 딥러닝 모델 역시 제한 없이 적용 가능하다.However, it is not limited to the above-described deep learning model used in the drawing object recognition apparatus of the present invention, and other known deep learning models can also be applied without limitation.

도 4는 도 3의 이미지 분류 딥러닝 모델을 통해 이미지 도면에서 사용되는 각 기호의 예측 결과를 예측 값을 통해 나타낸 도면이다.FIG. 4 is a diagram showing prediction results of each symbol used in an image drawing through predicted values through the image classification deep learning model of FIG. 3.

도 4를 참조하면, 예측 값을 살펴봤을 때 펌프(pump) 기호는 점수가 31.13점으로 가장 높은 반면, DR O west 기호는 16.15점으로 가장 낮다. 점수에 따라 기호 예측 결과를 필터링할 경우 기호의 종류에 따라 예측 값의 중요도가 달라지지 않도록 예측 값을 정규화 할 필요가 있다.Referring to FIG. 4, when looking at the predicted value, the pump symbol has the highest score at 31.13 points, while the DR O west symbol has the lowest score at 16.15 points. When filtering preference prediction results according to scores, it is necessary to normalize the prediction values so that the importance of the prediction values does not change according to the type of preference.

따라서 아래 식에 따라 예측 값의 정규화를 수행한다.Therefore, normalization of predicted values is performed according to the following equation.

(Normalized Prediction Score) = (Prediction Score) / (Maximum Prediction Score in a specific class)(Normalized Prediction Score) = (Prediction Score) / (Maximum Prediction Score in a specific class)

예를 들어, 특정 이미지가 펌프에 해당이 될 예측 값이 23일 경우 펌프의 최대 예측 값이 31.13이기 때문에 정규화 된 값은 0.74가 된다. 또한, 특정 이미지가 instrument north에 해당이 될 예측 값이 14일 경우 instrument north의 최대 예측 값이 17.05이기 때문에 정규화 된 값은 0.82가 된다.For example, if the predicted value corresponding to the pump for a specific image is 23, the maximum predicted value of the pump is 31.13, so the normalized value is 0.74. In addition, if the predicted value of a specific image corresponding to instrument north is 14, the maximum predicted value of instrument north is 17.05, so the normalized value is 0.82.

매칭부(140)는 예측 값 산출부(130)를 통해 산출된 예측 값 중 가장 높은 곳에 대응되는 기호와 이미지 추출부(120)를 통해 추출된 이미지를 매칭시킨다.The matching unit 140 matches a symbol corresponding to the highest position among the predicted values calculated through the predicted value calculating unit 130 and the image extracted through the image extracting unit 120.

예를 들어, 특정 바운딩 박스 내의 이미지에 대한 예측 값들 중 펌프(pump)에 대한 예측 값이 가장 높을 경우 해당 바운딩 박스 내의 이미지는 펌프에 대한 이미지로 매칭되며 이를 통해 이미지 도면 상에서 펌프 이미지가 사용된 영역을 찾을 수 있다.For example, if the predicted value for the pump is the highest among the predicted values for the image in a specific bounding box, the image in the bounding box is matched to the image for the pump, through which the pump image is used in the image drawing. Can be found.

도 5는 그룹핑부(150)를 통해 동일한 기호로 매칭된 바운딩 박스들을 그룹화 한 모습을 나타낸 도면이다.5 is a view showing a state in which bounding boxes matched with the same symbol are grouped through the grouping unit 150.

도 5를 참조하면, 그룹핑부(150)는 매칭부(140)에서 동일한 기호로 매칭된 바운딩 박스들을 그룹화한다.Referring to FIG. 5, the grouping unit 150 groups bounding boxes matched with the same symbol in the matching unit 140.

그룹핑부(150)는 공통 바운딩 박스 추출 유닛(151), 제 1 바운딩 박스 설정 유닛(162), 그룹화 유닛(163) 및 그룹 확장 유닛(164)를 포함한다.The grouping unit 150 includes a common bounding box extraction unit 151, a first bounding box setting unit 162, a grouping unit 163, and a group expansion unit 164.

공통 바운딩 박스 추출 유닛(151)은 매칭부(140)에서 동일한 기호로 매칭된 바운딩 박스인 공통 바운딩 박스를 추출한다.The common bounding box extraction unit 151 extracts a common bounding box, which is a bounding box matched with the same symbol in the matching unit 140.

예를 들어, 공통 바운딩 박스 추출 유닛(151)은 매칭부(140)에서 펌프와 매칭된 바운딩 박스들을 모두 추출할 수 있다.For example, the common bounding box extraction unit 151 may extract all of the bounding boxes matched with the pump in the matching unit 140.

제 1 바운딩 박스 설정 유닛(162)은 공통 바운딩 박스 추출 유닛(151)을 통해 추출된 공통 바운딩 박스 중 최외곽에 위치한 바운딩 박스를 제 1 바운딩 박스로 설정한다.The first bounding box setting unit 162 sets the outermost bounding box of the common bounding boxes extracted through the common bounding box extraction unit 151 as the first bounding box.

예를 들면, 공통 바운딩 박스 중 가장 왼쪽에 위치한 바운딩 박스를 제 1 바운딩 박스로 설정할 수 있다.For example, among the common bounding boxes, the leftmost bounding box may be set as the first bounding box.

그룹화 유닛(163)은 공통 바운딩 박스 중 제 1 바운딩 박스와 겹치는 면적의 비율이 기 설정된 값 이상인 바운딩 박스를 하나로 묶어 그룹화한다.The grouping unit 163 bundles and groups the bounding boxes in which the ratio of the area overlapping the first bounding box among the common bounding boxes is equal to or greater than a preset value.

이때 두 박스가 겹치는 면적의 비율을 IOU(Intersection Of Union)라고 하며, IOU는 두 박스의 교집합 영역의 넓이를 두 박스의 합집합 영역의 넓이로 나눈 값을 말한다.At this time, the ratio of the area where the two boxes overlap is called IOU (Intersection Of Union), and IOU is the value obtained by dividing the area of the intersection area of two boxes by the area of the union area of the two boxes.

예를 들면, 그룹화 유닛(163)은 제 1 바운딩 박스와의 IOU가 0.3 이상인 바운딩 박스들만을 묶어 그룹화 할 수 있다.For example, the grouping unit 163 may group and group only bounding boxes having an IOU of 0.3 or more with the first bounding box.

그룹 확장 유닛(164)은 그룹화 유닛(163)을 통해 그룹화된 바운딩 박스 중 제 1 바운딩 박스와의 거리가 가장 먼 바운딩 박스를 제 2 바운딩 박스로 설정한다. 이후, 제 2 바운딩 박스를 제 1 바운딩 박스로 재설정한다.The group expansion unit 164 sets a bounding box having the farthest distance from the first bounding box among the bounding boxes grouped through the grouping unit 163 as the second bounding box. Thereafter, the second bounding box is reset to the first bounding box.

이를 통해, 제 2 바운딩 박스와의 IOU가 기 설정된 값 이상인 바운딩 박스들을 추가로 그룹화 할 수 있다.Through this, bounding boxes having an IOU with the second bounding box equal to or greater than a preset value may be additionally grouped.

즉, 그룹화 유닛(163)을 통한 그룹화와 그룹 확정 유닛(164)을 통한 제 1 바운딩 박스 재설정 작업을 통해 최초 제 1 바운딩 박스와 인접한 공통 바운딩 박스들을 빠짐없이 그룹화 할 수 있다.That is, through grouping through the grouping unit 163 and reconfiguration of the first bounding box through the group determining unit 164, the first bounding box and the adjacent common bounding boxes may be grouped without omission.

도 6은 위치 선정부(160)를 통해 도 5의 그룹화된 바운딩 박스들 중 실제 객체가 위치할 확률이 가장 높은 영역을 선택하는 모습을 나타낸 도면이다.FIG. 6 is a diagram illustrating an example of selecting an area with the highest probability of an actual object being located among the grouped bounding boxes of FIG. 5 through the location selector 160.

도 6을 참조하면, 위치 선정부(160)는 그룹핑부(150)를 통해 그룹화 된 바운딩 박스들 중 예측 값이 가장 높은 바운딩 박스의 위치를 해당 기호의 실제 위치로 선정한다.Referring to FIG. 6, the position selector 160 selects a position of a bounding box having the highest predicted value among bounding boxes grouped through the grouping unit 150 as an actual position of a corresponding symbol.

문자 인식 모듈(200)은 문자열(text) 검출 딥러닝 모델인 CTPN (Connectionist Text Proposal Network)을 통해 문자를 인식할 수 있다.The character recognition module 200 may recognize characters through a Connectionist Text Proposal Network (CTPN), which is a deep learning model for detecting text.

CTPN은 문자열 영역을 인식하기 위해 먼저 CNN을 이용하여 입력 이미지에서 텍스트 영역과 비텍스트 영역을 예측한다. 이 과정에서 문자열 패턴과 유사한 벽돌, 잎 등을 문자열로 잘못 인식되는 문제가 발생될 수 있다.In order to recognize a character string area, CTPN first predicts a text area and a non-text area in an input image using CNN. In this process, there may be a problem that bricks, leaves, etc. similar to the string pattern are incorrectly recognized as strings.

이러한 문제를 해결하기 위하여 CTPN은 CNN과 함께 RNN(recurrent neural network)의 일종인 LSTM(long short term memory network)을 적용하여 텍스트로 식별된 영역의 양 옆이 연결된 문자열인지 확인함으로써 문자열의 식별 정확도를 향상시킨다.In order to solve this problem, CTPN applies long short term memory network (LSTM), a kind of recurrent neural network (RNN) together with CNN, and checks whether both sides of the region identified as text are connected strings to improve the identification accuracy of strings. Improve.

선 인식 모듈(300)은 이미지 도면 내 선을 한 픽셀 굵기로 압축한 후 해당 선의 위치 및 길이를 인식한다.The line recognition module 300 compresses a line in the image drawing to a thickness of one pixel, and then recognizes the position and length of the line.

선 인식 모듈(300)은 최빈 선굵기 식별부(310), 선 압축부(320), 선 위치 검출부(330) 및 선 병합부(340)를 포함한다.The line recognition module 300 includes a modest line thickness identification unit 310, a line compression unit 320, a line position detection unit 330, and a line merging unit 340.

도 7은 최빈 선굵기 식별부(310)를 통해 이미지 도면 상에서 가장 빈번하게 사용되는 선의 굵기를 식별하는 모습을 나타낸 도면이다.7 is a diagram showing a state in which the most frequently used line thickness is identified on an image drawing through the modest line thickness identification unit 310.

도 7을 참조하면, 최빈 선굵기 식별부(310)는 이미지 도면 상에서 사용 빈도가 가장 높은 선의 굵기인 최빈 선굵기를 식별한다.Referring to FIG. 7, the modest line thickness identification unit 310 identifies the modest line thickness, which is the thickness of the line with the highest frequency of use on the image drawing.

최빈 선굵기 식별부(310)는 가로 선굵기 측정 유닛(311), 세로 선굵기 측정 유닛(312) 및 최빈 선굵기 판단 유닛(313)을 포함한다.The modest line thickness identification unit 310 includes a horizontal line thickness measurement unit 311, a vertical line thickness measurement unit 312, and a modest line thickness determination unit 313.

가로 선굵기 측정 유닛(311)은 이미지 도면의 가장 왼쪽에서부터 오른쪽으로 한 픽셀씩 이동하며 연속한 검은색 픽셀 수를 측정한다.The horizontal line thickness measurement unit 311 moves one pixel from the leftmost to the right of the image drawing and measures the number of consecutive black pixels.

세로 선굵기 측정 유닛(312)은 이미지 도면의 가장 위쪽에서부터 아래쪽으로 한 픽셀씩 이동하며 연속한 검은색 픽셀 수를 측정한다.The vertical line thickness measurement unit 312 moves one pixel from the top to the bottom of the image drawing and measures the number of consecutive black pixels.

최빈 선굵기 판단 유닛(313)은 가로 선굵기 측정부와 세로 선굵기 측정부의 측정 결과를 통합하여 측정된 빈도수가 가장 높은 연속한 검은색 픽셀 수를 판단하고 이를 최빈 선굵기로 설정한다.The modest line thickness determination unit 313 determines the number of consecutive black pixels with the highest measured frequency by integrating the measurement results of the horizontal line thickness measurement unit and the vertical line thickness measurement unit, and sets this as the mode line thickness.

이를 통해, 이미지 도면을 구성하는 실선 및 점선의 굵기를 픽셀 단위로 측정하고 이를 토대로 가장 빈번하게 사용되는 선의 굵기를 알 수 있다.Through this, it is possible to measure the thickness of the solid line and the dotted line constituting the image drawing in pixel units, and based on this, the thickness of the most frequently used line.

도 8은 선 압축부(320)를 통해 이미지 도면 내 선의 굵기를 한 개의 픽셀로 압축한 모습을 나타낸 도면이다.FIG. 8 is a diagram illustrating a state in which the thickness of a line in an image drawing is compressed into one pixel through the line compression unit 320.

도 8을 참조하면, 선 압축부(320)는 이미지 도면 상에 존재하는 선의 굵기를 한 개의 픽셀로 압축한다.Referring to FIG. 8, the line compression unit 320 compresses the thickness of a line existing on the image drawing into one pixel.

선 압축부(320)는 압축 수직선 추출 유닛(321) 및 압축 수평선 추출 유닛(322)을 포함한다.The line compression unit 320 includes a compressed vertical line extraction unit 321 and a compressed horizontal line extraction unit 322.

압축 수직선 추출 유닛(321)은 1×2 선 굵기 압축 커널을 사용한다.The compressed vertical line extraction unit 321 uses a 1×2 line thick compressed kernel.

1×2 선 굵기 압축 커널은 제 1 픽셀의 좌표 값이 (x, y)일 때, (x+1, y)의 좌표 값을 갖는 픽셀이 검은색인 경우 제 1 픽셀을 흰색으로 변환한다. 이때 좌표 값 (x+1, y)은 좌표 값 (x, y)에서 한 픽셀 오른쪽에 위치한 픽셀의 좌표 값을 말한다.The 1×2 line thickness compression kernel converts the first pixel to white when the coordinate value of the first pixel is (x, y) and the pixel having the coordinate value of (x+1, y) is black. At this time, the coordinate value (x+1, y) refers to the coordinate value of the pixel located one pixel to the right of the coordinate value (x, y).

해당 커널을 이미지 도면의 모든 픽셀에 적용하면 수평선은 제거되며, 수직선을 포함한 수평선 외의 선은 굵기가 1 픽셀인 선으로 변환된다.When the kernel is applied to all pixels in the image drawing, horizontal lines are removed, and lines other than horizontal lines including vertical lines are converted to lines with a thickness of 1 pixel.

압축 수평선 추출 유닛(322)은 2×1 선 굵기 압축 커널을 사용한다.The compressed horizontal line extraction unit 322 uses a 2×1 line thickness compressed kernel.

2×1 선 굵기 압축 커널은 제 2 픽셀의 좌표가 (x, y)일 때, (x, y+1)의 좌표 값을 갖는 픽셀이 검은색인 경우 제 2 픽셀을 흰색으로 변환한다. 이때 좌표 값 (x, y+1)은 좌표 값 (x, y)에서 한 픽셀 아래쪽에 위치한 픽셀의 좌표 값을 말한다.The 2×1 line thickness compression kernel converts the second pixel to white when the coordinate of the second pixel is (x, y), and the pixel having the coordinate value of (x, y+1) is black. At this time, the coordinate value (x, y+1) refers to the coordinate value of the pixel located one pixel below the coordinate value (x, y).

해당 커널을 이미지 도면의 모든 픽셀에 적용하면 수직선은 제거되며, 수평선을 포함한 수직선 외의 선은 굵기가 1 픽셀인 선으로 변환된다.When the kernel is applied to all pixels in the image drawing, vertical lines are removed, and lines other than vertical lines including horizontal lines are converted to lines with a thickness of 1 pixel.

선 위치 검출부(330)는 서로 이어진 검은색 픽셀을 식별하여 각각의 선의 위치를 측정한다. 즉, 이를 통해 각각의 선의 시작점과 끝점의 좌표를 알 수 있으며 이를 통해 각각의 선의 길이 역시 알 수 있다.The line position detection unit 330 identifies the black pixels connected to each other and measures the position of each line. That is, through this, the coordinates of the start and end points of each line can be known, and the length of each line can also be known through this.

선 위치 검출부(330)는 수직선 위치 검출 유닛(331) 및 수평선 위치 검출 유닛(332)을 포함한다.The line position detection unit 330 includes a vertical line position detection unit 331 and a horizontal line position detection unit 332.

수직선 위치 검출 유닛(331)은 압축 수직선 추출 유닛(321)을 통해 추출된 각각의 압축된 수직선들의 최상단 픽셀의 좌표 값과 최하단 픽셀의 좌표 값을 이용하여 각각의 압축된 수직선들의 위치 및 길이를 검출한다.The vertical line position detection unit 331 detects the position and length of each compressed vertical line by using the coordinate value of the uppermost pixel and the coordinate value of the lowermost pixel of each of the compressed vertical lines extracted through the compressed vertical line extraction unit 321 do.

압축된 수직선들의 최상단 픽셀의 좌표 값은 압축 수직선 추출 유닛(321)을 통해 획득한 수평선이 제거된 이미지 도면의 가장 위에서부터 아래방향으로 이동하면서 검은색 픽셀을 탐지하여 얻을 수 있다.The coordinate value of the uppermost pixel of the compressed vertical lines may be obtained by detecting a black pixel while moving from the top to the bottom of the image drawing from which the horizontal line obtained through the compressed vertical line extraction unit 321 has been removed.

압축된 수직선들의 최하단 픽셀의 좌표 값은 수직선 탐지 커널을 통해 탐지할 수 있다.The coordinate values of the lowermost pixel of the compressed vertical lines can be detected through the vertical line detection kernel.

수직선 탐지 커널은 제 3 픽셀에 위치하는데, 제 3 픽셀의 최초 위치는 각각의 압축된 수직선들의 최상단 픽셀이다.The vertical line detection kernel is located at the third pixel, the initial position of the third pixel being the topmost pixel of each of the compressed vertical lines.

수직선 탐지 커널은 제 3 픽셀의 좌표 값이 (x, y)일 때, (x, y+1), (x-1, y+1) 또는 (x+1, y+1)의 좌표 값을 갖는 픽셀 중 검은색 픽셀의 좌표 값을 제 3 픽셀의 좌표 값으로 재설정하여 해당 지점으로 위치를 이동하는 것을 반복한다.The vertical line detection kernel calculates the coordinate value of (x, y+1), (x-1, y+1) or (x+1, y+1) when the coordinate value of the third pixel is (x, y). The coordinate value of the black pixel among the pixels is reset to the coordinate value of the third pixel, and the position is repeatedly moved to the corresponding point.

이때, (x, y+1)은 (x, y)에서 한 픽셀 아래쪽에 위치한 픽셀의 좌표 값이고, (x-1, y+1)은 (x, y)에서 한 픽셀 아래쪽임과 동시에 한 픽셀 왼쪽에 위치한 픽셀의 좌표 값이고, (x+1, y+1)은 (x, y)에서 한 픽셀 아래쪽임과 동시에 한 픽셀 오른쪽에 위치한 픽셀의 좌표 값이다.At this time, (x, y+1) is the coordinate value of the pixel located one pixel lower in (x, y), and (x-1, y+1) is one pixel lower and one pixel in (x, y). It is the coordinate value of the pixel located to the left of the pixel, and (x+1, y+1) is the coordinate value of the pixel located one pixel below (x, y) and one pixel right.

이를 통해, 수직선 탐지 커널은 압축된 수직선의 가장 아래 픽셀에 도달할 수 있으며, 수직선 탐지 커널이 더 이상 이동하지 않을 때의 위치가 압축된 수직선의 최하단 픽셀의 위치에 해당한다.Through this, the vertical line detection kernel can reach the lowest pixel of the compressed vertical line, and a position when the vertical line detection kernel no longer moves corresponds to the location of the lowest pixel of the compressed vertical line.

수평선 위치 검출 유닛(332)은 압축 수평선 추출 유닛(322)을 통해 추출된 각각의 압축된 수평선들의 가장 왼쪽에 위치한 픽셀의 좌표 값과 가장 오른쪽에 위치한 픽셀의 좌표 값을 이용하여 각각의 압축된 수평선들의 위치 및 길이를 검출한다.The horizontal line position detection unit 332 uses the coordinate value of the leftmost pixel and the coordinate value of the rightmost pixel of each of the compressed horizontal lines extracted through the compressed horizontal line extraction unit 322. Detect the location and length of them.

압축된 수평선들의 가장 왼쪽에 위치한 픽셀의 좌표 값은 압축 수평선 추출 유닛(322)을 통해 획득한 수직선이 제거된 이미지 도면의 가장 왼쪽에서부터 오른쪽 방향으로 이동하면서 검은색 픽셀을 탐지하여 얻을 수 있다.The coordinate value of the pixel located at the leftmost of the compressed horizontal lines may be obtained by detecting black pixels while moving from the leftmost to the right of the image drawing from which the vertical line obtained through the compressed horizontal line extraction unit 322 is removed.

압축된 수평선들의 가장 오른쪽에 위치한 픽셀의 좌표 값은 수평선 탐지 커널을 통해 탐지할 수 있다.The coordinate value of the pixel located at the rightmost side of the compressed horizontal lines can be detected through the horizontal line detection kernel.

수평선 탐지 커널은 제 4 픽셀에 위치하는데, 제 4 픽셀의 최초 위치는 각각의 압축된 수평선들의 가장 왼쪽에 위치한 픽셀이다.The horizontal line detection kernel is located at the fourth pixel, and the initial position of the fourth pixel is the leftmost pixel of each of the compressed horizontal lines.

수평선 탐지 커널은 제 4 픽셀의 좌표 값이 (x, y)일 때, (x+1, y), (x+1, y-1) 또는 (x+1, y+1)의 좌표 값을 갖는 픽셀 중 검은색 픽셀의 좌표 값을 제 4 픽셀의 좌표 값으로 재설정하여 해당 지점으로 위치를 이동하는 것을 반복한다.When the coordinate value of the fourth pixel is (x, y), the horizontal line detection kernel calculates the coordinate value of (x+1, y), (x+1, y-1) or (x+1, y+1). The coordinate value of the black pixel among the possessed pixels is reset to the coordinate value of the fourth pixel, and the position is repeatedly moved to the corresponding point.

이때, (x+1, y)은 (x, y)에서 한 픽셀 오른쪽에 위치한 픽셀의 좌표 값이고, (x+1, y-1)은 (x, y)에서 한 픽셀 오른쪽임과 동시에 한 픽셀 위에 위치한 픽셀의 좌표 값이고, (x+1, y+1)은 (x, y)에서 한 픽셀 오른쪽임과 동시에 한 픽셀 아래쪽에 위치한 픽셀의 좌표 값이다.At this time, (x+1, y) is the coordinate value of the pixel located to the right of one pixel in (x, y), and (x+1, y-1) is one pixel to the right of (x, y) and one It is the coordinate value of the pixel located above the pixel, and (x+1, y+1) is the coordinate value of the pixel located one pixel to the right of (x, y) and one pixel below.

이를 통해, 수평선 탐지 커널은 압축된 수평선의 가장 오른쪽에 위치한 픽셀에 도달할 수 있으며, 수평선 탐지 커널이 더 이상 이동하지 않을 때의 위치가 압축된 수평선의 가장 오른쪽에 위치한 픽셀의 위치에 해당한다.Through this, the horizontal line detection kernel can reach the rightmost pixel of the compressed horizontal line, and the position when the horizontal line detection kernel no longer moves corresponds to the location of the rightmost pixel of the compressed horizontal line.

선 병합부(340)는 제 1 선의 끝점과 제 1 선과 인접한 제 2 선의 시작점 간의 간격이 기 설정된 선 간격 이하인 경우 제 1 선의 끝점과 제 2 선의 시작점을 연결한다.The line merging unit 340 connects the end point of the first line and the start point of the second line when the distance between the end point of the first line and the start point of the second line adjacent to the first line is less than or equal to a preset line distance.

선 압축부(320)를 통해 선을 압축하게 되면 각각의 선의 굵기가 줄어들게 되면서 초기에는 연결되어 있던 선들 사이에 이격이 생기게 된다. 선 병합부(340)는 이들 사이의 간격을 메꿔 줌으로써 분리된 선을 다시 병합시킨다.When the lines are compressed through the line compression unit 320, the thickness of each line decreases, and a gap is generated between the initially connected lines. The line merging unit 340 merges the separated lines again by filling the gaps therebetween.

이때, 선 압축 전에 떨어져 있던 선을 잘못 병합하는 것을 방지하기 위해 기 설정된 선 간격 이하인 선들 만을 연결시킨다.At this time, only lines that are less than a preset line spacing are connected to prevent accidental merging of the separated lines before line compression.

예를 들어, 선 압축부(320)를 통해 선 굵기가 압축되기 전 제 1 선과 제 2선이 연결되어 있었다면 선 굵기 압축 후에도 제 1 선과 제 2 선은 기 설정된 선 간격 이내에 위치한다. 선 병합부(340)는 이처럼 기 설정된 선 간격 이내에 위치하는 두 선을 병합시킨다.For example, if the first line and the second line are connected before the line thickness is compressed through the line compression unit 320, the first line and the second line are located within a preset line interval even after the line thickness is compressed. The line merging unit 340 merges two lines located within a predetermined line interval.

이때, 기 설정된 선 간격은 최빈 선굵기 식별부(310)를 통해 식별된 최빈 선굵기에 따라 조절될 수 있다.In this case, the preset line spacing may be adjusted according to the modest line thickness identified through the modest line thickness identification unit 310.

예를 들어, 기 설정된 선 간격은 최빈 선굵기의 3배로 정의될 수 있으며, 이는 이미지 도면 내 선 객체가 다양한 굵기를 갖고 있는 점을 고려하여 설정된 것이다.For example, the preset line spacing may be defined as 3 times the modest line thickness, which is set in consideration of the point that line objects in the image drawing have various thicknesses.

도 9는 표 인식 모듈(200)을 통해 이미지 도면 내 표를 인식하는 모습을 나타내는 도면이다.9 is a diagram illustrating a state in which a table in an image drawing is recognized through the table recognition module 200.

도 9를 참조하면, 표 인식 모듈(400)은 이미지 도면 상에서 검출된 직사각형 형상의 폐영역과 해당 폐영역 외부에 존재하는 객체가 서로 연결되지 않은 경우 해당 폐영역을 표라고 인식한다.Referring to FIG. 9, when a rectangular closed area detected on an image drawing and an object existing outside the closed area are not connected to each other, the table recognition module 400 recognizes the corresponding closed area as a table.

표 인식 모듈(400)은 폐영역 식별부(410), 표 탐지 커널 생성부(420) 및 표 인식부(430)을 포함한다.The table recognition module 400 includes a closed area identification unit 410, a table detection kernel generation unit 420, and a table recognition unit 430.

폐영역 식별부(410)는 도 9의 (a)와 같이 제 1 수직선, 제 1 수평선, 제 2 수직선 및 제 2 수평선을 순차적으로 연결했을 때 제 1 수직선의 시작점과 제 2 수평선의 끝점이 일치하는 직사각형 형상의 폐영역을 식별한다.When the first vertical line, the first horizontal line, the second vertical line, and the second horizontal line are sequentially connected as shown in FIG. To identify a rectangular closed area

표 탐지 커널 생성부(420)는 도 9의 (b)와 같이 각 변이 폐영역의 각 변으로부터 기 설정된 간격만큼 떨어진 직사각형 형상의 표 탐지 커널을 생성한다.The table detection kernel generation unit 420 generates a table detection kernel of a rectangular shape in which each side is separated from each side of the closed area by a predetermined distance as shown in FIG. 9B.

표 인식부(430)는 도 9의 (c) 및 (d)와 같이 표 탐지 커널을 지나 폐영역과 폐영역 외부의 객체를 연결하는 선이 존재하지 않는 경우 해당 폐영역을 표라고 인식할 수 있다.As shown in (c) and (d) of FIG. 9, when there is no line connecting the lung area and the object outside the lung area through the table detection kernel, the table recognition unit 430 may recognize the corresponding lung area as a table. have.

본 발명의 실시예는 이미지 형식의 플랜트 도면 상에서 기호, 문자, 선 및 표를 포함한 객체를 인식하고 추출하는 도면 객체 인식 장치를 제공한다.An embodiment of the present invention provides a drawing object recognition apparatus for recognizing and extracting objects including symbols, texts, lines, and tables on a plant drawing in an image format.

이를 위해 기호 인식 모듈(100), 문자 인식 모듈(200), 선 인식 모듈(300), 표 인식 모듈(400), 이미지 입력 모듈(500) 및 데이터베이스 모듈(600)을 포함할 수 있다.To this end, a symbol recognition module 100, a character recognition module 200, a line recognition module 300, a table recognition module 400, an image input module 500, and a database module 600 may be included.

기호 인식 모듈(100)은 이미지 도면 내 이미지와 기 저장된 기호 사이의 유사도에 따라 이들을 매칭시킴으로써 이미지 도면 내 이미지를 인식한다.The symbol recognition module 100 recognizes the image in the image drawing by matching them according to the similarity between the image in the image drawing and the previously stored symbol.

문자 인식 모듈(200)은 문자열 검출 딥러닝 모델인 CTPN(Connectionist Text Proposal Network)을 통해 이미지 도면 내 문자를 인식한다.The character recognition module 200 recognizes characters in an image drawing through a connectionist text proposal network (CTPN), which is a character string detection deep learning model.

선 인식 모듈 (300)은 이미지 도면 내 선을 한 픽셀 굵기로 압축한 후 해당 선의 위치 및 길이를 인식한다.The line recognition module 300 compresses a line in the image drawing to a thickness of one pixel and then recognizes the position and length of the line.

표 인식 모듈(400)은 이미지 도면 상에서 검출된 직사각형 형상의 폐영역과 폐영역 외부에 존재하는 객체가 서로 연결되지 않는 경우 폐영역을 표라고 인식한다.The table recognition module 400 recognizes the closed area as a table when the rectangular closed area detected in the image drawing and the object existing outside the closed area are not connected to each other.

이상에서 실시예를 통해 본 발명을 설명하였으나, 위 실시예는 단지 본 발명의 사상을 설명하기 위한 것으로 이에 한정되지 않는다. 통상의 기술자는 전술한 실시예에 다양한 변형이 가해질 수 있음을 이해할 것이다. 본 발명의 범위는 첨부된 특허청구범위의 해석을 통해서만 정해진다.In the above, the present invention has been described through the embodiments, but the above embodiments are merely for explaining the spirit of the present invention and are not limited thereto. One of ordinary skill in the art will understand that various modifications may be made to the above-described embodiments. The scope of the present invention is defined only through interpretation of the appended claims.

10: 도면 객체 인식 장치 100: 기호 인식 모듈
110: 모폴로지 연산부 120: 이미지 추출부
130: 예측 값 산출부 140: 매칭부
150: 그룹핑부 160: 위치 선정부
200: 문자 인식 모듈 300: 선 인식 모듈
310: 최빈 선굵기 식별부 320: 선 압축부
330: 선 위치 검출부 340: 선 병합부
400: 표 인식 모듈 500: 이미지 입력 모듈
600: 데이터베이스 모듈
10: drawing object recognition device 100: symbol recognition module
110: morphology operation unit 120: image extraction unit
130: prediction value calculation unit 140: matching unit
150: grouping unit 160: location selection unit
200: character recognition module 300: line recognition module
310: mode line thickness identification unit 320: line compression unit
330: line position detection unit 340: line merging unit
400: table recognition module 500: image input module
600: database module

Claims (17)

이미지 도면 내 객체를 인식하는 장치에 있어서,
상기 이미지 도면의 이미지 정보를 입력 받는 이미지 입력 모듈;
상기 이미지 도면에 사용된 기호에 관한 정보가 저장된 데이터베이스 모듈; 및
상기 이미지 입력 모듈을 통해 입력 받은 이미지와 상기 데이터베이스 모듈에 기 저장된 기호와의 유사도에 따라 예측 값을 산출하고, 상기 예측 값이 가장 높은 기호와 상기 이미지 입력 모듈을 통해 입력 받은 이미지를 매칭시킴으로써 상기 이미지 도면 내 기호를 인식하는 기호 인식 모듈을 포함하고,
상기 기호 인식 모듈은:
상기 이미지 도면 상에서 기호가 존재할 가능성이 높은 영역을 추출하는 모폴로지 연산부;
상기 모폴로지 연산부를 통해 추출된 영역 내의 각 픽셀을 중심으로 바운딩 박스를 설정하고, 상기 바운딩 박스 내의 이미지를 추출하는 이미지 추출부;
상기 이미지 추출부를 통해 추출된 이미지와 기 저장된 기호와의 유사도에 따라 예측 값을 산출하는 예측 값 산출부;
상기 예측 값 산출부를 통해 산출된 예측 값 중 가장 높은 값에 대응되는 기호와 상기 이미지 추출부를 통해 추출된 이미지를 매칭시키는 매칭부;
상기 매칭부에서 동일한 기호로 매칭된 바운딩 박스들을 그룹화 시키는 그룹핑부; 및
상기 그룹핑부를 통해 그룹화 된 바운딩 박스들 중 상기 예측 값이 가장 높은 바운딩 박스의 위치를 해당 기호의 실제 위치로 선정하는 위치 선정부를 포함하는
도면 객체 인식 장치.
In the device for recognizing an object in an image drawing,
An image input module for receiving image information of the image drawing;
A database module in which information on symbols used in the image drawing is stored; And
The image is calculated by calculating a predicted value according to the similarity between the image input through the image input module and a symbol previously stored in the database module, and matching the symbol with the highest predicted value with the image input through the image input module. Includes a symbol recognition module for recognizing symbols in drawings,
The symbol recognition module:
A morphology operation unit that extracts a region in which a symbol is likely to exist on the image drawing;
An image extracting unit configured to set a bounding box centering on each pixel in the region extracted through the morphology operation unit and extract an image in the bounding box;
A prediction value calculation unit that calculates a prediction value according to a similarity between the image extracted through the image extraction unit and a previously stored symbol;
A matching unit that matches a symbol corresponding to a highest value among the predicted values calculated through the prediction value calculating unit and the image extracted through the image extracting unit;
A grouping unit for grouping bounding boxes matched with the same symbol in the matching unit; And
Including a position selecting unit for selecting a position of the bounding box with the highest predicted value among the bounding boxes grouped through the grouping unit as the actual position of the corresponding symbol
Drawing object recognition device.
제 1 항에 있어서,
상기 이미지 도면 내 선을 한 픽셀 굵기로 압축한 후 상기 선의 위치 및 길이를 인식하는 선 인식 모듈을 더 포함하는
도면 객체 인식 장치.
The method of claim 1,
Further comprising a line recognition module for recognizing the position and length of the line after compressing the line in the image drawing to a thickness of one pixel.
Drawing object recognition device.
제 2 항에 있어서,
상기 이미지 도면 상에서 검출된 직사각형 형상의 폐영역과 상기 폐영역의 외부에 존재하는 객체가 서로 연결되지 않은 경우 상기 폐영역을 표라고 인식하는 표 인식 모듈을 더 포함하는
도면 객체 인식 장치.
The method of claim 2,
Further comprising a table recognition module for recognizing the closed area as a table when the rectangular-shaped closed area detected on the image drawing and the object existing outside the closed area are not connected to each other.
Drawing object recognition device.
제 3 항에 있어서,
문자열 검출 딥러닝 모델인 CTPN(Connectionist Text Proposal Network)을 통해 문자를 인식하는 문자 인식 모듈을 더 포함하는
도면 객체 인식 장치.
The method of claim 3,
Further comprising a character recognition module for recognizing characters through a string detection deep learning model CTPN (Connectionist Text Proposal Network).
Drawing object recognition device.
삭제delete 제 1 항에 있어서,
상기 모폴로지 연산부는:
상기 기호 내부의 빈 공간을 채우는 닫기 모폴로지 연산 유닛; 및
상기 이미지 도면 상에서 배관에 해당하는 영역을 삭제하는 열기 모폴로지 연산 유닛을 포함하는
도면 객체 인식 장치.
The method of claim 1,
The morphology calculation unit:
A closing morphology calculating unit filling an empty space inside the symbol; And
Including an open morphology calculation unit for deleting an area corresponding to a pipe on the image drawing
Drawing object recognition device.
제 1 항에 있어서,
상기 이미지 추출부에서 설정된 상기 바운딩 박스는 상기 기 저장된 기호의 크기에 맞춰 조절이 가능한
도면 객체 인식 장치.
The method of claim 1,
The bounding box set in the image extraction unit is adjustable according to the size of the previously stored symbol.
Drawing object recognition device.
제 1 항에 있어서,
상기 그룹핑부는:
상기 매칭부에서 동일한 기호로 매칭된 바운딩 박스인 공통 바운딩 박스를 추출하는 공통 바운딩 박스 추출 유닛;
상기 공통 바운딩 박스 중 최외곽에 위치한 바운딩 박스를 제 1 바운딩 박스로 설정하는 제 1 바운딩 박스 설정 유닛;
상기 공통 바운딩 박스 중 상기 제 1 바운딩 박스와 겹치는 면적의 비율이 기 설정된 값 이상인 바운딩 박스를 그룹화하는 그룹화 유닛; 및
상기 그룹화된 바운딩 박스 중 상기 제 1 바운딩 박스와의 거리가 가장 먼 바운딩 박스를 제 2 바운딩 박스로 설정한 후 상기 제 2 바운딩 박스를 상기 제 1 바운딩 박스로 재설정하는 그룹 확장 유닛을 포함하는
도면 객체 인식 장치.
The method of claim 1,
The grouping unit:
A common bounding box extracting unit for extracting a common bounding box, which is a bounding box matched with the same symbol by the matching unit;
A first bounding box setting unit configured to set a bounding box located at the outermost of the common bounding boxes as a first bounding box;
A grouping unit for grouping bounding boxes in which a ratio of an area overlapping the first bounding box among the common bounding boxes is equal to or greater than a preset value; And
Including a group expansion unit for resetting the second bounding box to the first bounding box after setting the bounding box with the farthest distance from the first bounding box among the grouped bounding boxes as the second bounding box
Drawing object recognition device.
제 2 항에 있어서,
상기 선 인식 모듈은:
상기 이미지 도면 상에서 사용 빈도가 가장 높은 선의 굵기인 최빈 선굵기를 식별하는 최빈 선굵기 식별부;
상기 이미지 도면 상에 존재하는 선의 굵기를 한 개의 픽셀로 압축하는 선 압축부;
서로 이어진 검은색 픽셀을 식별하여 각각의 선의 위치를 측정하는 선 위치 검출부; 및
상기 압축 과정에서 분리된 선을 병합시키는 선 병합부를 포함하는
도면 객체 인식 장치.
The method of claim 2,
The line recognition module:
A mode line thickness identification unit for identifying a mode line thickness, which is the thickness of the line with the highest frequency of use on the image drawing;
A line compression unit compressing the thickness of a line existing on the image drawing into one pixel;
A line position detection unit that identifies the black pixels connected to each other and measures the position of each line; And
Including a line merging unit for merging the lines separated in the compression process
Drawing object recognition device.
제 9 항에 있어서,
상기 최빈 선굵기 식별부는:
상기 이미지 도면의 가장 왼쪽에서부터 오른쪽으로 한 픽셀씩 이동하며 연속한 검은색 픽셀 수를 측정하는 가로 선굵기 측정 유닛;
상기 이미지 도면의 가장 위쪽에서부터 아래쪽으로 한 픽셀씩 이동하며 연속한 검은색 픽셀 수를 측정하는 세로 선굵기 측정 유닛; 및
상기 가로 선굵기 측정 유닛과 상기 세로 선굵기 측정 유닛의 측정 결과를 통합한 후, 측정된 빈도수가 가장 높은 연속한 검은색 픽셀 수를 판단하는 최빈 선굵기 판단 유닛을 포함하는
도면 객체 인식 장치.
The method of claim 9,
The modest line thickness identification unit:
A horizontal line thickness measurement unit that moves one pixel from the leftmost to the right of the image drawing and measures the number of consecutive black pixels;
A vertical line thickness measuring unit moving one pixel from the top to the bottom of the image drawing and measuring the number of consecutive black pixels; And
After integrating the measurement results of the horizontal line thickness measurement unit and the vertical line thickness measurement unit, a mode line thickness determination unit that determines the number of consecutive black pixels with the highest measured frequency.
Drawing object recognition device.
제 9 항에 있어서,
상기 선 압축부는:
제 1 픽셀의 좌표 값이 (x, y)일 때, (x+1, y)의 좌표 값을 갖는 픽셀이 검은색인 경우, 상기 제 1 픽셀을 흰색으로 변환하여 압축된 수직선을 추출하는 압축 수직선 추출 유닛; 및
제 2 픽셀의 좌표가 (x, y)일 때, (x, y+1)의 좌표 값을 갖는 픽셀이 검은색인 경우, 상기 제 2 픽셀을 흰색으로 변환하여 압축된 수평선을 추출하는 압축 수평선 추출 유닛을 포함하고,
상기 (x+1, y)은 상기 (x, y)에서 한 픽셀 오른쪽에 위치한 픽셀의 좌표 값이고,
상기 (x, y+1)은 상기 (x, y)에서 한 픽셀 아래쪽에 위치한 픽셀의 좌표 값인
도면 객체 인식 장치.
The method of claim 9,
The line compression unit:
When the coordinate value of the first pixel is (x, y) and the pixel having the coordinate value of (x+1, y) is black, a compressed vertical line that converts the first pixel to white to extract a compressed vertical line Extraction unit; And
When the coordinates of the second pixel are (x, y) and the pixel having the coordinate value of (x, y+1) is black, the compressed horizontal line is extracted by converting the second pixel to white to extract the compressed horizontal line. Including units,
(X+1, y) is a coordinate value of a pixel located one pixel to the right of (x, y),
The (x, y+1) is the coordinate value of the pixel located one pixel below the (x, y)
Drawing object recognition device.
제 11 항에 있어서,
상기 선 위치 검출부는:
수직선 위치 검출 유닛; 및
수평선 위치 검출 유닛을 포함하는
도면 객체 인식 장치.
The method of claim 11,
The line position detection unit:
A vertical line position detection unit; And
Including a horizontal position detection unit
Drawing object recognition device.
제 12 항에 있어서,
상기 수직선 위치 검출 유닛은:
상기 압축 수직선 추출 유닛을 통해 추출된 각각의 압축된 수직선들의 최상단 픽셀의 좌표 값; 및
수직선 탐지 커널의 최종 위치인 상기 각각의 압축된 수직선들의 최하단 픽셀의 좌표 값을 이용하여 상기 각각의 압축된 수직선들의 위치 및 길이를 검출하고
상기 수직선 탐지 커널은:
제 3 픽셀에 위치하고,
상기 제 3 픽셀의 최초 위치는 상기 각각의 압축된 수직선들의 최상단 픽셀이고,
상기 제 3 픽셀의 좌표 값이 (x, y)일 때, (x, y+1), (x-1, y+1) 또는 (x+1, y+1)의 좌표 값을 갖는 픽셀 중 검은색 픽셀의 좌표 값을 상기 제 3 픽셀의 좌표 값으로 재설정하는 것을 반복하고,
상기 (x, y+1)은 (x, y)에서 한 픽셀 아래쪽에 위치한 픽셀의 좌표 값이고,
상기 (x-1, y+1)은 (x, y)에서 한 픽셀 아래쪽임과 동시에 한 픽셀 왼쪽에 위치한 픽셀의 좌표 값이고,
상기 (x+1, y+1)은 (x, y)에서 한 픽셀 아래쪽임과 동시에 한 픽셀 오른쪽에 위치한 픽셀의 좌표 값인
도면 객체 인식 장치
The method of claim 12,
The vertical line position detection unit:
A coordinate value of an uppermost pixel of each of the compressed vertical lines extracted through the compressed vertical line extraction unit; And
The position and length of each of the compressed vertical lines are detected using a coordinate value of the lowest pixel of each of the compressed vertical lines, which is the final position of the vertical line detection kernel.
The vertical line detection kernel:
Located on the third pixel,
The first position of the third pixel is the uppermost pixel of each of the compressed vertical lines,
When the coordinate value of the third pixel is (x, y), among pixels having a coordinate value of (x, y+1), (x-1, y+1) or (x+1, y+1) Resetting the coordinate value of the black pixel to the coordinate value of the third pixel is repeated,
(X, y+1) is the coordinate value of a pixel located one pixel below (x, y),
(X-1, y+1) is a coordinate value of a pixel located one pixel below (x, y) and one pixel left,
The (x+1, y+1) is the coordinate value of the pixel located one pixel below (x, y) and to the right of the pixel.
Drawing object recognition device
제 12 항에 있어서,
상기 수평선 위치 검출 유닛은:
상기 압축 수평선 추출 유닛을 통해 추출된 각각의 압축된 수평선들의 가장 왼쪽에 위치한 픽셀의 좌표 값; 및
수평선 탐지 커널의 최종 위치인 상기 각각의 압축된 수평선들의 가장 오른쪽에 위치한 픽셀의 좌표 값을 이용하여 상기 각각의 압축된 수평선들의 위치 및 길이를 검출하고,
상기 수평선 탐지 커널은:
제 4 픽셀에 위치하고,
상기 제 4 픽셀의 최초 위치는 상기 각각의 압축된 수평선들의 가장 왼쪽에 위치한 픽셀이고,
상기 제 4 픽셀의 좌표 값이 (x, y)일 때, (x+1, y), (x+1, y-1) 또는 (x+1, y+1)의 좌표 값을 갖는 픽셀 중 검은색 픽셀의 좌표 값을 상기 제 4 픽셀의 좌표 값으로 재설정하는 것을 반복하고,
상기 (x+1, y)는 (x, y)에서 한 픽셀 오른쪽에 위치한 픽셀의 좌표 값이고,
상기 (x+1, y-1)은 (x, y)에서 한 픽셀 오른쪽임과 동시에 한 픽셀 위에 위치한 픽셀의 좌표 값이고,
상기 (x+1, y+1)은 (x, y)에서 한 픽셀 오른쪽임과 동시에 한 픽셀 아래쪽에 위치한 픽셀의 좌표 값인
도면 객체 인식 장치
The method of claim 12,
The horizontal position detection unit:
A coordinate value of the leftmost pixel of each of the compressed horizontal lines extracted through the compressed horizontal line extraction unit; And
The position and length of each of the compressed horizontal lines are detected using a coordinate value of a pixel located at the rightmost side of each of the compressed horizontal lines, which is the final position of the horizontal line detection kernel,
The horizontal line detection kernel is:
Located at the 4th pixel,
The first position of the fourth pixel is a pixel located at the leftmost of each of the compressed horizontal lines,
When the coordinate value of the fourth pixel is (x, y), among pixels having a coordinate value of (x+1, y), (x+1, y-1) or (x+1, y+1) Resetting the coordinate value of the black pixel to the coordinate value of the fourth pixel is repeated,
The (x+1, y) is the coordinate value of the pixel located to the right of one pixel in (x, y),
(X+1, y-1) is a coordinate value of a pixel located one pixel above and one pixel right from (x, y),
The (x+1, y+1) is one pixel to the right of (x, y) and the coordinate value of the pixel located one pixel below
Drawing object recognition device
제 9 항에 있어서,
선 병합부는:
제 1 선의 끝점과 상기 제 1 선과 인접한 제 2 선의 시작점 간의 간격이 기 설정된 선 간격 이하인 경우, 상기 제 1 선의 끝점과 상기 제 2 선의 시작점을 연결하는
도면 객체 인식 장치.
The method of claim 9,
The line merge is:
When the distance between the end point of the first line and the start point of the second line adjacent to the first line is less than or equal to a preset line distance, connecting the end point of the first line and the start point of the second line
Drawing object recognition device.
제 15 항에 있어서,
상기 기 설정된 선 간격은 상기 최빈 선굵기 식별부를 통해 식별된 최빈 선굵기에 따라 조절되는
도면 객체 인식 장치.
The method of claim 15,
The preset line spacing is adjusted according to the modest line thickness identified through the modest line thickness identification unit.
Drawing object recognition device.
제 3 항에 있어서,
상기 표 인식 모듈은:
제 1 수직선, 제 1 수평선, 제 2 수직선 및 제 2 수평선을 순차적으로 연결했을 때, 상기 제 1 수직선의 시작점과 상기 제 2 수평선의 끝점이 일치하는 직사각형 형상의 폐영역을 식별하는 폐영역 식별부;
각 변이 상기 폐영역의 각 변으로부터 기 설정된 간격만큼 떨어진 직사각형 형상의 표 탐지 커널을 생성하는 표 탐지 커널 생성부; 및
상기 표 탐지 커널을 지나 상기 폐영역과 상기 폐영역 외부의 객체를 연결하는 선이 존재하지 않는 경우, 상기 폐영역을 표라고 인식하는 표 인식부를 포함하는
도면 객체 인식 장치.
The method of claim 3,
The table recognition module:
When the first vertical line, the first horizontal line, the second vertical line and the second horizontal line are sequentially connected, a closed area identification unit that identifies a rectangular closed area in which the start point of the first vertical line and the end point of the second horizontal line coincide ;
A table detection kernel generator for generating a rectangular table detection kernel in which each side is separated from each side of the closed area by a predetermined distance; And
A table recognition unit for recognizing the closed area as a table when there is no line connecting the closed area and an object outside the closed area through the table detection kernel
Drawing object recognition device.
KR1020190146375A 2019-11-15 2019-11-15 Object recognition apparatus in image drawing KR102203937B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190146375A KR102203937B1 (en) 2019-11-15 2019-11-15 Object recognition apparatus in image drawing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190146375A KR102203937B1 (en) 2019-11-15 2019-11-15 Object recognition apparatus in image drawing

Publications (1)

Publication Number Publication Date
KR102203937B1 true KR102203937B1 (en) 2021-01-18

Family

ID=74237004

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190146375A KR102203937B1 (en) 2019-11-15 2019-11-15 Object recognition apparatus in image drawing

Country Status (1)

Country Link
KR (1) KR102203937B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220170666A (en) * 2021-06-23 2022-12-30 한국수력원자력 주식회사 Apparatus for generating regular drawings for nuclear safety grades and Method for that
WO2023214621A1 (en) * 2022-05-02 2023-11-09 주식회사 어반베이스 Device, method, computer-readable recording medium, and computer program for three-dimensional modeling of two-dimensional diagram on basis of cluster pattern recognition

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001092967A (en) * 1999-09-22 2001-04-06 Toshiba Corp Device and method for recognizing drawing
KR20100135281A (en) * 2008-03-28 2010-12-24 스마트 테크놀러지스 유엘씨 Method and tool for recognizing a hand-drawn table
US20170061031A1 (en) * 2015-08-28 2017-03-02 Honeywell International Inc. Method and apparatus for converting diagrams into application engineering elements

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001092967A (en) * 1999-09-22 2001-04-06 Toshiba Corp Device and method for recognizing drawing
KR20100135281A (en) * 2008-03-28 2010-12-24 스마트 테크놀러지스 유엘씨 Method and tool for recognizing a hand-drawn table
US20170061031A1 (en) * 2015-08-28 2017-03-02 Honeywell International Inc. Method and apparatus for converting diagrams into application engineering elements

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220170666A (en) * 2021-06-23 2022-12-30 한국수력원자력 주식회사 Apparatus for generating regular drawings for nuclear safety grades and Method for that
KR102595430B1 (en) 2021-06-23 2023-10-27 한국수력원자력 주식회사 Apparatus for generating regular drawings for nuclear safety grades and Method for that
WO2023214621A1 (en) * 2022-05-02 2023-11-09 주식회사 어반베이스 Device, method, computer-readable recording medium, and computer program for three-dimensional modeling of two-dimensional diagram on basis of cluster pattern recognition

Similar Documents

Publication Publication Date Title
Shi et al. Icdar2017 competition on reading chinese text in the wild (rctw-17)
WO2020221298A1 (en) Text detection model training method and apparatus, text region determination method and apparatus, and text content determination method and apparatus
WO2019192397A1 (en) End-to-end recognition method for scene text in any shape
KR102177550B1 (en) Method of automatically recognizing and classifying information of design in imaged PID drawings
CN110765907A (en) System and method for extracting paper document information of test paper in video based on deep learning
KR102203937B1 (en) Object recognition apparatus in image drawing
MXPA04009151A (en) System and method for detecting a hand-drawn object in ink input.
JP2005242579A (en) Document processor, document processing method and document processing program
Pacha et al. Towards self-learning optical music recognition
CN110135248A (en) A kind of natural scene Method for text detection based on deep learning
JP7396568B2 (en) Form layout analysis device, its analysis program, and its analysis method
Yang et al. MIDI passage retrieval using cell phone pictures of sheet music
Ayesh et al. A robust line segmentation algorithm for Arabic printed text with diacritics
Rigaud et al. What do we expect from comic panel extraction?
Mörzinger et al. Visual Structure Analysis of Flow Charts in Patent Images.
CN109147002B (en) Image processing method and device
CN114330247A (en) Automatic insurance clause analysis method based on image recognition
KR101118628B1 (en) Iamge Data Recognition and Managing Method for Ancient Documents using Intelligent Recognition Library and Management Tool
JP2022063599A (en) Drawing structuring system and drawing structuring method
Villena Toro et al. Optical character recognition on engineering drawings to achieve automation in production quality control
Bouafif et al. A hybrid method for three segmentation level of handwritten Arabic script
CN110688445A (en) Digital archive construction method
CN114140793A (en) Matching method and device for terminal block and terminal block wiring
Arroyo et al. Automatic detection and recognition of structural and connectivity objects in SVG-coded engineering documents
Stoitchkov et al. Automatic detection of plan symbols in railway equipment engineering using a machine learning approach

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant