CN111556251A - Electronic book generation method, device and medium - Google Patents

Electronic book generation method, device and medium Download PDF

Info

Publication number
CN111556251A
CN111556251A CN202010434015.4A CN202010434015A CN111556251A CN 111556251 A CN111556251 A CN 111556251A CN 202010434015 A CN202010434015 A CN 202010434015A CN 111556251 A CN111556251 A CN 111556251A
Authority
CN
China
Prior art keywords
preset
electronic book
image
shooting
images
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
CN202010434015.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.)
WeBank Co Ltd
Original Assignee
WeBank 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 WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN202010434015.4A priority Critical patent/CN111556251A/en
Publication of CN111556251A publication Critical patent/CN111556251A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B5/00Electrically-operated educational appliances
    • G09B5/02Electrically-operated educational appliances with visual presentation of the material to be studied, e.g. using film strip
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects

Abstract

The application discloses a method, a device, equipment and a medium for generating an electronic book, wherein the method comprises the following steps: when a shooting instruction is detected, starting a preset shooting camera, and performing page turning shooting on books at a preset shooting position to obtain a target shooting video; removing the non-qualified images in the target shooting video to obtain reserved images; and making the reserved image into an electronic book with a preset format. The electronic book manufacturing method and device aim to solve the technical problem that electronic book manufacturing efficiency is low in the prior art.

Description

Electronic book generation method, device and medium
Technical Field
The present application relates to the field of artificial intelligence technology for financial technology (Fintech), and in particular, to a method, device, and medium for generating an electronic book.
Background
With the continuous development of financial technologies, especially internet technology and finance, more and more technologies (such as distributed, Blockchain, artificial intelligence and the like) are applied to the financial field, but the financial industry also puts higher requirements on the technologies, such as the financial industry has higher requirements on the generation of electronic books.
At present, with the development of electronic devices, most people can complete reading on the electronic devices, that is, electronic books become a mainstream mode of reading, and in the prior art, the main mode of manufacturing books into electronic books is as follows: after the book is manually shot page by page, the e-book is obtained by manually editing and converting the manually shot pictures page by page, which causes that the process of making the e-book is time-consuming and labor-consuming and has low efficiency.
Disclosure of Invention
The present application mainly aims to provide an electronic book generation method, apparatus, device and medium, and aims to solve the technical problem of low electronic book production efficiency in the prior art.
In order to achieve the above object, the present application provides an electronic book generating method, where the electronic book generating method includes:
when a shooting instruction is detected, starting a preset shooting camera, and performing page turning shooting on books at a preset shooting position to obtain a target shooting video;
removing the non-qualified images in the target shooting video to obtain reserved images;
and making the reserved image into an electronic book with a preset format.
Optionally, the target captured video comprises a plurality of images, and the retained image comprises a first retained image;
the step of removing the non-qualified image in the target shooting video to obtain a reserved image comprises the following steps:
combining a plurality of target shooting videos to obtain a first composite video;
based on a preset image identification technology, identifying page content of each image in the first composite video to eliminate non-qualified images in the composite video to obtain a first retained image;
the non-qualified images comprise images with definition smaller than a first preset definition value, repeated page numbers between the images or shooting angles not within a first preset shooting angle range.
Optionally, the target shooting video comprises a plurality of images, and the reserved image comprises a second reserved image;
the step of removing the non-qualified image in the target shooting video to obtain a reserved image comprises the following steps:
respectively identifying the page content of each image in each target shooting video based on a preset image identification technology so as to eliminate non-qualified images in each target shooting video and obtain a plurality of processed images;
the non-qualified images comprise images with the definition smaller than a second preset definition value or the shooting angle not within a second preset shooting angle range;
generating a corresponding second composite video based on the plurality of processed images;
and removing the images with repeated page numbers in the second composite video to obtain a second reserved image.
Optionally, the step of making the reserved image into an electronic book with a preset format includes:
acquiring text content in the reserved image based on a preset Optical Character Recognition (OCR) technology;
and making the text content into an electronic book with a preset format.
Optionally, the step of obtaining the text content in the retained image based on a preset OCR recognition technology includes:
carrying out image preprocessing on the reserved image to obtain an effective image;
extracting character features of the effective image through a preset neural network recognition model, and acquiring corresponding text contents according to the character features;
the preset neural network recognition model is a data training set formed on the basis of a preset print pattern picture word stock, iterative training is carried out on a preset initial network model, and an obtained target model meeting preset conditions is obtained.
Optionally, the step of performing image preprocessing on the retained image to obtain an effective image includes:
and carrying out region division on the reserved image according to a preset demand type to obtain an effective image.
Optionally, after the step of making the reserved image into the electronic book in the preset format, the method includes:
determining whether the page numbers of the electronic book with the preset format are continuous;
and if the page number of the electronic book is not continuous, carrying out error prompt.
The present application also provides an electronic book generating apparatus, including:
the shooting module is used for starting a preset shooting camera when a shooting instruction is detected, and performing page turning shooting on books at a preset shooting position to obtain a target shooting video;
the clearing module is used for clearing the non-qualified images in the target shooting video to obtain reserved images;
and the making module is used for making the reserved image into an electronic book with a preset format.
Optionally, the target captured video comprises a plurality of images, and the retained image comprises a first retained image;
the purge module includes:
the first merging unit is used for merging the target shooting videos to obtain a first composite video;
the first identification unit is used for identifying the page number content of each image in the first composite video based on a preset image identification technology so as to eliminate the non-qualified images in the composite video and obtain a first retained image;
the non-qualified images comprise images with definition smaller than a first preset definition value, repeated page numbers between the images or shooting angles not within a first preset shooting angle range.
Optionally, the target shooting video comprises a plurality of images, and the reserved image comprises a second reserved image;
the purge module includes:
the second identification unit is used for respectively identifying the page content of each image in each target shooting video based on a preset image identification technology so as to eliminate the non-qualified images in each target shooting video and obtain a plurality of processed images;
the non-qualified images comprise images with the definition smaller than a second preset definition value or the shooting angle not within a second preset shooting angle range;
a second merging unit configured to generate a corresponding second composite video based on the plurality of processed images;
and the removing unit is used for removing the image with repeated page numbers in the second composite video to obtain a second reserved image.
Optionally, the fabricating module includes:
the acquisition unit is used for acquiring text content in the reserved image based on a preset Optical Character Recognition (OCR) technology;
and the making unit is used for making the text content into an electronic book with a preset format.
Optionally, the obtaining unit includes:
the first acquisition subunit is used for carrying out image preprocessing on the reserved image to obtain an effective image;
the character feature extraction subunit is used for extracting character features of the effective image through a preset neural network recognition model and acquiring corresponding text contents according to the character features;
the preset neural network recognition model is a data training set formed on the basis of a preset print pattern picture word stock, iterative training is carried out on a preset initial network model, and an obtained target model meeting preset conditions is obtained.
Optionally, the first obtaining subunit is configured to implement:
and carrying out region division on the reserved image according to a preset demand type to obtain an effective image.
Optionally, the electronic book generating apparatus includes:
the determining module is used for determining whether the page numbers of the electronic book in the preset format are continuous or not;
and the error prompt module is used for carrying out error prompt if the page numbers of the electronic book are not continuous.
The present application further provides an electronic book generating device, where the electronic book generating device is an entity device, and the electronic book generating device includes: the electronic book generation method comprises a memory, a processor and a program of the electronic book generation method stored on the memory and capable of running on the processor, wherein the program of the electronic book generation method can realize the steps of the electronic book generation method when being executed by the processor.
The present application also provides a medium having a program stored thereon for implementing the method for generating an electronic book described above, wherein the program for implementing the method for generating an electronic book described above, when executed by a processor, implements the steps of the method for generating an electronic book described above.
According to the method, when a shooting instruction is detected, a preset shooting camera is started, page turning shooting is carried out on books at a preset shooting position, and a target shooting video is obtained; removing the non-qualified images in the target shooting video to obtain reserved images; and making the reserved image into an electronic book with a preset format. In the method, when a shooting instruction is detected, a preset shooting camera is automatically started, page turning shooting is carried out on a book at a preset shooting position, a target shooting video is obtained instead of a page image, non-qualified images in the target shooting video are automatically cleared, and a reserved image is obtained; and the reserved image is made into the electronic book with the preset format, so that the manufacturing efficiency of the electronic book is improved, and the technical problem of low efficiency caused by manually shooting the book page by page and obtaining the electronic book is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a schematic flowchart illustrating a first embodiment of a method for generating an electronic book according to the present application;
fig. 2 shows that the target captured video includes a plurality of images, and the retained images include a first retained image according to a first embodiment of the method for generating an electronic book of the present application; the step of clearing the non-qualified image in the target shooting video to obtain a reserved image is used for refining the flow schematic diagram;
fig. 3 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present application.
The objectives, features, and advantages of the present application will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In a first embodiment of the electronic book generation method of the present application, referring to fig. 1, the electronic book generation method includes:
step S10, when a shooting instruction is detected, starting a preset shooting camera, and performing page turning shooting on books at a preset shooting position to obtain a target shooting video;
step S20, removing the non-qualified images in the target shooting video to obtain reserved images;
and step S30, making the reserved image into an electronic book with a preset format.
The method comprises the following specific steps:
step S10, when a shooting instruction is detected, starting a preset shooting camera, and performing page turning shooting on books at a preset shooting position to obtain a target shooting video;
in this embodiment, an electronic book generating method is applied to an electronic book generating system, which belongs to an electronic book generating device, and a shooting instruction can be manually triggered on an electronic book generating interface of the electronic book generating system, before the shooting instruction is manually triggered, a book to be shot is already placed in a preset shooting position, the preset shooting position and a camera to be shot for the book have a preset fixed angle relationship, etc., so that the camera to be shot for the book can accurately shoot the book, and shooting of the book can be accurately performed, including but not limited to shooting angles within a preset range, shooting distances within a preset range, etc., it should be noted that, in this embodiment, for fast and clear shooting, the preset shooting camera may be a high-definition shooting camera, or a slow-motion shooting camera (if there is a slow-motion camera, the number of frames is large, the definition is guaranteed), particularly, the shooting camera can be a high-definition slow-motion shooting camera, for accurate shooting, the camera with the high-definition slow-motion video shooting function is arranged on an intelligent device, the shooting position is fixed, and the intelligent device can be a mobile phone or an intelligent robot.
When a shooting instruction is detected, a preset high-definition slow-motion shooting camera is started, page turning shooting is carried out on books at a preset shooting position, and a target shooting video is obtained.
When a shooting instruction is detected, a preset shooting camera is started, page turning shooting is carried out on books at a preset shooting position, and a target shooting video is obtained in the following mode:
the first method is as follows: when a shooting instruction is detected, a preset shooting camera is started, manual page turning shooting is performed on a book at a preset shooting position, and a target shooting video is obtained, that is, in the embodiment, the book is manually page turned.
The second method comprises the following steps: when a shooting instruction is detected, a preset shooting camera is started, automatic page turning shooting is performed on a book at a preset shooting position, and a target shooting video is obtained.
It should be noted that, in this embodiment, when a shooting instruction is detected, the preset shooting camera is started, and a page-turning shooting is performed on the book at the preset shooting position, so that a video of the target shooting is obtained instead of a page of image.
Step S20, removing the non-qualified images in the target shooting video to obtain reserved images;
in this embodiment, the non-qualified images in the target shooting video are automatically cleared to obtain the retained images, wherein the non-qualified images include images with a definition smaller than a first preset definition value, with repeated page numbers between the images or with shooting angles not within a first preset shooting angle range, and in addition, the non-qualified images also include images with damaged pages.
In this embodiment, to clear the non-qualified image in the target captured video and obtain the reserved image after obtaining the target captured video, a program segment needs to be set in a built-in processor in advance, where the program segment represents processing logic after obtaining the target captured video, and the processing logic is configured to trigger the processor to respond to a processing event of the target captured video when detecting the target captured video, so as to clear the non-qualified image in the target captured video after obtaining the target captured video.
In this embodiment, the manner of obtaining the retained image at least includes:
the first method is as follows:
wherein the target captured video includes a plurality of, the retained images including a first retained image;
the step of removing the non-qualified image in the target shooting video to obtain a reserved image comprises the following steps:
step S21, combining a plurality of target shooting videos to obtain a first composite video;
in this embodiment, the target captured video includes a plurality of pages, that is, when pages of the paper book are turned from top to bottom quickly, a part of the pages may not be turned, and therefore, an image of the part of the pages is not included in the target captured video. Therefore, the paper book can be rapidly turned for a plurality of times, and the target shooting video can be shot for a plurality of times. It should be noted that, in this embodiment, in order to capture videos of multiple targets, shooting may also be performed at one time based on multiple preset capture cameras, that is, in this embodiment, multiple cameras are set on the smart device, and capture videos of multiple targets at one time.
In this embodiment, a plurality of target captured videos, that is, composite videos, are first combined and then image recognition is performed.
The video principle is that a picture is formed by continuously shooting one frame by one frame, video merging is to splice the frames of each video and merge a plurality of target shooting videos to obtain a first composite video, and the number of the target shooting videos can be 2 to 3 in order to avoid resource consumption.
It should be noted that, in this embodiment, the target captured videos are merged sequentially according to time.
Step S22, based on the preset image recognition technology, recognizing the page content of each image in the first composite video to eliminate the non-qualified images in the composite video and obtain a first retained image;
the non-qualified images comprise images with definition smaller than a first preset definition value, repeated page numbers between the images or shooting angles not within a first preset shooting angle range.
In this embodiment, videos are synthesized first, then image recognition is performed, before image recognition, based on a preset image recognition technology, page content of each image in the first synthesized video is recognized to remove non-qualified images in the synthesized video, so as to obtain a first retained image, that is, to improve generation efficiency of an electronic book, page content of each image in the first synthesized video is recognized instead of all image content, so as to remove non-qualified images in the synthesized video, so as to obtain a first retained image, specifically, by using a preset OCR recognition technology, a page area is first located (position determination, a middle position at the bottommost of a page is a page area), then based on the page area, an effective image of the page area is obtained, and further, a page content is obtained, where the page content refers to a 20 th page, a 50 th page, or the like, and if the page content is unclear, or the shooting angle of the page content is not within a first preset angle range, or the page number is repeated, carrying out image clearing (or deleting) processing on the corresponding image to obtain a first retained image consisting of qualified images. It should be noted that the first preset angle range may be an angle of 60 to 120 degrees.
It should be noted that, as long as the retained image is determined, the capture angle of the retained image may be determined, and as long as the retained image is determined, the capture pixel of the retained image may be obtained, and the sharpness of the retained image may be obtained.
In this embodiment, the manner of obtaining the retained image at least includes:
the second method comprises the following steps:
wherein the target captured video includes a plurality of images, and the retained image includes a second retained image;
the step of removing the non-qualified image in the target shooting video to obtain a reserved image comprises the following steps:
step S23, respectively identifying the page content of each image in each target shooting video based on a preset image identification technology so as to eliminate non-qualified images in each target shooting video and obtain a plurality of processed images;
the non-qualified images comprise images with the definition smaller than a second preset definition value or the shooting angle not within a second preset shooting angle range;
in this embodiment, image recognition is performed first to remove frames with an unclear angle difference (which does not satisfy a preset angle condition), and then videos are merged, and then repeated page frames are removed.
Specifically, based on a preset image recognition technology, page content of each image in each target shooting video is respectively recognized, so that non-qualified images in each target shooting video are eliminated, and a plurality of processed images are obtained; the method comprises the steps of firstly positioning a page area of each frame of image in each target shooting video through a preset OCR recognition technology, then acquiring an effective image of the page area based on the page area, and further acquiring page content, and if an image with the page content definition smaller than a second preset definition value or the shooting angle not within a second preset shooting angle range exists, carrying out corresponding image clearing processing to obtain a second reserved image formed by qualified images.
It should be noted that, as long as the retained image is determined, the capture angle of the retained image may be determined, and as long as the retained image is determined, the capture pixel of the retained image may be obtained, and the sharpness of the retained image may be obtained.
In this embodiment, the image is erased by performing an erase process on the image. Specifically, the page number of the image to be cleared is acquired first, and after the page number is acquired, the image deletion process is performed once, or the image may be deleted plural times.
A step S24 of generating a corresponding second composite video based on the plurality of processed images;
and after the processed image in each target shooting video is obtained, merging the videos to obtain a second composite video.
And step S25, removing the images with repeated page numbers in the second composite video to obtain a second reserved image.
And after the second composite video is obtained, removing the images with repeated page numbers in the second composite video to obtain a second reserved image. For example, if there are 10 th page numbers in each target captured video, if there are 3 10 th page numbers, only one page number is reserved.
It should be noted that, in this embodiment, the second preset definition value may be the same as the first preset definition value, and the second preset shooting angle range may be the same as the first preset shooting angle range.
And step S30, making the reserved image into an electronic book with a preset format.
After obtaining the reserved image, making the reserved image into an electronic book with a preset format, where the preset format may be a PDF format or a text format, and specifically, firstly, through a preset image recognition technology, recognizing text contents in the reserved image by an image, and matting the text contents to make the electronic book with a PDF format. In addition, in this embodiment, the preset format may be manually set to enhance user experience, and format conversion may be performed between the electronic books with different preset formats, for example, if the default preset format is pdf format, if it is detected that the preset format is changed to text format by the user, the electronic book with text format may be obtained.
It should be noted that, in the present embodiment, the preset image recognition technology may be an OCR recognition technology.
Overall, in this embodiment, the overall process of obtaining the electronic book may be: combining the shot target shot videos for a plurality of times to obtain a first composite video, recognizing the page number of each page in the first composite video by using an image recognition technology, removing the image with repeated page numbers, unclear/shooting angle difference (not in a first preset shooting angle range), and only reserving the image with the clearest/shooting angle which accords with the first preset angle range for reservation. And obtaining the reserved image, identifying the text content in the reserved image by the image, and matting the text content to manufacture the electronic book in the PDF format.
In addition, overall, in this embodiment, the overall process of obtaining the electronic book may further be: and respectively carrying out image recognition processing on the shot target video images for a plurality of times, recognizing the page number of each page in each video, removing the images with repeated page numbers, unclear shooting angle differences (not in a second preset shooting angle range), and reserving only the image with the clearest shooting angle or the shooting angle in the second preset shooting angle range. And obtaining the reserved image, identifying the text content in the reserved image by the image, and matting the text content to manufacture the electronic book in the PDF format. Specifically, a plurality of corresponding electronic books in PDF format are produced. Combining a plurality of PDF electronic books, removing the pages with repeated page numbers, and only reserving one PDF page for one page. And if the page number of the synthesized PDF electronic book is found to be discontinuous or repeated, carrying out error prompt.
According to the method, when a shooting instruction is detected, a preset shooting camera is started, page turning shooting is carried out on books at a preset shooting position, and a target shooting video is obtained; removing the non-qualified images in the target shooting video to obtain reserved images; and making the reserved image into an electronic book with a preset format. In the method, when a shooting instruction is detected, a preset shooting camera is automatically started, page turning shooting is carried out on a book at a preset shooting position, a target shooting video is obtained instead of a page image, non-qualified images in the target shooting video are automatically cleared, and a reserved image is obtained; and the reserved image is made into the electronic book with the preset format, so that the manufacturing efficiency of the electronic book is improved, and the technical problem of low efficiency caused by manually shooting the book page by page and obtaining the electronic book is solved.
Further, referring to fig. 2, in another embodiment of the present application, based on the first embodiment of the present application, the step of making the reserved image into an electronic book with a preset format includes:
step S31, acquiring text content in the reserved image based on a preset Optical Character Recognition (OCR) technology;
in this embodiment, the preset image recognition technology is a preset optical character recognition OCR technology, that is, based on the preset optical character recognition OCR technology, the text content in the reserved image is obtained.
The step of obtaining the text content in the reserved image based on a preset OCR recognition technology comprises the following steps:
step S311, carrying out image preprocessing on the reserved image to obtain an effective image;
in this embodiment, in order to improve the production efficiency of the electronic book and reduce the useless information of the image, the reserved image is further subjected to image preprocessing to obtain an effective image. In this embodiment, the preprocessing may be division of a region, or reduction processing of a reserved image, or the like.
The step of performing image preprocessing on the reserved image to obtain an effective image comprises the following steps:
and A1, performing area division on the reserved image according to a preset demand type to obtain an effective image.
In this embodiment, when preprocessing the reserved image, the reserved image may be subjected to region division to divide an effective region of the reserved image, and an image of the effective region may be referred to as an effective image. After the effective image is obtained, the effective image of the part is subjected to targeted processing, so that the data calculation and processing amount is reduced, and the identification efficiency is improved. Of course, the image preprocessing may also be performed in other steps, such as image binarization, noise reduction, character segmentation, and the like. The binarization is to convert a reserved image into a binary image only containing two black and white colors, because the color image has huge information content, the calculated amount is increased when the color image is subjected to subsequent processing, and the consumed time is side length, so that the color image can be subjected to binarization processing firstly in order to improve the processing and identification efficiency; denoising is to solve the problem that the quality of an actual image is reduced due to noise interference through a filter obtaining other modes; character segmentation is to divide a series of characters into single words (or words and numbers) with definite meanings and then recognize the words.
Step S312, extracting character features of the effective image through a preset neural network recognition model, and acquiring corresponding text contents according to the character features;
the preset neural network recognition model is a data training set formed on the basis of a preset print pattern picture word stock, iterative training is carried out on a preset initial network model, and an obtained target model meeting preset conditions is obtained.
Specifically, a data training set needs to be established first; considering that the text information of books is printed, the text information is more standard than handwriting, and therefore a printed Chinese character picture word stock can be generated through Python. Then, an initial network model can be constructed, and in this embodiment, a Caffe framework can be used to construct the initial network model, where Caffe is an open source library mainstream in the deep learning field at present, and is implemented by using C + + and CUDA, supports MATLAB and Python interfaces, and is fast in speed, good in openness, and easy to modularize and expand; because lmdb or leveldb files are directly used in Caffe, before training, the picture files need to be converted into db files to be recognizable by Caffe (the conversion process can be directly realized by using the convert _ imageset.cpp tool files of Caffe). Considering that strokes and structures of Chinese characters are more complicated than those of other letters, the initial network model constructed can be a deep network model, such as a multilayer convolutional neural network. After the initial network model is constructed, the data training set can be input into the initial network model and subjected to iterative training, and when the training meets a preset condition (the number of iterations is measured, and other precision parameters can be used for representing the number of iterations), the preset neural network recognition model can be obtained. And after a preset neural network recognition model is obtained, extracting character features of the effective image through the preset neural network recognition model, and acquiring corresponding text contents according to the character features.
And step S32, making the text content into an electronic book with a preset format.
After the text content is obtained, the image document is converted into a text document, so that the electronic book can also be a text document for storage. That is, the preset format is a text format.
In the embodiment, text content in the reserved image is acquired by an OCR technology based on preset optical character recognition; and making the text content into an electronic book with a preset format. In the embodiment, the reserved image is accurately recognized through the preset optical character recognition OCR technology, so that the electronic book is accurately and quickly obtained.
Further, according to the first and second embodiments of the present application, in another embodiment of the present application, after the step of making the reserved image into an electronic book in a preset format, the method includes:
step B1, determining whether the page numbers of the electronic book with the preset format are continuous;
since the pages of the book are continuous, in order to avoid the loss of the content of the electronic book, in this embodiment, whether the pages of the electronic book in the preset format are continuous is also determined, and specifically, whether the pages of the electronic book in the preset format are continuous can be determined by comparing with the preset continuous pages.
And step B2, if the page number of the electronic book is not continuous, performing error prompt.
If the page number of the electronic book is not continuous, an error prompt is performed, specifically, an error prompt message may be sent, and in the prompt message, the missing page number of the client is prompted, so as to prompt the client to take a picture again.
In this embodiment, whether the page numbers of the e-book in the preset format are continuous is determined; and if the page number of the electronic book is not continuous, carrying out error prompt. In the present embodiment, generation of an electronic book with missing content is avoided.
Referring to fig. 3, fig. 3 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present application.
As shown in fig. 3, the electronic book generating apparatus may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used for realizing connection communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a memory device separate from the processor 1001 described above.
Optionally, the electronic book generating device may further include a rectangular user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like. The rectangular user interface may comprise a Display screen (Display), an input sub-module such as a Keyboard (Keyboard), and the optional rectangular user interface may also comprise a standard wired interface, a wireless interface. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface).
Those skilled in the art will appreciate that the electronic book generating device configuration shown in fig. 3 does not constitute a limitation of the electronic book generating device, and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.
As shown in fig. 3, a memory 1005, which is a kind of computer medium, may include therein an operating system, a network communication module, and an electronic book generating program. The operating system is a program that manages and controls hardware and software resources of the electronic book generating apparatus, and supports the operation of the electronic book generating program as well as other software and/or programs. The network communication module is used for communication among the components in the memory 1005 and with other hardware and software in the electronic book generation system.
In the electronic book generating apparatus shown in fig. 3, the processor 1001 is configured to execute an electronic book generating program stored in the memory 1005, and implement the steps of the electronic book generating method described in any one of the above.
The specific implementation manner of the electronic book generation device of the present application is substantially the same as that of the embodiments of the electronic book generation method, and is not described herein again.
The present application also provides an electronic book generating apparatus, including:
the shooting module is used for starting a preset shooting camera when a shooting instruction is detected, and performing page turning shooting on books at a preset shooting position to obtain a target shooting video;
the clearing module is used for clearing the non-qualified images in the target shooting video to obtain reserved images;
and the making module is used for making the reserved image into an electronic book with a preset format.
Optionally, the target captured video comprises a plurality of images, and the retained image comprises a first retained image;
the purge module includes:
the first merging unit is used for merging the target shooting videos to obtain a first composite video;
the first identification unit is used for identifying the page number content of each image in the first composite video based on a preset image identification technology so as to eliminate the non-qualified images in the composite video and obtain a first retained image;
the non-qualified images comprise images with definition smaller than a first preset definition value, repeated page numbers between the images or shooting angles not within a first preset shooting angle range.
Optionally, the target shooting video comprises a plurality of images, and the reserved image comprises a second reserved image;
the purge module includes:
the second identification unit is used for respectively identifying the page content of each image in each target shooting video based on a preset image identification technology so as to eliminate the non-qualified images in each target shooting video and obtain a plurality of processed images;
the non-qualified images comprise images with the definition smaller than a second preset definition value or the shooting angle not within a second preset shooting angle range;
a second merging unit configured to generate a corresponding second composite video based on the plurality of processed images;
and the removing unit is used for removing the image with repeated page numbers in the second composite video to obtain a second reserved image.
Optionally, the fabricating module includes:
the acquisition unit is used for acquiring text content in the reserved image based on a preset Optical Character Recognition (OCR) technology;
and the making unit is used for making the text content into an electronic book with a preset format.
Optionally, the obtaining unit includes:
the first acquisition subunit is used for carrying out image preprocessing on the reserved image to obtain an effective image;
the character feature extraction subunit is used for extracting character features of the effective image through a preset neural network recognition model and acquiring corresponding text contents according to the character features;
the preset neural network recognition model is a data training set formed on the basis of a preset print pattern picture word stock, iterative training is carried out on a preset initial network model, and an obtained target model meeting preset conditions is obtained.
Optionally, the first obtaining subunit is configured to implement:
and carrying out region division on the reserved image according to a preset demand type to obtain an effective image.
Optionally, the electronic book generating apparatus includes:
the determining module is used for determining whether the page numbers of the electronic book in the preset format are continuous or not;
and the error prompt module is used for carrying out error prompt if the page numbers of the electronic book are not continuous.
The specific implementation of the electronic book generating device of the present application is substantially the same as that of the above electronic book generating method, and is not described herein again.
The present application provides a medium, and the medium stores one or more programs, which are further executable by one or more processors for implementing the steps of the electronic book generation method described in any one of the above.
The specific implementation manner of the medium of the present application is substantially the same as that of each embodiment of the electronic book generation method, and is not described herein again.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (10)

