Text processing method, device, terminal and storage medium

文档序号:8524 发布日期:2021-09-17 浏览:100次 中文

1. A method of text processing, comprising:

responding to a preset operation event, and acquiring a target image of a text;

and carrying out image splicing on the target image to obtain a spliced image.

2. The text processing method according to claim 1, further comprising:

and correcting the spliced image to obtain a corrected text image.

3. The text processing method of claim 1, wherein image stitching the target images to obtain a stitched image comprises:

correcting the target image to obtain a corrected target image;

and carrying out image splicing on the corrected target image to obtain a spliced text image.

4. The text processing method according to claim 2 or 3, further comprising:

and performing text recognition on the text image to obtain a recognized text.

5. The text processing method according to claim 1, further comprising:

while acquiring the target image, acquiring a first angle between a longitudinal extension direction of a device and a gravitational force direction and/or a second angle between the longitudinal extension direction of the device and a horizontal direction;

and utilizing the first angle and/or the second angle to assist in correcting the spliced image.

6. The text processing method of claim 1, wherein obtaining the target image comprises:

acquiring the target image within a viewing angle between a longitudinal extension direction and a horizontal direction of the device.

7. The text processing method according to claim 4, further comprising:

and responding to another preset operation event, and carrying out voice broadcast on part or all of the recognized text.

8. The text processing method according to claim 4, further comprising:

and projecting infrared projection light or visible projection light to the paper surface where the text is located for assisting the recognition of the text.

9. A text processing apparatus, comprising:

a processor;

one or more cameras in communication connection with the processor for acquiring a target image of the text;

an angle sensor in communicative connection with the processor;

wherein the processor is configured to stitch and/or correct the target image, and the angle sensor is configured to acquire a first angle between a longitudinal extension direction of the text processing apparatus and a gravitational force direction and/or a second angle between the longitudinal extension direction of the text processing apparatus and a horizontal direction, and assist in the correction of the target image.

10. The text processing apparatus of claim 9, wherein the processor is further configured to identify a target image of the stitched and/or modified text, resulting in an identified text.

11. The text processing apparatus according to claim 9, further comprising a wireless communication means for data transmission of the text processing apparatus with an external means.

12. The text processing apparatus of claim 9, further comprising a connection means for physically connecting the text processing apparatus to a general pen.

13. The text processing apparatus of claim 10, further comprising a microphone or speaker for enabling voice interaction and/or voice broadcast of the recognized text.

14. The document processing apparatus according to claim 9, further comprising a switch means for performing on-off control of the document processing apparatus.

15. A text recognition apparatus, comprising:

the target image acquisition unit is configured to respond to a preset operation event and acquire a target image of the text;

and the image splicing unit is configured to perform image splicing on the target image to obtain a spliced image.

16. The text recognition device of claim 15, further comprising:

the image correction unit is configured to correct the spliced image to obtain a corrected text image;

and the text recognition unit is configured to perform text recognition on the text image to obtain a recognized text.

17. A terminal, characterized in that the terminal comprises:

at least one memory and at least one processor;

wherein the memory is configured to store program code and the processor is configured to invoke the program code stored by the memory to perform the text processing method of any of claims 1 to 8.

18. A computer storage medium characterized in that the computer storage medium stores program code for executing the text processing method of any one of claims 1 to 8.

Background

Some current point-and-read pens print an identification code (similar to a two-dimensional code) using a special paint that reflects infrared light and an identification code. The pen head of each read-only pen is internally provided with an Optoelectronic Identifier (OID) which can sense digital information on a picture, the pen head touches a book, the optoelectronic identifier starts to scan two-dimensional code information on the book at the contact part of the pen head, the two-dimensional code information is read after scanning and transmission of an electronic original, the two-dimensional code information is transmitted to the read-only pen and then is processed by a Central Processing Unit (CPU), the processing process is the identification process of the CPU, if CUP identification is successful, a corresponding sound file stored in advance can be picked out from a memory of the read-only pen, and then sound is emitted through a loudspeaker.

The touch and talk pen cannot perform track recognition, text recognition needs to customize a special book, namely the book capable of using the touch and talk pen is limited to be customized, and the comparison content needs to be stored in the pen.

Disclosure of Invention

This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.

In order to solve the above problems, the present disclosure provides a text processing method, device, terminal, and storage medium, which can be used to obtain text images and text tracks in real time by obtaining target images and image stitching.

An embodiment of the present disclosure provides a text processing method, including: responding to a preset operation event, and acquiring a target image of a text; and carrying out image splicing on the target image to obtain a spliced image.

An embodiment of the present disclosure also provides a text recognition apparatus, including: a processor; one or more cameras in communication connection with the processor for acquiring a target image of the text; an angle sensor in communicative connection with the processor; wherein the processor is configured to stitch and/or correct the target image, and the angle sensor is configured to acquire a first angle between a longitudinal extension direction of the text processing apparatus and a gravitational force direction and/or a second angle between the longitudinal extension direction of the text processing apparatus and a horizontal direction, and assist in the correction of the target image.

An embodiment of the present disclosure also provides a text recognition apparatus, including: the target image acquisition unit is configured to respond to a preset operation event and acquire a target image of the text; and the image splicing unit is configured to perform image splicing on the target image to obtain a spliced image.

According to another embodiment of the present disclosure, there is provided a terminal including: at least one memory and at least one processor; the memory is used for storing program codes, and the processor is used for calling the program codes stored in the memory to execute the text processing method.

According to still another embodiment of the present disclosure, there is provided a computer storage medium storing program code for executing the above-described text processing method.

The method and the device can be used for acquiring the text image and the character track in real time through acquisition of the target image and image splicing.

Drawings

In order to more clearly illustrate the solution in the embodiments of the present disclosure, the drawings needed to be used in the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present disclosure, and that other drawings can be obtained by those skilled in the art without inventive effort.

FIG. 1 shows a flow diagram of a text processing method of an embodiment of the present disclosure.

FIG. 2 shows a flow diagram of another text processing method of an embodiment of the present disclosure.

Fig. 3 shows a schematic diagram of a text recognition apparatus of an embodiment of the present disclosure.

Fig. 4 shows a schematic diagram of a text recognition apparatus of an embodiment of the present disclosure.

Fig. 5 shows a schematic diagram of a text recognition apparatus of an embodiment of the present disclosure.

FIG. 6 illustrates a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.

Detailed Description

Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.

It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.

The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.

It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.

It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.

In some current touch and talk pens, a camera is mounted in a pen head, so that information written on paper with fine squares can be stored in the pen in a data manner and can be transmitted through bluetooth or a Universal Serial Bus (USB). The touch and talk pen can input writing information and character tracks, but cannot be used for text recognition, and the biggest problem is that a writing book needs to be customized and needs to have fine-grid stripes because the principle is that dot matrix recognition of a camera is adopted.

Based on this, the present disclosure provides a text processing method and apparatus that may not be limited by a book.

As shown in fig. 1, an embodiment of the present disclosure provides a text processing method, including a step S101 of acquiring a target image of a text in response to a preset operation event. In some embodiments, the embodiments of the present invention are applicable to image processing apparatuses, such as a stylus with a camera, a mobile terminal, and the like. In some embodiments, the preset operation event includes a manual trigger event and an automatic trigger event, the manual trigger event may be triggered by a text recognition key/button, the automatic trigger event may be automatically triggered when a camera on an image processing device (e.g., a touch-and-talk pen) is focused successfully, or triggered by receiving a voice instruction sent by a user. In some embodiments, this is automatically triggered when the image processing device (e.g., a stylus) writes on a book or paper.

The method further comprises the step S102 of carrying out image splicing on the target image to obtain a spliced image. The image stitching technology is a technology for stitching a plurality of images with overlapped parts (which may be obtained at different times, different viewing angles or different camera sensors) into a seamless panoramic image or a high-resolution image. The splicing method based on feature template matching feature points is used more. The method allows the images to be spliced to have certain inclination and deformation, overcomes the problem that the axes of the images must be consistent when the images are obtained, and simultaneously allows certain chromatic aberration between the adjacent images. The splicing of the panoramic image mainly comprises the following four steps: pre-splicing the images, namely determining the accurate position of the superposition of two adjacent images, and laying a foundation for searching the characteristic points; extracting the characteristic points, namely finding the characteristic points to be matched after the basic coincidence position is determined; image matrix transformation and splicing, namely establishing a transformation matrix of the image according to the matching points and realizing the splicing of the image; and finally, smoothing the image. It is to be understood that the above description is intended to be illustrative, and not restrictive, of the present disclosure. In some embodiments, image integration of a whole page of text may be performed while writing, by stitching of images, similar to taking with a panoramic camera.

In some embodiments, the method of the present disclosure further includes modifying the stitched image to obtain a modified text image. In some embodiments, because the stylus is typically tilted, the image captured by the stylus is typically tilted and does not facilitate viewing or recognition of the captured text. Thus, modifications, e.g., distortion correction algorithm processing, can be made to the stitched image to make the text image more convenient for viewing and later text recognition.

By adopting the method disclosed by the invention, the whole page of image can be acquired without being limited to a special book, and the corresponding writing track can be recorded for teaching analysis. In addition, after the job or the writing scene is finished on the book, the image data of the whole page of text can be obtained without a third-party shooting device (such as a mobile phone or a high-speed camera).

The method of the present disclosure may further include performing text recognition on the text image to obtain a recognized text. In some embodiments, the text image is text recognized by an optical character recognition algorithm. In some embodiments, the text in the text image is recognized by an Optical Character Recognition (OCR) algorithm to obtain corresponding text data, which includes all characters, all words/single words, coordinates of the characters or words/words with respect to the upper left corner of the target image, all line texts, and so on. By adopting the method disclosed by the invention, the text recognition can be carried out on the image of the existing document, the text recognition can also be carried out on the image of the writing track, and a special book is not needed.

In some embodiments, the method of the present disclosure further comprises: while acquiring a target image of the text, acquiring an angle between a longitudinal extension direction of the device and a gravitational force direction, and performing text recognition on the spliced image by using the angle assistance. In some embodiments, the device may include a regular pen, a point-and-read pen, a smart pen, and the like. In some embodiments, the method of the present disclosure further comprises: while acquiring a target image of the text, acquiring an angle between a longitudinal extension direction and a horizontal direction of the device, and using the angle to assist text recognition of the stitched image. It should be understood that the paper may be considered to be at a horizontal angle when writing or reading is normally performed. Through the introduction of the angle factor, the image can be better corrected by correction processing (such as distortion correction algorithm processing). Because the angle of the pen grip may vary from person to person, but is within a reasonable range.

As shown in fig. 3, a paper sheet 20, a device 21 and an assembly 22 are shown. In some embodiments, the device 21 and the assembly 22 may be separate, in which case the device 21 may be a conventional ball-point pen, fountain pen, or the like, and the assembly 22 may be secured to the device 21 using a clip or the like. The assembly 22 includes a camera set or the like for acquiring text images and performing text recognition on the text images. In some embodiments, the device 21 and the component 22 may be integrated, constitute a smart pen, both for normal writing and capturing writing traces, etc. In some embodiments, as shown in fig. 3, direction 23 is the direction of longitudinal extension of device 21, and direction 24 may be a horizontal direction parallel to the plane of the paper or other direction set as desired, e.g., any suitable direction closer to direction 23 than to direction 24.

In some embodiments, the angle of the device 21 and the gravity direction is obtained by using an angle sensor, and the angle is used for the auxiliary component 22 (including a camera) and a corresponding algorithm to perform recognition processing of characters and pictures.

In some embodiments, obtaining the target image of the text comprises: an image of the object within a viewing angle between a longitudinal extension direction of the device and a horizontal direction is acquired. As shown in fig. 3, the target image may be obtained within a viewing angle between the direction 23 and the direction 24. In some embodiments, the cameras of the assembly 22 may surround the entire device 21, so that the target image can be acquired from various angles without dead angles, and then a complete text image is obtained through image stitching, and then a more complete and accurate text is identified.

In some embodiments, the present disclosure further comprises: and responding to another preset operation event, and performing voice broadcast on part or all of the recognized text. For example, the component 22 may include a microphone, speaker, etc., which in turn may enable speech playback of recognized text. Additionally, in some embodiments, the component 22 may engage in voice interaction with the user. In some embodiments, the reading function may be implemented by recognizing the text of the image at the reading position, i.e., the recognized text is instantly broadcasted by voice. Therefore, the method can realize the point reading, scanning and recording of the existing document, can also realize the recording of the writing track, and can also carry out text recognition on the existing document or the writing track.

In some embodiments, the method of the present disclosure further includes projecting infrared projected light or visible projected light onto the paper surface 20 of the text for assisting in the recognition of the text. For example, the assembly 22 may include an infrared projection lamp, a visible projection lamp, and the like, may project a dot matrix light source, and the like, to assist in text recognition of the image.

