WO2022119128A1 - Electronic device and control method therefor - Google Patents

Electronic device and control method therefor Download PDF

Info

Publication number
WO2022119128A1
WO2022119128A1 PCT/KR2021/015233 KR2021015233W WO2022119128A1 WO 2022119128 A1 WO2022119128 A1 WO 2022119128A1 KR 2021015233 W KR2021015233 W KR 2021015233W WO 2022119128 A1 WO2022119128 A1 WO 2022119128A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
document
mapping table
ratio
electronic device
Prior art date
Application number
PCT/KR2021/015233
Other languages
French (fr)
Korean (ko)
Inventor
탁윤식
신재욱
여해동
임애란
임준호
Original Assignee
삼성전자주식회사
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 삼성전자주식회사 filed Critical 삼성전자주식회사
Publication of WO2022119128A1 publication Critical patent/WO2022119128A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/387Composing, repositioning or otherwise geometrically modifying originals
    • G06T3/06
    • G06T3/18
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • G06T7/593Depth or shape recovery from multiple images from stereo images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/12Bounding box

Definitions

  • the present disclosure relates to an electronic device and a control method thereof, and more particularly, to an electronic device capable of reconstructing a document with a deformed shape included in an image, and a control method thereof.
  • An object of the present disclosure is to provide an electronic device capable of restoring a circular shape of a document by estimating a horizontal and vertical ratio of the document, and a method for controlling the same.
  • a method of controlling an electronic device includes: acquiring an image including a document with a deformed shape; inputting the obtained image into a trained neural network model to obtain a mapping table indicating a positional association between pixels of a document whose shape is deformed included in the image and pixels of a result image of which the shape of the document is restored; estimating a horizontal/vertical ratio of the document based on location information of pixels mapped to the mapping table; adjusting a ratio of the mapping table to the estimated horizontal and vertical ratio; and restoring a document based on the adjusted mapping table.
  • an electronic device includes: a camera; a memory including at least one instruction; and a processor, wherein the processor executes the at least one instruction, obtains an image including a document whose shape is deformed through the camera, and inputs the obtained image to a trained neural network model to A mapping table indicating a positional correlation between pixels of the document whose shape included in the image is deformed and pixels of the resulting image in which the shape of the document is restored is obtained, and based on the location information of pixels mapped to the mapping table, The ratio of the mapping table is adjusted based on the estimated horizontal and vertical ratio by estimating the horizontal and vertical ratio, and the document is restored based on the adjusted mapping table.
  • the electronic device can restore the deformed document at a more accurate ratio close to reality.
  • FIG. 1 is a block diagram illustrating a configuration for reconstructing a shape-deformed document, according to an embodiment of the present disclosure
  • FIG. 2 is a diagram for explaining a method for a mapping table generation module to generate a mapping table using a neural network model, according to an embodiment of the present disclosure
  • FIG. 3 is a diagram for explaining a method for a document ratio estimation module to estimate an actual ratio of a document according to an embodiment of the present disclosure
  • FIG. 4 is a view for explaining a method for a document restoration module to restore the shape of a document based on an estimated actual ratio, according to an embodiment of the present disclosure
  • FIG. 5 is a view for explaining an image captured by a camera, a document image restored by a conventional method, and a document image restored by a method according to an embodiment of the present disclosure
  • FIG. 6 is a flowchart for explaining a method of controlling an electronic device, according to an embodiment of the present disclosure
  • FIG. 7 is a block diagram illustrating a configuration of an electronic device according to an embodiment of the present disclosure.
  • expressions such as “have,” “may have,” “include,” or “may include” indicate the presence of a corresponding characteristic (eg, a numerical value, function, operation, or component such as a part). and does not exclude the presence of additional features.
  • expressions such as “A or B,” “at least one of A and/and B,” or “one or more of A or/and B” may include all possible combinations of the items listed together.
  • “A or B,” “at least one of A and B,” or “at least one of A or B” means (1) includes at least one A, (2) includes at least one B; Or (3) it may refer to all cases including both at least one A and at least one B.
  • a component eg, a first component
  • another component eg, a second component
  • the certain element may be directly connected to the other element or may be connected through another element (eg, a third element).
  • a component eg, a first component
  • another component eg, a second component
  • the expression “a device configured to” may mean that the device is “capable of” with other devices or parts.
  • a processor configured (or configured to perform) A, B, and C refers to a dedicated processor (eg, an embedded processor) for performing the corresponding operations, or by executing one or more software programs stored in a memory device.
  • a generic-purpose processor eg, a CPU or an application processor
  • a 'module' or 'unit' performs at least one function or operation, and may be implemented as hardware or software, or a combination of hardware and software.
  • a plurality of 'modules' or a plurality of 'units' may be integrated into at least one module and implemented with at least one processor, except for 'modules' or 'units' that need to be implemented with specific hardware.
  • the electronic device may include, for example, at least one of a smart phone, a tablet PC, a desktop PC, a laptop PC, and a wearable device.
  • a wearable device may be an accessory (e.g., watch, ring, bracelet, anklet, necklace, eyewear, contact lens, or head-mounted-device (HMD)), a textile or clothing integral (e.g. electronic garment); It may include at least one of body-attached (eg, skin pad or tattoo), or bioimplantable circuitry.
  • HMD head-mounted-device
  • the electronic device may include, for example, a television, digital video disk (DVD) player, audio, refrigerator, air conditioner, vacuum cleaner, oven, microwave oven, washing machine, air purifier, set-top box, home automation control panel, Secure at least one of a control panel, media box (eg Samsung HomeSync TM , Apple TV TM , or Google TV TM ), game console (eg Xbox TM , PlayStation TM ), electronic dictionary, electronic key, camcorder, or electronic picture frame.
  • DVD digital video disk
  • audio eg Samsung HomeSync TM , Apple TV TM , or Google TV TM
  • game console eg Xbox TM , PlayStation TM
  • electronic dictionary e.g., electronic key, camcorder, or electronic picture frame.
  • the electronic device 100 includes a camera 110 , a memory 120 , and a processor 130 .
  • the electronic device 100 may be implemented as a smart phone.
  • the electronic device 100 according to the present disclosure is not limited to a specific type of device, and may be implemented as various types of electronic devices 100 such as a tablet PC and a digital camera.
  • the camera 110 may capture an image.
  • the camera 110 may capture an image including a document with a deformed shape.
  • the deformed document may refer to a document that is wrinkled or folded and cannot maintain its original shape.
  • the camera 110 may include a plurality of lenses different from each other.
  • the plurality of lenses are different from each other may include a case in which a field of view (FOV) of each of the plurality of lenses is different from each other and a case in which positions at which each of the plurality of lenses are disposed are different, and the like.
  • FOV field of view
  • the memory 120 may store data necessary for a module for restoring a document with a deformed shape included in the photographed image to perform various operations.
  • the module for restoring the shape of the document may include a document detection module 131 , a mapping table generation module 133 , a document ratio estimation module 137 , and a document restoration module 139 .
  • the memory 110 may store the neural network model 135 for obtaining a mapping table indicating positions of pixels of a document included in an image.
  • the memory 120 may include a non-volatile memory capable of maintaining stored information even when power supply is interrupted, and a volatile memory requiring continuous power supply to maintain the stored information.
  • Data for performing various operations of the module for restoring the shape of a document may be stored in a non-volatile memory.
  • the neural network model 135 for obtaining a mapping table indicating positions of pixels of a document included in an image may also be stored in the nonvolatile memory.
  • the memory 120 may include at least one buffer for temporarily storing an image frame acquired through the camera 110 .
  • the processor 130 may be electrically connected to the memory 120 to control overall functions and operations of the electronic device 100 .
  • the module for restoring the shape of the document stored in the non-volatile memory performs various operations.
  • Data to be used may be loaded into the volatile memory.
  • the processor 130 may load the neural network model for obtaining the mapping table into the volatile memory.
  • the processor 130 may perform various operations through various modules and neural network models based on data loaded into the volatile memory.
  • the loading refers to an operation of loading and storing data stored in the nonvolatile memory into the volatile memory so that the processor 130 can access it.
  • the processor 130 may use the camera 110 to obtain an image including a document whose shape is deformed.
  • the processor 130 may acquire an image through the camera 110 , but this is only an exemplary embodiment and may acquire an image including a document whose shape is deformed from the outside.
  • the processor 130 may detect a document in the captured image through the document detection module 131 .
  • the document is a document with a deformed shape, and may be a folded or bent document.
  • the document may be, for example, printed paper, a receipt, a book, a business card, etc., but is not limited thereto.
  • the document detection module 131 may detect a document in the image using the learned object recognition model.
  • the object recognition model may be implemented as a convolutional neural network (CNN) model, but this is only an example, and a deep neural network (DNN), a recurrent neural network (RNN) and generative adversarial networks (GANs).
  • CNN convolutional neural network
  • DNN deep neural network
  • RNN recurrent neural network
  • GANs generative adversarial networks
  • the processor 130 may display a bounding box around the detected document in the image displayed on the display.
  • the bounding box is a box surrounding the changed shape of the document, and may have a rectangular shape including the maximum horizontal length and the maximum vertical length of the changed shape document.
  • the processor 130 may detect the document included in the image through the document detection module 131 , but this is only an embodiment, and the captured image When only a document is included in the image, the processor 130 may not separately detect the document.
  • the processor 130 may generate a mapping table for restoring the shape of a document through the mapping table generation module 133 . Specifically, when the processor 130 inputs the image (or the image of the document included in the image) obtained through the mapping table generation module 133 to the trained neural network model 135 to restore the deformed document A mapping table indicating positions of pixels in a document included in an image may be obtained.
  • the processor 130 inputs the information 210 on the image to the first network 220 of the neural network model 135 to include depth information of the document whose shape is deformed.
  • a dimensional image 230 may be acquired.
  • the shape of the document included in the three-dimensional image 230 is the same as the shape of the document included in the photographed image 210, but since it includes depth information as well as x-coordinate values and y-coordinate values, the three-dimensional coordinate value is included can do.
  • the depth information of the 3D image 230 may be expressed in gray scale. Meanwhile, information on the 3D image 230 may be stored in a buffer.
  • the processor 130 inputs the three-dimensional image 230 to the second network 240 of the neural network model 135 and creates a mapping table 250 for restoring the shape of the document.
  • the mapping table 250 may be a table indicating the positional correlation between the pixels of the input image and the pixels of the reconstructed result image.
  • the horizontal/vertical ratio of the mapping table 250 may correspond to the horizontal/vertical ratio of the image 210 or the horizontal/vertical ratio of a rectangular bounding box including a document with a deformed shape among the images 210 .
  • the horizontal/vertical ratio of the mapping table 250 may correspond to the horizontal/vertical ratio of the image 210 , and the image 210 includes at least one document as well as a document.
  • the horizontal/vertical ratio of the mapping table 250 may correspond to the horizontal/vertical ratio of a bounding box surrounding the document.
  • the mapping table ( 250) may be different from the original aspect ratio of the document.
  • the first network 220 may be trained using, as input data and output data, a learning image including a document with a deformed shape and a 3D image obtained by photographing the learning image with a depth camera.
  • the second network 240 may be learned by using, as input data and output data, a mapping table corresponding to a three-dimensional image obtained by photographing with a depth camera and a learning image, respectively.
  • the first network 220 and the second network 240 may be implemented as U-net, DeepLab, PSPNet (Pyramid Scene Parsing Network), FCN (Fully Convolutional Networks), etc. that can be utilized for image conversion/generation. have.
  • the processor 130 may restore the shape of the document by estimating the original aspect ratio of the document before restoring the shape of the document using the mapping table.
  • the processor 130 may estimate the original aspect ratio of the document through the document ratio estimation module 137 .
  • the processor 130 obtains 3D position information of pixels mapped to the mapping table 250 using the 3D image 230 , and based on the obtained 3D position information of the pixels, the original width / The vertical ratio can be estimated.
  • the processor 130 compares the 3D coordinate value of the pixel of the 3D image 230 mapped to each point included in the horizontal axis of the mapping table 250 and the 3D coordinate value of the pixel mapped to the previous point. You can estimate the width by adding the difference.
  • the processor 130 estimates the vertical length by adding the difference between the 3D coordinate value of the pixel of the 3D image mapped to each point included in the vertical axis of the mapping table and the 3D coordinate value of the pixel mapped to the previous point can do.
  • the mapping table 250 includes a plurality of points ( , ), N: the horizontal length of the mapping table, M: the vertical length of the mapping table).
  • N the horizontal length of the mapping table
  • M the vertical length of the mapping table.
  • a point of the mapping table 250 may be mapped to each pixel of the 3D image 230 as shown in FIG. 3 .
  • the original horizontal length of the document may be estimated by adding the difference between the 3D coordinate value of the pixel of the 3D image 230 mapped to each and the 3D coordinate value of the pixel mapped to the previous point. That is, by Equation 1 below, the original horizontal length ( ) can be estimated.
  • the horizontal length of the document may be calculated based on the calculated horizontal length of all rows, and may be calculated based on representative values such as the lowest value, the maximum value, and the average value of the calculated horizontal length of the entire row. .
  • the original vertical length of the document may be estimated by adding the difference between the 3D coordinate value of the pixel of the 3D image 230 mapped to each and the 3D coordinate value of the pixel mapped to the previous point. That is, by Equation 2 below, the original vertical length of column i in the document ( ) can be estimated.
  • the vertical length of the document may be calculated based on the calculated vertical length of all columns, and may be calculated based on representative values such as the lowest value, the maximum value, and the average value of the calculated vertical length of all columns.
  • the processor 130 may restore the document based on the horizontal and vertical ratios estimated using the document ratio estimation module 137 through the document recovery module 139 .
  • the processor 130 may adjust the ratio of the mapping table 250 obtained using the neural network model 135 based on the horizontal and vertical ratio estimated using the document ratio estimation module 137 .
  • the processor 130 sets the ratio of the mapping table 250 in which the aspect ratio is X:Y to X, which is the aspect ratio estimated using the document ratio estimation module 137 . It is possible to obtain the mapping table 410 in which the ratio is adjusted by adjusting it to ':Y'.
  • the processor 130 may restore the document 420 by mapping pixel values of the document included in the image to each of the plurality of points included in the adjusted mapping table.
  • the electronic device 100 may reconstruct the deformed document at a more accurate ratio close to the actual shape.
  • the horizontal/vertical ratio is the original horizontal/vertical ratio. Since it is restored to correspond to the horizontal/vertical ratio of the bounding box, the business card 520 may be restored in a distorted shape that is not real.
  • the horizontal/vertical ratio is It may be restored to the business card 530 having a shape close to the original horizontal/vertical ratio.
  • FIG. 6 is a flowchart illustrating a method of controlling an electronic device according to an embodiment of the present disclosure.
  • the electronic device 100 may acquire an image including a document with a deformed shape ( S610 ).
  • the electronic device 100 may acquire an image through the camera 110 , but this is only an example and may receive an image from the outside.
  • the electronic device 100 may obtain a three-dimensional image including depth information of a document whose shape is deformed by inputting information about the image into a first network among the neural network models ( S620 ).
  • the 3D image may include 3D coordinate values including depth information as well as X and Y coordinate values.
  • the first network may be learned by using, as input data and output data, each of the three-dimensional image obtained by photographing the training image and the training image of the document having a deformed shape with a depth camera.
  • the electronic device 100 may obtain a mapping table by inputting a 3D image to a second network among the neural network models ( S630 ).
  • the mapping table is a table indicating the positional correlation between the pixels of the document whose shape included in the image is deformed and the pixels of the result image in which the shape of the document is restored. It may correspond to the proportion of the bounding box of the shape.
  • the second network may be learned by using, as input data and output data, a mapping table corresponding to a three-dimensional image obtained by photographing with a depth camera and a learning image, respectively.
  • the electronic device 100 may estimate the horizontal to vertical ratio of the document based on the 3D position information of pixels mapped to the mapping table ( S640 ). Specifically, the electronic device 100 adds the difference between the 3D coordinate value of the pixel of the 3D image mapped to each point included in the horizontal axis of the mapping table and the 3D coordinate value of the pixel mapped to the previous point to obtain a horizontal length , and the vertical length can be estimated by adding the difference between the 3D coordinate value of the pixel of the 3D image mapped to each point included in the vertical axis of the mapping table and the 3D coordinate value of the pixel mapped to the previous point. .
  • the electronic device 100 may adjust the ratio of the mapping table to the estimated horizontal and vertical ratio (S650). That is, the electronic device 100 may adjust the ratio of the mapping table to be close to the original horizontal and vertical ratio of the document.
  • the electronic device 100 may restore the document based on the adjusted mapping table (S660). Specifically, the electronic device 100 may restore the document by mapping pixels of the document included in the image to each of the plurality of points included in the adjusted mapping table.
  • the electronic device 700 includes a display 710 , a speaker 720 , a camera 730 , a memory 740 , a communication interface 750 , an input interface 760 , It may include a sensor 770 and a processor 780 .
  • a display 710 the electronic device 700 according to the present disclosure includes a display 710 , a speaker 720 , a camera 730 , a memory 740 , a communication interface 750 , an input interface 760 , It may include a sensor 770 and a processor 780 .
  • a sensor 770 and a processor 780 may include a sensor 770 and a processor 780 .
  • the camera 730 , the memory 740 , and the processor 780 have the same configuration as the camera 110 , the memory 120 , and the processor 130 described with reference to FIG. 1 , and thus overlapping descriptions will be omitted.
  • the display 710 may display an image captured by the camera 730 . Also, the display 710 may display a bounding box surrounding a document whose shape is deformed in the captured image. Also, the display 710 may display a UI for receiving a user command for restoring the shape of the document.
  • the display 710 may be implemented as a liquid crystal display panel (LCD), organic light emitting diodes (OLED), etc., and the display 710 may be implemented as a flexible display, a transparent display, etc. in some cases. .
  • the display 710 according to the present disclosure is not limited to a specific type.
  • the speaker 720 may output a voice message.
  • the speaker 720 may be included in the electronic device 700 , but this is only an exemplary embodiment, and may be electrically connected to the electronic device 700 and located outside. In this case, the speaker 720 may output a voice message guiding that the shape of the document included in the captured image is restored.
  • the communication interface 750 includes a circuit and may communicate with an external device. Specifically, the processor 780 may receive various data or information from an external device connected through the communication interface 750 , and may transmit various data or information to the external device.
  • the communication interface 750 may include at least one of a WiFi module, a Bluetooth module, a wireless communication module, and an NFC module.
  • each of the WiFi module and the Bluetooth module may perform communication using a WiFi method and a Bluetooth method.
  • various types of connection information such as an SSID may be first transmitted and received, and various types of information may be transmitted and received after communication connection using this.
  • the wireless communication module may perform communication according to various communication standards such as IEEE, Zigbee, 3rd Generation (3G), 3rd Generation Partnership Project (3GPP), Long Term Evolution (LTE), 5th Generation (5G), and the like.
  • the NFC module may perform communication using a Near Field Communication (NFC) method using a 13.56 MHz band among various RF-ID frequency bands such as 135 kHz, 13.56 MHz, 433 MHz, 860 to 960 MHz, and 2.45 GHz.
  • NFC Near Field Communication
  • the communication interface 750 may receive various types of information, such as data related to the neural network model 135 , from an external device.
  • the communication interface 750 may receive an image including a document with a deformed shape from an external terminal or server.
  • the input interface 760 includes a circuit, and the processor 780 may receive a user command for controlling the operation of the electronic device 700 through the input interface 760 .
  • the input interface 760 may be implemented in a form included in the display 710 as a touch screen, but this is only an exemplary embodiment, and is composed of a button, a microphone, and a remote control signal receiver (not shown). can get
  • the input interface 760 provides various functions such as a user command for executing a camera application, a user command for taking an image, a user command for restoring the shape of a document through the UI, and the like. User commands can be input.
  • the sensor 770 may acquire various information related to the electronic device 700 .
  • the sensor 770 may include a GPS capable of acquiring location information of the electronic device 700 , and a biometric sensor (eg, a heart rate sensor) for acquiring biometric information of a user using the electronic device 700 . , PPG sensor, etc.) and various sensors such as a motion sensor for detecting a motion of the electronic device 700 .
  • a GPS capable of acquiring location information of the electronic device 700
  • a biometric sensor eg, a heart rate sensor
  • PPG sensor PPG sensor, etc.
  • various sensors such as a motion sensor for detecting a motion of the electronic device 700 .
  • the processor may consist of one or a plurality of processors.
  • one or a plurality of processors are general-purpose processors such as CPUs and APs, GPUs. It may be a graphics-only processor, such as a VPU, or an artificial intelligence-only processor, such as an NPU.
  • One or more processors control to process input data according to a predefined operation rule or artificial intelligence model stored in the non-volatile memory and the volatile memory.
  • the predefined action rule or artificial intelligence model is characterized in that it is created through learning.
  • a predefined operation rule or artificial intelligence model of a desired characteristic is created by applying a learning algorithm to a plurality of learning data.
  • Such learning may be performed in the device itself on which artificial intelligence according to the present disclosure is performed, or may be performed through a separate server/system.
  • a neural network model may be composed of a plurality of neural network layers. Each layer has a plurality of weight values, and the layer operation is performed through the operation of the previous layer and the operation of the plurality of weights.
  • Examples of neural networks include Convolutional Neural Network (CNN), Deep Neural Network (DNN), Recurrent Neural Network (RNN), Restricted Boltzmann Machine (RBM), Deep Belief Network (DBN), Bidirectional Recurrent Deep Neural Network (BRDNN), GAN.
  • CNN Convolutional Neural Network
  • DNN Deep Neural Network
  • RNN Restricted Boltzmann Machine
  • DBN Deep Belief Network
  • BBN Bidirectional Recurrent Deep Neural Network
  • GAN GAN
  • the learning algorithm is a method of training a predetermined target device (eg, a robot) using a plurality of learning data so that the predetermined target device can make a decision or make a prediction by itself.
  • Examples of the learning algorithm include supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, and the learning algorithm in the present disclosure is specified when It is not limited to the above example except for.
  • the device-readable storage medium may be provided in the form of a non-transitory storage medium.
  • 'non-transitory storage medium' is a tangible device and only means that it does not contain a signal (eg, electromagnetic wave). It does not distinguish the case where it is stored as
  • the 'non-transitory storage medium' may include a buffer in which data is temporarily stored.
  • the method according to various embodiments disclosed in this document may be provided by being included in a computer program product.
  • Computer program products may be traded between sellers and buyers as commodities.
  • the computer program product is distributed in the form of a device-readable storage medium (eg compact disc read only memory (CD-ROM)), or through an application store (eg Play StoreTM) or on two user devices (eg, It can be distributed (eg downloaded or uploaded) directly or online between smartphones (eg: smartphones).
  • a portion of the computer program product eg, a downloadable app
  • a machine-readable storage medium such as a memory of a manufacturer's server, a server of an application store, or a relay server. It may be temporarily stored or temporarily created.
  • each of the components may be composed of a singular or a plurality of entities, and some of the above-described corresponding sub-components are omitted. Alternatively, other sub-components may be further included in various embodiments. Alternatively or additionally, some components (eg, a module or a program) may be integrated into a single entity to perform the same or similar functions performed by each corresponding component prior to integration.
  • operations performed by a module, program, or other component may be sequentially, parallel, repetitively or heuristically executed, or at least some operations may be executed in a different order, omitted, or other operations may be added.
  • unit or “module” used in the present disclosure includes a unit composed of hardware, software, or firmware, and may be used interchangeably with terms such as, for example, logic, logic block, part, or circuit.
  • a “unit” or “module” may be an integrally formed component or a minimum unit or a part of performing one or more functions.
  • the module may be configured as an application-specific integrated circuit (ASIC).
  • ASIC application-specific integrated circuit
  • Various embodiments of the present disclosure may be implemented as software including instructions stored in a machine-readable storage medium readable by a machine (eg, a computer).
  • the device calls the stored instructions from the storage medium. and, as a device capable of operating according to the called command, the electronic device (eg, the electronic device 100) according to the disclosed embodiments may be included.
  • the processor may perform a function corresponding to the instruction by using other components directly or under the control of the processor.
  • Instructions may include code generated or executed by a compiler or interpreter.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Analysis (AREA)
  • Studio Devices (AREA)

Abstract

An electronic device and a control method therefor are provided. An electronic device control method comprises the steps of: acquiring an image including a document with a modified form; inputting the acquired image in a trained neural network model to acquire a mapping table for indicating the positional correlation between pixels of a document whose form included in the image is modified and pixels of a result image in which the form of the document has been restored; estimating an aspect ratio of the document on the basis of the position information about the pixels mapped to the mapping table; adjusting the ratio of the mapping table in the estimated aspect ratio; and restoring the shape of the document on the basis of the adjusted mapping table.

Description

전자 장치 및 이의 제어 방법 Electronic device and control method thereof
본 개시는 전자 장치 및 이의 제어 방법에 관한 것으로, 더욱 상세하게는 이미지에 포함된 모양이 변형된 문서를 복원할 수 있는 전자 장치 및 이의 제어 방법에 관한 것이다.The present disclosure relates to an electronic device and a control method thereof, and more particularly, to an electronic device capable of reconstructing a document with a deformed shape included in an image, and a control method thereof.
최근 스마트 폰과 같은 전자 장치를 활용하여 고해상도의 이미지를 촬영하고, 촬영된 고해상도의 이미지에 포함된 문서를 스캔하기 위한 수요가 증가하고 있다. Recently, there is an increasing demand for photographing a high-resolution image by using an electronic device such as a smart phone and scanning a document included in the photographed high-resolution image.
다만, 문서를 촬영할 때, 문서의 구겨짐이나 문서의 접힘으로 인해 모양이 변형된 문서를 촬영하는 경우가 발생할 수 있다. 종래에는 이러한 문제점을 해결하기 위해, 이미지 처리를 통해 모양이 변형된 문서를 원래 모양으로 복원시키는 기술이 존재하였다.However, when photographing a document, a document whose shape is deformed due to wrinkling or folding of the document may be photographed. Conventionally, in order to solve this problem, there has been a technique for restoring a document whose shape is deformed through image processing to its original shape.
그러나, 종래의 이미지 처리를 통해 문서의 모양을 복원시키는 기술의 경우, 문서의 원(original) 가로/세로 비율을 알 수가 없으므로, 문서의 원 가로/세로 비율이 아닌 다른 비율로 문서의 모양을 복원시키는 한계가 존재하였다.However, in the case of a technique of restoring the shape of a document through conventional image processing, since the original horizontal/vertical ratio of the document cannot be known, the shape of the document is restored at a ratio other than the original horizontal/vertical ratio of the document There were limits to what could be done.
본 개시는 상술한 문제점을 해결하기 위한 것으로, 본 개시의 목적은 문서의 가로 및 세로 비율을 추정하여 문서의 원 모양을 복원시킬 수 있는 전자 장치 및 이의 제어 방법을 제공함에 있다.An object of the present disclosure is to provide an electronic device capable of restoring a circular shape of a document by estimating a horizontal and vertical ratio of the document, and a method for controlling the same.
본 개시의 일 실시예에 따른, 전자 장치의 제어 방법은, 모양이 변형된 문서를 포함하는 이미지를 획득하는 단계; 상기 획득된 이미지를 학습된 신경망 모델에 입력하여 상기 이미지 내에 포함된 모양이 변형된 문서의 픽셀과 상기 문서의 모양이 복원된 결과 이미지의 픽셀 간의 위치 연관성을 나타내는 매핑 테이블을 획득하는 단계; 상기 매핑 테이블에 매핑된 픽셀들의 위치 정보를 바탕으로 상기 문서의 가로와 세로 비율을 추정하는 단계; 상기 추정된 가로와 세로 비율로 상기 매핑 테이블의 비율을 조정하는 단계; 및 상기 조정된 매핑 테이블을 바탕으로 문서를 복원하는 단계;를 포함한다.According to an embodiment of the present disclosure, a method of controlling an electronic device includes: acquiring an image including a document with a deformed shape; inputting the obtained image into a trained neural network model to obtain a mapping table indicating a positional association between pixels of a document whose shape is deformed included in the image and pixels of a result image of which the shape of the document is restored; estimating a horizontal/vertical ratio of the document based on location information of pixels mapped to the mapping table; adjusting a ratio of the mapping table to the estimated horizontal and vertical ratio; and restoring a document based on the adjusted mapping table.
한편, 본 개시의 일 실시예에 따른, 전자 장치는, 카메라; 적어도 하나의 인스트럭션을 포함하는 메모리; 및 프로세서;를 포함하며, 상기 프로세서는, 상기 적어도 하나의 인스트럭션을 실행하여, 상기 카메라를 통해 모양이 변형된 문서를 포함하는 이미지를 획득하고, 상기 획득된 이미지를 학습된 신경망 모델에 입력하여 상기 이미지 내에 포함된 모양이 변형된 문서의 픽셀과 상기 문서의 모양이 복원된 결과 이미지의 픽셀 간의 위치 연관성을 나타내는 매핑 테이블을 획득하며, 상기 매핑 테이블에 매핑된 픽셀들의 위치 정보를 바탕으로 상기 문서의 가로와 세로 비율을 추정하여 상기 추정된 가로와 세로 비율로 상기 매핑 테이블의 비율을 조정하며, 상기 조정된 매핑 테이블을 바탕으로 문서를 복원한다.Meanwhile, according to an embodiment of the present disclosure, an electronic device includes: a camera; a memory including at least one instruction; and a processor, wherein the processor executes the at least one instruction, obtains an image including a document whose shape is deformed through the camera, and inputs the obtained image to a trained neural network model to A mapping table indicating a positional correlation between pixels of the document whose shape included in the image is deformed and pixels of the resulting image in which the shape of the document is restored is obtained, and based on the location information of pixels mapped to the mapping table, The ratio of the mapping table is adjusted based on the estimated horizontal and vertical ratio by estimating the horizontal and vertical ratio, and the document is restored based on the adjusted mapping table.
상술한 바와 같은 본 개시의 일 실시예에 따라, 전자 장치는 모양이 변형된 문서를 촬영하더라도 모양이 변형된 문서를 실제와 가깝게 더욱 정확한 비율로 복원할 수 있게 된다.According to an embodiment of the present disclosure as described above, even when the electronic device captures a document with a deformed shape, the electronic device can restore the deformed document at a more accurate ratio close to reality.
도 1은 본 개시의 일 실시예에 따른, 모양이 변형된 문서를 복원하기 위한 구성을 나타내는 블록도1 is a block diagram illustrating a configuration for reconstructing a shape-deformed document, according to an embodiment of the present disclosure;
도 2는 본 개시의 일 실시예에 따른, 매핑 테이블 생성 모듈이 신경망 모델을 이용하여 매핑 테이블을 생성하는 방법을 설명하기 위한 도면,2 is a diagram for explaining a method for a mapping table generation module to generate a mapping table using a neural network model, according to an embodiment of the present disclosure;
도 3은 본 개시의 일 실시예에 따른, 문서 비율 추정 모듈이 문서의 실제 비율을 추정하는 방법을 설명하기 위한 도면,3 is a diagram for explaining a method for a document ratio estimation module to estimate an actual ratio of a document according to an embodiment of the present disclosure;
도 4는 본 개시의 일 실시예에 따른, 문서 복원 모듈이 추정된 실제 비율을 바탕으로 문서의 모양을 복원하는 방법을 설명하기 위한 도면,4 is a view for explaining a method for a document restoration module to restore the shape of a document based on an estimated actual ratio, according to an embodiment of the present disclosure;
도 5는 카메라에 의해 촬영된 이미지, 종래 방법으로 복원된 문서 이미지, 본 개시의 일 실시예에 따른 방법으로 복원된 문서 이미지를 설명하기 위한 도면,5 is a view for explaining an image captured by a camera, a document image restored by a conventional method, and a document image restored by a method according to an embodiment of the present disclosure;
도 6은 본 개시의 일 실시예에 따른, 전자 장치의 제어 방법을 설명하기 위한 흐름도, 그리고,6 is a flowchart for explaining a method of controlling an electronic device, according to an embodiment of the present disclosure;
도 7은 본 개시의 일 실시예에 따른, 전자 장치의 구성을 설명하기 위한 블록도이다.7 is a block diagram illustrating a configuration of an electronic device according to an embodiment of the present disclosure.
본 실시 예들은 다양한 변환을 가할 수 있고 여러 가지 실시 예를 가질 수 있는바, 특정 실시 예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나 이는 특정한 실시 형태에 대해 범위를 한정하려는 것이 아니며, 본 개시의 실시 예의 다양한 변경(modifications), 균등물(equivalents), 및/또는 대체물(alternatives)을 포함하는 것으로 이해되어야 한다. 도면의 설명과 관련하여, 유사한 구성요소에 대해서는 유사한 참조 부호가 사용될 수 있다.Since the present embodiments can apply various transformations and can have various embodiments, specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the scope of the specific embodiments, and should be understood to include various modifications, equivalents, and/or alternatives of the embodiments of the present disclosure. In connection with the description of the drawings, like reference numerals may be used for like components.
본 개시를 설명함에 있어서, 관련된 공지 기능 혹은 구성에 대한 구체적인 설명이 본 개시의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그에 대한 상세한 설명은 생략한다. In describing the present disclosure, if it is determined that a detailed description of a related known function or configuration may unnecessarily obscure the subject matter of the present disclosure, a detailed description thereof will be omitted.
덧붙여, 하기 실시 예는 여러 가지 다른 형태로 변형될 수 있으며, 본 개시의 기술적 사상의 범위가 하기 실시 예에 한정되는 것은 아니다. 오히려, 이들 실시 예는 본 개시를 더욱 충실하고 완전하게 하고, 당업자에게 본 개시의 기술적 사상을 완전하게 전달하기 위하여 제공되는 것이다.In addition, the following examples may be modified in various other forms, and the scope of the technical spirit of the present disclosure is not limited to the following examples. Rather, these embodiments are provided to more fully and complete the present disclosure, and to fully convey the technical spirit of the present disclosure to those skilled in the art.
본 개시에서 사용한 용어는 단지 특정한 실시 예를 설명하기 위해 사용된 것으로, 권리범위를 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다.The terms used in the present disclosure are used only to describe specific embodiments, and are not intended to limit the scope of rights. The singular expression includes the plural expression unless the context clearly dictates otherwise.
본 개시에서, "가진다," "가질 수 있다," "포함한다," 또는 "포함할 수 있다" 등의 표현은 해당 특징(예: 수치, 기능, 동작, 또는 부품 등의 구성요소)의 존재를 가리키며, 추가적인 특징의 존재를 배제하지 않는다. In the present disclosure, expressions such as “have,” “may have,” “include,” or “may include” indicate the presence of a corresponding characteristic (eg, a numerical value, function, operation, or component such as a part). and does not exclude the presence of additional features.
본 개시에서, "A 또는 B," "A 또는/및 B 중 적어도 하나," 또는 "A 또는/및 B 중 하나 또는 그 이상"등의 표현은 함께 나열된 항목들의 모든 가능한 조합을 포함할 수 있다. 예를 들면, "A 또는 B," "A 및 B 중 적어도 하나," 또는 "A 또는 B 중 적어도 하나"는, (1) 적어도 하나의 A를 포함, (2) 적어도 하나의 B를 포함, 또는 (3) 적어도 하나의 A 및 적어도 하나의 B 모두를 포함하는 경우를 모두 지칭할 수 있다.In this disclosure, expressions such as "A or B," "at least one of A and/and B," or "one or more of A or/and B" may include all possible combinations of the items listed together. . For example, "A or B," "at least one of A and B," or "at least one of A or B" means (1) includes at least one A, (2) includes at least one B; Or (3) it may refer to all cases including both at least one A and at least one B.
본 개시에서 사용된 "제1," "제2," "첫째," 또는 "둘째,"등의 표현들은 다양한 구성요소들을, 순서 및/또는 중요도에 상관없이 수식할 수 있고, 한 구성요소를 다른 구성요소와 구분하기 위해 사용될 뿐 해당 구성요소들을 한정하지 않는다. As used in the present disclosure, expressions such as “first,” “second,” “first,” or “second,” may modify various elements, regardless of order and/or importance, and refer to one element. It is used only to distinguish it from other components, and does not limit the components.
어떤 구성요소(예: 제1 구성요소)가 다른 구성요소(예: 제2 구성요소)에 "(기능적으로 또는 통신적으로) 연결되어((operatively or communicatively) coupled with/to)" 있다거나 "접속되어(connected to)" 있다고 언급된 때에는, 상기 어떤 구성요소가 상기 다른 구성요소에 직접적으로 연결되거나, 다른 구성요소(예: 제3 구성요소)를 통하여 연결될 수 있다고 이해되어야 할 것이다. A component (eg, a first component) is "coupled with/to (operatively or communicatively)" to another component (eg, a second component); When referring to "connected to", it will be understood that the certain element may be directly connected to the other element or may be connected through another element (eg, a third element).
반면에, 어떤 구성요소(예: 제1 구성요소)가 다른 구성요소(예: 제2 구성요소)에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 상기 어떤 구성요소와 상기 다른 구성요소 사이에 다른 구성요소(예: 제3 구성요소)가 존재하지 않는 것으로 이해될 수 있다.On the other hand, when it is said that a component (eg, a first component) is "directly connected" or "directly connected" to another component (eg, a second component), the component and the It may be understood that other components (eg, a third component) do not exist between other components.
본 개시에서 사용된 표현 "~하도록 구성된(또는 설정된)(configured to)"은 상황에 따라, 예를 들면, "~에 적합한(suitable for)," "~하는 능력을 가지는(having the capacity to)," "~하도록 설계된(designed to)," "~하도록 변경된(adapted to)," "~하도록 만들어진(made to)," 또는 "~를 할 수 있는(capable of)"과 바꾸어 사용될 수 있다. 용어 "~하도록 구성된(또는 설정된)"은 하드웨어적으로 "특별히 설계된(specifically designed to)" 것만을 반드시 의미하지 않을 수 있다. The expression “configured to (or configured to)” as used in this disclosure, depending on the context, for example, “suitable for,” “having the capacity to” ," "designed to," "adapted to," "made to," or "capable of." The term “configured (or configured to)” may not necessarily mean only “specifically designed to” in hardware.
대신, 어떤 상황에서는, "~하도록 구성된 장치"라는 표현은, 그 장치가 다른 장치 또는 부품들과 함께 "~할 수 있는" 것을 의미할 수 있다. 예를 들면, 문구 "A, B, 및 C를 수행하도록 구성된(또는 설정된) 프로세서"는 해당 동작을 수행하기 위한 전용 프로세서(예: 임베디드 프로세서), 또는 메모리 장치에 저장된 하나 이상의 소프트웨어 프로그램들을 실행함으로써, 해당 동작들을 수행할 수 있는 범용 프로세서(generic-purpose processor)(예: CPU 또는 application processor)를 의미할 수 있다.Instead, in some circumstances, the expression “a device configured to” may mean that the device is “capable of” with other devices or parts. For example, the phrase "a processor configured (or configured to perform) A, B, and C" refers to a dedicated processor (eg, an embedded processor) for performing the corresponding operations, or by executing one or more software programs stored in a memory device. , may mean a generic-purpose processor (eg, a CPU or an application processor) capable of performing corresponding operations.
실시 예에 있어서 '모듈' 혹은 '부'는 적어도 하나의 기능이나 동작을 수행하며, 하드웨어 또는 소프트웨어로 구현되거나 하드웨어와 소프트웨어의 결합으로 구현될 수 있다. 또한, 복수의 '모듈' 혹은 복수의 '부'는 특정한 하드웨어로 구현될 필요가 있는 '모듈' 혹은 '부'를 제외하고는 적어도 하나의 모듈로 일체화되어 적어도 하나의 프로세서로 구현될 수 있다.In an embodiment, a 'module' or 'unit' performs at least one function or operation, and may be implemented as hardware or software, or a combination of hardware and software. In addition, a plurality of 'modules' or a plurality of 'units' may be integrated into at least one module and implemented with at least one processor, except for 'modules' or 'units' that need to be implemented with specific hardware.
한편, 도면에서의 다양한 요소와 영역은 개략적으로 그려진 것이다. 따라서, 본 발명의 기술적 사상은 첨부한 도면에 그려진 상대적인 크기나 간격에 의해 제한되지 않는다. Meanwhile, various elements and regions in the drawings are schematically drawn. Accordingly, the technical spirit of the present invention is not limited by the relative size or spacing drawn in the accompanying drawings.
한편, 본 개시의 다양한 실시 예에 따른 전자 장치는 예를 들면, 스마트 폰, 태블릿 PC, 데스크탑 PC, 랩탑 PC 또는 웨어러블 장치 중 적어도 하나를 포함할 수 있다. 웨어러블 장치는 액세서리형(예: 시계, 반지, 팔찌, 발찌, 목걸이, 안경, 콘택트 렌즈, 또는 머리 착용형 장치(head-mounted-device(HMD)), 직물 또는 의류 일체형(예: 전자 의복), 신체 부착형(예: 스킨 패드 또는 문신), 또는 생체 이식형 회로 중 적어도 하나를 포함할 수 있다. Meanwhile, the electronic device according to various embodiments of the present disclosure may include, for example, at least one of a smart phone, a tablet PC, a desktop PC, a laptop PC, and a wearable device. A wearable device may be an accessory (e.g., watch, ring, bracelet, anklet, necklace, eyewear, contact lens, or head-mounted-device (HMD)), a textile or clothing integral (e.g. electronic garment); It may include at least one of body-attached (eg, skin pad or tattoo), or bioimplantable circuitry.
어떤 실시 예들에서, 전자 장치는 예를 들면, 텔레비전, DVD(digital video disk) 플레이어, 오디오, 냉장고, 에어컨, 청소기, 오븐, 전자레인지, 세탁기, 공기 청정기, 셋톱 박스, 홈 오토매이션 컨트롤 패널, 보안 컨트롤 패널, 미디어 박스(예: 삼성 HomeSyncTM, 애플TVTM, 또는 구글 TVTM), 게임 콘솔(예: XboxTM, PlayStationTM), 전자 사전, 전자 키, 캠코더, 또는 전자 액자 중 적어도 하나를 포함할 수 있다.In some embodiments, the electronic device may include, for example, a television, digital video disk (DVD) player, audio, refrigerator, air conditioner, vacuum cleaner, oven, microwave oven, washing machine, air purifier, set-top box, home automation control panel, Secure at least one of a control panel, media box (eg Samsung HomeSync TM , Apple TV TM , or Google TV TM ), game console (eg Xbox TM , PlayStation TM ), electronic dictionary, electronic key, camcorder, or electronic picture frame. may include
이하에서는 첨부한 도면을 참고하여 본 개시에 따른 실시 예에 대하여 본 개시가 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다.Hereinafter, embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings so that those of ordinary skill in the art to which the present disclosure pertains can easily implement them.
이하에서는 도면을 참조하여 본 개시에 대해 더욱 상세히 설명하기로 한다. 도 1은 본 개시의 일 실시예에 따른, 전자 장치의 구성을 나타내는 블록도이다. 전자 장치(100)는 카메라(110), 메모리(120) 및 프로세서(130)를 포함한다. 이때, 전자 장치(100)는 스마트 폰으로 구현될 수 있다. 다만, 본 개시에 따른 전자 장치(100)가 특정 유형의 장치에 국한되는 것은 아니며, 태블릿 PC 및 디지털 카메라 등과 같이 다양한 종류의 전자 장치(100)로 구현될 수도 있다. Hereinafter, the present disclosure will be described in more detail with reference to the drawings. 1 is a block diagram illustrating a configuration of an electronic device according to an embodiment of the present disclosure. The electronic device 100 includes a camera 110 , a memory 120 , and a processor 130 . In this case, the electronic device 100 may be implemented as a smart phone. However, the electronic device 100 according to the present disclosure is not limited to a specific type of device, and may be implemented as various types of electronic devices 100 such as a tablet PC and a digital camera.
카메라(110)는 이미지를 촬영할 수 있다. 특히, 카메라(110)는 모양이 변형된 문서를 포함하는 이미지를 촬영할 수 있다. 이때, 모양이 변형된 문서라 함은 구겨지거나 접혀 원래 모양을 유지하지 못하는 문서를 말할 수 있다. The camera 110 may capture an image. In particular, the camera 110 may capture an image including a document with a deformed shape. In this case, the deformed document may refer to a document that is wrinkled or folded and cannot maintain its original shape.
또한, 카메라(110)는 서로 상이한 복수의 렌즈를 포함할 수 있다. 여기서, 복수의 렌즈가 서로 상이하다는 것은 복수의 렌즈 각각의 화각(Field of View, FOV)이 서로 상이한 경우 및 복수의 렌즈 각각이 배치된 위치가 상이한 경우 등을 포함할 수 있다. Also, the camera 110 may include a plurality of lenses different from each other. Here, that the plurality of lenses are different from each other may include a case in which a field of view (FOV) of each of the plurality of lenses is different from each other and a case in which positions at which each of the plurality of lenses are disposed are different, and the like.
메모리(120)는 촬영된 이미지에 포함된 모양이 변형된 문서를 복원하기 위한 모듈이 각종 동작을 수행하기 위해 필요한 데이터를 저장할 수 있다. 문서의 모양을 복원하기 위한 모듈은 문서 감지 모듈(131), 매핑 테이블 생성 모듈(133), 문서 비율 추정 모듈(137) 및 문서 복원 모듈(139)을 포함할 수 있다. 또한, 메모리(110)는 이미지에 포함된 문서의 픽셀의 위치를 나타내는 매핑 테이블을 획득하기 위한 신경망 모델(135)을 저장할 수 있다. The memory 120 may store data necessary for a module for restoring a document with a deformed shape included in the photographed image to perform various operations. The module for restoring the shape of the document may include a document detection module 131 , a mapping table generation module 133 , a document ratio estimation module 137 , and a document restoration module 139 . Also, the memory 110 may store the neural network model 135 for obtaining a mapping table indicating positions of pixels of a document included in an image.
한편, 메모리(120)는 전력 공급이 중단되더라도 저장된 정보를 유지할 수 있는 비휘발성 메모리 및 저장된 정보를 유지하기 위해서는 지속적인 전력 공급이 필요한 휘발성 메모리를 포함할 수 있다. 문서의 모양을 복원하기 위한 모듈이 각종 동작을 수행하기 위한 데이터는 비휘발성 메모리에 저장될 수 있다. 그리고, 이미지에 포함된 문서의 픽셀의 위치를 나타내는 매핑 테이블을 획득하기 위한 신경망 모델(135) 역시 비휘발성 메모리에 저장될 수 있다. Meanwhile, the memory 120 may include a non-volatile memory capable of maintaining stored information even when power supply is interrupted, and a volatile memory requiring continuous power supply to maintain the stored information. Data for performing various operations of the module for restoring the shape of a document may be stored in a non-volatile memory. In addition, the neural network model 135 for obtaining a mapping table indicating positions of pixels of a document included in an image may also be stored in the nonvolatile memory.
또한, 메모리(120)는 카메라(110)를 통해 획득되는 이미지 프레임을 일시적으로 저장하는 적어도 하나의 버퍼를 포함할 수 있다.Also, the memory 120 may include at least one buffer for temporarily storing an image frame acquired through the camera 110 .
프로세서(130)는 메모리(120)와 전기적으로 연결되어 전자 장치(100)의 전반적인 기능 및 동작을 제어할 수 있다The processor 130 may be electrically connected to the memory 120 to control overall functions and operations of the electronic device 100 .
프로세서(130)는 카메라 어플리케이션이 실행되거나 촬영된 이미지 내에 포함된 문서의 모양을 복원하기 위한 위한 사용자 명령이 입력되면, 비휘발성 메모리에 저장되어 있는 문서의 모양을 복원하기 위한 모듈이 각종 동작을 수행하기 위한 데이터를 휘발성 메모리로 로딩(loading)할 수 있다. 그리고, 프로세서(130)는 매핑 테이블을 획득하기 위한 신경망 모델을 휘발성 메모리로 로딩할 수 있다. 프로세서(130)는 휘발성 메모리로 로딩된 데이터에 기초하여 각종 모듈 및 신경망 모델을 통해 각종 동작을 수행할 수 있다. 여기서, 로딩이란 프로세서(130)가 엑세스할 수 있도록 비휘발성 메모리에 저장된 데이터를 휘발성 메모리에 불러들여 저장하는 동작을 의미한다.In the processor 130, when a camera application is executed or a user command for restoring the shape of a document included in the captured image is input, the module for restoring the shape of the document stored in the non-volatile memory performs various operations. Data to be used may be loaded into the volatile memory. Then, the processor 130 may load the neural network model for obtaining the mapping table into the volatile memory. The processor 130 may perform various operations through various modules and neural network models based on data loaded into the volatile memory. Here, the loading refers to an operation of loading and storing data stored in the nonvolatile memory into the volatile memory so that the processor 130 can access it.
프로세서(130)는 카메라(110)를 이용하여 모양이 변형된 문서를 포함하는 이미지를 획득할 수 있다. 이때, 프로세서(130)는 카메라(110)를 통해 이미지를 획득할 수 있으나, 이는 일 실시예에 불과할 뿐, 외부로부터 모양이 변형된 문서를 포함하는 이미지를 획득할 수 있다.The processor 130 may use the camera 110 to obtain an image including a document whose shape is deformed. In this case, the processor 130 may acquire an image through the camera 110 , but this is only an exemplary embodiment and may acquire an image including a document whose shape is deformed from the outside.
촬영된 이미지 내에 포함된 문서의 모양을 복원하기 위한 위한 사용자 명령이 입력되면, 프로세서(130)는 문서 감지 모듈(131)을 통해 촬영된 이미지 내에 문서를 감지할 수 있다. 이때, 문서는 모양이 변형된 문서로서, 접히거나 구부러진 문서일 수 있다. 또한, 문서는 예로, 프린트된 종이, 영수증, 책, 명함 등일 수 있으나, 이에 한정되지 않는다.When a user command for restoring the shape of a document included in the captured image is input, the processor 130 may detect a document in the captured image through the document detection module 131 . In this case, the document is a document with a deformed shape, and may be a folded or bent document. In addition, the document may be, for example, printed paper, a receipt, a book, a business card, etc., but is not limited thereto.
이때, 문서 감지 모듈(131)는 학습된 오브젝트 인식 모델을 이용하여 이미지 내에 문서를 감지할 수 있다. 이때, 오브젝트 인식 모델은 합성곱 신경망(Convolution Neural Network, CNN) 모델로 구현될 수 있으나, 이는 일 실시예에 불과할 뿐, 심층 신경망(Deep Neural Network, DNN), 순환 신경망(Recurrent Neural Network, RNN) 및 생성적 적대 신경망(Generative Adversarial Networks, GAN) 중 적어도 하나의 인공 신경망 모델로 구현될 수 있다.In this case, the document detection module 131 may detect a document in the image using the learned object recognition model. In this case, the object recognition model may be implemented as a convolutional neural network (CNN) model, but this is only an example, and a deep neural network (DNN), a recurrent neural network (RNN) and generative adversarial networks (GANs).
또한, 이미지 내에 문서가 감지되면, 프로세서(130)는 디스플레이에 표시된 이미지 내에 감지된 문서 주위에 바운딩 박스를 표시할 수 있다. 이때, 바운딩 박스는 모양이 변경된 문서를 둘러싸는 박스로서, 모양이 변경된 문서의 최대 가로 길이, 최대 세로 길이로 구성된 직사각형 형태일 수 있다.Also, when a document in the image is detected, the processor 130 may display a bounding box around the detected document in the image displayed on the display. In this case, the bounding box is a box surrounding the changed shape of the document, and may have a rectangular shape including the maximum horizontal length and the maximum vertical length of the changed shape document.
한편, 촬영된 이미지 내에 문서뿐만 아니라 복수의 오브젝트가 포함될 경우, 프로세서(130)는 문서 감지 모듈(131)을 통해 이미지 내에 포함된 문서를 감지할 수 있으나, 이는 일 실시예에 불과할 뿐, 촬영된 이미지 내에 문서만 포함된 경우,프로세서(130)는 별도로 문서를 감지하지 않을 수 있다.On the other hand, when a plurality of objects as well as a document are included in the captured image, the processor 130 may detect the document included in the image through the document detection module 131 , but this is only an embodiment, and the captured image When only a document is included in the image, the processor 130 may not separately detect the document.
프로세서(130)는 매핑 테이블 생성 모듈(133)을 통해 문서의 모양을 복원하기 위한 매핑 테이블을 생성할 수 있다. 구체적으로, 프로세서(130)는 매핑 테이블 생성 모듈(133)을 통해 획득된 이미지(또는 이미지에 포함된 문서의 이미지)를 학습된 신경망 모델(135)에 입력하여 모양이 변형된 문서를 복원했을 때 이미지에 포함된 문서의 픽셀의 위치를 나타내는 매핑 테이블을 획득할 수 있다.The processor 130 may generate a mapping table for restoring the shape of a document through the mapping table generation module 133 . Specifically, when the processor 130 inputs the image (or the image of the document included in the image) obtained through the mapping table generation module 133 to the trained neural network model 135 to restore the deformed document A mapping table indicating positions of pixels in a document included in an image may be obtained.
이때, 프로세서(130)는 도 2에 도시된 바와 같이, 이미지에 대한 정보(210)를 신경망 모델(135) 중 제1 네트워크(220)에 입력하여 모양이 변형된 문서의 뎁스 정보를 포함하는 3차원 이미지(230)를 획득할 수 있다. 3차원 이미지(230)에 포함된 문서의 모양은 촬영된 이미지(210)에 포함된 문서의 모양과 동일하나, x좌표값 및 y 좌표값 뿐만 아니라 뎁스 정보를 포함하므로, 3차원 좌표값을 포함할 수 있다. 3차원 이미지(230)의 뎁스 정보는 도 2에 도시된 바와 같이, 그레이 스케일로 표현될 수 있다. 한편, 3차원 이미지(230)에 대한 정보는 버퍼에 저장될 수 있다.At this time, as shown in FIG. 2 , the processor 130 inputs the information 210 on the image to the first network 220 of the neural network model 135 to include depth information of the document whose shape is deformed. A dimensional image 230 may be acquired. The shape of the document included in the three-dimensional image 230 is the same as the shape of the document included in the photographed image 210, but since it includes depth information as well as x-coordinate values and y-coordinate values, the three-dimensional coordinate value is included can do. As shown in FIG. 2 , the depth information of the 3D image 230 may be expressed in gray scale. Meanwhile, information on the 3D image 230 may be stored in a buffer.
또한, 프로세서(130)는 도 2에 도시된 바와 같이, 3차원 이미지(230)를 신경망 모델(135) 중 제2 네트워크(240)에 입력하여 문서의 모양을 복원하기 위한 매핑 테이블(250)을 획득할 수 있다. 이때, 매핑 테이블(250)은 입력된 이미지의 픽셀과 복원된 결과 이미지의 픽셀 간의 위치 연관성을 나타내는 테이블일 수 있다. In addition, as shown in FIG. 2 , the processor 130 inputs the three-dimensional image 230 to the second network 240 of the neural network model 135 and creates a mapping table 250 for restoring the shape of the document. can be obtained In this case, the mapping table 250 may be a table indicating the positional correlation between the pixels of the input image and the pixels of the reconstructed result image.
매핑 테이블(250)의 가로/세로 비율은 이미지(210)의 가로/세로 비율 또는 이미지(210) 중 모양이 변형된 문서를 포함하는 직사각형 형태의 바운딩 박스의 가로/세로 비율에 대응될 수 있다. 예로, 이미지(210) 내에 문서만 포함된 경우, 매핑 테이블(250)의 가로/세로 비율은 이미지(210)의 가로/세로 비율에 대응될 수 있으며, 이미지(210) 내에 문서뿐만 아니라 적어도 하나의 오브젝트가 포함된 경우, 매핑 테이블(250)의 가로/세로 비율은 문서를 둘러싸는 바운딩 박스의 가로/세로 비율에 대응될 수 있다. 즉, 이미지(210)의 가로/세로 비율 또는 이미지(210) 중 모양이 변형된 문서를 포함하는 직사각형 형태의 바운딩 박스의 가로/세로 비율은 문서의 원 가로/세로 비율과 상이하므로, 매핑 테이블(250)의 가로/세로 비율은 문서의 원 가로/세로 비율과 상이할 수 있다.The horizontal/vertical ratio of the mapping table 250 may correspond to the horizontal/vertical ratio of the image 210 or the horizontal/vertical ratio of a rectangular bounding box including a document with a deformed shape among the images 210 . For example, when only a document is included in the image 210 , the horizontal/vertical ratio of the mapping table 250 may correspond to the horizontal/vertical ratio of the image 210 , and the image 210 includes at least one document as well as a document. When an object is included, the horizontal/vertical ratio of the mapping table 250 may correspond to the horizontal/vertical ratio of a bounding box surrounding the document. That is, since the horizontal/vertical ratio of the image 210 or the horizontal/vertical ratio of a rectangular bounding box including a deformed document among the images 210 is different from the original horizontal/vertical ratio of the document, the mapping table ( 250) may be different from the original aspect ratio of the document.
한편, 제1 네트워크(220)는 모양이 변형된 문서를 포함하는 학습 이미지 및 상기 학습 이미지를 뎁스 카메라로 촬영하여 획득된 3차원 이미지 각각을 입력 데이터 및 출력 데이터로 이용하여 학습될 수 있다. 또한 제2 네트워크(240)는 뎁스 카메라로 촬영하여 획득된 3차원 이미지 및 학습 이미지에 대응되는 매핑 테이블 각각을 입력 데이터 및 출력 데이터로 이용하여 학습될 수 있다. 이때, 제1 네트워크(220) 및 제2 네트워크(240)는 이미지 변환/생성에 활용될 수 있는 U-net, DeepLab, PSPNet(Pyramid Scene Parsing Network), FCN(Fully Convolutional Networks) 등으로 구현될 수 있다.Meanwhile, the first network 220 may be trained using, as input data and output data, a learning image including a document with a deformed shape and a 3D image obtained by photographing the learning image with a depth camera. Also, the second network 240 may be learned by using, as input data and output data, a mapping table corresponding to a three-dimensional image obtained by photographing with a depth camera and a learning image, respectively. In this case, the first network 220 and the second network 240 may be implemented as U-net, DeepLab, PSPNet (Pyramid Scene Parsing Network), FCN (Fully Convolutional Networks), etc. that can be utilized for image conversion/generation. have.
한편, 매핑 테이블(250)의 가로/세로 비율은 문서의 원 가로/세로 비율과 상이하므로, 매핑 테이블(250)을 이용하여 문서의 모양을 복원할 경우, 문서의 원 가로/세로 비율로 복원되지 않을 수 있다. 따라서, 프로세서(130)는 매핑 테이블을 이용하여 문서의 모양을 복원하기 이전에 문서의 원 가로/세로 비율을 추정하여 문서의 모양을 복원할 수 있다. On the other hand, since the horizontal/vertical ratio of the mapping table 250 is different from the original horizontal/vertical ratio of the document, when the shape of the document is restored using the mapping table 250, the original horizontal/vertical ratio of the document is not restored. it may not be Accordingly, the processor 130 may restore the shape of the document by estimating the original aspect ratio of the document before restoring the shape of the document using the mapping table.
프로세서(130)는 문서 비율 추정 모듈(137)을 통해 문서의 원 가로/세로 비율을 추정할 수 있다. 특히, 프로세서(130)는 3차원 이미지(230)를 이용하여 매핑 테이블(250)에 매핑된 픽셀들의 3차원 위치 정보를 획득하고, 획득된 픽셀들의 3차원 위치 정보를 바탕으로 문서의 원 가로/세로 비율을 추정할 수 있다. 구체적으로, 프로세서(130)는 매핑 테이블(250)의 가로축에 포함된 포인트 각각에 매핑되는 3차원 이미지(230)의 픽셀의 3차원 좌표값과 이전 포인트에 매핑된 픽셀의 3차원 좌표값과의 차이를 더해 가로 길이를 추정할 수 있다. 또한, 프로세서(130)는 매핑 테이블의 세로축에 포함된 포인트 각각에 매핑되는 3차원 이미지의 픽셀의 3차원 좌표값과 이전 포인트에 매핑된 픽셀의 3차원 좌표값과의 차이를 더해 세로 길이를 추정할 수 있다.The processor 130 may estimate the original aspect ratio of the document through the document ratio estimation module 137 . In particular, the processor 130 obtains 3D position information of pixels mapped to the mapping table 250 using the 3D image 230 , and based on the obtained 3D position information of the pixels, the original width / The vertical ratio can be estimated. Specifically, the processor 130 compares the 3D coordinate value of the pixel of the 3D image 230 mapped to each point included in the horizontal axis of the mapping table 250 and the 3D coordinate value of the pixel mapped to the previous point. You can estimate the width by adding the difference. In addition, the processor 130 estimates the vertical length by adding the difference between the 3D coordinate value of the pixel of the 3D image mapped to each point included in the vertical axis of the mapping table and the 3D coordinate value of the pixel mapped to the previous point can do.
더욱 구체적으로, 매핑 테이블(250)은 복수의 포인트(
Figure PCTKR2021015233-appb-img-000001
,
Figure PCTKR2021015233-appb-img-000002
), N : 매핑 테이블의 가로 길이, M : 매핑 테이블의 세로 길이)를 포함할 수 있다. 이때, 매핑 테이블(250)의 포인트는 도 3에 도시된 바와 같이, 3차원 이미지(230)의 픽셀 각각과 매핑될 수 있다.
More specifically, the mapping table 250 includes a plurality of points (
Figure PCTKR2021015233-appb-img-000001
,
Figure PCTKR2021015233-appb-img-000002
), N: the horizontal length of the mapping table, M: the vertical length of the mapping table). In this case, a point of the mapping table 250 may be mapped to each pixel of the 3D image 230 as shown in FIG. 3 .
이때, j행의 매핑 테이블(250)의 가로축에 포함된 포인트(
Figure PCTKR2021015233-appb-img-000003
내지
Figure PCTKR2021015233-appb-img-000004
) 각각에 매핑되는 3차원 이미지(230)의 픽셀의 3차원 좌표값과 이전 포인트에 매핑된 픽셀의 3차원 좌표값과의 차이를 더해 문서의 원 가로 길이가 추정될 수 있다. 즉, 아래의 수학식 1에 의해 문서 내 j행의 원 가로 길이(
Figure PCTKR2021015233-appb-img-000005
)가 추정될 수 있다. 문서의 가로 길이는 계산된 전체 행의 가로 길이를 기반으로 한 값이 계산될 수 있으며, 계산된 전체 행의 가로 길이의 최저 값, 최대 값, 평균 값 등과 같은 대표값을 기반으로 계산될 수 있다.
At this time, the point included in the horizontal axis of the mapping table 250 of row j (
Figure PCTKR2021015233-appb-img-000003
inside
Figure PCTKR2021015233-appb-img-000004
), the original horizontal length of the document may be estimated by adding the difference between the 3D coordinate value of the pixel of the 3D image 230 mapped to each and the 3D coordinate value of the pixel mapped to the previous point. That is, by Equation 1 below, the original horizontal length (
Figure PCTKR2021015233-appb-img-000005
) can be estimated. The horizontal length of the document may be calculated based on the calculated horizontal length of all rows, and may be calculated based on representative values such as the lowest value, the maximum value, and the average value of the calculated horizontal length of the entire row. .
Figure PCTKR2021015233-appb-img-000006
Figure PCTKR2021015233-appb-img-000006
또한, i 열의 매핑 테이블(250)의 세로축에 포함된 포인트(
Figure PCTKR2021015233-appb-img-000007
내지
Figure PCTKR2021015233-appb-img-000008
) 각각에 매핑되는 3차원 이미지(230)의 픽셀의 3차원 좌표값과 이전 포인트에 매핑된 픽셀의 3차원 좌표값과의 차이를 더해 문서의 원 세로 길이가 추정될 수 있다. 즉, 아래의 수학식 2에 의해 문서 내 i열의 원 세로 길이(
Figure PCTKR2021015233-appb-img-000009
)가 추정될 수 있다. 문서의 세로 길이는 계산된 전체 열의 세로 길이를 기반으로 한 값이 계산될 수 있으며, 계산된 전체 열의 세로 길이의 최저 값, 최대 값, 평균 값 등과 같은 대표값을 기반으로 계산될 수 있다.
In addition, the point (
Figure PCTKR2021015233-appb-img-000007
inside
Figure PCTKR2021015233-appb-img-000008
), the original vertical length of the document may be estimated by adding the difference between the 3D coordinate value of the pixel of the 3D image 230 mapped to each and the 3D coordinate value of the pixel mapped to the previous point. That is, by Equation 2 below, the original vertical length of column i in the document (
Figure PCTKR2021015233-appb-img-000009
) can be estimated. The vertical length of the document may be calculated based on the calculated vertical length of all columns, and may be calculated based on representative values such as the lowest value, the maximum value, and the average value of the calculated vertical length of all columns.
Figure PCTKR2021015233-appb-img-000010
Figure PCTKR2021015233-appb-img-000010
Figure PCTKR2021015233-appb-img-000011
Figure PCTKR2021015233-appb-img-000011
Figure PCTKR2021015233-appb-img-000012
Figure PCTKR2021015233-appb-img-000012
프로세서(130)는 문서 복원 모듈(139)을 통해 문서 비율 추정 모듈(137)을 이용하여 추정된 가로와 세로 비율을 바탕으로 문서를 복원할 수 있다.The processor 130 may restore the document based on the horizontal and vertical ratios estimated using the document ratio estimation module 137 through the document recovery module 139 .
구체적으로, 프로세서(130)는 문서 비율 추정 모듈(137)을 이용하여 추정된 가로와 세로 비율을 바탕으로 신경망 모델(135)을 이용하여 획득된 매핑 테이블(250)의 비율을 조정할 수 있다. 예로, 프로세서(130)는 도 4에 도시된 바와 같이, 가로 세로의 비율이 X:Y인 매핑 테이블(250)의 비율을 문서 비율 추정 모듈(137)을 이용하여 추정된 가로와 세로 비율인 X':Y'로 조정하여 비율이 조정된 매핑 테이블(410)을 획득할 수 있다.Specifically, the processor 130 may adjust the ratio of the mapping table 250 obtained using the neural network model 135 based on the horizontal and vertical ratio estimated using the document ratio estimation module 137 . For example, as shown in FIG. 4 , the processor 130 sets the ratio of the mapping table 250 in which the aspect ratio is X:Y to X, which is the aspect ratio estimated using the document ratio estimation module 137 . It is possible to obtain the mapping table 410 in which the ratio is adjusted by adjusting it to ':Y'.
그리고, 프로세서(130)는 조정된 매핑 테이블에 포함된 복수의 포인트 각각에 이미지에 포함된 문서의 픽셀값을 매핑시켜 문서(420)를 복원할 수 있다.In addition, the processor 130 may restore the document 420 by mapping pixel values of the document included in the image to each of the plurality of points included in the adjusted mapping table.
상술한 바와 같이, 문서의 원 모양을 추정하여 문서를 복원함으로써, 전자 장치(100)는 모양이 변형된 문서를 실제와 가깝게 더욱 정확한 비율로 복원할 수 있게 된다. 구체적으로, 도 5의 좌측에 표시된 바와 같이, 모양이 변형된 명함(510)을 복원할 때 기존 방법을 이용하면, 도 5의 중앙에 표시된 바와 같이, 가로/세로 비율이 원 가로/세로 비율이 아닌 바운딩 박스의 가로/세로 비율에 대응되도록 복원하기 때문에 실제가 아닌 왜곡된 모양으로 명함(520)이 복원될 수 있다. 그러나, 도 5의 좌측에 표시된 바와 같이, 모양이 변형된 명함(510)을 복원할 때 본 개시의 일 실시예에 따른 방법을 이용하면, 도 5의 우측에 표시된 바와 같이, 가로/세로 비율이 원 가로/세로 비율에 가까운 모양을 가지는 명함(530)으로 복원될 수 있다.As described above, by reconstructing the document by estimating the original shape of the document, the electronic device 100 may reconstruct the deformed document at a more accurate ratio close to the actual shape. Specifically, as shown on the left side of FIG. 5 , when the existing method is used to restore the business card 510 with a deformed shape, as shown in the center of FIG. 5 , the horizontal/vertical ratio is the original horizontal/vertical ratio. Since it is restored to correspond to the horizontal/vertical ratio of the bounding box, the business card 520 may be restored in a distorted shape that is not real. However, as shown on the left side of FIG. 5 , when the method according to an embodiment of the present disclosure is used to restore the business card 510 with a deformed shape, as shown on the right side of FIG. 5 , the horizontal/vertical ratio is It may be restored to the business card 530 having a shape close to the original horizontal/vertical ratio.
도 6은 본 개시의 일 실시예에 따른, 전자 장치의 제어 방법을 설명하기 위한 흐름도이다.6 is a flowchart illustrating a method of controlling an electronic device according to an embodiment of the present disclosure.
우선, 전자 장치(100)는 모양이 변형된 문서르 포함하는 이미지를 획득할 수 있다(S610). 이때, 전자 장치(100)는 카메라(110)를 통해 이미지를 획득할 수 있으나, 이는 일 실시예에 불과할 뿐, 외부로부터 이미지를 수신할 수 있다.First, the electronic device 100 may acquire an image including a document with a deformed shape ( S610 ). In this case, the electronic device 100 may acquire an image through the camera 110 , but this is only an example and may receive an image from the outside.
전자 장치(100)는 이미지에 대한 정보를 신경망 모델 중 제1 네트워크에 입력하여 모양이 변형된 문서의 뎁스 정보를 포함하는 3차원 이미지를 획득할 수 있다(S620). 이때, 3차원 이미지는 X,Y 좌표값 뿐만 아니라 뎁스 정보를 포함하는 3차원 좌표값을 포함할 수 있다. 또한, 제1 네트워크는 모양이 변형된 문서에 대한 학습 이미지 및 학습 이미지를 뎁스 카메라로 촬영하여 획득된 3차원 이미지 각각을 입력 데이터 및 출력 데이터로 이용하여 학습될 수 있다.The electronic device 100 may obtain a three-dimensional image including depth information of a document whose shape is deformed by inputting information about the image into a first network among the neural network models ( S620 ). In this case, the 3D image may include 3D coordinate values including depth information as well as X and Y coordinate values. Also, the first network may be learned by using, as input data and output data, each of the three-dimensional image obtained by photographing the training image and the training image of the document having a deformed shape with a depth camera.
전자 장치(100)는 3차원 이미지를 신경망 모델 중 제2 네트워크에 입력하여 매핑 테이블을 획득할 수 있다(S630). 이때, 매핑 테이블은 이미지 내에 포함된 모양이 변형된 문서의 픽셀과 문서의 모양이 복원된 결과 이미지의 픽셀 간의 위치 연관성을 나타내는 테이블로서, 이미지의 비율 또는 이미지 중 모양이 변형된 문서를 포함하는 직사각형 형태의 바운딩 박스의 비율에 대응될 수 있다. 한편, 제2 네트워크는 뎁스 카메라로 촬영하여 획득된 3차원 이미지 및 학습 이미지에 대응되는 매핑 테이블 각각을 입력 데이터 및 출력 데이터로 이용하여 학습될 수 있다.The electronic device 100 may obtain a mapping table by inputting a 3D image to a second network among the neural network models ( S630 ). In this case, the mapping table is a table indicating the positional correlation between the pixels of the document whose shape included in the image is deformed and the pixels of the result image in which the shape of the document is restored. It may correspond to the proportion of the bounding box of the shape. Meanwhile, the second network may be learned by using, as input data and output data, a mapping table corresponding to a three-dimensional image obtained by photographing with a depth camera and a learning image, respectively.
전자 장치(100)는 매핑 테이블에 매핑된 픽셀들의 3차원 위치 정보를 바탕으로 문서의 가로와 세로 비율을 추정할 수 있다(S640). 구체적으로, 전자 장치(100)는 매핑 테이블의 가로축에 포함된 포인트 각각에 매핑되는 3차원 이미지의 픽셀의 3차원 좌표값과 이전 포인트에 매핑된 픽셀의 3차원 좌표값과의 차이를 더해 가로 길이를 추정하고, 매핑 테이블의 세로축에 포함된 포인트 각각에 매핑되는 3차원 이미지의 픽셀의 3차원 좌표값과 이전 포인트에 매핑된 픽셀의 3차원 좌표값과의 차이를 더해 세로 길이를 추정할 수 있다.The electronic device 100 may estimate the horizontal to vertical ratio of the document based on the 3D position information of pixels mapped to the mapping table ( S640 ). Specifically, the electronic device 100 adds the difference between the 3D coordinate value of the pixel of the 3D image mapped to each point included in the horizontal axis of the mapping table and the 3D coordinate value of the pixel mapped to the previous point to obtain a horizontal length , and the vertical length can be estimated by adding the difference between the 3D coordinate value of the pixel of the 3D image mapped to each point included in the vertical axis of the mapping table and the 3D coordinate value of the pixel mapped to the previous point. .
전자 장치(100)는 추정된 가로와 세로 비율로 매핑 테이블의 비율을 조정할 수 있다(S650). 즉, 전자 장치(100)는 문서의 원 가로와 세로 비율에 가깝도록 매핑 테이블의 비율을 조정할 수 있다.The electronic device 100 may adjust the ratio of the mapping table to the estimated horizontal and vertical ratio (S650). That is, the electronic device 100 may adjust the ratio of the mapping table to be close to the original horizontal and vertical ratio of the document.
전자 장치(100)는 조정된 매핑 테이블을 바탕으로 문서를 복원할 수 있다(S660). 구체적으로, 전자 장치(100)는 조정된 매핑 테이블에 포함된 복수의 포인트 각각에 이미지에 포함된 문서의 픽셀을 매핑시켜 문서를 복원할 수 있다.The electronic device 100 may restore the document based on the adjusted mapping table (S660). Specifically, the electronic device 100 may restore the document by mapping pixels of the document included in the image to each of the plurality of points included in the adjusted mapping table.
도 7은 본 개시의 일 실시예에 따른, 전자 장치의 하드웨어 구성을 보다 상세하게 나타내는 블록도이다. 도 7에 도시된 바와 같이, 본 개시에 따른 전자 장치(700)는 디스플레이(710), 스피커(720), 카메라(730), 메모리(740), 통신 인터페이스(750), 입력 인터페이스(760), 센서(770) 및 프로세서(780)를 포함할 수 있다. 그러나, 이와 같은 구성은 예시적인 것으로서, 본 개시를 실시함에 있어 이와 같은 구성에 더하여 새로운 구성이 추가되거나 일부 구성이 생략될 수 있음을 물론이다. 한편, 카메라(730), 메모리(740) 및 프로세서(780)는 도 1에서 설명한 카메라(110), 메모리(120) 및 프로세서(130)와 동일한 구성이므로, 중복되는 설명은 생략한다.7 is a block diagram illustrating in more detail a hardware configuration of an electronic device according to an embodiment of the present disclosure. 7 , the electronic device 700 according to the present disclosure includes a display 710 , a speaker 720 , a camera 730 , a memory 740 , a communication interface 750 , an input interface 760 , It may include a sensor 770 and a processor 780 . However, such a configuration is an example, and it goes without saying that a new configuration may be added or some configuration may be omitted in addition to such a configuration in carrying out the present disclosure. Meanwhile, the camera 730 , the memory 740 , and the processor 780 have the same configuration as the camera 110 , the memory 120 , and the processor 130 described with reference to FIG. 1 , and thus overlapping descriptions will be omitted.
디스플레이(710)는 카메라(730)를 통해 촬영된 영상을 디스플레이할 수 있다. 또한, 디스플레이(710)는 촬된 영상 내에 모양이 변형된 문서를 둘러싸는 바운딩 박스를 디스플레이할 수 있다. 또한, 디스플레이(710)는 문서의 모양을 복원하기 위한 사용자 명령을 입력받기 위한 UI를 디스플레이할 수 있다.The display 710 may display an image captured by the camera 730 . Also, the display 710 may display a bounding box surrounding a document whose shape is deformed in the captured image. Also, the display 710 may display a UI for receiving a user command for restoring the shape of the document.
한편, 디스플레이(710)는 LCD(Liquid Crystal Display Panel), OLED(Organic Light Emitting Diodes) 등으로 구현될 수 있으며, 또한 디스플레이(710)는 경우에 따라 플렉서블 디스플레이, 투명 디스플레이 등으로 구현되는 것도 가능하다. 다만, 본 개시에 따른 디스플레이(710)가 특정한 종류에 한정되는 것은 아니다.On the other hand, the display 710 may be implemented as a liquid crystal display panel (LCD), organic light emitting diodes (OLED), etc., and the display 710 may be implemented as a flexible display, a transparent display, etc. in some cases. . However, the display 710 according to the present disclosure is not limited to a specific type.
스피커(720)는 음성 메시지를 출력할 수 있다. 특히, 스피커(720)는 전자 장치(700) 내부에 포함될 수 있으나, 이는 일 실시예에 불과할 뿐, 전자 장치(700)와 전기적으로 연결되어 외부에 위치할 수 있다. 이때, 스피커(720)는 촬영된 영상 내에 포함된 문서의 모양이 복원되었음을 안내하는 음성 메시지를 출력할 수 있다.The speaker 720 may output a voice message. In particular, the speaker 720 may be included in the electronic device 700 , but this is only an exemplary embodiment, and may be electrically connected to the electronic device 700 and located outside. In this case, the speaker 720 may output a voice message guiding that the shape of the document included in the captured image is restored.
통신 인터페이스(750)는 회로를 포함하며, 외부 장치와의 통신을 수행할 수 있다. 구체적으로, 프로세서(780)는 통신 인터페이스(750)를 통해 연결된 외부 장치로부터 각종 데이터 또는 정보를 수신할 수 있으며, 외부 장치로 각종 데이터 또는 정보를 전송할 수도 있다.The communication interface 750 includes a circuit and may communicate with an external device. Specifically, the processor 780 may receive various data or information from an external device connected through the communication interface 750 , and may transmit various data or information to the external device.
통신 인터페이스(750)는 WiFi 모듈, Bluetooth 모듈, 무선 통신 모듈, 및 NFC 모듈 중 적어도 하나를 포함할 수 있다. 구체적으로, WiFi 모듈과 Bluetooth 모듈 각각은 WiFi 방식, Bluetooth 방식으로 통신을 수행할 수 있다. WiFi 모듈이나 Bluetooth 모듈을 이용하는 경우에는 SSID 등과 같은 각종 연결 정보를 먼저 송수신하여, 이를 이용하여 통신 연결한 후 각종 정보들을 송수신할 수 있다. The communication interface 750 may include at least one of a WiFi module, a Bluetooth module, a wireless communication module, and an NFC module. Specifically, each of the WiFi module and the Bluetooth module may perform communication using a WiFi method and a Bluetooth method. In the case of using a WiFi module or a Bluetooth module, various types of connection information such as an SSID may be first transmitted and received, and various types of information may be transmitted and received after communication connection using this.
또한, 무선 통신 모듈은 IEEE, Zigbee, 3G(3rd Generation), 3GPP(3rd Generation Partnership Project), LTE(Long Term Evolution), 5G(5th Generation) 등과 같은 다양한 통신 규격에 따라 통신을 수행할 수 있다. 그리고, NFC 모듈은 135kHz, 13.56MHz, 433MHz, 860~960MHz, 2.45GHz 등과 같은 다양한 RF-ID 주파수 대역들 중에서 13.56MHz 대역을 사용하는 NFC(Near Field Communication) 방식으로 통신을 수행할 수 있다.In addition, the wireless communication module may perform communication according to various communication standards such as IEEE, Zigbee, 3rd Generation (3G), 3rd Generation Partnership Project (3GPP), Long Term Evolution (LTE), 5th Generation (5G), and the like. In addition, the NFC module may perform communication using a Near Field Communication (NFC) method using a 13.56 MHz band among various RF-ID frequency bands such as 135 kHz, 13.56 MHz, 433 MHz, 860 to 960 MHz, and 2.45 GHz.
특히, 본 개시에 따른 다양한 실시 예에 있어서, 통신 인터페이스(750)는 신경망 모델(135)에 관련된 데이터 등과 같은 다양한 종류의 정보를 외부 장치로부터 수신할 수 있다. 또한, 통신 인터페이스(750)는 외부 단말이나 서버로부터 모양이 변형된 문서를 포함하는 이미지를 수신할 수 있다.In particular, according to various embodiments of the present disclosure, the communication interface 750 may receive various types of information, such as data related to the neural network model 135 , from an external device. In addition, the communication interface 750 may receive an image including a document with a deformed shape from an external terminal or server.
입력 인터페이스(760)는 회로를 포함하며, 프로세서(780)는 입력 인터페이스(760)를 통해 전자 장치(700)의 동작을 제어하기 위한 사용자 명령을 수신할 수 있다. 구체적으로, 입력 인터페이스(760)는 터치 스크린으로서 디스플레이(710)에 포함된 형태로 구현될 수 있으나, 이는 일 실시예에 불과한 뿐, 버튼, 마이크 및 리모컨 신호 수신부(미도시) 등과 같은 구성으로 이루어 질 수 있다. The input interface 760 includes a circuit, and the processor 780 may receive a user command for controlling the operation of the electronic device 700 through the input interface 760 . Specifically, the input interface 760 may be implemented in a form included in the display 710 as a touch screen, but this is only an exemplary embodiment, and is composed of a button, a microphone, and a remote control signal receiver (not shown). can get
특히, 본 개시에 따른 다양한 실시 예에 있어서, 입력 인터페이스(760)는 카메라 어플리케이션을 실행하기 위한 사용자 명령, 영상을 촬영하기 위한 사용자 명령, UI를 통해 문서의 모양을 복원하기 위한 사용자 명령 등과 같은 다양한 사용자 명령을 입력받을 수 있다. In particular, in various embodiments according to the present disclosure, the input interface 760 provides various functions such as a user command for executing a camera application, a user command for taking an image, a user command for restoring the shape of a document through the UI, and the like. User commands can be input.
센서(770)는 전자 장치(700)와 관련된 다양한 정보를 획득할 수 있다. 특히, 센서(770)는 전자 장치(700)의 위치 정보를 획득할 수 있는 GPS를 포함할 수 있으며, 전자 장치(700)를 사용하는 사용자의 생체 정보를 획득하기 위한 생체 센서(예로, 심박수 센서, PPG 센서 등), 전자 장치(700)의 움직임을 감지하기 위한 움직임 센서 등과 같은 다양한 센서를 포함할 수 있다.The sensor 770 may acquire various information related to the electronic device 700 . In particular, the sensor 770 may include a GPS capable of acquiring location information of the electronic device 700 , and a biometric sensor (eg, a heart rate sensor) for acquiring biometric information of a user using the electronic device 700 . , PPG sensor, etc.) and various sensors such as a motion sensor for detecting a motion of the electronic device 700 .
한편, 이상에서 상술한 바와 같은 신경망 모델에 관련된 기능은 메모리 및 프로세서를 통해 수행될 수 있다. 프로세서는 하나 또는 복수의 프로세서로 구성될 수 있다. 이때, 하나 또는 복수의 프로세서는 CPU, AP 등과 같은 범용 프로세서, GPU. VPU 등과 같은 그래픽 전용 프로세서 또는 NPU와 같은 인공 지능 전용 프로세서일 수 있다. 하나 또는 복수의 프로세서는, 비휘발성 메모리 및 휘발성 메모리에 저장된 기 정의된 동작 규칙 또는 인공 지능 모델에 따라, 입력 데이터를 처리하도록 제어한다. 기 정의된 동작 규칙 또는 인공 지능 모델은 학습을 통해 만들어진 것을 특징으로 한다. Meanwhile, the functions related to the neural network model as described above may be performed through a memory and a processor. The processor may consist of one or a plurality of processors. In this case, one or a plurality of processors are general-purpose processors such as CPUs and APs, GPUs. It may be a graphics-only processor, such as a VPU, or an artificial intelligence-only processor, such as an NPU. One or more processors control to process input data according to a predefined operation rule or artificial intelligence model stored in the non-volatile memory and the volatile memory. The predefined action rule or artificial intelligence model is characterized in that it is created through learning.
여기서, 학습을 통해 만들어진다는 것은, 다수의 학습 데이터들에 학습 알고리즘을 적용함으로써, 원하는 특성의 기 정의된 동작 규칙 또는 인공 지능 모델이 만들어짐을 의미한다. 이러한 학습은 본 개시에 따른 인공 지능이 수행되는 기기 자체에서 이루어질 수도 있고, 별도의 서버/시스템을 통해 이루어 질 수도 있다. Here, being made through learning means that a predefined operation rule or artificial intelligence model of a desired characteristic is created by applying a learning algorithm to a plurality of learning data. Such learning may be performed in the device itself on which artificial intelligence according to the present disclosure is performed, or may be performed through a separate server/system.
신경망 모델(또는 인공 지능 모델)은, 복수의 신경망 레이어들로 구성될 수 있다. 각 레이어는 복수의 가중치(weight values)을 갖고 있으며, 이전(previous) 레이어의 연산 결과와 복수의 가중치의 연산을 통해 레이어의 연산을 수행한다. 신경망의 예로는, CNN (Convolutional Neural Network), DNN (Deep Neural Network), RNN (Recurrent Neural Network), RBM (Restricted Boltzmann Machine), DBN (Deep Belief Network), BRDNN(Bidirectional Recurrent Deep Neural Network), GAN(Generative Adversarial Networks) 및 심층 Q-네트워크 (Deep Q-Networks)이 있으며, 본 개시에서의 신경망은 명시한 경우를 제외하고 전술한 예에 한정되지 않는다.A neural network model (or artificial intelligence model) may be composed of a plurality of neural network layers. Each layer has a plurality of weight values, and the layer operation is performed through the operation of the previous layer and the operation of the plurality of weights. Examples of neural networks include Convolutional Neural Network (CNN), Deep Neural Network (DNN), Recurrent Neural Network (RNN), Restricted Boltzmann Machine (RBM), Deep Belief Network (DBN), Bidirectional Recurrent Deep Neural Network (BRDNN), GAN. There are Generative Adversarial Networks and Deep Q-Networks, and the neural network in the present disclosure is not limited to the above-described examples, except as otherwise specified.
학습 알고리즘은, 다수의 학습 데이터들을 이용하여 소정의 대상 기기(예컨대, 로봇)을 훈련시켜 소정의 대상 기기 스스로 결정을 내리거나 예측을 할 수 있도록 하는 방법이다. 학습 알고리즘의 예로는, 지도형 학습(supervised learning), 비지도형 학습(unsupervised learning), 준지도형 학습(semi-supervised learning) 또는 강화 학습(reinforcement learning)이 있으며, 본 개시에서의 학습 알고리즘은 명시한 경우를 제외하고 전술한 예에 한정되지 않는다.The learning algorithm is a method of training a predetermined target device (eg, a robot) using a plurality of learning data so that the predetermined target device can make a decision or make a prediction by itself. Examples of the learning algorithm include supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, and the learning algorithm in the present disclosure is specified when It is not limited to the above example except for.
기기로 읽을 수 있는 저장매체는, 비일시적(non-transitory) 저장매체의 형태로 제공될 수 있다. 여기서, '비일시적 저장매체'는 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다. 예로, '비일시적 저장매체'는 데이터가 임시적으로 저장되는 버퍼를 포함할 수 있다.The device-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-transitory storage medium' is a tangible device and only means that it does not contain a signal (eg, electromagnetic wave). It does not distinguish the case where it is stored as For example, the 'non-transitory storage medium' may include a buffer in which data is temporarily stored.
일 실시 예에 따르면, 본 문서에 개시된 다양한 실시 예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory (CD-ROM))의 형태로 배포되거나, 또는 어플리케이션 스토어(예: 플레이 스토어TM)를 통해 또는 두개의 사용자 장치들(예: 스마트폰들) 간에 직접, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품(예: 다운로더블 앱(downloadable app))의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.According to an embodiment, the method according to various embodiments disclosed in this document may be provided by being included in a computer program product. Computer program products may be traded between sellers and buyers as commodities. The computer program product is distributed in the form of a device-readable storage medium (eg compact disc read only memory (CD-ROM)), or through an application store (eg Play Store™) or on two user devices (eg, It can be distributed (eg downloaded or uploaded) directly or online between smartphones (eg: smartphones). In the case of online distribution, at least a portion of the computer program product (eg, a downloadable app) is stored at least on a machine-readable storage medium, such as a memory of a manufacturer's server, a server of an application store, or a relay server. It may be temporarily stored or temporarily created.
이상에서 상술한 바와 같은 본 개시의 다양한 실시 예들에 따른 구성 요소(예: 모듈 또는 프로그램) 각각은 단수 또는 복수의 개체로 구성될 수 있으며, 전술한 해당 서브 구성 요소들 중 일부 서브 구성 요소가 생략되거나, 또는 다른 서브 구성 요소가 다양한 실시 예에 더 포함될 수 있다. 대체적으로 또는 추가적으로, 일부 구성 요소들(예: 모듈 또는 프로그램)은 하나의 개체로 통합되어, 통합되기 이전의 각각의 해당 구성 요소에 의해 수행되는 기능을 동일 또는 유사하게 수행할 수 있다. As described above, each of the components (eg, a module or a program) according to various embodiments of the present disclosure may be composed of a singular or a plurality of entities, and some of the above-described corresponding sub-components are omitted. Alternatively, other sub-components may be further included in various embodiments. Alternatively or additionally, some components (eg, a module or a program) may be integrated into a single entity to perform the same or similar functions performed by each corresponding component prior to integration.
다양한 실시 예들에 따른, 모듈, 프로그램 또는 다른 구성 요소에 의해 수행되는 동작들은 순차적, 병렬적, 반복적 또는 휴리스틱하게 실행되거나, 적어도 일부 동작이 다른 순서로 실행되거나, 생략되거나, 또는 다른 동작이 추가될 수 있다.According to various embodiments, operations performed by a module, program, or other component may be sequentially, parallel, repetitively or heuristically executed, or at least some operations may be executed in a different order, omitted, or other operations may be added. can
한편, 본 개시에서 사용된 용어 "부" 또는 "모듈"은 하드웨어, 소프트웨어 또는 펌웨어로 구성된 유닛을 포함하며, 예를 들면, 로직, 논리 블록, 부품, 또는 회로 등의 용어와 상호 호환적으로 사용될 수 있다. "부" 또는 "모듈"은, 일체로 구성된 부품 또는 하나 또는 그 이상의 기능을 수행하는 최소 단위 또는 그 일부가 될 수 있다. 예를 들면, 모듈은 ASIC(application-specific integrated circuit)으로 구성될 수 있다.Meanwhile, the term “unit” or “module” used in the present disclosure includes a unit composed of hardware, software, or firmware, and may be used interchangeably with terms such as, for example, logic, logic block, part, or circuit. can A “unit” or “module” may be an integrally formed component or a minimum unit or a part of performing one or more functions. For example, the module may be configured as an application-specific integrated circuit (ASIC).
본 개시의 다양한 실시 예들은 기기(machine)(예: 컴퓨터)로 읽을 수 있는 저장 매체(machine-readable storage media에 저장된 명령어를 포함하는 소프트웨어로 구현될 수 있다. 기기는 저장 매체로부터 저장된 명령어를 호출하고, 호출된 명령어에 따라 동작이 가능한 장치로서, 개시된 실시 예들에 따른 전자 장치(예: 전자 장치(100))를 포함할 수 있다. Various embodiments of the present disclosure may be implemented as software including instructions stored in a machine-readable storage medium readable by a machine (eg, a computer). The device calls the stored instructions from the storage medium. and, as a device capable of operating according to the called command, the electronic device (eg, the electronic device 100) according to the disclosed embodiments may be included.
상기 명령이 프로세서에 의해 실행될 경우, 프로세서가 직접 또는 상기 프로세서의 제어 하에 다른 구성요소들을 이용하여 상기 명령에 해당하는 기능을 수행할 수 있다. 명령은 컴파일러 또는 인터프리터에 의해 생성 또는 실행되는 코드를 포함할 수 있다. When the instruction is executed by the processor, the processor may perform a function corresponding to the instruction by using other components directly or under the control of the processor. Instructions may include code generated or executed by a compiler or interpreter.
이상에서는 본 개시의 바람직한 실시 예에 대하여 도시하고 설명하였지만, 본 개시는 상술한 특정의 실시 예에 한정되지 아니하며, 청구범위에서 청구하는 본 개시의 요지를 벗어남이 없이 당해 개시가 속하는 기술분야에서 통상의 지식을 가진 자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 개시의 기술적 사상이나 전망으로부터 개별적으로 이해되어서는 안 될 것이다.In the above, preferred embodiments of the present disclosure have been illustrated and described, but the present disclosure is not limited to the specific embodiments described above, and it is common in the technical field to which the disclosure pertains without departing from the gist of the disclosure as claimed in the claims. Various modifications may be made by those having the knowledge of

Claims (12)

  1. 전자 장치의 제어 방법에 있어서,A method for controlling an electronic device, comprising:
    모양이 변형된 문서를 포함하는 이미지를 획득하는 단계;acquiring an image including a document whose shape is deformed;
    상기 획득된 이미지를 학습된 신경망 모델에 입력하여 상기 이미지 내에 포함된 모양이 변형된 문서의 픽셀과 상기 문서의 모양이 복원된 결과 이미지의 픽셀 간의 위치 연관성을 나타내는 매핑 테이블을 획득하는 단계;inputting the obtained image into a trained neural network model to obtain a mapping table indicating a positional association between pixels of a document whose shape is deformed included in the image and pixels of a result image of which the shape of the document is restored;
    상기 매핑 테이블에 매핑된 픽셀들의 위치 정보를 바탕으로 상기 문서의 가로와 세로 비율을 추정하는 단계;estimating a horizontal/vertical ratio of the document based on location information of pixels mapped to the mapping table;
    상기 추정된 가로와 세로 비율로 상기 매핑 테이블의 비율을 조정하는 단계; 및adjusting a ratio of the mapping table to the estimated horizontal and vertical ratio; and
    상기 조정된 매핑 테이블을 바탕으로 문서를 복원하는 단계;를 포함하는 제어 방법.and restoring a document based on the adjusted mapping table.
  2. 제1항에 있어서,According to claim 1,
    상기 매핑 테이블을 획득하는 단계는,Obtaining the mapping table comprises:
    상기 이미지에 대한 정보를 상기 신경망 모델 중 제1 네트워크에 입력하여 상기 모양이 변형된 문서의 뎁스 정보를 포함하는 3차원 이미지를 획득하고,Obtaining a three-dimensional image including depth information of the document whose shape is deformed by inputting the information on the image into a first network of the neural network model,
    상기 3차원 이미지를 상기 신경망 모델 중 제2 네트워크에 입력하여 상기 매핑 테이블을 획득하는 제어 방법.A control method for obtaining the mapping table by inputting the three-dimensional image to a second network among the neural network models.
  3. 제2항에 있어서,3. The method of claim 2,
    상기 추정하는 단계는,The estimating step is
    상기 매핑 테이블의 가로축에 포함된 포인트 각각에 매핑되는 상기 3차원 이미지의 픽셀의 3차원 좌표값과 이전 포인트에 매핑된 픽셀의 3차원 좌표값과의 차이를 더해 상기 가로 길이를 추정하고,The horizontal length is estimated by adding the difference between the 3D coordinate value of the pixel of the 3D image mapped to each point included in the horizontal axis of the mapping table and the 3D coordinate value of the pixel mapped to the previous point,
    상기 매핑 테이블의 세로축에 포함된 포인트 각각에 매핑되는 상기 3차원 이미지의 픽셀의 3차원 좌표값과 이전 포인트에 매핑된 픽셀의 3차원 좌표값과의 차이를 더해 상기 세로 길이를 추정하는 제어 방법.A control method for estimating the vertical length by adding a difference between a 3D coordinate value of a pixel of the 3D image mapped to each point included in the vertical axis of the mapping table and a 3D coordinate value of a pixel mapped to a previous point.
  4. 제2항에 있어서,3. The method of claim 2,
    상기 제1 네트워크는,The first network,
    모양이 변형된 문서에 대한 학습 이미지 및 상기 학습 이미지를 뎁스 카메라로 촬영하여 획득된 3차원 이미지 각각을 입력 데이터 및 출력 데이터로 이용하여 학습되며,It is learned by using each of the three-dimensional image obtained by photographing the learning image and the learning image with a depth camera as input data and output data for a document with a deformed shape,
    상기 제2 네트워크는,The second network,
    상기 뎁스 카메라로 촬영하여 획득된 3차원 이미지 및 상기 학습 이미지에 대응되는 매핑 테이블 각각을 입력 데이터 및 출력 데이터로 이용하여 학습되는 제어 방법.A control method in which a 3D image obtained by photographing with the depth camera and a mapping table corresponding to the learning image are respectively used as input data and output data are learned.
  5. 제1항에 있어서,According to claim 1,
    상기 매핑 테이블의 비율은 상기 이미지의 비율 또는 상기 이미지 중 모양이 변형된 문서를 포함하는 직사각형 형태의 바운딩 박스의 비율에 대응되는 제어 방법.The ratio of the mapping table corresponds to a ratio of the image or a ratio of a rectangular bounding box including a document with a deformed shape among the images.
  6. 제1항에 있어서,According to claim 1,
    상기 복원하는 단계는,The restoration step is
    상기 조정된 매핑 테이블에 포함된 복수의 포인트 각각에 상기 이미지에 포함된 문서의 픽셀을 매핑시켜 상기 문서를 복원하는 제어 방법.A control method for restoring the document by mapping pixels of the document included in the image to each of a plurality of points included in the adjusted mapping table.
  7. 전자 장치에 있어서,In an electronic device,
    카메라;camera;
    적어도 하나의 인스트럭션을 포함하는 메모리; 및a memory including at least one instruction; and
    프로세서;를 포함하며, processor; including;
    상기 프로세서는, 상기 적어도 하나의 인스트럭션을 실행하여,The processor, by executing the at least one instruction,
    상기 카메라를 통해 모양이 변형된 문서를 포함하는 이미지를 획득하고,Obtaining an image including a document whose shape is deformed through the camera,
    상기 획득된 이미지를 학습된 신경망 모델에 입력하여 상기 이미지 내에 포함된 모양이 변형된 문서의 픽셀과 상기 문서의 모양이 복원된 결과 이미지의 픽셀 간의 위치 연관성을 나타내는 매핑 테이블을 획득하며, By inputting the obtained image into the learned neural network model, a mapping table indicating the positional association between the pixel of the document whose shape included in the image is deformed and the pixel of the result image in which the shape of the document is restored is obtained,
    상기 매핑 테이블에 매핑된 픽셀들의 위치 정보를 바탕으로 상기 문서의 가로와 세로 비율을 추정하여 상기 추정된 가로와 세로 비율로 상기 매핑 테이블의 비율을 조정하며,adjusting the ratio of the mapping table to the estimated horizontal and vertical ratio by estimating a horizontal and vertical ratio of the document based on location information of pixels mapped to the mapping table;
    상기 조정된 매핑 테이블을 바탕으로 문서를 복원하는 전자 장치.An electronic device for restoring a document based on the adjusted mapping table.
  8. 제7항에 있어서,8. The method of claim 7,
    상기 프로세서는,The processor is
    상기 이미지에 대한 정보를 상기 신경망 모델 중 제1 네트워크에 입력하여 상기 모양이 변형된 문서의 뎁스 정보를 포함하는 3차원 이미지를 획득하고,Obtaining a three-dimensional image including depth information of the document whose shape is deformed by inputting the information on the image into a first network of the neural network model,
    상기 3차원 이미지를 상기 신경망 모델 중 제2 네트워크에 입력하여 상기 매핑 테이블을 획득하는 전자 장치.The electronic device obtains the mapping table by inputting the 3D image to a second network among the neural network models.
  9. 제8항에 있어서,9. The method of claim 8,
    상기 프로세서는,The processor is
    상기 매핑 테이블의 가로축에 포함된 포인트 각각에 매핑되는 상기 3차원 이미지의 픽셀의 3차원 좌표값과 이전 포인트에 매핑된 픽셀의 3차원 좌표값과의 차이를 더해 상기 가로 길이를 추정하고,The horizontal length is estimated by adding the difference between the 3D coordinate value of the pixel of the 3D image mapped to each point included in the horizontal axis of the mapping table and the 3D coordinate value of the pixel mapped to the previous point,
    상기 매핑 테이블의 세로축에 포함된 포인트 각각에 매핑되는 상기 3차원 이미지의 픽셀의 3차원 좌표값과 이전 포인트에 매핑된 픽셀의 3차원 좌표값과의 차이를 더해 상기 세로 길이를 추정하는 전자 장치.An electronic device for estimating the vertical length by adding a difference between a 3D coordinate value of a pixel of the 3D image mapped to each point included in the vertical axis of the mapping table and a 3D coordinate value of a pixel mapped to a previous point.
  10. 제8항에 있어서,9. The method of claim 8,
    상기 제1 네트워크는,The first network,
    모양이 변형된 문서에 대한 학습 이미지 및 상기 학습 이미지를 뎁스 카메라로 촬영하여 획득된 3차원 이미지 각각을 입력 데이터 및 출력 데이터로 이용하여 학습되며,It is learned by using each of the three-dimensional image obtained by photographing the learning image for a document with a deformed shape and the learning image with a depth camera as input data and output data,
    상기 제2 네트워크는,The second network,
    상기 뎁스 카메라로 촬영하여 획득된 3차원 이미지 및 상기 학습 이미지에 대응되는 매핑 테이블 각각을 입력 데이터 및 출력 데이터로 이용하여 학습되는 전자 장치.An electronic device that is learned by using each of the mapping table corresponding to the three-dimensional image obtained by photographing with the depth camera and the learning image as input data and output data.
  11. 제7항에 있어서,8. The method of claim 7,
    상기 매핑 테이블의 비율은 상기 이미지의 비율 또는 상기 이미지 중 모양이 변형된 문서를 포함하는 직사각형 형태의 바운딩 박스의 비율에 대응되는 전자 장치.The ratio of the mapping table corresponds to a ratio of the image or a ratio of a rectangular bounding box including a document with a deformed shape among the images.
  12. 제7항에 있어서,8. The method of claim 7,
    상기 프로세서는,The processor is
    상기 조정된 매핑 테이블에 포함된 복수의 포인트 각각에 상기 이미지에 포함된 문서의 픽셀을 매핑시켜 상기 문서를 복원하는 전자 장치.The electronic device restores the document by mapping pixels of the document included in the image to each of the plurality of points included in the adjusted mapping table.
PCT/KR2021/015233 2020-12-03 2021-10-27 Electronic device and control method therefor WO2022119128A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2020-0167421 2020-12-03
KR1020200167421A KR20220078176A (en) 2020-12-03 2020-12-03 Electronic device and Method for controlling the electronic device thereof

Publications (1)

Publication Number Publication Date
WO2022119128A1 true WO2022119128A1 (en) 2022-06-09

Family

ID=81853179

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2021/015233 WO2022119128A1 (en) 2020-12-03 2021-10-27 Electronic device and control method therefor

Country Status (2)

Country Link
KR (1) KR20220078176A (en)
WO (1) WO2022119128A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090111373A (en) * 2008-04-22 2009-10-27 배종우 Method for generating and rendering 3 dimensional image and apparatus thereof
US20100239165A1 (en) * 2006-03-02 2010-09-23 Compulink Management Center ,Inc. a corporation Model-Based Dewarping Method And Apparatus
KR20150037374A (en) * 2013-09-30 2015-04-08 삼성전자주식회사 Method, apparatus and computer-readable recording medium for converting document image captured by camera to the scanned document image
KR20200020646A (en) * 2018-08-16 2020-02-26 주식회사 날비컴퍼니 Method and storage medium for applying bokeh effect to one or more images
KR102161488B1 (en) * 2020-05-04 2020-10-05 김명전 Apparatus and method for displaying product in 3 dimensions

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100239165A1 (en) * 2006-03-02 2010-09-23 Compulink Management Center ,Inc. a corporation Model-Based Dewarping Method And Apparatus
KR20090111373A (en) * 2008-04-22 2009-10-27 배종우 Method for generating and rendering 3 dimensional image and apparatus thereof
KR20150037374A (en) * 2013-09-30 2015-04-08 삼성전자주식회사 Method, apparatus and computer-readable recording medium for converting document image captured by camera to the scanned document image
KR20200020646A (en) * 2018-08-16 2020-02-26 주식회사 날비컴퍼니 Method and storage medium for applying bokeh effect to one or more images
KR102161488B1 (en) * 2020-05-04 2020-10-05 김명전 Apparatus and method for displaying product in 3 dimensions

Also Published As

Publication number Publication date
KR20220078176A (en) 2022-06-10

Similar Documents

Publication Publication Date Title
EP2991339A2 (en) Photographing method and electronic device
CN108989678B (en) Image processing method and mobile terminal
CN111145192B (en) Image processing method and electronic equipment
CN110070063B (en) Target object motion recognition method and device and electronic equipment
WO2021177784A1 (en) Super-resolution depth map generation for multi-camera or other environments
WO2021101097A1 (en) Multi-task fusion neural network architecture
CN115061770A (en) Method and electronic device for displaying dynamic wallpaper
CN110766610B (en) Reconstruction method of super-resolution image and electronic equipment
CN109981989B (en) Method and device for rendering image, electronic equipment and computer readable storage medium
WO2015102451A1 (en) Image processing method and electronic device implementing the same
KR20150085919A (en) Method for processing image and electronic device thereof
CN110930372B (en) Image processing method, electronic equipment and computer readable storage medium
WO2022119128A1 (en) Electronic device and control method therefor
CN109348212B (en) Image noise determination method and terminal equipment
WO2022098164A1 (en) Electronic device and control method of electronic device
WO2020215854A1 (en) Method and apparatus for rendering image, electronic device, and computer readable storage medium
CN109729264B (en) Image acquisition method and mobile terminal
CN109492451B (en) Coded image identification method and mobile terminal
WO2022086028A1 (en) Electronic device and method for controlling same
CN111353929A (en) Image processing method and device and electronic equipment
CN112633305A (en) Key point marking method and related equipment
CN112308771A (en) Image processing method and device and electronic equipment
WO2022145675A1 (en) Electronic device and controlling method of electronic device
JP2020042528A (en) Object identification system, model learning system, object identification method, model learning method, and program
WO2022027444A1 (en) Event detection method and device, movable platform, and computer-readable storage medium

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: 21900816

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: 21900816

Country of ref document: EP

Kind code of ref document: A1