WO2023051384A1 - 显示方法、信息发送方法和电子设备 - Google Patents
显示方法、信息发送方法和电子设备 Download PDFInfo
- Publication number
- WO2023051384A1 WO2023051384A1 PCT/CN2022/120596 CN2022120596W WO2023051384A1 WO 2023051384 A1 WO2023051384 A1 WO 2023051384A1 CN 2022120596 W CN2022120596 W CN 2022120596W WO 2023051384 A1 WO2023051384 A1 WO 2023051384A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- information
- image
- electronic device
- text
- target
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 116
- 230000004044 response Effects 0.000 claims abstract description 25
- 230000011218 segmentation Effects 0.000 claims description 19
- 238000012545 processing Methods 0.000 claims description 13
- 238000004891 communication Methods 0.000 claims description 10
- 238000001514 detection method Methods 0.000 claims description 10
- 230000003628 erosive effect Effects 0.000 claims description 9
- 230000000916 dilatatory effect Effects 0.000 claims description 7
- 230000004927 fusion Effects 0.000 claims description 7
- 238000000605 extraction Methods 0.000 claims description 4
- 230000008569 process Effects 0.000 description 25
- 230000006870 function Effects 0.000 description 15
- 238000010586 diagram Methods 0.000 description 12
- 238000012015 optical character recognition Methods 0.000 description 10
- 238000013518 transcription Methods 0.000 description 7
- 230000035897 transcription Effects 0.000 description 7
- 230000003044 adaptive effect Effects 0.000 description 6
- 230000000694 effects Effects 0.000 description 6
- 239000000284 extract Substances 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 4
- 238000012790 confirmation Methods 0.000 description 4
- 238000007781 pre-processing Methods 0.000 description 4
- 230000010339 dilation Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000012937 correction Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 241000699670 Mus sp. Species 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000008802 morphological function Effects 0.000 description 1
- 230000001915 proofreading effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
- G06F3/04812—Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
- G06F3/0483—Interaction with page-structured environments, e.g. book metaphor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
Definitions
- the application belongs to the technical field of identification, and specifically relates to a display method, an information sending method and electronic equipment.
- the commonly used method is to read and type while reading, copying the text and/or forms in the paper document into the office application software of electronic equipment one by one, and checking and proofreading at regular intervals during the process , so as to avoid problems such as multiple characters, missing characters or typos. For example, if it takes at least 15-20 minutes to transcribe the content of a paper document of about 500 words to an electronic device, it takes a long time to transcribe the content, resulting in low transcription efficiency.
- the purpose of the embodiments of the present application is to provide a display method, an information sending method and an electronic device, which can solve the problem of low efficiency of transcribing information in an image to the electronic device.
- the embodiment of the present application provides a display method, which is executed by the first electronic device, and the method includes:
- the first information includes a target image or first identification information obtained by identifying the target image
- the target information is obtained by identifying the target image by the first information or the first electronic device the second identification information.
- an embodiment of the present application provides a method for sending information, which is executed by a second electronic device, and the method includes:
- the first information includes a target image or first identification information obtained by identifying the target image, and the target image is used for the
- the first electronic device displays or is used for the first electronic device to identify the second identification information of the target image and displays the second identification information on the text editing interface of the first electronic device, the second identification information
- the identification information is used for displaying on the text editing interface of the first electronic device.
- an embodiment of the present application provides a display device, the device comprising:
- the first receiving module is configured to receive a first input to the first control in the text editing interface
- a first sending module configured to send a first instruction to a second electronic device in response to the first input
- a second receiving module configured to receive first information sent by the second electronic device based on the first instruction
- a first display module configured to display target information in the text editing interface
- the first information includes a target image or first identification information obtained by identifying the target image
- the target information is the first information or the first identification information obtained by identifying the target image by the first electronic device. 2. Identification information.
- the embodiment of the present application provides an information sending device, the device comprising:
- a third receiving module configured to receive a first instruction sent by the first electronic device, where the first instruction is used to instruct the second electronic device to perform image acquisition;
- a second sending module configured to send first information to the first electronic device in response to the first instruction, where the first information includes a target image or first identification information obtained by identifying the target image,
- the target image is used for display or for the first electronic device to identify the first electronic device to obtain the second identification information of the target image and display the second identification information on the text editing interface of the first electronic device.
- Two identification information, the first identification information is used for displaying on the text editing interface of the first electronic device.
- the embodiment of the present application provides an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, and the program or instruction is executed by When the processor is executed, the steps of the method described in the first aspect are realized, or the steps of the method described in the second aspect are realized.
- an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented Or implement the steps of the method as described in the second aspect.
- the embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions, so as to implement the first aspect The steps of the method or the steps of implementing the method as described in the second aspect.
- an embodiment of the present application provides a computer software product, the computer software product is stored in a storage medium, and the computer software product is executed by at least one processor to implement the method described in the first aspect Steps or steps for implementing the method as described in the second aspect.
- the embodiment of the present application provides an electronic device configured to implement the steps of the method described in the first aspect or implement the steps of the method described in the second aspect when executed.
- the first electronic device can receive the second electronic device's response based on the first instruction by sending the first instruction to the second electronic device.
- the target image, the first identification information or the second identification information is displayed on the editing interface, so that the information in the target image can be transcribed into the text editing interface of the second electronic device, and the efficiency of transcribing the information in the image can be improved.
- Fig. 1 is one of the flowcharts of the display method provided by the embodiment of the present application.
- FIG. 2 is a flowchart of an information sending method provided by an embodiment of the present application.
- Fig. 3 is one of the flowcharts of the display method provided by the embodiment of the present application.
- Fig. 4 is one of the interface diagrams of the second electronic device provided by the embodiment of the present application.
- Fig. 5 is one of the interface diagrams of the first electronic device provided by the embodiment of the present application.
- Fig. 6 is the second interface diagram of the first electronic device provided by the embodiment of the present application.
- Fig. 7 is the third interface diagram of the first electronic device provided by the embodiment of the present application.
- Fig. 8 is the second flowchart of the display method provided by the embodiment of the present application.
- FIG. 9 is the fourth interface diagram of the first electronic device provided by the embodiment of the present application.
- Fig. 10 is the fifth interface diagram of the first electronic device provided by the embodiment of the present application.
- Fig. 11 is a schematic diagram of a display device provided by an embodiment of the present application.
- Fig. 12 is a schematic diagram of an information sending device provided by an embodiment of the present application.
- Fig. 13 is one of the structural schematic diagrams of the electronic device provided by the embodiment of the present application.
- Fig. 14 is the second structural schematic diagram of the electronic device provided by the embodiment of the present application.
- FIG. 15 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
- the present application provides a display method of an embodiment, executed by a first electronic device, the method includes:
- Step 101 Receive a first input to a first control in a text editing interface.
- a text editing interface is displayed on the first electronic device, and the text editing interface may be an editing interface of an office application in the first electronic device, which is not limited in this embodiment.
- the text editing interface includes a first control, and the user can perform a first input on the first control.
- the first input is not limited in this embodiment, for example, it may be a click input.
- Step 102 Send a first instruction to the second electronic device in response to the first input.
- the first instruction may be used to instruct the second electronic device to acquire the image, and may also be used to instruct the second electronic device to recognize the acquired target image and so on.
- the first instruction is sent to the second electronic device, so that the second electronic device acquires the image, or the second electronic device recognizes the acquired target image to obtain the first identification information.
- Step 103 Receive first information sent by the second electronic device based on the first instruction.
- the first information includes the target image or first identification information obtained by identifying the target image.
- the second electronic device After the second electronic device receives the first instruction, it can obtain the target image, and can send the target image to the first electronic device, and the first electronic device receives the target image, or the second electronic device obtains the target image and then recognizes the target image to obtain the second electronic device.
- identification information and send the first identification information to the first electronic device, that is, the first electronic device can receive the first identification information.
- the first electronic device may be a mobile electronic device
- the second electronic device may be a non-mobile electronic device.
- Step 104 Display target information in the text editing interface.
- the target information is the first information or the second identification information obtained by identifying the target image by the first electronic device.
- the first electronic device can display the target image in the text editing interface, or can identify the target image to obtain the second identification information of the target image, and display the second identification information in the text editing interface If the first electronic device receives the first identification information obtained by identifying the target image from the second electronic device, it can display the first identification information in the text editing interface, so as to copy the information in the target image to the second electronic device.
- the identification information includes, but is not limited to, at least one of text information and tables.
- the first electronic device can receive the second electronic device's response based on the first instruction by sending the first instruction to the second electronic device.
- the target image, the first identification information or the second identification information is displayed on the editing interface, so that the information in the target image can be transcribed into the text editing interface of the second electronic device, and the efficiency of transcribing the information in the image can be improved.
- the method before receiving the first input to the first control in the text editing interface, the method further includes:
- Receive the first input to the first control in the text editing interface including:
- a first input for a target option is received.
- the first control may be a target option for indicating that information is added through the second electronic device, and after receiving the first input of the target option, the first instruction may be sent to the second electronic device, so that The second electronic device performs image acquisition, so that the second electronic device sends the acquired target image or the first identification information obtained by identifying the target image.
- the operation is simple and convenient for users to operate, thereby improving the display of the target image in the text editing interface.
- the information achieves the efficiency of information transcription.
- the text editing interface after receiving the first input to the first control in the text editing interface, it further includes: displaying a text editing box in the text editing interface;
- Display target information in the text editing interface including:
- the display of the text editing box is closed, and the target information is displayed in the text editing interface.
- the text edit box is first displayed in the text edit box, and after obtaining the target image, the first identification information or the second identification information, it can be displayed in the text edit box first, and the text edit box also includes The second control, the user can check the identification information in the text edit box, and if the check is correct, the second input can be performed on the second control, for example, the second control can be a confirmation control, etc., and the second input can be click input etc., and then in response to the second input, the text editing box in the text editing interface is closed and displayed, and the target information is displayed in the text editing interface.
- a text edit box in the text editing interface it may be to display the text edit box at the position corresponding to the input cursor in the text editing interface, and to display the target information in the text editing interface, it may be to enter the cursor in the text editing interface
- the corresponding position is the starting position, and the target information is displayed.
- the first character in the text information is displayed to the starting position, and the rest of the characters are displayed in sequence and positional relationship.
- the first information includes an image of the target
- the method Before displaying the target information on the text editing interface, the method further includes: identifying the target image to obtain second identification information.
- the target image can be displayed in the text editing interface, or the target image can be identified to obtain the second identification information, and the second identification information can be displayed in the text editing interface to The information of the target image is transcribed into the text editing interface for users to view.
- the process of the first electronic device identifying the received target image to obtain the second identification information can refer to the process of the second electronic device identifying the target image, that is, the first electronic device
- the process for the device to identify the target image to obtain the second identification information is similar to the process for the second electronic device to identify the target image to obtain the first identification information. , the latter is the second electronic device, therefore, the process of the first electronic device identifying the target image to obtain the second identification information will not be repeated here.
- the method before sending the first instruction to the second electronic device, the method further includes:
- the user can create a wireless local area network (Wireless Local Area Network, WLAN) in the second electronic device, and the first electronic device can connect to the wireless local area network created by the second electronic device in the wireless fidelity (Wireless Fidelity, WIFI) setting to realize the second A connection between an electronic device and a first electronic device.
- WLAN Wireless Local Area Network
- WIFI wireless Fidelity
- connection method compared with the connection method using Bluetooth or Near Field Communication (NFC), it has higher stability, and can achieve the effect of millisecond-level real-time synchronization of "on-the-spot shooting and transmission", which can improve The efficiency with which the identification information of the target image is transcribed in the first electronic device.
- NFC Near Field Communication
- the present application also provides an information sending method in an embodiment, which is executed by the second electronic device, and the method includes:
- Step 201 Receive a first instruction sent by a first electronic device
- Step 202 Send first information to the first electronic device in response to the first instruction
- the first information includes the target image or the first identification information obtained by identifying the target image, the target image is used for display by the first electronic device or the second identification information of the target image is obtained by the first electronic device for identification and displayed on the first electronic device
- the text editing interface of the device displays the second identification information, and the first identification information is used for displaying on the text editing interface of the first electronic device.
- the target image may be an image captured by the first electronic device after receiving the first instruction, or an image pre-stored in the first electronic device, or a Portable Document Format (PDF) file, etc. .
- the first instruction is a first instruction sent by the first electronic device in response to a first input to the first control of the text editing interface in the first electronic device.
- the second electronic device receives the first instruction sent by the first electronic device, it acquires the target image and sends the information to the first electronic device.
- the target image can be used for display by the first electronic device, or for the first electronic device to identify the second identification information of the target image and display the second identification information on the text editing interface of the first electronic device, or the second
- the electronic device can identify the target image to obtain the first identification information, and send the first identification information to the first electronic device, and the first identification information can be displayed on the text editing interface of the first electronic device.
- the information in the target image can be transcribed into the text editing interface of the second electronic device, and the efficiency of transcribing the information in the image can be improved.
- the first information includes first identification information, and before sending the first identification information to the first electronic device, it further includes:
- character recognition is performed on the multiple sub-images to obtain text information, wherein the first identification information includes text information.
- the first image is the area image where the line text exists, that is, the line text area image, that is, the target image is line-segmented (or horizontally segmented), and the starting point and end point of each line of text are first found to locate the line of text area
- the image from the first non-blank position of a certain line (that is, the position where there is a word) to the first blank position where the line appears (that is, the position without a word), is positioned as the area where the line text exists.
- perform character segmentation on the first image which can also be understood as column segmentation or vertical segmentation, to obtain a single character image, that is, a sub-image.
- Extract text feature information from each sub-image use the text feature information of multiple sub-images to perform text recognition on multiple sub-images to obtain text information, that is, perform text recognition on each sub-image to obtain multiple text recognition information, the above
- the text information may include information obtained by combining text identification information of multiple sub-images. It should be noted that the combination here refers to combining the character recognition information of multiple sub-images according to the positional relationship of the multiple sub-images.
- the target image is first segmented into lines, and then characters are segmented to obtain multiple sub-images, and text recognition is performed on multiple sub-images to obtain the recognized text information.
- the user only needs to use
- the second electronic device obtains the target image and performs text recognition, and the first electronic device can obtain the recognized text information and add it to the text editing interface.
- the whole process is simple, efficient and convenient. Compared with the traditional solution, which also transcribes about 500 words of content, after testing, the traditional solution takes at least 15-20 minutes, and the application solution only takes about 2 minutes. It solves the problems of time-consuming and typos, improves transcription efficiency and accuracy, and solves the pain point that users cannot efficiently transcribe Chinese text information from paper documents to the first electronic device, and the overall office efficiency has been greatly improved.
- the first information includes first identification information, and before sending the first identification information to the first electronic device, it further includes:
- the target image includes at least one horizontal line
- the third image includes at least one vertical line
- the first identification information includes the table and text information.
- the images can be corroded and collided by using different structural elements to obtain line images in different directions, for example, using horizontal line structural elements to sequentially Erosion and dilation can obtain a second image including horizontal lines, and the vertical line structural element sequentially erodes and dilates the target image to obtain a third image including at least one vertical line. Then the second image and the third image are fused to obtain a fused image, so that the obtained fused image includes at least one horizontal line and at least one vertical line, and the intersecting horizontal lines and vertical lines have intersection points, that is, intersection points , the intersection point can be used as an anchor point to provide a basis for subsequent table extraction.
- the table can be extracted from the fused image through the intersection points.
- the table includes table cells surrounded by lines. There may be text in the table cells of the target image, and the text in the table cells of the table in the target image can be identified, and the obtained text information.
- the image is morphologically processed by erosion and dilation to obtain a second image including horizontal lines and a third image including vertical lines, which are fused to obtain a fused image, and table extraction is performed on the fused image,
- the table and text in the image can be transcribed into the text editing interface of the first electronic device, and the efficiency of transcribing information in the image can be improved.
- the first electronic device before sending the first information to the first electronic device, it further includes:
- the binary image is rotated and corrected to obtain the target image.
- the fourth image is an image that needs to be identified.
- the fourth image needs to be binarized to obtain a binary image, and then the tilt angle of the binary image can be detected.
- the binary image can be detected by the Hough transform method.
- the inclination angle of the value image using the inclination angle, performs rotation correction on the binary image to obtain the target image, and sends the target image to the first electronic device, so that the first electronic device can recognize the target image, or obtain the target image after subsequent correction.
- the target image is identified, and the first identification information is obtained and sent to the first electronic device, so as to improve the accuracy of image identification.
- the first electronic device before sending the first identification information to the first electronic device, it further includes:
- the target image is recognized by an off-line optical character recognition method to obtain first recognition information.
- the optical character recognition method is pre-integrated in the second electronic device, and after receiving the first instruction, the target image can be recognized by the offline optical character recognition method to obtain the first identification information, so that the second Electronic equipment performs image recognition to improve the efficiency of recognition.
- wireless local area network it is a network established in a local area by using wireless communication technology. It uses wireless multi-access channels as the transmission medium to provide the functions of traditional wired local area network (Local Area Network, LAN), so that the connection of the network is no longer necessary. It is a simple cable connection, which can move or change with the development of computer users, and provides the possibility for mobile communication, personalization and multimedia applications.
- LAN Local Area Network
- Optical Character Recognition refers to electronic devices (such as mobile phone cameras or digital cameras) to check the characters printed on paper, determine their shape by detecting dark and bright patterns, and then use the character recognition method to The process of translating shapes into computer text.
- Table recognition is based on the ability to focus on OCR, recognize the text in the image, and detect the structural information of the table.
- the table in the above recognition information can be understood as the structural information of the table, which can include cell information. Position information and the number of rows and columns occupied by the cell, and identify the text information in each cell.
- Edge computing refers to providing the nearest end service at a location close to the device (data source). Its network service response can be faster, and it has the advantages of real-time, security and privacy protection.
- the second electronic device is a near-end device of the first electronic device. The second electronic device performs recognition calculation on the target image, that is, edge calculation, to obtain the first identification information and send it to the first electronic device. equipment.
- the text editing interface is a text editing interface of office application software (eg, word, specially developed office application software, etc.), the first electronic device is a computer, and the second electronic device is a mobile phone.
- office application software eg, word, specially developed office application software, etc.
- the first electronic device is a computer
- the second electronic device is a mobile phone.
- the process of the display method in this embodiment is as follows:
- Step 301 the user creates a wireless local area network in the computer, and the mobile phone connects to the wireless local area network created by the computer.
- Step 302 the user turns on the camera of the mobile phone, and the status information of "connected to the computer" appears on the camera interface 410 .
- FIG. 4 Indicates that the data transmission channel between the mobile phone camera and the computer has been communicated, as shown in FIG. 4 , which includes a shooting control 411 .
- this connection method compared with the way of using Bluetooth or NFC near-field communication to realize the connection between the mobile phone and the computer, it has higher stability, and can achieve the effect of millisecond-level real-time synchronization of "on-the-spot shooting and transmission" and improve the accuracy of text in images. Efficiency of transcription.
- Step 303 the user selects the first control 511 of “add via mobile phone” on the text editing interface 510 of the office application software on the computer, and a text editing box 512 is displayed on the text editing interface 510 .
- Step 304 the user shoots the paper document in the real office environment through the mobile phone camera, clicks the shooting control 411 to complete the shooting, and obtains the fourth image;
- Step 305 The background of the mobile phone silently recognizes and extracts the text in the fourth image, and sends it to the computer.
- the mobile phone's image processing method and text recognition method help to ensure that the text in paper documents such as contract documents and books can be extracted more completely, reducing the impact of paper background color on text recognition , Guarantee the integrity of the entire text detection, and improve the accuracy of text recognition. Satisfy the pursuit of the goal of instant shooting and instant shooting.
- the specific steps of text recognition are as follows:
- Preprocessing Preprocessing the fourth image using "adaptive binarization technology", for example, using the adaptive threshold function (adaptive_threshold) and (scikit-image ) framework to adjust the fourth image, the adaptive thresholding function is to binarize the fourth image, for example, take the threshold value as 125, so that the gray value of the fourth image is less than or equal to 125 becomes 0 (black ), the grayscale value greater than 125 becomes 255 (white), which can retain white pixels in high gradient areas and black pixels in low gradient areas. At this time, a high-contrast sample image, that is, a binary image can be obtained.
- adaptive_threshold adaptive threshold function
- scikit-image scikit-image
- the target image can be obtained after cropping.
- Text detection through two steps of "line segmentation” and "character segmentation".
- Line segmentation first find the start point and end point of each line of text to locate the line of text area, from the first non-blank position (that is, the position where there is a word) to the first blank position (that is, there is no word) position), defined as the area where the line text exists.
- Character segmentation longitudinally segmenting a line of text to obtain a single text image, that is, a sub-image.
- Text recognition extract the text feature information of each sub-image, perform template rough classification and template fine matching between the text feature information of each sub-image and the feature template library, identify the specific text, and obtain the text recognition information of each sub-image.
- Step 306 the user checks the text information transmitted from the mobile phone in the text editing box of the office application software, and after confirming that it is correct, clicks the confirmation control 513 to display the identification information in the text editing interface of the office application software.
- the user only needs to use the native camera of the mobile phone to shoot the text content in the paper document, and the computer can obtain the text information in the captured image and directly add it to the text editing interface of the office software.
- the whole process is simple , Efficient and convenient.
- the traditional solution which also transcribes about 500 words of content, after testing, the traditional solution takes at least 15 to 20 minutes, and the application solution only takes 2 minutes. It not only solves the problems of time-consuming and typos, but also solves the pain point that users cannot efficiently transcribe Chinese text information from paper documents to computer office software, and the overall office efficiency has been greatly improved.
- steps 801-806 correspond one-to-one to the above-mentioned steps 301-304, and will not be repeated here.
- Step 805 the background of the mobile phone silently recognizes and extracts the form in the target image, and sends the form and the text information in the form to the computer;
- the mobile phone's image processing method and form recognition method help to ensure that the forms in paper documents such as contract documents and books can be extracted more completely. It can reduce the impact of form distortion caused by paper distortion on form recognition. Even if there are multiple forms on one image, it can also ensure the integrity of all form detection and improve the accuracy of form recognition and text in the form. It satisfies the pursuit of the invention for the goal of getting it immediately and passing it on now.
- the specific steps of form recognition are as follows:
- Preprocessing Use "adaptive binarization technology" to preprocess the fourth image.
- the adaptive threshold function is to The fourth image is binarized.
- the threshold value is 125, so that the gray value in the fourth image is less than or equal to 125 and becomes 0 (black), and the gray value greater than 125 becomes 255 (white). Realize that the high gradient area retains white pixels, and the low gradient area retains black pixels. At this time, a high-contrast sample image, that is, a binary image can be obtained.
- the target image can be obtained after cropping.
- the steps for obtaining lines in the vertical direction are the same as above, setting the structural elements of vertical lines, corroding first and then dilating to obtain the third image.
- the obtained second image and the third image are fused to obtain a fused image, and the horizontal and vertical lines in the fused image intersect to obtain intersection points, which can be used as positioning points.
- Form judgment For the fused image, use the contour search (findContours) function to fuse the contour of the image to judge whether the shape and size of the contour are a table. If so, combine the fitting polygon (approxPolyDP) function to approximate the area into a shape, that is, to extract In the form, the true value obtained after calculation indicates that the generated area is a closed area, and finally the boundingRect function is used to convert this area into a rectangle, which contains the input shape.
- contour search findContours
- Form generation transfer the identified form and the text information in the form to the computer through the connection channel between the mobile phone and the computer, and combine the form and the text information in the text editing box 512 of the office application software to complete the form Add, as shown in Figure 9.
- Step 806 the user checks the generated form and the text information in the form in the text editing box of the office application software, and after confirming that it is correct, clicks the confirmation control 513 to display the form and text information in the text editing interface 510 .
- the mobile phone camera is responsible for image acquisition, obtains the fourth image, and obtains the target image after preprocessing it, and sends the target image to
- the optical character recognition algorithm of the mobile phone system performs calculation processing in the form of edge computing, performs text detection and text recognition processing on the target image, or performs form detection and recognition on the target image, and extracts the form.
- the text information or form is transmitted to the computer through the connection channel between the mobile phone and the computer, and input to the text editing interface of the computer's office application software to realize the transcription of the information in the image and improve the efficiency of information transcription.
- the method of this embodiment can not only be applied to the transcription requirements of the way of taking pictures and transmitting texts, but also expand the application scenarios to extract texts and forms from photos in mobile phone albums, extract texts and forms from mobile PDF files, etc. It is not only easy to operate, but also It can obtain target information with high accuracy and high integrity.
- a display device 1100 of an embodiment is provided, which is applied to a first electronic device.
- the display device 1100 includes:
- the first receiving module 1101 is configured to receive a first input to the first control in the text editing interface
- the first sending module 1102 is configured to send the first instruction to the second electronic device in response to the first input;
- the second receiving module 1103 is configured to receive the first information sent by the second electronic device based on the first instruction
- the first information includes a target image or first identification information obtained by identifying the target image
- the target information is the first information or second identification information obtained by identifying the target image by the first electronic device.
- the display device 1100 further includes:
- the second display module is used for the first receiving module 1101 to display on the text editing interface the target option for indicating the addition of information through the second electronic device before receiving the first input to the first control in the text editing interface;
- Receive the first input to the first control in the text editing interface including:
- a first input for a target option is received.
- the display device 1100 further includes:
- the third display module is used for displaying the text edit box in the text edit interface after the first receiving module receives the first input to the first control in the text edit interface;
- the first display module 1104 includes:
- the first display submodule is used to display target information in the text edit box
- a fourth receiving module configured to receive a second input to the second control in the text edit box
- the second display submodule is configured to close the display of the text editing box and display the target information in the text editing interface in response to the second input.
- the first information includes an image of the target
- the display device 1100 further includes: an identification module, used for the first display module 1104 to identify the target image to obtain the second identification information before displaying the target information in the text editing interface.
- the display device 1100 further includes:
- the connection module is configured to create a wireless local area network and establish a connection with the second electronic device through the wireless local area network before the first sending module 1102 sends the first instruction to the second electronic device.
- the display device 1100 in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal.
- the device may be a mobile electronic device.
- the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant). assistant, PDA), etc., which are not specifically limited in the embodiments of the present application.
- the display device in the embodiment of the present application may be a device with an operating system.
- the operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in this embodiment of the present application.
- the display device provided by the embodiment of the present application can implement the various processes implemented in the above-mentioned embodiment of the display method applied to the first electronic device, for example, can implement the various processes implemented in the method embodiment in FIG. 1 . In order to avoid repetition, details are not repeated here. .
- an information sending device 1200 is provided, which is applied to a second electronic device, and the device 1200 includes:
- the third receiving module 1201 is configured to receive the first instruction sent by the first electronic device
- the second sending module 1202 is configured to send first information to the first electronic device in response to the first instruction, the first information includes a target image or first identification information obtained by identifying the target image, and the target image is used for display or
- the first electronic device recognizes the second identification information of the target image and displays the second identification information on the text editing interface of the first electronic device, and the first identification information is used in the text editing interface of the first electronic device show.
- the first information includes first identification information
- the information sending device 1200 further includes:
- the first segmentation module is used to perform row segmentation on the target image to obtain a plurality of first images
- the second segmentation module is used to perform character segmentation on multiple first images to obtain multiple sub-images
- An extraction module used to extract text feature information of each sub-image in a plurality of sub-images
- the character recognition module is configured to perform character recognition on the multiple sub-images based on the character feature information of the multiple sub-images to obtain text information, and the first identification information includes the text information.
- the first information includes first identification information
- the information sending device 1200 further includes:
- the first processing module is used to sequentially erode and dilate the target image using horizontal line structural elements to obtain a second image, where the second image includes at least one horizontal line;
- the second processing module is used to sequentially erode and dilate the target image by using the vertical line structural element to obtain a third image, where the third image includes at least one vertical line;
- a fusion module configured to fuse the second image and the third image to obtain a fusion image
- the recognition sub-module is used to extract the table in the fusion image by fusing the intersection of at least one horizontal line and at least one vertical line in the image, and recognize the text in the table to obtain text information.
- the first identification information includes the table and text information .
- the information sending device 1200 further includes:
- An image acquisition module configured to acquire a fourth image
- a binary processing module configured to perform binary processing on the fourth image to obtain a binary image
- An angle detection module is used to detect the tilt angle of the binary image
- the rectification module is used to perform rotation rectification on the binary image through the tilt angle to obtain the target image.
- the information sending device 1200 further includes:
- the identification module is configured to identify the target image by an off-line optical character recognition method to obtain first identification information.
- the information sending apparatus 1200 in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal.
- the device may be a non-mobile electronic device.
- the non-mobile electronic device may be a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc. limited.
- the information sending device in the embodiment of the present application may be a device with an operating system.
- the operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in this embodiment of the present application.
- the information sending device provided in the embodiment of the present application can implement the various processes implemented in the above-mentioned embodiment of the information sending method applied to the second electronic device, for example, can implement the various processes implemented in the method embodiment in FIG. 2 . To avoid repetition, it is not repeated here Let me repeat.
- the embodiment of the present application also provides an electronic device 1300, including a processor 1301, a memory 1302, and a program or instruction stored in the memory 1302 and operable on the processor 1301.
- the program when the instructions are executed by the processor 1301, the processes of the above embodiments of the display method used in the first electronic device can be implemented, and the same technical effect can be achieved. To avoid repetition, details are not repeated here.
- the embodiment of the present application also provides an electronic device 1400, including a processor 1401, a memory 1402, and a program or instruction stored in the memory 1402 and operable on the processor 1401.
- the program when the instructions are executed by the processor 1401, the above-mentioned processes of the embodiment of the information sending method in the second electronic device can be achieved, and the same technical effect can be achieved. To avoid repetition, details are not repeated here.
- FIG. 15 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
- the electronic device 1500 includes but is not limited to: a radio frequency unit 1501, a network module 1502, an audio output unit 1503, an input unit 1504, a sensor 1505, a display unit 1506, a user input unit 1507, an interface unit 1508, a memory 1509, and a processor 1510, etc. part.
- the electronic device 1500 can also include a power supply (such as a battery) for supplying power to various components, and the power supply can be logically connected to the processor 1510 through the power management system, so that the management of charging, discharging, and function can be realized through the power management system. Consumption management and other functions.
- a power supply such as a battery
- the structure of the electronic device shown in FIG. 15 does not constitute a limitation to the electronic device.
- the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange different components, and details will not be repeated here. .
- the user input unit 1507 is configured to receive a first input to the first control in the text editing interface
- a radio frequency unit 1501 configured to send a first instruction to the second electronic device in response to the first input
- the display unit 1506 is also used to input target information in the text editing interface
- the first information includes a target image or first identification information obtained by identifying the target image
- the target information is the first information or second identification information obtained by identifying the target image by the first electronic device.
- the display unit 1506 is used for the user input unit 1507 to display on the text editing interface a target option for indicating that information is added through the second electronic device before the user input unit 1507 receives the first input to the first control in the text editing interface;
- Receive the first input to the first control in the text editing interface including:
- a first input for a target option is received.
- the display unit 1506 is further configured to display a text edit box in the text edit interface after the user input unit 1507 receives the first input to the first control in the text edit interface;
- the display unit 1506 is also used to display target information in the text edit box;
- the user input unit 1507 is further configured to receive a second input to the second control in the text edit box;
- the display unit 1506 is further configured to close the display of the text editing box and display the target information in the text editing interface in response to the second input.
- the first information includes an image of the target
- the processor 1510 is used for the display unit 1506 to identify the target image to obtain the second identification information before displaying the target information in the text editing interface.
- the network module 1502 is configured to create a wireless local area network and establish a connection with the second electronic device through the wireless local area network before the user input unit 1507 sends the first instruction to the second electronic device.
- the radio frequency unit 1501 is configured to receive a first instruction sent by the first electronic device.
- the first information includes a target image or first identification information obtained by identifying the target image, and the target image is used for display or used by the first electronic device.
- the device performs identification to obtain the second identification information of the target image and displays the second identification information on the text editing interface of the first electronic device, and the first identification information is used for displaying on the text editing interface of the first electronic device.
- the first information includes first identification information
- the processor 1510 is configured to:
- character recognition is performed on the multiple sub-images to obtain text information, where the first identification information includes the text information.
- the first information includes first identification information
- the processor 1510 is configured to:
- the target image includes at least one horizontal line
- the third image includes at least one vertical line
- the first identification information includes the table and text information.
- the processor 1510 is also used to:
- the binary image is rotated and corrected to obtain the target image.
- the processor 1510 is further configured to: use an offline optical character recognition method to recognize the target image to obtain first recognition information.
- the input unit 1504 may include a graphics processor (Graphics Processing Unit, GPU) 15041 and a microphone 15042, and the graphics processor 15041 is used for the image capture device (such as the image data of the still picture or video obtained by the camera) for processing.
- the display unit 1506 may include a display panel 15061, and the display panel 15061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
- the user input unit 1507 includes a touch panel 15071 and other input devices 15072 . Touch panel 15071, also called touch screen.
- the touch panel 15071 may include two parts, a touch detection device and a touch controller.
- Other input devices 15072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here.
- the memory 1509 can be used to store software programs as well as various data, including but not limited to application programs and operating systems.
- the processor 1510 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems, user interfaces, and application programs, and the modem processor mainly processes wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 1510 .
- the embodiment of the present application also provides a readable storage medium, the readable storage medium may be nonvolatile or volatile, the readable storage medium stores programs or instructions, and the programs or instructions are stored in When executed by the processor, each process of the foregoing method embodiments can be achieved, and the same technical effect can be achieved. To avoid repetition, details are not repeated here.
- the processor is the processor in the electronic device described in the above embodiments.
- the readable storage medium includes computer readable storage medium, such as computer read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
- the embodiment of the present application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above method embodiments , and can achieve the same technical effect, in order to avoid repetition, it will not be repeated here.
- chips mentioned in the embodiments of the present application may also be called system-on-chip, system-on-chip, system-on-a-chip, or system-on-a-chip.
- the term “comprising”, “comprising” or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase “comprising a " does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element.
- the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions are performed, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Character Input (AREA)
Abstract
本申请公开了一种显示方法、信息发送方法和电子设备,属于识别技术领域。该方法包括:接收对文本编辑界面中第一控件的第一输入;响应于第一输入,向第二电子设备发送第一指令;接收第二电子设备基于第一指令发送第一信息;在文本编辑界面中显示目标信息,第一信息包括目标图像或对目标图像进行识别得到的第一识别信息,目标信息为第一信息或第一电子设备对目标图像进行识别得到的第二识别信息。
Description
相关申请的交叉引用
本申请主张在2021年09月29日在中国提交的中国专利申请No.202111151213.0的优先权,其全部内容通过引用包含于此。
本申请属于识别技术领域,具体涉及一种显示方法、信息发送方法和电子设备。
在日常办公环境下,电子设备(例如电脑)是每个职场人日常办公的主要工具,经常会遇到需要将现实办公中纸质文件上的文字信息和/或表格抄录到电子设备的办公应用软件中的情况。目前,常采用的方法是边看边打字的方式,将纸质文档中的文字和/或表格逐个逐段抄录进电子设备办公应用软件上,这个过程中还需每间隔一定时长进行检查和校对,以免出现多字、漏字或错别字等问题。例如,若抄录约500字的纸质文件的内容到电子设备,至少需要15~20分钟,抄录内容的耗时较长,导致抄录的效率较低。
发明内容
本申请实施例的目的是提供一种显示方法、信息发送方法和电子设备,能够解决图像中信息抄录到电子设备的效率较低的问题。
第一方面,本申请实施例提供了一种显示方法,由第一电子设备执行,所述方法包括:
接收对文本编辑界面中第一控件的第一输入;
响应于所述第一输入,向第二电子设备发送第一指令;
接收所述第二电子设备基于所述第一指令发送的第一信息;
在所述文本编辑界面中显示目标信息;
其中,所述第一信息包括目标图像或对所述目标图像进行识别得到的第 一识别信息,所述目标信息为所述第一信息或所述第一电子设备对所述目标图像进行识别得到的第二识别信息。
第二方面,本申请实施例提供了一种信息发送方法,由第二电子设备执行,所述方法包括:
接收第一电子设备发送的第一指令;
响应于所述第一指令,向所述第一电子设备发送第一信息,所述第一信息包括目标图像或对所述目标图像进行识别得到的第一识别信息,所述目标图像用于所述第一电子设备显示或用于所述第一电子设备进行识别得到所述目标图像的第二识别信息并在所述第一电子设备的文本编辑界面显示所述第二识别信息,所述第一识别信息用于在所述第一电子设备的文本编辑界面显示。
第三方面,本申请实施例提供了一种显示装置,所述装置包括:
第一接收模块,用于接收对文本编辑界面中第一控件的第一输入;
第一发送模块,用于响应于所述第一输入,向第二电子设备发送第一指令;
第二接收模块,用于接收所述第二电子设备基于所述第一指令发送的第一信息;
第一显示模块,用于在所述文本编辑界面中显示目标信息;
其中,所述第一信息包括目标图像或对所述目标图像进行识别得到的第一识别信息,所述目标信息为所述第一信息或第一电子设备对所述目标图像进行识别得到的第二识别信息。
第四方面,本申请实施例提供了一种信息发送装置,所述装置包括:
第三接收模块,用于接收第一电子设备发送的第一指令,所述第一指令用于指示所述第二电子设备进行图像获取;
第二发送模块,用于响应于所述第一指令,向所述第一电子设备发送第一信息,所述第一信息包括目标图像或对所述目标图像进行识别得到的第一识别信息,所述目标图像用于显示或用于所述第一电子设备所述第一电子设备进行识别得到所述目标图像的第二识别信息并在所述第一电子设备的文本编辑界面显示所述第二识别信息,所述第一识别信息用于在所述第一电子设 备的文本编辑界面显示。
第五方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤,或者实现如第二方面所述的方法的步骤。
第六方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤或者实现如第二方面所述的方法的步骤。
第七方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法的步骤或者实现如第二方面所述的方法的步骤。
第八方面,本申请实施例提供了一种计算机软件产品,所述计算机软件产品被存储在存储介质中,所述计算机软件产品被至少一个处理器执行以实现如第一方面所述的方法的步骤或者实现如第二方面所述的方法的步骤。
第九方面,本申请实施例提供了一种电子设备,被配置为执行时实现如第一方面所述的方法的步骤或者实现如第二方面所述的方法的步骤。
在本实施例中,无需人工对目标图像中的信息进行抄录至第一电子设备,而是第一电子设备通过向第二电子设备发送第一指令,可接收第二电子设备基于第一指令对目标图像进行识别后发送的第一识别信息或接收第二电子设备基于第一指令发送的目标图像,第一电子设备可对接收的目标图像进行识别得到目标图像的第二识别信息,可在文本编辑界面中显示目标图像、第一识别信息或第二识别信息,实现将目标图像中的信息抄录至第二电子设备的文本编辑界面中,提高对图像中信息的抄录的效率。
图1是本申请实施例提供的显示方法的流程图之一;
图2是本申请实施例提供的信息发送方法的流程图;
图3是本申请实施例提供的显示方法的流程图之一;
图4是本申请实施例提供的第二电子设备的界面图之一;
图5是本申请实施例提供的第一电子设备的界面图之一;
图6是本申请实施例提供的第一电子设备的界面图之二;
图7是本申请实施例提供的第一电子设备的界面图之三;
图8是本申请实施例提供的显示方法的流程图之二;
图9是本申请实施例提供的第一电子设备的界面图之四;
图10是本申请实施例提供的第一电子设备的界面图之五;
图11是本申请实施例提供的显示装置的示意图;
图12是本申请实施例提供的信息发送装置的示意图;
图13是本申请实施例提供的电子设备的结构示意图之一;
图14是本申请实施例提供的电子设备的结构示意图之二;
图15是本申请实施例提供的电子设备的硬件结构示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如目标对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的显示方法进行详细地说明。
如图1所示,本申请提供一种实施例的显示方法,由第一电子设备执行,该方法包括:
步骤101:接收对文本编辑界面中第一控件的第一输入。
在第一电子设备显示文本编辑界面,该文本编辑界面可以是第一电子设备中办公应用的编辑界面,在本实施例中不作限定。文本编辑界面中包括第一控件,用户可对第一控件进行第一输入,第一输入在本实施例中不作限定,例如,可以是点击输入等。
步骤102:响应于第一输入,向第二电子设备发送第一指令。
第一指令可用于指示第二电子设备进行图像获取,以及还可用于指示第二电子设备对获取的目标图像进行识别等。向第二电子设备发送第一指令,以使第二电子设备进行图像获取,也可使第二电子设备对获取的目标图像进行识别得到第一识别信息。
步骤103:接收第二电子设备基于第一指令发送的第一信息。
第一信息包括目标图像或对目标图像进行识别得到的第一识别信息。
第二电子设备接收第一指令后,可获取目标图像,可将目标图像发送给第一电子设备,第一电子设备接收目标图像,或者第二电子设备获取目标图像后对目标图像进行识别得到第一识别信息,并将第一识别信息发送给第一电子设备,即第一电子设备可接收第一识别信息。在本实施例中,第一电子设备可以是移动电子设备,第二电子设备可以是非移动电子设备。
步骤104:在文本编辑界面中显示目标信息。
目标信息为第一信息或第一电子设备对目标图像进行识别得到的第二识别信息。
若第一电子设备接收到目标图像,第一电子设备可在文本编辑界面中显示目标图像,或者可对目标图像进行识别得到目标图像的第二识别信息,在文本编辑界面中显示第二识别信息,若第一电子设备接收到第二电子设备对目标图像进行识别得到的第一识别信息,即可在文本编辑界面中显示第一识别信息,从而实现将目标图像中的信息抄录至第二电子设备的文本编辑界面中。作为一个示例,识别信息(包括第一识别信息和第二识别信息)包括但不限于文字信息和表格中的至少一项。
在本实施例中,无需人工对目标图像中的信息进行抄录至第一电子设备,而是第一电子设备通过向第二电子设备发送第一指令,可接收第二电子设备基于第一指令对目标图像进行识别后发送的第一识别信息或接收第二电子设 备基于第一指令发送的目标图像,第一电子设备可对接收的目标图像进行识别得到目标图像的第二识别信息,可在文本编辑界面中显示目标图像、第一识别信息或第二识别信息,实现将目标图像中的信息抄录至第二电子设备的文本编辑界面中,提高对图像中信息的抄录的效率。
在一个实施例中,接收对文本编辑界面中第一控件的第一输入之前,还包括:
在文本编辑界面显示用于指示通过第二电子设备添加信息的目标选项;
接收对文本编辑界面中第一控件的第一输入,包括:
接收针对目标选项的第一输入。
也即是在本实施例中,第一控件可以是用于指示通过第二电子设备添加信息的目标选项,接收对目标选项的第一输入后,可向第二电子设备发送第一指令,使第二电子设备进行图像获取,从而使第二电子设备发送获取的目标图像或对目标图像进行识别得到的第一识别信息,操作简单,便于用户操作,从而可提高在文本编辑界面中显示目标图像的信息实现信息抄录的效率。
在一个实施例中,接收对文本编辑界面中第一控件的第一输入之后,还包括:在文本编辑界面中显示文本编辑框;
在文本编辑界面中显示目标信息,包括:
在文本编辑框中显示目标信息;
接收对文本编辑框中第二控件的第二输入;
响应于第二输入,关闭文本编辑框的显示,并在文本编辑界面中显示目标信息。
即在接收第一输入后,先在文本编辑框中显示文本编辑框,获得目标图像、第一识别信息或第二识别信息后,可先将其显示于文本编辑框,文本编辑框中还包括第二控件,用户可对文本编辑框中的识别信息进行检查,若检查无误后,可对第二控件进行第二输入,例如,第二控件可以是确认控件等,第二输入可以是点击输入等,然后响应于第二输入,将文本编辑界面中的文本编辑框关闭显示,在文本编辑界面中显示目标信息。作为一个示例,在文本编辑界面中显示文本编辑框,可以是在文本编辑界面中输入光标对应的位置显示文本编辑框,则在文本编辑界面中显示目标信息,可以是以文本编辑 界面中输入光标对应的位置为起始位置,显示目标信息,例如,对于文字信息,文字信息中的第一个文字显示到起始位置,其余文字按照顺序以及位置关系进行相应显示等。
在一个实施例中,第一信息包括目标图像;
在文本编辑界面中显示目标信息之前,还包括:对目标图像进行识别,得到第二识别信息。
也即是若接收到第二电子设备发送的目标图像,可在文本编辑界面中显示目标图像,或者可对目标图像进行识别得到第二识别信息,在文本编辑界面中显示第二识别信息,以实现目标图像的信息的抄录至文本编辑界面中,以便用户查看。需要说明的是,本申请实施例的显示方法中,第一电子设备对接收的目标图像进行识别得到第二识别信息的过程可参照第二电子设备对目标图像进行识别的过程,即第一电子设备对目标图像进行识别得到第二识别信息的过程与第二电子设备对目标图像进行识别得到第一识别信息的过程类似,不同之处仅在于执行识别过程的主体不同,前者是第一电子设备,后者是第二电子设备,从而,在此不再赘述第一电子设备对目标图像进行识别得到第二识别信息的过程。
在一个实施例中,向第二电子设备发送第一指令之前,方法还包括:
创建无线局域网,并通过无线局域网与第二电子设备建立连接。
用户可在第二电子设备中创建无线局域网(Wireless Local Area Network,WLAN),第一电子设备可在无线保真(Wireless Fidelity,WIFI)设置里连接第二电子设备创建的无线局域网,实现第二电子设备与第一电子设备之间的连接。
通过上述连接方法,相比使用蓝牙或近场通信(Near Field Communication,NFC)实现连接的方式,有着更高的稳定性,可达到“现拍现传”的毫秒级实时同步的效果,可提高目标图像的识别信息在第一电子设备中抄录的效率。
如图2所示,本申请还提供一种实施例的信息发送方法,由第二电子设备执行,方法包括:
步骤201:接收第一电子设备发送的第一指令;
步骤202:响应于第一指令,向第一电子设备发送第一信息;
第一信息包括目标图像或对目标图像进行识别得到的第一识别信息,目标图像用于第一电子设备显示或用于第一电子设备进行识别得到目标图像的第二识别信息并在第一电子设备的文本编辑界面显示第二识别信息,第一识别信息用于在第一电子设备的文本编辑界面显示。
需要说明的是,目标图像可以是第一电子设备接收第一指令后拍摄的图像,或者是第一电子设备中预先存储的图像,也可以是可携带文档格式(Portable Document Format,PDF)文件等。第一指令为第一电子设备响应于对第一电子设备中文本编辑界面的第一控件的第一输入发送的第一指令。
在本实施例中,无需人工对目标图像中的信息进行抄录至第一电子设备,而是第二电子设备接收第一电子设备发送的第一指令后,获取目标图像,可向第一电子设备发送目标图像,目标图像可用于第一电子设备显示,或用于第一电子设备进行识别得到目标图像的第二识别信息并在第一电子设备的文本编辑界面显示第二识别信息,或者第二电子设备可以对目标图像进行识别得到第一识别信息,向第一电子设备发送第一识别信息,第一识别信息可显示于第一电子设备的文本编辑界面中。如此,可实现将目标图像中的信息抄录至第二电子设备的文本编辑界面中,提高对图像中信息的抄录的效率。
在一个实施例中,第一信息包括第一识别信息,向第一电子设备发送第一识别信息之前,还包括:
对目标图像进行行切分,得到多个第一图像;
对多个第一图像进行字符切分,得到多个子图像;
提取多个子图像中每个子图像的文字特征信息;
基于多个子图像的文字特征信息,对多个子图像进行文字识别,以得到文字信息,其中,第一识别信息包括文字信息。
可以理解,第一图像为行文字存在的区域图像,即行文字区域图像,即对目标图像进行行切分(或横向切分),先找到每一行文字的起点与终点,以定位该行文字区域图像,从某一行的第一个非空白位置(即开始有字的位置)到出现该行的第一个空白位置(即没有字的位置),定位为行文字存在的区域。然后对第一图像进行字符切分,也可以理解为列切分或纵向切分,便可得到单个文字图像,即子图像。对每个子图像进行文字特征信息提取,利用多个 子图像的文字特征信息,对多个子图像进行文字识别,以得到文字信息,即对每个子图像进行文字识别,可得到多个文字识别信息,上述文字信息可包括多个子图像的文字识别信息组合后的信息。需要说明的是,这里的组合是按照多个子图像的位置关系对多个子图像的文字识别信息进行组合。
在本实施例中,在文字识别过程中,先对目标图像进行行切分,然后进行字符切分,得到多个子图像,对多个子图像进行文字识别,得到识别的文字信息,用户只需使用第二电子设备获取目标图像并进行文字识别,第一电子设备即可获得识别的文字信息并将其添加至文本编辑界面中,整个过程简单、高效且便捷。相比传统解决方案,同样是抄录约500字的内容,经测试,传统方案至少需要15~20分钟,本申请方案可只需2分钟左右。解决了耗时长与错别字的问题,提高抄录效率以及提高抄录正确性,解决了用户无法高效抄录纸质文件中文字信息至第一电子设备上的痛点,综合办公效率得到大幅度提升。
在一个实施例中,第一信息包括第一识别信息,向第一电子设备发送第一识别信息之前,还包括:
利用横向线条结构元素对目标图像依次进行腐蚀和膨胀,得到第二图像,第二图像中包括至少一个横向线条;
利用纵向线条结构元素对目标图像依次进行腐蚀和膨胀,得到第三图像,第三图像中包括至少一个纵向线条;
对第二图像与第三图像进行融合,得到融合图像;
通过融合图像中至少一个横向线条与至少一个纵向线条的交叉点,提取融合图像中的表格,并识别表格中的文字以得到文字信息,第一识别信息包括表格以及文字信息。
由于表格是由直线线条构成,在本实施例中,可通过采用不同的结构元素对图像进行腐蚀和碰撞,以获得包括不同方向上的线条图像,例如,利用横向线条结构元素对目标图像依次进行腐蚀和膨胀,可得到包括横向线条的第二图像,纵向线条结构元素对目标图像依次进行腐蚀和膨胀,可得到包括至少一个纵向线条的第三图像。然后对对第二图像与第三图像进行融合,得到融合图像,如此,得到的融合图像中包括至少一个横向线条与至少一个纵 向线条,且相交的横向线条与纵向线条具有交叉点,即相交点,可将交叉点作为定位点,为后续表格提取提供基础。即后续可通过交叉点,对融合图像进行表格提取,表格中包括由线条围成的表格单元,目标图像的表格单元中可能存在文字,即可识别目标图像中表格的表格单元中的文字,得到文字信息。
在本实施例中,通过腐蚀和膨胀对图像进行形态学处理,以得到包括横向线条的第二图像和包括纵向线条的第三图像,并进行融合,得到融合图像,对融合图像进行表格提取,并是被表格中的文字,这样,可提高图像中表格和文字抄录到第一电子设备的文本编辑界面中,提高图像中的信息的抄录的效率。
在一个实施例中,向第一电子设备发送第一信息之前,还包括:
获取第四图像;
对第四图像进行二值化处理,得到二值图像;
检测二值图像的倾斜角度;
通过倾斜角度,对二值图像进行旋转矫正,得到目标图像。
第四图像为需要识别的图像,在本实施例中,需要对第四图像进行二值化处理,得到二值图像,然后检测二值图像的倾斜角度,例如,可以通过霍夫变换方法检测二值图像的倾斜角度,利用倾斜角度,对二值图像进行旋转矫正,得到目标图像,将目标图像发送给第一电子设备,以便于第一电子设备对目标图像进行识别,或后续对矫正后得到的目标图像进行识别,得到第一识别信息并发送给第一电子设备,以提高图像识别的准确性。
在一个实施例中,向第一电子设备发送第一识别信息之前,还包括:
通过离线光学字符识别方法对目标图像进行识别,以得到第一识别信息。
在本实施例中,第二电子设备中预先集成有光学字符识别方法,在接收第一指令后,可通过离线光学字符识别方法对目标图像进行识别,以得到第一识别信息,以便于第二电子设备进行图像识别,提高识别的效率。
下面以一个具体实施例对上述识别方法的过程加以具体说明。
需要说明的是,无线局域网:是利用无线通信技术在局部范围内建立的网络,以无线多址信道为传输介质,提供传统有线局域网(Local Area Network, LAN)的功能,使网络的连接不再是单纯的缆线连接,能够随着计算机用户的发展而移动或变化,为通信的移动化、个性化和多媒体应用提供了可能。
文字识别算法:光学字符识别(Optical Character Recognition,OCR)是指电子设备(例如手机相机或数码相机)检查纸上打印的字符,通过检测暗、亮的模式确定其形状,然后用字符识别方法将形状翻译成计算机文字的过程。
表格识别算法:表格识别是基于聚焦拍照OCR的能力,将图像中的文本识别出来,并检测出表格的结构信息,上述识别信息中的表格,可理解为表格的结构信息,可包括单元格的位置信息以及单元格的占用行列数,另外识别每个单元格内的文字信息。
边缘计算:边缘计算是指在靠近设备(数据源)的位置,就近提供最近端服务,其网络服务响应可以更快,有着实时性、安全性与隐私保护等优势。在申请中,可理解为,第二电子设备是第一电子设备的近端设备,通过第二电子设备对目标图像进行识别计算,即边缘计算,得到第一识别信息,并发送给第一电子设备。
在一个实施例中,以文本编辑界面为办公应用软件(例如,word、专门开发的办公应用软件等)的文本编辑界面、第一电子设备为电脑、第二电子设备为手机为例进行说明。如图3所示,本实施例的显示方法的过程如下:
步骤301、用户在电脑中创建无线局域网,手机连接电脑创建的无线局域网。
步骤302、用户打开手机的相机,相机界面410上出现“已连接至电脑”的状态信息。
表示当前手机相机与电脑的数据传输通道已互通,如图4所示,其中包括拍摄控件411。通过该连接方法,相比使用蓝牙或NFC近场通讯实现手机与电脑链接的方式,有着更高的稳定性,可达到“现拍现传”的毫秒级实时同步的效果,提高对图像中文字抄录的效率。
步骤303、用户在电脑端的办公应用软件的文本编辑界面510上选择“通过手机添加”的第一控件511,则在文本编辑界面510上显示文本编辑框512。
如图5所示。
步骤304、用户通过手机相机对现实办公环境中的纸质文档进行拍摄, 点击拍摄控件411完成拍摄,可得到第四图像;
步骤305、手机后台以静默方式将第四图像中的文字进行识别并提取出来,发送至电脑。
如图6所示。
在本实施例中,手机对图像处理方式与文字识别方式,有助于保障例如合同文件、书本等类型纸质文件中的文字可被更完整地提取出来,降低纸张背景颜色对文字识别的影响、保障全篇文本检测的完整性、提升文字识别的准确率。满足对于即拍即得、现拍现传的目标追求。文字识别的具体步骤如下:
预处理:采用“自适应二值化技术”对第四图像进行预处理,例如,使用开源计算机视觉库(Open Source Computer Vision Library,Opencv)中自适应阈值化函数(adaptive_threshold)和(scikit-image)框架来调整第四图像,自适应阈值化函数即是对第四图像进行二值化处理,例如,取阈值为125,让第四图像中灰度值小于或等于125的变为0(黑色),灰度值大于125的变为255(白色),可实现高梯度区域保留白色像素,低梯度区域保留黑色像素,此时可获得一个高反差的样本图像,即二值图像。再采用霍夫变换方法将图片进行膨胀处理,将断续的文字连成一条直线,以便于直线检测,计算出倾斜角度,在倾斜角度的基础上,利用旋转算法将二值图像进行矫正至水平位置,裁剪后就可以得到目标图像。
文本检测:通过“行切分”与“字符切分”两个步骤。行切分,先找到每一行文字的起始点与终止点,以定位该行文字区域,从第一个非空白位置(即开始有字的位置)到出现第一个空白位置(即没有字的位置),定义为行文字存在的区域。字符切分,对行文字进行纵向切分,便可得到单个文字图像,即子图像。
文字识别:提取每个子图像的文字特征信息,把每个子图像的文字特征信息与特征模板库进行模板粗分类和模板细匹配,识别出具体的文字,得到每个子图像的文字识别信息。
将识别出来的多个子图像的文字识别信息进行组合,便获得完整的文字信息,再通过手机与电脑的连接通道,将文本信息传输至电脑,在办公应用 软件的文本编辑框中进行展示,如图6所示。
步骤306、用户在办公应用软件的文本编辑框中查看从手机侧传输过来的文字信息,确认无误后,点击确认控件513,在办公应用软件的文本编辑界面中显示识别信息。
点击确认控件513即可完成添加,如图7所示。
通过该实施例的方案,用户只需使用手机原生相机对纸质文件中文字内容进行拍摄,电脑即可获得拍摄的图像中的文字信息并直接添加至办公软件的文本编辑界面中,整个过程简单、高效且便捷。相比传统解决方案,同样是抄录约500字的内容,经测试,传统方案至少需要15~20分钟,本申请方案可只需2分钟。不仅解决了耗时长与错别字的问题,还解决了用户无法高效抄录纸质文件中文字信息至电脑办公软件上的痛点,综合办公效率得到大幅度提升。
在另一个实施例中,如图8所示,具体步骤801-步骤806,其中,步骤801-804与上述步骤301-304的步骤一一对应,在此不再赘述。
步骤805:手机后台以静默方式将目标图像中的表格进行识别并提取出来,将表格以及表格中的文字信息发送至电脑;
如图9所示。
在本实施例中,手机对图像处理方式与表格识别方式,有助于保障例如合同文件、书本等类型纸质文件中的表格可被更完整地提取出来。可以达到降低因纸张扭曲导致的表格扭曲对表格识别的影响、就算一张图像上存在多个表格的情况,也能保障所有表格检测的完整性、提升表格识别与表格中文字的准确率。满足该发明对于即拍即得、现拍现传的目标追求。表格识别的具体步骤如下:
预处理:采用“自适应二值化技术”对第四图像进行预处理,例如,使用Opencv中自适应阈值化函数adaptive_threshold和scikit-image框架来调整第四图像,自适应阈值化函数即是对第四图像进行二值化处理,例如,取阈值为125,让第四图像中灰度值小于或等于125的变为0(黑色),灰度值大于125的变为255(白色),可实现高梯度区域保留白色像素,低梯度区域保留黑色像素,此时可获得一个高反差的样本图像,即二值图像。再采用霍夫 变换方法将图片进行膨胀处理,将断续的文字连成一条直线,以便于直线检测,计算出倾斜角度,在倾斜角度的基础上,利用旋转算法将二值图像进行矫正至水平位置,裁剪后就可以得到目标图像。
表格识别:采用OpenCV里面的形态学函数,先腐蚀(erode)后膨胀(dilate处理):
使用二值化后的目标图像来获取表格横纵的线,由于目标图像主要是A4尺寸纸张巨多,则其中整数刻度(int scale)取值可以限定在20,Mat horizontal=thresh.clone();Mat vertical=thresh.clone();int scale=20;int horizontalsize=horizontal.cols/scale。
为了获取横向的表格线条,设置腐蚀和膨胀操作区域为一个比较大的横向直条,即设置横向线条结构元素:Mat horizontalStructure=getStructuringElement(MORPH_RECT,Size(horizontalsize,1))。
先腐蚀再膨胀得到第二图像:erode(horizontal,horizontal,horizontalStructure,Point(-1,-1));dilate(horizontal,horizontal,horizontalStructure,Point(-1,-1));imshow("horizontal",horizontal)。
竖直方向上线条获取的步骤同上,设置纵向线条结构元素,先腐蚀再膨胀,得到第三图像。
将获取到的第二图像和第三图像进行融合,得到融合图像,融合图像中横纵线条交叉,得到交叉点,可作为定位点。
表格判断:对于融合图像,通过轮廓查找(findContours)函数图像融合图像的轮廓,判断轮廓形状和大小是否为表格,若是,则结合拟合多边形(approxPolyDP)函数用来逼近区域成为一个形状,即提取表格,其中计算后获得的true值表示产生的区域为闭合区域,最后通过矩形边框(boundingRect)函数为将这片区域转化为矩形,此矩形包含输入的形状。
表格生成:将识别出来的表格与表格中的文字信息通过手机与电脑的连接通道,将文本信息传输至电脑,在办公应用软件的文本编辑框512中进行将表格与文字信息进行组合,完成表格添加,如图9所示。
步骤806、用户在办公应用软件的文本编辑框中查看生成的表格以及表格中的文字信息,确认无误后,点击确认控件513,在文本编辑界面510中 显示表格与文本信息。
如图10所示。
通过本申请实施例的识别方法,在手机连接至电脑创建的无线局域网的情况下,手机相机负责图像采集,获得第四图像,并对其进行预处理后得到目标图像,并将目标图像送往手机***的光学字符识别算法,以边缘计算的方式进行运算处理,对目标图像进行文字检测与文字识别处理,或对目标图像进行表格检测与识别,提取出表格。再通过手机与电脑的连接通道将文字信息或表格传输至电脑,输入至电脑的办公应用软件的文本编辑界面,实现对图像中的信息的抄录,提高信息抄录效率。另外,本实施例的方法不仅可应用到拍文字传文字方式的抄录需求,还能将应用场景扩展至取手机相册照片提取文字与表格、手机PDF文件提取文字与表格等,不仅操作简单,还能获得高准确率、高完整性的目标信息。
如图11所示,提供一种实施例的显示装置1100,应用于第一电子设备,显示装置1100包括:
第一接收模块1101,用于接收对文本编辑界面中第一控件的第一输入;
第一发送模块1102,用于响应于第一输入,向第二电子设备发送第一指令;
第二接收模块1103,用于接收第二电子设备基于第一指令发送的第一信息;
第一显示模块1104,用于在文本编辑界面中显示目标信息;
其中,第一信息包括目标图像或对目标图像进行识别得到的第一识别信息,目标信息为第一信息或第一电子设备对目标图像进行识别得到的第二识别信息。
在一个实施例中,显示装置1100还包括:
第二显示模块,用于第一接收模块1101接收对文本编辑界面中第一控件的第一输入之前,在文本编辑界面显示用于指示通过第二电子设备添加信息的目标选项;
接收对文本编辑界面中第一控件的第一输入,包括:
接收针对目标选项的第一输入。
在一个实施例中,显示装置1100还包括:
第三显示模块,用于第一接收模块接收对文本编辑界面中第一控件的第一输入之后,在文本编辑界面中显示文本编辑框;
第一显示模块1104,包括:
第一显示子模块,用于在文本编辑框中显示目标信息;
第四接收模块,用于接收对文本编辑框中第二控件的第二输入;
第二显示子模块,用于响应于第二输入,关闭文本编辑框的显示,并在文本编辑界面中显示目标信息。
在一个实施例中,第一信息包括目标图像;
显示装置1100还包括:识别模块,用于第一显示模块1104执行在文本编辑界面中显示目标信息之前,对目标图像进行识别,得到第二识别信息。
在一个实施例中,显示装置1100还包括:
连接模块,用于第一发送模块1102向第二电子设备发送第一指令之前,创建无线局域网,并通过无线局域网与第二电子设备建立连接。
本申请实施例中的显示装置1100可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,本申请实施例不作具体限定。
本申请实施例中的显示装置可以为具有操作***的装置。该操作***可以为安卓(Android)操作***,可以为ios操作***,还可以为其他可能的操作***,本申请实施例不作具体限定。
本申请实施例提供的显示装置能够实现上述应用于第一电子设备的显示方法实施例实现的各个过程,例如,能够实现图1的方法实施例实现的各个过程,为避免重复,这里不再赘述。
如图12所示,提供一种实施例的信息发送装置1200,应用于第二电子设备,装置1200包括:
第三接收模块1201,用于接收第一电子设备发送的第一指令;
第二发送模块1202,用于响应于第一指令,向第一电子设备发送第一信息,第一信息包括目标图像或对目标图像进行识别得到的第一识别信息,目标图像用于显示或用于第一电子设备第一电子设备进行识别得到目标图像的第二识别信息并在第一电子设备的文本编辑界面显示第二识别信息,第一识别信息用于在第一电子设备的文本编辑界面显示。
在一个实施例中,第一信息包括第一识别信息,信息发送装置1200,还包括:
第一切分模块,用于对目标图像进行行切分,得到多个第一图像;
第二切分模块,用于对多个第一图像进行字符切分,得到多个子图像;
提取模块,用于提取多个子图像中每个子图像的文字特征信息;
文字识别模块,用于基于多个子图像的文字特征信息,对多个子图像进行文字识别,以得到文字信息,第一识别信息包括文字信息。
在一个实施例中,第一信息包括第一识别信息,信息发送装置1200,还包括:
第一处理模块,用于利用横向线条结构元素对目标图像依次进行腐蚀和膨胀,得到第二图像,第二图像中包括至少一个横向线条;
第二处理模块,用于利用纵向线条结构元素对目标图像依次进行腐蚀和膨胀,得到第三图像,第三图像中包括至少一个纵向线条;
融合模块,用于对第二图像与第三图像进行融合,得到融合图像;
识别子模块,用于通过融合图像中至少一个横向线条与至少一个纵向线条的交叉点,提取融合图像中的表格,并识别表格中的文字以得到文字信息,第一识别信息包括表格以及文字信息。
在一个实施例中,信息发送装置1200,还包括:
图像获取模块,用于获取第四图像;
二值化处理模块,用于对第四图像进行二值化处理,得到二值图像;
角度检测模块,用于检测二值图像的倾斜角度;
矫正模块,用于通过倾斜角度,对二值图像进行旋转矫正,得到目标图像。
在一个实施例中,信息发送装置1200,还包括:
识别模块,用于通过离线光学字符识别方法对目标图像进行识别,以得到第一识别信息。
本申请实施例中的信息发送装置1200可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是非移动电子设备。示例性的,非移动电子设备可以为网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。
本申请实施例中的信息发送装置可以为具有操作***的装置。该操作***可以为安卓(Android)操作***,可以为ios操作***,还可以为其他可能的操作***,本申请实施例不作具体限定。
本申请实施例提供的信息发送装置能够实现上述应用于第二电子设备的信息发送方法实施例实现的各个过程,例如,能够实现图2的方法实施例实现的各个过程,为避免重复,这里不再赘述。
可选地,如图13所示,本申请实施例还提供一种电子设备1300,包括处理器1301,存储器1302,存储在存储器1302上并可在处理器1301上运行的程序或指令,该程序或指令被处理器1301执行时实现上述用于第一电子设备中的显示方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
可选地,如图14所示,本申请实施例还提供一种电子设备1400,包括处理器1401,存储器1402,存储在存储器1402上并可在处理器1401上运行的程序或指令,该程序或指令被处理器1401执行时实现上述用于第二电子设备中的信息发送方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
图15为实现本申请实施例的一种电子设备的硬件结构示意图。
该电子设备1500包括但不限于:射频单元1501、网络模块1502、音频输出单元1503、输入单元1504、传感器1505、显示单元1506、用户输入单元1507、接口单元1508、存储器1509、以及处理器1510等部件。
本领域技术人员可以理解,电子设备1500还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理***与处理器1510逻辑相连,从 而通过电源管理***实现管理充电、放电、以及功耗管理等功能。图15中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。
其中,用户输入单元1507,用于接收对文本编辑界面中第一控件的第一输入;
射频单元1501,用于响应于第一输入,向第二电子设备发送第一指令;以及
接收第二电子设备基于第一指令发送的第一信息;
显示单元1506,还用于在文本编辑界面中输入目标信息;
其中,第一信息包括目标图像或对目标图像进行识别得到的第一识别信息,目标信息为第一信息或第一电子设备对目标图像进行识别得到的第二识别信息。
在一个实施例中,显示单元1506,用于用户输入单元1507接收对文本编辑界面中第一控件的第一输入之前,在文本编辑界面显示用于指示通过第二电子设备添加信息的目标选项;
接收对文本编辑界面中第一控件的第一输入,包括:
接收针对目标选项的第一输入。
在一个实施例中,显示单元1506,还用于用户输入单元1507接收对文本编辑界面中第一控件的第一输入之后,在文本编辑界面中显示文本编辑框;
显示单元1506,还用于在文本编辑框中显示目标信息;
用户输入单元1507,还用于接收对文本编辑框中第二控件的第二输入;
显示单元1506,还用于响应于第二输入,关闭文本编辑框的显示,并在文本编辑界面中显示目标信息。
在一个实施例中,第一信息包括目标图像;
处理器1510,用于显示单元1506执行在文本编辑界面中显示目标信息之前,对目标图像进行识别,得到第二识别信息。
在一个实施例中,网络模块1502,用于用户输入单元1507向第二电子设备发送第一指令之前,创建无线局域网,并通过无线局域网与第二电子设备建立连接。
或者,射频单元1501,用于接收第一电子设备发送的第一指令;以及
响应于第一指令,向第一电子设备发送第一信息,第一信息包括目标图像或对目标图像进行识别得到的第一识别信息,目标图像用于显示或用于第一电子设备第一电子设备进行识别得到目标图像的第二识别信息并在第一电子设备的文本编辑界面显示第二识别信息,第一识别信息用于在第一电子设备的文本编辑界面显示。
在一个实施例中,第一信息包括第一识别信息,处理器1510,用于:
对目标图像进行行切分,得到多个第一图像;
对多个第一图像进行字符切分,得到多个子图像;
提取多个子图像中每个子图像的文字特征信息;
基于多个子图像的文字特征信息,对多个子图像进行文字识别,以得到文字信息,第一识别信息包括文字信息。
在一个实施例中,第一信息包括第一识别信息,处理器1510,用于:
利用横向线条结构元素对目标图像依次进行腐蚀和膨胀,得到第二图像,第二图像中包括至少一个横向线条;
利用纵向线条结构元素对目标图像依次进行腐蚀和膨胀,得到第三图像,第三图像中包括至少一个纵向线条;
对第二图像与第三图像进行融合,得到融合图像;
通过融合图像中至少一个横向线条与至少一个纵向线条的交叉点,提取融合图像中的表格,并识别表格中的文字以得到文字信息,第一识别信息包括表格以及文字信息。
在一个实施例中,处理器1510还用于:
获取第四图像;
对第四图像进行二值化处理,得到二值图像;
检测二值图像的倾斜角度;
通过倾斜角度,对二值图像进行旋转矫正,得到目标图像。
在一个实施例中,处理器1510还用于:通过离线光学字符识别方法对目标图像进行识别,以得到第一识别信息。
应理解的是,本申请实施例中,输入单元1504可以包括图形处理器 (Graphics Processing Unit,GPU)15041和麦克风15042,图形处理器15041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1506可包括显示面板15061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板15061。用户输入单元1507包括触控面板15071以及其他输入设备15072。触控面板15071,也称为触摸屏。触控面板15071可包括触摸检测装置和触摸控制器两个部分。其他输入设备15072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器1509可用于存储软件程序以及各种数据,包括但不限于应用程序和操作***。处理器1510可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作***、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1510中。
本申请实施例还提供一种可读存储介质,所述可读存储介质可以是非易失的,也可以是易失的,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
应理解,本申请实施例提到的芯片还可以称为***级芯片、***芯片、芯片***或片上***芯片等。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还 包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。
Claims (21)
- 一种显示方法,由第一电子设备执行,所述方法包括:接收对文本编辑界面中第一控件的第一输入;响应于所述第一输入,向第二电子设备发送第一指令;接收所述第二电子设备基于所述第一指令发送的第一信息;在所述文本编辑界面中显示目标信息;其中,所述第一信息包括目标图像或对所述目标图像进行识别得到的第一识别信息,所述目标信息为所述第一信息或所述第一电子设备对所述目标图像进行识别得到的第二识别信息。
- 根据权利要求1所述的方法,其中,所述接收对文本编辑界面中第一控件的第一输入之前,还包括:在所述文本编辑界面显示用于指示通过所述第二电子设备添加信息的目标选项;所述接收对文本编辑界面中第一控件的第一输入,包括:接收针对所述目标选项的第一输入。
- 根据权利要求1所述的方法,其中,所述接收对文本编辑界面中第一控件的第一输入之后,还包括:在所述文本编辑界面中显示文本编辑框;所述在所述文本编辑界面中显示所述目标信息,包括:在所述文本编辑框中显示所述目标信息;接收对所述文本编辑框中第二控件的第二输入;响应于所述第二输入,关闭所述文本编辑框的显示,并在所述文本编辑界面中显示所述目标信息。
- 根据权利要求1所述的方法,其中,所述第一信息包括所述目标图像;所述在所述文本编辑界面中显示目标信息之前,还包括:对所述目标图像进行识别,得到所述第二识别信息。
- 一种信息发送方法,由第二电子设备执行,所述方法包括:接收第一电子设备发送的第一指令;响应于所述第一指令,向所述第一电子设备发送第一信息,所述第一信 息包括目标图像或对所述目标图像进行识别得到的第一识别信息,所述目标图像用于所述第一电子设备显示或用于所述第一电子设备进行识别得到所述目标图像的第二识别信息并在所述第一电子设备的文本编辑界面显示所述第二识别信息,所述第一识别信息用于在所述第一电子设备的文本编辑界面显示。
- 根据权利要求5所述的方法,其中,所述第一信息包括所述第一识别信息,所述向所述第一电子设备发送所述第一识别信息之前,还包括:对所述目标图像进行行切分,得到多个第一图像;对所述多个第一图像进行字符切分,得到多个子图像;提取所述多个子图像中每个子图像的文字特征信息;基于所述多个子图像的文字特征信息,对所述多个子图像进行文字识别,以得到所述文字信息,所述第一识别信息包括所述文字信息。
- 根据权利要求5所述的方法,其中,所述第一信息包括所述第一识别信息,所述向所述第一电子设备发送所述第一识别信息之前,还包括:利用横向线条结构元素对所述目标图像依次进行腐蚀和膨胀,得到第二图像,所述第二图像中包括至少一个横向线条;利用纵向线条结构元素对所述目标图像依次进行腐蚀和膨胀,得到第三图像,所述第三图像中包括至少一个纵向线条;对所述第二图像与所述第三图像进行融合,得到融合图像;通过所述融合图像中所述至少一个横向线条与所述至少一个纵向线条的交叉点,提取所述融合图像中的表格,并识别所述表格中的文字以得到所述文字信息,所述第一识别信息包括所述表格以及所述文字信息。
- 根据权利要求5所述的方法,其中,所述向所述第一电子设备发送第一信息之前,还包括:获取第四图像;对所述第四图像进行二值化处理,得到二值图像;检测所述二值图像的倾斜角度;通过所述倾斜角度,对所述二值图像进行旋转矫正,得到所述目标图像。
- 一种显示装置,所述装置包括:第一接收模块,用于接收对文本编辑界面中第一控件的第一输入;第一发送模块,用于响应于所述第一输入,向第二电子设备发送第一指令;第二接收模块,用于接收所述第二电子设备基于所述第一指令发送的第一信息;第一显示模块,用于在所述文本编辑界面中显示目标信息;其中,所述第一信息包括目标图像或对所述目标图像进行识别得到的第一识别信息,所述目标信息为所述第一信息或第一电子设备对所述目标图像进行识别得到的第二识别信息。
- 根据权利要求9所述的装置,其中,所述装置还包括:第二显示模块,用于所述第一接收模块接收对文本编辑界面中第一控件的第一输入之前,在文本编辑界面显示用于指示通过第二电子设备添加信息的目标选项;所述接收对文本编辑界面中第一控件的第一输入,包括:接收针对所述目标选项的第一输入。
- 根据权利要求9所述的装置,其中,所述装置还包括:第三显示模块,用于所述第一接收模块接收对文本编辑界面中第一控件的第一输入之后,在所述文本编辑界面中显示文本编辑框;所述第一显示模块,包括:第一显示子模块,用于在所述文本编辑框中显示所述目标信息;第四接收模块,用于接收对所述文本编辑框中第二控件的第二输入;第二显示子模块,用于响应于所述第二输入,关闭所述文本编辑框的显示,并在所述文本编辑界面中显示所述目标信息。
- 根据权利要求9所述的装置,其中,第一信息包括目标图像;所述装置还包括:识别模块,用于所述第一显示模块执行在文本编辑界面中显示目标信息之前,对所述目标图像进行识别,得到所述第二识别信息。
- 一种信息发送装置,所述装置包括:第三接收模块,用于接收第一电子设备发送的第一指令;第二发送模块,用于响应于所述第一指令,向所述第一电子设备发送第一信息,所述第一信息包括目标图像或对所述目标图像进行识别得到的第一识别信息,所述目标图像用于显示或用于所述第一电子设备所述第一电子设备进行识别得到所述目标图像的第二识别信息并在所述第一电子设备的文本编辑界面显示所述第二识别信息,所述第一识别信息用于在所述第一电子设备的文本编辑界面显示。
- 根据权利要求13所述的装置,其中,所述第一信息包括第一识别信息,所述装置还包括:第一切分模块,用于对所述目标图像进行行切分,得到多个第一图像;第二切分模块,用于对所述多个第一图像进行字符切分,得到多个子图像;提取模块,用于提取所述多个子图像中每个子图像的文字特征信息;文字识别模块,用于基于所述多个子图像的文字特征信息,对所述多个子图像进行文字识别,以得到文字信息,所述第一识别信息包括所述文字信息。
- 根据权利要求13所述的装置,其中,所述第一信息包括所述第一识别信息,所述装置还包括:第一处理模块,用于利用横向线条结构元素对所述目标图像依次进行腐蚀和膨胀,得到第二图像,所述第二图像中包括至少一个横向线条;第二处理模块,用于利用纵向线条结构元素对所述目标图像依次进行腐蚀和膨胀,得到第三图像,所述第三图像中包括至少一个纵向线条;融合模块,用于对所述第二图像与所述第三图像进行融合,得到融合图像;识别子模块,用于通过所述融合图像中至少一个横向线条与至少一个纵向线条的交叉点,提取所述融合图像中的表格,并识别所述表格中的文字以得到文字信息,所述第一识别信息包括所述表格以及所述文字信息。
- 根据权利要求13所述的装置,其中,所述装置还包括:图像获取模块,用于获取第四图像;二值化处理模块,用于对所述第四图像进行二值化处理,得到二值图像;角度检测模块,用于检测所述二值图像的倾斜角度;矫正模块,用于通过所述倾斜角度,对所述二值图像进行旋转矫正,得到所述目标图像。
- 一种电子设备,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1-4中任一项所述的显示方法的步骤,或者实现如权利要求5-8中任一项所述的信息发送方法的步骤。
- 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1-4中任一项所述的显示方法的步骤,或者实现如权利要求5-8中任一项所述的信息发送方法的步骤。
- 一种芯片,包括处理器和通信接口,其中,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1-4中任一项所述的显示方法的步骤,或者,实现如权利要求5-8中任一项所述的信息发送方法的步骤。
- 一种计算机软件产品,其中,所述计算机软件产品被存储在可读存储介质中,所述计算机软件产品被至少一个处理器执行以实现如权利要求1-4中任一项所述的显示方法的步骤,或者,所述计算机软件产品被至少一个处理器执行以实现如权利要求5-8中任一项所述的信息发送方法的步骤。
- 一种电子设备,被配置为执行如权利要求1-4中任一项所述的显示方法的步骤,或者,被配置为执行如权利要求5-8中任一项所述的信息发送方法的步骤。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111151213.0 | 2021-09-29 | ||
CN202111151213.0A CN113835590A (zh) | 2021-09-29 | 2021-09-29 | 显示方法、信息发送方法和电子设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023051384A1 true WO2023051384A1 (zh) | 2023-04-06 |
Family
ID=78967289
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/120596 WO2023051384A1 (zh) | 2021-09-29 | 2022-09-22 | 显示方法、信息发送方法和电子设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113835590A (zh) |
WO (1) | WO2023051384A1 (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113835590A (zh) * | 2021-09-29 | 2021-12-24 | 维沃移动通信有限公司 | 显示方法、信息发送方法和电子设备 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101923643A (zh) * | 2010-08-11 | 2010-12-22 | 中科院成都信息技术有限公司 | 通用表格识别方法 |
CN111158817A (zh) * | 2019-12-24 | 2020-05-15 | 维沃移动通信有限公司 | 一种信息处理方法及电子设备 |
CN113194024A (zh) * | 2021-03-22 | 2021-07-30 | 维沃移动通信(杭州)有限公司 | 信息显示方法、装置和电子设备 |
CN113353127A (zh) * | 2021-05-31 | 2021-09-07 | 卡斯柯信号有限公司 | 基于ocr的调车作业单输入方法,装置,电子设备及介质 |
CN113835590A (zh) * | 2021-09-29 | 2021-12-24 | 维沃移动通信有限公司 | 显示方法、信息发送方法和电子设备 |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104699663A (zh) * | 2013-12-05 | 2015-06-10 | 中兴通讯股份有限公司 | 一种信息输入方法及装置 |
CN112578955A (zh) * | 2019-09-30 | 2021-03-30 | 西安诺瓦星云科技股份有限公司 | 节目编辑方法、装置及***和计算机可读存储介质 |
CN111651971A (zh) * | 2020-05-27 | 2020-09-11 | 张天澄 | 一种表格信息转录方法、***、电子设备和存储介质 |
CN111984590A (zh) * | 2020-09-01 | 2020-11-24 | 冠群信息技术(南京)有限公司 | 一种纸质文档识别归档保存的***及方法 |
CN113139445B (zh) * | 2021-04-08 | 2024-05-31 | 招商银行股份有限公司 | 表格识别方法、设备及计算机可读存储介质 |
-
2021
- 2021-09-29 CN CN202111151213.0A patent/CN113835590A/zh active Pending
-
2022
- 2022-09-22 WO PCT/CN2022/120596 patent/WO2023051384A1/zh unknown
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101923643A (zh) * | 2010-08-11 | 2010-12-22 | 中科院成都信息技术有限公司 | 通用表格识别方法 |
CN111158817A (zh) * | 2019-12-24 | 2020-05-15 | 维沃移动通信有限公司 | 一种信息处理方法及电子设备 |
CN113194024A (zh) * | 2021-03-22 | 2021-07-30 | 维沃移动通信(杭州)有限公司 | 信息显示方法、装置和电子设备 |
CN113353127A (zh) * | 2021-05-31 | 2021-09-07 | 卡斯柯信号有限公司 | 基于ocr的调车作业单输入方法,装置,电子设备及介质 |
CN113835590A (zh) * | 2021-09-29 | 2021-12-24 | 维沃移动通信有限公司 | 显示方法、信息发送方法和电子设备 |
Also Published As
Publication number | Publication date |
---|---|
CN113835590A (zh) | 2021-12-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6208383B2 (ja) | プレビューモードにおける画像キャプチャリングパラメータ調整 | |
WO2016121401A1 (en) | Information processing apparatus and program | |
CN107451582A (zh) | 一种图文识别***及其识别方法 | |
US20130042509A1 (en) | Method and system for producing greeting cards | |
US9542756B2 (en) | Note recognition and management using multi-color channel non-marker detection | |
WO2017197593A1 (en) | Apparatus, method and computer program product for recovering editable slide | |
KR20130066819A (ko) | 촬영 이미지 기반의 문자 인식 장치 및 방법 | |
CN107085699B (zh) | 信息处理设备、信息处理设备的控制方法和存储介质 | |
WO2023051384A1 (zh) | 显示方法、信息发送方法和电子设备 | |
CN109377834A (zh) | 一种辅助盲人阅读的文本转换方法及*** | |
Mathur et al. | AI based Reading System for Blind using OCR | |
Kaundilya et al. | Automated text extraction from images using OCR system | |
CN109388935B (zh) | 单证验证方法及装置、电子设备及可读存储介质 | |
US9582230B1 (en) | Method and system for automated form document fill-in via image processing | |
TWM457241U (zh) | 結合擴增實境的圖像文字辨識系統 | |
Hsueh | Interactive text recognition and translation on a mobile device | |
KR101498546B1 (ko) | 문서 디지털 복원 시스템 및 방법 | |
WO2020140819A1 (zh) | 一种检测图像的方法和设备 | |
CN113392847A (zh) | 一种藏汉英三语ocr手持扫描翻译装置及翻译方法 | |
Revathy et al. | Android live text recognition and translation application using tesseract | |
KR20050003075A (ko) | 문자인식기능과 전자사전을 구비하는 휴대통신장치및 문자인식기능을 구비하는 전자사전 | |
Panchal et al. | Design of text detection and translation system for camera based android smartphone | |
JP7231529B2 (ja) | 情報端末装置、サーバ及びプログラム | |
CN113157194B (zh) | 文本显示方法以及电子设备、存储装置 | |
WO2016121403A1 (en) | Information processing apparatus, image processing system, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22874770 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |