Method and system for optimizing text recognition or processing by utilizing visual features

By identifying visual features in images and optimizing text recognition and processing, it solves the problems of program indentation control and low character recognition accuracy in computer programming, achieves more efficient text recognition and program entry, protects the vision of teenagers, and Reduced programming costs.

CN118865415APending Publication Date: 2024-10-29杨宏伟
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410860169.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

In the current computer programming process, it is difficult to accurately control the indentation of the program, and the accuracy of character recognition commonly used in the program is low, which affects the application of text recognition technology in the program entry process, especially when the monitor is not used or reduced. In this case, there are challenges in convenience and vision protection of programming, especially for teenagers.

Method used

By identifying the visual features in the image, determine the corresponding text recognition or processing method, use the camera device to capture the image, the processor executes optimized text recognition or processing steps, including a recognition module, a determination module and a text generation or processing module, using the visual features to generate The instructions process images or recognized texts to implement program entry and execution.

Benefits of technology

It improves the accuracy of text recognition, reduces the cost of use, allows programs to be written and executed by writing or printing program text, protects the eyesight of teenagers, and enriches the input methods of programmable devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118865415A_ABST
    Figure CN118865415A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method and system for optimizing text recognition or processing through visual features, and the method comprises the steps: recognizing the visual features in an image, and obtaining a recognition result based on the visual features; based on the recognition result, determining a method or a product used for text recognition or processing and corresponding to the recognition result; by using the method or product for text recognition or processing, an image is recognized to generate a text, and / or the text or the image is processed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of computer technology, and more particularly to a method and system for optimizing text recognition or processing using visual features. Background Art

[0002] Computer vision recognition technology refers to the use of computer science and artificial intelligence technology to automatically identify the content and features in images and videos by processing and analyzing digital images or videos.

[0003] Computer vision recognition technology has been widely used in face recognition, text recognition, object recognition, scene recognition, medical diagnosis and other fields, and has become an important part of the digital transformation of modern society.

[0004] Each text recognition method or product has different recognition capabilities for different texts. Using a recognition method or product with better recognition capabilities for a specific text can improve the recognition rate of the text. For example, there are currently special methods or products for recognizing Chinese, English, numbers, and tables. At the same time, the cost of using different text recognition products (including but not limited to software, hardware, or services that provide text recognition capabilities) is also different. If it is convenient to select a text recognition method or product based on the content, it can bring a lot of convenience and cost savings to users. In addition, after the text is recognized, subsequent processing is often required. If it is scanned or photographed, instructions for subsequent processing can be issued to the computer, which will also bring a lot of convenience to the user.

[0005] Especially in computer programming, computer programming can help people control computing devices to achieve a variety of functions, and many people, including teenagers, are learning computer programming. At present, computer programming is usually input using a combination of a keyboard and a display.

[0006] When reading computer textbooks, if you want to execute a sample program, you need to manually enter the sample code into the programming software, which is time-consuming and laborious. Taking a photo of the sample program and then performing OCR can simplify the input operation, but there are two problems. One is that the indentation of the program is difficult to control accurately, and the other is that the recognition accuracy of some frequently used characters in the program is low, and it needs to be checked and adjusted line by line before it can run, which affects the application of text recognition technology in the program input link.

[0007] Taking this a step further, if we can complete the input and execution of programs by taking photos, then we can allow teenagers to input programs by handwriting, so that they can learn computer programming without or with less use of monitors, which can effectively protect the eyesight of teenagers. In addition, we can also use cameras on programmable devices to replace screens and keyboards, enrich the input methods of programmable devices, thereby reducing costs and reducing size.

[0008] Therefore, we need a method that allows people to optimize text recognition and processing, especially to simply and conveniently use visual recognition to complete program entry and execution functions. Summary of the invention

[0009] The purpose of the present invention is to provide a method and system for optimizing text recognition or processing using visual features, aiming to solve the above-mentioned problems in the prior art.

[0010] The present invention provides a method for optimizing text recognition or processing by using visual features, comprising:

[0011] Identify visual features in an image and obtain recognition results based on the visual features. The visual features refer to features in an image that can be recognized by computer vision. They can be visual features of the text itself, such as font color, background color of the text part, text size, etc., or visual features such as color and graphics at a certain position other than the text in the image, or visual features formed by displaying a certain visual identifier in the image. The visual identifier can include points, lines, shading, background color, QR code, barcode, picture, graphic or other elements that can be recognized by computer vision;

[0012] Based on the recognition result, determine the corresponding method or product for text recognition or processing, including but not limited to saving, associating, editing, calculating, converting, generating program statements or program statement paragraphs, combining, deleting, compiling, debugging and / or executing the image or the text generated by the recognized image, and including but not limited to methods, algorithms, steps, processes, models, techniques and / or rules, and including but not limited to software, hardware or services capable of realizing text recognition or text processing or image processing;

[0013] The method or product for text recognition or processing is used to recognize images to generate text, and / or process text or images.

[0014] The present invention provides a system for optimizing text recognition or processing by using visual features, which specifically includes:

[0015] A camera device for capturing images;

[0016] A processor is used to implement the steps of the method for optimizing text recognition or processing using visual features as described above when executed.

[0017] The embodiment of the present invention further provides a system for optimizing text recognition or processing using visual features, specifically comprising:

[0018] A recognition module, used to recognize visual features in an image and obtain recognition results based on the visual features;

[0019] A determination module, configured to select a method or product for text recognition or processing corresponding to the recognition result;

[0020] The text generation or processing module is used to utilize the method or product for text recognition or processing to recognize images to generate text, and / or process the text or image.

[0021] The embodiment of the present invention further provides a device for writing a program language text, specifically comprising:

[0022] Program writing area, used for writing or printing program statements, such printing including but not limited to printing, printing, spraying, stamping, etc.;

[0023] The visual feature area is used to display visual features, and the visual features are used to determine the method or product for text recognition or processing corresponding to the program writing area or one or more positions in the program writing area. The display refers to any way that can present visual features, including but not limited to writing, printing, placing, engraving, painting, etc.

[0024] An embodiment of the present invention also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the above-mentioned method for optimizing text recognition or processing using visual features.

[0025] An embodiment of the present invention further provides a computer-readable storage medium, on which a program for implementing information transmission is stored. When the program is executed by a processor, the steps of the above-mentioned method for optimizing text recognition or processing using visual features are implemented.

[0026] By using the embodiments of the present invention, users can use visual features to simply change the method or product of text recognition, thereby improving the accuracy of text recognition or reducing the cost of use, and can use visual features to generate instructions to process images or recognized texts. Furthermore, programs can be written and executed by writing (or printing) program texts, thereby facilitating the cultivation of programming skills while protecting eyesight. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate one or more embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0028] Figure 1 is a flow chart of optimizing text recognition or processing using visual features according to an embodiment of the present invention;

[0029] Figure 2 is a schematic diagram of using the color of text as a visual feature in an embodiment of the present invention;

[0030] Figure 3 is a schematic diagram of an embodiment of the present invention using a visual identifier (QR code) as a visual feature;

[0031] Figure 4 is a schematic diagram of determining a text image area using visual features according to an embodiment of the present invention;

[0032] Figure 5 is a schematic diagram of determining a text image area using a two-dimensional code according to an embodiment of the present invention;

[0033] Figure 6 is a schematic diagram of generating program statements using text recognition results according to an embodiment of the present invention;

[0034] Figure 7 is a schematic diagram of generating program statements using visual identification and text recognition results according to an embodiment of the present invention;

[0035] Figure 8 is a schematic diagram of generating program statements using only visual identifiers according to an embodiment of the present invention;

[0036] Fig. 9 It is a schematic diagram of generating a program statement using the column where the text start position is located and the text recognition result according to an embodiment of the present invention;

[0037] Fig.10 is a schematic diagram of generating program statements for identifying visual feature columns and text columns according to an embodiment of the present invention;

[0038] Fig.11 is a schematic diagram of a system for optimizing text recognition or processing using visual features according to an embodiment of the present invention;

[0039] Fig.12 is a schematic diagram of Example 1 of a program writing area according to an embodiment of the present invention;

[0040] Fig.13is a schematic diagram of Example 2 of a program writing area according to an embodiment of the present invention;

[0041] Fig.14 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0042] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the following will be combined with the drawings in one or more embodiments of this specification to clearly and completely describe the technical solutions in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.

[0043] Method Embodiment

[0044] According to an embodiment of the present invention, a method for optimizing text recognition or processing using visual features is provided. Figure 1 is a flow chart of a method for optimizing text recognition or processing using visual features according to an embodiment of the present invention. Figure 1 As shown, the method for optimizing text recognition or processing by using visual features according to an embodiment of the present invention specifically includes:

[0045] Step S101, identifying visual features in an image (in an embodiment of the present invention, it may be visual features of the text, or other visual features, such as one or more visual identifiers in the image, or the color of the paper on which the text is written), and obtaining recognition results based on the visual features; in one embodiment of the present invention, the text may be a program statement text, wherein various program statement constituent elements correspond to the same or different text recognition methods or products, and the program statement constituent elements specifically include: numbers, letters, Chinese characters, symbols, functions, variables, indentation information in one or more program statements, one or more complete program statements, one or more program statement paragraphs, any part of one or more program statements, and / or special characters required in one or more program texts.

[0046] Step S102, based on the recognition result, determining a corresponding method or product for text recognition or processing; specifically comprising:

[0047] Based on the recognition result, determine the position of the text to be recognized in the image, and determine a method or product for text recognition or processing corresponding thereto (wherein, in the embodiment of the present invention, the visual features for obtaining the position and the visual features for obtaining the recognition or processing method may be the same or different);

[0048] Step S103, using the method or product for text recognition or processing, recognize the image to generate text, and / or process the text or image. Specifically, it includes:

[0049] Acquire a text image according to the position of the text to be recognized in the image;

[0050] The corresponding text recognition method or product is used to recognize text images to generate text, and / or process text or text images.

[0051] In one embodiment of the present invention, it further comprises:

[0052] The text and / or program statement text is processed by generating operation instructions using visual features or input control signals. In one embodiment, the background color of the text is used as a visual feature, and voice or keystrokes are used as input control signals. Inputting a specific voice or clicking a specific key generates an operation instruction to perform text recognition or processing on the part with a specific background color in the image. A program statement or program statement paragraph is generated based on the text and a preset program statement generation rule (for example, based on the text position).

[0053] Determining a possible range of text recognition results according to the program statement constituent element type and / or the generated program statement text;

[0054] Optimize the text recognition method or results based on the possible range of text recognition results.

[0055] In one embodiment, in actual application, when identifying function type text in a python program text, the functions existing in this python library can be added to the value range of the function type text according to the library name loaded in the identified program statement text, and the text recognition method or result can be optimized, and the recognition result can be selected within the value range of the function type text.

[0056] In an image used to generate a program statement, using an easily recognizable visual identifier or replacement text to replace characters, indents or hidden characters with a high recognition error rate in the program statement, wherein the replacement text is a pre-set text used to replace characters, indents or hidden characters with a high recognition error rate in the program statement, and the visual identifier is a pre-set visual identifier that can be recognized by computer vision and is used to replace characters, indents or hidden characters with a high recognition error rate in the program statement;

[0057] Identify the visual logo or text alternative;

[0058] The visual identifier or replacement text is converted into characters with a high recognition error rate, indentation or hidden characters in the replaced program statement.

[0059] The technical solution of the embodiment of the present invention is described in detail below with reference to the accompanying drawings.

[0060] In one embodiment, by identifying the visual features of the text itself, a corresponding method or product for text recognition or processing is determined. Figure 2 As shown, the color of the text is used as a visual feature, black represents letters, green represents symbols, and yellow represents numbers. When performing text recognition, the color of the text is first recognized, and then the corresponding text recognition method or product is selected according to the color of the text. In another embodiment, the method or product for text processing is determined according to the color of the text. After completing the text recognition, the font of each character in the recognized text can be edited according to the color of each text in the image. For example, in another embodiment, the background color of the text is used as a visual feature, and the corresponding method or product for text recognition or processing is selected according to the background color of the text. In one embodiment, the background color of the characters in the text is changed using tools such as a fluorescent pen, a transparent or translucent covering (a transparent plate or a coating, etc.). In a text, different characters use fluorescent pens of different colors to change the background color, thereby realizing that different methods or products are used to recognize or process different characters in a text.

[0061] In one embodiment, a corresponding text recognition method or product is selected by recognizing visual features other than text. Figure 3 As shown, the QR code can be used as a visual feature, and different QR codes can be used to represent different types of text such as Chinese characters, English, and tables. During recognition, the QR code is first recognized, and then the corresponding text recognition method or product is selected according to the QR code recognition result to recognize the text in the image. For another example, in another embodiment, the QR code can be used as a visual feature, and different QR codes can be used to represent text recognition products provided by different companies. During recognition, the QR code is first recognized, and then the corresponding text recognition product is selected according to the QR code to recognize the text in the image.

[0062] In one embodiment, the position of the text to be recognized in the image is determined based on the visual features, and a method or product for text recognition or processing corresponding to the position of the text to be recognized or recognized is determined, such as Figure 4As shown, two QR codes are used as visual identifiers, and the position of the text image in the image can be obtained according to the position of the QR codes in the image (the text image area in the figure), and the text image area is intercepted to obtain the text image, and the corresponding text recognition method or product can be determined according to the QR codes, and the text in the text image is recognized by the method or product. In another embodiment, two QR codes are used as visual identifiers, and the position of the text image in the image can be obtained according to the position of the QR codes in the image, and the text image is intercepted to obtain the text image, and the corresponding text processing method or product can be determined according to the QR codes, and the text image or the text generated by recognizing the text image is processed by the method or product, for example, the text image and the text are saved and the two are associated.

[0063] In one embodiment of the present invention, the background color is used to determine the position of the text to be identified in the image, and the corresponding method or product for text recognition or processing is determined. For example, the text with a yellow background in the image is processed by operation, the part of the image with a yellow background is identified, the yellow part is intercepted as the text image, and the method of identifying numbers and operators is selected to identify the numbers and operators in the text image. After the text is obtained, mathematical operations are performed according to the text content. In one embodiment of the present invention, the background color is used to determine the position of the text to be identified in the image, and a QR code is used as a visual identifier to determine the corresponding method or product for text recognition or processing.

[0064] In another embodiment of the present invention, Figure 5 As shown, the square area directly above the visual logo is the text image area.

[0065] In another embodiment, one or more visual features may correspond to one or more locations, respectively, and one or more methods or products for text recognition or processing may be used.

[0066] In an embodiment of the present invention, the recognized text can be used to generate program statements, such as Figure 6 As shown, "print(B)" is recognized according to the image, and then a line break is added to the end of the sentence according to the preset program statement generation rule to generate a program statement.

[0067] In one embodiment of the present invention, visual identification is used to determine the indentation of program statements that are difficult to accurately identify, such as Figure 7 As shown, the visual identifier (here is a QR code) is recognized to determine that this statement has an indentation, and the image is recognized to generate the text "print(B)". According to the preset program statement generation rules, an indentation is concatenated with the text "print(B)", and a line break is added to the end of the sentence to generate a program statement.

[0068] In one embodiment of the present invention, only visual identifiers may be used to replace program statement components, such as Figure 8 As shown, each visual identifier corresponds to a certain program statement constituent element. The visual identifier is identified to determine the position of each visual identifier in the image and the corresponding program statement constituent element. The program statement constituent elements are concatenated from left to right according to the position of the visual identifier in the image, and a line break is added at the end of the sentence to generate a program statement.

[0069] In one embodiment, the text area can be divided into multiple columns according to the visual mark, and the number of indents of each line of text is determined according to the column where the starting position of the line is located. After the text is recognized, it is used as the program statement text, and a line break is added to the end of the sentence. The indentation + program statement text + line break together constitute a complete program statement. Fig. 9 As shown in the figure, the text area is divided into six columns. The first line of text starts at the first column, and the program statement indent is zero. The second line of text starts at the second column, and the program statement indent is one. Combined with the results of text recognition and adding a line break at the end of the sentence, a program statement paragraph is finally generated:

[0070] “for i in range(1,5):

[0071] print(i)"

[0072] In one embodiment, different visual features are used to represent different indentation amounts, such as Fig.10 As shown, in one embodiment, the target image has four positioning marks at the four corners, and the area for identifying the text is determined according to the positioning marks. The area for identifying the text is divided into nine rows and two columns. The left column is used to display visual features (in the embodiment of the present invention, a QR code is used as a visual mark to display the visual features), and different indentations are determined according to different visual features (the indentation is zero when there is no QR code, and the indentation is determined according to the corresponding value of the QR code when there is a QR code), and the right column is used to display the program statement text. During identification, it is identified line by line from top to bottom. First, the indentation of the current line is determined according to the QR code, and then the text in the second column is identified to generate the program statement text, and finally a line break is added. After the identification of each line is completed, the program statements of each line are connected into a program statement paragraph.

[0073] In summary, by using the embodiments of the present invention, users can use visual features to simply change the method or product of text recognition, thereby improving the accuracy of text recognition, and can use visual identification to process the recognized text. Furthermore, programs can be written and executed by writing (or printing) program texts, thereby facilitating the cultivation of programming skills while protecting eyesight.

[0074] System Example 1

[0075] According to an embodiment of the present invention, a system for optimizing text recognition or processing using visual features is provided, comprising:

[0076] A camera device for capturing images;

[0077] A processor is used to implement the steps of the method for optimizing text recognition or processing by using visual features as described in the above method embodiment when executing.

[0078] System Example 2

[0079] The embodiment of the present invention provides a system for optimizing text recognition or processing using visual features. Fig.11 is a schematic diagram of a system for optimizing text recognition or processing using visual features according to an embodiment of the present invention. Fig.11 As shown, specifically including:

[0080] A recognition module 110, configured to recognize visual features in an image and obtain a recognition result based on the visual features;

[0081] A determination module 112, configured to select a method or product for text recognition or processing corresponding to the recognition result;

[0082] The text generation or processing module 114 is used to recognize images and generate text using the method or product for text recognition or processing, and / or process the text or image.

[0083] This system is a system embodiment corresponding to the above-mentioned method embodiment. The specific description can be understood by referring to the method embodiment and will not be repeated here.

[0084] Device Example 1

[0085] The embodiment of the present invention provides a device for writing a program language text, which can be a paper or a whiteboard, and specifically includes:

[0086] A program writing area is used to write or print (e.g., print, stamp, etc.) program statements;

[0087] The visual feature area is used to display visual features (by writing, painting, drawing, printing, placing, etc.), and the visual features are used to determine the method or product for text recognition or processing corresponding to the program writing area or one or more positions in the program writing area.

[0088] like Fig.12As shown, the program writing area is composed of white spaces, and the visual feature area is composed of three black lines and two white lines. When in use, text can be written in the writing area by handwriting, printing, or printing, and the program statement constituent elements corresponding to the text in the program writing area directly above can be marked by filling in the white part of the visual feature area. In this embodiment, the two white lines in the visual feature area are both white to represent letters or blanks, the upper one is black to represent symbols, the lower one is black to represent numbers, and both are black to represent functions or reserved words. During recognition, the visual features of the visual feature area are first recognized, and then the text content of the program writing area above it is recognized. Fig.12 In the figure, the two white lines in the visual feature area below A are both white, indicating that the content to be recognized in the area where A is located is a letter or a blank, so the model for recognizing letters is called to recognize the area where A is located. Correspondingly, the visual features below "=" and "+" indicate that the recognized object is a symbol, and the visual features below "1" indicate that the recognized object is a number.

[0089] like Fig.13 As shown, by filling the white part of the visual feature area with black, the program statement constituent elements corresponding to the text in the program writing area directly above are marked. For example: two white lines are white for letters, the upper one is black for numbers, the lower one is black for symbols, and both are black for functions or reserved words.

[0090] Device Example 2

[0091] An embodiment of the present invention provides an electronic device, such as Fig.14 As shown, it includes: a memory 140, a processor 142, and a computer program stored in the memory 140 and executable on the processor 142. When the computer program is executed by the processor 142, the steps described in the method embodiment are implemented.

[0092] Device Example 3

[0093] An embodiment of the present invention provides a computer-readable storage medium, on which a program for implementing information transmission is stored. When the program is executed by the processor 142, the steps described in the method embodiment are implemented.

[0094] The computer-readable storage medium in this embodiment includes, but is not limited to, ROM, RAM, magnetic disk or optical disk, etc.

[0095] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. The technical solution according to the implementation method of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, or a network device, etc.) to execute the above method according to the implementation method of the present invention.

[0096] The software product may be any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0097] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0098] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on the remote computing device. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0099] Those skilled in the art will appreciate that the above modules can be distributed in the device according to the description of the embodiment, or can be changed accordingly and only used in one or more devices different from the embodiment. The modules of the above embodiments can be combined into one module, or further divided into multiple sub-modules.

[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for optimizing text recognition or processing using visual features, characterized in that: include: Recognize visual features in the image, and obtain recognition results based on the visual features; Based on the recognition result, determining a method or product for text recognition or processing corresponding thereto; The method or product for text recognition or processing is used to recognize images to generate text, and / or process text or images.

2. The method according to claim 1, characterized in that Based on the recognition result, a corresponding method or product for text recognition or processing is determined, specifically including: Based on the recognition result, determining the position of the text to be recognized or processed in the image, and determining a method or product for text recognition or processing corresponding thereto; Using the method or product for text recognition or processing, recognizing images to generate text, and / or processing text or images, specifically includes: Acquire a text image according to the position of the text to be recognized or processed in the image; The corresponding method or product for text recognition or processing is used to recognize text images to generate text, and / or process text or text images.

3. The method according to claim 1 or 2, characterized in that: The text is a program statement text, wherein various program statement constituent elements correspond to the same or different text recognition methods or products, and the program statement constituent elements specifically include: numbers, letters, Chinese characters, symbols, functions, variables, indentation information in one or more program statements, one or more complete program statements, one or more program statement paragraphs, any part of one or more program statements and / or special characters required in one or more program texts.

4. The method according to claim 1 or 2, characterized in that: The method further comprises: The text and / or program statement text are processed by generating operation instructions using visual features or input control signals.

5. The method according to claim 3, characterized in that: The method further comprises: A program statement or a program statement paragraph is generated according to the text and a preset program statement generation rule.

6. The method according to claim 3, characterized in that The method further comprises: Determining a possible range of text recognition results according to the program statement constituent element type and / or the generated program statement text; Optimize the text recognition method or results based on the possible range of text recognition results.

7. The method according to claim 3, characterized in that The method further comprises: In an image used to generate a program statement, using an easily recognizable visual identifier or replacement text to replace characters, indents or hidden characters with a high recognition error rate in the program statement, wherein the replacement text is a pre-set text used to replace characters, indents or hidden characters with a high recognition error rate in the program statement, and the visual identifier is a pre-set visual identifier that can be recognized by computer vision and is used to replace characters, indents or hidden characters with a high recognition error rate in the program statement; Identify the visual logo or text alternative; The visual identifier or replacement text is converted into characters with a high recognition error rate, indentation or hidden characters in the replaced program statement.

8. A system for optimizing text recognition or processing using visual features, characterized in that: Specifically include: A camera device, used for capturing an initial image; A processor, configured to implement the steps of the method for optimizing text recognition or processing using visual features as described in any one of claims 1 to 7 when executed.

9. A system for optimizing text recognition or processing using visual features, characterized in that: The system specifically comprises: A recognition module, used to recognize visual features in an image and obtain recognition results based on the visual features; A determination module, configured to select a method or product for text recognition or processing corresponding to the recognition result; The text generation or processing module is used to utilize the method or product for text recognition or processing to recognize images to generate text, and / or process the text or image.

10. A device for writing a text in a programming language, characterized in that Specifically include: Program writing area, used for writing or printing program statements; The visual feature area is used to display visual features, and the visual features are used to determine the method or product for text recognition or processing corresponding to the program writing area or one or more positions in the program writing area.

11. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the method for optimizing text recognition or processing using visual features as described in any one of claims 1 to 7 are implemented.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an implementation program for information transmission, and when the program is executed by a processor, the steps of the method for optimizing text recognition or processing using visual features as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Text recognition method, electronic equipment and storage device

    CN112949653A

  • Text recognition method and training method and device of visual feature extraction model

    CN113657395A

  • Physical desktop interaction method, system and device based on visual positioning identifier

    CN115686201A

  • Data processing method and device, equipment, program product and storage medium

    CN115880702A