CN113869301A - Scanning printing method, device, equipment and storage medium - Google Patents

Scanning printing method, device, equipment and storage medium Download PDF

Info

Publication number
CN113869301A
CN113869301A CN202111170416.4A CN202111170416A CN113869301A CN 113869301 A CN113869301 A CN 113869301A CN 202111170416 A CN202111170416 A CN 202111170416A CN 113869301 A CN113869301 A CN 113869301A
Authority
CN
China
Prior art keywords
target
image
scanning
bitmap
printing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111170416.4A
Other languages
Chinese (zh)
Inventor
徐良福
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Jingwah Information Technology Co ltd
Original Assignee
Shenzhen Jingwah Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Jingwah Information Technology Co ltd filed Critical Shenzhen Jingwah Information Technology Co ltd
Priority to CN202111170416.4A priority Critical patent/CN113869301A/en
Publication of CN113869301A publication Critical patent/CN113869301A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1244Job translation or job parsing, e.g. page banding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1253Configuration of print job parameters, e.g. using UI at the client
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1278Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
    • G06F3/1292Mobile client, e.g. wireless printing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/242Dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/58Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/33Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/32Indexing scheme for image data processing or generation, in general involving image mosaicing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • G06T2207/10008Still image; Photographic image from scanner, fax or copier
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Character Discrimination (AREA)

Abstract

The invention discloses a scanning printing method, a scanning printing device, scanning printing equipment and a storage medium. A scanning printing method includes: scanning a preset area of a target document to obtain a target image; performing OCR character recognition processing on the target image to obtain recognized target characters; displaying the target characters on a display screen of the dictionary pen; and typesetting the target characters, generating a target bitmap, and sending the target bitmap to a printer connected with the dictionary pen for printing. The problems that the inquired dictionary content can only be searched and displayed or read aloud through a display screen, and long-term accumulation is not met and note recording is not convenient are solved, the integration of accurate scanning identification, content inquiry and printing is realized, and the effects of long-term accumulation and note recording of a user are facilitated.

Description