1. An electronic book generation method, characterized in that the electronic book generation method comprises:
when a shooting instruction is detected, starting a preset shooting camera, and performing page turning shooting on books at a preset shooting position to obtain a target shooting video;
removing the non-qualified images in the target shooting video to obtain reserved images;
and making the reserved image into an electronic book with a preset format.
2. The electronic book generation method of claim 1, wherein the target captured video includes a plurality of, and the reserved image includes a first reserved image;
the step of removing the non-qualified image in the target shooting video to obtain a reserved image comprises the following steps:
combining a plurality of target shooting videos to obtain a first composite video;
based on a preset image identification technology, identifying page content of each image in the first composite video to eliminate non-qualified images in the composite video to obtain a first retained image;
the non-qualified images comprise images with definition smaller than a first preset definition value, repeated page numbers between the images or shooting angles not within a first preset shooting angle range.
3. The electronic book generation method of claim 1, wherein the target captured video includes a plurality, and the reserved image includes a second reserved image;
the step of removing the non-qualified image in the target shooting video to obtain a reserved image comprises the following steps:
respectively identifying the page content of each image in each target shooting video based on a preset image identification technology so as to eliminate non-qualified images in each target shooting video and obtain a plurality of processed images;
the non-qualified images comprise images with the definition smaller than a second preset definition value or the shooting angle not within a second preset shooting angle range;
generating a corresponding second composite video based on the plurality of processed images;
and removing the images with repeated page numbers in the second composite video to obtain a second reserved image.
4. The electronic book generation method of claim 1, wherein the step of making the reserved image into an electronic book of a preset format includes:
acquiring text content in the reserved image based on a preset Optical Character Recognition (OCR) technology;
and making the text content into an electronic book with a preset format.
5. The electronic book generation method of claim 4, wherein the step of obtaining the text content in the reserved image based on a preset OCR recognition technology comprises:
carrying out image preprocessing on the reserved image to obtain an effective image;
extracting character features of the effective image through a preset neural network recognition model, and acquiring corresponding text contents according to the character features;
the preset neural network recognition model is a data training set formed on the basis of a preset print pattern picture word stock, iterative training is carried out on a preset initial network model, and an obtained target model meeting preset conditions is obtained.
6. The method for generating an electronic book according to claim 5, wherein the step of performing image preprocessing on the reserved image to obtain an effective image comprises:
and carrying out region division on the reserved image according to a preset demand type to obtain an effective image.
7. The electronic book generation method of any one of claims 1 to 6, wherein after the step of producing the reserved image into an electronic book of a preset format, the method includes:
determining whether the page numbers of the electronic book with the preset format are continuous;
and if the page number of the electronic book is not continuous, carrying out error prompt.
8. An electronic book generating apparatus, characterized in that the electronic book generating apparatus comprises:
the shooting module is used for starting a preset shooting camera when a shooting instruction is detected, and performing page turning shooting on books at a preset shooting position to obtain a target shooting video;
the clearing module is used for clearing the non-qualified images in the target shooting video to obtain reserved images;
and the making module is used for making the reserved image into an electronic book with a preset format.
9. An electronic book generating device, characterized in that the electronic book generating device comprises: a memory, a processor, and a program stored on the memory for implementing the electronic book generation method,
the memory is used for storing a program for realizing the electronic book generating method;
the processor is configured to execute a program implementing the electronic book generation method to implement the steps of the electronic book generation method according to any one of claims 1 to 7.
10. A medium having stored thereon a program for implementing an electronic book generation method, the program being executed by a processor to implement the steps of the electronic book generation method according to any one of claims 1 to 7.
CN202010434015.4A 2020-05-20 2020-05-20 Electronic book generation method, device and medium Pending CN111556251A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010434015.4A CN111556251A (en) 2020-05-20 2020-05-20 Electronic book generation method, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010434015.4A CN111556251A (en) 2020-05-20 2020-05-20 Electronic book generation method, device and medium

Publications (1)

Publication Number Publication Date
CN111556251A true CN111556251A (en) 2020-08-18

Family

ID=72002981

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010434015.4A Pending CN111556251A (en) 2020-05-20 2020-05-20 Electronic book generation method, device and medium

Country Status (1)

Country Link
CN (1) CN111556251A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114140778A (en) * 2021-01-14 2022-03-04 北京灵伴即时智能科技有限公司 Page turning abnormality detection method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105787982A (en) * 2016-02-29 2016-07-20 腾讯科技(北京)有限公司 Method and device for manufacturing e-book
CN107145859A (en) * 2017-05-04 2017-09-08 北京小米移动软件有限公司 E-book conversion process method, device and computer-readable recording medium
CN110298349A (en) * 2019-06-15 2019-10-01 韶关市启之信息技术有限公司 A kind of is quickly the method and apparatus of digital content by paper book content transformation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105787982A (en) * 2016-02-29 2016-07-20 腾讯科技(北京)有限公司 Method and device for manufacturing e-book
CN107145859A (en) * 2017-05-04 2017-09-08 北京小米移动软件有限公司 E-book conversion process method, device and computer-readable recording medium
CN110298349A (en) * 2019-06-15 2019-10-01 韶关市启之信息技术有限公司 A kind of is quickly the method and apparatus of digital content by paper book content transformation

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114140778A (en) * 2021-01-14 2022-03-04 北京灵伴即时智能科技有限公司 Page turning abnormality detection method

Similar Documents

Publication Publication Date Title
US11620439B2 (en) Enhancing documents portrayed in digital images
CN111582085B (en) Document shooting image recognition method and device
RU2659745C1 (en) Reconstruction of the document from document image series
CN111291629A (en) Method and device for recognizing text in image, computer equipment and computer storage medium
CN108846385B (en) Image identification and correction method and device based on convolution-deconvolution neural network
US9082039B2 (en) Method and apparatus for recognizing a character based on a photographed image
CN114283156B (en) Method and device for removing document image color and handwriting
CN113781356A (en) Training method of image denoising model, image denoising method, device and equipment
CN114049499A (en) Target object detection method, apparatus and storage medium for continuous contour
CN113436222A (en) Image processing method, image processing apparatus, electronic device, and storage medium
JP2001266068A (en) Method and device for recognizing table, character- recognizing device, and storage medium for recording table recognizing program
CN111881904A (en) Blackboard writing recording method and system
CN114511041A (en) Model training method, image processing method, device, equipment and storage medium
US20230005108A1 (en) Method and system for replacing scene text in a video sequence
CN111556251A (en) Electronic book generation method, device and medium
CN111767924B (en) Image processing method, image processing apparatus, electronic device, and storage medium
CN110516202B (en) Document generator acquisition method, document generation device and electronic equipment
CN112686247A (en) Identification card number detection method and device, readable storage medium and terminal
CN111160265B (en) File conversion method and device, storage medium and electronic equipment
CN113835590A (en) Display method, information sending method and electronic equipment
CN113628113A (en) Image splicing method and related equipment thereof
CN112839167A (en) Image processing method, image processing device, electronic equipment and computer readable medium
US11037015B2 (en) Identification of key points in multimedia data elements
Singh et al. StreetOCRCorrect: An interactive framework for OCR corrections in chaotic Indian street videos
CN112101386B (en) Text detection method, device, computer equipment and storage medium

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