The method disclosed by the invention can be used for splicing the target images firstly and then correcting the target images, as shown in fig. 2, the method disclosed by the invention can also be used for correcting the target images firstly and then splicing the corrected target images. Accordingly, another method of the present disclosure may include steps S101, S202, and S203. Step S202, correcting the target image to obtain a corrected target image; and step S203, carrying out image splicing on the corrected target image to obtain a spliced text image. Namely, the difference from the previous method is that the order of modification and splicing is different, and other related steps are the same as the description of the previous method and are not repeated here.

As shown in fig. 3, the present disclosure also provides a text processing apparatus, e.g., component 22. As shown in fig. 3, the assembly 22 may include a processor 43 (e.g., an image processing chip), one or more cameras 41, and an angle sensor 42. One or more cameras 41 may form a camera group for acquiring a target image of the text. The processor 43 is configured to stitch and/or correct the target images. One or more cameras 41 may be communicatively coupled to processor 43. An angle sensor 42 is communicatively connected to the processor 43, the angle sensor 42 being configured to acquire a first angle between a longitudinal extension direction of the text processing device and the gravitational direction and/or a second angle between the longitudinal extension direction of the text processing device and the horizontal direction, and to assist in said correction of the target image.

In some embodiments, the processor 43 is further configured to identify a target image of the stitched and/or modified text, resulting in an identified text.

In some embodiments, the text processing device may further include a wireless communication component for data transmission of the text processing device with an external component. In some embodiments, the acquired text image may be processed and identified in the text processing device, or may be sent to the cloud for processing through a wireless communication device such as bluetooth. That is, the wireless communication component can facilitate communication with cloud services or other devices.

In some embodiments, the text processing apparatus may include a gyroscope, and a relative angle between the device and the paper surface may be known through the gyroscope, so that the relative angle is fed back to the processing chip, and through an increase in an angle coefficient, a distortion correction algorithm in text image recognition may better perform distortion processing on the text image. Because the included angles of the pen-holding of different people are different but are within a relatively reasonable range. The relative angle can assist in the recognition of the text image.

In some embodiments, a flexible battery may be employed to power the text processing device to help achieve miniaturization and shape flexibility of the text processing device.

In some embodiments, the text processing device may include a visible light projection lamp or an infrared projection lamp, and projects light onto the paper surface 20, and the camera takes a picture and performs OCR, thereby implementing a point reading function.

In some embodiments, the assembly 22 may include attachment features to secure a text processing device (e.g., the assembly 22) to the apparatus 21, for example, a clip, an adjustable cap, or the like may be employed.

In some embodiments, the text processing apparatus may include a switching means for switching the text processing apparatus. For example, the text processing device may include control buttons that control writing, reading, and so forth. In some embodiments, the text processing means may include a microphone, speaker, etc., which in turn may enable the recognized text to be played in speech or to be voice interacted with by the user.

The present disclosure also provides a text recognition apparatus 500, which includes a target image acquisition unit 501 and an image stitching unit 502. The target image acquisition unit 501 is configured to acquire a target image of a text in response to a preset operation event. The image stitching unit 502 is configured to perform image stitching on the target image to obtain a stitched image.

In some embodiments, the apparatus of the present disclosure further comprises: the image correction unit is configured to correct the spliced image to obtain a corrected text image; and the text recognition unit is configured to perform text recognition on the text image to obtain a recognized text. The units of the above devices can find the corresponding contents in the corresponding method contents, and therefore, the details are not described herein.

In addition, the present disclosure also provides a terminal, including: at least one memory and at least one processor; the memory is used for storing program codes, and the processor is used for calling the program codes stored in the memory to execute the text processing method.

In addition, the present disclosure also provides a computer storage medium storing program code for executing the above-described text processing method.

By adopting the method and the device disclosed by the invention, the limitation of a writing book is avoided, the writing book is not required to be customized, and the text image and the text track can be obtained in real time only by using a camera accessory with a fixed visual angle, an image splicing algorithm and a character recognition algorithm, so that the image data of the whole page of text can be completed at the fastest speed. In addition, the scheme of the intelligent pen can be made into a camera accessory of the pen, is embedded into a cap part of a common pen or a common ball pen, and can also be made into an intelligent pen. In addition, the text image can be acquired in real time, and then the voice broadcasting function can be added. For example, right-hand writing can be interactively achieved, and the left hand performs finger reading on characters in the image acquisition area. The method and the device realize the recording and text recognition of the existing document and writing track, and can realize the functions of point reading and recording.

