Non-planar optical cable imprinting character recognition method and device

By converting the curved text image of the optical cable imprint mold into a flat text image and performing OCR processing, the problems of low efficiency and inaccurate recognition of non-planar optical cable imprint text are solved, and efficient and accurate text recognition is achieved.

CN119785333APending Publication Date: 2025-04-08YANGTZE OPTICAL FIBRE & CABLE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411936667.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In the prior art, the recognition efficiency of the imprinted text of non-planar optical cables is low and inaccurate, resulting in delayed manual inspection, high error rate, and poor optical character recognition effect due to surface deformation problems.

Method used

By obtaining the curved text image of the optical cable imprint mold, converting it into a flat text image based on the target mapping relationship between pixels, and image flip and optical character recognition (OCR) processing are performed to obtain the text recognition content.

Benefits of technology

It realizes efficient and accurate identification of non-planar optical cable imprinted text, simplifies the mold confirmation process, reduces manual error rate, and improves text recognition rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119785333A_ABST
    Figure CN119785333A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of image processing, and particularly discloses a non-planar optical cable imprinting character recognition method and device, and the method comprises the steps: obtaining a curved character image of an optical cable imprinting mold; obtaining a plane character image corresponding to the curved surface character image based on a target mapping relation between pixel points on the curved surface character image and pixel points on the plane character image; flipping mirror image characters in the image based on a plane character image corresponding to the curved surface character image to obtain a flipped plane character image; and performing optical character recognition (OCR) processing based on the overturned plane character image to obtain character recognition content. According to the method and the device, the non-planar optical cable embossed characters can be efficiently and accurately identified by acquiring the plane character image corresponding to the curved surface character image, turning the image and performing OCR processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image processing technology, and more specifically, relates to a method and device for recognizing text printed on non-planar optical cables. Background Art

[0002] In existing technology, most methods use a stamping mold to first stamp the text onto white paper. A mold engineer then compares the stamped text with the required stamping information in the production system. After manual verification, the stamped mold is installed on the production line equipment and the text is then stamped onto the cable sheath. First, due to manual inspection, errors are often detected late, and manual inspection often results in false positives and missed detections. If such errors are only discovered during the initial test run, the sheath must be re-stripped and re-stamped, resulting in significant manufacturing costs. Second, it is laborious. Because humans cannot directly interpret the mirrored text on the mold, a pre-stamping process onto paper is often required for manual comparison, which is time-consuming and labor-intensive. Third, because the stamping mold is a curved surface, direct optical character recognition (OCR) is ineffective due to surface deformation. Efficiently and accurately recognizing stamped text on non-planar cables is a pressing technical challenge in this field. Summary of the Invention

[0003] In view of the shortcomings of the prior art, the purpose of this application is to achieve efficient and accurate recognition of non-planar optical cable printed text.

[0004] To achieve the above objectives, in a first aspect, the present application provides a method for identifying text printed on a non-planar optical cable, comprising: Acquire a curved text image of the optical cable imprinting mold; Based on the target mapping relationship between the pixel points on the curved surface text image and the pixel points on the flat surface text image, obtaining the flat surface text image corresponding to the curved surface text image; Based on the plane text image corresponding to the curved text image, flipping the mirrored text in the image to obtain a flipped plane text image; Based on the flipped flat text image, optical character recognition (OCR) processing is performed to obtain text recognition content.

[0005] In a possible implementation, obtaining a planar text image corresponding to the curved text image based on a target mapping relationship between pixel points on the curved text image and pixel points on the planar text image includes: Based on the target mapping relationship and the curved surface text image, bilinear interpolation is performed to obtain the plane text image corresponding to the curved surface text image.

[0006] In one possible implementation, is any pixel point on the surface text image, middle and Respectively The coordinate values ​​on the axis and The coordinate values ​​on the axis, Axis and The axes are two mutually perpendicular coordinate axes on the imaging plane. The characters in the curved text image are along the Axis distortion occurs, For flat text images The corresponding pixel point and target mapping relationship are determined by the following formula: ; ; in, middle The value is equal to middle The value of Indicates that the center of the surface is The coordinate values ​​on the axis, Indicates the pixel width corresponding to the radius of the optical cable imprint mold in the image.

