Search

CN-122024244-A - Data positioning method, system and equipment for angle and distance analysis

CN122024244ACN 122024244 ACN122024244 ACN 122024244ACN-122024244-A

Abstract

The application relates to the technical field of image recognition and data processing, in particular to a data positioning method, a system and equipment for angle and distance analysis, wherein the method comprises the steps of preprocessing image data to be processed, and generating a data block information set for the preprocessed image data to be processed by utilizing an integrated OCR technology; the method comprises the steps of constructing a relative polar coordinate system according to reference data blocks in a reference data block set, setting an angle fault-tolerant group to determine data blocks of the same direction group, calculating the space distances between all data blocks in the same direction group and the reference data blocks based on multi-scale distance analysis, sequencing the space distances to generate a sequenced data block sequence, extracting data blocks in corresponding positions from the sequencing sequence according to a preset target sequencing position to serve as positioning target data, and performing visual labeling on image data to be processed based on the positioning target data. The application can effectively adapt to the image input of different shooting distances, angles and illumination conditions.

Inventors

  • WANG WEIDONG
  • XUAN YULONG
  • LI AIZHU
  • PAN XIAOJUN

Assignees

  • 杭州紫钺科技有限公司

Dates

Publication Date
20260512
Application Date
20260104

Claims (10)

  1. 1.A data positioning method for angular distance analysis, comprising the steps of: receiving image data to be processed uploaded by a user, preprocessing the image data to be processed, and performing character recognition on the preprocessed image data to be processed by utilizing an integrated OCR technology to generate a data block information set, wherein the data block information set at least comprises text keywords; Dynamically screening a reference data block set from a data block information set based on the text keywords, wherein the reference data block set at least comprises one reference data block, and constructing a relative polar coordinate system according to the reference data blocks in the reference data block set; Calculating a relative angle value between a target data block and a reference data block based on a relative polar coordinate system, and setting an angle fault tolerance group to determine data blocks of the same direction group; Calculating the space distance between all data blocks in the same direction group and the reference data block based on multi-scale distance analysis, and sequencing the space distances to generate a sequence of ordered data blocks from the near to the far; and extracting the data blocks at the corresponding positions from the sorting sequence according to the preset target sorting positions to serve as positioning target data, and carrying out visual labeling on the image data to be processed based on the positioning target data.
  2. 2. The data positioning method for angular distance analysis according to claim 1, wherein constructing a relative polar coordinate system from reference data blocks in the set of reference data blocks comprises the steps of: sequentially determining four-corner point coordinates based on the data blocks in the data block information set, and determining a geometric center point based on the four-corner point coordinates; And forming a center point coordinate set based on the geometric center points of all the data blocks, and constructing a relative polar coordinate system based on the center point coordinate set.
  3. 3. The data positioning method for angular distance analysis according to claim 2, wherein the angular fault tolerant grouping is arranged to determine data blocks of the same directional group, comprising the steps of: Setting an adaptive angle deviation threshold, forming a fault-tolerant interval based on the adaptive angle deviation threshold, and judging whether a relative angle value corresponding to the target data block falls into the fault-tolerant interval or not; And if the relative angle value corresponding to the target data block falls into the fault tolerance interval, marking the target data block as the same direction group.
  4. 4. The data positioning method for angular distance analysis according to claim 2, wherein the spatial distances of all data blocks from the reference data block in the same direction group are calculated based on the multi-scale distance analysis, comprising the steps of: The spacing between each data block within the same directional group and the reference data block is calculated based on the set of center point coordinates to determine the spatial distance between the data block and the reference data block.
  5. 5. The data positioning method for angular distance analysis according to claim 4, wherein the inter-space distance is ordered to generate a near-to-far ordered sequence of data blocks, comprising the steps of: Judging whether a plurality of reference data blocks exist or not based on the reference data block set; If yes, generating a corresponding weight coefficient based on the reference data block, carrying out weighted calculation on the space distance based on a weight system to obtain a comprehensive distance value, and determining an effective data block sequence based on the comprehensive distance value; If not, all the data blocks in the same direction group are arranged in ascending order based on the space distance so as to obtain a sequence of ordered data blocks.
  6. 6. The data positioning method for angular distance analysis according to claim 2, wherein constructing a relative polar coordinate system based on the set of center point coordinates comprises the steps of: Setting a multithreading parallel computing architecture, dividing the center point coordinate set into a plurality of subsets, and independently computing one subset by each computing thread; The same calculation procedure is performed on the center points of each subset to obtain relative polar coordinates, and the calculation results of all subsets are aggregated into a complete relative polar coordinate system.
  7. 7. A data positioning system for angular distance analysis, characterized in that a data positioning method for angular distance analysis according to any of the claims 1-6 is performed, comprising: The image input and preprocessing module is used for receiving image data to be processed uploaded by a user, preprocessing the image data to be processed, and performing character recognition on the preprocessed image data to be processed by utilizing an integrated OCR technology through the OCR processing module so as to generate a data block information set, wherein the data block information set at least comprises text keywords; The geometric calculation and analysis module dynamically screens a reference data block set from a data block information set based on the text keywords, wherein the reference data block set at least comprises one reference data block, and a relative polar coordinate system is built according to the reference data blocks in the reference data block set; The direction grouping and sorting module calculates the relative angle value between the target data block and the reference data block, sets an angle fault tolerance group to determine the data blocks of the same direction group, calculates the space distances between all the data blocks in the same direction group and the reference data block based on multi-scale distance analysis, and sorts the space distances to generate a sequence of ordered data blocks from near to far; The data positioning output module extracts data blocks at corresponding positions from the ordering sequence according to a preset target ordering position to serve as positioning target data, and performs visual labeling on the image data to be processed based on the positioning target data.
  8. 8. The data positioning system for angular distance analysis according to claim 7, further comprising a layering coefficient configuration module for separating threshold parameters into three groups of OCR, angle and distance types, and updating the three groups of threshold parameters of OCR, angle and distance in real time based on specific conditions of the image data to be processed, respectively; The method comprises the steps of properly increasing an adaptive angle deviation threshold value when the resolution ratio is low, adopting a finer distance sorting strategy when the density is high, and giving higher geometric calculation weight to a data block with high identification confidence.
  9. 9. The data positioning system for angle and distance analysis according to claim 7, further comprising a result caching module, wherein the result caching module is configured to cache frequently used angle calculation results and distance calculation results, and perform iterative calculation on the image data to be processed by using LRU policy management.
  10. 10. An electronic device comprising a processor and a memory coupled to each other, the memory having stored thereon a computer program executable on the processor; The computer program, when executed by the processor, implements a data positioning method for angular distance analysis as claimed in any one of claims 1-6.

Description

Data positioning method, system and equipment for angle and distance analysis Technical Field The present application relates to the field of image recognition and data processing technologies, and in particular, to a data positioning method, system and device for angle and distance analysis. Background The OCR image recognition technology is a technology for acquiring character image information on paper through optical input modes such as scanning, shooting and the like, analyzing character morphological characteristics by utilizing various pattern recognition algorithms, converting notes, newspapers, books, manuscripts and other printed matters into character image information, and converting the character image information into usable computer input by utilizing the image recognition technology. The four aspects of final recognition rate, recognition speed, layout understanding accuracy and layout restoration satisfaction are generally taken as evaluation basis of OCR image recognition technology. The existing OCR technology is able to identify text regions in an image and return bounding box coordinates for each text region. Fixed coordinate based interception, template based matching or feature point based matching is typically employed. However, the conventional method has poor robustness when the image scale and angle are changed, and cannot adapt to multi-scale and multi-angle image input. When the image shooting distance, angle or illumination condition changes, the position and the form of the same target data in the image can change greatly, so that the traditional positioning method based on fixed coordinates or template matching fails. Disclosure of Invention In order to reduce the sensitivity of OCR technology to image shooting distance, angle or illumination conditions, the application provides a data positioning method, system and equipment for angle distance analysis. In a first aspect, the present application provides a data positioning method for angular distance analysis, which adopts the following technical scheme: a data positioning method for angular distance analysis, comprising the steps of: receiving image data to be processed uploaded by a user, preprocessing the image data to be processed, and performing character recognition on the preprocessed image data to be processed by utilizing an integrated OCR technology to generate a data block information set, wherein the data block information set at least comprises text keywords; Dynamically screening a reference data block set from a data block information set based on the text keywords, wherein the reference data block set at least comprises one reference data block, and constructing a relative polar coordinate system according to the reference data blocks in the reference data block set; Calculating a relative angle value between a target data block and a reference data block based on a relative polar coordinate system, and setting an angle fault tolerance group to determine data blocks of the same direction group; Calculating the space distance between all data blocks in the same direction group and the reference data block based on multi-scale distance analysis, and sequencing the space distances to generate a sequence of ordered data blocks from the near to the far; and extracting the data blocks at the corresponding positions from the sorting sequence according to the preset target sorting positions to serve as positioning target data, and carrying out visual labeling on the image data to be processed based on the positioning target data. By adopting the technical scheme, the relative angle value between the target data block and the reference data block is calculated based on the relative polar coordinate system, the angle fault-tolerant group is set to determine the data blocks of the same direction group, the spatial distances between all the data blocks in the same direction group and the reference data block are calculated based on multi-scale distance analysis, and the spatial distances are ordered to generate an ordered data block sequence from the near to the far, so that the acquired positioning target data is not influenced by the integral rotation of the image data to be processed. The relative polar coordinate system is dynamically established along with the actual image data to be processed, but is not fixed at a certain position of the image, so that the integral rotation deviation caused by the shooting angle can be eliminated, and the sensitivity of the OCR technology to the shooting distance, angle or illumination condition of the image is reduced. In one embodiment, constructing a relative polar coordinate system from reference data blocks in the set of reference data blocks comprises the steps of: sequentially determining four-corner point coordinates based on the data blocks in the data block information set, and determining a geometric center point based on the four-corner point coordinates; And forming a