Referring now to FIG. 6, a block diagram of an electronic device 600 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.

As shown in fig. 6, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from storage 606 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.

Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 606 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.

In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such embodiments, the computer program may be downloaded and installed from a network through the communication device 609, or installed from the storage device 606, or installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.

It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.

In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.

The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.

The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring at least two internet protocol addresses; sending a node evaluation request comprising the at least two internet protocol addresses to node evaluation equipment, wherein the node evaluation equipment selects the internet protocol addresses from the at least two internet protocol addresses and returns the internet protocol addresses; receiving an internet protocol address returned by the node evaluation equipment; wherein the obtained internet protocol address indicates an edge node in the content distribution network.

Alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a node evaluation request comprising at least two internet protocol addresses; selecting an internet protocol address from the at least two internet protocol addresses; returning the selected internet protocol address; wherein the received internet protocol address indicates an edge node in the content distribution network.

Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).

The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".

The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.

In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

According to one or more embodiments of the present disclosure, there is provided a text processing method including: responding to a preset operation event, and acquiring a target image of a text; and carrying out image splicing on the target image to obtain a spliced image.

According to one or more embodiments of the present disclosure, the text processing method further includes correcting the stitched image to obtain a corrected text image.

According to one or more embodiments of the present disclosure, image stitching the target image to obtain a stitched image includes: correcting the target image to obtain a corrected target image; and carrying out image splicing on the corrected target image to obtain a spliced text image.

According to one or more embodiments of the present disclosure, the text processing method further includes: and performing text recognition on the text image to obtain a recognized text.

According to one or more embodiments of the present disclosure, the text processing method further includes: while acquiring the target image, acquiring a first angle between a longitudinal extension direction of a device and a gravitational force direction and/or a second angle between the longitudinal extension direction of the device and a horizontal direction; and utilizing the first angle and/or the second angle to assist in correcting the spliced image.

According to one or more embodiments of the present disclosure, acquiring the target image includes: acquiring the target image within a viewing angle between a longitudinal extension direction and a horizontal direction of the device.

According to one or more embodiments of the present disclosure, the text processing method further includes: and responding to another preset operation event, and carrying out voice broadcast on part or all of the recognized text.

According to one or more embodiments of the present disclosure, the text processing method further includes: and projecting infrared projection light or visible projection light to the paper surface where the text is located for assisting the recognition of the text.

According to one or more embodiments of the present disclosure, there is provided a text processing apparatus including: a processor; one or more cameras in communication connection with the processor for acquiring a target image of the text; an angle sensor in communicative connection with the processor; wherein the processor is configured to stitch and/or correct the target image, and the angle sensor is configured to acquire a first angle between a longitudinal extension direction of the text processing apparatus and a gravitational force direction and/or a second angle between the longitudinal extension direction of the text processing apparatus and a horizontal direction, and assist in the correction of the target image.

According to one or more embodiments of the present disclosure, the processor is further configured to identify a target image of the stitched and/or corrected text, resulting in an identified text.

According to one or more embodiments of the present disclosure, the wireless communication unit is further included for data transmission of the text processing apparatus with an external unit.

According to one or more embodiments of the present disclosure, the apparatus further includes a connection part for physically connecting the text processing apparatus to a general pen.

According to one or more embodiments of the present disclosure, a microphone or a speaker is further included for enabling voice interaction and/or voice broadcasting of the recognized text.

According to one or more embodiments of the present disclosure, the document processing apparatus further includes a switch device for performing on-off control of the document processing apparatus.

According to one or more embodiments of the present disclosure, there is also provided a text recognition apparatus including: the target image acquisition unit is configured to respond to a preset operation event and acquire a target image of the text; and the image splicing unit is configured to perform image splicing on the target image to obtain a spliced image.

According to one or more embodiments of the present disclosure, further comprising: the image correction unit is configured to correct the spliced image to obtain a corrected text image; and the text recognition unit is configured to perform text recognition on the text image to obtain a recognized text.

According to one or more embodiments of the present disclosure, there is provided a terminal including: at least one memory and at least one processor; the memory is used for storing program codes, and the processor is used for calling the program codes stored in the memory to execute the text processing method.

According to one or more embodiments of the present disclosure, there is provided a computer storage medium storing program code for executing the above-described text processing method.

The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.

Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种基于图像生成技术的垃圾物品图像数据集构建方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!