[0007] In a possible implementation, based on a planar text image corresponding to a curved text image, flipping the mirrored text in the image to obtain a flipped planar text image includes: Based on the plane text image corresponding to the curved text image, the image is wrapped around Axis flip and image enhancement are performed to obtain the flipped plane text image. Axis and The axes are two mutually perpendicular coordinate axes on the imaging plane. The characters in the curved text image are along the Axis distortion occurs.

[0008] In a possible implementation, image enhancement uses an adaptive histogram equalization algorithm.

[0009] In a possible implementation, after performing optical character recognition (OCR) processing on the flipped flat text image to obtain text recognition content, the method further includes: Based on the text recognition content and the reference imprinted content, a difference analysis is performed to obtain the difference analysis results.

[0010] In one possible implementation, performing a difference analysis based on the text recognition content and the reference imprint content to obtain a difference analysis result includes: Analyze the difference between the text recognition content and the reference imprint content through the edit distance algorithm; In the case where there are differences between the text recognition content and the reference imprint content, the differences are marked to obtain a difference analysis result.

[0011] In a second aspect, the present application provides a non-planar optical cable imprinted text recognition device, comprising: An image acquisition module is used to obtain a curved text image of the optical cable imprinting mold; An image mapping module is used to obtain a planar text image corresponding to the curved text image based on a target mapping relationship between pixel points on the curved text image and pixel points on the planar text image; An image flipping module is used to flip the mirrored text in the image based on the plane text image corresponding to the curved text image to obtain a flipped plane text image; The OCR module is used to perform optical character recognition (OCR) processing based on the flipped flat text image to obtain text recognition content.

[0012] In a third aspect, the present application provides an electronic device comprising: at least one memory for storing programs; and at least one processor for executing the programs stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method described in the first aspect or any possible implementation of the first aspect.

[0013] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method described in the first aspect or any possible implementation of the first aspect.

[0014] In general, the above technical solutions conceived by this application have the following beneficial effects compared with the existing technologies: (1) By obtaining the flat text image corresponding to the curved text image, flipping the image and performing OCR processing, the original workflow for confirming the mold is simplified, and the process of selecting the optical cable stamping mold according to the stamping content required by the contract is simplified. The manual selection of the mold, paper stamping, and confirmation after stamping on the equipment are simplified into one step, and the mold is directly selected for recognition. The text recognition rate is improved on the basis of the original image recognition, and it can achieve efficient and accurate recognition of non-planar optical cable stamping text.

[0015] (2) Considering that the degree of distortion of text at different positions on a curved text image is different, if the same correction measures (e.g., stretching at the same ratio) are applied to text at different positions on a curved text image, the distortion repair effect will be unsatisfactory. However, the present application determines the position of each pixel point on the curved text image on the flat text image according to the mapping relationship between the pixel points on the curved text image and the pixel points on the flat text image. Therefore, it is possible to adopt appropriate correction measures (stretching operations) for the distortion of text at different positions on the curved text image, thereby ensuring a better distortion repair effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 This is one of the flow charts of the method for recognizing text printed on a non-planar optical cable provided in an embodiment of the present application; Figure 2 Schematic diagram of the structure of a single optical cable imprinting mold provided in an embodiment of the present application; Figure 3 This is a schematic diagram of a structure in which multiple molds provided in an embodiment of the present application are assembled into a semicircle; Figure 4 This is a schematic diagram of a scene of photographing text printed on a mold provided in an embodiment of the present application; Figure 5 is a schematic diagram of an original image captured and provided in an embodiment of the present application; Figure 6 is a schematic diagram of an image obtained by stretching an original image provided in an embodiment of the present application; Figure 7 Schematic diagram of the mapping relationship between pixel points on a curved text image and pixel points on a flat text image provided by an embodiment of the present application; Figure 8 is a schematic diagram of an image obtained after flipping and image enhancement provided in an embodiment of the present application; Figure 9 is a schematic diagram of marking difference items provided in an embodiment of the present application; Figure 10 This is the second flow chart of the method for recognizing text printed on a non-planar optical cable provided in an embodiment of the present application; Figure 11 Schematic diagram of the structure of the non-planar optical cable embossed text recognition device provided in an embodiment of the present application; Figure 12 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0018] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0019] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more, for example, multiple processing units means two or more processing units, etc.; multiple elements means two or more elements, etc.

[0020] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application.

[0021] Figure 1 This is one of the flow charts of the method for recognizing text printed on a non-planar optical cable provided in an embodiment of the present application. Figure 1 As shown, the method includes the following steps S101 to S104.

[0022] Step S101, obtaining a curved text image of an optical cable imprinting mold; Step S102, based on the target mapping relationship between the pixel points on the curved surface text image and the pixel points on the flat surface text image, obtaining the flat surface text image corresponding to the curved surface text image; Step S103, based on the plane text image corresponding to the curved text image, flipping the mirrored text in the image to obtain a flipped plane text image; Step S104 : performing optical character recognition (OCR) processing based on the flipped flat text image to obtain text recognition content.

[0023] Specifically, according to the characteristics of the optical cable imprinting mold, several molds are generally assembled together and assembled into a semicircular structure and installed on the production line. The schematic diagram of a single mold and the diagram of the assembled equipment are as follows: Figure 2 and Figure 3 shown.

[0024] Figure 4 Schematic diagram of a scene of photographing text printed on a mold provided by an embodiment of the present application, such as Figure 4As shown, the specific shooting scene includes: the mold can be placed on the shooting platform, with the curved surface of the mold with the embossed text facing upwards, a camera is set directly above the shooting platform, the mold is located within the camera's field of view, and the camera's optical axis is aligned with the center of the mold's curved surface. The camera captures the image of the mold on the shooting platform, and the image of the mold can be obtained, with the center of the mold's curved surface located in the center area of ​​the image. Figure 5 As shown, it is the original image obtained by shooting.

[0025] The text on the optical cable imprinting mold is on a curved surface. The text in the image obtained by directly photographing the text on the curved surface (called a curved surface text image) will be obviously distorted.

[0026] It is worth noting that since the normal vectors at different positions on the surface (the normal vector of a surface refers to the vector perpendicular to the plane tangent to the surface at a certain point) point in different directions, the degree of distortion of the text at different positions on the curved text image is different.

[0027] If the text on the cable imprint is flat, the text will not be distorted when the text is directly photographed (called a flat text image). In comparison, the OCR accuracy of flat text images is higher than that of curved text images.

[0028] In order to improve the accuracy of OCR recognition, after obtaining the curved text image, the curved text image can be converted into a flat text image based on the mapping relationship between the pixel points on the curved text image and the pixel points on the flat text image.

[0029] In addition, since the text on the optical cable imprinting mold is mirrored text, by flipping the mirrored text in the image and then performing optical character recognition (OCR) processing based on the flipped flat text image, the text recognition content can be obtained. The text recognition content is the imprinted text content displayed on the optical cable. By automatically obtaining the imprinted text content displayed on the optical cable, it can assist staff in efficiently checking whether the text on the optical cable imprinting mold is consistent with the reference imprinting content (such as the imprinting content required by the contract).

[0030] Therefore, by obtaining the planar text image corresponding to the curved text image, flipping the image and performing OCR processing, it is possible to efficiently and accurately identify non-planar optical cable printed text.

[0031] In a possible implementation, the method of obtaining a planar text image corresponding to a curved text image based on a target mapping relationship between pixel points on the curved text image and pixel points on the planar text image includes: Based on the target mapping relationship and the curved surface text image, bilinear interpolation is performed to obtain the plane text image corresponding to the curved surface text image.

[0032] It is understandable that the image can be flattened based on the mapping relationship between the pixels on the curved text image and the pixels on the flat text image. However, since the pixels on the curved text image before stretching may not correspond one-to-one with the pixels on the flat text image, an interpolation method is needed to estimate the pixel value of each point on the flat text image to improve the image quality. Figure 6 As shown, this is the image obtained by stretching the original image.

[0033] Specifically, bilinear interpolation can be used to supplement image pixels based on the weighted average of the four nearest pixel values. Bilinear interpolation is an image scaling algorithm that interpolates data in two-dimensional space. It estimates the unknown values ​​between the four known corner points by performing two linear interpolations in two directions (usually horizontally and vertically). Specifically, linear interpolation is first performed in one direction (such as the x-direction) to obtain two intermediate values. These two intermediate values ​​are then linearly interpolated in the other direction (such as the y-direction) to obtain an estimated value for the target point, thereby achieving image zooming in or out.

[0034] Converting a curved text image into a flat text image is similar to expanding the curved text image from the center of the mold's curved surface to both sides. Considering this characteristic, in one possible implementation, the mapping relationship between the pixel points on the curved text image and the pixel points on the flat text image can be represented by coordinate translation, such as Figure 7 shown.