Scanning printing method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of scanning pens, in particular to a scanning printing method, a scanning printing device, scanning printing equipment and a storage medium.
Background
The traditional dictionary products need to manually input words for query, and the word searching efficiency is low. In recent years, machine scanning and recognizing characters are applied to various scenes and equipment, scanning, recognizing and inquiring functions are combined, some dictionary pens based on an OCR technology appear at present, a scanning pen can scan paper texts or images and inquire corresponding contents, the inquired dictionary contents can be only checked in a display screen of the dictionary pen or read aloud, the inquired dictionary contents can be only browsed or listened once according to the use habits of general users, and the problems that long-term accumulation memory habits are not met and note recording is not convenient for the users during learning and working exist.
Disclosure of Invention
The invention provides a scanning and printing method, a scanning and printing device, scanning and printing equipment and a storage medium, which integrate accurate scanning identification, content inquiry and printing and are beneficial to the effects of long-term accumulation and note recording of a user.
In a first aspect, an embodiment of the present invention provides a scanning and printing method, which is implemented based on a scanning and printing apparatus, where the scanning and printing apparatus includes an image acquisition module, an image processing module, an image display module, a control module, and a printer connected to the control module; the scanning printing method comprises the following steps:
scanning a preset area of a target document to obtain a target image;
performing OCR character recognition processing on the target image to obtain recognized target characters;
displaying the target characters on a display screen of the dictionary pen;
and typesetting the target characters, generating a target bitmap, and sending the target bitmap to a printer connected with the dictionary pen for printing.
Optionally, scanning a preset region of the target document to obtain the target image includes:
acquiring image data of a preset region of the target document according to preset parameters to obtain a plurality of acquired images;
clipping the collected image to obtain a corresponding clipped image;
and splicing the cut images to obtain the target image.
Optionally, the performing a cropping operation on the acquired image to obtain a corresponding cropped image includes:
acquiring coordinate data of dot matrix data of the acquired image, and determining the middle position of a vertical coordinate of the dot matrix data as a horizontal coordinate axis for clipping;
scanning the collected image from left to right along the transverse coordinate axis, determining a corresponding first position when the acquired data is not zero for the first time, and determining the left boundary of the cut image according to the first position and the target cutting height;
obtaining the right boundary of the cut image according to the left boundary and the target cutting width;
respectively obtaining an upper boundary and a lower boundary of the cut image according to the first position and the target cutting height;
and clipping the collected image according to the left boundary, the right boundary, the upper boundary and the lower boundary to obtain the clipped image.
Optionally, the splicing the cropped images to obtain the target image includes:
splicing the cut images to obtain a target image without a characteristic overlapping part; the splicing processing comprises feature point extraction and matching, image registration and image fusion of specially cut images.
Optionally, after the target image is subjected to OCR character recognition processing to obtain recognized target characters, the method further includes:
performing OCR character recognition processing on the target image to obtain recognized characters;
determining the character type of the recognition character;
and selecting corresponding pre-installed dictionary resource data according to the character type, and searching the pre-installed dictionary resource data to obtain the target characters.
Optionally, the typesetting the target text and generating a target bitmap, and sending the target bitmap to a printer connected to the dictionary pen via bluetooth for printing includes:
judging whether the dictionary pen is connected with a corresponding printer through Bluetooth or not;
if so, re-typesetting the target characters according to the printing protocol of the printer, generating a target bitmap and sending the target bitmap to the printer for printing;
if not, the dictionary pen attempts to reconnect the printer.
Optionally, the rearranging the target text according to the printing protocol of the printer, generating a target bitmap, and sending the target bitmap to the printer includes:
rearranging the target characters to generate an original bitmap;
adjusting the size of the original bitmap according to a printing protocol of the printer, and performing graying processing to generate a grayscale bitmap;
determining a corresponding printing bitmap according to each pixel point of the gray bitmap;
adding a protocol header to the head of the printing bitmap to generate the target bitmap;
and sending the target bitmap to the printer for printing.
In a second aspect, an embodiment of the present invention further provides a scanning printing apparatus, including:
the image acquisition module is used for scanning a preset area of a target document to acquire a target image;
the image processing module is used for carrying out OCR character recognition processing on the target image to obtain recognized target characters;
the image display module is used for displaying the target characters on a display screen of the dictionary pen;
and the control module is used for typesetting the target characters, generating a target bitmap and sending the target bitmap to a printer connected with the dictionary pen through Bluetooth for printing.
In a third aspect, an embodiment of the present invention further provides a scanning printing apparatus, where the apparatus includes:
one or more processors;
a memory for storing one or more programs;
the camera is used for scanning a preset area of a target document;
a printer to print a target bitmap;
when executed by the one or more processors, cause the one or more processors to implement a scan printing method as described in any one of the first aspects.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the scan printing method according to any one of the first aspect.
The method comprises the steps of scanning a preset area of a target document to obtain a target image, and carrying out OCR character recognition processing on the target image to obtain recognized target characters; displaying the target characters on a display screen of the dictionary pen; the method comprises the steps of composing target characters and generating a target bitmap, sending the target bitmap to a printer connected with a dictionary pen through Bluetooth to be printed, solving the problem that queried dictionary content can only be displayed or read aloud through a display screen, and the problem that the queried dictionary content is not suitable for long-term accumulation and inconvenient note recording is solved, realizing the integration of accurate scanning recognition, content query and printing, and being beneficial to the effect of long-term accumulation and note recording of a user.
Drawings
Fig. 1 is a schematic flowchart of a scanning printing method according to an embodiment of the present invention;
fig. 2 is a schematic sub-flow chart of a scanning printing method according to an embodiment of the present invention;
fig. 3 is a schematic sub-flowchart of a scanning printing method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a scanning printing apparatus according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of a scanning printing apparatus according to a third embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a schematic flow chart of a scanning and printing method according to an embodiment of the present invention, which is applicable to scanning and identifying paper characters for query, learning, and note recording, and the method can be executed by a scanning and printing apparatus, and specifically includes the following steps:
step 110, scanning a preset area of the target document to obtain a target image.
The dictionary pen comprises a camera, and when a user slides on a document by using the dictionary pen, the camera shoots pictures in a preset area and obtains a target image through processing. In the process of acquiring a target image by scanning a preset area of a target document through a camera, the method specifically comprises the following steps:
and 111, acquiring image data of a preset area of the target document according to preset parameters to obtain a plurality of acquired images.
The camera of the dictionary pen collects image data of a preset area of the target document at the frequency of 120fps to generate a plurality of collected images, the size of the collected images is 128 × 96, and the dictionary pen is guaranteed to obtain enough image data when rapidly scanning the preset area, and meanwhile, the data volume is not too large. The image acquisition of high frame rate only acquires the data part that uses, is favorable to improving the acquisition speed of data to and fall frame data when quick scanning and not enough lead to the inaccurate problem of discernment.
The collected image is a YUV format pixel, if the collected image is to be a gray scale image, each frame of image data only needs to obtain a Y component value, U, V is set to be 128 by default, Y represents a brightness component, U and V represent chrominance components, since U, V is the chrominance component of the image subjected to offset processing, the value range of the chrominance component before the offset processing is-128 to 127, and the chrominance component is a 0 value corresponding to no color at this time. And a gray level image in a YUV format is generated, so that the acquisition speed of the data of the camera is improved.
And step 112, performing cropping operation on the acquired image to obtain a corresponding cropped image.
The collected image may have problems of shadows, black edges, non-centered image elements and the like, and in order to ensure the accuracy of subsequent character recognition, the collected image needs to be corrected and cut to obtain a corresponding cut image. Wherein, the dictionary pen needs to adopt dynamic correction technique at first to rectify the camera, then cuts out the operation to gathering the image, specifically includes:
and S1, acquiring coordinate data of the dot matrix data of the acquired image, and determining the middle position of the vertical coordinate of the dot matrix data as the horizontal coordinate axis of clipping.
When determining the cutting area of the collected image, the coordinate axis of the cutting area is acquired first so as to determine the boundary line of the cutting area. Coordinate data of dot matrix data of the acquired image are acquired, and a horizontal coordinate axis for cutting is determined according to the middle position of a vertical coordinate of the dot matrix data, wherein the horizontal coordinate axis is also a central axis of a cutting area.
S2, scanning the collected image from left to right along the transverse coordinate axis, determining a corresponding first position when the obtained data is not zero for the first time, and determining the left boundary of the cut image according to the first position and the target cutting height.
Scanning an acquired image from left to right along a transverse coordinate axis, wherein the acquired image is a gray scale image in a YUV format, data of a blank position on the acquired image is 0, when the acquired data is not zero for the first time, the data is recorded as first data, a corresponding first position is determined according to the first data, and the first position is an intersection point of a column where the first data is located and the transverse coordinate axis; therefore, the column where the first position is located is taken as a left boundary, the clipping area is composed of a target clipping height and a target clipping width, and the range of the left boundary is determined according to the first position and the target clipping height. Further, the abscissa of the left boundary plus the target width to be cropped must be less than or equal to the width of the original picture, otherwise, cropping cannot be performed.
And S3, obtaining the right boundary of the cropping image according to the left boundary and the target cropping width.
The right boundary of the cropped image is obtained by moving the target cropping width from the left boundary in the direction of the transverse coordinate axis.
And S4, respectively obtaining the upper boundary and the lower boundary of the cut image according to the first position and the target cutting height.
An upper boundary of the cropped image is obtained by moving half of the target cropping height upward in a direction perpendicular to the transverse coordinate axis based on the first position, and a lower boundary of the cropped image is obtained by moving half of the target cropping height downward in a direction perpendicular to the transverse coordinate axis based on the first position.
And S5, cropping the collected image according to the left boundary, the right boundary, the upper boundary and the lower boundary to obtain the cropped image.
And cutting the acquired image in a closed area formed by the left boundary, the right boundary, the upper boundary and the lower boundary to obtain a cut image.
Through the correction of the camera of the dictionary pen, the completeness of the collected image data can be ensured, no interference recognition part is included, and the validity and completeness of the data included in the target image are ensured.
And 113, splicing the cut images to obtain the target image.
And performing feature point extraction and matching, image registration, image fusion and other splicing processing on the plurality of cut images to obtain a target image without a feature overlapping part.
And 120, performing OCR character recognition processing on the target image to acquire recognized target characters.
Step 120 specifically includes:
and 121, performing OCR character recognition processing on the target image to obtain recognized characters.
Ocr (optical character recognition) text recognition refers to the process of an electronic device (e.g., a scanner or digital camera) examining printed characters on paper and then translating the shapes into computer text using character recognition methods. And obtaining complete recognized characters on the target image through OCR character recognition processing. The processing steps can improve the acquisition accuracy of the dictionary pen for scanning the text content.
And step 122, determining the character type of the identification character.
If the recognized text can be a chinese character or an english character, the preset text types include: chinese type and english type. The character type is determined first and then the pre-stored content is inquired to determine the meaning and the extension content of the recognized character.
And step 123, selecting corresponding pre-installed dictionary resource data according to the character types, and searching the pre-installed dictionary resource data to obtain the target characters.
The pre-installed dictionary resource includes Chinese dictionary resource data and English dictionary resource data. When the character type of the character is recognized as the Chinese type, the Chinese dictionary resource data is inquired according to the Chinese type in priority; and when the character type of the recognized character is an English type, preferentially inquiring English dictionary resource data according to the English type. Searching and obtaining target characters according to the identification characters and the character types, wherein the target characters comprise the identification characters and related explanation contents and extension contents; exemplarily, if the recognized characters are a sentence of ancient poetry, the query is preferentially carried out in the resource data of the Chinese dictionary, and the queried target characters are the content and the analysis of the corresponding whole ancient poetry; for example, if the recognized character is an english word, the query is preferentially performed in the english dictionary resource data, and the queried target character can be extended contents such as paraphrase, pronunciation, similar words, opposite words, sentence making, related celebrity, and the like of the english word. And the corresponding pre-installed dictionary resource data is inquired preferentially according to the character type, so that the inquiry range is reduced, and the inquiry speed is increased.
And step 130, displaying the target characters on a display screen of the dictionary pen.
And displaying the inquired target characters on a display screen of the dictionary pen, and displaying the target characters in a rolling manner according to a preset frequency, and further, carrying out synchronous voice broadcasting.
And 140, typesetting the target characters, generating a target bitmap, and sending the target bitmap to a printer connected with the dictionary pen for printing.
After the target characters are inquired, the user can check the target characters through a display screen of the dictionary pen and broadcast the target characters through voice, and the target characters can be printed through a printer connected with the dictionary pen through Bluetooth and stored as notes, so that the user can remember the target characters conveniently.
The method specifically comprises the following steps:
and step 141, judging whether the dictionary pen is connected with a corresponding printer through Bluetooth. If yes, go to step 142; if the determination results are both, step 143 is executed.
Dictionary pen embeds has bluetooth module, and the printer of being connected with the dictionary pen is personal bluetooth negative pole, and the dictionary pen all supports bluetooth 4.0BLE agreement with the printer, and the bluetooth that the printer was connected to dictionary pen accessible bluetooth carries out data transmission connected mode and supports bluetooth BLE4.0, after inquiring the target characters, shows on the display screen of dictionary pen and prints the entry, and the user can select whether to print according to individual demand.
And 142, rearranging the target characters according to the printing protocol of the printer, generating a target bitmap and sending the target bitmap to the printer for printing.
If the dictionary pen is connected with the corresponding printer through Bluetooth, the dictionary pen needs to convert the target characters into a target bitmap which can be recognized and printed by the printer according to a printing protocol, and then the target bitmap is sent to the printer to be printed.
The method specifically comprises the following steps:
a. and rearranging the target characters to generate an original bitmap.
b. And adjusting the size of the original bitmap according to the printing protocol of the printer, and performing graying processing to generate a grayscale bitmap.
c. And determining a corresponding printing bitmap according to each pixel point of the gray bitmap.
d. And adding a protocol header to the head of the printing bitmap to generate the target bitmap.
e. And sending the target bitmap to the printer for printing.
When the dictionary pen and the printer are determined to be in a connection state, the dictionary pen typesets the target characters again to generate an original bitmap, when the width of the original bitmap is larger than the printing width supported by the Bluetooth printer, the size of the original bitmap needs to be adjusted, and the original bitmap is zoomed according to the printing width supported by the Bluetooth printer; when the width of the original bitmap is less than or equal to the printing width supported by the Bluetooth printer, no adjustment is made. After the gray bitmap is generated according to the original bitmap, whether each pixel point on the gray bitmap needs to be printed or not needs to be judged, the pixel point needing to be printed is stored as 1, and the pixel point not needing to be printed is stored as 0, so that the printing bitmap is generated. The printing bitmap cannot be directly recognized by the Bluetooth printer, and a protocol header is added to the head of the printing bitmap to generate a target bitmap which can be finally recognized by the printer, so that the target bitmap is sent to the printer for printing.
Step 143, the dictionary pen attempts to reconnect the printer.
If the dictionary pen is not connected with the corresponding printer through Bluetooth, the dictionary pen needs to try to connect the printer again, and if the dictionary pen is not connected with the corresponding printer after trying to connect for a preset number of times, the corresponding printer needs to be searched again.
The display screen of the dictionary pen is provided with a search button, a connection button and a check button, the search button is used for searching for available Bluetooth printers, the connection button is used for connecting the available Bluetooth printers, and the check button is used for checking the current state of the connected Bluetooth printers.
According to the technical scheme of the embodiment, the target image is obtained by scanning the preset area of the target document, the collected image data can be ensured to be complete and correct without a part interfering recognition through calibrating and cutting the camera of the dictionary pen, the more accurate target image is obtained, and the target image is subjected to OCR character recognition processing to obtain recognized target characters; displaying the target characters on a display screen of the dictionary pen; the method has the advantages that the target characters are typeset and the target bitmap is generated, the target bitmap is sent to the printer connected with the Bluetooth of the dictionary pen to be printed, the problem that the inquired dictionary content can only be displayed or read through the display screen, long-term accumulation is not met, note recording is not convenient to carry out is solved, accurate scanning and recognition, content inquiry and printing are integrated, the method is suitable for use scenes of printing at any time, and the method is beneficial to the effect of long-term accumulation and note recording of a user.
On the basis of the technical scheme, the display screen of the dictionary pen further comprises a collection button, a collection interface can be accessed by clicking the collection button, and the collection content can be selectively sent to a connected printer for printing. The user can conveniently collect and store the dictionary pen when the dictionary pen is not connected with the Bluetooth printer, and print the dictionary pen after the dictionary pen is connected with the Bluetooth printer, so that the application range is expanded, and the convenience for the user to use is improved.
Example two
Fig. 4 is a schematic structural diagram of a scanning printing apparatus according to a second embodiment of the present invention, and as shown in fig. 4, the scanning printing apparatus includes:
the image obtaining module 210 is configured to scan a preset region of a target document to obtain a target image.
The dictionary pen comprises a camera, and when a user slides on a document by using the dictionary pen, the camera shoots pictures in a preset area and obtains a target image through processing.
Further, the image obtaining module 210 includes:
and the collected image acquisition unit is used for collecting the image data of the preset area of the target document according to preset parameters to obtain a plurality of collected images.
And the cutting image acquisition unit is used for carrying out cutting operation on the acquired image to obtain a corresponding cutting image.
And the coordinate axis determining subunit is used for acquiring coordinate data of the dot matrix data of the acquired image and determining the middle position of the vertical coordinate of the dot matrix data as a horizontal coordinate axis for clipping.
And the cropping left boundary acquisition subunit is used for scanning the acquired image from left to right along the transverse coordinate axis, determining a corresponding first position when the acquired data is not zero for the first time, and determining the left boundary of the cropping image according to the first position and the target cropping height.
And the cutting boundary acquisition subunit is used for acquiring the right boundary of the cutting image according to the left boundary and the target cutting width.
And the clipping upper and lower boundary acquisition subunit is used for respectively acquiring an upper boundary and a lower boundary of the clipped image according to the first position and the target clipping height.
And the cutting subunit is used for cutting the acquired image according to the left boundary, the right boundary, the upper boundary and the lower boundary to obtain the cut image.
And the splicing subunit is used for splicing the cut images to obtain the target image.
And the image processing module 220 is configured to perform OCR character recognition processing on the target image to obtain recognized target characters.
The image processing module 220 specifically includes:
and the recognition unit is used for performing OCR character recognition processing on the target image to obtain recognized characters.
And the character type determining unit is used for determining the character type of the identification character.
And the target character searching unit is used for selecting corresponding pre-installed dictionary resource data according to the character type and searching the pre-installed dictionary resource data to obtain the target characters.
And the image display module 230 is used for displaying the target characters on a display screen of the dictionary pen.
And displaying the inquired target characters on a display screen of the dictionary pen, and displaying the target characters in a rolling manner according to a preset frequency, and further, carrying out synchronous voice broadcasting.
And the control module 240 is used for typesetting the target characters, generating a target bitmap and sending the target bitmap to a printer connected with the dictionary pen through Bluetooth for printing.
After the target characters are inquired, the user can check the target characters through a display screen of the dictionary pen and broadcast the target characters through voice, and the target characters can be printed through a printer connected with the dictionary pen through Bluetooth and stored as notes, so that the user can remember the target characters conveniently.
Further, the control module 240 includes:
and the connection judging unit is used for judging whether the dictionary pen is connected with the corresponding printer through Bluetooth.
And the printing execution unit is used for rearranging the target characters according to the printing protocol of the printer if the judgment result is yes, generating a target bitmap and sending the target bitmap to the printer for printing.
And the typesetting subunit is used for typesetting the target characters again to generate an original bitmap.
And the adjusting subunit is used for adjusting the size of the original bitmap according to the printing protocol of the printer, performing graying processing and generating a grayscale bitmap.
And the printing point determining subunit is used for determining a corresponding printing bitmap according to each pixel point of the gray bitmap.
And the protocol header adding subunit is used for adding a protocol header to the head of the printing bitmap to generate the target bitmap.
And the sending subunit is used for sending the target bitmap to the printer for printing.
And the reconnection unit is used for trying to reconnect the printer by the dictionary pen if the judgment result is negative.
According to the technical scheme of the embodiment, the target image is obtained by scanning the preset area of the target document, the collected image data can be ensured to be complete and correct without a part interfering recognition through calibrating and cutting the camera of the dictionary pen, the more accurate target image is obtained, and the target image is subjected to OCR character recognition processing to obtain recognized target characters; displaying the target characters on a display screen of the dictionary pen; the method has the advantages that the target characters are typeset and the target bitmap is generated, the target bitmap is sent to the printer connected with the Bluetooth of the dictionary pen to be printed, the problem that the inquired dictionary content can only be displayed or read through the display screen, long-term accumulation is not met, note recording is not convenient to carry out is solved, accurate scanning and recognition, content inquiry and printing are integrated, the method is suitable for use scenes of printing at any time, and the method is beneficial to the effect of long-term accumulation and note recording of a user.
The scanning and printing device provided by the embodiment of the invention can execute the scanning and printing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE III
Fig. 5 is a schematic structural diagram of a scanning printing apparatus according to a third embodiment of the present invention, as shown in fig. 5, the scanning printing apparatus includes a processor 30, a memory 31, an input device 32, and an output device 33; the number of processors 30 in the scanning printing device may be one or more, and one processor 30 is taken as an example in fig. 5; the processor 30, the memory 31, the input device 32, and the output device 33 in the scanning and printing apparatus may be connected by a bus or other means, and the bus connection is exemplified in fig. 5.
The memory 31, as a computer-readable storage medium, may be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the scan printing method in the embodiment of the present invention (for example, the image acquisition module 210, the image processing module 220, the image display module 230, and the control module 240 in the scan printing apparatus). The processor 30 executes various functional applications and data processing of the scanning and printing apparatus by executing software programs, instructions, and modules stored in the memory 31, that is, implements the above-described scanning and printing method.
The memory 31 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 31 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 31 may further include memory located remotely from processor 30, which may be connected to the scanning printing device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 32 may be used to receive input numeric or character information and to generate key signal inputs relating to user settings and function controls of the scanning printing apparatus. The output device 33 may include a display device such as a display screen.
Example four
A fourth embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a method of scanning printing, the method including:
scanning a preset area of a target document to obtain a target image;
performing OCR character recognition processing on the target image to obtain recognized target characters;
displaying the target characters on a display screen of the dictionary pen;
and typesetting the target characters, generating a target bitmap, and sending the target bitmap to a printer connected with the dictionary pen for printing.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also execute the relevant operations in the scan printing method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the scanning and printing apparatus, the included units and modules are merely divided according to the functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A scanning printing method is characterized in that the method is realized based on a scanning printing device, and the scanning printing device comprises an image acquisition module, an image processing module, an image display module, a control module and a printer connected with the image acquisition module; the scanning printing method comprises the following steps:
scanning a preset area of a target document to obtain a target image;
performing OCR character recognition processing on the target image to obtain recognized target characters;
displaying the target characters on a display screen of the dictionary pen;
and typesetting the target characters, generating a target bitmap, and sending the target bitmap to a printer connected with the dictionary pen for printing.
2. The scanning and printing method according to claim 1, wherein scanning a preset area of a target document to obtain a target image comprises:
acquiring image data of a preset region of the target document according to preset parameters to obtain a plurality of acquired images;
clipping the collected image to obtain a corresponding clipped image;
and splicing the cut images to obtain the target image.
3. The scanning printing method of claim 2, wherein said cropping said captured image to obtain a corresponding cropped image comprises:
acquiring coordinate data of dot matrix data of the acquired image, and determining the middle position of a vertical coordinate of the dot matrix data as a horizontal coordinate axis for clipping;
scanning the collected image from left to right along the transverse coordinate axis, determining a corresponding first position when the acquired data is not zero for the first time, and determining the left boundary of the cut image according to the first position and the target cutting height;
obtaining the right boundary of the cut image according to the left boundary and the target cutting width;
respectively obtaining an upper boundary and a lower boundary of the cut image according to the first position and the target cutting height;
and clipping the collected image according to the left boundary, the right boundary, the upper boundary and the lower boundary to obtain the clipped image.
4. The scanning and printing method according to claim 2, wherein said stitching the cropped images to obtain the target image comprises:
splicing the cut images to obtain a target image without a characteristic overlapping part; the splicing processing comprises feature point extraction and matching, image registration and image fusion of specially cut images.
5. The scanning and printing method according to claim 1, wherein said subjecting the target image to OCR character recognition processing to obtain recognized target characters comprises:
performing OCR character recognition processing on the target image to obtain recognized characters;
determining the character type of the recognition character;
and selecting corresponding pre-installed dictionary resource data according to the character type, and searching the pre-installed dictionary resource data to obtain the target characters.
6. The scanning and printing method as claimed in claim 1, wherein said composing said target text and generating a target bitmap, and sending said target bitmap to a printer connected to said dictionary pen via bluetooth for printing, comprises:
judging whether the dictionary pen is connected with a corresponding printer through Bluetooth or not;
if so, re-typesetting the target characters according to the printing protocol of the printer, generating a target bitmap and sending the target bitmap to the printer for printing;
if not, the dictionary pen attempts to reconnect the printer.
7. The method of claim 6, wherein the rearranging the target text according to the printing protocol of the printer to generate a target bitmap to be sent to the printer comprises:
rearranging the target characters to generate an original bitmap;
adjusting the size of the original bitmap according to a printing protocol of the printer, and performing graying processing to generate a grayscale bitmap;
determining a corresponding printing bitmap according to each pixel point of the gray bitmap;
adding a protocol header to the head of the printing bitmap to generate the target bitmap;
and sending the target bitmap to the printer for printing.
8. A scanning printing apparatus, comprising:
the image acquisition module is used for scanning a preset area of a target document to acquire a target image;
the image processing module is used for carrying out OCR character recognition processing on the target image to obtain recognized target characters;
the image display module is used for displaying the target characters on a display screen of the dictionary pen;
and the control module is used for typesetting the target characters, generating a target bitmap and sending the target bitmap to a printer connected with the dictionary pen through Bluetooth for printing.
9. A scanning printing apparatus, characterized in that the apparatus comprises:
one or more processors;
a memory for storing one or more programs;
the camera is used for scanning a preset area of a target document;
a printer to print a target bitmap;
when executed by the one or more processors, cause the one or more processors to implement a scan printing method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the scan printing method according to any one of claims 1 to 7.
CN202111170416.4A 2021-10-08 2021-10-08 Scanning printing method, device, equipment and storage medium Pending CN113869301A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111170416.4A CN113869301A (en) 2021-10-08 2021-10-08 Scanning printing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111170416.4A CN113869301A (en) 2021-10-08 2021-10-08 Scanning printing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113869301A true CN113869301A (en) 2021-12-31

Family

ID=79001875

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111170416.4A Pending CN113869301A (en) 2021-10-08 2021-10-08 Scanning printing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113869301A (en)

Similar Documents

Publication Publication Date Title
US8988543B2 (en) Camera based method for text input and keyword detection
US8954845B2 (en) Image processing device, method and storage medium for two-way linking between related graphics and text in an electronic document
US7903875B2 (en) Character recognition processing device, character recognition processing method, and mobile terminal device
US7403657B2 (en) Method and apparatus for character string search in image
JP5511450B2 (en) Image processing apparatus, image processing method, and program
EP2270714B1 (en) Image processing device and image processing method
CN110705534B (en) Wrong problem book generation method suitable for electronic typoscope
US20170011732A1 (en) Low-vision reading vision assisting system based on ocr and tts
US8170862B2 (en) Document image processing device and document image processing program for maintaining layout in translated documents
JP2014504400A (en) How to crop a text image
US11341733B2 (en) Method and system for training and using a neural network for image-processing
CN101140617A (en) Electronic equipments and text inputting method
CN116704523B (en) Text typesetting image recognition system for publishing and printing equipment
JP2021043650A (en) Image processing device, image processing system, image processing method, and program
US8773733B2 (en) Image capture device for extracting textual information
US8768058B2 (en) System for extracting text from a plurality of captured images of a document
JP2004062350A (en) Document information input program, document information input device, and document information input method
CN113869301A (en) Scanning printing method, device, equipment and storage medium
CN110309754B (en) Problem acquisition method and system
US9870632B2 (en) Information processing apparatus and non-transitory computer readable medium
WO2013177240A1 (en) Textual information extraction method using multiple images
CN113205527A (en) Intelligent test paper cutting method and system and storage medium
JP4501731B2 (en) Image processing device
JP4697387B2 (en) Document image determination apparatus, document image determination method and program thereof
CN112632934B (en) Method for restoring table picture into editable WORD file table based on proportion calculation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination