WO2022164031A1 - Method and system for detecting character string by using high-dimensional polynomial regression - Google Patents

Method and system for detecting character string by using high-dimensional polynomial regression Download PDF

Info

Publication number
WO2022164031A1
WO2022164031A1 PCT/KR2021/019343 KR2021019343W WO2022164031A1 WO 2022164031 A1 WO2022164031 A1 WO 2022164031A1 KR 2021019343 W KR2021019343 W KR 2021019343W WO 2022164031 A1 WO2022164031 A1 WO 2022164031A1
Authority
WO
WIPO (PCT)
Prior art keywords
box
trajectory
text
text line
line
Prior art date
Application number
PCT/KR2021/019343
Other languages
French (fr)
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 네이버 주식회사
Publication of WO2022164031A1 publication Critical patent/WO2022164031A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/10Image acquisition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/12Bounding box

Definitions

  • the following description relates to a string detection method and system using high-dimensional polynomial regression.
  • OCR Optical Character Reader
  • neural networks can provide a more generalized and nuanced solution to the OCR reading order problem, and these networks can use modeled information with respect to language structure, context, and layout.
  • a network has a problem in that it requires a relatively large amount of resources and waiting time to be used in most commercial applications.
  • OCR Optical Character Reader
  • a method for detecting a character string in a computer device including at least one processor, the method comprising: setting, by the at least one processor, a box in text included in an image input; clustering, by the at least one processor, the boxes into groups; calculating, by the at least one processor, a trajectory for each box included in the same group; forming, by the at least one processor, a text line according to a preset criterion by tracing a trajectory for each of the boxes; and processing, by the at least one processor, a regression analysis of a multidimensional polynomial over each of the text lines.
  • the preset criterion is that the trajectory of the first box extending in the first direction meets the second direction end of the second box (or the trajectory of the second box), or the direction opposite to the first direction Including a criterion in which a valid encounter occurs in which the trajectory of the first box extending in the second direction meets the end of the third box (or the trajectory of the third box) in the first direction in the second direction can be characterized as
  • the forming of the text line may include: with respect to the first box, the second box (or the trajectory of the second box) or the third box (or the trajectory of the third box) is to be found. tracing the trajectory of the first box within a distance proportional to the length of the first box; and a response that an effective encounter occurs between the trajectory of the first box and the second box (or the trajectory of the second box), or the trajectory of the first box and the third box (or the trajectory of the third box) It may be characterized in that it comprises the step of forming a text line.
  • the step of forming a text line in response to the occurrence of the valid encounter may include: the valid encounter occurs between the trajectory of the first box and the second box (or the third box), and the second When each of the first box and the second box (or the third box) is not connected to a specific text line, forming a new text line for the first box and the second box (or the third box) can be characterized as
  • the step of forming a text line in response to the occurrence of the valid encounter may include: the valid encounter occurs between the trajectory of the first box and the second box (or the third box), and the second When any one of the first box and the second box (or the third box) is connected to a specific text line, the other one may be connected to the specific text line.
  • the step of forming a text line in response to the occurrence of the valid encounter may include: the valid encounter occurs between the trajectory of the first box and the second box (or the third box), and the second When the first box and the second box (or the third box) are respectively connected to different text lines, the different text lines are combined to form one text line.
  • the processing of the regression analysis comprises processing the regression analysis using three points of a left midpoint, a right midpoint and a center point of each box corresponding to one text line. can do.
  • the processing of the regression analysis may be characterized in that a text line including one box is generated as a linear polynomial from the one box.
  • a text line longer than half of the longest text line among polynomially parameterized text lines is set as a trusted text line, and the remaining text lines are set as an untrusted text line, and the regression analysis is processed.
  • the performing may include filtering the multidimensional coefficients of the text lines through a weighted average of the multidimensional coefficients of the polynomial for the trusted text line.
  • the filtering comprises: filtering a polynomial for the trust text line between the trust text lines; and filtering the polynomial for the untrusted line using the filtered polynomial for the trusted text line.
  • the filtering may include calculating a weight for the weighted average so as to be proportional to a ratio of a length of a polynomial to a text line to a distance between centers of the polynomials.
  • the method for detecting a character string includes, by the at least one processor, forming the text line whenever another box or a trajectory of the other box is found until the end of the input image is reached and repeating the step of processing the regression analysis.
  • a computer program stored in a computer-readable recording medium in combination with a computer device to execute the method on the computer device.
  • It provides a computer-readable recording medium in which a program for executing the method in a computer device is recorded.
  • At least one processor implemented to execute computer-readable instructions, wherein the at least one processor sets a box in text that an input image includes, clusters the box into groups, and assigns to the same group
  • a computer characterized by calculating a trajectory for each included box, tracing the trajectory for each of the boxes to form a text line according to a preset criterion, and processing a multidimensional polynomial regression analysis through each of the text lines provide the device.
  • the OCR Optical Character Reader
  • FIG. 1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention.
  • FIG. 2 is a block diagram illustrating an example of a computer device according to an embodiment of the present invention.
  • FIG. 3 is a flowchart illustrating an example of a method for detecting a character string according to an embodiment of the present invention.
  • FIG 4 to 6 are views showing an example of rotation of the OCR box in an embodiment of the present invention.
  • FIG. 7 is a diagram illustrating an example of a boundary point of an OCR box according to an embodiment of the present invention.
  • FIGS. 8 to 11 are diagrams illustrating examples of recognizing a text of an object including a curvature according to an embodiment of the present invention.
  • FIGS. 12 and 13 are diagrams illustrating an example of tracking a trajectory according to an embodiment of the present invention.
  • FIGS. 14 and 15 are diagrams illustrating examples of detection results of text lines derived by applying a character string detection method according to an embodiment of the present invention.
  • 16 to 22 are diagrams sequentially showing results of tracking and updating the trajectory of a box through a character string detection method according to an embodiment of the present invention.
  • FIG. 1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention.
  • the network environment of FIG. 1 shows an example including a plurality of electronic devices 110 , 120 , 130 , 140 , a plurality of servers 150 , 160 , and a network 170 .
  • 1 is an example for explaining the invention, and the number of electronic devices or the number of servers is not limited as in FIG. 1 .
  • the network environment of FIG. 1 only describes one example of environments applicable to the present embodiments, and the environment applicable to the present embodiments is not limited to the network environment of FIG. 1 .
  • the plurality of electronic devices 110 , 120 , 130 , and 140 may be a fixed terminal implemented as a computer device or a mobile terminal.
  • Examples of the plurality of electronic devices 110 , 120 , 130 , 140 include a smart phone, a mobile phone, a navigation device, a computer, a notebook computer, a digital broadcasting terminal, a personal digital assistant (PDA), and a portable multimedia player (PMP). ), tablet PCs, etc.
  • PDA personal digital assistant
  • PMP portable multimedia player
  • FIG. 1 the shape of a smartphone is shown as an example of the electronic device 110 , but in embodiments of the present invention, the electronic device 110 is substantially configured to be different through the network 170 using a wireless or wired communication method. It may refer to one of various physical computer devices capable of communicating with the electronic devices 120 , 130 , 140 and/or the servers 150 and 160 .
  • the communication method is not limited, and not only a communication method using a communication network (eg, a mobile communication network, a wired Internet, a wireless Internet, a broadcasting network) that the network 170 may include, but also short-range wireless communication between devices may be included.
  • the network 170 may include a personal area network (PAN), a local area network (LAN), a campus area network (CAN), a metropolitan area network (MAN), a wide area network (WAN), and a broadband network (BBN). , the Internet, and the like.
  • PAN personal area network
  • LAN local area network
  • CAN campus area network
  • MAN metropolitan area network
  • WAN wide area network
  • BBN broadband network
  • the network 170 may include any one or more of a network topology including a bus network, a star network, a ring network, a mesh network, a star-bus network, a tree, or a hierarchical network, etc. not limited
  • Each of the servers 150 and 160 communicates with the plurality of electronic devices 110 , 120 , 130 , 140 and the network 170 through a computer device or a plurality of computers providing commands, codes, files, contents, services, etc. It can be implemented in devices.
  • the server 150 provides a service (eg, a content providing service, a group call service (or a voice conference service) to the plurality of electronic devices 110 , 120 , 130 , and 140 connected through the network 170 ).
  • a service eg, a content providing service, a group call service (or a voice conference service)
  • a messaging service e.g, a mail service, a social network service, a map service, a translation service, a financial service, a payment service, a search service, etc.
  • FIG. 2 is a block diagram illustrating an example of a computer device according to an embodiment of the present invention.
  • Each of the plurality of electronic devices 110 , 120 , 130 , 140 or the servers 150 and 160 described above may be implemented by the computer device 200 illustrated in FIG. 2 .
  • the computer device 200 may include a memory 210 , a processor 220 , a communication interface 230 , and an input/output interface 240 .
  • the memory 210 is a computer-readable recording medium and may include a random access memory (RAM), a read only memory (ROM), and a permanent mass storage device such as a disk drive.
  • RAM random access memory
  • ROM read only memory
  • a permanent mass storage device such as a disk drive.
  • a non-volatile mass storage device such as a ROM and a disk drive may be included in the computer device 200 as a separate permanent storage device distinct from the memory 210 .
  • the memory 210 may store an operating system and at least one program code. These software components may be loaded into the memory 210 from a computer-readable recording medium separate from the memory 210 .
  • the separate computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, a disk, a tape, a DVD/CD-ROM drive, and a memory card.
  • the software components may be loaded into the memory 210 through the communication interface 230 instead of a computer-readable recording medium.
  • the software components may be loaded into the memory 210 of the computer device 200 based on a computer program installed by files received through the network 170 .
  • the communication interface 230 may provide a function for the computer device 200 to communicate with other devices (eg, the storage devices described above) through the network 170 .
  • a request, command, data, file, etc. generated by the processor 220 of the computer device 200 according to a program code stored in a recording device such as the memory 210 is transmitted to the network ( 170) to other devices.
  • signals, commands, data, files, etc. from other devices may be received by the computer device 200 through the communication interface 230 of the computer device 200 via the network 170 .
  • a signal, command, or data received through the communication interface 230 may be transmitted to the processor 220 or the memory 210 , and the file may be a storage medium (described above) that the computer device 200 may further include. persistent storage).
  • the input/output interface 240 may be a means for an interface with the input/output device 250 .
  • the input device may include a device such as a microphone, keyboard, or mouse
  • the output device may include a device such as a display or a speaker.
  • the input/output interface 240 may be a means for an interface with a device in which functions for input and output are integrated into one, such as a touch screen.
  • the input/output device 250 may be configured as one device with the computer device 200 .
  • the computer device 200 may include fewer or more components than those of FIG. 2 . However, there is no need to clearly show most of the prior art components.
  • the computer device 200 may be implemented to include at least a portion of the above-described input/output device 250 or may further include other components such as a transceiver and a database.
  • Embodiments of the present invention can estimate the overall document curvature by inferring local curvature in text layout and self-filtering (or self-improving) the prediction. This allows you to determine the order of the text even if it is on a curved page or placed in an unconventional layout.
  • embodiments of the present invention are not data-driven and therefore do not require particularly much data for language structure, context and layout, they are much simpler to implement even in resource-constrained environments and can be optimized to significantly reduce latency.
  • FIG. 3 is a flowchart illustrating an example of a method for detecting a character string according to an embodiment of the present invention.
  • the character string detection method according to the present embodiment may be performed by the computer device 200 .
  • the processor 220 of the computer device 200 may be implemented to execute a control instruction according to a code of an operating system included in the memory 210 or a code of at least one computer program.
  • the processor 220 causes the computer device 200 to perform steps 310 to 340 included in the method of FIG. 3 according to a control command provided by a code stored in the computer device 200 . can control
  • the computer device 200 may set the OCR box to the text included in the input image.
  • the computer device 200 may assign an OCR box to each word recognized in the image.
  • a "word” as a unit in which the OCR box is set may be understood as a group of texts separated by a distance, unlike a word as a dictionary meaning.
  • the input image includes a character string such as “ABCD EFG”, “ABCD” may be recognized as a single word and an OCR box may be assigned, and “EFG” may be recognized as a single word and OCR A box may be given.
  • a bundle of texts connected to each other may be recognized as a single word regardless of the meaning of the text, and bundles spaced apart from each other may be recognized as different words.
  • the computer device 200 may rotate the OCR boxes in a forward direction. The rotation of the OCR box will be described in more detail later with reference to FIGS. 4 to 6 .
  • the computer device 200 may form a text line according to a preset criterion by tracking the trajectory of each OCR box. For example, the computer device 200 may track the trajectory within a distance proportional to the major length of each OCR box until another box is found for each OCR box.
  • the preset criterion is that the trajectory of the first box that runs in the first direction meets the end of the second box (or the trajectory of the second box) in the second direction, or runs in a second direction opposite to the first direction.
  • the trajectory of the first box may include a criterion in which a valid encounter occurs in which the trajectory of the first box meets the end of the third box (or the trajectory of the third box) in the first direction in the second direction.
  • the criterion for a "valid encounter" to occur is that the trajectory leading to the left or right of the first box must encounter another box (the second or third box) or the rightmost (or left) of the trajectory of the other box.
  • the first OCR box, the second OCR box located to the left of the first OCR box, and the third OCR box located to the right of the first OCR box When the condition of is satisfied, it may be determined that a valid encounter occurs.
  • a trajectory leading to the left with respect to the trajectory of the first OCR box is, within a transaction proportional to the main length of the first OCR box, a second OCR box located to the left of the first OCR box (or the right end of the trajectory).
  • the computer device 200 is proportional to the length of the first box until a second box (or trajectory of the second box) or a third box (or trajectory of the third box) is found for the first box. It is possible to track the trajectory of the first box within the distance. At this time, the computer device 200 generates an effective encounter between the trajectory of the first box and the second box (or the trajectory of the second box), or the trajectory of the first box and the third box (or the trajectory of the third box). Can form lines of text in response.
  • the other OCR box eg, the second OCR box
  • the OCR box or the third OCR box may be connected to the corresponding text line (the first OCR box).
  • a valid encounter occurs between the trajectory of the first box and the second box (or the third box), and any one of the first box and the second box (or the third box) is specified If it is linked to a line of text, you can link the other to a specific line of text.
  • the different text lines may be combined to form one text line.
  • the computer device 200 an effective encounter occurs between the trajectory of the first box and the second box (or the third box), and the first box and the second box (or the third box) are different from each other.
  • different text lines can be combined to form one text line.
  • the computer device 200 may process the regression analysis of the n-dimensional polynomial through each text line.
  • the points used in the regression analysis can be obtained from the boundary of the OCR box or the midpoint of the principal axis derived from the boundary point.
  • the computer device 200 may process a regression analysis using three points for each OCR box: a left midpoint, a right midpoint, and a midpoint of the OCR box.
  • the OCR boxes may be boxes corresponding to one text line.
  • a text line containing only one OCR box is made from an OCR box that is not part of the text line, and the polynomial of this text line can be considered linear (one-dimensional).
  • a text line longer than half of the longest text line parameterized by the polynomial may be regarded as a trusted text line, and the remaining text lines may be regarded as an untrusted text line.
  • the computer device 200 may filter the higher-order coefficients of the text line through a weighted average of the higher-order coefficients of the polynomial for the trusted text line.
  • the polynomial for the trusted text line may first be filtered between the trusted text lines, and then the polynomial for the untrusted text line may be filtered by the filtered polynomial for the filtered trusted text line.
  • the weight may be defined to be proportional to (length of polynomial relative to text line)/(distance between centers of polynomials).
  • the filtered polynomial is now considered an “updated” trajectory and the computer device 200 may trace the updated trajectory as described above in step 360 .
  • the next distance can be proportional to the length of the polynomial or up to the boundary of the image.
  • the computer device 200 may track and update the trajectory, repeating steps 360 and 370 whenever another OCR box or a line of text in another OCR box is found, until the end of the image is reached. .
  • the computer device 200 may provide the finally tracked and updated trajectory as a result of detecting a text line with respect to the input image. Based on the detection result of these text lines, the OCR word results can be read sequentially in consideration of the curvature of lines or sentences formed by words in the image.
  • FIG. 4 to 6 are views showing an example of rotation of the OCR box in an embodiment of the present invention.
  • 4 shows an example of an image 400 including slanted text.
  • 5 shows an example of setting the OCR box to texts
  • FIG. 6 shows an example of rotating the OCR boxes in the forward direction.
  • the OCR boxes may be rotated in the forward direction by rotating the entire region including the OCR boxes, rather than rotating the respective OCR boxes.
  • FIG. 7 is a diagram illustrating an example of a boundary point of an OCR box according to an embodiment of the present invention.
  • four vertices 711 to 714 of the box 700 may be used as boundary points.
  • the center point 720 of the box 700 , the left midpoint 730 of the box 700 , and/or the right midpoint 740 of the box 700 may be further used as boundary points.
  • other points obtained from the boundary line of the box 700 may be further used as boundary points.
  • points on the main axis connecting the center point 720 of the box 700, the left midpoint 730 of the box 700, and the right midpoint 740 of the box 700 are further utilized as boundary points.
  • the length of the box 700 may be obtained as the length of the main axis (or the length of the line connecting the vertex 711 and the vertex 712 or the length of the line connecting the vertex 713 and the vertex 714).
  • FIGS. 8 to 11 are diagrams illustrating examples of recognizing a text of an object including a curvature according to an embodiment of the present invention.
  • 8 shows an image 800 in which text of an object including curvature is listed according to the curvature of the object.
  • the computer device 200 may set an OCR box for each word recognized in the image.
  • the computer device 200 may calculate a trajectory for each OCR box.
  • FIG. 10 shows an example in which three boxes 1010 , 1020 , and 1030 are enlarged and displayed among the boxes of FIG. 9 .
  • FIG. 10 shows an example in which the trajectory of the box 1020 meets the right end of the box 1010 on the left side and meets the left end of the box 1030 on the right side.
  • trajectory 1040 is a line of text in another embodiment, it will be readily understood that boxes 1010 and 1030 for which a valid query for box 1020 occurred may be connected to the line of text represented by trajectory 1040 . will be able
  • the computer device 200 may use the polynomial obtained by processing the regression analysis of the n-dimensional polynomial through the text line to which the three boxes 1010 , 1020 , and 1030 are connected as the updated trajectory.
  • 11 shows an example of such an updated trajectory 1110 .
  • the tracking of the trajectory 1040 of the box 1020 may be made within a length proportional to the length of the box 1020 .
  • tracking of trajectory 1040 may be made for each of the left and right sides within a length of one-half the length of box 1020 .
  • FIG. 12 and 13 are diagrams illustrating an example of tracking a trajectory according to an embodiment of the present invention.
  • the trajectory of the box 1210 does not meet the box 1220 as in the boxes 1210 and 1220 of FIG. 12 .
  • a “valid encounter” may occur due to an encounter between the trajectory 1230 of the box 1210 and the trajectory 1240 of the box 1220 .
  • a new text line may be formed by the combination of the two trajectories 1230 and 1240 as shown in FIG. 12 , and the polynomial obtained by processing the regression analysis of the n-dimensional polynomial through the new text line will be utilized as the updated trajectory.
  • can 13 shows an example of such an updated trajectory 1310 .
  • the computer device 200 may repeat tracking and updating of this trajectory whenever another OCR box or text line of another OCR box is found until the end of the image is reached.
  • FIG. 14 and 15 are diagrams illustrating examples of detection results of text lines derived by applying a character string detection method according to an embodiment of the present invention.
  • 14 shows an example of an input image
  • FIG. 15 shows a detection result of a text line.
  • 16 to 22 are diagrams sequentially showing results of tracking and updating the trajectory of a box through a character string detection method according to an embodiment of the present invention.
  • the image of FIG. 16 shows an example in which the OCR box is set.
  • the OCR boxes of different groups are divided into boxes of different colors.
  • 17 to 22 show examples in which curves as text lines are changed according to the curvature of an object (receipt) through tracking of the trajectory and updating of the trajectory through regression analysis of an n-dimensional polynomial.
  • tracking and updating of the trajectory may be repeatedly performed whenever another box or a trajectory of the other box is found (valid encounter) until the end of the input image is reached.
  • the OCR word results can be sequentially read in consideration of the position and angle of each word in the image, and the curvature of a line or sentence formed by the words.
  • the order of text even when text is on a curved page or laid out in an unconventional layout can be decided.
  • it since it is not data-based and does not require a lot of data in particular for language structure, context and layout, it is much simpler to implement even in a resource-constrained environment and greatly reduces latency. can be optimized to be
  • the system or apparatus described above may be implemented as a hardware component or a combination of a hardware component and a software component.
  • devices and components described in the embodiments may include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA). , a programmable logic unit (PLU), microprocessor, or any other device capable of executing and responding to instructions, may be implemented using one or more general purpose or special purpose computers.
  • the processing device may execute an operating system (OS) and one or more software applications running on the operating system.
  • the processing device may also access, store, manipulate, process, and generate data in response to execution of the software.
  • OS operating system
  • the processing device may also access, store, manipulate, process, and generate data in response to execution of the software.
  • the processing device includes a plurality of processing elements and/or a plurality of types of processing elements. It can be seen that may include For example, the processing device may include a plurality of processors or one processor and one controller. Other processing configurations are also possible, such as parallel processors.
  • the software may comprise a computer program, code, instructions, or a combination of one or more thereof, which configures a processing device to operate as desired or is independently or collectively processed You can command the device.
  • the software and/or data may be any kind of machine, component, physical device, virtual equipment, computer storage medium or device, to be interpreted by or to provide instructions or data to the processing device. may be embodied in The software may be distributed over networked computer systems and stored or executed in a distributed manner. Software and data may be stored in one or more computer-readable recording media.
  • the method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded in a computer-readable medium.
  • the computer-readable medium may include program instructions, data files, data structures, etc. alone or in combination.
  • the medium may continuously store a computer executable program, or may be a temporary storage for execution or download.
  • the medium may be various recording means or storage means in the form of a single or several hardware combined, it is not limited to a medium directly connected to any computer system, and may exist distributed on a network.
  • Examples of the medium include a hard disk, a magnetic medium such as a floppy disk and a magnetic tape, an optical recording medium such as CD-ROM and DVD, a magneto-optical medium such as a floppy disk, and those configured to store program instructions, including ROM, RAM, flash memory, and the like.
  • examples of other media may include recording media or storage media managed by an app store that distributes applications, sites that supply or distribute various other software, or servers.
  • Examples of program instructions include not only machine language codes such as those generated by a compiler, but also high-level language codes that can be executed by a computer using an interpreter or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Algebra (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Operations Research (AREA)
  • Probability & Statistics with Applications (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Character Input (AREA)

Abstract

Disclosed are a method and system for detecting a character string by using high-dimensional polynomial regression. The method for detecting a character string, according to an embodiment, may comprise the steps of: setting boxes on text included in an input image; clustering the boxes by group; calculating a trajectory for each of boxes included in a same group; forming text lines according to a preset criterion by tracking the trajectory for each of the boxes; and processing regression analysis of a multidimensional polynomial via each of the text lines.

Description

고차원 다항식 회귀를 이용한 문자열 검출 방법 및 시스템String detection method and system using high-dimensional polynomial regression
아래의 설명은 고차원 다항식 회귀를 이용한 문자열 검출 방법 및 시스템에 관한 것이다.The following description relates to a string detection method and system using high-dimensional polynomial regression.
종래의 OCR(Optical Character Reader) 기술은 일반적으로 문자 감지, 위치 파악 및 인식의 성능을 높이는 데 중점을 두고 있지만, 고려해야 할 또 다른 측면은 OCR 결과의 단어를 읽는 순서를 결정하는 것이다.While conventional Optical Character Reader (OCR) technologies generally focus on improving the performance of character detection, localization, and recognition, another aspect to consider is determining the order in which words in the OCR result are read.
대부분의 상용 어플리케이션은 OCR 결과에서 단어의 순서를 결정하기 위해 단어의 위치(및/또는 회전, 그룹화)를 사용한다. OCR 결과의 위치, 회전 및 그룹화를 사용하면 비교적 평평하고 균일하게 회전된 문서를 처리할 수 있다. 그러나 이러한 종래기술에서는 문서에 페이지 곡률이 포함되어 있거나 단어가 비선형 방식으로 배치된 경우 인식의 정확성이 떨어지는 문제점이 있다.Most commercial applications use the position (and/or rotation, grouping) of words to determine the order of words in OCR results. Positioning, rotation, and grouping of OCR results allows for relatively flat and uniformly rotated documents to be processed. However, this prior art has a problem in that the recognition accuracy is lowered when the page curvature is included in the document or the words are arranged in a non-linear manner.
일부 연구에서는 위치 인코딩, 언어 모델링 및 OCR 단어 결과 간의 상관 관계를 조합하여 단어 순서를 추정하기 위해 신경망을 사용한다. 신경망을 사용하면 OCR 읽기 순서 문제에 대한보다 일반화되고 미묘한 솔루션을 제공할 수 있으며, 이러한 네트워크는 언어 구조, 컨텍스트 및 레이아웃과 관련하여 모델링된 정보를 사용할 수 있다. 그러나 이와 같은 네트워크는 대부분의 상용 어플리케이션에서 사용하기에는 상대적으로 너무 많은 리소스와 대기 시간을 요구하는 문제점이 있다.Some studies use neural networks to estimate word order by combining correlations between positional encoding, language modeling, and OCR word outcomes. The use of neural networks can provide a more generalized and nuanced solution to the OCR reading order problem, and these networks can use modeled information with respect to language structure, context, and layout. However, such a network has a problem in that it requires a relatively large amount of resources and waiting time to be used in most commercial applications.
이미지에서의 각 단어의 위치와 각도, 그리고 단어들에 의해 형성된 선이나 문장의 곡률을 고려하여 OCR(Optical Character Reader) 단어 결과를 순서대로 읽을 수 있는 문자열 검출 방법 및 시스템을 제공한다.To provide a string detection method and system that can sequentially read OCR (Optical Character Reader) word results in consideration of the position and angle of each word in an image, and the curvature of a line or sentence formed by the words.
적어도 하나의 프로세서를 포함하는 컴퓨터 장치의 문자열 검출 방법에 있어서, 상기 적어도 하나의 프로세서에 의해, 입력된 이미지가 포함하는 텍스트에 박스를 설정하는 단계; 상기 적어도 하나의 프로세서에 의해, 상기 박스를 그룹별로 클러스터링하는 단계; 상기 적어도 하나의 프로세서에 의해, 동일한 그룹에 포함된 박스 각각에 대한 궤적을 계산하는 단계; 상기 적어도 하나의 프로세서에 의해, 상기 박스 각각에 대한 궤적을 추적하여 기설정된 기준에 따라 텍스트 라인을 형성하는 단계; 및 상기 적어도 하나의 프로세서에 의해, 상기 텍스트 라인 각각을 통해 다차원 다항식의 회귀 분석을 처리하는 단계를 포함하는 문자열 검출 방법을 제공한다.A method for detecting a character string in a computer device including at least one processor, the method comprising: setting, by the at least one processor, a box in text included in an image input; clustering, by the at least one processor, the boxes into groups; calculating, by the at least one processor, a trajectory for each box included in the same group; forming, by the at least one processor, a text line according to a preset criterion by tracing a trajectory for each of the boxes; and processing, by the at least one processor, a regression analysis of a multidimensional polynomial over each of the text lines.
일측에 따르면, 상기 기설정된 기준은, 제1 방향으로 이어지는 제1 박스의 궤적이 제2 박스(또는 제2 박스의 궤적)의 제2 방향 끝부분과 마주치거나, 또는 제1 방향의 반대 방향인 제2 방향으로 이어지는 제1 박스의 궤적이 제2 방향에서 제3 박스(또는 제3 박스의 궤적)의 제1 방향의 끝부분과 마주치는 유효한 조우(valid encounter)가 발생하는 기준을 포함하는 것을 특징으로 할 수 있다.According to one side, the preset criterion is that the trajectory of the first box extending in the first direction meets the second direction end of the second box (or the trajectory of the second box), or the direction opposite to the first direction Including a criterion in which a valid encounter occurs in which the trajectory of the first box extending in the second direction meets the end of the third box (or the trajectory of the third box) in the first direction in the second direction can be characterized as
다른 측면에 따르면, 상기 텍스트 라인을 형성하는 단계는, 상기 제1 박스에 대해 상기 제2 박스(또는 상기 제2 박스의 궤적) 또는 상기 제3 박스(또는 상기 제3 박스의 궤적)가 발견될 때까지, 상기 제1 박스의 길이에 비례하는 거리 내에서 상기 제1 박스의 궤적을 추적하는 단계; 및 상기 제1 박스의 궤적과 상기 제2 박스(또는 상기 제2 박스의 궤적), 또는 상기 제1 박스의 궤적과 상기 제3 박스(또는 상기 제3 박스의 궤적)간에 유효한 조우가 발생함에 응답하여 텍스트 라인을 형성하는 단계를 포함하는 것을 특징으로 할 수 있다.According to another aspect, the forming of the text line may include: with respect to the first box, the second box (or the trajectory of the second box) or the third box (or the trajectory of the third box) is to be found. tracing the trajectory of the first box within a distance proportional to the length of the first box; and a response that an effective encounter occurs between the trajectory of the first box and the second box (or the trajectory of the second box), or the trajectory of the first box and the third box (or the trajectory of the third box) It may be characterized in that it comprises the step of forming a text line.
또 다른 측면에 따르면, 상기 유효한 조우가 발생함에 응답하여 텍스트 라인을 형성하는 단계는, 상기 제1 박스의 궤적과 상기 제2 박스(또는 상기 제3 박스)간에 상기 유효한 조우가 발생하고, 상기 제1 박스와 상기 제2 박스(또는 상기 제3 박스) 각각이 특정 텍스트 라인에 연결되어 있지 않은 경우, 상기 제1 박스 및 상기 제2 박스(또는 상기 제3 박스)를 위한 새로운 텍스트 라인을 형성하는 것을 특징으로 할 수 있다.According to another aspect, the step of forming a text line in response to the occurrence of the valid encounter may include: the valid encounter occurs between the trajectory of the first box and the second box (or the third box), and the second When each of the first box and the second box (or the third box) is not connected to a specific text line, forming a new text line for the first box and the second box (or the third box) can be characterized as
또 다른 측면에 따르면, 상기 유효한 조우가 발생함에 응답하여 텍스트 라인을 형성하는 단계는, 상기 제1 박스의 궤적과 상기 제2 박스(또는 상기 제3 박스)간에 상기 유효한 조우가 발생하고, 상기 제1 박스 및 상기 제2 박스(또는 상기 제3 박스) 중 어느 하나가 특정 텍스트 라인에 연결되어 있는 경우, 다른 하나를 상기 특정 텍스트 라인에 연결하는 것을 특징으로 할 수 있다.According to another aspect, the step of forming a text line in response to the occurrence of the valid encounter may include: the valid encounter occurs between the trajectory of the first box and the second box (or the third box), and the second When any one of the first box and the second box (or the third box) is connected to a specific text line, the other one may be connected to the specific text line.
또 다른 측면에 따르면, 상기 유효한 조우가 발생함에 응답하여 텍스트 라인을 형성하는 단계는, 상기 제1 박스의 궤적과 상기 제2 박스(또는 상기 제3 박스)간에 상기 유효한 조우가 발생하고, 상기 제1 박스 및 상기 제2 박스(또는 상기 제3 박스)가 각각 서로 다른 텍스트 라인에 연결되어 있는 경우, 상기 서로 다른 텍스트 라인을 결합하여 하나의 텍스트 라인을 형성하는 것을 특징으로 할 수 있다.According to another aspect, the step of forming a text line in response to the occurrence of the valid encounter may include: the valid encounter occurs between the trajectory of the first box and the second box (or the third box), and the second When the first box and the second box (or the third box) are respectively connected to different text lines, the different text lines are combined to form one text line.
또 다른 측면에 따르면, 상기 회귀 분석을 처리하는 단계는, 하나의 텍스트 라인에 대응하는 박스 각각의 왼쪽 중간점, 오른쪽 중간점 및 중심점의 세 개의 포인트를 이용하여 상기 회귀 분석을 처리하는 것을 특징으로 할 수 있다.According to another aspect, the processing of the regression analysis comprises processing the regression analysis using three points of a left midpoint, a right midpoint and a center point of each box corresponding to one text line. can do.
또 다른 측면에 따르면, 상기 회귀 분석을 처리하는 단계는, 하나의 박스를 포함하는 텍스트 라인을 상기 하나의 박스로부터 선형 다항식으로서 생성하는 것을 특징으로 할 수 있다.According to another aspect, the processing of the regression analysis may be characterized in that a text line including one box is generated as a linear polynomial from the one box.
또 다른 측면에 따르면, 다항식으로 매개 변수화된 텍스트 라인들 중 가장 긴 텍스트 라인의 절반보다 긴 텍스트 라인은 신뢰 텍스트 라인으로 설정되고, 나머지 텍스트 라인은 비신뢰 텍스트 라인으로 설정되고, 상기 회귀 분석을 처리하는 단계는, 상기 텍스트 라인들의 다차원 계수를 신뢰 텍스트 라인에 대한 다항식의 다차원 계수의 가중 평균을 통해 필터링하는 단계를 포함하는 것을 특징으로 할 수 있다.According to another aspect, a text line longer than half of the longest text line among polynomially parameterized text lines is set as a trusted text line, and the remaining text lines are set as an untrusted text line, and the regression analysis is processed. The performing may include filtering the multidimensional coefficients of the text lines through a weighted average of the multidimensional coefficients of the polynomial for the trusted text line.
또 다른 측면에 따르면, 상기 필터링하는 단계는, 상기 신뢰 텍스트 라인에 대한 다항식을 상기 신뢰 텍스트 라인들 사이에서 필터링하는 단계; 및 상기 비신뢰 라인에 대한 다항식을 상기 필터링된 신뢰 텍스트 라인에 대한 다항식을 이용하여 필터링하는 단계를 포함하는 것을 특징으로 할 수 있다.According to another aspect, the filtering comprises: filtering a polynomial for the trust text line between the trust text lines; and filtering the polynomial for the untrusted line using the filtered polynomial for the trusted text line.
또 다른 측면에 따르면, 상기 필터링하는 단계는, 텍스트 라인에 대한 다항식의 길이의 다항식들의 중심들 사이의 거리에 대한 비율에 비례하도록 상기 가중 평균을 위한 가중치를 계산하는 것을 특징으로 할 수 있다.According to another aspect, the filtering may include calculating a weight for the weighted average so as to be proportional to a ratio of a length of a polynomial to a text line to a distance between centers of the polynomials.
또 다른 측면에 따르면, 상기 문자열 검출 방법은, 상기 적어도 하나의 프로세서에 의해, 상기 입력된 이미지의 끝에 도달할 때까지 다른 박스 또는 상기 다른 박스의 궤적이 발견되는 경우마다 상기 텍스트 라인을 형성하는 단계 및 상기 회귀 분석을 처리하는 단계를 반복 수행하는 단계를 더 포함할 수 있다.According to another aspect, the method for detecting a character string includes, by the at least one processor, forming the text line whenever another box or a trajectory of the other box is found until the end of the input image is reached and repeating the step of processing the regression analysis.
컴퓨터 장치와 결합되어 상기 방법을 컴퓨터 장치에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램을 제공한다.Provided is a computer program stored in a computer-readable recording medium in combination with a computer device to execute the method on the computer device.
상기 방법을 컴퓨터 장치에 실행시키기 위한 프로그램이 기록되어 있는 컴퓨터 판독 가능한 기록매체를 제공한다.It provides a computer-readable recording medium in which a program for executing the method in a computer device is recorded.
컴퓨터에서 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서에 의해, 입력된 이미지가 포함하는 텍스트에 박스를 설정하고, 상기 박스를 그룹별로 클러스터링하고, 동일한 그룹에 포함된 박스 각각에 대한 궤적을 계산하고, 상기 박스 각각에 대한 궤적을 추적하여 기설정된 기준에 따라 텍스트 라인을 형성하고, 상기 텍스트 라인 각각을 통해 다차원 다항식의 회귀 분석을 처리하는 것을 특징으로 하는 컴퓨터 장치를 제공한다.at least one processor implemented to execute computer-readable instructions, wherein the at least one processor sets a box in text that an input image includes, clusters the box into groups, and assigns to the same group A computer characterized by calculating a trajectory for each included box, tracing the trajectory for each of the boxes to form a text line according to a preset criterion, and processing a multidimensional polynomial regression analysis through each of the text lines provide the device.
이미지에서의 각 단어의 위치와 각도, 그리고 단어들에 의해 형성된 선이나 문장의 곡률을 고려하여 OCR(Optical Character Reader) 단어 결과를 순서대로 읽을 수 있다.In consideration of the position and angle of each word in the image, and the curvature of the line or sentence formed by the words, the OCR (Optical Character Reader) word results can be read in order.
도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다.1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention.
도 2는 본 발명의 일실시예에 따른 컴퓨터 장치의 예를 도시한 블록도이다.2 is a block diagram illustrating an example of a computer device according to an embodiment of the present invention.
도 3은 본 발명의 일실시예에 따른 문자열 검출 방법의 예를 도시한 흐름도이다.3 is a flowchart illustrating an example of a method for detecting a character string according to an embodiment of the present invention.
도 4 내지 도 6은 본 발명의 일실시예에 있어서, OCR 박스의 회전의 예를 도시한 도면들이다.4 to 6 are views showing an example of rotation of the OCR box in an embodiment of the present invention.
도 7은 본 발명의 일실시예에 있어서, OCR 박스의 경계점의 예를 도시한 도면이다.7 is a diagram illustrating an example of a boundary point of an OCR box according to an embodiment of the present invention.
도 8 내지 도 11은 본 발명의 일실시예에 있어서, 곡률이 포함된 객체의 텍스트를 인식하는 예를 도시한 도면들이다.8 to 11 are diagrams illustrating examples of recognizing a text of an object including a curvature according to an embodiment of the present invention.
도 12 및 도 13은 본 발명의 일실시예에 있어서, 궤적을 추적하는 예를 도시한 도면들이다.12 and 13 are diagrams illustrating an example of tracking a trajectory according to an embodiment of the present invention.
도 14 및 도 15는 본 발명의 일실시예에 따른 문자열 검출 방법을 적용하여 도출된 텍스트 라인의 감지 결과의 예를 도시한 도면들이다.14 and 15 are diagrams illustrating examples of detection results of text lines derived by applying a character string detection method according to an embodiment of the present invention.
[규칙 제91조에 의한 정정 06.01.2022] 
도 16 내지 도 22는 본 발명의 일실시예에 따른 문자열 검출 방법을 통해 박스의 궤도를 추적 및 업데이트함에 따른 결과를 순차적으로 나타낸 도면들이다.
[Correction by Rule 91 06.01.2022]
16 to 22 are diagrams sequentially showing results of tracking and updating the trajectory of a box through a character string detection method according to an embodiment of the present invention.
이하, 실시예를 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings.
본 발명의 실시예들에 따른 문자열 검출 시스템은 적어도 하나의 컴퓨터 장치에 의해 구현될 수 있으며, 본 발명의 실시예들에 따른 문자열 검출 방법은 문자열 검출 시스템에 포함되는 적어도 하나의 컴퓨터 장치를 통해 수행될 수 있다. 컴퓨터 장치에는 본 발명의 일실시예에 따른 컴퓨터 프로그램이 설치 및 구동될 수 있고, 컴퓨터 장치는 구동된 컴퓨터 프로그램의 제어에 따라 본 발명의 실시예들에 따른 문자열 검출 방법을 수행할 수 있다. 상술한 컴퓨터 프로그램은 컴퓨터 장치와 결합되어 문자열 검출 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장될 수 있다.The character string detection system according to the embodiments of the present invention may be implemented by at least one computer device, and the character string detection method according to the embodiments of the present invention is performed through at least one computer device included in the character string detection system. can be The computer program according to an embodiment of the present invention may be installed and driven in the computer device, and the computer device may perform the string detection method according to the embodiments of the present invention under the control of the driven computer program. The above-described computer program may be stored in a computer-readable recording medium in combination with a computer device to cause the computer to execute the character string detection method.
도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다. 도 1의 네트워크 환경은 복수의 전자 기기들(110, 120, 130, 140), 복수의 서버들(150, 160) 및 네트워크(170)를 포함하는 예를 나타내고 있다. 이러한 도 1은 발명의 설명을 위한 일례로 전자 기기의 수나 서버의 수가 도 1과 같이 한정되는 것은 아니다. 또한, 도 1의 네트워크 환경은 본 실시예들에 적용 가능한 환경들 중 하나의 예를 설명하는 것일 뿐, 본 실시예들에 적용 가능한 환경이 도 1의 네트워크 환경으로 한정되는 것은 아니다.1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention. The network environment of FIG. 1 shows an example including a plurality of electronic devices 110 , 120 , 130 , 140 , a plurality of servers 150 , 160 , and a network 170 . 1 is an example for explaining the invention, and the number of electronic devices or the number of servers is not limited as in FIG. 1 . In addition, the network environment of FIG. 1 only describes one example of environments applicable to the present embodiments, and the environment applicable to the present embodiments is not limited to the network environment of FIG. 1 .
복수의 전자 기기들(110, 120, 130, 140)은 컴퓨터 장치로 구현되는 고정형 단말이거나 이동형 단말일 수 있다. 복수의 전자 기기들(110, 120, 130, 140)의 예를 들면, 스마트폰(smart phone), 휴대폰, 네비게이션, 컴퓨터, 노트북, 디지털방송용 단말, PDA(Personal Digital Assistants), PMP(Portable Multimedia Player), 태블릿 PC 등이 있다. 일례로 도 1에서는 전자 기기(110)의 예로 스마트폰의 형상을 나타내고 있으나, 본 발명의 실시예들에서 전자 기기(110)는 실질적으로 무선 또는 유선 통신 방식을 이용하여 네트워크(170)를 통해 다른 전자 기기들(120, 130, 140) 및/또는 서버(150, 160)와 통신할 수 있는 다양한 물리적인 컴퓨터 장치들 중 하나를 의미할 수 있다.The plurality of electronic devices 110 , 120 , 130 , and 140 may be a fixed terminal implemented as a computer device or a mobile terminal. Examples of the plurality of electronic devices 110 , 120 , 130 , 140 include a smart phone, a mobile phone, a navigation device, a computer, a notebook computer, a digital broadcasting terminal, a personal digital assistant (PDA), and a portable multimedia player (PMP). ), tablet PCs, etc. As an example, in FIG. 1 , the shape of a smartphone is shown as an example of the electronic device 110 , but in embodiments of the present invention, the electronic device 110 is substantially configured to be different through the network 170 using a wireless or wired communication method. It may refer to one of various physical computer devices capable of communicating with the electronic devices 120 , 130 , 140 and/or the servers 150 and 160 .
통신 방식은 제한되지 않으며, 네트워크(170)가 포함할 수 있는 통신망(일례로, 이동통신망, 유선 인터넷, 무선 인터넷, 방송망)을 활용하는 통신 방식뿐만 아니라 기기들간의 근거리 무선 통신 역시 포함될 수 있다. 예를 들어, 네트워크(170)는, PAN(personal area network), LAN(local area network), CAN(campus area network), MAN(metropolitan area network), WAN(wide area network), BBN(broadband network), 인터넷 등의 네트워크 중 하나 이상의 임의의 네트워크를 포함할 수 있다. 또한, 네트워크(170)는 버스 네트워크, 스타 네트워크, 링 네트워크, 메쉬 네트워크, 스타-버스 네트워크, 트리 또는 계층적(hierarchical) 네트워크 등을 포함하는 네트워크 토폴로지 중 임의의 하나 이상을 포함할 수 있으나, 이에 제한되지 않는다.The communication method is not limited, and not only a communication method using a communication network (eg, a mobile communication network, a wired Internet, a wireless Internet, a broadcasting network) that the network 170 may include, but also short-range wireless communication between devices may be included. For example, the network 170 may include a personal area network (PAN), a local area network (LAN), a campus area network (CAN), a metropolitan area network (MAN), a wide area network (WAN), and a broadband network (BBN). , the Internet, and the like. In addition, the network 170 may include any one or more of a network topology including a bus network, a star network, a ring network, a mesh network, a star-bus network, a tree, or a hierarchical network, etc. not limited
서버(150, 160) 각각은 복수의 전자 기기들(110, 120, 130, 140)과 네트워크(170)를 통해 통신하여 명령, 코드, 파일, 컨텐츠, 서비스 등을 제공하는 컴퓨터 장치 또는 복수의 컴퓨터 장치들로 구현될 수 있다. 예를 들어, 서버(150)는 네트워크(170)를 통해 접속한 복수의 전자 기기들(110, 120, 130, 140)로 서비스(일례로, 컨텐츠 제공 서비스, 그룹 통화 서비스(또는 음성 컨퍼런스 서비스), 메시징 서비스, 메일 서비스, 소셜 네트워크 서비스, 지도 서비스, 번역 서비스, 금융 서비스, 결제 서비스, 검색 서비스 등)를 제공하는 시스템일 수 있다.Each of the servers 150 and 160 communicates with the plurality of electronic devices 110 , 120 , 130 , 140 and the network 170 through a computer device or a plurality of computers providing commands, codes, files, contents, services, etc. It can be implemented in devices. For example, the server 150 provides a service (eg, a content providing service, a group call service (or a voice conference service) to the plurality of electronic devices 110 , 120 , 130 , and 140 connected through the network 170 ). , a messaging service, a mail service, a social network service, a map service, a translation service, a financial service, a payment service, a search service, etc.).
도 2는 본 발명의 일실시예에 따른 컴퓨터 장치의 예를 도시한 블록도이다. 앞서 설명한 복수의 전자 기기들(110, 120, 130, 140) 각각이나 서버들(150, 160) 각각은 도 2를 통해 도시된 컴퓨터 장치(200)에 의해 구현될 수 있다.2 is a block diagram illustrating an example of a computer device according to an embodiment of the present invention. Each of the plurality of electronic devices 110 , 120 , 130 , 140 or the servers 150 and 160 described above may be implemented by the computer device 200 illustrated in FIG. 2 .
이러한 컴퓨터 장치(200)는 도 2에 도시된 바와 같이, 메모리(210), 프로세서(220), 통신 인터페이스(230) 그리고 입출력 인터페이스(240)를 포함할 수 있다. 메모리(210)는 컴퓨터에서 판독 가능한 기록매체로서, RAM(random access memory), ROM(read only memory) 및 디스크 드라이브와 같은 비소멸성 대용량 기록장치(permanent mass storage device)를 포함할 수 있다. 여기서 ROM과 디스크 드라이브와 같은 비소멸성 대용량 기록장치는 메모리(210)와는 구분되는 별도의 영구 저장 장치로서 컴퓨터 장치(200)에 포함될 수도 있다. 또한, 메모리(210)에는 운영체제와 적어도 하나의 프로그램 코드가 저장될 수 있다. 이러한 소프트웨어 구성요소들은 메모리(210)와는 별도의 컴퓨터에서 판독 가능한 기록매체로부터 메모리(210)로 로딩될 수 있다. 이러한 별도의 컴퓨터에서 판독 가능한 기록매체는 플로피 드라이브, 디스크, 테이프, DVD/CD-ROM 드라이브, 메모리 카드 등의 컴퓨터에서 판독 가능한 기록매체를 포함할 수 있다. 다른 실시예에서 소프트웨어 구성요소들은 컴퓨터에서 판독 가능한 기록매체가 아닌 통신 인터페이스(230)를 통해 메모리(210)에 로딩될 수도 있다. 예를 들어, 소프트웨어 구성요소들은 네트워크(170)를 통해 수신되는 파일들에 의해 설치되는 컴퓨터 프로그램에 기반하여 컴퓨터 장치(200)의 메모리(210)에 로딩될 수 있다.As shown in FIG. 2 , the computer device 200 may include a memory 210 , a processor 220 , a communication interface 230 , and an input/output interface 240 . The memory 210 is a computer-readable recording medium and may include a random access memory (RAM), a read only memory (ROM), and a permanent mass storage device such as a disk drive. Here, a non-volatile mass storage device such as a ROM and a disk drive may be included in the computer device 200 as a separate permanent storage device distinct from the memory 210 . Also, the memory 210 may store an operating system and at least one program code. These software components may be loaded into the memory 210 from a computer-readable recording medium separate from the memory 210 . The separate computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, a disk, a tape, a DVD/CD-ROM drive, and a memory card. In another embodiment, the software components may be loaded into the memory 210 through the communication interface 230 instead of a computer-readable recording medium. For example, the software components may be loaded into the memory 210 of the computer device 200 based on a computer program installed by files received through the network 170 .
프로세서(220)는 기본적인 산술, 로직 및 입출력 연산을 수행함으로써, 컴퓨터 프로그램의 명령을 처리하도록 구성될 수 있다. 명령은 메모리(210) 또는 통신 인터페이스(230)에 의해 프로세서(220)로 제공될 수 있다. 예를 들어 프로세서(220)는 메모리(210)와 같은 기록 장치에 저장된 프로그램 코드에 따라 수신되는 명령을 실행하도록 구성될 수 있다.The processor 220 may be configured to process instructions of a computer program by performing basic arithmetic, logic, and input/output operations. The instructions may be provided to the processor 220 by the memory 210 or the communication interface 230 . For example, the processor 220 may be configured to execute a received instruction according to a program code stored in a recording device such as the memory 210 .
통신 인터페이스(230)은 네트워크(170)를 통해 컴퓨터 장치(200)가 다른 장치(일례로, 앞서 설명한 저장 장치들)와 서로 통신하기 위한 기능을 제공할 수 있다. 일례로, 컴퓨터 장치(200)의 프로세서(220)가 메모리(210)와 같은 기록 장치에 저장된 프로그램 코드에 따라 생성한 요청이나 명령, 데이터, 파일 등이 통신 인터페이스(230)의 제어에 따라 네트워크(170)를 통해 다른 장치들로 전달될 수 있다. 역으로, 다른 장치로부터의 신호나 명령, 데이터, 파일 등이 네트워크(170)를 거쳐 컴퓨터 장치(200)의 통신 인터페이스(230)를 통해 컴퓨터 장치(200)로 수신될 수 있다. 통신 인터페이스(230)를 통해 수신된 신호나 명령, 데이터 등은 프로세서(220)나 메모리(210)로 전달될 수 있고, 파일 등은 컴퓨터 장치(200)가 더 포함할 수 있는 저장 매체(상술한 영구 저장 장치)로 저장될 수 있다.The communication interface 230 may provide a function for the computer device 200 to communicate with other devices (eg, the storage devices described above) through the network 170 . For example, a request, command, data, file, etc. generated by the processor 220 of the computer device 200 according to a program code stored in a recording device such as the memory 210 is transmitted to the network ( 170) to other devices. Conversely, signals, commands, data, files, etc. from other devices may be received by the computer device 200 through the communication interface 230 of the computer device 200 via the network 170 . A signal, command, or data received through the communication interface 230 may be transmitted to the processor 220 or the memory 210 , and the file may be a storage medium (described above) that the computer device 200 may further include. persistent storage).
입출력 인터페이스(240)는 입출력 장치(250)와의 인터페이스를 위한 수단일 수 있다. 예를 들어, 입력 장치는 마이크, 키보드 또는 마우스 등의 장치를, 그리고 출력 장치는 디스플레이, 스피커와 같은 장치를 포함할 수 있다. 다른 예로 입출력 인터페이스(240)는 터치스크린과 같이 입력과 출력을 위한 기능이 하나로 통합된 장치와의 인터페이스를 위한 수단일 수도 있다. 입출력 장치(250)는 컴퓨터 장치(200)와 하나의 장치로 구성될 수도 있다.The input/output interface 240 may be a means for an interface with the input/output device 250 . For example, the input device may include a device such as a microphone, keyboard, or mouse, and the output device may include a device such as a display or a speaker. As another example, the input/output interface 240 may be a means for an interface with a device in which functions for input and output are integrated into one, such as a touch screen. The input/output device 250 may be configured as one device with the computer device 200 .
또한, 다른 실시예들에서 컴퓨터 장치(200)는 도 2의 구성요소들보다 더 적은 혹은 더 많은 구성요소들을 포함할 수도 있다. 그러나, 대부분의 종래기술적 구성요소들을 명확하게 도시할 필요성은 없다. 예를 들어, 컴퓨터 장치(200)는 상술한 입출력 장치(250) 중 적어도 일부를 포함하도록 구현되거나 또는 트랜시버(transceiver), 데이터베이스 등과 같은 다른 구성요소들을 더 포함할 수도 있다.Also, in other embodiments, the computer device 200 may include fewer or more components than those of FIG. 2 . However, there is no need to clearly show most of the prior art components. For example, the computer device 200 may be implemented to include at least a portion of the above-described input/output device 250 or may further include other components such as a transceiver and a database.
본 발명의 실시예들은 텍스트 레이아웃에서 로컬 곡률을 추론하고 예측을 자체 필터링(self-filter, 또는 자체 개선(self-improve))하여 전체 문서 곡률을 추정할 수 있다. 이를 통해 텍스트가 곡선 페이지에 있거나 독특한(unconventional) 레이아웃으로 배치된 경우에도 텍스트의 순서를 결정할 수 있다.Embodiments of the present invention can estimate the overall document curvature by inferring local curvature in text layout and self-filtering (or self-improving) the prediction. This allows you to determine the order of the text even if it is on a curved page or placed in an unconventional layout.
또한, 본 발명의 실시예들은 데이터 기반이 아니므로 언어 구조, 컨텍스트 및 레이아웃을 위해 특별히 많은 데이터를 필요로 하지 않기 때문에, 리소스가 제한된 환경에서도 구현하기가 훨씬 간단하고 지연 시간을 크게 줄이도록 최적화할 수 있다.In addition, since embodiments of the present invention are not data-driven and therefore do not require particularly much data for language structure, context and layout, they are much simpler to implement even in resource-constrained environments and can be optimized to significantly reduce latency. can
도 3은 본 발명의 일실시예에 따른 문자열 검출 방법의 예를 도시한 흐름도이다. 본 실시예에 따른 문자열 검출 방법은 컴퓨터 장치(200)에 의해 수행될 수 있다. 이때, 컴퓨터 장치(200)의 프로세서(220)는 메모리(210)가 포함하는 운영체제의 코드나 적어도 하나의 컴퓨터 프로그램의 코드에 따른 제어 명령(instruction)을 실행하도록 구현될 수 있다. 여기서, 프로세서(220)는 컴퓨터 장치(200)에 저장된 코드가 제공하는 제어 명령에 따라 컴퓨터 장치(200)가 도 3의 방법이 포함하는 단계들(310 내지 340)을 수행하도록 컴퓨터 장치(200)를 제어할 수 있다.3 is a flowchart illustrating an example of a method for detecting a character string according to an embodiment of the present invention. The character string detection method according to the present embodiment may be performed by the computer device 200 . In this case, the processor 220 of the computer device 200 may be implemented to execute a control instruction according to a code of an operating system included in the memory 210 or a code of at least one computer program. Here, the processor 220 causes the computer device 200 to perform steps 310 to 340 included in the method of FIG. 3 according to a control command provided by a code stored in the computer device 200 . can control
단계(310)에서 컴퓨터 장치(200)는 이미지를 입력받을 수 있다. 여기서 이미지는 OCR(Optical Character Reader)을 이용하여 인식하고자 하는 적어도 하나의 텍스트를 포함할 수 있다. 이러한 이미지는 일례로, 컴퓨터 장치(200)가 카메라를 포함하는 단말 기기인 경우, 컴퓨터 장치(200)의 카메라를 통해 입력될 수 있다. 다른 예로, 컴퓨터 장치(200)는 카메라를 포함하는 단말 기기에서 카메라를 통해 입력된 이미지를 네트워크(170)를 통해 수신할 수도 있다.In operation 310, the computer device 200 may receive an image. Here, the image may include at least one text to be recognized using an optical character reader (OCR). Such an image may be input through the camera of the computer device 200, for example, when the computer device 200 is a terminal device including a camera. As another example, the computer device 200 may receive an image input through a camera in a terminal device including a camera through the network 170 .
단계(320)에서 컴퓨터 장치(200)는 입력된 이미지가 포함하는 텍스트에 OCR 박스를 설정할 수 있다. 예를 들어, 컴퓨터 장치(200)는 이미지에서 인식되는 단어마다 OCR 박스를 부여할 수 있다. 이때 OCR 박스가 설정된 단위로서의 "단어"는 사전적인 의미로서의 단어와 달리 거리에 의해 구분되는 텍스트들의 그룹으로 이해될 수 있다. 예를 들어, 입력된 이미지가 "ABCD EFG"와 같은 문자열을 포함하고 있는 경우, "ABCD"가 하나의 단어로서 인식되어 OCR 박스가 부여될 수 있으며, "EFG"가 하나의 단어로서 인식되어 OCR 박스가 부여될 수 있다. 다시 말해, 텍스트의 의미와 무관하게 서로 연결되어 있는 텍스트들의 묶음이 하나의 단어로 인식될 수 있으며, 서로 이격되어 있는 묶음들이 각각 서로 다른 단어들로 인식될 수 있다. 또한, 컴퓨터 장치(200)는 OCR 박스들을 정방향으로 회전시킬 수 있다. OCR 박스의 회전에 대해서는 이후 도 4 내지 도 6을 통해 더욱 자세히 설명한다.In operation 320, the computer device 200 may set the OCR box to the text included in the input image. For example, the computer device 200 may assign an OCR box to each word recognized in the image. In this case, a "word" as a unit in which the OCR box is set may be understood as a group of texts separated by a distance, unlike a word as a dictionary meaning. For example, if the input image includes a character string such as “ABCD EFG”, “ABCD” may be recognized as a single word and an OCR box may be assigned, and “EFG” may be recognized as a single word and OCR A box may be given. In other words, a bundle of texts connected to each other may be recognized as a single word regardless of the meaning of the text, and bundles spaced apart from each other may be recognized as different words. Also, the computer device 200 may rotate the OCR boxes in a forward direction. The rotation of the OCR box will be described in more detail later with reference to FIGS. 4 to 6 .
단계(330)에서 컴퓨터 장치(200)는 이미지가 포함하는 텍스트에 대한 OCR 박스의 경계점을 클러스터링을 위한 제어점으로 샘플링할 수 있다. OCR 박스의 경계점에 대해서는 이후 도 7을 통해 더욱 자세히 설명한다.In operation 330 , the computer device 200 may sample a boundary point of an OCR box for text included in an image as a control point for clustering. The boundary point of the OCR box will be described in more detail later with reference to FIG. 7 .
단계(340)에서 컴퓨터 장치(200)는 샘플링된 제어점을 이용하여 OCR 박스를 클러스터링할 수 있다. 예를 들어, 컴퓨터 장치(200)는 클러스터링 알고리즘을 이용하여 샘플링된 제어점을 클러스터링함으로써, OCR 박스를 그룹별로 클러스터링할 수 있다. 클러스터링된 OCR 박스들은 이후 설명될 회귀를 통한 텍스트 라인 탐지의 과정(이하, TLDR(Text Line Detection through Regression) 과정)에서 개별적으로 처리될 수 있다.In operation 340 , the computer device 200 may cluster the OCR box using the sampled control points. For example, the computer device 200 may cluster the OCR boxes for each group by clustering the sampled control points using a clustering algorithm. The clustered OCR boxes may be individually processed in a process of text line detection through regression (hereinafter, a text line detection through regression (TLDR) process) to be described later.
단계(350)에서 컴퓨터 장치(200)는 동일한 그룹에 포함된 각 OCR 박스의 궤적을 계산할 수 있다. 이때, 컴퓨터 장치(200)는 각 OCR 박스의 코너 포인트에 기반하여 OCR 박스의 궤적인 주축 벡터(major axis vector)를 계산할 수 있다. 보다 구체적으로, 컴퓨터 장치(200)는 각 OCR 박스에 대한 사분위수(쿼드)를 사용하여 선형 벡터로서 주축 벡터를 계산할 수 있다. OCR 박스로 경계 다각형을 사용하는 경우, 컴퓨터 장치(200)는 중심선 및/또는 중심선에 대응하는 n차 다항식을 이용하여 각 OCR 박스의 궤적을 계산할 수 있다.In operation 350, the computer device 200 may calculate the trajectory of each OCR box included in the same group. In this case, the computer device 200 may calculate a major axis vector that is a trajectory of the OCR box based on the corner points of each OCR box. More specifically, the computer device 200 may calculate the principal axis vector as a linear vector using quartiles (quads) for each OCR box. When a boundary polygon is used as the OCR box, the computer device 200 may calculate the trajectory of each OCR box using a centerline and/or an nth-order polynomial corresponding to the centerline.
단계(360)에서 컴퓨터 장치(200)는 각 OCR 박스의 궤적을 추적하여 기설정된 기준에 따라 텍스트 라인을 형성할 수 있다. 예를 들어, 컴퓨터 장치(200)는 각 OCR 박스에 대해 다른 박스가 발견될 때까지 각 OCR 박스의 주요 길이에 비례하는 거리 내에서 궤적을 추적할 수 있다. 기설정된 기준은 제1 방향으로 이어지는 제1 박스의 궤적이 제2 박스(또는 제2 박스의 궤적)의 제2 방향 끝부분과 마주치거나, 또는 제1 방향의 반대 방향인 제2 방향으로 이어지는 제1 박스의 궤적이 제2 방향에서 제3 박스(또는 제3 박스의 궤적)의 제1 방향의 끝부분과 마주치는 유효한 조우(valid encounter)가 발생하는 기준을 포함할 수 있다.In operation 360, the computer device 200 may form a text line according to a preset criterion by tracking the trajectory of each OCR box. For example, the computer device 200 may track the trajectory within a distance proportional to the major length of each OCR box until another box is found for each OCR box. The preset criterion is that the trajectory of the first box that runs in the first direction meets the end of the second box (or the trajectory of the second box) in the second direction, or runs in a second direction opposite to the first direction. The trajectory of the first box may include a criterion in which a valid encounter occurs in which the trajectory of the first box meets the end of the third box (or the trajectory of the third box) in the first direction in the second direction.
다시 말해, "유효한 조우"가 발생하는 기준은 제1 박스의 왼쪽 또는 오른쪽으로 이어지는 궤적이 다른 박스(제2 박스 또는 제3 박스) 또는 다른 박스의 궤적의 가장 오른쪽(또는 왼쪽)과 마주쳐야 한다는 것일 수 있다. 보다 구체적인 예로, 제1 OCR 박스와 제1 OCR 박스의 왼쪽에 위치하는 제2 OCR 박스, 그리고 제1 OCR 박스의 오른쪽에 위치하는 제3 OCR 박스에 대해 아래 (1) 및 (2) 중 어느 하나의 조건이 만족되는 경우, 유효한 조우가 발생하는 것으로 결정될 수 있다.In other words, the criterion for a "valid encounter" to occur is that the trajectory leading to the left or right of the first box must encounter another box (the second or third box) or the rightmost (or left) of the trajectory of the other box. can As a more specific example, any one of (1) and (2) below for the first OCR box, the second OCR box located to the left of the first OCR box, and the third OCR box located to the right of the first OCR box When the condition of is satisfied, it may be determined that a valid encounter occurs.
(1) 제1 OCR 박스의 궤적에 대해 왼쪽으로 이어지는 궤적이, 제1 OCR 박스의 주요 길이에 비례하는 거래 내에서, 제1 OCR 박스의 왼쪽에 위치한 제2 OCR 박스(또는 제2 OCR 박스의 궤적)의 오른쪽 끝부분과 마주침.(1) A trajectory leading to the left with respect to the trajectory of the first OCR box is, within a transaction proportional to the main length of the first OCR box, a second OCR box located to the left of the first OCR box (or the right end of the trajectory).
(2) 제1 OCR 박스의 궤적에 대해 오른쪽으로 이어지는 궤적이, 제1 OCR 박스의 주요 길이에 비례하는 거래 내에서, 제1 OCR 박스의 오른쪽에 위치한 제3 OCR 박스(또는 제3 OCR 박스의 궤적)의 왼쪽 끝부분과 마주침.(2) a third OCR box located to the right of the first OCR box (or the third OCR box in a transaction where the trajectory that runs to the right with respect to the trajectory of the first OCR box is proportional to the main length of the first OCR box) trajectory) at the left end.
일례로, 컴퓨터 장치(200)는 제1 박스에 대해 제2 박스(또는 제2 박스의 궤적) 또는 제3 박스(또는 제3 박스의 궤적)가 발견될 때까지, 제1 박스의 길이에 비례하는 거리 내에서 제1 박스의 궤적을 추적할 수 있다. 이때, 컴퓨터 장치(200)는 제1 박스의 궤적과 제2 박스(또는 제2 박스의 궤적), 또는 제1 박스의 궤적과 제3 박스(또는 제3 박스의 궤적)간에 유효한 조우가 발생함에 응답하여 텍스트 라인을 형성할 수 있다.In one example, the computer device 200 is proportional to the length of the first box until a second box (or trajectory of the second box) or a third box (or trajectory of the third box) is found for the first box. It is possible to track the trajectory of the first box within the distance. At this time, the computer device 200 generates an effective encounter between the trajectory of the first box and the second box (or the trajectory of the second box), or the trajectory of the first box and the third box (or the trajectory of the third box). Can form lines of text in response.
예를 들어, 제1 OCR 박스의 궤적에 대해 왼쪽 또는 오른쪽에서 다른 OCR 박스(제2 OCR 박스 또는 제3 OCR 박스)와 유효한 조우가 발생하였다 가정한다. 이때, 유효한 조우가 발생한 두 OCR 박스들(제1 OCR 박스 및 제2 OCR 박스 또는 제1 OCR 박스 및 제3 OCR 박스) 각각이 텍스트 라인과 연결되어 있지 않은 경우, 두 OCR 박스들의 궤적들에 의해 새로운 텍스트 라인이 형성될 수 있다. 다시 말해, 컴퓨터 장치(200)는 제1 박스의 궤적과 제2 박스(또는 제3 박스)간에 유효한 조우가 발생하고, 이때 제1 박스와 제2 박스(또는 제3 박스) 각각이 특정 텍스트 라인에 연결되어 있지 않은 경우, 제1 박스 및 제2 박스(또는 상기 제3 박스)를 위한 새로운 텍스트 라인을 형성할 수 있다.For example, it is assumed that a valid encounter with another OCR box (second OCR box or third OCR box) occurs on the left or right for the trajectory of the first OCR box. At this time, when each of the two OCR boxes (the first OCR box and the second OCR box or the first OCR box and the third OCR box) in which a valid encounter has occurred is not connected to a text line, the trajectories of the two OCR boxes A new line of text may be formed. In other words, the computer device 200 generates a valid encounter between the trajectory of the first box and the second box (or the third box), wherein each of the first box and the second box (or the third box) is a specific text line. If not connected to , a new text line for the first box and the second box (or the third box) can be formed.
또한, 두 OCR 박스들 중 하나의 OCR 박스(일례로, 제1 OCR 박스)만 특정 텍스트 라인(일례로, 제1 텍스트 라인)과 연결되어 있는 경우에는 다른 하나의 OCR 박스(일례로, 제2 OCR 박스 또는 제3 OCR 박스)가 해당 텍스트 라인(제1 OCR 박스)에 연결될 수 있다. 예를 들어, 컴퓨터 장치(200)는 제1 박스의 궤적과 제2 박스(또는 제3 박스)간에 유효한 조우가 발생하고, 제1 박스 및 제2 박스(또는 제3 박스) 중 어느 하나가 특정 텍스트 라인에 연결되어 있는 경우, 다른 하나를 특정 텍스트 라인에 연결할 수 있다.In addition, when only one OCR box (eg, the first OCR box) of the two OCR boxes is connected to a specific text line (eg, the first text line), the other OCR box (eg, the second OCR box) The OCR box or the third OCR box) may be connected to the corresponding text line (the first OCR box). For example, in the computer device 200, a valid encounter occurs between the trajectory of the first box and the second box (or the third box), and any one of the first box and the second box (or the third box) is specified If it is linked to a line of text, you can link the other to a specific line of text.
마지막으로, 두 OCR 박스들이 각각 서로 다른 텍스트 라인(일례로, 제2 텍스트 라인 및 제3 텍스트 라인)에 연결되어 있다면, 서로 다른 텍스트 라인들이 합쳐져서 하나의 텍스트 라인이 형성될 수 있다. 예를 들어, 컴퓨터 장치(200)는 제1 박스의 궤적과 제2 박스(또는 제3 박스)간에 유효한 조우가 발생하고, 제1 박스 및 제2 박스(또는 상기 제3 박스)가 각각 서로 다른 텍스트 라인에 연결되어 있는 경우, 서로 다른 텍스트 라인을 결합하여 하나의 텍스트 라인을 형성할 수 있다.Finally, if the two OCR boxes are respectively connected to different text lines (eg, the second text line and the third text line), the different text lines may be combined to form one text line. For example, in the computer device 200, an effective encounter occurs between the trajectory of the first box and the second box (or the third box), and the first box and the second box (or the third box) are different from each other. When connected to text lines, different text lines can be combined to form one text line.
단계(370)에서 컴퓨터 장치(200)는 텍스트 라인 각각을 통해 n차원 다항식의 회귀 분석을 처리할 수 있다. 회귀 분석에 사용되는 점은 OCR 박스의 경계 또는 경계점에서 파생된 주축 중간점에서 얻을 수 있다. 일례로, 컴퓨터 장치(200)는 OCR 박스마다 왼쪽 중간점, 오른쪽 중간점 및 OCR 박스의 중심점의 3개의 포인트를 사용하여 회귀 분석을 처리할 수 있다. 이때, OCR 박스들은 하나의 텍스트 라인에 대응하는 박스들일 수 있다. 또한, OCR 박스 1개만 포함하는 텍스트 라인은 텍스트 라인의 일부가 아닌 OCR 박스로부터 만들어지며 이러한 텍스트 라인의 다항식은 선형(1차원)으로 간주될 수 있다.In operation 370, the computer device 200 may process the regression analysis of the n-dimensional polynomial through each text line. The points used in the regression analysis can be obtained from the boundary of the OCR box or the midpoint of the principal axis derived from the boundary point. As an example, the computer device 200 may process a regression analysis using three points for each OCR box: a left midpoint, a right midpoint, and a midpoint of the OCR box. In this case, the OCR boxes may be boxes corresponding to one text line. Also, a text line containing only one OCR box is made from an OCR box that is not part of the text line, and the polynomial of this text line can be considered linear (one-dimensional).
이때, 다항식으로 매개 변수화된 가장 긴 텍스트 라인의 절반보다 긴 텍스트 라인은 신뢰 텍스트 라인으로 간주되고, 나머지 텍스트 라인은 비신뢰 텍스트 라인으로 간주될 수 있다. 컴퓨터 장치(200)는 텍스트 라인의 고차 계수를 신뢰 텍스트 라인에 대한 다항식의 고차 계수의 가중 평균을 통해 필터링할 수 있다. 신뢰 텍스트 라인에 대한 다항식은 먼저 신뢰 텍스트 라인들 사이에서 필터링될 수 있고, 그 후 비신뢰 텍스트 라인에 대한 다항식이 필터링된 신뢰 텍스트 라인에 대한 다항식에 의해 필터링될 수 있다. 여기서, 가중치는 (텍스트 라인에 대한 다항식의 길이)/(다항식들의 중심들 사이의 거리)에 비례하도록 정의될 수 있다. 2차 다항식에 대한 회귀 분석을 사용하는 경우에는 2차 계수를 필터링할 수 있으나, 더 높은 n차 다항식에 대한 회귀 분석을 사용할 경우 n차 계수가 필터링되거나 또는 2 ~ n 사이의 계수의 일부분이 동시에 필터링될 수 있다.In this case, a text line longer than half of the longest text line parameterized by the polynomial may be regarded as a trusted text line, and the remaining text lines may be regarded as an untrusted text line. The computer device 200 may filter the higher-order coefficients of the text line through a weighted average of the higher-order coefficients of the polynomial for the trusted text line. The polynomial for the trusted text line may first be filtered between the trusted text lines, and then the polynomial for the untrusted text line may be filtered by the filtered polynomial for the filtered trusted text line. Here, the weight may be defined to be proportional to (length of polynomial relative to text line)/(distance between centers of polynomials). When using regression on a quadratic polynomial, you can filter out quadratic coefficients, but when using regression on a higher nth polynomial, the nth coefficients are filtered out, or some of the coefficients between 2 and n are simultaneously can be filtered.
필터링된 다항식은 이제 "업데이트된" 궤적으로 간주되며 컴퓨터 장치(200)는 앞서 설명한 단계(360)과 같이 업데이트된 궤적을 추적할 수 있다. 다음 거리는 다항식의 길이에 비례하거나 이미지의 경계까지일 수 있다. 다시 말해, 컴퓨터 장치(200)는 이미지 끝에 도달할 때까지 다른 OCR 박스 또는 다른 OCR 박스의 텍스트 라인이 발견되는 경우마다 단계(360) 및 단계(370)을 반복하면서 궤적을 추적 및 업데이트할 수 있다.The filtered polynomial is now considered an “updated” trajectory and the computer device 200 may trace the updated trajectory as described above in step 360 . The next distance can be proportional to the length of the polynomial or up to the boundary of the image. In other words, the computer device 200 may track and update the trajectory, repeating steps 360 and 370 whenever another OCR box or a line of text in another OCR box is found, until the end of the image is reached. .
단계(380)에서 컴퓨터 장치(200)는 최종적으로 추적 및 업데이트된 궤적을 입력된 이미지에 대한 텍스트 라인의 감지 결과로서 제공할 수 있다. 이러한 텍스트 라인의 감지 결과에 기반하여 이미지 내에서의 단어들에 의해 형성된 선이나 문장의 곡률을 고려하여 OCR 단어 결과를 순서대로 읽을 수 있게 된다.In operation 380, the computer device 200 may provide the finally tracked and updated trajectory as a result of detecting a text line with respect to the input image. Based on the detection result of these text lines, the OCR word results can be read sequentially in consideration of the curvature of lines or sentences formed by words in the image.
도 4 내지 도 6은 본 발명의 일실시예에 있어서, OCR 박스의 회전의 예를 도시한 도면들이다. 도 4는 기울어진 텍스트들을 포함하는 이미지(400)의 예를 나타내고 있다. 도 5는 텍스트들에 OCR 박스를 설정한 예를 나타내고 있으며, 도 6은 OCR 박스들을 정방향으로 회전시킨 예를 나타내고 있다. 이때, 도 5에 나타난 바와 같이, 각 OCR 박스들이 회전되는 것이 아니라, OCR 박스들을 포함하는 영역 전체를 회전시켜 OCR 박스들을 정방향으로 회전시킬 수 있다.4 to 6 are views showing an example of rotation of the OCR box in an embodiment of the present invention. 4 shows an example of an image 400 including slanted text. 5 shows an example of setting the OCR box to texts, and FIG. 6 shows an example of rotating the OCR boxes in the forward direction. At this time, as shown in FIG. 5 , the OCR boxes may be rotated in the forward direction by rotating the entire region including the OCR boxes, rather than rotating the respective OCR boxes.
도 7은 본 발명의 일실시예에 있어서, OCR 박스의 경계점의 예를 도시한 도면이다. 일례로, 박스(700)의 네 개의 꼭지점(711 내지 714)이 경계점으로 활용될 수 있다. 실시예에 따라 박스(700)의 중심점(720), 박스(700)의 왼쪽 중간점(730) 및/또는 박스(700)의 오른쪽 중간점(740)이 경계점으로 더 활용될 수도 있다. 실시예에 따라 박스(700)의 경계선에서 얻어지는 다른 점들이 경계점으로 더 활용될 수도 있다. 또한, 실시예에 따라 박스(700)의 중심점(720), 박스(700)의 왼쪽 중간점(730) 및 박스(700)의 오른쪽 중간점(740)을 연결하는 주축 상의 점들이 경계점으로 더 활용될 수도 있다. 이때, 박스(700)의 길이는 주축의 길이(또는 꼭지점(711)과 꼭지점(712)을 연결하는 선의 길이나 꼭지점(713)과 꼭지점(714)을 연결하는 선의 길이)로 얻어질 수 있다.7 is a diagram illustrating an example of a boundary point of an OCR box according to an embodiment of the present invention. For example, four vertices 711 to 714 of the box 700 may be used as boundary points. According to an embodiment, the center point 720 of the box 700 , the left midpoint 730 of the box 700 , and/or the right midpoint 740 of the box 700 may be further used as boundary points. According to an embodiment, other points obtained from the boundary line of the box 700 may be further used as boundary points. In addition, according to the embodiment, points on the main axis connecting the center point 720 of the box 700, the left midpoint 730 of the box 700, and the right midpoint 740 of the box 700 are further utilized as boundary points. it might be At this time, the length of the box 700 may be obtained as the length of the main axis (or the length of the line connecting the vertex 711 and the vertex 712 or the length of the line connecting the vertex 713 and the vertex 714).
도 8 내지 도 11은 본 발명의 일실시예에 있어서, 곡률이 포함된 객체의 텍스트를 인식하는 예를 도시한 도면들이다. 도 8은 곡률이 포함된 객체의 텍스트가 객체의 곡률에 따라 나열된 이미지(800)를 나타내고 있다. 이때, 컴퓨터 장치(200)는 도 9에 나타난 바와 같이, 이미지에서 인식되는 단어 각각에 대해 OCR 박스를 설정할 수 있다. 또한, 컴퓨터 장치(200)는 OCR 박스 각각에 대한 궤적을 계산할 수 있다. 도 10에서는 도 9의 박스들 중 세 개의 박스들(1010, 1020 및 1030)을 확대하여 표시한 예를 나타내고 있다. 또한, 도 10에서는 박스(1020)의 궤적이 왼쪽에서 박스(1010)의 오른쪽 끝부분과 만나고, 오른쪽에서 박스(1030)의 왼쪽 끝부분과 만나는 예를 나타내고 있다. 다시 말해, 박스(1020)의 궤적에 대해 "유효한 조우"가 발생하였음을 알 수 있다. 이때, 세 개의 박스들(1010, 1020 및 1030)이 모두 특정한 텍스트 라인에 연결되어 있지 않기 때문에, 세 개의 박스들(1010, 1020 및 1030)을 위한 새로운 텍스트 라인이 형성될 수 있다. 일례로, 세 개의 박스들(1010, 1020 및 1030) 각각을 위한 궤적들이 합쳐져 하나의 새로운 텍스트 라인이 될 수 있다. 다른 실시예에서 궤적(1040)이 텍스트 라인이라 가정하면, 박스(1020)에 대해 유효한 조회가 발생한 박스(1010)과 박스(1030)가 궤적(1040)이 나타내는 텍스트 라인에 연결될 수 있음을 쉽게 이해할 수 있을 것이다.8 to 11 are diagrams illustrating examples of recognizing a text of an object including a curvature according to an embodiment of the present invention. 8 shows an image 800 in which text of an object including curvature is listed according to the curvature of the object. In this case, as shown in FIG. 9 , the computer device 200 may set an OCR box for each word recognized in the image. Also, the computer device 200 may calculate a trajectory for each OCR box. FIG. 10 shows an example in which three boxes 1010 , 1020 , and 1030 are enlarged and displayed among the boxes of FIG. 9 . Also, FIG. 10 shows an example in which the trajectory of the box 1020 meets the right end of the box 1010 on the left side and meets the left end of the box 1030 on the right side. In other words, it can be seen that a “valid encounter” has occurred for the trajectory of box 1020 . At this time, since all three boxes 1010 , 1020 , and 1030 are not connected to a specific text line, a new text line for the three boxes 1010 , 1020 and 1030 may be formed. For example, the trajectories for each of the three boxes 1010 , 1020 , and 1030 may be combined to form one new text line. Assuming that trajectory 1040 is a line of text in another embodiment, it will be readily understood that boxes 1010 and 1030 for which a valid query for box 1020 occurred may be connected to the line of text represented by trajectory 1040 . will be able
이때, 컴퓨터 장치(200)는 세 개의 박스들(1010, 1020 및 1030)이 연결된 텍스트 라인을 통해 n차원 다항식의 회귀 분석을 처리하여 얻어지는 다항식을 업데이트된 궤적으로 활용할 수 있다. 도 11은 이러한 업데이트된 궤적(1110)의 예를 나타내고 있다. 박스(1020)의 궤적(1040)의 추적은 박스(1020)의 길이에 비례하는 길이 내에서 이루어질 수 있다. 일례로, 궤적(1040)의 추적은 박스(1020)의 길이의 1/2의 길이 내에서 왼쪽과 오른쪽 각각에 대해 이루어질 수 있다.In this case, the computer device 200 may use the polynomial obtained by processing the regression analysis of the n-dimensional polynomial through the text line to which the three boxes 1010 , 1020 , and 1030 are connected as the updated trajectory. 11 shows an example of such an updated trajectory 1110 . The tracking of the trajectory 1040 of the box 1020 may be made within a length proportional to the length of the box 1020 . As an example, tracking of trajectory 1040 may be made for each of the left and right sides within a length of one-half the length of box 1020 .
도 12 및 도 13은 본 발명의 일실시예에 있어서, 궤적을 추적하는 예를 도시한 도면들이다. 객체의 곡률에 의한 왜곡이 심한 경우, 도 12의 박스들(1210 및 1220)과 같이 박스(1210)의 궤적이 박스(1220)와 만나지 못하는 경우도 존재한다. 이 경우, 박스(1210)의 궤적(1230)과 박스(1220)의 궤적(1240)간의 만남에 의해 "유효한 조우"가 발생할 수도 있다. 이 경우에는 도 12와 같이 두 궤적(1230 및 1240)의 조합에 의해 새로운 텍스트 라인이 형성될 수 있으며, 이러한 새로운 텍스트 라인을 통한 n차원 다항식의 회귀 분석을 처리하여 얻어지는 다항식을 업데이트된 궤적으로 활용할 수 있다. 도 13은 이러한 업데이트된 궤적(1310)의 예를 나타내고 있다. 12 and 13 are diagrams illustrating an example of tracking a trajectory according to an embodiment of the present invention. When the distortion due to the curvature of the object is severe, there is a case where the trajectory of the box 1210 does not meet the box 1220 as in the boxes 1210 and 1220 of FIG. 12 . In this case, a “valid encounter” may occur due to an encounter between the trajectory 1230 of the box 1210 and the trajectory 1240 of the box 1220 . In this case, a new text line may be formed by the combination of the two trajectories 1230 and 1240 as shown in FIG. 12 , and the polynomial obtained by processing the regression analysis of the n-dimensional polynomial through the new text line will be utilized as the updated trajectory. can 13 shows an example of such an updated trajectory 1310 .
이미 설명한 바와 같이 컴퓨터 장치(200)는 이미지 끝에 도달할 때까지 다른 OCR 박스 또는 다른 OCR 박스의 텍스트 라인이 발견되는 경우마다 이러한 궤적의 추적 및 업데이트를 반복할 수 있다.As already described, the computer device 200 may repeat tracking and updating of this trajectory whenever another OCR box or text line of another OCR box is found until the end of the image is reached.
도 14 및 도 15는 본 발명의 일실시예에 따른 문자열 검출 방법을 적용하여 도출된 텍스트 라인의 감지 결과의 예를 도시한 도면들이다. 도 14는 입력된 이미지의 예를 나타내고 있으며, 도 15는 텍스트 라인의 감지 결과를 나타내고 있다.14 and 15 are diagrams illustrating examples of detection results of text lines derived by applying a character string detection method according to an embodiment of the present invention. 14 shows an example of an input image, and FIG. 15 shows a detection result of a text line.
[규칙 제91조에 의한 정정 06.01.2022] 
도 16 내지 도 22는 본 발명의 일실시예에 따른 문자열 검출 방법을 통해 박스의 궤도를 추적 및 업데이트함에 따른 결과를 순차적으로 나타낸 도면들이다. 도 16의 이미지에서는 OCR 박스가 설정된 예를 나타내고 있다. 이때, 서로 다른 그룹의 OCR 박스들을 서로 다른 색의 박스로 구분하고 있다. 도 17 내지 도 22는 궤적의 추적 및 n 차원 다항식의 회귀 분석을 통한 궤적의 업데이트를 통해 텍스트 라인으로서의 곡선들이 객체(영수증)의 곡률에 따라 변경되어 가는 예를 나타내고 있다. 이미 설명한 바와 같이, 궤적의 추적 및 업데이트는 입력된 이미지의 끝에 도달할 때까지 다른 박스 또는 상기 다른 박스의 궤적이 발견되는 경우(유효한 조우)마다 반복 수행될 수 있다.
[Correction by Rule 91 06.01.2022]
16 to 22 are diagrams sequentially showing results of tracking and updating the trajectory of a box through a character string detection method according to an embodiment of the present invention. The image of FIG. 16 shows an example in which the OCR box is set. In this case, the OCR boxes of different groups are divided into boxes of different colors. 17 to 22 show examples in which curves as text lines are changed according to the curvature of an object (receipt) through tracking of the trajectory and updating of the trajectory through regression analysis of an n-dimensional polynomial. As already described, tracking and updating of the trajectory may be repeatedly performed whenever another box or a trajectory of the other box is found (valid encounter) until the end of the input image is reached.
이와 같이, 본 발명의 실시예들에 따르면, 이미지에서의 각 단어의 위치와 각도, 그리고 단어들에 의해 형성된 선이나 문장의 곡률을 고려하여 OCR 단어 결과를 순서대로 읽을 수 있다. 또한, 본 발명의 실시예들에 따르면, 텍스트 레이아웃에서 로컬 곡률을 추론하고 예측을 자체 필터링하여 전체 문서 곡률을 추정함으로써, 텍스트가 곡선 페이지에 있거나 독특한(unconventional) 레이아웃으로 배치된 경우에도 텍스트의 순서를 결정할 수 있다. 또한, 본 발명의 실시예들에 따르면, 데이터 기반이 아니므로 언어 구조, 컨텍스트 및 레이아웃을 위해 특별히 많은 데이터를 필요로 하지 않기 때문에, 리소스가 제한된 환경에서도 구현하기가 훨씬 간단하고 지연 시간을 크게 줄이도록 최적화할 수 있다.As such, according to embodiments of the present invention, the OCR word results can be sequentially read in consideration of the position and angle of each word in the image, and the curvature of a line or sentence formed by the words. Further, according to embodiments of the present invention, by inferring local curvature in text layout and self-filtering prediction to estimate overall document curvature, the order of text even when text is on a curved page or laid out in an unconventional layout can be decided In addition, according to embodiments of the present invention, since it is not data-based and does not require a lot of data in particular for language structure, context and layout, it is much simpler to implement even in a resource-constrained environment and greatly reduces latency. can be optimized to be
이상에서 설명된 시스템 또는 장치는 하드웨어 구성요소, 또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 어플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The system or apparatus described above may be implemented as a hardware component or a combination of a hardware component and a software component. For example, devices and components described in the embodiments may include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA). , a programmable logic unit (PLU), microprocessor, or any other device capable of executing and responding to instructions, may be implemented using one or more general purpose or special purpose computers. The processing device may execute an operating system (OS) and one or more software applications running on the operating system. The processing device may also access, store, manipulate, process, and generate data in response to execution of the software. For convenience of understanding, although one processing device is sometimes described as being used, one of ordinary skill in the art will recognize that the processing device includes a plurality of processing elements and/or a plurality of types of processing elements. It can be seen that may include For example, the processing device may include a plurality of processors or one processor and one controller. Other processing configurations are also possible, such as parallel processors.
소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록매체에 저장될 수 있다.The software may comprise a computer program, code, instructions, or a combination of one or more thereof, which configures a processing device to operate as desired or is independently or collectively processed You can command the device. The software and/or data may be any kind of machine, component, physical device, virtual equipment, computer storage medium or device, to be interpreted by or to provide instructions or data to the processing device. may be embodied in The software may be distributed over networked computer systems and stored or executed in a distributed manner. Software and data may be stored in one or more computer-readable recording media.
실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 매체는 컴퓨터로 실행 가능한 프로그램을 계속 저장하거나, 실행 또는 다운로드를 위해 임시 저장하는 것일 수도 있다. 또한, 매체는 단일 또는 수개 하드웨어가 결합된 형태의 다양한 기록수단 또는 저장수단일 수 있는데, 어떤 컴퓨터 시스템에 직접 접속되는 매체에 한정되지 않고, 네트워크 상에 분산 존재하는 것일 수도 있다. 매체의 예시로는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium), 및 ROM, RAM, 플래시 메모리 등을 포함하여 프로그램 명령어가 저장되도록 구성된 것이 있을 수 있다. 또한, 다른 매체의 예시로, 애플리케이션을 유통하는 앱 스토어나 기타 다양한 소프트웨어를 공급 내지 유통하는 사이트, 서버 등에서 관리하는 기록매체 내지 저장매체도 들 수 있다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다.The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded in a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, etc. alone or in combination. The medium may continuously store a computer executable program, or may be a temporary storage for execution or download. In addition, the medium may be various recording means or storage means in the form of a single or several hardware combined, it is not limited to a medium directly connected to any computer system, and may exist distributed on a network. Examples of the medium include a hard disk, a magnetic medium such as a floppy disk and a magnetic tape, an optical recording medium such as CD-ROM and DVD, a magneto-optical medium such as a floppy disk, and those configured to store program instructions, including ROM, RAM, flash memory, and the like. In addition, examples of other media may include recording media or storage media managed by an app store that distributes applications, sites that supply or distribute various other software, or servers. Examples of program instructions include not only machine language codes such as those generated by a compiler, but also high-level language codes that can be executed by a computer using an interpreter or the like.
이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.As described above, although the embodiments have been described with reference to the limited embodiments and drawings, various modifications and variations are possible by those skilled in the art from the above description. For example, the described techniques are performed in a different order than the described method, and/or the described components of the system, structure, apparatus, circuit, etc. are combined or combined in a different form than the described method, or other components Or substituted or substituted by equivalents may achieve an appropriate result.
그러므로, 다른 구현들, 다른 실시예들 및 청구범위와 균등한 것들도 후술하는 청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents to the claims are also within the scope of the following claims.

Claims (18)

  1. 적어도 하나의 프로세서를 포함하는 컴퓨터 장치의 문자열 검출 방법에 있어서,A method for detecting a character string in a computer device comprising at least one processor, the method comprising:
    상기 적어도 하나의 프로세서에 의해, 입력된 이미지가 포함하는 텍스트에 박스를 설정하는 단계;setting, by the at least one processor, a box in text included in the input image;
    상기 적어도 하나의 프로세서에 의해, 상기 박스를 그룹별로 클러스터링하는 단계;clustering, by the at least one processor, the boxes into groups;
    상기 적어도 하나의 프로세서에 의해, 동일한 그룹에 포함된 박스 각각에 대한 궤적을 계산하는 단계;calculating, by the at least one processor, a trajectory for each box included in the same group;
    상기 적어도 하나의 프로세서에 의해, 상기 박스 각각에 대한 궤적을 추적하여 기설정된 기준에 따라 텍스트 라인을 형성하는 단계; 및forming, by the at least one processor, a text line according to a preset criterion by tracing a trajectory for each of the boxes; and
    상기 적어도 하나의 프로세서에 의해, 상기 텍스트 라인 각각을 통해 다차원 다항식의 회귀 분석을 처리하는 단계processing, by the at least one processor, a regression analysis of a multidimensional polynomial over each of the lines of text;
    를 포함하는 문자열 검출 방법.A string detection method comprising
  2. 제1항에 있어서,According to claim 1,
    상기 기설정된 기준은, 제1 방향으로 이어지는 제1 박스의 궤적이 제2 박스(또는 제2 박스의 궤적)의 제2 방향 끝부분과 마주치거나, 또는 제1 방향의 반대 방향인 제2 방향으로 이어지는 제1 박스의 궤적이 제2 방향에서 제3 박스(또는 제3 박스의 궤적)의 제1 방향의 끝부분과 마주치는 유효한 조우(valid encounter)가 발생하는 기준을 포함하는 것을 특징으로 하는 문자열 검출 방법.The preset criterion is that the trajectory of the first box extending in the first direction meets the second direction end of the second box (or the trajectory of the second box), or a second direction opposite to the first direction. wherein the trajectory of the first box leading to includes a criterion in which a valid encounter occurs in which the trajectory of the first box meets the end of the third box (or the trajectory of the third box) in the first direction in the second direction String detection method.
  3. 제2항에 있어서,3. The method of claim 2,
    상기 텍스트 라인을 형성하는 단계는,Forming the text line comprises:
    상기 제1 박스에 대해 상기 제2 박스(또는 상기 제2 박스의 궤적) 또는 상기 제3 박스(또는 상기 제3 박스의 궤적)가 발견될 때까지, 상기 제1 박스의 길이에 비례하는 거리 내에서 상기 제1 박스의 궤적을 추적하는 단계; 및within a distance proportional to the length of the first box, until the second box (or the trajectory of the second box) or the third box (or the trajectory of the third box) is found for the first box tracking the trajectory of the first box; and
    상기 제1 박스의 궤적과 상기 제2 박스(또는 상기 제2 박스의 궤적), 또는 상기 제1 박스의 궤적과 상기 제3 박스(또는 상기 제3 박스의 궤적)간에 유효한 조우가 발생함에 응답하여 텍스트 라인을 형성하는 단계In response to a valid encounter occurring between the trajectory of the first box and the second box (or the trajectory of the second box), or between the trajectory of the first box and the third box (or the trajectory of the third box) Steps to form a line of text
    를 포함하는 것을 특징으로 하는 문자열 검출 방법.A string detection method comprising a.
  4. 제3항에 있어서,4. The method of claim 3,
    상기 유효한 조우가 발생함에 응답하여 텍스트 라인을 형성하는 단계는,forming a line of text in response to the occurrence of the valid encounter comprises:
    상기 제1 박스의 궤적과 상기 제2 박스(또는 상기 제3 박스)간에 상기 유효한 조우가 발생하고, 상기 제1 박스와 상기 제2 박스(또는 상기 제3 박스) 각각이 특정 텍스트 라인에 연결되어 있지 않은 경우, 상기 제1 박스 및 상기 제2 박스(또는 상기 제3 박스)를 위한 새로운 텍스트 라인을 형성하는 것을 특징으로 하는 문자열 검출 방법.The effective encounter occurs between the trajectory of the first box and the second box (or the third box), and each of the first box and the second box (or the third box) is connected to a specific text line. If not, a new text line for the first box and the second box (or the third box) is formed.
  5. 제3항에 있어서,4. The method of claim 3,
    상기 유효한 조우가 발생함에 응답하여 텍스트 라인을 형성하는 단계는,forming a line of text in response to the occurrence of the valid encounter comprises:
    상기 제1 박스의 궤적과 상기 제2 박스(또는 상기 제3 박스)간에 상기 유효한 조우가 발생하고, 상기 제1 박스 및 상기 제2 박스(또는 상기 제3 박스) 중 어느 하나가 특정 텍스트 라인에 연결되어 있는 경우, 다른 하나를 상기 특정 텍스트 라인에 연결하는 것을 특징으로 하는 문자열 검출 방법.The effective encounter occurs between the trajectory of the first box and the second box (or the third box), and any one of the first box and the second box (or the third box) is on a specific text line. When connected, the method for detecting a character string, characterized in that the other is connected to the specific text line.
  6. 제3항에 있어서,4. The method of claim 3,
    상기 유효한 조우가 발생함에 응답하여 텍스트 라인을 형성하는 단계는,forming a line of text in response to the occurrence of the valid encounter comprises:
    상기 제1 박스의 궤적과 상기 제2 박스(또는 상기 제3 박스)간에 상기 유효한 조우가 발생하고, 상기 제1 박스 및 상기 제2 박스(또는 상기 제3 박스)가 각각 서로 다른 텍스트 라인에 연결되어 있는 경우, 상기 서로 다른 텍스트 라인을 결합하여 하나의 텍스트 라인을 형성하는 것을 특징으로 하는 문자열 검출 방법.The effective encounter occurs between the trajectory of the first box and the second box (or the third box), and the first box and the second box (or the third box) are connected to different text lines, respectively , a character string detection method, characterized in that by combining the different text lines to form one text line.
  7. 제1항에 있어서,According to claim 1,
    상기 회귀 분석을 처리하는 단계는,The step of processing the regression analysis,
    하나의 텍스트 라인에 대응하는 박스 각각의 왼쪽 중간점, 오른쪽 중간점 및 중심점의 세 개의 포인트를 이용하여 상기 회귀 분석을 처리하는 것을 특징으로 하는 문자열 검출 방법.and processing the regression analysis using three points of a left midpoint, a right midpoint, and a center point of each box corresponding to one text line.
  8. 제1항에 있어서,According to claim 1,
    상기 회귀 분석을 처리하는 단계는,The step of processing the regression analysis,
    하나의 박스를 포함하는 텍스트 라인을 상기 하나의 박스로부터 선형 다항식으로서 생성하는 것을 특징으로 하는 문자열 검출 방법.A method for detecting a character string, characterized in that a text line including one box is generated from the one box as a linear polynomial.
  9. 제1항에 있어서,According to claim 1,
    다항식으로 매개 변수화된 텍스트 라인들 중 가장 긴 텍스트 라인의 절반보다 긴 텍스트 라인은 신뢰 텍스트 라인으로 설정되고, 나머지 텍스트 라인은 비신뢰 텍스트 라인으로 설정되고,Among the polynomially parameterized text lines, a text line longer than half the longest text line is set as a trusted text line, and the remaining text lines are set as an untrusted text line,
    상기 회귀 분석을 처리하는 단계는,The step of processing the regression analysis,
    상기 텍스트 라인들의 다차원 계수를 신뢰 텍스트 라인에 대한 다항식의 다차원 계수의 가중 평균을 통해 필터링하는 단계filtering the multidimensional coefficients of the text lines through a weighted average of the multidimensional coefficients of the polynomial for the trusted text line;
    를 포함하는 것을 특징으로 하는 문자열 검출 방법.A string detection method comprising a.
  10. 제9항에 있어서,10. The method of claim 9,
    상기 필터링하는 단계는,The filtering step is
    상기 신뢰 텍스트 라인에 대한 다항식을 상기 신뢰 텍스트 라인들 사이에서 필터링하는 단계; 및filtering a polynomial for the line of trust text between the lines of trust text; and
    상기 비신뢰 라인에 대한 다항식을 상기 필터링된 신뢰 텍스트 라인에 대한 다항식을 이용하여 필터링하는 단계filtering the polynomial for the untrusted line using the polynomial for the filtered trusted text line.
    를 포함하는 것을 특징으로 하는 문자열 검출 방법.A string detection method comprising a.
  11. 제9항에 있어서,10. The method of claim 9,
    상기 필터링하는 단계는,The filtering step is
    텍스트 라인에 대한 다항식의 길이의 다항식들의 중심들 사이의 거리에 대한 비율에 비례하도록 상기 가중 평균을 위한 가중치를 계산하는 것을 특징으로 하는 문자열 검출 방법.and calculating a weight for the weighted average so as to be proportional to the ratio of the length of the polynomial to the text line to the distance between the centers of the polynomials.
  12. 제1항에 있어서,The method of claim 1,
    상기 적어도 하나의 프로세서에 의해, 상기 입력된 이미지의 끝에 도달할 때까지 다른 박스 또는 상기 다른 박스의 궤적이 발견되는 경우마다 상기 텍스트 라인을 형성하는 단계 및 상기 회귀 분석을 처리하는 단계를 반복 수행하는 단계repeating, by the at least one processor, forming the text line and processing the regression analysis whenever another box or a trajectory of the other box is found, until the end of the input image is reached step
    를 더 포함하는 문자열 검출 방법.A string detection method further comprising a.
  13. 컴퓨터 장치와 결합되어 제1항 내지 제12항 중 어느 한 항의 방법을 컴퓨터 장치에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램.A computer program stored in a computer-readable recording medium in combination with a computer device to cause the computer device to execute the method of any one of claims 1 to 12.
  14. 제1항 내지 제12항 중 어느 한 항의 방법을 컴퓨터 장치에 실행시키기 위한 컴퓨터 프로그램이 기록되어 있는 컴퓨터 판독 가능한 기록매체.13. A computer-readable recording medium in which a computer program for executing the method of any one of claims 1 to 12 in a computer device is recorded.
  15. 컴퓨터에서 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서at least one processor implemented to execute computer-readable instructions
    를 포함하고,including,
    상기 적어도 하나의 프로세서에 의해,by the at least one processor,
    입력된 이미지가 포함하는 텍스트에 박스를 설정하고, Set a box to the text that the input image contains,
    상기 박스를 그룹별로 클러스터링하고,clustering the boxes by group,
    동일한 그룹에 포함된 박스 각각에 대한 궤적을 계산하고,Calculate the trajectory for each box included in the same group,
    상기 박스 각각에 대한 궤적을 추적하여 기설정된 기준에 따라 텍스트 라인을 형성하고, Tracing the trajectory for each of the boxes to form a text line according to a preset standard,
    상기 텍스트 라인 각각을 통해 다차원 다항식의 회귀 분석을 처리하는 것processing a regression analysis of a multidimensional polynomial through each of said lines of text;
    을 특징으로 하는 컴퓨터 장치.A computer device characterized by a.
  16. 제15항에 있어서,16. The method of claim 15,
    상기 기설정된 기준은, 제1 방향으로 이어지는 제1 박스의 궤적이 제2 박스(또는 제2 박스의 궤적)의 제2 방향 끝부분과 마주치거나, 또는 제1 방향의 반대 방향인 제2 방향으로 이어지는 제1 박스의 궤적이 제2 방향에서 제3 박스(또는 제3 박스의 궤적)의 제1 방향의 끝부분과 마주치는 유효한 조우(valid encounter)가 발생하는 기준을 포함하는 것The preset criterion is that the trajectory of the first box extending in the first direction meets the second direction end of the second box (or the trajectory of the second box), or a second direction opposite to the first direction. Containing criteria in which a valid encounter occurs in which the trajectory of the first box leading to the second direction meets the end of the third box (or the trajectory of the third box) in the first direction.
    을 특징으로 하는 컴퓨터 장치.A computer device characterized by a.
  17. 제15항에 있어서,16. The method of claim 15,
    상기 회귀 분석을 처리하기 위해, 상기 적어도 하나의 프로세서에 의해,to process the regression analysis, by the at least one processor,
    하나의 박스를 포함하는 텍스트 라인을 상기 하나의 박스로부터 선형 다항식으로서 생성하는 것generating a text line containing a box as a linear polynomial from the one box
    을 특징으로 하는 컴퓨터 장치.A computer device characterized by a.
  18. 제15항에 있어서,16. The method of claim 15,
    다항식으로 매개 변수화된 텍스트 라인들 중 가장 긴 텍스트 라인의 절반보다 긴 텍스트 라인은 신뢰 텍스트 라인으로 설정되고, 나머지 텍스트 라인은 비신뢰 텍스트 라인으로 설정되고,Among the polynomially parameterized text lines, a text line longer than half of the longest text line is set as a trusted text line, and the remaining text lines are set as an untrusted text line,
    상기 회귀 분석을 처리하기 위해, 상기 적어도 하나의 프로세서에 의해,to process the regression analysis, by the at least one processor,
    상기 텍스트 라인들의 다차원 계수를 신뢰 텍스트 라인에 대한 다항식의 다차원 계수의 가중 평균을 통해 필터링하는 것filtering the multidimensional coefficients of the text lines via a weighted average of the multidimensional coefficients of the polynomial for the confidence text line.
    을 특징으로 하는 컴퓨터 장치.A computer device characterized by a.
PCT/KR2021/019343 2021-01-28 2021-12-17 Method and system for detecting character string by using high-dimensional polynomial regression WO2022164031A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020210012666A KR102560051B1 (en) 2021-01-28 2021-01-28 Method and system for detecting string using high order polynomial regression
KR10-2021-0012666 2021-01-28

Publications (1)

Publication Number Publication Date
WO2022164031A1 true WO2022164031A1 (en) 2022-08-04

Family

ID=82654067

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2021/019343 WO2022164031A1 (en) 2021-01-28 2021-12-17 Method and system for detecting character string by using high-dimensional polynomial regression

Country Status (2)

Country Link
KR (1) KR102560051B1 (en)
WO (1) WO2022164031A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003529136A (en) * 1999-12-01 2003-09-30 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Program Classification by Object Tracking
CN108446698B (en) * 2018-03-15 2020-08-21 腾讯大地通途(北京)科技有限公司 Method, device, medium and electronic equipment for detecting text in image
KR102149050B1 (en) * 2020-04-24 2020-08-28 주식회사 애자일소다 System and method for analyzing document using artificial intelligence based on ocr
CN111914838A (en) * 2020-07-28 2020-11-10 同济大学 License plate recognition method based on text line recognition
KR20200128015A (en) * 2019-04-30 2020-11-11 베이징 센스타임 테크놀로지 디벨롭먼트 컴퍼니 리미티드 Certificate recognition method and device, electronic device, computer-readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003529136A (en) * 1999-12-01 2003-09-30 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Program Classification by Object Tracking
CN108446698B (en) * 2018-03-15 2020-08-21 腾讯大地通途(北京)科技有限公司 Method, device, medium and electronic equipment for detecting text in image
KR20200128015A (en) * 2019-04-30 2020-11-11 베이징 센스타임 테크놀로지 디벨롭먼트 컴퍼니 리미티드 Certificate recognition method and device, electronic device, computer-readable storage medium
KR102149050B1 (en) * 2020-04-24 2020-08-28 주식회사 애자일소다 System and method for analyzing document using artificial intelligence based on ocr
CN111914838A (en) * 2020-07-28 2020-11-10 同济大学 License plate recognition method based on text line recognition

Also Published As

Publication number Publication date
KR20220109246A (en) 2022-08-04
KR102560051B1 (en) 2023-07-27

Similar Documents

Publication Publication Date Title
US20200349325A1 (en) Method and system for automated intent mining, classification and disposition
WO2017057921A1 (en) Method and system for automatically classifying data expressed by a plurality of factors with values of text word and symbol sequence by using deep learning
CN107491534B (en) Information processing method and device
US20210081616A1 (en) Method, system, and computer program for artificial intelligence answer
WO2012108623A1 (en) Method, system and computer-readable recording medium for adding a new image and information on the new image to an image database
WO2022131497A1 (en) Learning apparatus and method for image generation, and image generation apparatus and method
WO2023096254A1 (en) Artificial intelligence-based job matching system
CN113141360B (en) Method and device for detecting network malicious attack
CN109947431A (en) A kind of code generating method, device, equipment and storage medium
CN112418320A (en) Enterprise association relation identification method and device and storage medium
CN114386408A (en) Government affair sensitive information identification method, device, equipment, medium and program product
WO2022164031A1 (en) Method and system for detecting character string by using high-dimensional polynomial regression
WO2022004978A1 (en) System and method for design task of architectural decoration
CN113420161A (en) Node text fusion method and device, computer equipment and storage medium
JP2022006166A (en) Determining method of destinations on map, equipment, and storage media
WO2022163985A1 (en) Method and system for lightening artificial intelligence inference model
US11086600B2 (en) Back-end application code stub generation from a front-end application wireframe
CN111460224A (en) Comment data quality labeling method, device, equipment and storage medium
US20160188751A1 (en) Rapid Searching and Matching of Data to a Dynamic Set of Signatures Facilitating Parallel Processing and Hardware Acceleration
WO2023017884A1 (en) Method and system for predicting latency of deep learning model by device
Wu et al. How to reverse engineer ICS protocols using pair-HMM
CN111126078A (en) Translation method and device
WO2022196905A1 (en) Method and system for providing design feedback
CN118133275A (en) Method, device and equipment for intercepting database injection attack
CN116415573B (en) Text topic identification method and system based on knowledge graph

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21923437

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21923437

Country of ref document: EP

Kind code of ref document: A1