[0035] The following describes how to map the pixels in a curved text image to the pixels in a flat text image. Assume that the pixel points in the surface text image Pixels in a flat text image Correspondingly, the characters in the curved text image are along The axis is distorted. Since the x-coordinate changes during the process of expanding the curved text image from the center of the mold's curved surface to both sides to obtain a flat text image, in Value equal to in Using the triangle relationship, it is actually based on the pixel point The arc length between the pixel point and the center of the surface Stretching to get pixels Specifically, it can be determined by the following formula in Value and in The mapping relationship between values.

[0036] ; ; in, The pixel width corresponding to the radius of the mold in the image can be obtained by pre-calibration. Indicates the center position of the surface is Coordinate position on the axis.

[0037] It is worth noting that, considering that the degree of distortion of text at different positions on the curved text image is different, if the same correction measures are used for text at different positions on the curved text image (such as stretching at the same ratio), the distortion repair effect will be unsatisfactory.

[0038] However, the present application determines the position of each pixel point on the curved text image on the flat text image according to the mapping relationship between the pixel points on the curved text image and the pixel points on the flat text image. Therefore, it is possible to adopt appropriate correction measures (stretching operations) for the distortion of text at different positions on the curved text image, thereby ensuring better distortion repair effects.

[0039] In a possible implementation, the above-mentioned method of flipping the mirrored text in the plane text image corresponding to the curved text image to obtain the flipped plane text image includes: Based on the plane text image corresponding to the curved text image, the image is wrapped around Axis flip and image enhancement are performed to obtain the flipped plane text image. Axis and The axes are two mutually perpendicular coordinate axes on the imaging plane. The characters in the curved text image are along the Axis distortion occurs.

[0040] Specifically, the image is flipped along the Y axis to convert the mirrored text on the mold into embossed text that can be ultimately displayed on the optical cable. CLAHE (Contrast Limited Adaptive Histogram Equalization) is then applied. CLAHE is an improved version of histogram equalization that is suitable for local areas and can better handle shadows, helping to improve the clarity of text. The text in the optimized image is displayed to make it clearer and easier to identify. Figure 8 As shown, the image is obtained after flipping and image enhancement.

[0041] CLAHE is mainly implemented through the following steps.

[0042] (1) Local region segmentation: The image is divided into multiple small overlapping regions (usually called "blocks" or "windows"). The histogram of each region will be processed separately.

[0043] (2) Histogram equalization: Perform histogram equalization on each local area to enhance the contrast of that area. In this way, the details of the image can be improved in the local range.

[0044] (3) Contrast Limitation: To avoid noise amplification caused by over-enhancement, CLAHE introduces the concept of contrast limitation. Specifically, when calculating the histogram of each local area, if the number of pixels at a certain grayscale level exceeds a preset threshold, the histogram is clipped and the excess pixels are evenly distributed to other grayscale levels. This process helps control the contrast of the image and prevent over-enhancement.

[0045] (4) Interpolation synthesis: Finally, the equalization results of each local area are synthesized through interpolation to generate the final enhanced image. This process usually uses bilinear interpolation or other interpolation methods to ensure smooth transition of the image.

[0046] In a possible implementation, after performing optical character recognition (OCR) processing on the flipped flat text image to obtain text recognition content, the method further includes: Based on the text recognition content and the reference imprinted content (such as the imprinted content required by the contract), a difference analysis is performed to obtain the difference analysis results.

[0047] For example, the difference between the text recognition content and the reference imprint content is analyzed by using an edit distance algorithm; when there are difference items between the text recognition content and the reference imprint content, the difference items are marked to obtain a difference analysis result.

[0048] Specifically, the system automatically parses the content of the attachments in the corresponding contract, outputs the contract requirements for the printed text, compares the contract requirements for the printed text with the OCR recognized printed text, and finally outputs the comparison differences, which are displayed in red text. Figure 9 As shown, this is a schematic diagram for marking the difference items.

[0049] Levenshtein distance (also known as edit distance) is an algorithm that measures the similarity between two strings. It works by counting the minimum number of single-character edits (insertions, deletions, or substitutions) required to transform one string into the other.

[0050] Levenshtein distance algorithm principles: The Levenshtein distance is typically calculated using dynamic programming. The basic idea is to construct a two-dimensional array (matrix) where rows represent the characters of the first string and columns represent the characters of the second string. Each element of the matrix represents the minimum edit distance required to transform the first i characters of the first string into the first j characters of the second string.

[0051] The specific process of comparing the identified stamped text with the stamped content required by the contract based on the Levenshtein distance algorithm is as follows: (1) calculating the Levenshtein distance, (2) tracking the differences, and (3) marking the differences.

[0052] (1) Calculate the Levenshtein distance: Use a dynamic programming algorithm to calculate the Levenshtein distance between two strings (the recognized imprinted text and the imprinted content required by the contract) and construct a matrix to track editing operations.

[0053] (2) Tracking differences: Starting from the lower right corner of the matrix and backtracking to the upper left corner, find the specific editing operation (insert, delete, replace) and record the difference items.

[0054] (3) Marking differences: Mark the original character string (the recognized imprinted text and the imprinted content required by the contract) based on the differences found.

[0055] The following is an example to illustrate the non-planar optical cable imprinted text recognition method provided by the present application.

[0056] Figure 10 This is a second flow chart of the method for recognizing text printed on a non-planar optical cable provided in an embodiment of the present application. Figure 10 As shown, the method includes the following steps S201 to S207.

[0057] Step S201: Upload a picture of an optical cable embossing template.

[0058] Step S202 : Mapping the image points on the non-planar surface back to a planar image.

[0059] In step S203, since the mold is a mirror image, the unfolded plane image is flipped along the Y axis. After flipping, the text on the image is displayed as normal text that is finally stamped on the optical cable.

[0060] Step S204: Process the flipped image to enhance the contrast of the local area and improve the clarity of the text.

[0061] Step S205 , performing OCR text recognition on the transformed flat embossed text.

[0062] Step S206: parse the contents of the attachment corresponding to the contract number and output the contract requirements for imprinting.

[0063] In step S207, the identified stamped characters are compared with the stamped content required by the contract according to the Levenshtein distance algorithm, and the difference items are finally output and displayed in red text.

[0064] It can be understood that the complexity of the operation is reduced by directly identifying the text on the mold, and considering that the text on the mold is non-planar, the non-planar image is mapped into a planar image through coordinate transformation through the image processing algorithm, and then the OCR recognition interface is called to perform text recognition. At the same time, in this system, the content of the attachments in the corresponding contract is automatically parsed, and the contract requirements for imprinting text are output. After re-sorting with the text recognized by OCR, the content is compared to determine whether the content is the same, and different content texts are marked with red font reminders.

[0065] The non-planar optical cable imprinted text recognition device provided by the present application is described below. The non-planar optical cable imprinted text recognition device described below and the non-planar optical cable imprinted text recognition method described above can be referenced to each other.

[0066] Figure 11 Schematic diagram of the structure of the non-planar optical cable imprinted text recognition device provided by the embodiment of the present application. Figure 11 As shown, the device includes: an image acquisition module 10, an image mapping module 20, an image flipping module 30 and an OCR module 40. Among them: An image acquisition module 10 is used to obtain a curved text image of the optical cable imprinting mold; An image mapping module 20 is configured to obtain a planar text image corresponding to the curved text image based on a target mapping relationship between pixel points on the curved text image and pixel points on the planar text image; An image flipping module 30 is configured to flip the mirrored text in the image based on the plane text image corresponding to the curved text image, and obtain a flipped plane text image; The OCR module 40 is used to perform optical character recognition (OCR) processing based on the flipped plane text image to obtain text recognition content.

[0067] It is understandable that the detailed functional implementation of each of the above units / modules can be found in the introduction of the aforementioned method embodiment, and will not be repeated here.

[0068] It should be understood that the above-mentioned device is used to execute the method in the above-mentioned embodiment. The implementation principle and technical effect of the corresponding program module in the device are similar to those described in the above-mentioned method. The working process of the device can refer to the corresponding process in the above-mentioned method and will not be repeated here.

[0069] Based on the method in the above embodiment, an embodiment of the present application provides an electronic device, Figure 12 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 12 As shown, the electronic device may include: a processor (Processor) 810, a communication interface (Communications Interface) 820, a memory (Memory) 830, and a communication bus 840. The processor 810, the communication interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the method in the above embodiment.

[0070] In addition, the logic instructions in the aforementioned memory 830 can be implemented in the form of a software functional unit and, when sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the portion that contributes to the prior art, or the portion of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application.

[0071] Based on the method in the above embodiment, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method in the above embodiment.

[0072] Based on the method in the above embodiment, an embodiment of the present application provides a computer program product. When the computer program product runs on a processor, the processor executes the method in the above embodiment.

[0073] It is understood that the processor in the embodiments of the present application may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.

[0074] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and storage medium can be located in an ASIC.

[0075] The above embodiments can be implemented in whole or in part using software, hardware, firmware, or any combination thereof. When implemented using software, they can be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions. When loaded and executed on a computer, the computer program instructions fully or partially produce the processes or functions described in the embodiments of this application. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted via the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state drive (SSD)).

[0076] It will be understood that the various numerical numbers involved in the embodiments of the present application are merely distinctions for the convenience of description and are not intended to limit the scope of the embodiments of the present application.

[0077] It is easy for those skilled in the art to understand that the above is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A method for identifying text printed on a non-planar optical cable, characterized in that: include: Acquire a curved text image of the optical cable imprinting mold; Based on the target mapping relationship between the pixel points on the curved text image and the pixel points on the flat text image, a flat text image corresponding to the curved text image is obtained; Based on the plane text image corresponding to the curved text image, flipping the mirror text in the image to obtain a flipped plane text image; Based on the flipped plane text image, optical character recognition (OCR) processing is performed to obtain text recognition content.

2. The method for identifying non-planar optical cable embossed text according to claim 1, characterized in that: The method of obtaining a plane text image corresponding to the curved text image based on a target mapping relationship between pixel points on the curved text image and pixel points on the plane text image includes: Based on the target mapping relationship and the curved surface text image, bilinear interpolation is performed to obtain the plane text image corresponding to the curved surface text image.

3. The method for identifying non-planar optical cable embossed text according to claim 1 or 2, characterized in that: is any pixel point on the surface text image, middle and Respectively The coordinate values ​​on the axis and The coordinate values ​​on the axis, Axis and The axes are two mutually perpendicular coordinate axes on the imaging plane. The axis is distorted. For flat text images The corresponding pixel point and target mapping relationship are determined by the following formula: ; ; in, middle The value is equal to middle The value of The center of the surface is The coordinate values ​​on the axis, Indicates the pixel width corresponding to the radius of the optical cable imprint mold in the image.

4. The method for identifying non-planar optical cable embossed text according to claim 1, characterized in that: The method of flipping the mirrored text in the image based on the plane text image corresponding to the curved text image to obtain the flipped plane text image includes: Based on the plane text image corresponding to the curved text image, the image is wrapped around Axis flipping and image enhancement are performed to obtain the flipped plane text image. Axis and The axes are two mutually perpendicular coordinate axes on the imaging plane. Axis distortion.

5. The method for identifying non-planar optical cable embossed text according to claim 4, characterized in that: The image enhancement adopts an adaptive histogram equalization algorithm.

6. The method for identifying non-planar optical cable embossed text according to claim 1, characterized in that: After performing optical character recognition (OCR) processing based on the flipped plane text image to obtain text recognition content, the following steps are also included: Based on the text recognition content and the reference imprinted content, a difference analysis is performed to obtain the difference analysis results.

7. The method for identifying non-planar optical cable embossed text according to claim 6, characterized in that: The performing difference analysis based on the text recognition content and the reference imprint content to obtain the difference analysis result includes: Analyze the difference between the text recognition content and the reference imprint content through the edit distance algorithm; In the case where there are difference items between the text recognition content and the reference imprint content, the difference items are marked to obtain the difference analysis results.

8. A non-planar optical cable imprinted text recognition device, characterized in that: include: An image acquisition module is used to obtain a curved text image of the optical cable imprinting mold; An image mapping module, used for obtaining a plane text image corresponding to the curved text image based on a target mapping relationship between pixel points on the curved text image and pixel points on the plane text image; An image flipping module is used to flip the mirrored text in the image based on the plane text image corresponding to the curved text image, and obtain a flipped plane text image; The OCR module is used to perform optical character recognition (OCR) processing based on the flipped plane text image to obtain text recognition content.

9. An electronic device, characterized in that: include: at least one memory for storing a computer program; At least one processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program runs on a processor, the processor is caused to execute the method according to any one of claims 1 to 7.