WO2022222047A1 - 文档扫描方法及装置、存储介质及电子设备 - Google Patents

文档扫描方法及装置、存储介质及电子设备 Download PDF

Info

Publication number
WO2022222047A1
WO2022222047A1 PCT/CN2021/088525 CN2021088525W WO2022222047A1 WO 2022222047 A1 WO2022222047 A1 WO 2022222047A1 CN 2021088525 W CN2021088525 W CN 2021088525W WO 2022222047 A1 WO2022222047 A1 WO 2022222047A1
Authority
WO
WIPO (PCT)
Prior art keywords
line segment
target
image
graphic
auxiliary
Prior art date
Application number
PCT/CN2021/088525
Other languages
English (en)
French (fr)
Inventor
顾磊
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2021/088525 priority Critical patent/WO2022222047A1/zh
Publication of WO2022222047A1 publication Critical patent/WO2022222047A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • 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

Definitions

  • the present disclosure relates to the technical field of document scanning, and in particular, to a document scanning method and apparatus, a computer-readable storage medium, and an electronic device.
  • the photo-based document image scanning technology can be integrated into mobile terminals such as mobile phones, and is convenient to carry and use. When the sides of the target quadrilateral cannot be completely scanned due to occlusion or other reasons, the quadrilateral can be completed.
  • the purpose of the present disclosure is to provide a document scanning method, a document scanning device, a computer-readable medium and an electronic device, so as to improve the accuracy of document scanning at least to a certain extent.
  • a document scanning method comprising:
  • a document scanning device comprising:
  • a line segment detection module configured to acquire an initial image collected by the first camera, and perform line segment detection on the initial image to obtain a first valid line segment of the initial image
  • a graphic detection module configured to determine the number of the first valid line segments when the target graphic cannot be obtained according to the first valid line segments
  • an image acquisition module configured to acquire an auxiliary image collected by the second camera when the number of the first effective line segments satisfies the first preset condition
  • a graphic determination module for determining a target graphic according to the auxiliary image and the initial image
  • a document scanning module configured to scan the document according to the target graphic.
  • a computer-readable medium on which a computer program is stored, and when the computer program is executed by a processor, implements the above-mentioned method.
  • an electronic device characterized by comprising:
  • a memory for storing one or more programs, which, when executed by one or more processors, enables the one or more processors to implement the above-mentioned method.
  • an initial image captured by a first camera is acquired, and a first valid line segment of the initial image is obtained by performing line segment detection on the initial image; when the target graphic cannot be obtained according to the first valid line segment , determine the number of the first effective line segments; when the number of the first effective line segments satisfies the first preset condition, obtain the auxiliary image collected by the second camera; determine the target graphic according to the auxiliary image and the initial image; complete the document based on the target graphic scanning.
  • the auxiliary image collected by the second camera is used for assistance to obtain the corresponding target image to complete the scanning of the document, and the auxiliary image is used to enhance the scanning of the document. improve the accuracy of document scanning.
  • FIG. 1 shows a schematic diagram of an exemplary system architecture to which embodiments of the present disclosure may be applied;
  • FIG. 2 shows a schematic diagram of an electronic device to which an embodiment of the present disclosure can be applied
  • FIG. 3 schematically shows a flowchart of a document scanning method in an exemplary embodiment of the present disclosure
  • FIG. 4 schematically shows a flowchart of a quadrilateral detection in an exemplary embodiment of the present disclosure
  • FIG. 5 schematically shows a schematic diagram of a graphic editing interface corresponding to an initial image in an exemplary embodiment of the present disclosure
  • FIG. 6 schematically shows a schematic diagram of an interface display when scanning cannot be completed in an exemplary embodiment of the present disclosure
  • FIG. 7 schematically shows a schematic diagram of an auxiliary image in an exemplary embodiment of the present disclosure
  • FIG. 8 schematically shows a flow chart of acquiring the second effective line segment in an exemplary embodiment of the present disclosure
  • FIG. 9 schematically shows a schematic diagram of an initial image when the first valid line segment cannot form a target graphic in an exemplary embodiment of the present disclosure
  • FIG. 10 schematically shows a schematic diagram after the auxiliary image is aligned with the initial graphic in an exemplary embodiment of the present disclosure
  • FIG. 11 schematically shows a schematic diagram of an initial line segment in an exemplary embodiment of the present disclosure
  • FIG. 12 schematically shows a schematic diagram of removing part of line segments overlapping with the initial graphic in the auxiliary image in an exemplary embodiment of the present disclosure
  • FIG. 13 schematically shows a schematic diagram of a first effective line segment when the first effective line segment constitutes a target graphic in an exemplary embodiment of the present disclosure
  • FIG. 14 schematically shows a schematic diagram of the second effective line segment when the second effective line segment can constitute a target graphic in an exemplary embodiment of the present disclosure
  • FIG. 15 schematically shows a schematic diagram of a graphic editing interface corresponding to an auxiliary image in an exemplary embodiment of the present disclosure
  • FIG. 16 schematically shows a schematic diagram of the second effective line segment when the second effective line segment cannot constitute the target graphic in an exemplary embodiment of the present disclosure
  • FIG. 17 schematically shows a schematic diagram of an auxiliary line segment in an exemplary embodiment of the present disclosure
  • FIG. 18 schematically shows a schematic diagram of an auxiliary line segment and a second effective line segment forming a target graph in an exemplary embodiment of the present disclosure
  • FIG. 19 schematically shows a schematic diagram of a graphic editing interface after setting a background image outside the auxiliary image in an exemplary embodiment of the present disclosure
  • FIG. 20 schematically shows an overall flow chart of a document scanning method in an exemplary embodiment of the present disclosure
  • FIG. 21 schematically shows a composition diagram of a document scanning apparatus in an exemplary embodiment of the present disclosure.
  • Example embodiments will now be described more fully with reference to the accompanying drawings.
  • Example embodiments can be embodied in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
  • the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
  • FIG. 1 shows a schematic diagram of a system architecture of an exemplary application environment to which a document scanning method and apparatus according to embodiments of the present disclosure can be applied.
  • the system architecture 100 may include one or more of terminal devices 101 , 102 , 103 , a network 104 and a server 105 .
  • the network 104 is a medium used to provide a communication link between the terminal devices 101 , 102 , 103 and the server 105 .
  • the network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
  • the terminal devices 101, 102, and 103 may be various electronic devices with image acquisition and image processing functions, including but not limited to desktop computers, portable computers, smart phones, and tablet computers. It should be understood that the numbers of terminal devices, networks and servers in FIG. 1 are merely illustrative. There can be any number of terminal devices, networks and servers according to implementation needs.
  • the server 105 may be a server cluster composed of multiple servers, or the like.
  • the document scanning method provided by the embodiments of the present disclosure is generally performed by the terminal devices 101 , 102 , and 103 , and correspondingly, the document scanning apparatus is generally set in the terminal devices 101 , 102 , and 103 .
  • the document scanning method provided by the embodiment of the present disclosure can also be executed by the server 105, and correspondingly, the document scanning device can also be set in the server 105, which is not the case in this exemplary embodiment. Make special restrictions.
  • the user can use the terminal devices 101, 102, 103 to collect the initial image and auxiliary image, and then upload the initial image and auxiliary image to the server 105, and the server can use this
  • the document scanning method provided by the disclosed embodiment completes the scanning of the document, and sends the scanning result to the terminal devices 101 , 102 , 103 and the like.
  • An exemplary embodiment of the present disclosure provides an electronic device for implementing a document scanning method, which may be the terminal devices 101 , 102 , 103 or the server 105 in FIG. 1 .
  • the electronic device includes at least a processor and a memory for storing executable instructions of the processor, the processor being configured to perform the document scanning method via executing the executable instructions.
  • the mobile terminal 200 in FIG. 2 takes the mobile terminal 200 in FIG. 2 as an example to illustrate the structure of the electronic device. It will be understood by those skilled in the art that the configuration in Figure 2 can also be applied to stationary type devices, in addition to components specifically for mobile purposes.
  • the mobile terminal 200 may include more or fewer components than shown, or combine some components, or separate some components, or different component arrangements.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the interface connection relationship between the components is only schematically shown, and does not constitute a structural limitation of the mobile terminal 200 .
  • the mobile terminal 200 may also adopt an interface connection manner different from that in FIG. 2 , or a combination of multiple interface connection manners.
  • the mobile terminal 200 may specifically include: a processor 210, an internal memory 221, an external memory interface 222, a Universal Serial Bus (USB) interface 230, a charging management module 240, a power management module 241, Battery 242, Antenna 1, Antenna 2, Mobile Communication Module 250, Wireless Communication Module 260, Audio Module 270, Speaker 271, Receiver 272, Microphone 273, Headphone Interface 274, Sensor Module 280, Display Screen 290, Camera Module 291, Indication 292, a motor 293, a key 294, a subscriber identification module (SIM) card interface 295, and the like.
  • the sensor module 280 may include a depth sensor 2801, a pressure sensor 2802, a gyroscope sensor 2803, and the like.
  • the processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (Application Processor, AP), a modem processor, a graphics processor (Graphics Processing Unit, GPU), an image signal processor (Image Signal Processor, ISP), controller, video codec, digital signal processor (Digital Signal Processor, DSP), baseband processor and/or Neural-Network Processing Unit (NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • an application processor Application Processor, AP
  • modem processor e.g., GPU
  • ISP image signal processor
  • ISP image Signal Processor
  • controller e.g., video codec
  • DSP Digital Signal Processor
  • NPU Neural-Network Processing Unit
  • NPU is a neural network (Neural-Network, NN) computing processor.
  • NN neural network
  • Applications such as intelligent cognition of the mobile terminal 200 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • a memory is provided in the processor 210 .
  • the memory can store instructions for implementing six modular functions: detection instructions, connection instructions, information management instructions, analysis instructions, data transmission instructions, and notification instructions, and the execution is controlled by the processor 210 .
  • the charging management module 240 is used to receive charging input from the charger.
  • the power management module 241 is used for connecting the battery 242 , the charging management module 240 and the processor 210 .
  • the power management module 241 receives input from the battery 242 and/or the charging management module 240, and supplies power to the processor 210, the internal memory 221, the display screen 290, the camera module 291, the wireless communication module 260, and the like.
  • the wireless communication function of the mobile terminal 200 may be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modulation and demodulation processor, the baseband processor, and the like.
  • the antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals;
  • the mobile communication module 250 can provide a wireless communication solution including 2G/3G/4G/5G applied on the mobile terminal 200;
  • the modulation and demodulation processor can include Modulator and demodulator;
  • the wireless communication module 260 can provide applications on the mobile terminal 200 including wireless local area networks (Wireless Local Area Networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), Bluetooth (Bluetooth (Bluetooth) , BT) and other wireless communication solutions.
  • the antenna 1 of the mobile terminal 200 is coupled with the mobile communication module 250, and the antenna 2 is coupled with the wireless communication module 260, so that the mobile terminal 200 can communicate with the network and other devices through wireless communication technology.
  • the mobile terminal 200 implements a display function through a GPU, a display screen 290, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 290 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 210 may include one or more GPUs that execute program instructions to generate or alter display information.
  • the mobile terminal 200 may implement a shooting function through an ISP, a camera module 291, a video codec, a GPU, a display screen 290, an application processor, and the like.
  • the ISP is used to process the data fed back by the camera module 291; the camera module 291 is used to capture still images or videos; the digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals; video
  • the codec is used to compress or decompress the digital video, and the mobile terminal 200 may also support one or more video codecs.
  • the external memory interface 222 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile terminal 200.
  • the external memory card communicates with the processor 210 through the external memory interface 222 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 221 may be used to store computer executable program code, which includes instructions.
  • the internal memory 221 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the mobile terminal 200 and the like.
  • the internal memory 221 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, Universal Flash Storage (Universal Flash Storage, UFS), and the like.
  • the processor 210 executes various functional applications and data processing of the mobile terminal 200 by executing instructions stored in the internal memory 221 and/or instructions stored in a memory provided in the processor.
  • the mobile terminal 200 may implement audio functions through an audio module 270, a speaker 271, a receiver 272, a microphone 273, an earphone interface 274, an application processor, and the like. Such as music playback, recording, etc.
  • the depth sensor 2801 is used to acquire depth information of the scene.
  • the depth sensor may be disposed in the camera module 291 .
  • the pressure sensor 2802 is used to sense pressure signals, and can convert the pressure signals into electrical signals.
  • the pressure sensor 2802 may be provided on the display screen 290 .
  • the gyro sensor 2803 may be used to determine the motion attitude of the mobile terminal 200 .
  • the angular velocity of the mobile terminal 200 about three axes ie, x, y and z axes
  • the gyro sensor 2803 can be used for image stabilization, navigation, and somatosensory game scenes.
  • sensors with other functions can also be set in the sensor module 280 according to actual needs, such as an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, and a bone conduction sensor. sensors, etc.
  • the mobile terminal 200 may further include other devices providing auxiliary functions.
  • the keys 294 include a power-on key, a volume key, etc., and the user can input key signals related to user settings and function control of the mobile terminal 200 through key input.
  • Another example is the indicator 292, the motor 293, the SIM card interface 295, and the like.
  • the main camera angle of view is more convenient and natural. Compared with the main camera, more image details will be lost, especially for document scanning, which affects the final scanning effect, which may cause blurred text or unclear images. It is likely that a lot of irrelevant information will be brought into the field of view, thus causing some interference to the detection of the target quadrilateral.
  • the present disclosure first provides a document scanning method, which may include the following steps:
  • Step S310 acquiring an initial image collected by the first camera, and performing line segment detection on the initial image to obtain a first valid line segment of the initial image;
  • Step S320 when the target graphic cannot be obtained according to the first valid line segment, determine the number of the first valid line segment
  • Step S330 when the number of the first valid line segments satisfies the first preset condition, acquire an auxiliary image collected by the second camera;
  • Step S340 determining a target graphic according to the auxiliary image and the initial image
  • Step S350 completing the scanning of the document according to the target graphic.
  • the auxiliary image collected by the second camera is used for assistance to obtain the corresponding target image to complete the scanning of the document, and the auxiliary image is used to enhance the scanning of the document. improve the accuracy of document scanning.
  • step S310 an initial image captured by a first camera is acquired, and a first effective line segment of the initial image is obtained by performing line segment detection on the initial image.
  • the server may acquire an initial image captured by a first camera, and the first camera may be a main camera provided on the mobile terminal. After the initial image is collected, the initial image may be Perform line segment detection to obtain the first valid line segment of the initial image.
  • LSD Line Segment Detector
  • pre-calculation detection algorithms can also be used to perform line segment detection on the above initial image.
  • a reference line segment when performing line segment detection on the above-mentioned initial image, may be obtained by first detecting the above-mentioned initial image and the Xining line segment, and then the reference line segment is obtained by removing noise line segments, merging overlapping line segments, etc.
  • the above-mentioned first valid line segment, wherein the noise line segment may be a line segment whose ratio of the total length of the line segment to the longest side of the initial image is less than or equal to a preset ratio, wherein the preset ratio may be 0.2, or 0.1, 0.3, etc., and can also be based on User requirements are customized, which is not specifically limited in this example implementation.
  • step S320 when the target graphic cannot be obtained according to the first valid line segment, the number of the first valid line segment is determined.
  • the server may first determine whether the first valid line segment can form a target graph, the target graph may be a target quadrilateral, and when the first valid line segment cannot form the target graph, determine whether the target graph can be formed by the first valid line segment.
  • the number of first valid line segments is that the target figure can be long after the extension line of the first effective line segment is connected.
  • step S410 can be executed to determine whether the above-mentioned first valid line segments can be A quadrilateral is formed. If a quadrilateral cannot be formed, step S430 is executed to determine that the first valid line segment cannot form the target quadrilateral. If a quadrilateral can be formed, step S420 is executed to determine whether the obtained quadrilateral satisfies the preset rules. If the above-mentioned quadrilateral satisfies the above-mentioned A preset rule is used to determine that the first valid line segment can form a target quadrilateral. If the above-mentioned quadrilateral cannot satisfy the preset rule, it is determined that the above-mentioned first valid line segment cannot form the target quadrilateral, that is, the target figure cannot be formed.
  • the above preset rules may include that the angle of the opposite side is less than 30 degrees, the angle of the adjacent side is greater than 60 degrees, and the area of the quadrilateral is greater than one-sixth of the image size; it can also be adapted according to the difference of the scanned document and modified. Customized according to user requirements, which is not specifically limited in this example implementation.
  • step S440 and step S450 may be executed to calculate the reliability of the multiple target quadrilaterals respectively, and determine the reliability of the multiple target quadrilaterals according to the reliability. Sorting, if only one target quadrilateral needs to be output, the target quadrilateral with the highest reliability will be output. If multiple target quadrilaterals need to be output, step S460 will be executed, and the required quantity will be output according to the order of reliability from large to small. the target quadrilateral.
  • the document when it is determined that the above-mentioned first valid line segment can constitute the target graphic 510 , the document can be scanned directly according to the obtained target graphic 510 , and a corresponding image corresponding to the initial image can also be generated.
  • a graphic editing interface so that the user can adjust the target graphic on the graphic editing interface.
  • step S330 may be executed.
  • step S330 when the number of the first valid line segments satisfies the first preset condition, an auxiliary image captured by the second camera is acquired.
  • the first preset condition may be that the number of first valid line segments is greater than or equal to 2
  • the first predetermined condition may be the number of first valid line segments Greater than or equal to 3; the first preset condition may also be customized according to user requirements, which is not specifically limited in this exemplary implementation.
  • a scan failure signal is generated and displayed.
  • an auxiliary image collected by a second camera is acquired, where the second camera may have a larger shooting range than the first camera.
  • Ultra wide-angle lens for capturing secondary images containing the initial image.
  • step S340 a target graphic is determined according to the auxiliary image and the initial image.
  • the auxiliary image and the initial image may be firstly fused with line segment information to obtain a second effective line segment. If the target graphics cannot be obtained from the two effective line segments, the number of the second effective line segments is determined; when the number of the second effective line segments meets the first preset condition, auxiliary line segments are added; and the target graphics is determined according to the second effective line segments and the auxiliary line segments.
  • step S810 may be executed first, and the auxiliary image and the initial image After alignment, line segment detection is performed on the above auxiliary image.
  • step S820 may be performed to perform line segment detection on the above-mentioned auxiliary image to obtain an initial line segment
  • step S830 may be performed to delete the initial line segment of the overlapping portion of the auxiliary image and the initial image to obtain the auxiliary image.
  • Line segment detection result is executed to fuse the line segment detection result of the auxiliary image with the first effective line segment to obtain the second effective line segment.
  • the server may first determine whether the second valid line segment can form a target graph, the target graph may be a target quadrilateral, and when the second valid line segment cannot form the target graph, determine whether the target graph can be formed by the second valid line segment. The number of second valid line segments.
  • the second effective line segment can form the target figure. It is determined that the above-mentioned second valid line segment cannot form the above-mentioned target figure, and if it can form a quadrilateral, it is judged whether the obtained quadrilateral satisfies the preset rule; If the above-mentioned quadrilateral cannot satisfy the preset rule, it is determined that the above-mentioned second valid line segment cannot form the target quadrilateral, that is, the target figure cannot be formed.
  • the above preset rules may include that the angle of the opposite side is less than 30 degrees, the angle of the adjacent side is greater than 60 degrees, and the area of the quadrilateral is greater than one-sixth of the image size; it can also be adapted according to the difference of the scanned document and modified. Customized according to user requirements, which is not specifically limited in this example implementation.
  • the reliability of the multiple target graphics can be calculated respectively, and the multiple target graphics can be sorted according to the reliability. For one target graph, the target graph with the highest reliability will be output. If multiple target graphs need to be output, the required number of target graphs will be output in descending order of reliability.
  • the document when it is determined that the above-mentioned second valid line segment can constitute the target graphic, the document can be scanned directly according to the obtained target graphic, and the graphic editor corresponding to the auxiliary image can also be generated. interface, so that the user can adjust the target graphics in the graphics editing interface.
  • Differentiated display is performed on the part of the initial image in the above auxiliary image. For example, the above auxiliary image is displayed in dark, but the display brightness of the part of the initial image in the auxiliary image is high, which is not displayed in this exemplary embodiment.
  • the above differential display is specifically limited.
  • the target image of the selected size is obtained by cropping the image.
  • the image of the overlapping portion of the target graphic and the initial image is cropped and output as the scan result.
  • the cutting method is not specifically limited in this exemplary embodiment.
  • the second valid line segment when the second valid line segment cannot constitute the target graphic, it can be judged whether the number of the second valid line segment satisfies a first preset condition, wherein the first preset condition is related to the target graphic, for example, If the target graphic is a target quadrilateral, the first preset condition may be that the number of second valid line segments is greater than or equal to 2, and if the target graphic is a target pentagon, the first predetermined condition may be the number of second valid line segments Greater than or equal to 3; the first preset condition may also be customized according to user requirements, which is not specifically limited in this exemplary implementation.
  • a scan failure signal is generated and displayed.
  • the line segment 1701 may be the boundary of the above-mentioned auxiliary image, and may also be customized according to user requirements, which is not specifically limited in this exemplary implementation.
  • auxiliary line segment after the auxiliary line segment is made, it can be determined whether the auxiliary line segment and the second valid line segment can form the target image, and if the target image cannot be formed, a scan failure signal is generated and displayed.
  • a graphic editing interface corresponding to the auxiliary image is generated, wherein the auxiliary image includes the initial image 1901, and a background image 1902 is set outside the auxiliary image to It enables the user to adjust the target graphics in the graphics editing interface.
  • step S350 scanning of the document is completed according to the target graphic.
  • the coordinates of each vertex of the target graphic can be obtained first; the document picture is extracted according to the coordinates of each vertex; the document picture is scanned. Correct and output.
  • the above-described document scanning method is generally described with the above-described target image as a target quadrilateral.
  • step S2010 may be performed first to acquire an initial image, and then step S2020 may be performed to perform line segment detection on the initial image to obtain the first valid line segment, and step S2030 may be performed to determine whether the first valid line segment can obtain the target quadrilateral.
  • step S2091 If yes, go to step S2091 to output the target quadrilateral, if not, go to step S2040 to check whether the number of the first valid line segments is less than 2, if so, go to step S2092 to generate a scan failure signal and display it, if not, go to step S2050, Obtain the auxiliary image, and fuse the auxiliary image and the initial image with line segment information to obtain a second effective line segment; then execute step S2060 to determine whether the second effective line segment can obtain the target quadrilateral, if so, execute step S2091, output the target quadrilateral, if If no, go to step S2070 to determine whether the number of second valid line segments is less than 2, if so, go to step S2092 to generate a scan failure signal and display it, if not, go to step S2080 to add auxiliary line segments, then go to step S2090 to determine Whether the second valid line segment and the auxiliary line segment can obtain the target quadrilateral, if so, go to step S2091
  • the auxiliary image collected by the second camera is used for assistance to obtain the corresponding target Graphics are used to complete the scanning of documents, and auxiliary images are used to improve the accuracy of document scanning.
  • the embodiment of this example also provides a document scanning device 2100, including a line segment detection module 2110, a graphics detection module 2120, an image acquisition module 2130, a graphics determination module 2140, and a document scanning module 2150.
  • a document scanning device 2100 including a line segment detection module 2110, a graphics detection module 2120, an image acquisition module 2130, a graphics determination module 2140, and a document scanning module 2150.
  • the line segment detection module 2110 can be used to obtain the initial image captured by the first camera, and perform line segment detection on the initial image to obtain the first valid line segment of the initial image.
  • the above-mentioned line segment detection module 2110 can also be specifically configured to perform line segment detection on the initial image.
  • the reference line segment is obtained by detection; the noise line segment is removed from the reference line segment, and the overlapping line segment is fused to obtain the first effective line segment.
  • the graphic detection module 2120 can be used to determine the number of the first effective line segments when the target graphic cannot be obtained according to the first effective line segment; the graphic detection module 2120 can also be used to obtain the target graphic according to the first effective line segment.
  • the document scanning module 2150 enables the document scanning module 2150 to complete the scanning of the document according to the target graphics.
  • the document scanning device 2100 may further include an editing module, and the editing module may be configured to generate a graphic editing interface corresponding to the initial image when the target graphic can be obtained according to the first valid line segment, so that the user can The graphic editing interface adjusts the target graphic. Or when the target graphic can be obtained according to the second effective line segment, a graphic editing interface corresponding to the initial image is generated, and the part of the initial image in the auxiliary image is displayed in a differentiated manner, so that the user can edit the target graphic on the graphic editing interface. Adjustment.
  • a graphic editing interface corresponding to the auxiliary image is generated, and a background image is set outside the auxiliary image, so that the user can adjust the target graphic on the graphic editing interface.
  • the image acquisition module 2130 may be configured to acquire an auxiliary image captured by the second camera when the number of the first valid line segments satisfies the first preset condition.
  • the image acquisition module 2130 may also be configured to generate and display a scan failure signal when the number of the first valid line segments does not meet the first preset condition. Or when the number of the second valid line segments does not satisfy the first preset condition, a scan failure signal is generated and displayed.
  • the graphic determination module 2140 can be used to determine the target graphic according to the auxiliary image and the initial image, wherein the graphic determination module 2140 can be specifically configured to perform line segment information fusion between the auxiliary image and the initial image to obtain a second effective line segment; When the target graphic is obtained, the number of the second effective line segments is determined; when the number of the second effective line segments meets the first preset condition, auxiliary line segments are added; and the target graphic is determined according to the second effective line segments and the auxiliary line segments.
  • performing line segment information fusion on the auxiliary image and the initial image to obtain the second effective line segment may include: performing line segment detection on the auxiliary image to obtain the initial line segment; deleting the initial line segment in the overlapping portion of the auxiliary image and the initial image to obtain the line segment detection result of the auxiliary image; The line segment detection result of the auxiliary image is fused with the first valid line segment to obtain the second valid line segment.
  • the target graphic cannot be obtained according to the first valid line segment; if the second valid line segment cannot form a quadrilateral, or the formed quadrilateral does not meet the preset rules rule, it is determined that the target graphic cannot be obtained according to the second valid line segment.
  • determining the target graphic according to the auxiliary image and the initial image further includes: fusing the auxiliary image and the initial image with line segment information to obtain a second effective line segment; if the target graphic can be obtained according to the second effective line segment, then completing the scanning of the document according to the target graphic .
  • the above-mentioned graphic determination module 2140 can also be used to determine the reliability of each target graphic; sort the target graphics according to the reliability of each target graphic; complete the scanning of the document by using the target graphics with the reliability greater than the preset value.
  • the document scanning module 2150 can be used to scan the document according to the target pattern. Specifically, it can be configured to obtain the coordinates of each vertex of the target graphic; extract the document picture according to the coordinates of each vertex; correct and output the document picture.
  • aspects of the present disclosure may be embodied as a system, method or program product. Therefore, various aspects of the present disclosure can be embodied in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, which may be collectively referred to herein as implementations "circuit", “module” or "system”.
  • Exemplary embodiments of the present disclosure also provide a computer-readable storage medium on which a program product capable of implementing the above-described method of the present specification is stored.
  • various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code, when the program product runs on a terminal device, the program code is used to cause the terminal device to execute the above-mentioned procedures in this specification. Steps according to various exemplary embodiments of the present disclosure are described in the "Example Methods" section.
  • the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
  • program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., as well as conventional procedural Programming Language - such as the "C" language or similar programming language.
  • the program code may execute entirely on the user computing device, partly on the user device, as a stand-alone software package, partly on the user computing device and partly on a remote computing device, or entirely on the remote computing device or server execute on.
  • the remote computing device may be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (eg, using an Internet service provider business via an Internet connection).
  • LAN local area network
  • WAN wide area network

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

一种文档扫描方法及装置、计算机可读存储介质及电子设备,方法包括:获取第一摄像头采集的初始图像,并对所述初始图像进行线段检测得到所述初始图像的第一有效线段(S310);在根据所述第一有效线段无法得到目标图形时,确定所述第一有效线段的数量(S320);在所述第一有效线段的数量满足第一预设条件时,获取第二摄像头采集的辅助图像(S330);根据所述辅助图像和所述初始图像确定目标图形(S340);根据所述目标图形完成对所述文档的扫描(S350)。本技术方案提高文档扫描的精度。

Description

文档扫描方法及装置、存储介质及电子设备 技术领域
本公开涉及文档扫描技术领域,具体而言,涉及一种文档扫描方法及装置、计算机可读存储介质及电子设备。
背景技术
基于照片的文档图片扫描技术可以集成在手机等移动端,具有携带方便使用方便的特点。当因为遮挡等原因出现目标四边形的边无法完整扫描的情况时,可以对四边形进行补全。
相关技术中对四边形的补全方案对于拍摄不完整的情况无法进行较好的补全,导致扫描的文档不准确。
需要说明的是,在上述背景技术部分公开的信息仅用于加强对本公开的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。
发明内容
本公开的目的在于提供一种文档扫描方法、文档扫描装置、计算机可读介质和电子设备,进而至少在一定程度上提高文档扫描的精度。
根据本公开的第一方面,提供一种文档扫描方法,包括:
获取第一摄像头采集的初始图像,并对所述初始图像进行线段检测得到所述初始图像的第一有效线段;
在根据所述第一有效线段无法得到目标图形时,确定所述第一有效线段的数量;
在所述第一有效线段的数量满足第一预设条件时,获取第二摄像头采集的辅助图像;
根据所述辅助图像和所述初始图像确定目标图形;
根据所述目标图形完成对所述文档的扫描。
根据本公开的第二方面,提供一种文档扫描装置,包括:
线段检测模块,用于获取第一摄像头采集的初始图像,并对所述初始图像进行线段检测得到所述初始图像的第一有效线段;
图形检测模块,用于在根据所述第一有效线段无法得到目标图形时,确定所述第一有效线段的数量;
图像获取模块,用于在所述第一有效线段的数量满足第一预设条件时,获取第二摄像头采集的辅助图像;
图形确定模块,用于根据所述辅助图像和所述初始图像确定目标图形
文档扫描模块,用于根据所述目标图形完成对所述文档的扫描。
根据本公开的第三方面,提供一种计算机可读介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述的方法。
根据本公开的第四方面,提供一种电子设备,其特征在于,包括:
处理器;以及
存储器,用于存储一个或多个程序,当一个或多个程序被一个或多个处理器执行时,使得一个或多个处理器实现上述的方法。
本公开的一种实施例所提供的文档扫描方法,获取第一摄像头采集的初始图像,并对初始图像进行线段检测得到初始图像的第一有效线段;在根据第一有效线段无 法得到目标图形时,确定第一有效线段的数量;在第一有效线段的数量满足第一预设条件时,获取第二摄像头采集的辅助图像;根据辅助图像和初始图像确定目标图形;根据目标图形完成对文档的扫描。相较于现有技术,在检测到的第一有效线段不足以构成目标图形时,利用第二摄像头采集到的辅助图像进行辅助以获得对应的目标图形来完成对文档的扫描,利用辅助图像提升了对文档扫描的准确性。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。在附图中:
图1示出了可以应用本公开实施例的一种示例性系统架构的示意图;
图2示出了可以应用本公开实施例的一种电子设备的示意图;
图3示意性示出本公开示例性实施例中一种文档扫描方法的流程图;
图4示意性示出本公开示例性实施例中一种四边形检测的流程图;
图5示意性示出本公开示例性实施例中与初始图像所对应图形编辑界面的示意图;
图6示意性示出本公开示例性实施例中无法完成扫描时的界面展示示意图;
图7示意性示出本公开示例性实施例中辅助图像的示意图;
图8示意性示出本公开示例性实施例中获取第二有效线段的流程图;
图9示意性示出本公开示例性实施例中第一有效线段无法构成目标图形时初始图像的示意图;
图10示意性示出本公开示例性实施例中辅助图像与初始图形对齐后的示意图;
图11示意性示出本公开示例性实施例中初始线段的示意图;
图12示意性示出本公开示例性实施例中去除辅助图像中与初始图形重叠部分线段的示意图;
图13示意性示出本公开示例性实施例中第一有效线段构成目标图形时的第一有效线段的示意图;
图14示意性示出本公开示例性实施例中第二有效线段能够构成目标图形时第二有效线段的示意图;
图15示意性示出本公开示例性实施例中与辅助图像所对应图形编辑界面的示意图;
图16示意性示出本公开示例性实施例中第二有效线段不能够构成目标图形时第二有效线段的示意图;
图17示意性示出本公开示例性实施例中辅助线段的示意图;
图18示意性示出本公开示例性实施例中辅助线段和第二有效线段构成目标图形的示意图;
图19示意性示出本公开示例性实施例中在辅助图像外侧设置一背景图像后的图形编辑界面的示意图;
图20示意性示出本公开示例性实施例中文档扫描方法的整体流程图;
图21示意性示出本公开示例性实施例中文档扫描装置的组成示意图。
具体实施方式
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施方式中。
此外,附图仅为本公开的示意性图解,并非一定是按比例绘制。图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。附图中所示的一些方框图是功能实体,不一定必须与物理或逻辑上独立的实体相对应。可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。
图1示出了可以应用本公开实施例的一种文档扫描方法及装置的示例性应用环境的系统架构的示意图。
如图1所示,系统架构100可以包括终端设备101、102、103中的一个或多个,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。终端设备101、102、103可以是各种具有图像采集以及图像处理功能的电子设备,包括但不限于台式计算机、便携式计算机、智能手机和平板电脑等等。应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。比如服务器105可以是多个服务器组成的服务器集群等。
本公开实施例所提供的文档扫描方法一般由终端设备101、102、103中执行,相应地,文档扫描装置一般设置于终端设备101、102、103中。但本领域技术人员容易理解的是,本公开实施例所提供的文档扫描方法也可以由服务器105执行,相应的,文档扫描装置也可以设置于服务器105中,本示例性实施例中对此不做特殊限定。举例而言,在一种示例性实施例中,可以是用户通过终端设备101、102、103包括的用于采集初始图像和辅助图像,然后将初始图像和辅助图像上传至服务器105,服务器通过本公开实施例所提供的文档扫描方法完成对文档的扫描,将扫描结果给终端设备101、102、103等。
本公开的示例性实施方式提供一种用于实现文档扫描方法的电子设备,其可以是图1中的终端设备101、102、103或服务器105。该电子设备至少包括处理器和存储器,存储器用于存储处理器的可执行指令,处理器配置为经由执行可执行指令来执行文档扫描方法。
下面以图2中的移动终端200为例,对电子设备的构造进行示例性说明。本领域技术人员应当理解,除了特别用于移动目的的部件之外,图2中的构造也能够应用于固定类型的设备。在另一些实施方式中,移动终端200可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件、软件或软件和硬件的组合实现。各部件间的接口连接关系只是示意性示出,并不构成对移动终端200的结构限定。在另一些实施方式中,移动终端200也可以采用与图2不同的接口连接方式,或多种接口连接方式的组合。
如图2所示,移动终端200具体可以包括:处理器210、内部存储器221、外部存储器接口222、通用串行总线(Universal Serial Bus,USB)接口230、充电管理模块240、电源管理模块241、电池242、天线1、天线2、移动通信模块250、无线通信模块260、音频模块270、扬声器271、受话器272、麦克风273、耳机接口274、传感器模块280、显示屏290、摄像模组291、指示器292、马达293、按键294以及用户标识模块(subscriber identification module,SIM)卡接口295等。其中传感器模块 280可以包括深度传感器2801、压力传感器2802、陀螺仪传感器2803等。
处理器210可以包括一个或多个处理单元,例如:处理器210可以包括应用处理器(Application Processor,AP)、调制解调处理器、图形处理器(Graphics Processing Unit,GPU)、图像信号处理器(Image Signal Processor,ISP)、控制器、视频编解码器、数字信号处理器(Digital Signal Processor,DSP)、基带处理器和/或神经网络处理器(Neural-Network Processing Unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
NPU为神经网络(Neural-Network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现移动终端200的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
处理器210中设置有存储器。存储器可以存储用于实现六个模块化功能的指令:检测指令、连接指令、信息管理指令、分析指令、数据传输指令和通知指令,并由处理器210来控制执行。
充电管理模块240用于从充电器接收充电输入。电源管理模块241用于连接电池242、充电管理模块240与处理器210。电源管理模块241接收电池242和/或充电管理模块240的输入,为处理器210、内部存储器221、显示屏290、摄像模组291和无线通信模块260等供电。
移动终端200的无线通信功能可以通过天线1、天线2、移动通信模块250、无线通信模块260、调制解调处理器以及基带处理器等实现。其中,天线1和天线2用于发射和接收电磁波信号;移动通信模块250可以提供应用在移动终端200上的包括2G/3G/4G/5G等无线通信的解决方案;调制解调处理器可以包括调制器和解调器;无线通信模块260可以提供应用在移动终端200上的包括无线局域网(Wireless Local Area Networks,WLAN)(如无线保真(Wireless Fidelity,Wi-Fi)网络)、蓝牙(Bluetooth,BT)等无线通信的解决方案。在一些实施例中,移动终端200的天线1和移动通信模块250耦合,天线2和无线通信模块260耦合,使得移动终端200可以通过无线通信技术与网络以及其他设备通信。
移动终端200通过GPU、显示屏290及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏290和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器210可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
移动终端200可以通过ISP、摄像模组291、视频编解码器、GPU、显示屏290及应用处理器等实现拍摄功能。其中,ISP用于处理摄像模组291反馈的数据;摄像模组291用于捕获静态图像或视频;数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号;视频编解码器用于对数字视频压缩或解压缩,移动终端200还可以支持一种或多种视频编解码器。
外部存储器接口222可以用于连接外部存储卡,例如Micro SD卡,实现扩展移动终端200的存储能力。外部存储卡通过外部存储器接口222与处理器210通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器221可以用于存储计算机可执行程序代码,可执行程序代码包括指令。内部存储器221可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储移动终端200使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器221可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(Universal Flash  Storage,UFS)等。处理器210通过运行存储在内部存储器221的指令和/或存储在设置于处理器中的存储器的指令,执行移动终端200的各种功能应用以及数据处理。
移动终端200可以通过音频模块270、扬声器271、受话器272、麦克风273、耳机接口274及应用处理器等实现音频功能。例如音乐播放、录音等。
深度传感器2801用于获取景物的深度信息。在一些实施例中,深度传感器可以设置于摄像模组291。
压力传感器2802用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器2802可以设置于显示屏290。压力传感器2802的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。
陀螺仪传感器2803可以用于确定移动终端200的运动姿态。在一些实施方式中,可以通过陀螺仪传感器2803确定移动终端200围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器2803可以用于拍摄防抖、导航、体感游戏场景等。
此外,还可以根据实际需要在传感器模块280中设置其他功能的传感器,例如气压传感器、磁传感器、加速度传感器、距离传感器、接近光传感器、指纹传感器、温度传感器、触摸传感器、环境光传感器、骨传导传感器等。
移动终端200中还可包括其它提供辅助功能的设备。例如,按键294包括开机键,音量键等,用户可以通过按键输入,产生与移动终端200的用户设置以及功能控制有关的键信号输入。再如,指示器292、马达293、SIM卡接口295等。
在相关技术中,当因为遮挡等原因出现目标四边形的边无法完整扫描的情况时,市面上的一些应用可以对四边形进行补全,然而该补全是基于图像的边框或者是四边形的三条边等信息,并非实际拍摄的图像。在拍摄完成后用户还可以进行四边形框的调整,然而调整时所参照的是原输入图像,对于拍摄不完整的情况无法进行较好的补全。现在已经有许多移动端在主摄以外集成了超广角镜头相机,可以通过该相机拓展增强了现有的摄像功能。若在对文档进行先扫描时直接采用超广角镜头超广角预览与用户常用的习惯不相符,对于大部分情况下,主摄视角的拍摄更为方便自然。相比主摄会丢失更多的图像细节,尤其对于文档扫描影响最终的扫描效果,可能造成文字模糊或图像不清晰。很可能会将许多无关的信息纳入视野范围,从而对目标四边形的检测造成一定的干扰。
下面对本公开示例性实施方式的文档扫描方法和文档扫描装置进行具体说明。
基于上述缺点,参照图3所示,本公开首先提供一种文档扫描方法,该方法可以包括以下步骤:
步骤S310,获取第一摄像头采集的初始图像,并对所述初始图像进行线段检测得到所述初始图像的第一有效线段;
步骤S320,在根据所述第一有效线段无法得到目标图形时,确定所述第一有效线段的数量;
步骤S330,在所述第一有效线段的数量满足第一预设条件时,获取第二摄像头采集的辅助图像;
步骤S340,根据所述辅助图像和所述初始图像确定目标图形;
步骤S350,根据所述目标图形完成对所述文档的扫描。
相较于现有技术,在检测到的第一有效线段不足以构成目标图形时,利用第二摄像头采集到的辅助图像进行辅助以获得对应的目标图形来完成对文档的扫描,利用辅助图像提升了对文档扫描的准确性。
下面对上述各步骤进行详细说明。
在步骤S310中,获取第一摄像头采集的初始图像,并对所述初始图像进行线段检测得到所述初始图像的第一有效线段。
在本公开的一种示例实施方式中,服务器可以获取由第一摄像头采集的初始图像,第一摄像头可以是设置在移动终端上的主摄像头,在采集到上述初始图像之后,可以对上述初始图像进行线段检测得到初始图像的第一有效线段。
具体而言,可以采用直线段检测算法(LSD,Line Segment Detector)来实现对上述初始图像进行线段检测,还可以采用其他先算检测算法来对上述初始图像进行线段检测,在本示例实施方式中不做具体限定。
在本公开的一种实施例中,在对上述初始图像进行线段检测时,可以首先对上述初始图像及西宁线段检测得到参考线段,然后,对参考线段进行噪声线段去除,重叠线段融合等操作得到上述第一有效线段,其中噪声线段可以是线段总长度与初始图像最长边的比值小于等于预设比值的线段,其中,预设比值可以0.2,,也可以是0.1、0.3等,还可以根据用户需求进行自定义,在本示例实施方式中不做具体限定。
在步骤S320中,在根据所述第一有效线段无法得到目标图形时,确定所述第一有效线段的数量。
在本公开的一种是示例实施方式中,服务器可以首先判断上述第一有效线段是否能够构成目标图形,上述目标图形可以是目标四边形,在上述第一有效线段无法构成上述目标图形时,确定上述第一有效线段的数量。其中,上述能够构成目标图形为上述第一有效线段的延长线连接后能够够长上述目标图形。
在本示例实施方式中,参照图4所示,以目标图形为目标四边形为例对第一有效线段是否能够构成目标图形进行说明,首先可以执行步骤S410,判断上述多个第一有效线段能否构成四边形,如无法构成四边形,则执行步骤S430,判定上述第一有效线段无法构成上述目标四边形,若能够构成四边形,则执行步骤S420,判断得到的四边形是否满足预设规则,若上述四边形满足上述预设规则,判定上述第一有效线段能够构成目标四边形。若上述四边形不能满足预设规则,则判定上述第一有效线段无法构成目标四边形,即无法构成目标图形。
其中,上述预设规则可以包括对立边的角度小于30,相邻边的角度大于60度、四边形面积大于图像尺寸的六分之一;也可以根据扫描文档的不同及进行适应性修改,好可以根据用户的需求进行自定义,在本示例实施方式中不做具体限定。
在本示例实施方式中,在上述第一有效线段能够构成多个目标四边形时,可以执行步骤S440和步骤S450,分别计算多个目标四边形的可信度,并根据可信度对多个目标四边形进行排序,若只需要输出一个目标四边形,则将可信度最大的目标四边形输出,若需要输出多个目标四边形,则执行步骤S460,将按照可信度从大到小的顺序进行输出需要数量的目标四边形。
在本示例实施方式中,参照图5所示,在判定上述第一有效线段能够构成目标图形510时,则可以直接根据得到的目标图形510完成对文档的扫描,还可以生成与初始图像所对应图形编辑界面,以使得用户能够在图形编辑界面对目标图形进行调整。
在判定上述第一有效线段无法构成目标图形时,可以确定上述第一有效线段的数量,可以执行步骤S330。
在步骤S330中,在所述第一有效线段的数量满足第一预设条件时,获取第二摄像头采集的辅助图像。
在本示例实施方式中,在上述第一有效线段无法构成目标图形时,可以判段上述第一有效线段的数量是否满足第一预设条件,其中第一预设条件与目标图形相关,例如,若上述目标图形为目标四边形,则第一预设条件可以为第一有效线段的数量大于等于2,若上述目标图形为目标五边形,则第一预设条件可以为第一有效线段 的数量大于等于3;第一预设条件还可以根据用户的需求进行自定义,在本示例实施方式中不做具体限定。
在本示例实施方式中,参照图6所示,若上述第一有效线段的数量不满足上述第一预设条件,则生成扫描失败信号并展示。
在本共公开的一种示例实施方式中,在上述第一有效线段的数量满足第一预设条件时,获取第二摄像头采集的辅助图像,其中第二摄像头可以是拍摄范围大于第一摄像头的超广角镜头,用于采集包含初始图像的辅助图像。
在步骤S340中,根据所述辅助图像和所述初始图像确定目标图形。
在本公开的一种示例实施方式中,参照图7所示,在根据辅助图像和初始图像确定目标图形时,可以首先将辅助图像与初始图像进行线段信息融合得到第二有效线段,若根据第二有效线段无法得到目标图形,则确定第二有效线段的数量;在第二有效线段的数量满足第一预设条件时,添加辅助线段;根据第二有效线段和辅助线段确定目标图形。
具体而言,参照图8所示,在将辅助图像与初始图像进行线段信息融合得到第二有效线段时,参照图9、图10所示,可以首先执行步骤S810,将辅助图像和初始图像进行对齐之后再对上述辅助图像进行线段检测。参照图11所示,可以执行步骤S820,对上述辅助图像进行线段检测,得到初始线段,然后可以参照图12所示,执行步骤S830,删除辅助图像与初始图像重叠部分的初始线段得到辅助图像的线段检测结果;参照图13和图14所示,执行步骤S840,将辅助图像的线段检测结果与第一有效线段进行融合得到第二有效线段。
在本公开的一种是示例实施方式中,服务器可以首先判断上述第二有效线段是否能够构成目标图形,上述目标图形可以是目标四边形,在上述第二有效线段无法构成上述目标图形时,确定上述第二有效线段的数量。
在本示例实施方式中,参照图4所示,以目标图形为目标四边形为例对第二有效线段是否能够构成目标图形进行说明,首先可以判断上述多个第一有效线段能否构成四边形,则判定上述第二有效线段无法构成上述目标图形,若能够构成四边形,则判断得到的四边形是否满足预设规则,若上述四边形满足上述预设规则,则判定上述第二有效线段能够构成目标四边形。若上述四边形不能满足预设规则,则判定上述第二有效线段无法构成目标四边形,即无法构成目标图形。
其中,上述预设规则可以包括对立边的角度小于30,相邻边的角度大于60度、四边形面积大于图像尺寸的六分之一;也可以根据扫描文档的不同及进行适应性修改,好可以根据用户的需求进行自定义,在本示例实施方式中不做具体限定。
在本示例实施方式中,在上述第二有效线段能够构成多个目标图形时,可以分别计算多个目标图形的可信度,并根据可信度对多个目标图形进行排序,若只需要输出一个目标图形,则将可信度最大的目标图形输出,若需要输出多个目标图形,则将按照可信度从大到小的顺序进行输出需要数量的目标图形。
在本示例实施方式中,参照图15所示,在判定上述第二有效线段能够构成目标图形时,则可以直接根据得到的目标图形完成对文档的扫描,还可以生成与辅助图像所对应图形编辑界面,以使得用户能够在图形编辑界面对目标图形进行调整。并对上述辅助图像中初始图像的部分进行差异化显示,举例而言,对上述辅助图像进行暗化显示,但辅助图像中的初始图像的部分的显示亮度较高,在本示例实施方式中不对上述差异化显示做具体限定。
在本示例实施方式中,参照在用户对上述目标图像调整完成后,对图像进行裁剪得到选定大小的目标图形。例如,将目标图形与初始图像重叠部分的图像进行裁剪并输出,作为扫描结果。在本示例实施方式中不对裁剪方式做具体限定。
在本示例实施方式中,在上述第二有效线段无法构成目标图形时,可以判段上述第二有效线段的数量是否满足第一预设条件,其中第一预设条件与目标图形相关,例如,若上述目标图形为目标四边形,则第一预设条件可以为第二有效线段的数量大于等于2,若上述目标图形为目标五边形,则第一预设条件可以为第二有效线段的数量大于等于3;第一预设条件还可以根据用户的需求进行自定义,在本示例实施方式中不做具体限定。在所述第二有效线段的数量不满足不第一预设条件时,生成扫描失败信号并展示。
在上述第二有效线段的数量满足第一预设条件时,参照图16、图17和图18所示,添加辅助线段,根据第二有效线段和上述辅助线段1701来确定目标图形,其中上述辅助线段1701可以是上述辅助图像的边界,也可以根据用户需求进行自定义,在本示例实施方式中不做具体限定。
在本示例实施方式中,在做出辅助线段之后,可以判断上述辅助线段和上述第二有效线段是否能够构成目标图形,若无法构成目标图像则生成扫描失败信号并展示。
在本示例实施方式中,参照图19所示,若可以生成上述目标图形,则生成辅助图像对应的图形编辑界面,其中辅助图像包含初始图像1901,并在辅助图像外侧设置一背景图像1902,以使得用户能够在图形编辑界面对目标图形进行调整。
在步骤S350中,根据所述目标图形完成对所述文档的扫描。
在本示例实施方式中,在根据所述目标图形完成对所述文档的扫描,时可以首先获取所述目标图形的各顶点的坐标;根据各顶点的坐标提取文档图片;对所述文档图片进行校正并输出。
在本示例实施方式中,参照图20所示,以上述目标图像为目标四边形对上述文档扫描方法进行整体说明。
在本示例实施方式中,可以首先执行步骤S2010,获取初始图像,然后执行步骤S2020,对初始图像进行线段检测得到第一有效线段,执行步骤S2030,判断第一有效线段是否能够得到目标四边形,若能够,则执行步骤S2091,输出目标四边形,若不能能够则执行步骤S2040,第一有效线段数量是否小于2,若是,则执行步骤S2092,生成扫描失败信号并展示,若否,则执行步骤S2050,获取辅助图像,并将辅助图像与初始图像进行线段信息融合得到第二有效线段;然后执行步骤S2060,判断第二有效线段对否能够得到目标四边形,若是,则执行步骤S2091,输出目标四边形,若否,则执行步骤S2070,判断第二有效线段的数量是否小于2,若是,则执行步骤S2092,生成扫描失败信号并展示,若否,则执行步骤S2080,添加辅助线段,然后执行步骤S2090,判断第二有效线段和辅助线段是否能够得到目标四边形,若是,则执行步骤S2091,输出目标四边形,若是,则执行步骤S2092,生成扫描失败信号并展示。
上述各步骤的具体细节上述已经进行了详细展示,此处不再赘述。
综上所述,本示例性实施方式中,相较于现有技术,在检测到的第一有效线段不足以构成目标图形时,利用第二摄像头采集到的辅助图像进行辅助以获得对应的目标图形来完成对文档的扫描,利用辅助图像提升了对文档扫描的准确性。
需要注意的是,上述附图仅是根据本公开示例性实施例的方法所包括的处理的示意性说明,而不是限制目的。易于理解,上述附图所示的处理并不表明或限制这些处理的时间顺序。另外,也易于理解,这些处理可以是例如在多个模块中同步或异步执行的。
进一步的,参考图21所示,本示例的实施方式中还提供一种文档扫描装置2100,包括线段检测模块2110、图形检测模块2120、图像获取模块2130、图形确定模块 2140以及文档扫描模块2150。其中:
线段检测模块2110可以用于获取第一摄像头采集的初始图像,并对初始图像进行线段检测得到初始图像的第一有效线段,上述线段检测模块2110还可以被具体配置为用于对初始图像进行线段检测得到参考线段;对参考线段进行噪音线段去除,重叠线段融合得到第一有效线段。
图形检测模块2120可以用于在根据第一有效线段无法得到目标图形时,确定第一有效线段的数量;图形检测模块2120还可以在根据第一有效线段能够得到目标图形时,将目标图形发送至文档扫描模块2150,使得文档扫描模块2150根据目标图形完成对文档的扫描。
在本示例实施方式中,文档扫描装置2100还可以包括编辑模块,编辑模块可一用于在根据第一有效线段能够得到目标图形时,生成与初始图像所对应图形编辑界面,以使得用户能够在图形编辑界面对目标图形进行调整。或在根据第二有效线段能够得到目标图形时,生成与初始图像所对应图形编辑界面,并将对辅助图像中初始图像的部分进行差异化显示,以使得用户能够在图形编辑界面对目标图形进行调整。或在根据第二有效线段和辅助线段确定目标图形时,生成辅助图像对应的图形编辑界面,并在辅助图像外侧设置一背景图像,以使得用户能够在图形编辑界面对目标图形进行调整。
图像获取模块2130可以用于在第一有效线段的数量满足第一预设条件时,获取第二摄像头采集的辅助图像。图像获取模块2130还可以用于在第一有效线段的数量不满足不第一预设条件时,生成扫描失败信号并展示。或者在第二有效线段的数量不满足不第一预设条件时,生成扫描失败信号并展示。
图形确定模块2140可以用于根据辅助图像和初始图像确定目标图形,其中图形确定模块2140可以被具体配置为将辅助图像与初始图像进行线段信息融合得到第二有效线段;若根据第二有效线段无法得到目标图形,则确定第二有效线段的数量;在第二有效线段的数量满足第一预设条件时,添加辅助线段;根据第二有效线段和辅助线段确定目标图形。
其中将辅助图像与初始图像进行线段信息融合得到第二有效线段可以包括:对辅助图像进行线段检测,得到初始线段;删除辅助图像与初始图像重叠部分的初始线段得到辅助图像的线段检测结果;将辅助图像的线段检测结果与第一有效线段进行融合得到第二有效线段。
其中,若第一有效线段无法构成四边形,或构成的四边形不满足预设规则,则判定根据第一有效线段无法得到目标图形;若第二有效线段无法构成四边形,或构成的四边形不满足预设规则,则判定根据第二有效线段无法得到目标图形。
其中,根据辅助图像和初始图像确定目标图形还包括:将辅助图像与初始图像进行线段信息融合得到第二有效线段;若根据第二有效线段能够得到目标图形,则根据目标图形完成对文档的扫描。
上述图形确定模块2140还可以用于确定各目标图形的可信度;根据各目标图形的可信度对目标图形进行排序;利用可信度大于预设值的目标图形完成对文档的扫描。
文档扫描模块2150可以用于根据目标图形完成对文档的扫描。具体可以被配置为用于获取目标图形的各顶点的坐标;根据各顶点的坐标提取文档图片;对文档图片进行校正并输出。
上述装置中各模块的具体细节在方法部分实施方式中已经详细说明,未披露的细节内容可以参见方法部分的实施方式内容,因而不再赘述。
所属技术领域的技术人员能够理解,本公开的各个方面可以实现为系统、方法 或程序产品。因此,本公开的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。
本公开的示例性实施方式还提供了一种计算机可读存储介质,其上存储有能够实现本说明书上述方法的程序产品。在一些可能的实施方式中,本公开的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当程序产品在终端设备上运行时,程序代码用于使终端设备执行本说明书上述“示例性方法”部分中描述的根据本公开各种示例性实施方式的步骤。
需要说明的是,本公开所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。
在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。
此外,可以以一种或多种程序设计语言的任意组合来编写用于执行本公开操作的程序代码,程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其他实施例。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限。

Claims (20)

  1. 一种文档扫描方法,其特征在于,包括:
    获取第一摄像头采集的初始图像,并对所述初始图像进行线段检测得到所述初始图像的第一有效线段;
    在根据所述第一有效线段无法得到目标图形时,确定所述第一有效线段的数量;
    在所述第一有效线段的数量满足第一预设条件时,获取第二摄像头采集的辅助图像;
    根据所述辅助图像和所述初始图像确定目标图形;
    根据所述目标图形完成对所述文档的扫描。
  2. 根据权利要求1所述的方法,其特征在于,对所述初始图像进行线段检测得到所述初始图像的第一有效线段,包括:
    对所述初始图像进行线段检测得到参考线段;
    对所述参考线段进行噪音线段去除,重叠线段融合得到所述第一有效线段。
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    若根据所述第一有效线段能够得到目标图形,则根据所述目标图形完成对所述文档的扫描。
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:
    在根据所述第一有效线段能够得到目标图形时,生成与所述初始图像所对应图形编辑界面,以使得用户能够在所述图形编辑界面对所述目标图形进行调整。
  5. 根据权利要求1所述的方法,其特征在于,所述根据所述辅助图像和所述初始图像确定目标图形包括:
    将所述辅助图像与所述初始图像进行线段信息融合得到第二有效线段;
    若根据所述第二有效线段无法得到所述目标图形,则确定所述第二有效线段的数量;
    在所述第二有效线段的数量满足第一预设条件时,添加辅助线段;
    根据所述第二有效线段和所述辅助线段确定所述目标图形。
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:
    在根据所述第二有效线段和所述辅助线段确定所述目标图形时,生成辅助图像对应的图形编辑界面,并在所述辅助图像外侧设置一背景图像,以使得用户能够在所述图形编辑界面对所述目标图形进行调整。
  7. 根据权利要求5所述的方法,其特征在于,将所述辅助图像与所述初始图像进行线段信息融合得到第二有效线段,包括:
    对所述辅助图像进行线段检测,得到初始线段;
    删除所述辅助图像与所述初始图像重叠部分的初始线段得到辅助图像的线段检测结果;
    将所述辅助图像的线段检测结果与所述第一有效线段进行融合得到所述第二有效线段。
  8. 根据权利要求5所述的方法,其特征在于,所述方法还包括:
    在所述第二有效线段的数量不满足不第一预设条件时,生成扫描失败信号并展示。
  9. 根据权利要求8所述的方法,其特征在于,所述目标图形包括目标四边形,所述方法还包括:
    若所述第二有效线段无法构成四边形,或构成的四边形不满足预设规则,则判定根据所述第二有效线段无法得到目标图形。
  10. 根据权利要求5所述的方法,其特征在于,所述方法还包括:
    在所述辅助线段和所述第二有效线段无法构成目标图形时,生成扫描失败信号并展示。
  11. 根据权利要求10所述的方法,其特征在于,所述目标图形包括目标四边形,所述方法还包括:
    若所述第二有效线段和所述辅助线段无法构成四边形,或构成的四边形不满足预设规则,则判定根据所述第二有效线段和所述辅助线段无法得到目标图形。
  12. 根据权利要求1所述的方法,其特征在于,所述根据所述辅助图像和所述初始图像确定目标图形还包括:
    将所述辅助图像与所述初始图像进行线段信息融合得到第二有效线段;
    若根据所述第二有效线段能够得到所述目标图形,则根据所述目标图形完成对所述文档的扫描。
  13. 根据权利要求12所述的方法,其特征在于,所述方法还包括:
    在根据所述第二有效线段能够得到所述目标图形时,生成与所述初始图像所对应图形编辑界面,并将对所述辅助图像中初始图像的部分进行差异化显示,以使得用户能够在所述图形编辑界面对所述目标图形进行调整。
  14. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    在所述第一有效线段的数量不满足不第一预设条件时,生成扫描失败信号并展示。
  15. 根据权利要求1所述的方法,其特征在于,所述目标图形的数量为多个,所述方法还包括:
    确定各所述目标图形的可信度;
    根据各所述目标图形的可信度对所述目标图形进行排序;
    利用可信度大于预设值的所述目标图形完成对所述文档的扫描。
  16. 根据权利要求1所述的方法,其特征在于,所述根据所述目标图形完成对所述文档的扫描,包括:
    获取所述目标图形的各顶点的坐标;
    根据各顶点的坐标提取文档图片;
    对所述文档图片进行校正并输出。
  17. 根据权利要求1所述的方法,其特征在于,所述目标图形包括目标四边形,所述方法还包括:
    若所述第一有效线段无法构成四边形,或构成的四边形不满足预设规则,则判定根据所述第一有效线段无法得到目标图形。
  18. 一种文档扫描装置,其特征在于,包括:
    线段检测模块,用于获取第一摄像头采集的初始图像,并对所述初始图像进行线段检测得到所述初始图像的第一有效线段;
    图形检测模块,用于在根据所述第一有效线段无法得到目标图形时,确定所述第一有效线段的数量;
    图像获取模块,用于在所述第一有效线段的数量满足第一预设条件时,获取第二摄像头采集的辅助图像;
    图形确定模块,用于根据所述辅助图像和所述初始图像确定目标图形
    文档扫描模块,用于根据所述目标图形完成对所述文档的扫描。
  19. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述程序被处理器执行时实现如权利要求1至17中任一项所述的文档扫描方法。
  20. 一种电子设备,其特征在于,包括:
    处理器;以及
    存储器,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如权利要求1至17中任一项所述的文档扫描方法。
PCT/CN2021/088525 2021-04-20 2021-04-20 文档扫描方法及装置、存储介质及电子设备 WO2022222047A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/088525 WO2022222047A1 (zh) 2021-04-20 2021-04-20 文档扫描方法及装置、存储介质及电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/088525 WO2022222047A1 (zh) 2021-04-20 2021-04-20 文档扫描方法及装置、存储介质及电子设备

Publications (1)

Publication Number Publication Date
WO2022222047A1 true WO2022222047A1 (zh) 2022-10-27

Family

ID=83723667

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/088525 WO2022222047A1 (zh) 2021-04-20 2021-04-20 文档扫描方法及装置、存储介质及电子设备

Country Status (1)

Country Link
WO (1) WO2022222047A1 (zh)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102572A (zh) * 2006-05-11 2008-01-09 三星电子株式会社 在便携式终端中拍摄名片的装置和方法
CN102648622A (zh) * 2009-10-28 2012-08-22 夏普株式会社 图像处理装置、图像处理方法、图像处理程序、记录有图像处理程序的记录介质
CN105260997A (zh) * 2015-09-22 2016-01-20 北京好运到信息科技有限公司 一种自动获取目标图像的方法
US20180218479A1 (en) * 2015-09-30 2018-08-02 Yamaha Corporation Image correction device
CN109711415A (zh) * 2018-11-13 2019-05-03 平安科技(深圳)有限公司 证件轮廓确定方法、装置及存储介质、服务器
US20190362164A1 (en) * 2018-05-28 2019-11-28 Denso Ten Limited Image recognition device, image recognition method, and parking assist system
CN111163261A (zh) * 2019-12-25 2020-05-15 上海肇观电子科技有限公司 目标检测方法、电路、视障辅助设备、电子设备和介质
CN111464716A (zh) * 2020-04-09 2020-07-28 腾讯科技(深圳)有限公司 一种证件扫描方法、装置、设备及存储介质

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102572A (zh) * 2006-05-11 2008-01-09 三星电子株式会社 在便携式终端中拍摄名片的装置和方法
CN102648622A (zh) * 2009-10-28 2012-08-22 夏普株式会社 图像处理装置、图像处理方法、图像处理程序、记录有图像处理程序的记录介质
CN105260997A (zh) * 2015-09-22 2016-01-20 北京好运到信息科技有限公司 一种自动获取目标图像的方法
US20180218479A1 (en) * 2015-09-30 2018-08-02 Yamaha Corporation Image correction device
US20190362164A1 (en) * 2018-05-28 2019-11-28 Denso Ten Limited Image recognition device, image recognition method, and parking assist system
CN109711415A (zh) * 2018-11-13 2019-05-03 平安科技(深圳)有限公司 证件轮廓确定方法、装置及存储介质、服务器
CN111163261A (zh) * 2019-12-25 2020-05-15 上海肇观电子科技有限公司 目标检测方法、电路、视障辅助设备、电子设备和介质
CN111464716A (zh) * 2020-04-09 2020-07-28 腾讯科技(深圳)有限公司 一种证件扫描方法、装置、设备及存储介质

Similar Documents

Publication Publication Date Title
CN109086709B (zh) 特征提取模型训练方法、装置及存储介质
CN110147805B (zh) 图像处理方法、装置、终端及存储介质
US8879803B2 (en) Method, apparatus, and computer program product for image clustering
US11443438B2 (en) Network module and distribution method and apparatus, electronic device, and storage medium
CN110650379B (zh) 视频摘要生成方法、装置、电子设备及存储介质
CN111476783A (zh) 基于人工智能的图像处理方法、装置、设备及存储介质
US9973649B2 (en) Photographing apparatus, photographing system, photographing method, and recording medium recording photographing control program
CN105635452A (zh) 移动终端及其联系人标识方法
CN111950570B (zh) 目标图像提取方法、神经网络训练方法及装置
CN112927362A (zh) 地图重建方法及装置、计算机可读介质和电子设备
CN115699082A (zh) 缺陷检测方法及装置、存储介质及电子设备
WO2022233223A1 (zh) 图像拼接方法、装置、设备及介质
WO2023197648A1 (zh) 截图处理方法及装置、电子设备和计算机可读介质
CN111753498A (zh) 文本处理方法、装置、设备及存储介质
CN108055461B (zh) 自拍角度的推荐方法、装置、终端设备及存储介质
WO2022222047A1 (zh) 文档扫描方法及装置、存储介质及电子设备
CN110853124A (zh) 生成gif动态图的方法、装置、电子设备及介质
CN111639639A (zh) 检测文本区域的方法、装置、设备及存储介质
CN112988984B (zh) 特征获取方法、装置、计算机设备及存储介质
WO2021073204A1 (zh) 对象的显示方法、装置、电子设备及计算机可读存储介质
CN114973293A (zh) 相似性判断方法、关键帧提取方法及装置、介质和设备
WO2021129444A1 (zh) 文件聚类方法及装置、存储介质和电子设备
CN111310701B (zh) 手势识别方法、装置、设备及存储介质
CN113409204A (zh) 待处理图像的优化方法及装置、存储介质及电子设备
CN113077396A (zh) 直线段检测方法及装置、计算机可读介质和电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21937292

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21937292

Country of ref document: EP

Kind code of ref document: A1