WO2022030865A1 - 손글씨 정렬 방법 및 장치 - Google Patents

손글씨 정렬 방법 및 장치 Download PDF

Info

Publication number
WO2022030865A1
WO2022030865A1 PCT/KR2021/009787 KR2021009787W WO2022030865A1 WO 2022030865 A1 WO2022030865 A1 WO 2022030865A1 KR 2021009787 W KR2021009787 W KR 2021009787W WO 2022030865 A1 WO2022030865 A1 WO 2022030865A1
Authority
WO
WIPO (PCT)
Prior art keywords
character
processor
line
group
strokes
Prior art date
Application number
PCT/KR2021/009787
Other languages
English (en)
French (fr)
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 삼성전자 주식회사
Priority to EP21853078.0A priority Critical patent/EP4170545A4/en
Publication of WO2022030865A1 publication Critical patent/WO2022030865A1/ko

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/32Digital ink
    • G06V30/333Preprocessing; Feature extraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/017Gesture based interaction, e.g. based on a set of recognized hand gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/038Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry
    • G06F3/0383Signal control means within the pointing device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/10Image acquisition
    • G06V10/17Image acquisition using hand-held instruments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/142Image acquisition using hand-held instruments; Constructional details of the instruments
    • G06V30/1423Image acquisition using hand-held instruments; Constructional details of the instruments the instrument generating sequences of position coordinates corresponding to handwriting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/19Recognition using electronic means
    • G06V30/191Design or setup of recognition systems or techniques; Extraction of features in feature space; Clustering techniques; Blind source separation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/22Character recognition characterised by the type of writing
    • G06V30/226Character recognition characterised by the type of writing of cursive writing
    • G06V30/2268Character recognition characterised by the type of writing of cursive writing using stroke segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/32Digital ink
    • G06V30/333Preprocessing; Feature extraction
    • G06V30/347Sampling; Contour coding; Stroke extraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/32Digital ink
    • G06V30/36Matching; Classification

Definitions

  • the electronic device provides a function that allows a user to take a necessary memo anytime, anywhere without a notebook or pen.
  • a user may write directly on a display (eg, a touch screen) using a hand or an electronic pen.
  • the electronic device may receive a touch trace (or coordinates) of touching (or touching) the display as a handwriting input.
  • a user can conveniently write a memo while feeling analog sensibility by inputting handwriting using an electronic pen like taking notes with a pen.
  • a user can conveniently write handwriting using an electronic device, but if the user is not good at writing, the handwriting may look messy and messy.
  • guidelines eg, horizontal lines or grid marks
  • users may ignore the guidelines and write handwriting.
  • a function for editing eg, rotating, enlarging, or reducing
  • the handwriting may be provided. In this case, it may be inconvenient for the user to individually edit the handwriting as desired.
  • the strokes of the handwriting are analyzed and classified into strokes corresponding to characters and non-character strokes not corresponding to characters, and the strokes classified as characters are classified as characters based on a character alignment method.
  • a method and apparatus for aligning handwriting may be disclosed by aligning handwriting strokes and aligning non-letter-classified strokes based on an alignment parameter of a non-letter-related character.
  • An electronic device includes a display module, a memory, and a processor operatively connected to the display module and the memory, wherein the processor converts handwriting to strokes corresponding to characters and characters Classify into non-character strokes that do not, sort the handwritten strokes classified as characters based on a character alignment method, match a character group associated with the non-character strokes, and based on an alignment parameter applied to the matched character group It may be set to align the handwritten strokes classified as non-characters.
  • An operation method of an electronic device includes an operation of classifying handwriting into strokes corresponding to characters and non-character strokes not corresponding to characters, and the operation of classifying handwriting strokes into characters based on a character alignment method. It may include an operation of aligning, matching a character group associated with the non-character strokes, and aligning the handwritten strokes classified as non-character based on an alignment parameter applied to the matched character group.
  • the handwriting is classified into strokes corresponding to characters and non-character strokes not corresponding to characters, strokes corresponding to characters are aligned based on a character alignment method, and non-characters are classified based on a character alignment parameter.
  • FIG. 1 is a block diagram of an electronic device in a network environment according to various embodiments of the present disclosure
  • FIG. 2 is a diagram illustrating an example of aligning handwriting in an electronic device according to various embodiments of the present disclosure
  • 3A and 3B are flowcharts illustrating a method of aligning handwriting of an electronic device according to various embodiments of the present disclosure
  • FIG. 4 is a flowchart illustrating a method of determining a handwriting gradient of an electronic device according to various embodiments of the present disclosure
  • 5A and 5B are diagrams illustrating an example of determining a handwriting gradient in an electronic device according to various embodiments of the present disclosure
  • FIG. 6 is a flowchart illustrating a method of determining an indentation of an electronic device according to various embodiments of the present disclosure
  • FIG. 7 is a diagram illustrating an example of determining an indentation in an electronic device according to various embodiments of the present disclosure
  • FIG. 8 is a flowchart illustrating a method of determining a row height of an electronic device according to various embodiments of the present disclosure
  • FIGS. 9A and 9B are diagrams illustrating an example of adjusting a string height in an electronic device according to various embodiments of the present disclosure
  • FIG. 10 is a diagram illustrating an example of adjusting a line spacing in an electronic device according to various embodiments of the present disclosure
  • FIG. 11 is a flowchart illustrating a non-text alignment method of an electronic device according to various embodiments of the present disclosure
  • FIG. 12 is a diagram illustrating an example of aligning non-characters in an electronic device according to various embodiments of the present disclosure
  • FIGS. 13A to 13C are diagrams illustrating a user interface for arranging handwriting in an electronic device according to various embodiments of the present disclosure
  • FIGS. 14A and 14B are diagrams illustrating a user interface for setting indentation in an electronic device according to various embodiments of the present disclosure
  • 15A to 15C are diagrams illustrating a user interface for arranging handwriting according to a user gesture in an electronic device according to various embodiments of the present disclosure
  • the electronic device may have various types of devices.
  • the electronic device may include, for example, a portable communication device (eg, a smart phone), a computer device, a portable multimedia device, a portable medical device, a camera, a wearable device, or a home appliance device.
  • a portable communication device eg, a smart phone
  • a computer device e.g., a smart phone
  • a portable multimedia device e.g., a portable medical device
  • a camera e.g., a portable medical device
  • a camera e.g., a portable medical device
  • a camera e.g., a portable medical device
  • a wearable device e.g., a smart bracelet
  • a home appliance device e.g., a home appliance
  • first”, “second”, or “first” or “second” may simply be used to distinguish the component from other components in question, and may refer to components in other aspects (e.g., importance or order) is not limited. It is said that one (eg, first) component is “coupled” or “connected” to another (eg, second) component, with or without the terms “functionally” or “communicatively”. When referenced, it means that one component can be connected to the other component directly (eg by wire), wirelessly, or through a third component.
  • module used in various embodiments of this document may include a unit implemented in hardware, software, or firmware, and is interchangeable with terms such as, for example, logic, logic block, component, or circuit.
  • a module may be an integrally formed part or a minimum unit or a part of the part that performs one or more functions.
  • the module may be implemented in the form of an application-specific integrated circuit (ASIC).
  • ASIC application-specific integrated circuit
  • FIG. 1 is a block diagram of an electronic device 101 in a network environment 100 according to various embodiments of the present disclosure.
  • an electronic device 101 communicates with an electronic device 102 through a first network 198 (eg, a short-range wireless communication network) or a second network 199 . It may communicate with the electronic device 104 or the server 108 through (eg, a long-distance wireless communication network). According to an embodiment, the electronic device 101 may communicate with the electronic device 104 through the server 108 .
  • a first network 198 eg, a short-range wireless communication network
  • a second network 199 e.g., a second network 199 . It may communicate with the electronic device 104 or the server 108 through (eg, a long-distance wireless communication network). According to an embodiment, the electronic device 101 may communicate with the electronic device 104 through the server 108 .
  • the electronic device 101 includes a processor 120 , a memory 130 , an input module 150 , a sound output module 155 , a display module 160 , an audio module 170 , and a sensor module ( 176), interface 177, connection terminal 178, haptic module 179, camera module 180, power management module 188, battery 189, communication module 190, subscriber identification module 196 , or an antenna module 197 may be included.
  • at least one of these components eg, the connection terminal 178
  • may be omitted or one or more other components may be added to the electronic device 101 .
  • some of these components are integrated into one component (eg, display module 160 ). can be
  • the processor 120 for example, executes software (eg, a program 140) to execute at least one other component (eg, a hardware or software component) of the electronic device 101 connected to the processor 120 . It can control and perform various data processing or operations. According to one embodiment, as at least part of data processing or operation, the processor 120 converts commands or data received from other components (eg, the sensor module 176 or the communication module 190 ) to the volatile memory 132 . may be stored in the volatile memory 132 , and may process commands or data stored in the volatile memory 132 , and store the result data in the non-volatile memory 134 .
  • software eg, a program 140
  • the processor 120 converts commands or data received from other components (eg, the sensor module 176 or the communication module 190 ) to the volatile memory 132 .
  • the volatile memory 132 may be stored in the volatile memory 132 , and may process commands or data stored in the volatile memory 132 , and store the result data in the non-volatile memory 134 .
  • the processor 120 is a main processor 121 (eg, a central processing unit (CPU) or an application processor (AP)) or an auxiliary processor capable of operating independently or together with it ( 123) (eg, graphic processing unit (GPU), neural network processing unit (NPU), image signal processor (ISP), sensor hub processor, or communication processor (CP, communication processor)) may be included.
  • main processor 121 eg, a central processing unit (CPU) or an application processor (AP)
  • auxiliary processor capable of operating independently or together with it eg, graphic processing unit (GPU), neural network processing unit (NPU), image signal processor (ISP), sensor hub processor, or communication processor (CP, communication processor)
  • the main processor 121 may use less power than the main processor 121 or may be set to be specialized for a specified function.
  • the auxiliary processor 123 may be implemented separately from or as a part of the main processor 121 .
  • the auxiliary processor 123 is, for example, on behalf of the main processor 121 while the main processor 121 is in an inactive (eg, sleep) state, or the main processor 121 is At least one of the components of the electronic device 101 (eg, the display module 160 , the sensor module 176 , or At least some of functions or states related to the communication module 190 may be controlled.
  • the coprocessor 123 eg, an image signal processor or a communication processor
  • the auxiliary processor 123 may include a hardware structure specialized for processing an artificial intelligence model. Artificial intelligence models can be created through machine learning.
  • Such learning may be performed, for example, in the electronic device 101 itself on which artificial intelligence is performed, or may be performed through a separate server (eg, the server 108).
  • the learning algorithm may include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but in the above example not limited
  • the artificial intelligence model may include a plurality of artificial neural network layers. Artificial neural networks include deep neural networks (DNNs), convolutional neural networks (CNNs), recurrent neural networks (RNNs), restricted boltzmann machines (RBMs), deep belief networks (DBNs), bidirectional recurrent deep neural networks (BRDNNs), It may be one of deep Q-networks or a combination of two or more of the above, but is not limited to the above example.
  • the artificial intelligence model may include, in addition to, or alternatively, a software structure in addition to the hardware structure.
  • the memory 130 may store various data used by at least one component of the electronic device 101 (eg, the processor 120 or the sensor module 176 ).
  • the data may include, for example, input data or output data for software (eg, the program 140 ) and instructions related thereto.
  • the memory 130 may include a volatile memory 132 or a non-volatile memory 134 .
  • the program 140 may be stored as software in the memory 130 , and may include, for example, an operating system (OS) 142 , middleware 144 , or an application 146 . have.
  • OS operating system
  • middleware middleware
  • application application
  • the input module 150 may receive a command or data to be used in a component (eg, the processor 120 ) of the electronic device 101 from the outside (eg, a user) of the electronic device 101 .
  • the input module 150 may include, for example, a microphone, a mouse, a keyboard, a key (eg, a button), or a digital pen (eg, a stylus pen).
  • the sound output module 155 may output a sound signal to the outside of the electronic device 101 .
  • the sound output module 155 may include, for example, a speaker or a receiver.
  • the speaker can be used for general purposes such as multimedia playback or recording playback.
  • the receiver may be used to receive an incoming call. According to one embodiment, the receiver may be implemented separately from or as part of the speaker.
  • the display module 160 may visually provide information to the outside (eg, a user) of the electronic device 101 .
  • the display module 160 may include, for example, a control circuit for controlling a display, a hologram device, or a projector and a corresponding device.
  • the display module 160 may include a touch sensor configured to sense a touch or a pressure sensor configured to measure the intensity of a force generated by the touch.
  • the audio module 170 may convert a sound into an electric signal or, conversely, convert an electric signal into a sound. According to an embodiment, the audio module 170 acquires a sound through the input module 150 or an external electronic device (eg, a sound output module 155 ) directly or wirelessly connected to the electronic device 101 . A sound may be output through the electronic device 102 (eg, a speaker or headphones).
  • an external electronic device eg, a sound output module 155
  • a sound may be output through the electronic device 102 (eg, a speaker or headphones).
  • the sensor module 176 detects an operating state (eg, power or temperature) of the electronic device 101 or an external environmental state (eg, user state), and generates an electrical signal or data value corresponding to the sensed state. can do.
  • the sensor module 176 may include, for example, a gesture sensor, a gyro sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biometric sensor, It may include a temperature sensor, a humidity sensor, or an illuminance sensor.
  • the interface 177 may support one or more designated protocols that may be used by the electronic device 101 to directly or wirelessly connect with an external electronic device (eg, the electronic device 102 ).
  • the interface 177 may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, a secure digital (SD) card interface, or an audio interface.
  • HDMI high definition multimedia interface
  • USB universal serial bus
  • SD secure digital
  • the connection terminal 178 may include a connector through which the electronic device 101 can be physically connected to an external electronic device (eg, the electronic device 102 ).
  • the connection terminal 178 may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (eg, a headphone connector).
  • the haptic module 179 may convert an electrical signal into a mechanical stimulus (eg, vibration or movement) or an electrical stimulus that the user can perceive through tactile or kinesthetic sense.
  • the haptic module 179 may include, for example, a motor, a piezoelectric element, or an electrical stimulation device.
  • the camera module 180 may capture still images and moving images. According to an embodiment, the camera module 180 may include one or more lenses, image sensors, image signal processors, or flashes.
  • the power management module 188 may manage power supplied to the electronic device 101 .
  • the power management module 188 may be implemented as, for example, at least a part of a power management integrated circuit (PMIC).
  • PMIC power management integrated circuit
  • the battery 189 may supply power to at least one component of the electronic device 101 .
  • battery 189 may include, for example, a non-rechargeable primary cell, a rechargeable secondary cell, or a fuel cell.
  • the communication module 190 is a direct (eg, wired) communication channel or a wireless communication channel between the electronic device 101 and an external electronic device (eg, the electronic device 102, the electronic device 104, or the server 108). It can support establishment and communication performance through the established communication channel.
  • the communication module 190 may include one or more communication processors that operate independently of the processor 120 (eg, an application processor) and support direct (eg, wired) communication or wireless communication.
  • the communication module 190 is a wireless communication module 192 (eg, a cellular communication module, a short-range communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module 194 (eg, : It may include a LAN (local area network) communication module, or a power line communication module).
  • GNSS global navigation satellite system
  • a corresponding communication module among these communication modules is a first network 198 (eg, a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network 199 (eg, legacy It may communicate with the external electronic device 104 through a cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (eg, a telecommunication network such as a LAN or a wide area network (WAN)).
  • a first network 198 eg, a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)
  • a second network 199 eg, legacy It may communicate with the external electronic device 104 through a cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (eg, a telecommunication network such as a LAN or a wide area network (WAN)).
  • the wireless communication module 192 uses the subscriber information (eg, International Mobile Subscriber Identifier (IMSI)) stored in the subscriber identification module 196 within a communication network such as the first network 198 or the second network 199 .
  • the electronic device 101 may be identified or authenticated.
  • the wireless communication module 192 may support a 5G network after a 4G network and a next-generation communication technology, for example, a new radio access technology (NR).
  • NR access technology is a high-speed transmission of high-capacity data (eMBB, enhanced mobile broadband), minimization of terminal power and access to multiple terminals (mMTC (massive machine type communications), or high reliability and low latency (URLLC, ultra-reliable and low-latency) communications)
  • the wireless communication module 192 may support a high frequency band (eg, mmWave band) in order to achieve a high data rate, for example.
  • a high frequency band eg, mmWave band
  • the wireless communication module 192 may support Various techniques for securing performance, for example, beamforming, massive multiple-input and multiple-output (MIMO), full dimensional MIMO (FD-MIMO), It may support technologies such as an array antenna, analog beam-forming, or a large scale antenna, etc.
  • the wireless communication module 192 includes the electronic device 101 , an external electronic device ( For example, it may support various requirements stipulated in the electronic device 104) or the network system (eg, the second network 199).
  • the wireless communication module 192 is a Peak for eMBB realization. data rate (e.g. 20 Gbps or more), loss coverage (e.g. 164 dB or less) for realization of mMTC, or U-plane latency (e.g., downlink (DL) and uplink (UL) of 0.5 ms or less for realization of URLLC); or round trip 1ms or less).
  • the antenna module 197 may transmit or receive a signal or power to the outside (eg, an external electronic device).
  • the antenna module 197 may include an antenna including a conductor formed on a substrate (eg, a PCB) or a radiator formed of a conductive pattern.
  • the antenna module 197 may include a plurality of antennas (eg, an array antenna). In this case, at least one antenna suitable for a communication method used in a communication network such as the first network 198 or the second network 199 is connected from the plurality of antennas by, for example, the communication module 190 . can be selected. A signal or power may be transmitted or received between the communication module 190 and an external electronic device through the selected at least one antenna.
  • other components eg, a radio frequency integrated circuit (RFIC)
  • RFIC radio frequency integrated circuit
  • the antenna module 197 may form a mmWave antenna module.
  • the mmWave antenna module comprises a printed circuit board, an RFIC disposed on or adjacent to a first side (eg, bottom side) of the printed circuit board and capable of supporting a designated high frequency band (eg, mmWave band); and a plurality of antennas (eg, an array antenna) disposed on or adjacent to a second side (eg, top or side) of the printed circuit board and capable of transmitting or receiving signals of the designated high frequency band. can do.
  • peripheral devices eg, a bus, general purpose input and output (GPIO), serial peripheral interface (SPI), or mobile industry processor interface (MIPI)
  • GPIO general purpose input and output
  • SPI serial peripheral interface
  • MIPI mobile industry processor interface
  • the command or data may be transmitted or received between the electronic device 101 and the external electronic device 104 through the server 108 connected to the second network 199 .
  • Each of the external electronic devices 102 or 104 may be the same as or different from the electronic device 101 .
  • all or a part of operations executed in the electronic device 101 may be executed in one or more external electronic devices 102 , 104 , or 108 .
  • the electronic device 101 may perform the function or service itself instead of executing the function or service itself.
  • one or more external electronic devices may be requested to perform at least a part of the function or the service.
  • One or more external electronic devices that have received the request may execute at least a part of the requested function or service, or an additional function or service related to the request, and transmit a result of the execution to the electronic device 101 .
  • the electronic device 101 may process the result as it is or additionally and provide it as at least a part of a response to the request.
  • cloud computing distributed computing, mobile edge computing (MEC), or client-server computing technology may be used.
  • the electronic device 101 may provide an ultra-low latency service using, for example, distributed computing or mobile edge computing.
  • the external electronic device 104 may include an Internet of things (IoT) device.
  • Server 108 may be an intelligent server using machine learning and/or neural networks.
  • the external electronic device 104 or the server 108 may be included in the second network 199 .
  • the electronic device 101 may be applied to an intelligent service (eg, smart home, smart city, smart car, or health care) based on 5G communication technology and IoT-related technology.
  • one or more instructions stored in a storage medium may be implemented as software (eg, the program 140) including
  • a processor eg, processor 120
  • a device eg, electronic device 101
  • the one or more instructions may include code generated by a compiler or code executable by an interpreter.
  • the device-readable storage medium may be provided in the form of a non-transitory storage medium.
  • 'non-transitory' only means that the storage medium is a tangible device and does not include a signal (eg, electromagnetic wave), and this term is used in cases where data is semi-permanently stored in the storage medium and It does not distinguish between temporary storage cases.
  • a signal eg, electromagnetic wave
  • the method according to various embodiments disclosed in this document may be included and provided 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 machine-readable storage medium (eg compact disc read only memory (CD-ROM)), or via an application store (eg Play Store TM ) or on two user devices ( It can be distributed online (eg download or upload), directly between smartphones (eg smartphones).
  • a part of the computer program product may be temporarily stored or temporarily generated in a machine-readable storage medium such as a memory of a server of a manufacturer, a server of an application store, or a relay server.
  • each component (eg, module or program) of the above-described components may include a singular or a plurality of entities, and some of the plurality of entities may be separately disposed in other components. have.
  • one or more components or operations among the above-described corresponding components may be omitted, or one or more other components or operations may be added.
  • a plurality of components eg, a module or a program
  • the integrated component may perform one or more functions of each component of the plurality of components identically or similarly to those performed by the corresponding component among the plurality of components prior to the integration. .
  • operations performed by a module, program, or other component are executed sequentially, in parallel, repetitively, or heuristically, or one or more of the operations are executed in a different order. , may be omitted, or one or more other operations may be added.
  • FIG. 2 is a diagram illustrating an example of aligning handwriting in an electronic device according to various embodiments of the present disclosure
  • an electronic device may receive a handwriting input from a user like the first user interface 210.
  • the user may use the user's body
  • a handwriting may be input by touching the display (eg, the display module 160 of FIG. 1 ) of the electronic device 101 using (eg, a finger) or an electronic pen.
  • the electronic device 101 executes the memo application, and can receive the touch trace (or coordinates) input to the input area of the executed memo application as handwriting. This can fall.
  • the electronic device 101 analyzes the strokes for handwriting and classifies them into strokes corresponding to characters (or characters) and non-character strokes that do not correspond to characters, and when classified as characters, a character alignment method Sorts the handwritten strokes classified as characters based on By doing so, you can align the handwriting.
  • strokes constituting the handwriting can be classified as characters or non-characters, more accurate and detailed alignment is possible. Even when character/non-character classification is impossible, all strokes can be treated as part of the character.
  • the electronic device 101 may align the handwriting like the second user interface 230 .
  • the electronic device 101 corrects (or changes) the handwriting inclination 231 for handwriting strokes corresponding to letters, corrects the indentation 233 of each line, By correcting the line spacing 235, handwriting strokes corresponding to characters may be aligned.
  • the electronic device 101 may normalize the height of each line (eg, character height or font size). A method of aligning characters or non-characters will be described in detail with reference to the drawings below.
  • the electronic device (eg, the electronic device 101 of FIG. 1 ) according to various embodiments of the present disclosure includes a display module (eg, the display module 160 of FIG. 1 ) and a memory (eg, the memory 130 of FIG. 1 ). )), and a processor (eg, the processor 120 of FIG. 1 ) operatively connected to the display module and the memory, wherein the processor converts handwriting into strokes corresponding to characters and non-character strokes not corresponding to characters. , sort the handwritten strokes classified as characters based on a character alignment method, match a character group associated with the non-character strokes, and classify the non-characters based on an alignment parameter applied to the matched character group It can be set to align the handwritten strokes.
  • a display module eg, the display module 160 of FIG. 1
  • a memory eg, the memory 130 of FIG. 1 ).
  • a processor eg, the processor 120 of FIG. 1
  • the processor converts handwriting into strokes corresponding to
  • the processor determines the handwriting inclination based on the feature points of the handwritten strokes classified into the characters, determines the indentation based on the reference position of each line, determines the height of each line based on the center height of the line, , may be set to align the handwritten strokes classified as the characters by adjusting the line spacing based on the height of each line.
  • the processor divides the handwritten strokes classified into the characters into partial regions, obtains feature points for each partial region, excludes some feature points based on the feature points of neighboring partial regions, and calculates a handwriting gradient based on the remaining feature points It may be determined to align the gradients of the handwritten strokes classified as the characters.
  • the processor classifies the handwritten lines classified into the characters, identifies a start position of each line, and determines the indentation of the clustered lines by clustering the start positions, so that the indentation positions of the handwritten strokes classified as the characters can be set to sort.
  • the processor is configured to determine, as the indentation position, at least one of the first position, the second position, or an average of the first position and the second position when the identified starting position is a first position and a second position can be set to
  • the processor classifies the lines of handwriting classified into the characters, divides the characters included in each line into partial regions, determines a central height of each line based on the average height of the partial regions, and determines the central height of each line based on the central height Thus, it may be set to align the line heights of the handwritten strokes classified as the characters.
  • the processor is configured to: excluding a central height that exceeds a first threshold or is less than a second threshold from a height of all subregions included in each row or an average height of each subregion, based on the remaining central heights included in each row It can be set to calculate the average height of the partial area.
  • the processor calculates the average height of all lines based on the center height of each line, classifies paragraphs based on the average height, calculates the average height of lines belonging to the paragraph, and the center height of each line belonging to the paragraph can be set to align line heights to fit the average height.
  • the processor adjusts the line spacing of the handwritten strokes classified as the letter based on the central height area of each line included in the handwritten strokes classified as the letter, or the handwriting classified as the letter based on the center point of each line It may be set to adjust the line spacing of strokes.
  • the processor may be configured to cluster and group the non-character strokes, match the grouped non-character strokes to a character group, and sort the handwritten strokes classified as non-characters based on an alignment parameter of the matched character group. have.
  • the processor allocates, among the non-character strokes, non-character strokes recognized as figures through shape recognition to a figure group, clusters the non-character strokes classified as non-figures, and assigns them to the non-figure group.
  • a character group is created, a character group to be matched is determined based on a distribution of feature points included in the character group and a predetermined position of the non-character group, and an alignment parameter applied to the determined character group is set to be applied to the non-character group.
  • the processor makes the figure group and the non-figure group into one unified group, and applies an alignment parameter applied to the character group matched with the unified group to combine It can be set to sort groups.
  • the processor may be configured not to align non-text groups in which a distance between the character group and the non-character group exceeds a threshold or a distance between the figure group and the non-figure group exceeds a threshold.
  • 3A is a flowchart 300 illustrating a method of aligning handwriting of an electronic device according to various embodiments of the present disclosure.
  • the electronic device eg, the processor of the electronic device 101 of FIG. 1 (eg, the processor 120 of FIG. 1 )) according to various embodiments aligns handwriting (or handwriting data)
  • the processor 120 may execute an application for inputting handwriting (eg, a memo application), and may receive a handwriting input to an input area within the executed application.
  • a handwriting may be input based on a touch coordinate (or trajectory) of touching (or contacting) the display module 160 of Fig. 1.
  • the handwriting may be composed of at least one of text (or text) or non-text.
  • the processor 120 may detect a user input for aligning handwriting in the executed application,
  • the user input may include at least one of a touch input, a gesture input, and a voice input. ) may be interpreted as receiving a request for handwriting alignment from the user when the user input is detected.
  • the processor 120 may classify the handwriting into stroke units and store it in a memory (eg, the memory 130 of FIG. 1 ).
  • Handwriting is composed of strokes, and a stroke may mean a line or point drawn once in a letter or picture (eg, a figure).
  • a stroke may be composed of points (eg, key points), and the processor 120 may obtain a key point from the stroke and classify the stroke based on the obtained key point.
  • the processor 120 may align the classified strokes.
  • the processor 120 determines the handwriting inclination based on the characteristic points of the classified strokes, determines the indentation based on the reference position of each line, determines the height of each line based on the center height of the line, and each The classified strokes may be aligned by adjusting the line spacing based on the line height.
  • the processor 120 may align the non-character strokes by matching a character group (or character line).
  • the character group (or character string group) may mean a line including one or more characters.
  • the processor 120 may cluster and group all strokes classified as a non-character, and match the grouped non-character group to the character group to align the grouped non-character group.
  • FIG. 3B is a flowchart 350 illustrating a method of aligning handwriting of an electronic device according to various embodiments of the present disclosure.
  • FIG. 3B may be a concrete embodiment of operation 303 of FIG. 3A .
  • the processor 120 may determine whether a handwriting corresponds to a character based on the classified strokes.
  • the text (letter) refers to a visual sign system used to write human language, and may include numbers or language characters of each country. Determining whether the handwriting corresponds to the character may be to identify whether the handwriting is a character or not, rather than recognizing which country the handwriting corresponds to.
  • the processor 120 may classify them as non-character strokes.
  • the processor 120 may perform operation 313 if the handwriting corresponds to a character, and may perform an operation 315 if the handwriting does not correspond to a character.
  • the processor 120 may align the handwritten strokes classified as characters based on the character alignment method.
  • the character alignment method determines the handwriting inclination based on the feature points of the handwritten strokes classified into the characters, determines the indentation based on the reference position of each line, and determines the height of each line based on the center height of the line and adjusting the line spacing based on the height of each line to align the handwritten strokes classified as the characters.
  • the handwriting gradient determination method divides the handwriting strokes classified as the input characters into partial regions, obtains feature points for each partial region, and excludes some feature points based on the feature points of the left/right neighboring partial regions , it may be to determine the handwriting gradient based on the remaining feature points.
  • the handwriting gradient determination method may be described in detail with reference to FIG. 4 below.
  • the method of determining the indent may be to group the start position of each line by a dynamic clustering method, and set some of the grouped start positions (eg, left) as the indent position. For example, if the grouped starting position has a first position (eg, left) and a second position (eg, right), at least one of the first position, the second position, or the average of the first position and the second position. One may be set as the indentation position of the handwritten strokes classified as the character. The method of determining the indentation may be described in detail below with reference to FIG. 6 .
  • the line height determination method classifies the lines of handwriting, divides the characters included in each line into partial areas, determines the center height of each line based on the average height of the partial areas, and determines the center height of each line. Calculates the average height of all lines, divides paragraphs based on the average height, calculates the average height of lines in a paragraph, and adjusts the size of the text so that the center height of each line in the paragraph matches the average height.
  • the height of each line of the handwritten strokes classified as the character may be normalized. The method of determining the string height may be described in detail below with reference to FIG. 8 .
  • the line spacing adjustment method may be to adjust the line spacing of the handwritten strokes classified by the letter based on the central height area of each line, or to adjust the line spacing of the handwritten strokes classified by the letter based on the center point of each line. have.
  • the method of adjusting the line spacing may be described in detail with reference to FIG. 10 below.
  • the processor 120 may sequentially perform the handwriting inclination determination method, the indentation determination method, the line height determination method, or the line spacing adjustment method in any order. Alternatively, the processor 120 may omit at least one of a handwriting inclination determination method, an indentation determination method, a line height determination method, and a line spacing adjustment method according to the input handwriting. Alternatively, the processor 120 selects at least one of a handwriting inclination determination method, an indentation determination method, a line height determination method, and a line spacing adjustment method according to a user's selection (or setting) or a setting of the electronic device 101 . may be performed, or may be omitted. Alternatively, the processor 120 may perform all alignments (eg, handwriting inclination, indentation, line height, and line spacing) at once, or may perform one or part alignment.
  • all alignments eg, handwriting inclination, indentation, line height, and line spacing
  • the processor 120 may match the non-character group to the character group.
  • a non-text is a stroke that is not a 'letter', and may include an underline written under a text or letter, a figure such as a circle, or a sketch (or drawing). Strokes included in non-characters can also be aligned and harmonized with characters.
  • the character group (or character string group) may mean a line including one or more characters.
  • the processor 120 may cluster and group all strokes classified as non-characters, and may align the grouped non-character groups by matching them to the character groups.
  • the processor 120 allocates the strokes classified as a figure through shape recognition among all the strokes classified as non-characters as a figure group, and clusters the remaining strokes according to a certain criterion into a non-figure group.
  • the non-text group may include a group classified as a figure and a group classified as a non-figure.
  • the processor 120 classifies strokes of a specific size or more or strokes having a specific number of points or more into one independent group, and clustering strokes within a certain area through clustering divides strokes belonging to the corresponding cluster into the same group.
  • the processor 120 may match the non-character group to the character group based on a distribution of feature points included in the character group and a predetermined position of the non-character group.
  • the processor 120 may align the handwritten strokes classified as non-characters based on the alignment parameter of the matched character group. For example, the processor 120 may align the handwritten strokes classified as the non-characters by applying the alignment parameter applied to the matching character group to the non-character group. According to various embodiments, the processor 120 may analyze the similarity between the figure group and the non-figure group, and determine whether to align the non-figure group based on the analysis result.
  • the processor 120 makes the figure group and the non-figure group into one unified group (or one non-text group), and The combined group (or one non-character group in which a figure group and a non-figure group are combined) may be sorted by applying an alignment parameter applied to the matched character group.
  • the processor 120 determines that the distance between the character group and the non-character group exceeds a threshold or the distance between the figure group and the non-figure group exceeds the threshold (eg, no similarity). Sorting may not be performed for groups, non-figure groups, and integrated groups).
  • the non-character alignment method may be described in detail below with reference to FIG. 11 .
  • 4 is a flowchart 400 illustrating a method of determining a handwriting gradient of an electronic device according to various embodiments of the present disclosure. 4 may be a concrete embodiment of operation 313 of FIG. 3B.
  • the electronic device eg, the processor of the electronic device 101 of FIG. 1 (eg, the processor 120 of FIG. 1 )
  • the electronic device eg, the processor of the electronic device 101 of FIG. 1 (eg, the processor 120 of FIG. 1 )
  • the electronic device eg, the processor of the electronic device 101 of FIG. 1 (eg, the processor 120 of FIG. 1 )
  • the processor 120 divides several strokes into one part. In order to be included in the region, the inclusion relationship of the strokes is determined, and at least one of an initial fully inclusive vertical merge, a fully inclusive horizontal merge, and a partially inclusive merge is performed according to the determination result to obtain partial regions for handwritten strokes corresponding to characters. can be distinguished as
  • the processor 120 may extract a feature point included in the partial region.
  • the feature point may be extracted from a stroke constituting a character included in the partial region.
  • one or more feature points may be extracted from one partial region.
  • three feature points top, middle, and bottom
  • the upper, middle, and lower three feature points may be extracted by dividing a into thirds.
  • the letter 'j' is included in the partial region, j is bisected to extract two upper and lower feature points, and the intermediate point may be interpolated. Interpolating the midpoint is optional, and may or may not interpolate the midpoint depending on the language recognized through character recognition.
  • the processor 120 may compare feature points of neighboring partial regions.
  • the adjacent partial areas may mean two adjacent partial areas.
  • two partial regions adjacent to each other may mean partial regions adjacent to each other in a left and right direction (eg, in a horizontal direction).
  • two partial regions adjacent to each other may mean partial regions adjacent to each other in a top and bottom direction (eg, vertical direction).
  • the processor 120 may exclude some feature points based on the comparison result.
  • linear regression can be used. Linear regression can calculate the slope of handwriting by detecting the slope of the point data cluster based on statistical information.
  • the strokes constituting the handwriting represent the characters, and since these characters have various shapes and positions, points corresponding to specific positions of the characters may reduce the accuracy in detecting the overall inclination of the handwriting. Accordingly, in the present invention, in order to detect the handwriting gradient more accurately based on the specificity of the handwriting data, some feature points effective for detecting the handwriting gradient may be extracted and used for detecting the handwriting gradient without using all the feature points.
  • the processor 120 generates a feature point (eg, a local minimum top) that exists above the feature point of the uppermost end of the neighboring partial regions or a feature point that exists below the feature point of the lowest end (eg, a local minimum top).
  • a feature point eg, a local minimum top
  • the processor 120 may determine a handwriting gradient based on the remaining feature points.
  • the processor 120 may perform linear regression by selectively extracting all of the remaining key points or a part of the remaining key points.
  • the processor 120 may perform character recognition to select a feature point used for linear regression according to a language. For example, in the case of a language in which characters have different heights, such as English, the processor 120 may perform linear regression using all feature points except for the uppermost or lowermost feature points.
  • the processor 120 may perform linear regression using a centrally located feature point (eg, a central point) among feature points extracted from partial regions in the case of a language in which characters do not have a height of characters, such as Chinese, Korean, or Japanese.
  • 5A and 5B are diagrams illustrating an example of determining a handwriting gradient in an electronic device according to various embodiments of the present disclosure
  • 5A is a diagram illustrating an example of dividing a partial region in an electronic device according to various embodiments of the present disclosure
  • an electronic device eg, the processor of the electronic device 101 of FIG. 1 (eg, the processor 120 of FIG. 1 )) according to various embodiments of the present disclosure may include multiple strokes in one partial region.
  • the inclusion relationship between strokes is determined, and can be divided into partial regions according to the determination result, for example, the processor 120 performs a vertical stroke merge 510 , a horizontally included stroke merge 530 , or a partially included merge 550 .
  • handwriting strokes corresponding to characters may be divided into partial regions.
  • 5B is a diagram illustrating an example of determining a handwriting gradient in an electronic device according to various embodiments of the present disclosure
  • the processor 120 performs at least one of a vertical stroke merge 510 , a horizontal included stroke merge 530 , and a partial included merge 550 to perform partial regions 581 to 586 for “golf”. ) can be distinguished.
  • the processor 120 may extract feature points included in a partial region, compare feature points of neighboring partial regions, and exclude some feature points based on the comparison result.
  • the feature points are indicated by circular dots, and the extracted feature points may be fewer or more than those shown in the drawings.
  • the processor 120 may compare the feature points of the first partial region 581 and the second partial region 582 , and may exclude some feature points 571 corresponding to “g”.
  • the processor 120 compares the characteristic points of the third partial region 583 and the fourth partial region 584 , and compares the characteristic points of the fifth partial region 585 and the sixth partial region 586 to “f”. Some corresponding feature points 573 may be excluded.
  • the processor 120 may correct (or determine) the handwriting gradient 575 by performing linear regression using the remaining feature points.
  • Reference number 590 shows an example in which handwriting inclination 595 is corrected with respect to handwritten characters.
  • 6 is a flowchart 600 illustrating a method of determining an indentation of an electronic device according to various embodiments of the present disclosure. 6 may be a concrete embodiment of operation 311 of FIG. 3B.
  • the electronic device eg, the processor of the electronic device 101 of FIG. 1 (eg, the processor 120 of FIG. 1 )
  • the electronic device executes a line of handwriting classified as characters.
  • line (or text line) can be classified.
  • alignment can be performed by aligning the reference position of each line to a certain position. There may be center alignment, and when handwriting has a list, the starting position of a paragraph or line may be differently aligned through indentation.
  • this indentation can be done simply, but handwriting, which is analog data, can be difficult to handle easily because the user can write text in random places.
  • handwriting which is analog data
  • the processor 120 may perform indentation alignment using dynamic clustering.
  • a line may be divided into top/bottom or left/right based on the direction in which text is written. For example, when writing text in a horizontal direction, the two lines may include a first line written in a horizontal direction and a second line written below or above the first line in a vertical direction based on the first line.
  • the processor 120 may determine how many lines are included in the handwriting corresponding to the character. When the handwriting includes one line, the following operation may not be performed.
  • the processor 120 may identify a start position of each line.
  • the start position may mean a position where handwriting starts in each line. Since the user writes in the horizontal direction, the first character identified on the left can be identified as the starting position. For example, when handwriting is classified into four lines, the processor 120 determines the start position of the first line (eg, the first start position), the start position of the second line (eg, the second start position), and the third It is possible to identify the starting position of the line (eg, the third starting position) or the starting position of the fourth line (eg, the fourth starting position).
  • the processor 120 may cluster the starting location.
  • the meaning of cluster is 'group', that is, a data group with similar characteristics of independent variables is called a cluster.
  • Clustering may mean classifying or grouping objects having similar characteristics into one group based on the characteristics of the objects to be clustered.
  • the processor 120 may cluster the plurality of representative positions based on the similarity between the plurality of start positions. For example, when the distance between the start positions is within a set threshold (eg, 1 ms), the processor 120 may determine that they are similar.
  • the threshold may be set by a user or may be set by the electronic device 101 .
  • the processor 120 does not use a fixed number of clusters such as K-means, but groups the starting positions using a dynamic clustering method that dynamically generates the number of clusters, and sets one according to the distribution of handwriting.
  • the above start position group (cluster) can be obtained.
  • the processor 120 may group the first start location and the third start location into a first cluster, and group the second start location and the fourth start location into a second cluster.
  • the processor 120 may determine whether information set in the start position is included by recognizing a character (eg, language) of the start position.
  • the set information is information that can be a reference for determining indentation, and may include, for example, at least one of bullets (eg -, *, ⁇ ), numbers, and symbols.
  • the set information may be set by a user or set by the electronic device 101 .
  • the processor 120 may group the information based on the set information. For example, the processor 120 may group start positions using the same symbol or the same type of symbol into one cluster. Alternatively, the processor 120 may group start positions using numbers into one cluster and group start positions that do not use numbers into another cluster.
  • the processor 120 may determine an indentation of the clustered line.
  • the processor 120 may determine an indentation position corresponding to one cluster based on a start position included in one cluster.
  • the processor 120 may control the lines included in the same cluster to be set to the same indentation position.
  • the processor 120 may be configured to: a first starting position, a third starting position, or an intermediate position between the first starting position and the third starting position ( Example: average value) may be determined as an indentation position for the first cluster.
  • the processor 120 determines at least one of a second starting position, a fourth starting position, or an intermediate position between the second starting position and the fourth starting position with respect to a second cluster including the second starting position and the fourth starting position. It can be determined as the indentation position for the second cluster. For example, the processor 120 may select a leftmost or rightmost start position, or determine an average of two start positions as the indentation position. The processor 120 may align the indentation positions of the handwritten strokes classified as the characters based on the determined indentation position.
  • the processor 120 may not perform the flowchart 600 of FIG. 6 .
  • FIG. 7 is a diagram illustrating an example of determining an indentation in an electronic device according to various embodiments of the present disclosure
  • an electronic device eg, the processor of the electronic device 101 of FIG. 1 (eg, the processor 120 of FIG. 1 )) may display a handwriting function like the first user interface 710 .
  • the processor 120 classifies the handwritten lines into six lines, and Identify the start position as the first start position 711, identify the start position of the second line as the second start position 712, identify the start position of the third line as the third start position 713,
  • the starting position of the fourth line is identified as the fourth starting position 714
  • the starting position of the fifth line is identified as the fifth starting position 715
  • the starting position of the sixth line is identified as the sixth starting position 716 .
  • the processor 120 may group the first start positions 711 to 716 by clustering them into one or more clusters.
  • the processor 120 groups the first starting position 711 and the sixth starting position 716 into a first cluster based on the similarity between the first starting position 711 and the sixth starting position 716, and a second The starting position 712 to the fifth starting position 715 may be grouped into a second cluster.
  • the processor 120 may determine the similarity between the start positions based on whether the distance between the plurality of start positions is located within a set threshold or whether set information (eg, bullets, numbers, or symbols) is included. . For example, when a number is included in the start position, such as the second start position 712 to the fifth start position 715 , the processor 120 may group them into one cluster.
  • the processor 120 is configured to select one of a first starting position 711 , a sixth starting position 716 , or an intermediate position 717 between the first starting position 711 and the sixth starting position 716 with respect to the first cluster. At least one may be determined as an indentation position for the first cluster.
  • the processor 120 is configured to, for the second cluster, a second starting position 712 , a third starting position 713 , a fourth starting position 714 , a fifth starting position 715 , or a second starting position 712 . ) to the intermediate position 718 of the fifth start position 715 may be determined as the indentation position for the second cluster.
  • the processor 120 corrects the first starting position 711 and the sixth starting position 716 to the first indentation position 731 , and the second starting position 712 .
  • the processor 120 corrects the to fifth start position 715 as the second indentation position 733 , the indentation of the handwritten strokes classified as the characters may be aligned.
  • FIG. 8 is a flowchart 800 illustrating a method of determining a row height of an electronic device according to various embodiments of the present disclosure.
  • FIG. 8 may be a concrete embodiment of operation 311 of FIG. 3B .
  • the electronic device eg, the processor of the electronic device 101 of FIG. 1 (eg, the processor 120 of FIG. 1 )
  • the electronic device eg, the processor of the electronic device 101 of FIG. 1 (eg, the processor 120 of FIG. 1 )
  • the electronic device eg, the processor of the electronic device 101 of FIG. 1 (eg, the processor 120 of FIG. 1 )
  • the electronic device eg, the processor of the electronic device 101 of FIG. 1 (eg, the processor 120 of FIG. 1 )
  • the electronic device eg, the processor of the electronic device 101 of FIG. 1 (eg, the processor 120 of FIG. 1 )
  • the electronic device eg, the processor of the electronic device 101 of FIG. 1 (eg, the processor 120 of FIG. 1 )
  • the electronic device eg, the processor of the electronic device 101 of FIG. 1 (eg, the processor 120 of FIG. 1 )
  • the electronic device eg, the processor of the electronic device 101 of FIG. 1 (eg, the
  • the processor 120 may divide (or set, or identify) characters included in each line into partial regions (or window regions). Since handwriting is different from text, which is digital data, it is difficult to write with a fixed fixed size (height), so the size of the handwriting may be very variable. Since it may be very difficult to accurately obtain the height of handwriting depending on the position and size of the stroke, it can be used to correct the line height based on the height of each line. In the present invention, by estimating the center height of each line using a line height estimation algorithm, calculating the average height of the characters included in several lines, and correcting the size of the characters to fit the average height for each line, all lines are Character size (or height) normalization can be performed to have similar heights.
  • the processor 120 may divide the partial area (or window area) by twice the width of the longest stroke in the character, and set the partial area so that portions of two adjacent partial areas overlap each other. For example, the processor 120 divides the first partial region to include one character or a character having a meaning, includes a part of the character, and includes a first partial region and a portion (eg, 1 of the first partial region). /2) may be divided such that the second partial region overlaps, and a third partial region may be divided such that a portion of the character is included and the second partial region and a part overlap.
  • the processor 120 may determine the center height of each line based on the average height of the partial regions.
  • the processor 120 may calculate a center value and a center height of each partial region.
  • the processor 120 may calculate an average height of the partial regions included in each line based on the central value and the central height.
  • the processor 120 may calculate an average height by excluding the central height of some partial regions. For example, the processor 120 determines that the height of the entire subregion included in each line or the average height of each subregion exceeds a first threshold (eg, 60%) or is less than a second threshold (eg, 40%).
  • the center height can be excluded.
  • the central height exceeding the first threshold value may correspond to a letter with a long vertical stroke, such as the alphabet p, f, y, or ' ⁇ ' in Korean.
  • the central height that is less than the second threshold value may correspond to a character in which the height of the stroke itself is small, such as , -.
  • the processor 120 may determine the center height of each line as an average height of partial regions having similar heights.
  • the similar height may mean a central height included in the partial area corresponding to a predetermined ratio (eg, 60% to 140%) of the partial area.
  • the processor 120 may align the line heights of the handwritten strokes classified into the characters based on the center height of each line. Lines that use bullets and lines of titles or higher levels can be intentionally sized differently by the user.
  • the processor 120 may calculate an average height of each line according to the lines clustered into the same group, and determine the center height of each line based on the calculated average height. For example, the processor 120 may calculate an average height of lines to which the same indentation is applied, and determine the center height of the lines to which the same indentation is applied based on the calculated average height.
  • the processor 120 may calculate an average height of all rows based on the center height of each row. Users tend to write in a relatively uniform size within the same line, but it may be possible to write in different sizes on different lines. If you correct the handwriting on several lines to have a similar size, you can change it to a better looking document.
  • the height of the center of each line may be different, and the processor 120 may normalize the height of each line by calculating the average height of all lines based on the center height of each line.
  • the processor 120 may classify the paragraphs based on the average height.
  • the paragraph is a mass in which one or several sentences are gathered to represent one central idea, and may mean a 'paragraph'.
  • the processor 120 may divide paragraphs in order to normalize line heights for each paragraph. For example, when the line spacing is greater than or equal to a certain size, the processor 120 may divide the line into a new paragraph.
  • the line spacing may be defined as a difference between the center value of the previous line and the center value of the current line.
  • the predetermined size may be a predetermined multiple of the average height. According to various embodiments, when a paragraph is divided into one, the processor 120 may not perform the following operations.
  • the processor 120 may calculate an average height of lines belonging to a paragraph. Even if multiple lines belong to the same paragraph, each line may have a different height (eg text height or font size). The processor 120 may calculate the average height of lines by adding the heights of lines belonging to the same paragraph and dividing by the number of lines.
  • the processor 120 may correct (or change) the size of the center height of each line belonging to the paragraph to fit the average height.
  • the processor 120 may correct the center height of each line to the average height so that the lines belonging to the same paragraph have the same height.
  • the size correction may be changing the line height to an average height by enlarging or reducing the center height of each line.
  • the processor 120 may align line heights of the handwritten strokes classified as the characters to match the average height.
  • the processor 120 may not perform the flowchart 800 of FIG. 8 .
  • FIGS. 9A and 9B are diagrams illustrating an example of adjusting a string height in an electronic device according to various embodiments of the present disclosure
  • 9A illustrates an example of calculating a height for each partial area according to a comparative example.
  • the electronic device eg, the processor of the electronic device 101 of FIG. 1 (eg, the processor 120 of FIG. 1 )
  • the electronic device may classify a line of handwriting corresponding to the character.
  • the processor 120 may classify the handwriting written as indicated by reference number 930 into three lines.
  • the processor 120 classifies the characters included in each line into partial regions, and sets the average height of the partial regions. Based on the determination of the center height of each line, the processor 120 may divide the first line into a plurality of partial areas as indicated by reference numeral 910.
  • the processor 120 may determine the first partial area (eg, including the letter C), including a part of the letter (eg, part of the letter a), and the second part so that the first partial area and the part (eg, 1/2 of the first partial area) overlap A third subregion (e.g., for example: part of the alphabet o or all of the alphabet n)
  • the processor 120 may determine the center height of each line based on the average height of the partial regions.
  • the average height of all partial regions included in each line is calculated without excluding the central height included in some partial regions, and the central height of each line is calculated. error may occur.
  • the central height 913 of the first row may be calculated as 100 mm
  • the central height 933 of the second row may be calculated as 95 mm
  • the central height 935 of the third row may be calculated as 110 mm.
  • 9B illustrates an example of calculating a height for each partial area in an electronic device according to various embodiments of the present disclosure.
  • the processor 120 may exceed a first threshold (eg, 60%) in the height of the entire partial region included in each line or the average height of each partial region as indicated by reference number 950 , or 2
  • a first threshold eg, 60%
  • a threshold eg 40%
  • the processor 120 may exclude the central height of the partial region from calculating the average height.
  • the processor 120 may calculate the average height of the line based on the central heights of the couple regions other than the central heights of the partial regions.
  • the processor 120 may determine the center height of each line based on the average height of the partial regions. For example, according to the comparative example, the central height 951 of the first row may be calculated as 98 mm, the central height 953 of the second row may be calculated as 98 mm, and the central height 935 of the third row may be calculated as 100 mm.
  • the processor 120 divides paragraphs based on the average height, calculates the average height of lines belonging to the paragraph, and adjusts the size of the center height of each line belonging to the paragraph to match the average height. can Since there is no line dividing the same paragraph in handwriting written as indicated by reference number 950 , the process of normalizing the average height of each paragraph may be omitted.
  • FIG. 10 is a diagram illustrating an example of adjusting a line spacing in an electronic device according to various embodiments of the present disclosure
  • the electronic device eg, the processor of the electronic device 101 of FIG. 1 (eg, the processor 120 of FIG. 1 )) according to various embodiments of the present disclosure includes a line of each line in the handwritten strokes classified as the character.
  • the line spacing of the handwritten strokes classified by the letter may be adjusted based on the central height area, or the line spacing of the handwritten strokes classified as the letter may be adjusted based on the center point of each line. It can be proportional to the size of the font. If there are multiple lines in handwriting, adjusting the spacing between each line to make the handwriting look cleaner.
  • the line spacing adjustment method is When divided into a certain number of paragraphs, line spacing may be adjusted for each paragraph
  • the processor 120 may adjust the spacing between two lines based on a central height area instead of a circumscribed area of each line
  • the processor 120 adjusts between the lower position 1011 of the central height region of the first row and the upper position 1012 of the central height of the second row to adjust the distance between the first row and the second row.
  • the processor 120 adjusts between the lower position 1013 of the central height region of the second row and the upper position 1014 of the center height of the third row to adjust the spacing between the second row and the third row can be adjusted.
  • the processor 120 may adjust the line spacing based on the center position of each line.
  • the processor 120 may adjust the line spacing to be the same as or similar to the line height.
  • the processor 120 may adjust the line spacing based on the center point of each line.
  • the processor 120 fixes the center points of the uppermost line (eg, first line) and the lowermost line (eg, third line), and between Existing lines (eg 2nd line) can be aligned equally.
  • the processor 120 may adjust the line spacing by double spacing based on the central height area of each line without fixing the center position of a specific line (eg, the first line or the third line).
  • the processor 120 may adjust the line spacing for each paragraph. For example, the processor 120 may adjust the line spacing within the first paragraph and the line spacing within the second paragraph to be the same or different. Alternatively, the processor 120 may adjust the line spacing between the first paragraph and the second paragraph to be the same as or different from the line spacing included in each paragraph.
  • 11 is a flowchart 1100 illustrating a non-text alignment method of an electronic device according to various embodiments of the present disclosure. 11 may be a concrete embodiment of operations 315 and 317 of FIG. 3B .
  • a non-text is a stroke that is not a 'letter', and may include an underline or a circle under a text, letter, figure, sketch, or drawing. Strokes included in non-characters can also be aligned and harmonized with characters.
  • all strokes classified as non-characters may be grouped into several non-character groups according to a specific method, and the grouped non-character groups may be aligned by matching the character groups.
  • the non-character alignment method classifies strokes corresponding to a figure into one non-character group by recognizing all the strokes classified as non-characters, or when multiple figures are recognized, each figure is non-characterized.
  • Classify into character groups or classify non-figure strokes that are judged to be large chunks of a certain size or more into non-character groups, or cluster the remaining strokes to separate clustered chunks into non-character groups, and each grouped non-character group You can sort by matching a character group to a character group.
  • the electronic device eg, the processor of the electronic device 101 of FIG. 1 (eg, the processor 120 of FIG. 1 )
  • the electronic device may perform figure recognition.
  • the processor 120 may perform figure recognition on the strokes classified as non-characters
  • the figure refers to the shape or shape of a figure, for example, it may have a shape such as a circle, a sphere, a square, or a star.
  • the processor 120 may determine whether the figure is a figure based on the figure recognition.
  • the processor 120 may perform operation 1105 if the handwriting corresponding to the non-character is a figure, and may perform operation 1109 if the handwriting corresponding to the non-character is not a figure.
  • the processor 120 may cluster the non-figure strokes.
  • the processor 120 may classify strokes having similar shapes or sizes into one group. For example, the processor 120 classifies strokes of a specific size or more (eg, the size exceeds a threshold) or strokes having a specific number or more (eg, the number exceeds the threshold) into one group or clusters within a specific area. Strokes can be divided into groups. For example, when short or long strokes exist close to the user's face (eg, a circular figure) as to express hair, the processor 120 may classify a specific number of strokes or more into one group.
  • the processor 120 may classify the clustered strokes in a predetermined area (eg, the user's face) into one group.
  • the processor 120 clusters the non-figure strokes and allocates them to at least one non-figure group, and performs operation 1105 .
  • the processor 120 may determine a character group to be matched based on a distribution of feature points included in the character group and a predetermined position of the non-character (or non-character group). Unlike strokes classified as characters, strokes classified as non-characters do not have a logical concept for alignment by themselves, so they can be aligned to match surrounding characters.
  • the non-text group may include a group classified as a figure and a group classified as a non-figure.
  • the predetermined position of the non-character group may include a central point or a specific position of the non-character group.
  • the processor 120 may find a character group to which the non-character group belongs to align the non-character group.
  • the distance measurement method based on the feature point distribution can use the Euclidean distance between the center point of the non-letter group and the feature point of the closest character, but based on the Euclidean distance, the character group (or character line) belonging to the non-letter group ), an error may occur.
  • the processor 120 may determine a character group to be matched by applying a distribution of feature points of a character group included in a character string adjacent to the non-character group and a predetermined position of the non-character group to the Mahalanobis Distance. For example, if the Euclidean distance is simply matched with a close distance, the processor 120 may determine a character group to be matched with a non-letter group by considering the correlation between feature points according to the Mahala Mobis distance. Since the character group (or character string group) is written in the horizontal direction, the processor 120 can search whether there is a character group written in the horizontal direction having the closest distance from the predetermined position of the non-character (or non-character group). have.
  • the processor 120 may apply the alignment parameter applied to the determined character group to the non-character group.
  • the processor 120 may equally apply the alignment parameter applied to the determined character group to the non-character group.
  • the alignment parameter is a parameter related to alignment of handwritten strokes classified as characters, and may include, for example, a parameter for any one of handwriting inclination, indentation, line height, and line spacing.
  • the processor 120 may perform at least one of rotation, position movement, and size change (eg, enlargement/reduction) with respect to the non-text group based on the alignment parameter.
  • the rotation parameter may correspond to a handwriting inclination
  • the position movement parameter may correspond to a handwriting inclination or indentation
  • the size change parameter may correspond to the line height or the line spacing.
  • the processor 120 clusters and groups all strokes classified as a non-character, and sorts the grouped non-character group by matching the character group.
  • the processor 120 may match the non-character group and the character group using the Mahalanobis distance. For example, when the distance between the character group and the non-character group is less than or equal to a threshold, the processor 120 aligns the non-character group using an alignment parameter applied to the character group, and the distance between the character group and the non-character group If ? exceeds the threshold, the non-character group may not be sorted.
  • the processor 120 allocates the figure group and the non-figure group as one integrated group (or one non-character group),
  • the integrated group (or one non-character group) may be sorted by applying an alignment parameter applied to the character group matched with the integrated group.
  • the processor 120 determines a number of non-character strokes into several non-character groups, each figure can be made into a non-character group by using figure recognition, and specifically large strokes are made into an independent non-text group, and the rest Stroke chunks created by clustering strokes can also be made into individual non-character groups.
  • the processor 120 Since a non-character group made from non-character strokes other than a figure may be related to a figure, the processor 120 generates two (or more) independent non-character groups in the case of a non-figure group having a similar position to the figure group. They can be combined into one unified non-letter group.
  • the processor 120 determines that for a non-character group (eg, a figure group, a non-figure group, and an integrated group) in which the distance between the figure group and the non-figure group is less than or equal to a threshold (eg, there is similarity), a character matched to the non-character group You can sort by the group's sort parameter.
  • a threshold eg, there is similarity
  • the processor 120 may not perform sorting on a non-character group (eg, a figure group, a non-figure group, and an integrated group) in which the distance between the figure group and the non-figure group exceeds a threshold (eg, no similarity). have.
  • a non-character group eg, a figure group, a non-figure group, and an integrated group
  • a threshold eg, no similarity
  • FIG. 12 is a diagram illustrating an example of aligning non-characters in an electronic device according to various embodiments of the present disclosure
  • the electronic device eg, the processor of the electronic device 101 of FIG. 1 (eg, the processor 120 of FIG. 1 )
  • the processor 120 analyzes the strokes included in the handwriting to obtain strokes corresponding to characters (eg, 1211, 1213, 1214, 1215) and non-characters. It may be classified into strokes, for example, 1221, 1222, 1223, 1224.
  • the processor 120 aligns the characters based on the character alignment method with respect to the handwritten strokes classified as characters, and assigns them to the strokes classified as non-characters.
  • Strokes classified as non-characters may be sorted based on whether or not they match with the character group, and the processor 120 selects the first line 1211, the second line ( 1213), a third line 1214, and a fourth line 1215.
  • the line may mean a character group including one or more characters.
  • a method for determining handwriting inclination eg, the flowchart 400 of FIG. 4
  • a method for determining an indentation eg, the flowchart 600 of FIG. 6
  • a method for determining a line height eg, in FIG. 8
  • the flowchart 800 or the line spacing adjustment method (eg, FIG. 10 ) may be sequentially performed or performed regardless of the order.
  • the processor 120 performs figure recognition on strokes corresponding to non-characters to form a first figure 1221 , a second figure 1222 , a third figure 1223 , and a fourth figure ( 1224) can be recognized.
  • the processor 120 allocates the first figure to the first group, assigns the second figure 1222 to the second group, assigns the third figure 1223 to the third group, and assigns the fourth figure 1224 may be assigned to the fourth group.
  • the processor 120 may classify a non-figure stroke 1225 with respect to a non-figure stroke by performing figure recognition. Since there is only one non-graphic stroke 1225 , the processor 120 may not perform clustering on the non-graphic stroke 1225 . The processor 120 may allocate the non-figure 1225 classified as not a figure to the non-figure group.
  • the processor 120 may determine a character group matching the non-character group based on a distribution of feature points included in the character group (character string group) and a predetermined position of the non-character group.
  • the non-character group may include a figure group and a non-figure group.
  • the predetermined position of the non-character group may include a central point or a specific position of the non-character group.
  • the processor 120 matches the first figure 1221 to the first line 1211 , the second figure 122 to the second line 1213 , and the non-figure 1225 to the second line 1213 .
  • the second line 1213 may be matched
  • the third figure 1223 may be matched with the third line 1214
  • the fourth figure 1224 may be matched with the fourth line 1215 .
  • the processor 120 determines whether a distance between the non-figure stroke 1225 and a figure (eg, the first figure 1221 to the fourth figure 1224 ) is equal to or less than a threshold value to determine the non-figure stroke (1225) and the similarity between the figure can be determined.
  • a threshold value e.g. the distance between the non-figure stroke 1225 and the second figure 1222 .
  • the processor 120 may combine the non-figure stroke 1225 and the second figure 1222 into one integrated non-character group. .
  • the processor 120 may match the same character group (eg, the second line 1213) with respect to the non-character group including the non-figure stroke 1225 and the second figure 1222.
  • the processor 120 may align the handwriting like the second user interface 1230 .
  • the processor 120 may align the handwritten strokes classified as characters included in the first line 1211 , the second line 1213 , the third line 1214 , and the fourth line 1215 .
  • the processor 120 may determine a character group matching a non-character group obtained by grouping handwritten strokes classified as non-characters, and apply an alignment parameter applied to the matched character group to the non-character group. For example, the processor 120 aligns the first figure 1231 by applying the alignment parameter of the first line 1211 to the first figure 1231 , and sets the alignment parameter of the second line 1213 to the second figure 1231 . Apply the figure 1232 and the non-figure stroke 1235 to align the second figure 1232 , and apply the alignment parameter of the third line 1214 to the third figure 1233 to form the third figure 1233 . After sorting, the fourth figure 1234 may be aligned by applying the alignment parameter of the fourth line 1215 to the fourth figure 1234 .
  • the processor 120 applies the alignment parameter applied to the character group to the non-character group (eg, the non-figure stroke 1225 and the second figure 1222) matching the character group (eg, the second line 1213). Handwriting strokes classified as non-letter can be sorted.
  • the non-character group eg, the non-figure stroke 1225 and the second figure 1222
  • the character group eg, the second line 1213
  • FIGS. 13A to 13C are diagrams illustrating a user interface for arranging handwriting in an electronic device according to various embodiments of the present disclosure
  • FIG. 13A illustrates a user interface for arranging handwriting in an electronic device according to various embodiments of the present disclosure
  • an electronic device eg, a processor (eg, the processor 120 of FIG. 1 ) of the electronic device 101 of FIG. 1 ) according to various embodiments of the present disclosure provides a first user interface 1310 , a user The handwriting may be input from the processor 120.
  • the processor 120 may provide a second user interface 1320.
  • the second user interface 1320 may include indicators 1321 and 1323 for arranging and displaying handwriting and selecting an area for handwriting alignment.
  • the processor 120 displays the second user interface 1320 in a preview form or a form to which handwriting alignment is applied. In the case of displaying in a preview form, if the user selects Cancel or Back, the user may return to the first user interface 1310 before sorting.
  • the first indicator 1321 is disposed above the display module (eg, the display module 160 of FIG. 1 ) of the electronic device 101
  • the second indicator 1323 is disposed below the display module 160 .
  • the user may select the handwriting alignment area by moving the first indicator 1321 or the second indicator 1323 in a vertical direction (eg, up or down).
  • the processor 120 moves the first indicator 1321 in the downward direction based on the user input and moves the second indicator 1323 in the upward direction to set the handwriting alignment area ( 1330) can be provided.
  • the third user interface 1330 may divide the handwriting alignment area into a first area 1331 , a second area 1332 , and a third area 1333 .
  • the processor 120 aligns handwriting only with respect to the second area 1332 positioned between the first indicator 1321 and the second indicator 1323 , and the first area 1331 and the third area 1323 . ) may not align handwriting.
  • FIG. 13B illustrates another user interface for arranging handwriting in an electronic device according to various embodiments of the present disclosure.
  • the processor 120 may provide a fourth user interface 1340 .
  • the fourth user interface 1340 may be an example in which an area to be aligned is directly selected by the user.
  • the user can directly select the desired alignment area with a pen or hand.
  • the processor 120 sets the area touched by the user (eg, shaded display) as the handwriting alignment area through rubbing that can select a large area such as the fourth user interface 1340, rather than a small area such as a point or a line.
  • sorting can be performed. have.
  • 13C illustrates another user interface for arranging handwriting in an electronic device according to various embodiments of the present disclosure.
  • the processor 120 may provide a fifth user interface 1350 .
  • the fifth user interface 1350 may be an example in which an area to be aligned is directly selected by the user, such as a mouse area selection.
  • the user may directly select a desired alignment area by using a region selection function that moves from a first position (eg, a left corner of a rectangle) to a second position (eg, a right corner of a rectangle) diagonally.
  • the processor 120 may set the rectangular area 1355 as the handwriting alignment area.
  • the processor 120 may display the function list 1351 .
  • the function list 1351 may include various functions (eg, cut, copy, paste, and delete) that can be edited for the selected area.
  • the function list 1351 may be displayed as a pop-up window, and may be displayed by being superimposed on handwriting.
  • the processor 120 may provide a sixth user interface 1360 .
  • the sixth user interface 1360 may include an additional function list 1361 for the selected area.
  • the additional function list 1361 may include other functions that are not displayed in the function list 1351 (eg, change the style, convert to text, align horizontally, view the clipboard).
  • the processor 120 may provide the seventh user interface 1370 .
  • the seventh user interface 1370 may be an example of displaying an aligned screen.
  • the seventh user interface 1370 may include an area 1371 in which handwriting is not aligned and an area 1373 in which handwriting is aligned.
  • the processor 120 aligns the gradient (eg, handwriting gradient) with respect to the handwriting (eg, 1. love, ⁇ , 2 Eyes, 3 pocket) included in the rectangular area 1355 , and is not included in the rectangular area 1355 . You can choose not to sort for unwritten handwriting (eg How deep is your).
  • FIGS. 14A and 14B are diagrams illustrating a user interface for setting indentation in an electronic device according to various embodiments of the present disclosure
  • 14A is a diagram illustrating a user interface for setting indentation in an electronic device according to various embodiments of the present disclosure
  • an electronic device eg, the processor of the electronic device 101 of FIG. 1 (eg, the processor 120 of FIG. 1 )) according to various embodiments includes indentation indicators 1411 and 1413 .
  • the first user interface 1410 may be displayed.
  • the first user interface 1410 may include indentation indicators 1411 and 1413 for a user to manually adjust an indent position.
  • the indentation position may be directly adjusted by adjusting the positions of the indentation indicator 1411 and the second indentation indicator 1413 in a horizontal direction (eg, left and right).
  • the indicator 1411 and the second indentation indicator 1413 the handwritten strokes classified as characters may be left-aligned or right-aligned.
  • the processor 120 may display the second user interface 1420 including the indentation indicators 1431 and 1433 by classifying the lines of handwriting or paragraphs of the handwriting.
  • the second user interface 1420 may include at least two indentation indicators 1431 and 1433 to apply indentation differently to each line or paragraph.
  • the processor 120 adjusts the indentation position of the first line (eg, How deep is your) by adjusting the first indent indicator 1431 based on the user input, and adjusts the second indentation indicator 1433 .
  • the processor 120 may classify the first to fourth lines, the first line may be classified as the first paragraph, and the second to fourth lines may be classified as the second paragraph.
  • the processor 120 may provide a first indentation indicator 1431 corresponding to the first paragraph and a second indentation indicator 1433 corresponding to the second paragraph. The user may apply the same or different indentation to the first paragraph and the second paragraph by adjusting the first indentation indicator 1431 and the second indentation indicator 1433 .
  • 14B is a diagram illustrating another user interface for setting indentation in an electronic device according to various embodiments of the present disclosure
  • the processor 120 may display a third user interface 1450 including indentation indicators 1451 and 1453 .
  • the processor 120 may classify the first to fourth lines and display the third user interface 1450 including indentation indicators at the left and right ends of each line, respectively.
  • the third user interface 1450 may include a first indent indicator 1451 at the left end corresponding to the first line and a second indent indicator 1453 at the left end corresponding to the second line. .
  • the processor 120 may provide the fourth user interface 1470 when the indentation indicator displayed at the left end corresponding to the second to fourth lines is selected based on the user input.
  • the fourth user interface 1470 may be an example in which the second to fourth lines are indented.
  • the processor 120 may horizontally (eg, left, right) move the handwritten strokes classified as characters of a line by a set area.
  • 15A to 15C are diagrams illustrating a user interface for arranging handwriting according to a user gesture in an electronic device according to various embodiments of the present disclosure
  • 15A is a diagram illustrating a user interface for arranging handwriting according to a user gesture in an electronic device according to various embodiments of the present disclosure
  • the length of two parallel side surfaces of the electronic device housing is longer or shorter than the length of the other two parallel side surfaces.
  • the short length of the two parallel sides of the electronic device housing comes up in the vertical direction ( or vertical direction), and may be in a horizontal direction (or horizontal direction) when the long lengths of two parallel sides of the electronic device housing come up.
  • the processor may receive a handwriting input and detect a user gesture that applies an impact to the lower side of the electronic device 101 while the electronic device 101 is in a vertical direction.
  • the user gesture may be a gesture similar to aligning the paper by tapping the paper on the desk when arranging several sheets of paper. For example, as in the first situation 1510 , the user may strike the lower side of the electronic device 101 with a hand while holding the electronic device 101 in a vertical direction. Alternatively, as in the second situation 1520 , the user may strike the lower side of the electronic device 101 on a flat surface (eg, a desk) while the electronic device 101 is in a vertical direction.
  • a flat surface eg, a desk
  • the processor 120 may provide a first user interface 1530 in which handwriting is vertically aligned.
  • the first user interface 1530 may correct the inclination of handwriting included in the first line 1531 and correct the inclination or line spacing of handwriting included in the second to fourth lines.
  • the processor 120 may align the handwriting based on the number of times the user gesture is detected. For example, if the user gesture is detected once, the processor 120 aligns the inclination of the handwriting, if the user gesture is detected twice, aligns the inclination and indentation of the handwriting, and if the user gesture is detected three times, the processor 120 aligns the handwriting , and if a user gesture is detected four times, the inclination, indentation, line spacing, and line height of handwriting can be aligned. This is merely an example to aid understanding, and the present invention is not limited by the description.
  • 15B is a diagram illustrating another user interface for arranging handwriting according to a user gesture in an electronic device according to various embodiments of the present disclosure
  • the processor 120 receives a handwriting and applies an impact to the left side of the electronic device 101 while the electronic device 101 is in a vertical direction or the electronic device 101 is in a horizontal direction. Gestures can be detected. For example, as in the third situation 1540 , the user may strike the left side of the electronic device 101 with a hand while holding the electronic device 101 in the vertical direction. Alternatively, as in the fourth situation 1550 , the user may strike the left side of the electronic device 101 on a flat surface (eg, a desk) while the electronic device 101 is in a horizontal direction.
  • a flat surface eg, a desk
  • the processor 120 may provide a second user interface 1560 in which handwriting is arranged in a horizontal direction.
  • the second user interface 1560 may be one in which the inclination of the handwriting is corrected and the indentation of the handwriting is aligned to the left.
  • an empty space may be created on the right side.
  • the user may further input additional handwriting (eg, a picture 1571 ) in the empty space in a state in which they are aligned as in the second user interface 1560 .
  • the third user interface 1570 may be an example in which a picture 1571 is further included in the second user interface 1560 .
  • 15C is a diagram illustrating another user interface for arranging handwriting according to a user gesture in an electronic device according to various embodiments of the present disclosure
  • the processor 120 receives a handwriting and applies an impact to the right side of the electronic device 101 while the electronic device 101 is in a vertical direction or the electronic device 101 is in a horizontal direction. Gestures can be detected. For example, as in the fifth situation 1580 , the user may strike the right side of the electronic device 101 with a hand while holding the electronic device 101 in the vertical direction. Alternatively, as in the sixth situation 1585 , the user may strike the right side of the electronic device 101 on a flat surface (eg, a desk) while the electronic device 101 is in a horizontal direction.
  • a flat surface eg, a desk
  • the processor 120 may provide a fourth user interface 1590 in which the inclination of handwriting is arranged in a horizontal direction.
  • the inclination of the handwriting is corrected and the indentation of the handwriting is aligned to the right.
  • an empty space may be created on the left side.
  • the user may further input additional handwriting (eg, a picture 1591) in the empty space in the state aligned as in the fourth user interface 1590 .
  • the fifth user interface 1595 may be an example in which a figure 1591 is further included in the fourth user interface 1590 .
  • a method of operating an electronic device includes an operation of classifying handwriting into strokes corresponding to characters and non-character strokes not corresponding to characters, and character alignment. sorting the handwritten strokes classified as characters based on a method, and matching a character group associated with the non-character strokes, and selecting the non-characteristic handwritten strokes based on an alignment parameter applied to the matched character group. It may include an operation of sorting.
  • the operation of arranging the handwritten strokes classified as the characters includes an operation of determining a handwriting inclination based on characteristic points of the classified handwriting strokes of the handwriting strokes classified as the characters, and determining an indentation based on a reference position of each line.
  • the operation may include an operation of determining the height of each line based on the height of the center of the line, and an operation of aligning the handwritten strokes classified into the characters by adjusting a line spacing based on the height of each line.
  • the operation of determining the handwriting gradient includes an operation of dividing the handwriting strokes classified as characters into partial regions, an operation of obtaining characteristic points for each partial region, and an operation of excluding some characteristic points based on the characteristic points of neighboring partial regions , and determining the handwriting slope based on the remaining feature points and aligning the handwriting strokes classified as the characters.
  • the operation of determining the indentation includes an operation of classifying the lines of the handwriting classified into the characters, an operation of clustering the identified starting positions by identifying a start position of each line, and determining the indentation of the clustered lines to align the indentation positions of the handwritten strokes classified as the characters.
  • the operation of determining the height of each line includes the operation of classifying the lines of handwriting classified into the characters, the operation of dividing the characters included in each line into partial regions, and the step of each line based on the average height of the partial regions. It may include an operation of determining a center height, and an operation of aligning line heights of the handwritten strokes classified into the characters based on the center height.
  • Determining the height of each line includes calculating an average height of all lines based on the center height of each line, dividing paragraphs based on the average height, and average height of lines belonging to the paragraph , and arranging the line heights of the handwritten strokes classified into the characters so that the center height of each line belonging to the paragraph matches the average height.
  • the aligning of the handwritten strokes classified as non-characters includes allocating strokes recognized as figures through figure recognition for the strokes classified as non-characters to a figure group, and clustering the strokes classified as non-figures to form a non-figure.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • User Interface Of Digital Computer (AREA)
  • Character Discrimination (AREA)

Abstract

본 발명의 다양한 실시 예들은 디스플레이 모듈, 메모리, 및 상기 디스플레이 모듈 상기 메모리와 작동적으로 연결되는 프로세서를 포함하고, 상기 프로세서는, 손글씨를 문자에 해당하는 획들과 문자에 해당하지 않는 비문자 획들로 분류하고, 문자 정렬 방법에 기반하여 상기 문자로 분류된 손글씨 획들을 정렬하고, 상기 비문자 획들과 연관된 문자 그룹을 매칭하고, 상기 매칭된 문자 그룹에 적용된 정렬 파라미터에 기반하여 상기 비문자로 분류된 손글씨 획들을 정렬하도록 설정된 방법 및 장치에 관하여 개시한다. 다양한 실시 예들이 가능하다.

Description

손글씨 정렬 방법 및 장치
본 발명의 다양한 실시예들은 손글씨 정렬 방법 및 장치에 관하여 개시한다.
디지털 기술의 발달과 함께 이동통신 단말기, PDA(personal digital assistant), 전자수첩, 스마트 폰, 태블릿 PC(personal computer), 웨어러블 디바이스(wearable device)와 같은 다양한 유형의 전자 장치가 널리 사용되고 있다. 이러한, 전자 장치는 기능 지지 및 증대를 위해, 전자 장치의 하드웨어적인 부분 및/또는 소프트웨어적인 부분이 지속적으로 개량되고 있다.
일례로, 전자 장치는 사용자가 노트나 펜이 없이도 언제 어디서든 필요한 메모를 할 수 있도록 하는 기능을 제공하고 있다. 예를 들어, 사용자는 손이나 전자펜을 이용하여 디스플레이(예: 터치스크린)에 직접 필기할 수 있다. 전자 장치는 디스플레이에 터치(또는 접촉)하는 터치 궤적(또는 좌표)을 손글씨로서 입력받을 수 있다. 사용자는 펜을 이용하여 노트에 필기하는 것과 같이 전자 펜을 이용하여 손글씨를 입력함으로써, 아날로그 감성을 느끼면서 편리하게 메모를 작성할 수 있다.
사용자는 전자 장치를 이용하여 편리하게 손글씨를 작성할 수 있지만, 글씨를 잘 쓰지 못하는 경우, 손글씨는 자칫 정돈되지 않고 지저분하게 보일 수 있다. 손글씨를 정돈되게 보이기 위해서는 손글씨를 작성할 때, 줄에 맞춰 잘 쓸 수 있도록 가이드 라인(예: 가로줄 또는 모눈 표시)을 제공할 수 있다. 가이드 라인을 제공하더라도, 사용자가 가이드 라인을 무시하고 손글씨를 작성할 수도 있다. 또는, 손글씨를 입력하고 난 후, 손글씨를 편집(예: 회전, 확대, 축소)하기 위한 기능을 제공할 수 있다. 이 경우, 사용자가 일일이 원하는 데로 손글씨를 편집해야 하는 불편함이 있을 수 있다.
다양한 실시예들에서는, 손글씨에 대한 획을 분석하여 문자에 해당하는 획들과 문자에 해당하지 않는 비문자 획들로 분류하고, 문자로 분류된 획들을 문자 정렬 방법에 기반하여 문자로 분류된 손글씨의 획들을 정렬하고, 비문자로 분류된 획들을 비문자와 연관된 문자의 정렬 파라미터에 기반하여 비문자로 분류된 손글씨의 획들을 정렬함으로써, 손글씨를 정렬하는 방법 및 장치에 관하여 개시할 수 있다.
본 발명의 다양한 실시예들에 따른 전자 장치는, 디스플레이 모듈, 메모리, 및 상기 디스플레이 모듈 상기 메모리와 작동적으로 연결되는 프로세서를 포함하고, 상기 프로세서는, 손글씨를 문자에 해당하는 획들과 문자에 해당하지 않는 비문자 획들로 분류하고, 문자 정렬 방법에 기반하여 상기 문자로 분류된 손글씨 획들을 정렬하고, 상기 비문자 획들과 연관된 문자 그룹을 매칭하고, 상기 매칭된 문자 그룹에 적용된 정렬 파라미터에 기반하여 상기 비문자로 분류된 손글씨 획들을 정렬하도록 설정될 수 있다.
본 발명의 다양한 실시예들에 따른 전자 장치의 동작 방법은 손글씨를 문자에 해당하는 획들과 문자에 해당하지 않는 비문자 획들로 분류하는 동작, 문자 정렬 방법에 기반하여 상기 문자로 분류된 손글씨 획들을 정렬하는 동작, 및 상기 비문자 획들과 연관된 문자 그룹을 매칭하고, 상기 매칭된 문자 그룹에 적용된 정렬 파라미터에 기반하여 상기 비문자로 분류된 손글씨 획들을 정렬하는 동작을 포함할 수 있다.
다양한 실시예들에 따르면, 손글씨에 대한 획을 분석하여 손글씨를 자동으로 정렬함으로써, 사용자가 자유롭게 필기한 손글씨에 대한 아날로그적인 특성을 유지하면서, 손글씨를 깔끔하게 정렬할 수 있다.
다양한 실시예들에 따르면, 손글씨를 문자에 해당하는 획들과 문자에 해당하지 않는 비문자 획들로 분류하고, 문자 정렬 방법에 기반하여 문자에 해당하는 획들을 정렬하고, 문자 정렬 파라미터에 기반하여 비문자에 해당하는 획들을 정렬함으로써, 깨끗하게 정리되는 심미적 효과 및 손글씨 내용에 대한 가독성을 향상시킬 수 있다.
도 1은 다양한 실시예들에 따른 네트워크 환경 내의 전자 장치의 블록도이다.
도 2는 다양한 실시예들에 따른 전자 장치에서 손글씨를 정렬하는 일례를 도시한 도면이다.
도 3a 및 도 3b는 다양한 실시예들에 따른 전자 장치의 손글씨 정렬 방법을 도시한 흐름도이다.
도 4는 다양한 실시예들에 따른 전자 장치의 손글씨 기울기 판단 방법을 도시한 흐름도이다.
도 5a 및 도 5b는 다양한 실시예들에 따른 전자 장치에서 손글씨 기울기를 판단하는 일례를 도시한 도면들이다.
도 6은 다양한 실시예들에 따른 전자 장치의 들여쓰기 결정 방법을 도시한 흐름도이다.
도 7은 다양한 실시예들에 따른 전자 장치에서 들여쓰기를 결정하는 일례를 도시한 도면이다.
도 8은 다양한 실시예들에 따른 전자 장치의 줄 높이 결정 방법을 도시한 흐름도이다.
도 9a 및 9b는 다양한 실시예들에 따른 전자 장치에서 줄 높이를 조절하는 일례를 도시한 도면들이다.
도 10은 다양한 실시예들에 따른 전자 장치에서 줄 간격을 조절하는 일례를 도시한 도면이다.
도 11은 다양한 실시예들에 따른 전자 장치의 비문자 정렬 방법을 도시한 흐름도이다.
도 12는 다양한 실시예들에 따른 전자 장치에서 비문자를 정렬하는 일례를 도시한 도면이다.
도 13a 내지 도 13c는 다양한 실시예들에 따른 전자 장치에서 손글씨를 정렬하는 사용자 인터페이스를 도시한 도면들이다.
도 14a 및 도 14b는 다양한 실시예들에 따른 전자 장치에서 들여쓰기를 설정하는 사용자 인터페이스를 도시한 도면들이다.
도 15a 내지 도 15c는 다양한 실시예들에 따른 전자 장치에서 사용자 제스처에 따라 손글씨를 정렬하는 사용자 인터페이스를 도시한 도면들이다.
본 문서에 개시된 다양한 실시예들에 따른 전자 장치는 다양한 형태의 장치가 될 수 있다. 전자 장치는, 예를 들면, 휴대용 통신 장치(예: 스마트폰), 컴퓨터 장치, 휴대용 멀티미디어 장치, 휴대용 의료 기기, 카메라, 웨어러블 장치, 또는 가전 장치를 포함할 수 있다. 본 문서의 실시예에 따른 전자 장치는 전술한 기기들에 한정되지 않는다.
본 문서의 다양한 실시예들 및 이에 사용된 용어들은 본 문서에 기재된 기술적 특징들을 특정한 실시예들로 한정하려는 것이 아니며, 해당 실시예의 다양한 변경, 균등물, 또는 대체물을 포함하는 것으로 이해되어야 한다. 도면의 설명과 관련하여, 유사한 또는 관련된 구성요소에 대해서는 유사한 참조 부호가 사용될 수 있다. 아이템에 대응하는 명사의 단수 형은 관련된 문맥상 명백하게 다르게 지시하지 않는 한, 상기 아이템 한 개 또는 복수 개를 포함할 수 있다. 본 문서에서, "A 또는 B", "A 및 B 중 적어도 하나", "A 또는 B 중 적어도 하나", "A, B 또는 C", "A, B 및 C 중 적어도 하나", 및 "A, B, 또는 C 중 적어도 하나"와 같은 문구들 각각은 그 문구들 중 해당하는 문구에 함께 나열된 항목들 중 어느 하나, 또는 그들의 모든 가능한 조합을 포함할 수 있다. "제1", "제2", 또는 "첫째" 또는 "둘째"와 같은 용어들은 단순히 해당 구성요소를 다른 해당 구성요소와 구분하기 위해 사용될 수 있으며, 해당 구성요소들을 다른 측면(예: 중요성 또는 순서)에서 한정하지 않는다. 어떤(예: 제1) 구성요소가 다른(예: 제2) 구성요소에, "기능적으로" 또는 "통신적으로"라는 용어와 함께 또는 이런 용어 없이, "커플드" 또는 "커넥티드"라고 언급된 경우, 그것은 상기 어떤 구성요소가 상기 다른 구성요소에 직접적으로(예: 유선으로), 무선으로, 또는 제 3 구성요소를 통하여 연결될 수 있다는 것을 의미한다.
본 문서의 다양한 실시예들에서 사용된 용어 "모듈"은 하드웨어, 소프트웨어 또는 펌웨어로 구현된 유닛을 포함할 수 있으며, 예를 들면, 로직, 논리 블록, 부품, 또는 회로와 같은 용어와 상호 호환적으로 사용될 수 있다. 모듈은, 일체로 구성된 부품 또는 하나 또는 그 이상의 기능을 수행하는, 상기 부품의 최소 단위 또는 그 일부가 될 수 있다. 예를 들면, 일 실시예에 따르면, 모듈은 ASIC(application-specific integrated circuit)의 형태로 구현될 수 있다.
도 1은 다양한 실시예들에 따른 네트워크 환경(100) 내의 전자 장치(101)의 블록도이다.
도 1을 참조하면, 네트워크 환경(100)에서 전자 장치(101)는 제1 네트워크(198)(예: 근거리 무선 통신 네트워크)를 통하여 전자 장치(102)와 통신하거나, 또는 제2 네트워크(199)(예: 원거리 무선 통신 네트워크)를 통하여 전자 장치(104) 또는 서버(108)와 통신할 수 있다. 일 실시예에 따르면, 전자 장치(101)는 서버(108)를 통하여 전자 장치(104)와 통신할 수 있다. 일 실시예에 따르면, 전자 장치(101)는 프로세서(120), 메모리(130), 입력 모듈(150), 음향 출력 모듈(155), 디스플레이 모듈(160), 오디오 모듈(170), 센서 모듈(176), 인터페이스(177), 연결 단자(178), 햅틱 모듈(179), 카메라 모듈(180), 전력 관리 모듈(188), 배터리(189), 통신 모듈(190), 가입자 식별 모듈(196), 또는 안테나 모듈(197)을 포함할 수 있다. 어떤 실시예에서는, 전자 장치(101)에는, 이 구성요소들 중 적어도 하나(예: 연결 단자(178))가 생략되거나, 하나 이상의 다른 구성요소가 추가될 수 있다. 어떤 실시예에서는, 이 구성요소들 중 일부들(예: 센서 모듈(176), 카메라 모듈(180), 또는 안테나 모듈(197))은 하나의 구성요소(예: 디스플레이 모듈(160))로 통합될 수 있다.
프로세서(120)는, 예를 들면, 소프트웨어(예: 프로그램(140))를 실행하여 프로세서(120)에 연결된 전자 장치(101)의 적어도 하나의 다른 구성요소(예: 하드웨어 또는 소프트웨어 구성요소)를 제어할 수 있고, 다양한 데이터 처리 또는 연산을 수행할 수 있다. 일 실시예에 따르면, 데이터 처리 또는 연산의 적어도 일부로서, 프로세서(120)는 다른 구성요소(예: 센서 모듈(176) 또는 통신 모듈(190))로부터 수신된 명령 또는 데이터를 휘발성 메모리(132)에 저장하고, 휘발성 메모리(132)에 저장된 명령 또는 데이터를 처리하고, 결과 데이터를 비휘발성 메모리(134)에 저장할 수 있다. 일 실시예에 따르면, 프로세서(120)는 메인 프로세서(121)(예: 중앙 처리 장치(CPU, central processing unit) 또는 어플리케이션 프로세서(AP, application processor)) 또는 이와는 독립적으로 또는 함께 운영 가능한 보조 프로세서(123)(예: 그래픽 처리 장치(GPU, graphic processing unit), 신경망 처리 장치(NPU, neural processing unit), 이미지 시그널 프로세서(ISP, image signal processor), 센서 허브 프로세서(sensor hub processor), 또는 커뮤니케이션 프로세서(CP, communication processor))를 포함할 수 있다. 예를 들어, 전자 장치(101)가 메인 프로세서(121) 및 보조 프로세서(123)를 포함하는 경우, 보조 프로세서(123)는 메인 프로세서(121)보다 저전력을 사용하거나, 지정된 기능에 특화되도록 설정될 수 있다. 보조 프로세서(123)는 메인 프로세서(121)와 별개로, 또는 그 일부로서 구현될 수 있다.
보조 프로세서(123)는, 예를 들면, 메인 프로세서(121)가 인액티브(inactive)(예: 슬립(sleep)) 상태에 있는 동안 메인 프로세서(121)를 대신하여, 또는 메인 프로세서(121)가 액티브(예: 어플리케이션 실행) 상태에 있는 동안 메인 프로세서(121)와 함께, 전자 장치(101)의 구성요소들 중 적어도 하나의 구성요소(예: 디스플레이 모듈(160), 센서 모듈(176), 또는 통신 모듈(190))와 관련된 기능 또는 상태들의 적어도 일부를 제어할 수 있다. 일 실시예에 따르면, 보조 프로세서(123)(예: 이미지 시그널 프로세서 또는 커뮤니케이션 프로세서)는 기능적으로 관련 있는 다른 구성요소(예: 카메라 모듈(180) 또는 통신 모듈(190))의 일부로서 구현될 수 있다. 일 실시예에 따르면, 보조 프로세서(123)(예: 신경망 처리 장치)는 인공지능 모델의 처리에 특화된 하드웨어 구조를 포함할 수 있다. 인공지능 모델은 기계 학습을 통해 생성될 수 있다. 이러한 학습은, 예를 들어, 인공지능이 수행되는 전자 장치(101) 자체에서 수행될 수 있고, 별도의 서버(예: 서버(108))를 통해 수행될 수도 있다. 학습 알고리즘은, 예를 들어, 지도형 학습(supervised learning), 비지도형 학습(unsupervised learning), 준지도형 학습(semi-supervised learning) 또는 강화 학습(reinforcement learning)을 포함할 수 있으나, 전술한 예에 한정되지 않는다. 인공지능 모델은, 복수의 인공 신경망 레이어들을 포함할 수 있다. 인공 신경망은 심층 신경망(DNN: deep neural network), CNN(convolutional neural network), RNN(recurrent neural network), RBM(restricted boltzmann machine), DBN(deep belief network), BRDNN(bidirectional recurrent deep neural network), 심층 Q-네트워크(deep Q-networks) 또는 상기 중 둘 이상의 조합 중 하나일 수 있으나, 전술한 예에 한정되지 않는다. 인공지능 모델은 하드웨어 구조 이외에, 추가적으로 또는 대체적으로, 소프트웨어 구조를 포함할 수 있다.
메모리(130)는, 전자 장치(101)의 적어도 하나의 구성요소(예: 프로세서(120) 또는 센서 모듈(176))에 의해 사용되는 다양한 데이터를 저장할 수 있다. 데이터는, 예를 들어, 소프트웨어(예: 프로그램(140)) 및, 이와 관련된 명령에 대한 입력 데이터 또는 출력 데이터를 포함할 수 있다. 메모리(130)는, 휘발성 메모리(132) 또는 비휘발성 메모리(134)를 포함할 수 있다.
프로그램(140)은 메모리(130)에 소프트웨어로서 저장될 수 있으며, 예를 들면, 운영 체제(OS, operating system)(142), 미들 웨어(middleware)(144) 또는 어플리케이션(146)을 포함할 수 있다.
입력 모듈(150)은, 전자 장치(101)의 구성요소(예: 프로세서(120))에 사용될 명령 또는 데이터를 전자 장치(101)의 외부(예: 사용자)로부터 수신할 수 있다. 입력 모듈(150)은, 예를 들면, 마이크, 마우스, 키보드, 키(예: 버튼), 또는 디지털 펜(예: 스타일러스 펜)을 포함할 수 있다.
음향 출력 모듈(155)은 음향 신호를 전자 장치(101)의 외부로 출력할 수 있다. 음향 출력 모듈(155)은, 예를 들면, 스피커 또는 리시버를 포함할 수 있다. 스피커는 멀티미디어 재생 또는 녹음 재생과 같이 일반적인 용도로 사용될 수 있다. 리시버는 착신 전화를 수신하기 위해 사용될 수 있다. 일 실시예에 따르면, 리시버는 스피커와 별개로, 또는 그 일부로서 구현될 수 있다.
디스플레이 모듈(160)은 전자 장치(101)의 외부(예: 사용자)로 정보를 시각적으로 제공할 수 있다. 디스플레이 모듈(160)은, 예를 들면, 디스플레이, 홀로그램 장치, 또는 프로젝터 및 해당 장치를 제어하기 위한 제어 회로를 포함할 수 있다. 일 실시예에 따르면, 디스플레이 모듈(160)은 터치를 감지하도록 설정된 터치 센서, 또는 상기 터치에 의해 발생되는 힘의 세기를 측정하도록 설정된 압력 센서를 포함할 수 있다.
오디오 모듈(170)은 소리를 전기 신호로 변환시키거나, 반대로 전기 신호를 소리로 변환시킬 수 있다. 일 실시예에 따르면, 오디오 모듈(170)은, 입력 모듈(150)을 통해 소리를 획득하거나, 음향 출력 모듈(155), 또는 전자 장치(101)와 직접 또는 무선으로 연결된 외부 전자 장치(예: 전자 장치(102))(예: 스피커 또는 헤드폰)를 통해 소리를 출력할 수 있다.
센서 모듈(176)은 전자 장치(101)의 작동 상태(예: 전력 또는 온도), 또는 외부의 환경 상태(예: 사용자 상태)를 감지하고, 감지된 상태에 대응하는 전기 신호 또는 데이터 값을 생성할 수 있다. 일 실시예에 따르면, 센서 모듈(176)은, 예를 들면, 제스처 센서, 자이로 센서, 기압 센서, 마그네틱 센서, 가속도 센서, 그립 센서, 근접 센서, 컬러 센서, IR(infrared) 센서, 생체 센서, 온도 센서, 습도 센서, 또는 조도 센서를 포함할 수 있다.
인터페이스(177)는 전자 장치(101)가 외부 전자 장치(예: 전자 장치(102))와 직접 또는 무선으로 연결되기 위해 사용될 수 있는 하나 이상의 지정된 프로토콜들을 지원할 수 있다. 일 실시예에 따르면, 인터페이스(177)는, 예를 들면, HDMI(high definition multimedia interface), USB(universal serial bus) 인터페이스, SD(secure digital) 카드 인터페이스, 또는 오디오 인터페이스를 포함할 수 있다.
연결 단자(178)는, 그를 통해서 전자 장치(101)가 외부 전자 장치(예: 전자 장치(102))와 물리적으로 연결될 수 있는 커넥터를 포함할 수 있다. 일 실시예에 따르면, 연결 단자(178)는, 예를 들면, HDMI 커넥터, USB 커넥터, SD 카드 커넥터, 또는 오디오 커넥터(예: 헤드폰 커넥터)를 포함할 수 있다.
햅틱 모듈(179)은 전기적 신호를 사용자가 촉각 또는 운동 감각을 통해서 인지할 수 있는 기계적인 자극(예: 진동 또는 움직임) 또는 전기적인 자극으로 변환할 수 있다. 일 실시예에 따르면, 햅틱 모듈(179)은, 예를 들면, 모터, 압전 소자, 또는 전기 자극 장치를 포함할 수 있다.
카메라 모듈(180)은 정지 영상 및 동영상을 촬영할 수 있다. 일 실시예에 따르면, 카메라 모듈(180)은 하나 이상의 렌즈들, 이미지 센서들, 이미지 시그널 프로세서들, 또는 플래시들을 포함할 수 있다.
전력 관리 모듈(188)은 전자 장치(101)에 공급되는 전력을 관리할 수 있다. 일 실시예에 따르면, 전력 관리 모듈(188)은, 예를 들면, PMIC(power management integrated circuit)의 적어도 일부로서 구현될 수 있다.
배터리(189)는 전자 장치(101)의 적어도 하나의 구성요소에 전력을 공급할 수 있다. 일 실시예에 따르면, 배터리(189)는, 예를 들면, 재충전 불가능한 1차 전지, 재충전 가능한 2차 전지 또는 연료 전지를 포함할 수 있다.
통신 모듈(190)은 전자 장치(101)와 외부 전자 장치(예: 전자 장치(102), 전자 장치(104), 또는 서버(108)) 간의 직접(예: 유선) 통신 채널 또는 무선 통신 채널의 수립, 및 수립된 통신 채널을 통한 통신 수행을 지원할 수 있다. 통신 모듈(190)은 프로세서(120)(예: 어플리케이션 프로세서)와 독립적으로 운영되고, 직접(예: 유선) 통신 또는 무선 통신을 지원하는 하나 이상의 커뮤니케이션 프로세서를 포함할 수 있다. 일 실시예에 따르면, 통신 모듈(190)은 무선 통신 모듈(192)(예: 셀룰러 통신 모듈, 근거리 무선 통신 모듈, 또는 GNSS(global navigation satellite system) 통신 모듈) 또는 유선 통신 모듈(194)(예: LAN(local area network) 통신 모듈, 또는 전력선 통신 모듈)을 포함할 수 있다. 이들 통신 모듈 중 해당하는 통신 모듈은 제1 네트워크(198)(예: 블루투스, WiFi(wireless fidelity) direct 또는 IrDA(infrared data association)와 같은 근거리 통신 네트워크) 또는 제2 네트워크(199)(예: 레거시 셀룰러 네트워크, 5G 네트워크, 차세대 통신 네트워크, 인터넷, 또는 컴퓨터 네트워크(예: LAN 또는 WAN(wide area network))와 같은 원거리 통신 네트워크)를 통하여 외부의 전자 장치(104)와 통신할 수 있다. 이런 여러 종류의 통신 모듈들은 하나의 구성요소(예: 단일 칩)로 통합되거나, 또는 서로 별도의 복수의 구성요소들(예: 복수 칩들)로 구현될 수 있다. 무선 통신 모듈(192)은 가입자 식별 모듈(196)에 저장된 가입자 정보(예: 국제 모바일 가입자 식별자(IMSI))를 이용하여 제1 네트워크(198) 또는 제2 네트워크(199)와 같은 통신 네트워크 내에서 전자 장치(101)를 확인 또는 인증할 수 있다.
무선 통신 모듈(192)은 4G 네트워크 이후의 5G 네트워크 및 차세대 통신 기술, 예를 들어, NR 접속 기술(new radio access technology)을 지원할 수 있다. NR 접속 기술은 고용량 데이터의 고속 전송(eMBB, enhanced mobile broadband), 단말 전력 최소화와 다수 단말의 접속(mMTC(massive machine type communications), 또는 고신뢰도와 저지연(URLLC, ultra-reliable and low-latency communications)을 지원할 수 있다. 무선 통신 모듈(192)은, 예를 들어, 높은 데이터 전송률 달성을 위해, 고주파 대역(예: mmWave 대역)을 지원할 수 있다. 무선 통신 모듈(192)은 고주파 대역에서의 성능 확보를 위한 다양한 기술들, 예를 들어, 빔포밍(beamforming), 거대 배열 다중 입출력(massive MIMO(multiple-input and multiple-output)), 전차원 다중입출력(FD-MIMO, full dimensional MIMO), 어레이 안테나(array antenna), 아날로그 빔형성(analog beam-forming), 또는 대규모 안테나(large scale antenna)와 같은 기술들을 지원할 수 있다. 무선 통신 모듈(192)은 전자 장치(101), 외부 전자 장치(예: 전자 장치(104)) 또는 네트워크 시스템(예: 제2 네트워크(199))에 규정되는 다양한 요구사항을 지원할 수 있다. 일 실시예에 따르면, 무선 통신 모듈(192)은 eMBB 실현을 위한 Peak data rate(예: 20Gbps 이상), mMTC 실현을 위한 손실 Coverage(예: 164dB 이하), 또는 URLLC 실현을 위한 U-plane latency(예: 다운링크(DL) 및 업링크(UL) 각각 0.5ms 이하, 또는 라운드 트립 1ms 이하)를 지원할 수 있다.
안테나 모듈(197)은 신호 또는 전력을 외부(예: 외부의 전자 장치)로 송신하거나 외부로부터 수신할 수 있다. 일 실시예에 따르면, 안테나 모듈(197)은 서브스트레이트(예: PCB) 위에 형성된 도전체 또는 도전성 패턴으로 이루어진 방사체를 포함하는 안테나를 포함할 수 있다. 일 실시예에 따르면, 안테나 모듈(197)은 복수의 안테나들(예: 어레이 안테나)을 포함할 수 있다. 이런 경우, 제1 네트워크(198) 또는 제2 네트워크(199)와 같은 통신 네트워크에서 사용되는 통신 방식에 적합한 적어도 하나의 안테나가, 예를 들면, 통신 모듈(190)에 의하여 상기 복수의 안테나들로부터 선택될 수 있다. 신호 또는 전력은 상기 선택된 적어도 하나의 안테나를 통하여 통신 모듈(190)과 외부의 전자 장치 간에 송신되거나 수신될 수 있다. 어떤 실시예에 따르면, 방사체 이외에 다른 부품(예: RFIC(radio frequency integrated circuit))이 추가로 안테나 모듈(197)의 일부로 형성될 수 있다.
다양한 실시예에 따르면, 안테나 모듈(197)은 mmWave 안테나 모듈을 형성할 수 있다. 일 실시예에 따르면, mmWave 안테나 모듈은 인쇄 회로 기판, 상기 인쇄 회로 기판의 제1 면(예: 아래 면)에 또는 그에 인접하여 배치되고 지정된 고주파 대역(예: mmWave 대역)을 지원할 수 있는 RFIC, 및 상기 인쇄 회로 기판의 제2 면(예: 윗 면 또는 측 면)에 또는 그에 인접하여 배치되고 상기 지정된 고주파 대역의 신호를 송신 또는 수신할 수 있는 복수의 안테나들(예: 어레이 안테나)을 포함할 수 있다.
상기 구성요소들 중 적어도 일부는 주변 기기들간 통신 방식(예: 버스, GPIO(general purpose input and output), SPI(serial peripheral interface), 또는 MIPI(mobile industry processor interface))을 통해 서로 연결되고 신호(예: 명령 또는 데이터)를 상호간에 교환할 수 있다.
일 실시예에 따르면, 명령 또는 데이터는 제2 네트워크(199)에 연결된 서버(108)를 통해서 전자 장치(101)와 외부의 전자 장치(104)간에 송신 또는 수신될 수 있다. 외부의 전자 장치(102, 또는 104) 각각은 전자 장치(101)와 동일한 또는 다른 종류의 장치일 수 있다. 일 실시예에 따르면, 전자 장치(101)에서 실행되는 동작들의 전부 또는 일부는 외부의 전자 장치들(102, 104, 또는 108) 중 하나 이상의 외부의 전자 장치들에서 실행될 수 있다. 예를 들면, 전자 장치(101)가 어떤 기능이나 서비스를 자동으로, 또는 사용자 또는 다른 장치로부터의 요청에 반응하여 수행해야 할 경우에, 전자 장치(101)는 기능 또는 서비스를 자체적으로 실행시키는 대신에 또는 추가적으로, 하나 이상의 외부의 전자 장치들에게 그 기능 또는 그 서비스의 적어도 일부를 수행하라고 요청할 수 있다. 상기 요청을 수신한 하나 이상의 외부의 전자 장치들은 요청된 기능 또는 서비스의 적어도 일부, 또는 상기 요청과 관련된 추가 기능 또는 서비스를 실행하고, 그 실행의 결과를 전자 장치(101)로 전달할 수 있다. 전자 장치(101)는 상기 결과를, 그대로 또는 추가적으로 처리하여, 상기 요청에 대한 응답의 적어도 일부로서 제공할 수 있다. 이를 위하여, 예를 들면, 클라우드 컴퓨팅, 분산 컴퓨팅, 모바일 에지 컴퓨팅(MEC, mobile edge computing), 또는 클라이언트-서버 컴퓨팅 기술이 이용될 수 있다. 전자 장치(101)는, 예를 들어, 분산 컴퓨팅 또는 모바일 에지 컴퓨팅을 이용하여 초저지연 서비스를 제공할 수 있다. 다른 실시예에 있어서, 외부의 전자 장치(104)는 IoT(internet of things) 기기를 포함할 수 있다. 서버(108)는 기계 학습 및/또는 신경망을 이용한 지능형 서버일 수 있다. 일 실시예에 따르면, 외부의 전자 장치(104) 또는 서버(108)는 제2 네트워크(199) 내에 포함될 수 있다. 전자 장치(101)는 5G 통신 기술 및 IoT 관련 기술을 기반으로 지능형 서비스(예: 스마트 홈, 스마트 시티, 스마트 카, 또는 헬스 케어)에 적용될 수 있다.
본 문서의 다양한 실시예들은 기기(machine)(예: 전자 장치(101)) 의해 읽을 수 있는 저장 매체(storage medium)(예: 내장 메모리(136) 또는 외장 메모리(138))에 저장된 하나 이상의 명령어들을 포함하는 소프트웨어(예: 프로그램(140))로서 구현될 수 있다. 예를 들면, 기기(예: 전자 장치(101))의 프로세서(예: 프로세서(120))는, 저장 매체로부터 저장된 하나 이상의 명령어들 중 적어도 하나의 명령을 호출하고, 그것을 실행할 수 있다. 이것은 기기가 상기 호출된 적어도 하나의 명령어에 따라 적어도 하나의 기능을 수행하도록 운영되는 것을 가능하게 한다. 상기 하나 이상의 명령어들은 컴파일러에 의해 생성된 코드 또는 인터프리터에 의해 실행될 수 있는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장 매체는, 비일시적(non-transitory) 저장 매체의 형태로 제공될 수 있다. 여기서, ‘비일시적’은 저장 매체가 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장 매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다.
일 실시예에 따르면, 본 문서에 개시된 다양한 실시예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory(CD-ROM))의 형태로 배포되거나, 또는 어플리케이션 스토어(예: 플레이 스토어TM)를 통해 또는 두 개의 사용자 장치들(예: 스마트 폰들) 간에 직접, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.
다양한 실시예들에 따르면, 상기 기술한 구성요소들의 각각의 구성요소(예: 모듈 또는 프로그램)는 단수 또는 복수의 개체를 포함할 수 있으며, 복수의 개체 중 일부는 다른 구성요소에 분리 배치될 수도 있다. 다양한 실시예들에 따르면, 전술한 해당 구성요소들 중 하나 이상의 구성요소들 또는 동작들이 생략되거나, 또는 하나 이상의 다른 구성요소들 또는 동작들이 추가될 수 있다. 대체적으로 또는 추가적으로, 복수의 구성요소들(예: 모듈 또는 프로그램)은 하나의 구성요소로 통합될 수 있다. 이런 경우, 통합된 구성요소는 상기 복수의 구성요소들 각각의 구성요소의 하나 이상의 기능들을 상기 통합 이전에 상기 복수의 구성요소들 중 해당 구성요소에 의해 수행되는 것과 동일 또는 유사하게 수행할 수 있다. 다양한 실시예들에 따르면, 모듈, 프로그램 또는 다른 구성요소에 의해 수행되는 동작들은 순차적으로, 병렬적으로, 반복적으로, 또는 휴리스틱(heuristic)하게 실행되거나, 상기 동작들 중 하나 이상이 다른 순서로 실행되거나, 생략되거나, 또는 하나 이상의 다른 동작들이 추가될 수 있다.
도 2는 다양한 실시예들에 따른 전자 장치에서 손글씨를 정렬하는 일례를 도시한 도면이다.
도 2를 참조하면, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101)는 제1 사용자 인터페이스(210)와 같이, 사용자로부터 손글씨를 입력받을 수 있다. 사용자는 사용자의 신체(예: 손가락) 또는 전자 펜을 이용하여 전자 장치(101)의 디스플레이(예: 도 1의 디스플레이 모듈(160))를 터치함으로써, 손글씨를 입력할 수 있다. 예를 들어, 전자 장치(101)는 메모 어플리케이션을 실행하고, 실행된 메모 어플리케이션의 입력 영역에 입력되는 터치 궤적(또는 좌표)을 손글씨로서 입력받을 수 있다. 손글씨는 키패드를 통한 문자 입력이 아니기 때문에, 다소 무질서하고 지저분하게 보이고, 가독성이 떨어질 수 있다.
이러한 단점을 보완하기 위하여, 전자 장치(101)는 손글씨에 대한 획을 분석하여 문자(또는 글자)에 해당하는 획들과 문자에 해당하지 않는 비문자 획들로 분류하고, 문자로 분류된 경우 문자 정렬 방법에 기반하여 문자로 분류된 손글씨 획들을 정렬하고, 비문자로 분류된 경우, 비문자 획들과 연관된 문자 그룹을 매칭하여 매칭된 문자 그룹의 정렬 파라미터에 기반하여 상기 비문자로 분류된 손글씨 획들을 정렬함으로써, 손글씨를 정렬할 수 있다.
손글씨를 구성하는 획들을 문자나 비문자로 분류가 가능하면 더욱 정확하고 세부적인 정렬이 가능하며, 문자/비문자 분류가 불가능할 경우에도 모든 획들을 문자의 일부로 간주하여 처리할 수 있다.
다양한 실시예들에 따르면, 전자 장치(101)는 제2 사용자 인터페이스(230)와 같이, 손글씨를 정렬할 수 있다. 제2 사용자 인터페이스(230)를 참조하면, 전자 장치(101)는 글자에 해당하는 손글씨 획들에 대한 손글씨 기울기(231)를 보정(또는 변경)하고, 각 줄의 들여쓰기(233)를 보정하고, 줄 간격(235)을 보정함으로써, 글자에 해당하는 손글씨 획들을 정렬할 수 있다. 추가적으로, 전자 장치(101)는 각 줄의 높이(예: 문자 높이 또는 글꼴의 크기)를 정규화할 수도 있다. 문자 또는 비문자에 대한 정렬 방법은 이하 도면을 통해 상세히 설명하기로 한다.
본 발명의 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101))는, 디스플레이 모듈(예: 도 1의 디스플레이 모듈(160)), 메모리(예: 도 1의 메모리(130)), 및 상기 디스플레이 모듈 상기 메모리와 작동적으로 연결되는 프로세서(예: 도 1의 프로세서(120)를 포함하고, 상기 프로세서는, 손글씨를 문자에 해당하는 획들과 문자에 해당하지 않는 비문자 획들로 분류하고, 문자 정렬 방법에 기반하여 상기 문자로 분류된 손글씨 획들을 정렬하고, 상기 비문자 획들과 연관된 문자 그룹을 매칭하고, 상기 매칭된 문자 그룹에 적용된 정렬 파라미터에 기반하여 상기 비문자로 분류된 손글씨 획들을 정렬하도록 설정될 수 있다.
상기 프로세서는, 상기 문자로 분류된 손글씨 획들의 특징점에 기반하여 손글씨 기울기를 판단하고, 각 줄의 기준 위치에 기반하여 들여쓰기를 결정하고, 줄의 중심 높이에 기반하여 각 줄의 높이를 결정하고, 각 줄의 높이에 기반하여 줄 간격을 조절하여 상기 문자로 분류된 손글씨 획들을 정렬하도록 설정될 수 있다.
상기 프로세서는, 상기 문자로 분류된 손글씨 획들을 부분 영역으로 구분하고, 부분 영역별 특징점을 획득하고, 서로 이웃하는 부분 영역의 특징점에 기반하여 일부 특징점을 제외하고, 나머지 특징점에 기반하여 손글씨 기울기를 판단하여 상기 문자로 분류된 손글씨 획들의 기울기를 정렬하도록 설정될 수 있다.
상기 프로세서는, 상기 문자로 분류된 손글씨의 줄을 분류하고, 각 줄의 시작 위치를 식별하고, 시작 위치를 클러스터링하여 클러스터링된 줄의 들여쓰기를 결정하여 상기 문자로 분류된 손글씨 획들의 들여쓰기 위치를 정렬하도록 설정될 수 있다.
상기 프로세서는, 상기 식별된 시작 위치가 제1 위치, 제2 위치가 존재하는 경우, 상기 제1 위치, 상기 제2 위치 또는 제1 위치와 제2 위치의 평균 중 적어도 하나를 들여쓰기 위치로 결정하도록 설정될 수 있다.
상기 프로세서는, 상기 문자로 분류된 손글씨의 줄을 분류하고, 각 줄에 포함된 문자를 부분 영역으로 구분하고, 부분 영역들의 평균 높이에 기반하여 각 줄의 중심 높이를 결정하고, 중심 높이에 기반하여 상기 문자로 분류된 손글씨 획들의 줄 높이를 정렬하도록 설정될 수 있다.
상기 프로세서는, 각 줄에 포함된 전체 부분 영역의 높이 또는 각 부분 영역의 평균 높이에서 제1 임계치를 초과하거나, 제2 임계치 미만인 중심 높이를 제외하고, 나머지 중심 높이에 기반하여 각 줄에 포함된 부분 영역의 평균 높이를 계산하도록 설정될 수 있다.
상기 프로세서는, 각 줄의 중심 높이에 기반하여 모든 줄의 평균 높이를 계산하고, 평균 높이에 기반하여 문단을 구분하고, 문단에 속하는 줄들의 평균 높이를 계산하고, 문단에 속하는 각 줄의 중심 높이를 평균 높이에 맞도록 줄 높이를 정렬하도록 설정될 수 있다.
상기 프로세서는, 상기 문자로 분류된 손글씨 획들에 포함된 각 줄의 중심 높이 영역을 기준으로 상기 문자로 분류된 손글씨 획들의 줄 간격을 조절하거나, 각 줄의 중심점을 기준으로 상기 문자로 분류된 손글씨 획들의 줄 간격을 조절하도록 설정될 수 있다.
상기 프로세서는, 상기 비문자 획들을 클러스터링하여 그룹화하고, 상기 그룹화된 비문자 획들을 문자 그룹에 매칭시켜 매칭된 문자 그룹의 정렬 파라미터에 기반하여 상기 비문자로 분류된 손글씨 획들을 정렬하도록 설정될 수 있다.
상기 프로세서는, 상기 비문자 획들 중에서, 도형 인식(shape recognition)을 통해 도형으로 인식된 비문자 획들을 도형 그룹으로 할당하고, 비도형으로 분류된 비문자 획들을 클러스터링하여 비도형 그룹으로 할당하여 비문자 그룹을 생성하고, 상기 문자 그룹에 포함된 특징점 분포와 상기 비문자 그룹의 정해진 위치에 기반하여 매칭할 문자 그룹을 결정하고, 결정된 문자 그룹에 적용된 정렬 파라미터를 상기 비문자 그룹에 적용하도록 설정될 수 있다.
상기 프로세서는, 비도형 그룹과 도형 그룹 간의 거리가 임계치 이하인 경우, 상기 도형 그룹과 상기 비도형 그룹을 하나의 통합 그룹으로 만들고, 상기 통합 그룹과 매칭된 문자 그룹에 적용된 정렬 파라미터를 적용하여 상기 통합 그룹을 정렬하도록 설정될 수 있다.
상기 프로세서는, 상기 문자 그룹과 상기 비문자 그룹 간의 거리가 임계치를 초과하거나, 또는 상기 도형 그룹과 상기 비도형 그룹 간의 거리가 임계치를 초과하는 비문자 그룹에 대해서 정렬하지 않도록 설정될 수 있다.
도 3a는 다양한 실시예들에 따른 전자 장치의 손글씨 정렬 방법을 도시한 흐름도(300)이다.
도 3a를 참조하면, 동작 301에서, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101)의 프로세서(예: 도 1의 프로세서(120))는 손글씨(또는 필기 데이터) 정렬을 요청받을 수 있다. 프로세서(120)는 손글씨를 입력하기 위한 어플리케이션(예: 메모 어플리케이션)을 실행하고, 상기 실행된 어플리케이션 내 입력 영역에 손글씨를 입력받을 수 있다. 프로세서(120)는 사용자로부터 디스플레이(예: 도 1의 디스플레이 모듈(160))를 터치(또는 접촉)하는 터치 좌표(또는 궤적)에 기반하여 손글씨를 입력받을 수 있다. 손글씨는 문자(또는 글자) 또는 비문자 중 적어도 하나로 구성될 수 있다. 프로세서(120)는 상기 실행된 어플리케이션 내 손글씨 정렬을 위한 사용자 입력을 검출할 수 있다. 상기 사용자 입력은 터치 입력, 제스처 입력, 또는 음성 입력 중 적어도 하나를 포함할 수 있다. 프로세서(120)는 상기 사용자 입력이 검출되면, 사용자로부터 손글씨 정렬을 요청받은 것으로 해석할 수 있다.
프로세서(120)는 손글씨를 입력받을 때, 손글씨를 획 단위로 분류하여 메모리(예: 도 1의 메모리(130))에 저장할 수 있다. 손글씨는 획들로 구성되고, 획은 글씨나 그림(예: 도형)에서, 한 번 그은 줄이나 점을 의미할 수 있다. 획은 점(예: 특징점)들로 구성될 수 있는데, 프로세서(120)는 상기 획으로부터 특징점을 획득하고, 상기 획득한 특징점에 기반하여 획을 분류할 수 있다.
동작 303에서, 프로세서(120)는 상기 분류된 획을 정렬할 수 있다. 프로세서(120)는 상기 분류된 획의 특징점에 기반하여 손글씨 기울기를 판단하고, 각 줄의 기준 위치에 기반하여 들여쓰기를 결정하고, 줄의 중심 높이에 기반하여 각 줄의 높이를 결정하고, 각 줄의 높이에 기반하여 줄 간격을 조절하여 상기 분류된 획을 정렬할 수 있다. 또는, 프로세서(120)는 상기 분류된 획이 문자 아닌 비문자에 해당하는 경우, 문자 그룹(또는 문자 줄)에 매칭하여 비문자 획을 정렬할 수 있다. 상기 문자 그룹(또는 문자 열 그룹)은 하나 이상의 문자를 포함하는 줄(line)을 의미할 수 있다. 예를 들어, 프로세서(120)는 상기 분류된 획이 비문자에 해당하는 경우, 비문자로 분류된 모든 획들을 클러스터링하여 그룹화하고, 그룹화된 비문자 그룹을 문자 그룹에 매칭시켜 정렬할 수 있다.
도 3b는 다양한 실시예들에 따른 전자 장치의 손글씨 정렬 방법을 도시한 흐름도(350)이다. 도 3b는 도 3a의 동작 303을 구체화한 것일 수 있다.
도 3b를 참조하면, 동작 311에서, 프로세서(120)는 상기 분류된 획에 기반하여 손글씨가 문자에 해당하는지 여부를 판단할 수 있다. 상기 문자(text, letter)는 인간의 언어를 적는 데 사용하는 시각적인 기호 체계를 의미하는 것으로, 숫자 또는 각 나라의 언어 문자를 포함할 수 있다. 상기 문자에 해당하는지 여부를 판단하는 것은 손글씨가 어느 나라 문자에 해당하는 것인지 인식하는 것이 아니라, 글자인지 아닌지를 식별하는 것일 수 있다. 프로세서(120)는 손글씨의 획들이 문자에 해당하지 않는 경우, 비문자 획들로 분류할 수 있다. 프로세서(120)는 손글씨가 문자에 해당하는 경우 동작 313을 수행하고, 손글씨가 문자에 해당하지 않는 경우 동작 315를 수행할 수 있다.
손글씨가 문자에 해당하는 경우 동작 313에서, 프로세서(120)는 문자 정렬 방법에 기반하여 문자로 분류된 손글씨 획들을 정렬할 수 있다. 상기 문자 정렬 방법은 상기 문자로 분류된 손글씨 획들의 특징점에 기반하여 손글씨 기울기를 판단하고, 각 줄의 기준 위치에 기반하여 들여쓰기를 결정하고, 줄의 중심 높이에 기반하여 각 줄의 높이를 결정하고, 각 줄의 높이에 기반하여 줄 간격을 조절하여 상기 문자로 분류된 손글씨 획들을 정렬하는 것일 수 있다.
예를 들어, 손글씨 기울기 판단 방법은 입력된 상기 문자로 분류된 손글씨 획들을 부분 영역으로 구분하고, 부분 영역별 특징점을 획득하고, 좌/우 이웃하는 부분 영역의 특징점에 기반하여 일부 특징점을 제외하고, 나머지 특징점에 기반하여 손글씨 기울기를 판단하는 것일 수 있다. 상기 손글씨 기울기 판단 방법은 이하 도 4를 통해 상세히 설명할 수 있다.
들여쓰기 결정 방법은 동적 클러스터링(dynamic clustering) 방법으로 각 줄의 시작 위치를 그룹화하고, 그룹화된 시작 위치 중 일부(예: 왼쪽)를 들여쓰기 위치로 설정하는 것일 수 있다. 예를 들어, 그룹화된 시작 위치가 제1 위치(예: 왼쪽), 제2 위치(예: 오른쪽)가 존재하는 경우, 제1 위치, 제2 위치 또는 제1 위치와 제2 위치의 평균 중 적어도 하나를 상기 문자로 분류된 손글씨 획들의 들여쓰기 위치로 설정할 수 있다. 상기 들여쓰기 결정 방법은 이하 도 6을 통해 상세히 설명할 수 있다.
줄 높이 결정 방법은 손글씨의 줄을 분류하고, 각 줄에 포함된 문자를 부분 영역으로 구분하고, 부분 영역들의 평균 높이에 기반하여 각 줄의 중심 높이를 결정하고, 각 줄의 중심 높이에 기반하여 모든 줄의 평균 높이를 계산하고, 평균 높이에 기반하여 문단을 구분하고, 문단에 속하는 줄들의 평균 높이를 계산하고, 문단에 속하는 각 줄의 중심 높이를 평균 높이에 맞도록 문자의 크기를 보정하여 상기 문자로 분류된 손글씨 획들의 각 줄의 높이를 정규화하는 것일 수 있다. 상기 줄 높이 결정 방법은 이하 도 8을 통해 상세히 설명할 수 있다.
줄 간격 조절 방법은 각 줄의 중심 높이 영역을 기준으로 상기 문자로 분류된 손글씨 획들의 줄 간격을 조절하거나, 각 줄의 중심점을 기준으로 상기 문자로 분류된 손글씨 획들의 줄 간격을 조절하는 것일 수 있다. 상기 줄 간격 조절 방법은 이하 도 10을 통해 상세히 설명할 수 있다.
프로세서(120)는 손글씨 기울기 판단 방법, 들여쓰기 결정 방법, 줄 높이 결정 방법, 또는 줄 간격 조절 방법을 순차적으로 수행하거나, 순서에 상관없이 수행할 수 있다. 또는, 프로세서(120)는 입력되는 손글씨에 따라 손글씨 기울기 판단 방법, 들여쓰기 결정 방법, 줄 높이 결정 방법, 또는 줄 간격 조절 방법 중 적어도 하나의 방법을 생략할 수 있다. 또는, 프로세서(120)는 사용자의 선택(또는 설정) 또는 전자 장치(101)의 설정에 따라 손글씨 기울기 판단 방법, 들여쓰기 결정 방법, 줄 높이 결정 방법, 또는 줄 간격 조절 방법 중 적어도 하나의 방법을 수행하거나, 또는 생략할 수 있다. 또는, 프로세서(120)는 모든 정렬(예: 손글씨 기울기, 들여쓰기, 줄 높이, 줄 간격)을 한번에 수행할 수도 있고, 하나 또는 일부의 정렬을 수행할 수도 있다.
손글씨가 문자에 해당하지 않는 경우 동작 315에서, 프로세서(120)는 비문자 그룹을 문자 그룹에 매칭할 수 있다. 비문자(non-text)는 '글자'가 아닌 획들로서 문자(text, letter) 밑에 쓴 밑줄이나, 동그라미와 같은 도형, 스케치(또는 그림)가 포함될 수 있다. 비문자에 포함된 획들도 문자와 함께 조화롭게 어울리며 정렬시킬 수 있다. 상기 문자 그룹(또는 문자 열 그룹)은 하나 이상의 문자를 포함하는 줄(line)을 의미할 수 있다. 다양한 실시예들에 따르면, 프로세서(120)는 비문자로 분류된 모든 획들을 클러스터링하여 그룹화하고, 그룹화된 비문자 그룹을 문자 그룹에 매칭시켜 정렬할 수 있다. 예를 들어, 프로세서(120)는 비문자로 분류된 모든 획들 중에서 도형 인식(shape recognition)을 통해 도형으로 분류된 획들은 도형 그룹으로 할당하고, 나머지 획들은 일정한 기준에 의해 클러스터링하여 비도형 그룹으로 할당하여 비문자 그룹을 생성할 수 있다. 상기 비문자 그룹은 도형으로 분류된 그룹과 비도형으로 분류된 그룹을 포함할 수 있다. 예를 들어, 프로세서(120)는 특정 크기 이상의 획이나 특정 개수 이상의 점들을 가지는 획들은 하나의 독립 그룹으로 구분하고, 클러스터링을 통해 일정한 영역 내 군집된 획들은 해당 군집에 속하는 획들을 동일한 그룹으로 구분할 수 있다. 프로세서(120)는 문자 그룹에 포함된 특징점 분포와 비문자 그룹의 정해진 위치에 기반하여 상기 비문자 그룹을 문자 그룹에 매칭할 수 있다.
동작 317에서, 프로세서(120)는 매칭된 문자 그룹의 정렬 파라미터에 기반하여 상기 비문자로 분류된 손글씨 획들을 정렬할 수 있다. 예를 들어, 프로세서(120)는 매칭이 결정된 문자 그룹에 적용된 정렬 파라미터를 비문자 그룹에 적용하여 상기 비문자로 분류된 손글씨 획들을 정렬할 수 있다. 다양한 실시예들에 따르면, 프로세서(120)는 도형 그룹과 비도형 그룹의 유사성을 분석하고, 분석 결과에 기반하여 비도형 그룹에 대해 정렬 여부를 판단할 수 있다. 예를 들어, 프로세서(120)는 비도형 그룹과 도형 그룹 간의 거리가 임계치 이하인 경우, 상기 도형 그룹과 상기 비도형 그룹을 하나의 통합 그룹(또는 하나의 비문자 그룹)으로 만들고, 상기 통합 그룹과 매칭된 문자 그룹에 적용된 정렬 파라미터를 적용하여 상기 통합 그룹(또는 도형 그룹과 비도형 그룹이 합쳐진 하나의 비문자 그룹)을 정렬할 수 있다. 또는, 프로세서(120)는 문자 그룹과 비문자 그룹 간의 거리가 임계치를 초과하거나, 또는 상기 도형 그룹과 상기 비도형 그룹 간의 거리가 임계치를 초과(예: 유사성 없음)하는 비문자 그룹(예: 도형 그룹, 비도형 그룹, 통합 그룹)에 대해서는 정렬을 수행하지 않을 수 있다. 비문자 정렬 방법은 이하 도 11을 통해 상세히 설명할 수 있다.
도 4는 다양한 실시예들에 따른 전자 장치의 손글씨 기울기 판단 방법을 도시한 흐름도(400)이다. 도 4는 도 3b의 동작 313을 구체화한 것일 수 있다.
도 4를 참조하면, 동작 401에서, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101)의 프로세서(예: 도 1의 프로세서(120))는 문자로 분류된 손글씨 획들을 부분 영역으로 구분할 수 있다. 상기 부분 영역은 개별 획 영역 또는 여러 획을 포함하는 세그먼트로서, 손글씨를 가로 방향으로 일정 영역을 포함하도록 분할한 것일 수 있다. 프로세서(120)는 여러 획을 하나의 부분 영역에 포함시키기 위해서는 획들의 포함 관계를 판단하고, 판단 결과에 따라 초기 완전 포함 수직 머지(merge), 완전 포함 수평 머지, 부분 포함 머지 중 적어도 하나를 수행하여 문자에 대응하는 손글씨 획들에 대해서 부분 영역으로 구분할 수 있다.
동작 403에서, 프로세서(120)는 상기 부분 영역에 포함된 특징점을 추출할 수 있다. 상기 특징점은 상기 부분 영역에 포함된 문자를 구성하는 획으로부터 추출될 수 있다. 예를 들어, 하나의 부분 영역에 하나 또는 하나 이상의 특징점을 추출할 수 있다. 하나의 부분 영역에 숫자 '1'이 포함된 경우, 1을 세등분하여, 위쪽, 중간, 아래쪽의 세 개의 특징점을 추출할 수 있다. 또는, 부분 영역에 알파벳 'a'가 포함된 경우, a를 3등분하여, 위쪽, 중간, 아래쪽 세 개의 특징점을 추출할 수 있다. 또는, 부분 영역에 알파벳 'j'가 포함된 경우, j를 2등분하여, 위쪽, 아래쪽 두 개의 특징점을 추출하고, 중간점을 보간할 수 있다. 중간점을 보간하는 것은 선택 사항으로, 문자 인식을 통해 인식된 언어에 따라 중간점을 보간하거나, 보간하지 않을 수도 있다. 이러한 예시는 발명의 이해를 돕기 위한 것일 뿐, 본 발명을 제한하는 것은 아니다.
동작 405에서, 프로세서(120)는 서로 이웃하는 부분 영역의 특징점을 비교할 수 있다. 상기 서로 이웃하는 부분 영역은 서로 인접한 두 개의 부분 영역을 의미할 수 있다. 사용자가 수평 방향(예: 왼쪽에서 오른쪽)으로 손글씨를 작성한 경우, 서로 인접한 두 개의 부분 영역은 좌, 우(예: 수평 방향)로 서로 인접한 부분 영역을 의미할 수 있다. 사용자가 수직 방향(예: 위에서 아래)으로 손글씨를 작성한 경우, 서로 인접한 두 개의 부분 영역은 상, 하(예: 수직 방향)로 서로 인접한 부분 영역을 의미할 수 있다.
동작 407에서, 프로세서(120)는 상기 비교 결과에 기반하여 일부 특징점을 제외할 수 있다. 임의의 데이터 군집으로부터 해당 군집의 기울기를 검출할 때, 선형 회귀(linear regression)를 사용할 수 있다. 선형 회귀는 통계학적인 정보에 기반하여 점 데이터 군집의 기울기를 검출함으로써 손글씨의 기울기를 산출할 수 있다. 손글씨를 구성하는 획들은 글자를 표현한 것이며, 이런 글자들은 모양 및 위치가 다양하여 글자의 특정 위치에 해당하는 점들은 필기의 전체적인 기울기를 검출하는데 정확도를 떨어뜨릴 수 있다. 이에, 본 발명에서는 필기 데이터의 특수성에 기반하여 보다 정확한 손글씨 기울기를 검출하기 위해서 모든 특징점을 사용하지 않고 손글씨 기울기 검출에 유효한 일부 특징점을 추출하여 손글씨 기울기 검출에 이용할 수 있다.
다양한 실시예들에 따르면, 프로세서(120)는 서로 이웃하는 부분 영역의 최상단의 특징점보다 위쪽에 존재하는 특징점(예: 지역 최상단점(local minimum top)) 또는 최하단의 특징점보다 아래쪽에 존재하는 특징점(예: 지역 최하단점(local maximum bottom))을 제외시킬 수 있다.
동작 409에서, 프로세서(120)는 나머지 특징점에 기반하여 손글씨 기울기를 결정할 수 있다. 프로세서(120)는 나머지 특징점 모두 또는 나머지 특징점의 일부를 선택적으로 추출하여 선형 회귀를 수행할 수 있다. 다양한 실시예들에 따르면, 프로세서(120)는 문자 인식을 수행하여, 언어에 따라 선형 회귀에 이용하는 특징점을 선택할 수 있다. 예를 들어, 프로세서(120)는 문자가 영어와 같이 문자마다 높낮이가 다른 언어의 경우, 최상단 또는 최하단 특징점을 제외한 모든 특징점을 이용하여 선형 회귀를 수행할 수 있다. 프로세서(120)는 문자가 중국어, 한국어 또는 일어와 같이 문자의 높낮이가 없는 언어의 경우, 부분 영역에서 추출된 특징점 중에서 중앙에 위치한 특징점(예: 중심점)을 이용하여 선형 회귀를 수행할 수 있다. 이러한 예시는, 발명의 이해를 돕기 위한 것일 뿐 설명에 의해 발명이 제한되는 것은 아니다.
도 5a 및 도 5b는 다양한 실시예들에 따른 전자 장치에서 손글씨 기울기를 판단하는 일례를 도시한 도면들이다.
도 5a는 다양한 실시예들에 따른 전자 장치에서 부분 영역을 구분하는 일례를 도시한 도면이다.
도 5a를 참조하면, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101)의 프로세서(예: 도 1의 프로세서(120))는 여러 획을 하나의 부분 영역에 포함시키기 위해서는 획들의 포함 관계를 판단하고, 판단 결과에 따라 부분 영역으로 구분할 수 있다. 예를 들어, 프로세서(120)는 수직 획 머지(510), 수평 포함 획 머지(530), 또는 부분 포함 머지(550) 중 적어도 하나를 수행하여 문자에 대응하는 손글씨 획들에 대해서 부분 영역으로 구분할 수 있다.
도 5b는 다양한 실시예들에 따른 전자 장치에서 손글씨 기울기를 판단하는 일례를 도시한 도면이다.
도 5b를 참조하면, 프로세서(120)는 수직 획 머지(510), 수평 포함 획 머지(530), 또는 부분 포함 머지(550) 중 적어도 하나를 수행하여 "golf"에 대한 부분 영역(581 ~ 586)을 구분할 수 있다. 프로세서(120)는 부분 영역에 포함된 특징점을 추출하고, 서로 이웃하는 부분 영역의 특징점을 비교하여, 비교 결과에 기반하여 일부 특징점을 제외할 수 있다. 도면에서 특징점은 원형의 점으로 나타내고 있는데, 추출되는 특징점은 도면에 도시한 것보다 적거나 많을 수 있다. 예를 들어, 프로세서(120)는 제1 부분 영역(581)과 제2 부분 영역(582)의 특징점을 비교하여, "g"에 해당하는 일부 특징점(571)을 제외할 수 있다. 프로세서(120)는 제3 부분 영역(583)과 제4 부분 영역(584)의 특징점을 비교하고, 제5 부분 영역(585)과 제6 부분 영역(586)의 특징점을 비교하여 "f"에 해당하는 일부 특징점(573)을 제외할 수 있다. 프로세서(120)는 나머지 특징점을 이용하여 선형 회귀를 수행하여 손글씨 기울기(575)를 보정(또는 결정)할 수 있다. 참조번호(590)는 손글씨의 문자에 대하여 손글씨 기울기(595)가 보정된 일례를 도시한 것이다.
도 6은 다양한 실시예들에 따른 전자 장치의 들여쓰기 결정 방법을 도시한 흐름도(600)이다. 도 6은 도 3b의 동작 311을 구체화한 것일 수 있다.
도 6을 참조하면, 동작 601에서, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101)의 프로세서(예: 도 1의 프로세서(120))는 문자로 분류된 손글씨의 줄(line)(또는 문자 줄)을 분류할 수 있다. 사용자가 여러 줄로 손글씨를 작성하는 경우, 각 줄의 기준 위치를 일정한 위치에 맞추는 정렬을 수행할 수 있다. 간단하게는 좌측 정렬, 우측 정렬, 가운데 정렬 등이 있을 수 있으며, 손글씨가 목록을 가지는 경우, 들여쓰기(indentation)를 통해 문단 또는 줄의 시작 위치를 다르게 정렬해줄 수 있다.
텍스트 기반 편집기에서는 이러한 들여쓰기를 간단하게 수행할 수 있지만, 아날로그 데이터인 손글씨는 사용자가 임의의 위치에 무작위로 글씨를 작성할 수 있으므로 쉽게 처리하기 어려울 수 있다. 예를 들어, 고정 크기로 들여쓰기 간격을 정하고, 들여쓰기를 정렬하는 경우, 사용자의 의도와는 다른 위치에 들여쓰기 정렬될 수 있다. 이러한 점을 고려하여, 프로세서(120)는 동적 클러스터링(dynamic clustering)을 사용하여 들여쓰기 정렬을 수행할 수 있다.
줄은 글이 작성되는 방향을 기준으로 상/하 또는 좌/우를 구분한 것일 수 있다. 예를 들어, 수평 방향으로 글을 작성하는 경우, 두 줄은 수평 방향 작성된 제1 줄과, 상기 제1 줄을 기준으로 수직 방향으로 아래 또는 위에 작성된 제2 줄을 포함하는 것일 수 있다. 프로세서(120)는 문자에 대응하는 손글씨에 몇 개의 줄이 포함되는지 여부를 판단하는 것일 수 있다. 손글씨가 하나의 줄을 포함하는 경우, 이하 동작을 수행하지 않을 수도 있다.
동작 603에서, 프로세서(120)는 각 줄의 시작 위치를 식별할 수 있다. 상기 시작 위치는 각 줄에서 손글씨가 시작되는 위치를 의미할 수 있다. 사용자는 수평 방향으로 글을 쓰므로, 왼쪽에서 가장 처음 식별되는 문자를 시작 위치로 식별할 수 있다. 예를 들어, 손글씨가 4개의 줄로 분류된 경우, 프로세서(120)는 첫 번째 줄의 시작 위치(예: 제1 시작 위치), 두 번째 줄의 시작 위치(예: 제2 시작 위치), 세 번째 줄의 시작 위치(예: 제3 시작 위치) 또는 네 번째 줄의 시작 위치(예: 제4 시작 위치)를 식별할 수 있다.
동작 605에서, 프로세서(120)는 시작 위치를 클러스터링할 수 있다. 클러스터(cluster)의 뜻은 '집단', 즉, 독립 변수의 특성이 유사한 데이터 그룹을 클러스터라고 한다. 클러스터링은 클러스터링할 대상의 특징에 기반하여 유사한 특징을 갖는 대상을 하나의 그룹으로 분류 또는 그룹화하는 것을 의미할 수 있다. 예를 들어, 프로세서(120)는 복수의 시작 위치들 간의 유사성에 기반하여 몇 개의 대표 위치로 클러스터링할 수 있다. 예를 들어, 프로세서(120)는 시작 위치들 간의 거리가 설정된 임계치(예: 1ms) 내에 위치하는 경우, 유사하다고 판단할 수 있다. 상기 임계치는 사용자에 의해 설정되거나, 또는 전자 장치(101)에 의해 설정될 수 있다. 프로세서(120)는 K-means와 같은 고정된 클러스터 개수를 사용하지 않고, 클러스터의 개수를 동적으로 생성하는 동적 클러스터링(dynamic clustering) 방법을 사용하여 시작 위치들을 그룹화하여, 손글씨의 분포에 따라 1개 이상의 시작 위치 그룹(클러스터)를 구할 수 있다. 예를 들어, 프로세서(120)는 제1 시작 위치와 제3 시작 위치를 제1 클러스터로 그룹화하고, 제2 시작 위치와 제4 시작 위치를 제2 클러스터로 그룹화할 수 있다.
다양한 실시예들에 따르면, 프로세서(120)는 시작 위치를 문자(예: 언어) 인식하여 시작 위치에 설정된 정보가 포함되어 있는지 여부를 판단할 수 있다. 상기 설정된 정보는 들여쓰기를 결정하는데 기준이 될 수 있는 정보로서, 예를 들어, 글머리 기호(예: -, *, ●), 숫자, 또는 기호 중 적어도 하나를 포함할 수 있다. 상기 설정된 정보는 사용자에 의해 설정되거나, 또는 전자 장치(101)에 의해 설정될 수 있다. 프로세서(120)는 상기 식별된 시작 위치에 설정된 정보가 포함되어 있는 경우, 설정된 정보를 기준으로 그룹화할 수 있다. 예를 들어, 프로세서(120)는 동일한 기호 또는 동일한 종류의 기호를 사용하는 시작 위치를 하나의 클러스터로 그룹화할 수 있다. 또는, 프로세서(120)는 숫자를 사용하는 시작 위치를 하나의 클러스터로 그룹화하고, 숫자를 사용하지 않는 시작 위치를 다른 하나의 클러스터로 그룹화할 수 있다.
동작 607에서, 프로세서(120)는 클러스터링된 줄의 들여쓰기를 결정할 수 있다. 프로세서(120)는 하나의 클러스터에 포함된 시작 위치에 기반하여 하나의 클러스터에 대응하는 들여쓰기 위치를 결정할 수 있다. 프로세서(120)는 동일한 클러스터에 포함된 줄에 대해서 동일한 들여쓰기 위치로 설정되도록 제어할 수 있다. 예를 들어, 프로세서(120)는 제1 시작 위치, 제3 시작 위치를 포함하는 제1 클러스터에 대하여, 제1 시작 위치, 제3 시작 위치 또는 제1 시작 위치와 제3 시작 위치의 중간 위치(예: 평균값) 중 적어도 하나를 상기 제1 클러스터에 대한 들여쓰기 위치로 결정할 수 있다. 프로세서(120)는 제2 시작 위치, 제4 시작 위치를 포함하는 제2 클러스터에 대하여, 제2 시작 위치, 제4 시작 위치 또는 제2 시작 위치와 제4 시작 위치의 중간 위치 중 적어도 하나를 상기 제2 클러스터에 대한 들여쓰기 위치로 결정할 수 있다. 예를 들어, 프로세서(120)는 가장 왼쪽 또는 가장 오른쪽에 위치한 시작 위치를 선택하거나, 두 개의 시작 위치의 평균을 들여쓰기 위치로 결정할 수 있다. 프로세서(120)는 상기 결정된 들여쓰기 위치에 기반하여 상기 문자로 분류된 손글씨 획들의 들여쓰기 위치를 정렬할 수 있다.
다양한 실시예들에 따르면, 손글씨가 하나의 줄로 구성된 경우, 프로세서(120)는 도 6의 흐름도(600)를 수행하지 않을 수 있다.
도 7은 다양한 실시예들에 따른 전자 장치에서 들여쓰기를 결정하는 일례를 도시한 도면이다.
도 7을 참조하면, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101)의 프로세서(예: 도 1의 프로세서(120))는 제1 사용자 인터페이스(710)와 같이, 손글씨를 입력받은 경우, 문자로 분류된 손글씨의 줄을 분류하고, 각 줄의 시작 위치를 식별할 수 있다. 예를 들어, 프로세서(120)는 손글씨의 줄을 6개의 줄로 분류하고, 첫 번째 줄의 시작 위치를 제1 시작 위치(711)로 식별하고, 두 번째 줄의 시작 위치를 제2 시작 위치(712)로 식별하고, 세 번째 줄의 시작 위치를 제3 시작 위치(713)로 식별하고, 네 번째 줄의 시작 위치를 제4 시작 위치(714)로 식별하고, 다섯 번째 줄의 시작 위치를 제5 시작 위치(715)로 식별하고, 여섯 번째 줄의 시작 위치를 제6 시작 위치(716)로 식별할 수 있다.
다양한 실시예들에 따르면, 프로세서(120)는 제1 시작 위치(711) 내지 제6 시작 위치(716)를 클러스터링하여 하나 이상의 클러스터로 그룹화할 수 있다. 프로세서(120)는 제1 시작 위치(711) 내지 제6 시작 위치(716) 간의 유사성에 기반하여 제1 시작 위치(711)와 제6 시작 위치(716)를 제1 클러스터로 그룹화하고, 제2 시작 위치(712) 내지 제5 시작 위치(715)를 제2 클러스터로 그룹화할 수 있다. 프로세서(120)는 복수의 시작 위치들 간의 거리가 설정된 임계치 내에 위치하는지 또는 설정된 정보(예: 글머리 기호, 숫자, 또는 기호)가 포함되었는지 여부에 기반하여 시작 위치들 간의 유사성을 판단할 수 있다. 예를 들어, 프로세서(120)는 제2 시작 위치(712) 내지 제5 시작 위치(715)와 같이, 시작 위치에 숫자가 포함되는 경우, 하나의 클러스터로 그룹화할 수 있다.
프로세서(120)는 상기 제1 클러스터에 대하여, 제1 시작 위치(711), 제6 시작 위치(716) 또는 제1 시작 위치(711)와 제6 시작 위치(716)의 중간 위치(717) 중 적어도 하나를 상기 제1 클러스터에 대한 들여쓰기 위치로 결정할 수 있다. 프로세서(120)는 상기 제2 클러스터에 대하여, 제2 시작 위치(712), 제3 시작 위치(713), 제4 시작 위치(714), 제5 시작 위치(715) 또는 제2 시작 위치(712) 내지 제5 시작 위치(715)의 중간 위치(718) 중 적어도 하나를 상기 제2 클러스터에 대한 들여쓰기 위치로 결정할 수 있다.
프로세서(120)는 제2 사용자 인터페이스(730)와 같이, 제1 시작 위치(711)와 제6 시작 위치(716)를 제1 들여쓰기 위치(731)로 보정하고, 제2 시작 위치(712) 내지 제5 시작 위치(715)를 제2 들여쓰기 위치(733)로 보정하여, 상기 문자로 분류된 손글씨 획들의 들여쓰기를 정렬할 수 있다.
도 8은 다양한 실시예들에 따른 전자 장치의 줄 높이 결정 방법을 도시한 흐름도(800)이다. 도 8은 도 3b의 동작 311을 구체화한 것일 수 있다.
도 8을 참조하면, 동작 801에서, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101)의 프로세서(예: 도 1의 프로세서(120))는 문자로 분류된 손글씨의 줄(문자 줄)을 분류할 수 있다. 프로세서(120)는 문자에 대응하는 손글씨에 몇 개의 줄이 포함되는지 여부를 판단하는 것일 수 있다. 손글씨가 하나의 줄을 포함하는 경우, 이하 동작을 수행하지 않을 수도 있다. 동작 801은 동작 601과 동일 또는 유사하므로, 자세한 설명을 생략할 수 있다. 프로세서(120)는 도 6의 동작을 수행하고, 도 8의 동작을 수행하는 경우 동작 801은 생략 가능할 수 있다.
동작 803에서, 프로세서(120)는 각 줄에 포함된 문자를 부분 영역(또는 윈도우 영역)으로 구분(또는 설정, 식별)할 수 있다. 손글씨는 디지털 데이터인 텍스트(text)와 달라서 일정한 고정 크기(높이)로 작성하기 어려워서 손글씨의 크기가 매우 가변적일 수 있다. 손글씨는 획의 위치 및 크기 등에 따라 높이를 정확하게 구하기 매우 어려울 수 있으므로, 각 줄의 높이에 기반하여 줄 높이를 보정하는데 이용할 수 잇다. 본 발명에서는 줄 높이 추정 알고리즘을 이용하여 각 줄의 중심 높이를 추정하고, 여러 줄에 포함된 문자의 평균 높이를 계산하여, 각 줄 별로 평균 높이에 맞도록 문자의 크기를 보정함으로써, 모든 줄이 유사한 높이를 가지도록 문자 크기(또는 높이) 정규화를 수행할 수 있다.
프로세서(120)는 상기 문자에서 가장 너비가 긴 획 너비의 2배로 상기 부분 영역(또는 윈도우 영역)을 구분하고, 서로 이웃하는 두 개의 부분 영역의 일부분이 중첩되도록 상기 부분 영역을 설정할 수 있다. 예를 들어, 프로세서(120)는 하나의 문자 또는 의미를 갖는 문자를 포함하도록 제1 부분 영역을 구분하고, 문자의 일부를 포함하고, 제1 부분 영역과 일부분(예: 제1 부분 영역의 1/2)이 중첩되도록 제2 부분 영역을 구분하고, 문자의 일부를 포함하고, 상기 제2 부분 영역과 일부분이 중첩되도록 제3 부분 영역을 구분할 수 있다.
동작 805에서, 프로세서(120)는 상기 부분 영역들의 평균 높이에 기반하여 각 줄의 중심 높이를 결정할 수 있다. 프로세서(120)는 각 부분 영역의 중심값 및 중심 높이를 계산할 수 있다. 프로세서(120)는 상기 중심값 및 상기 중심 높이에 기반하여 각 줄에 포함된 부분 영역의 평균 높이를 계산할 수 있다. 프로세서(120)는 일부 부분 영역의 중심 높이를 제외하여 평균 높이를 계산할 수 있다. 예를 들어, 프로세서(120)는 각 줄에 포함된 전체 부분 영역의 높이 또는 각 부분 영역의 평균 높이에서 제1 임계치(예: 60%)를 초과하거나, 제2 임계치(예: 40%) 미만인 중심 높이를 제외할 수 있다. 예를 들어, 상기 제1 임계치를 초과하는 중심 높이는 알파벳 p, f, y 또는 한글의 'ㅣ'와 같이 세로로 획이 길게 작성되는 문자가 해당될 수 있다. 또는, 상기 제2 임계치 미만인 중심 높이는 , -와 같이 획 자체의 높이가 작게 작성되는 문자가 해당될 수 있다. 프로세서(120)는 유사한 높이를 가지는 부분 영역들의 평균 높이로 각 줄의 중심 높이를 결정할 수 있다. 예를 들어, 유사한 높이는 상기 부분 영역의 일정 비율(예: 60% ~ 140%)에 해당하는 부분 영역에 포함된 중심 높이를 의미할 수 있다.
다양한 실시예들에 따르면, 프로세서(120)는 각 줄의 중심 높이에 기반하여 상기 문자로 분류된 손글씨 획들의 줄 높이를 정렬할 수 있다. 글머리 기호를 사용하는 줄과 타이틀이나 그 상위 레벨의 줄은 사용자가 의도적으로 다른 크기로 작성할 수 있다. 프로세서(120)는 동일한 그룹으로 클러스터링된 줄에 따라 각각의 평균 높이를 계산하고, 계산된 평균 높이에 기반하여 각 줄의 중심 높이를 결정할 수 있다. 예를 들어, 프로세서(120)는 동일한 들여쓰기가 적용된 줄에 대해 평균 높이를 계산하고, 계산된 평균 높이에 기반하여 동일한 들여쓰기가 적용된 줄의 중심 높이를 결정할 수 있다.
동작 807에서, 프로세서(120)는 각 줄의 중심 높이에 기반하여 모든 줄의 평균 높이를 계산할 수 있다. 사용자는 동일한 줄 내에서 비교적 일정한 크기로 글씨를 쓰는 경향이 있지만 다른 줄에서는 또 다른 크기로 글씨를 작성할 가능성이 있을 수 있다. 여러 줄들에 기재된 손글씨가 유사한 크기를 가지도록 보정하면 보다 보기 좋은 문서로 바꿀 수 있다. 각 줄의 중심 높이가 다를 수 있는데, 프로세서(120)는 각 줄의 중심 높이에 기반하여 모든 줄의 평균 높이를 계산함으로써, 각 줄의 높이를 정규화할 수 있다.
동작 809에서, 프로세서(120)는 평균 높이에 기반하여 문단을 구분할 수 있다. 상기 문단은 하나 또는 여러 개의 문장이 모여 하나의 중심 생각을 나타내는 덩어리로서, '단락'을 의미할 수 있다. 프로세서(120)는 문단 별로 줄 높이를 정규화하기 위하여 문단을 구분할 수 있다. 예를 들어, 프로세서(120)는 줄 간격이 일정 크기 이상인 경우, 새로운 문단으로 구분할 수 있다. 여기서, 줄 간격은 이전 줄의 중심 값와 현재 줄의 중심 값이 차이로 정의할 수 있다. 상기 일정 크기는 평균 높이의 일정 배수가 될 수 있다. 다양한 실시예들에 따르면, 문단이 하나로 구분되는 경우, 프로세서(120)는 이하 동작들을 수행하지 않을 수도 있다.
동작 811에서, 프로세서(120)는 문단에 속하는 줄들의 평균 높이를 계산할 수 있다. 여러 개의 줄이 하나의 같은 문단에 속한다 하더라도, 줄마다 높이(예: 문자 높이 또는 글꼴의 크기)가 다를 수 있다. 프로세서(120)는 같은 문단에 속하는 줄들의 높이를 합하여 줄들의 개수로 나눔으로써 줄들의 평균 높이를 계산할 수 있다.
동작 813에서, 프로세서(120)는 문단에 속하는 각 줄의 중심 높이를 평균 높이에 맞도록 크기를 보정(또는 변경)할 수 있다. 프로세서(120)는 같은 문단에 속하는 줄의 높이가 같도록 각 줄의 중심 높이를 평균 높이로 보정할 수 있다. 크기 보정은 각 줄의 중심 높이를 확대 또는 축소하여 줄 높이를 평균 높이로 변경하는 것일 수 있다. 프로세서(120)는 상기 평균 높이에 맞도록 상기 문자로 분류된 손글씨 획들의 줄 높이를 정렬할 수 있다.
다양한 실시예들에 따르면, 손글씨가 하나의 줄로 구성된 경우, 프로세서(120)는 도 8의 흐름도(800)를 수행하지 않을 수 있다.
도 9a 및 9b는 다양한 실시예들에 따른 전자 장치에서 줄 높이를 조절하는 일례를 도시한 도면들이다.
도 9a는 비교예에 따른 부분 영역별 높이를 계산하는 일례를 도시한 것이다.
도 9a를 참조하면, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101)의 프로세서(예: 도 1의 프로세서(120))는 문자에 대응하는 손글씨의 줄을 분류할 수 있다. 프로세서(120)는 참조번호(930)와 같이 작성된 손글씨를 세 개의 줄로 분류할 수 있다. 프로세서(120)는 각 줄에 포함된 문자를 부분 영역을 구분하고, 상기 부분 영역의 평균 높이에 기반하여 각 줄의 중심 높이를 결정할 수 있다. 프로세서(120)는 참조번호(910)와 같이 제1 줄을 복수의 부분 영역으로 구분할 수 있다. 예를 들어, 프로세서(120)는 제1 부분 영역(예: 알파벳 C 포함)을 구분하고, 문자의 일부(예: 알파벳 a 의 일부)를 포함하고, 제1 부분 영역과 일부분(예: 제1 부분 영역의 1/2)이 중첩되도록 제2 부분 영역(예: 알파벳 C 의 일부 또는 알파벳 o의 전부)을 구분하고, 문자의 일부(예: 알파벳 o 의 일부)를 포함하고, 상기 제2 부분 영역과 일부분이 중첩되도록 제3 부분 영역(예: 알파벳 o의 일부 또는 알파벳 n의 전부)을 구분할 수 있다. 프로세서(120)는 상기 부분 영역들의 평균 높이에 기반하여 각 줄의 중심 높이를 결정할 수 있다.
비교예에 따르면, 참조번호(930)와 같이 작성된 손글씨에 대해서, 일부 부분 영역에 포함된 중심 높이를 제외하지 않고, 각 줄에 포함된 모든 부분 영역들의 평균 높이를 계산하여, 각 줄의 중심 높이에 오차가 발생할 수 있다. 예를 들어, 비교예에 따르면, 제1 줄의 중심 높이(913)는 100mm, 제2 줄의 중심 높이(933)는 95mm, 제3 줄의 중심 높이(935)는 110mm로 계산할 수 있다.
도 9b는 다양한 실시예들에 따른 전자 장치에서 부분 영역별 높이를 계산하는 일례를 도시한 것이다.
도 9b를 참조하면, 프로세서(120)는 참조번호(950)와 같이 각 줄에 포함된 전체 부분 영역의 높이 또는 각 부분 영역의 평균 높이에서 제1 임계치(예: 60%)를 초과하거나, 제2 임계치(예: 40%) 미만인 중심 높이를 제외하고, 나머지 중심 높이에 기반하여 각 줄에 포함된 부분 영역의 평균 높이를 계산할 수 있다. 예를 들어, 참조번호(950)와 같이 작성된 손글씨에서는 알파벳 "C"를 포함하는 부분 영역의 중심 높이가 제1 임계치를 초과하는 경우, 또는 알파벳 "a" 또는 "o"를 포함하는 부분 영역의 중심 높이가 제2 임계치 미만인 경우, 프로세서(120)는 상기 부분 영역의 중심 높이를 평균 높이 계산에서 제외할 수 있다. 프로세서(120)는 일부 부분 영역의 중심 높이를 제외한 나머지 부부 영역의 중심 높이에 기반하여 줄의 평균 높이를 계산할 수 있다. 프로세서(120)는 상기 부분 영역의 평균 높이에 기반하여 각 줄의 중심 높이를 결정할 수 있다. 예를 들어, 비교예에 따르면, 제1 줄의 중심 높이(951)는 98mm, 제2 줄의 중심 높이(953)는 98mm, 제3 줄의 중심 높이(935)는 100mm로 계산할 수 있다.
다양한 실시예들에 따르면, 프로세서(120)는 평균 높이에 기반하여 문단을 구분하고, 문단에 속하는 줄들의 평균 높이를 계산하고, 문단에 속하는 각 줄의 중심 높이를 평균 높이에 맞도록 크기 보정할 수 있다. 참조번호(950)와 같이 작성된 손글씨에서는 같은 문단으로 구분하는 줄이 없으므로, 문단별 평균 높이를 정규화하는 과정이 생략될 수 있다.
도 10은 다양한 실시예들에 따른 전자 장치에서 줄 간격을 조절하는 일례를 도시한 도면이다.
도 10을 참조하면, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101)의 프로세서(예: 도 1의 프로세서(120))는 상기 문자로 분류된 손글씨 획들에 각 줄의 중심 높이 영역을 기준으로 상기 문자로 분류된 손글씨 획들의 줄 간격을 조절하거나, 각 줄의 중심점을 기준으로 상기 문자로 분류된 손글씨 획들의 줄 간격을 조절할 수 있다. 줄 간격은 두 줄을 나누는 수직의 간격으로, 글꼴의 크기에 비례할 수 있다. 손글씨에 여러 개의 줄이 존재할 경우, 각 줄 간격을 동일하게 조정하게 되면 손글씨가 더욱 깔끔하게 보일 수 있다. 줄 높이 정규화 방법과 마찬가지로 줄 간격 조정 방법은 일정한 개수의 문단(paragraph)으로 나눠지는 경우, 각 문단별로 줄 간격 조절을 수행할 수 있다. 프로세서(120)는 각 줄의 외접 영역이 아닌 중심 높이 영역을 기준으로 두 줄 간의 간격을 조절할 수 있다. 예를 들어, 프로세서(120)는 제1 줄의 중심 높이 영역의 아래 위치(1011)와 제2 줄의 중심 높이의 위쪽 위치(1012) 간을 조절하여 제1 줄과 제2 줄의 간격을 조절할 수 있다. 또한, 프로세서(120)는 제2 줄의 중심 높이 영역의 아래 위치(1013)와 제3 줄의 중심 높이의 위쪽 위치(1014) 간을 조절하여 제2 줄과 제3 줄의 간격을 조절할 수 있다.
다양한 실시예들에 따르면, 프로세서(120)는 줄 높이가 서로 유사한 경우, 각 줄의 중심 위치를 기준으로 줄 간격을 조절할 수 있다. 서로 다른 줄들 간의 높이가 서로 유사한 경우, 프로세서(120)는 줄 높이와 동일 또는 유사하게 줄 간격을 조절할 수 있다. 또는, 프로세서(120)는 줄 높이가 서로 상이한 경우, 각 줄의 중심점을 기준으로 줄 간격을 조절할 수 있다. 프로세서(120)는 손글씨에 3개 이상의 줄이 포함되는 경우, 제일 위쪽에 위치한 줄(예: 제1 줄)과 제일 아래쪽의 위치한 줄(예: 제3 줄)의 중심점을 고정하고, 그 사이에 존재 있는 줄(예: 제2 줄)의 위치를 동일하게 맞출 수 있다. 또는, 프로세서(120)는 특정 줄(예: 제1 줄 또는 제3 줄)의 중심 위치를 고정하지 않고, 각 줄의 중심 높이 영역을 기준으로 줄 간격을 더블 스페이싱(double spacing) 조절할 수 있다.
다양한 실시예들에 따르면, 프로세서(120)는 문단별 줄 간격을 조절할 수 있다. 예를 들어, 프로세서(120)는 제1 문단 내 줄 간격과 제2 문단 내 줄 간격을 동일 또는 상이하게 조절할 수 있다. 또는, 프로세서(120)는 제1 문단과 제2 문단 간의 줄 간격을 각 문단에 포함된 줄 간격과 동일 또는 상이하게 조절할 수 있다.
도 11은 다양한 실시예들에 따른 전자 장치의 비문자 정렬 방법을 도시한 흐름도(1100)이다. 도 11은 도 3b의 동작 315와 동작 317을 구체화한 것일 수 있다.
비문자(non-text)는 '글자'가 아닌 획들로서 문자(text, letter) 밑에 쓴 밑줄이나, 동그라미와 같은 도형, 스케치, 그림이 포함될 수 있다. 비문자에 포함된 획들도 문자와 함께 조화롭게 어울리며 정렬시킬 수 있다. 비문자 정렬 방법은 비문자로 분류된 모든 획들을 특정한 방법에 따라 여러 개의 비문자 그룹으로 그룹화하고, 그룹화된 비문자 그룹을 문자 그룹에 매칭시켜 정렬할 수 있다. 예를 들어, 상기 비문자 정렬 방법은 비문자로 분류된 모든 획들을 대상으로 도형 인식을 통해 도형에 해당하는 획들을 하나의 비문자 그룹으로 구분하거나, 여러 도형이 인식된 경우 각각의 도형을 비문자 그룹으로 구분하거나, 도형이 아닌 획들 중 일정 크기 이상의 큰 덩어리로 판단되는 획을 비문자 그룹으로 구분하거나, 나머지 획들을 클러스터링하여 클러스터링된 덩어리들을 각각 비문자 그룹으로 구분하고, 그룹화된 각각의 비문자 그룹을 문자 그룹에 매칭시켜 정렬할 수 있다.
도 11을 참조하면, 동작 1101에서, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101)의 프로세서(예: 도 1의 프로세서(120))는 도형 인식을 수행할 수 있다. 프로세서(120)는 비문자로 분류된 획들에 대해서 도형 인식을 수행할 수 있다. 상기 도형은 그림의 모양이나 형태를 일컫는 것으로, 예를 들어, 원, 구, 사각형, 별과 같은 모양을 가질 수 있다.
동작 1103에서, 프로세서(120)는 상기 도형 인식에 기반하여 도형인지 여부를 판단할 수 있다. 프로세서(120)는 비문자에 해당하는 손글씨가 도형인 경우 동작 1105을 수행하고, 비문자에 해당하는 손글씨가 도형이 아닌 경우 동작 1109를 수행할 수 있다.
비문자에 해당하는 손글씨가 도형이 아닌 경우 동작 1109에서, 프로세서(120)는 비도형 획들을 클러스터링할 수 있다. 프로세서(120)는 유사한 모양 또는 크기의 획들을 하나의 그룹으로 구분할 수 있다. 예를 들어, 프로세서(120)는 특정 크기 이상의 획(예: 크기가 임계치 초과)이나 특정 개수 이상의 점들을 가지는 획들(예: 개수가 임계치 초과)을 하나의 그룹으로 구분하거나 또는 일정한 영역 내 군집된 획들을 하나의 그룹으로 구분할 수 있다. 예를 들어, 머리카락을 표현하듯이 사용자의 얼굴(예: 원형이 도형)에 근접하게 짧거나 긴 획들이 존재하는 경우, 프로세서(120)는 특정 개수 이상의 획들을 하나의 그룹으로 분류할 수 있다. 또는, 주근깨를 표현하듯이 사용자의 얼굴(예: 원형이 도형) 안에 점을 찍은 경우, 프로세서(120)는 일정한 영역(예: 사용자의 얼굴) 내 군집된 획들을 하나의 그룹으로 구분할 수 있다. 프로세서(120)는 비도형 획들을 클러스터링하여 적어도 하나의 비도형 그룹으로 할당하고, 동작 1105을 수행할 수 있다.
동작 1105에서, 프로세서(120)는 문자 그룹에 포함된 특징점 분포와 비문자(또는 비문자 그룹)의 정해진 위치에 기반하여 매칭할 문자 그룹을 결정할 수 있다. 문자로 분류된 획들과는 달리, 비문자로 분류된 획들은 자체적으로 정렬을 위한 논리적인 개념이 없어, 주변의 문자와 잘 어울리도록 정렬할 수 있다. 상기 비문자 그룹은 도형으로 분류된 그룹과 비도형으로 분류된 그룹을 포함할 수 있다. 상기 비문자 그룹의 정해진 위치는 비문자 그룹의 중심점 또는 특정 위치를 포함할 수 있다. 프로세서(120)는 비문자 그룹의 정렬을 위해 비문자 그룹이 소속된 문자 그룹을 찾을 수 있다. 특징점 분포에 기반한 거리 측정 방법은 비문자 그룹의 중심점과 가장 가까운 문자의 특징점간의 유크리드 거리(Euclidean distance)를 사용할 수 있으나, 유크리드 거리에 기반하여 비문자 그룹에 소속되는 문자 그룹(또는 문자 줄)을 찾는 경우 에러가 발생할 수 있다.
프로세서(120)는 비문자 그룹과 인접한 문자 열에 포함된 문자 그룹의 특징점 분포와 비문자 그룹의 정해진 위치를 마할라노비스 거리(Mahalanobis Distance)에 적용하여 매칭할 문자 그룹을 결정할 수 있다. 예를 들어, 유크리드 거리는 단순히 거리가 가까운 것으로만 매칭한다면, 프로세서(120)는 마할라모비스 거리에 따라 특징점들 간의 상관관계를 고려하여 비문자 그룹과 매칭할 문자 그룹을 결정할 수 있다. 문자 그룹(또는 문자 열 그룹)은 가로 방향으로 작성하므로, 프로세서(120)는 비문자(또는 비문자 그룹)의 정해진 위치로부터 가장 가까운 거리를 가지는 가로 방향으로 작성된 문자 그룹이 있는지 여부를 검색할 수 있다.
동작 1107에서, 프로세서(120)는 상기 결정된 문자 그룹에 적용된 정렬 파라미터를 비문자 그룹에 적용할 수 있다. 프로세서(120)는 상기 결정된 문자 그룹에 적용된 정렬 파라미터를 상기 비문자 그룹에 동일하게 적용할 수 있다. 상기 정렬 파라미터는 문자로 분류된 손글씨 획들의 정렬과 연관된 파라미터로서, 예를 들어, 손글씨 기울기, 들여쓰기, 줄 높이, 또는 줄 간격 중 어느 하나에 대한 파라미터를 포함할 수 있다. 프로세서(120)는 상기 정렬 파라미터에 기반하여 상기 비문자 그룹에 대하여 회전, 위치 이동, 크기 변경(예: 확대/축소) 중 적어도 하나를 수행할 수 있다. 예를 들어, 상기 회전 파라미터는 손글씨 기울기에 대응되고, 상기 위치 이동 파라미터는 손글씨 기울기 또는 들여쓰기에 대응되고, 상기 크기 변경 파리미터는 상기 줄 높이 또는 상기 줄 간격에 대응될 수 있다.
다양한 실시예들에 따르면, 프로세서(120)는 상기 분류된 획이 비문자에 해당하는 경우, 비문자로 분류된 모든 획들을 클러스터링하여 그룹화하고, 그룹화된 비문자 그룹을 문자 그룹에 매칭시켜 정렬할 수 있다. 프로세서(120)는 마하라노비스 거리를 사용하여 비문자 그룹과 문자 그룹을 매칭할 수 있다. 예를 들어, 프로세서(120)는 상기 문자 그룹과 상기 비문자 그룹의 거리가 임계치 이하인 경우, 상기 문자 그룹에 적용된 정렬 파라미터로 상기 비문자 그룹을 정렬하고, 상기 문자 그룹과 상기 비문자 그룹의 거리가 임계치를 초과하는 경우, 상기 비문자 그룹을 정렬하지 않을 수 있다.
다양한 실시예들에 따르면, 프로세서(120)는 비도형 그룹과 도형 그룹 간의 거리가 임계치 이하인 경우, 상기 도형 그룹과 상기 비도형 그룹을 하나의 통합 그룹(또는 하나의 비문자 그룹)으로 할당하고, 상기 통합 그룹과 매칭된 문자 그룹에 적용된 정렬 파라미터를 적용하여 상기 통합 그룹(또는 하나의 비문자 그룹)을 정렬할 수 있다. 프로세서(120)는 수많은 비문자 획들을 몇 개의 비문자 그룹으로 확정할 때, 도형 인식을 사용하여 각각의 도형을 비문자 그룹으로 만들 수 있고, 특정하게 큰 획들을 독립된 비문자 그룹으로 만들고, 나머지 획들을 클러스터링하여 만들어진 획 덩어리들을 또 각각의 비문자 그룹으로 만들 수 있다. 도형이 아닌 비문자 획들로부터 만들어진 비문자 그룹이 도형과의 관련성이 있을 수 있기 때문에, 프로세서(120)는 도형 그룹과 위치가 유사한 비도형 그룹의 경우, 두 개(이상)의 독립된 비문자 그룹을 하나의 통합된 비문자 그룹으로 합칠 수 있다. 프로세서(120)는 상기 도형 그룹과 상기 비도형 그룹 간의 거리가 임계치 이하(예: 유사성 있음)인 비문자 그룹(예: 도형 그룹, 비도형 그룹, 통합 그룹)에 대해서는 비문자 그룹에 매칭된 문자 그룹의 정렬 파라미터로 정렬할 수 있다. 프로세서(120)는 상기 도형 그룹과 상기 비도형 그룹 간의 거리가 임계치를 초과(예: 유사성 없음)하는 비문자 그룹(예: 도형 그룹, 비도형 그룹, 통합 그룹)에 대해서는 정렬을 수행하지 않을 수 있다.
도 12는 다양한 실시예들에 따른 전자 장치에서 비문자를 정렬하는 일례를 도시한 도면이다.
도 12를 참조하면, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101)의 프로세서(예: 도 1의 프로세서(120))는 제1 사용자 인터페이스(1210)와 같이, 사용자로부터 손글씨를 입력받을 수 있다. 프로세서(120)는 손글씨 정렬을 요청받은 경우, 손글씨에 포함된 획을 분석하여 문자에 해당하는 획들(예: 1211, 1213, 1214, 1215)과 비문자에 해당한 획들(예: 1221, 1222, 1223, 1224)으로 분류할 수 있다. 프로세서(120)는 문자로 분류된 손글씨의 획들에 대해서 문자 정렬 방법에 기반하여 문자를 정렬하고, 비문자로 분류된 획들에 대해서 문자 그룹과의 매칭 여부에 기반하여 비문자로 분류된 획들을 정렬할 수 있다. 프로세서(120)는 문자로 분류된 손글씨 획들을 포함하는 문자 그룹으로부터 제1 줄(1211), 제2 줄(1213), 제3 줄(1214), 제4 줄(1215)로 분류할 수 있다. 상기 줄은 하나 이상의 문자를 포함하는 문자 그룹을 의미할 수 있다. 프로세서(120)는 제1 줄(1211) 내지 제4 줄(1215)에 대하여 손글씨 기울기 판단 방법(예: 도 4의 흐름도(400)), 들여쓰기 결정 방법(예: 도 6의 흐름도(600), 줄 높이 결정 방법(예: 도 8의 흐름도(800), 또는 줄 간격 조절 방법(예: 도 10)을 순차적으로 수행하거나, 순서에 상관없이 수행할 수 있다.
다양한 실시예들에 따르면, 프로세서(120)는 비문자에 해당한 획들에 대해서 도형 인식을 수행하여 제1 도형(1221), 제2 도형(1222), 제3 도형(1223), 제4 도형(1224)을 인식할 수 있다. 프로세서(120)는 제1 도형을 제1 그룹으로 할당하고, 제2 도형(1222)을 제2 그룹으로 할당하고, 제3 도형(1223)을 제3 그룹으로 할당하고, 제4 도형(1224)을 제4 그룹으로 할당할 수 있다. 다양한 실시예들에 따르면, 프로세서(120)는 도형 인식을 수행하여 도형이 아닌 획에 대해서 비도형 획(1225)을 분류할 수 있다. 비도형 획(1225)이 하나이므로, 프로세서(120)는 비도형 획(1225)에 대해서 클러스터링을 수행하지 않을 수 있다. 프로세서(120)는 도형이 아닌 것으로 분류된 비도형(1225)을 비도형 그룹으로 할당할 수 있다.
프로세서(120)는 문자 그룹(문자 열 그룹)에 포함된 특징점 분포와 비문자 그룹의 정해진 위치에 기반하여 비문자 그룹에 매칭되는 문자 그룹을 결정할 수 있다. 상기 비문자 그룹은 도형 그룹과 비도형 그룹을 포함할 수 있다. 비문자 그룹의 정해진 위치는 비문자 그룹의 중심점 또는 특정 위치를 포함할 수 있다. 예를 들어, 프로세서(120)는 제1 도형(1221)을 제1 줄(1211)에 매칭하고, 제2 도형(122)을 제2 줄(1213)에 매칭하고, 비도형(1225)을 제2 줄(1213)에 매칭하고, 제3 도형(1223)을 제3 줄(1214)에 매칭하고, 제4 도형(1224)을 제4 줄(1215)에 매칭할 수 있다.
다양한 실시예들에 따르면, 프로세서(120)는 비도형 획(1225)과 도형(예: 제1 도형(1221) 내지 제4 도형(1224))간의 거리가 임계치 이하인지 여부를 판단하여 비도형 획(1225)과 도형 간의 유사성을 판단할 수 있다. 프로세서(120)는 비도형 획(1225)과 제2 도형(1222) 간의 거리가 임계치 이하인 경우, 비도형 획(1225)과 제2 도형(1222)을 하나의 통합된 비문자 그룹으로 합칠 수 있다. 프로세서(120)는 비도형 획(1225)과 제2 도형(1222)을 포함하는 비문자 그룹에 대하여 동일한 문자 그룹(예: 제2 줄(1213))에 매칭할 수 있다.다양한 실시예들에 따르면, 프로세서(120)는 제2 사용자 인터페이스(1230)와 같이, 손글씨를 정렬할 수 있다. 프로세서(120)는 제1 줄(1211), 제2 줄(1213), 제3 줄(1214), 제4 줄(1215)에 포함된 문자로 분류된 손글씨 획들을 정렬할 수 있다.
프로세서(120)는 비문자로 분류된 손글씨 획들을 그룹화한 비문자 그룹에 매칭되는 문자 그룹을 결정하여, 상기 매칭된 문자 그룹에 적용된 정렬 파라미터를 비문자 그룹에 적용할 수 있다. 예를 들어, 프로세서(120)는 제1 줄(1211)의 정렬 파라미터를 제1 도형(1231)에 적용하여 제1 도형(1231)을 정렬하고, 제2 줄(1213)의 정렬 파라미터를 제2 도형(1232) 및 비도형 획(1235)에 적용하여 제2 도형(1232)을 정렬하고, 제3 줄(1214)의 정렬 파라미터를 제3 도형(1233)에 적용하여 제3 도형(1233)을 정렬하고, 제4 줄(1215)의 정렬 파라미터를 제4 도형(1234)에 적용하여 제4 도형(1234)을 정렬할 수 있다. 프로세서(120)는 문자 그룹(예: 제2 줄(1213))에 매칭되는 비문자 그룹(예: 비도형 획(1225)과 제2 도형(1222))을 문자 그룹에 적용된 정렬 파라미터를 적용하여 비문자로 분류된 손글씨 획들을 정렬할 수 있다.
도 13a 내지 도 13c는 다양한 실시예들에 따른 전자 장치에서 손글씨를 정렬하는 사용자 인터페이스를 도시한 도면들이다.
도 13a는 다양한 실시예들에 따른 전자 장치에서 손글씨를 정렬하는 사용자 인터페이스를 도시한 것이다.
도 13a를 참조하면, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101)의 프로세서(예: 도 1의 프로세서(120))는 제1 사용자 인터페이스(1310)와 같이, 사용자로부터 손글씨를 입력받을 수 있다. 프로세서(120)는 제1 사용자 인터페이스(1310)에서 정렬 버튼(1311)을 선택하면, 제2 사용자 인터페이스(1320)를 제공할 수 있다. 제2 사용자 인터페이스(1320)는 손글씨를 정렬하여 표시하고, 손글씨 정렬 영역을 선택하는 인디케이터(1321, 1323)를 포함할 수 있다. 프로세서(120)는 제2 사용자 인터페이스(1320)를 프리뷰 형태로 표시하거나, 손글씨 정렬이 적용된 형태로 표시할 수 있다. 프리뷰 형태로 표시하는 경우, 사용자가 취소 또는 뒤로가기를 선택하면 정렬하기 전의 제1 사용자 인터페이스(1310)로 돌아갈 수 있다.
제1 인디케이터(1321)는 전자 장치(101)의 디스플레이 모듈(예: 도 1의 디스플레이 모듈(160))의 위쪽에 배치되고, 제2 인디케이터(1323)는 디스플레이 모듈(160)의 아래쪽에 배치될 수 있다. 사용자는 제1 인디케이터(1321) 또는 제2 인디케이터(1323)를 수직 방향(예: 위, 아래)으로 이동시켜 손글씨 정렬 영역을 선택할 수 있다. 예를 들어, 프로세서(120)는 사용자 입력에 기반하여 제1 인디케이터(1321)를 아래 방향으로 이동시키고, 제2 인디케이터(1323)를 위쪽 방향으로 이동시켜 손글씨 정렬 영역을 설정하는 제3 사용자 인터페이스(1330)를 제공할 수 있다. 제3 사용자 인터페이스(1330)는 손글씨 정렬 영역을 제1 영역(1331), 제2 영역(1332), 제3 영역(1333)으로 구분한 것일 수 있다. 예를 들어, 프로세서(120)는 제1 인디케이터(1321)와 제2 인디케이터(1323) 사이에 위치한 제2 영역(1332)에 대해서만 손글씨를 정렬하고, 제1 영역(1331) 및 제3 영역(1323)에 대해서는 손글씨를 정렬하지 않을 수 있다.
도 13b는 다양한 실시예들에 따른 전자 장치에서 손글씨를 정렬하는 다른 사용자 인터페이스를 도시한 것이다.
도 13b를 참조하면, 프로세서(120)는 제1 사용자 인터페이스(1310)에서 정렬 버튼(1311)을 선택하면, 제4 사용자 인터페이스(1340)를 제공할 수 있다. 제4 사용자 인터페이스(1340)는 사용자로부터 정렬을 원하는 영역을 직접 선택받는 예시일 수 있다. 사용자는 펜이나 손으로 원하는 정렬 영역을 직접 선택할 수 있다. 프로세서(120)는 점이나 선과 같은 작은 영역이 아니라, 제4 사용자 인터페이스(1340)와 같이 넓은 영역을 선택할 수 있는 문지르기를 통해 사용자에 의해 터치된 영역(예: 음영 표시)을 손글씨 정렬 영역으로 설정할 수 있다. 프로세서(120)는 사용자 입력이 해제(예: 손이나 펜으로 문지른 후 떼면)되거나, 사용자 입력이 해제된 후 일정 시간 지나거나, 또는 완료 버튼(또는 정렬 버튼)을 선택하면, 정렬을 수행할 수 있다.
도 13c는 다양한 실시예들에 따른 전자 장치에서 손글씨를 정렬하는 또 다른 사용자 인터페이스를 도시한 것이다.
도 13c를 참조하면, 프로세서(120)는 제1 사용자 인터페이스(1310)에서 정렬 버튼(1311)을 선택하면, 제5 사용자 인터페이스(1350)를 제공할 수 있다. 제5 사용자 인터페이스(1350)는 마우스의 영역 선택과 같이 사용자로부터 정렬을 원하는 영역을 직접 선택받는 예시일 수 있다. 사용자는 제1 위치(예: 사각형의 왼쪽 모서리)에서 대각선으로 제2 위치(예: 사각형의 오른쪽 모서리)로 이동시키는 영역 선택 기능을 이용하여 원하는 정렬 영역을 직접 선택할 수 있다. 프로세서(120)는 사각형 영역(1355)을 손글씨 정렬 영역으로 설정할 수 있다. 프로세서(120)는 손글씨 정렬 영역이 선택되면, 기능 리스트(1351)를 표시할 수 있다. 기능 리스트(1351)는 선택된 영역에 대해 편집할 수 있는 다양한 기능(예: 잘라내기, 복사, 붙여넣기, 삭제)을 포함할 수 있다. 기능 리스트(1351)는 팝업 윈도우로 표시될 수 있으며, 손글씨 위에 중첩시켜 표시될 수 있다.
다양한 실시예들에 따르면, 프로세서(120)는 제5 사용자 인터페이스(1350)에서 추가 버튼(1353)이 선택되면, 제6 사용자 인터페이스(1360)를 제공할 수 있다. 제6 사용자 인터페이스(1360)는 선택된 영역에 대한 추가 기능 리스트(1361)를 포함할 수 있다. 추가 기능 리스트(1361)는 기능 리스트(1351)에 표시되지 않는 다른 기능(예: 스타일 변경, 텍스트로 변환, 수평 맞추기, 클립보드 보기)을 포함할 수 있다.
다양한 실시예들에 따르면, 프로세서(120)는 추가 기능 리스트(1361)에서 수평 맞추기(1363)가 선택되면, 제7 사용자 인터페이스(1370)를 제공할 수 있다. 제7 사용자 인터페이스(1370)는 정렬된 화면을 표시하는 예시일 수 있다. 제7 사용자 인터페이스(1370)는 손글씨가 정렬되지 않은 영역(1371)과 손글씨가 정렬된 영역(1373)을 포함할 수 있다. 프로세서(120)는 사각형 영역(1355)에 포함된 손글씨(예: ①. love, ♡, ② Eyes, ③ pocket)에 대해서 기울기(예: 손글씨 기울기)를 정렬하고, 사각형 영역(1355)에 포함되지 않은 손글씨(예: How deep is your)에 대해서 정렬하지 않을 수 있다.
도 14a 및 도 14b는 다양한 실시예들에 따른 전자 장치에서 들여쓰기를 설정하는 사용자 인터페이스를 도시한 도면들이다.
도 14a는 다양한 실시예들에 따른 전자 장치에서 들여쓰기를 설정하는 사용자 인터페이스를 도시한 도면이다.
도 14a를 참조하면, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101)의 프로세서(예: 도 1의 프로세서(120))는 들여쓰기 인디케이터(1411, 1413)를 포함하는 제1 사용자 인터페이스(1410)를 표시할 수 있다. 제1 사용자 인터페이스(1410)는 사용자가 수동으로 들여쓰기 위치를 조절하기 위한 들여쓰기 인디케이터(1411, 1413)를 포함할 수 있다. 사용자는 제1 들여쓰기 인디케이터(1411), 및 제2 들여쓰기 인디케이터(1413)의 위치를 수평 방향(예: 좌, 우)로 조정하여, 들여쓰기 위치를 직접 조절할 수 있다. 프로세서(120)는 제1 들여쓰기 인디케이터(1411), 및 제2 들여쓰기 인디케이터(1413)를 조절하여 문자로 분류된 손글씨 획들을에 대해서 왼쪽 정렬 또는 오른쪽 정렬할 수 있다.
또는, 프로세서(120)는 손글씨의 줄 분류 또는 손글씨의 문단을 분류하여 들여쓰기 인디케이터(1431, 1433)를 포함하는 제2 사용자 인터페이스(1420)를 표시할 수 있다. 제2 사용자 인터페이스(1420)는 각 줄 또는 문단에 따라 들여쓰기를 다르게 적용하기 위해서 적어도 두 개의 들여쓰기 인디케이터(1431, 1433)를 포함할 수 있다. 프로세서(120)는 사용자 입력에 기반하여 제1 들여쓰기 인디케이터(1431)를 조절하여 제1 줄(예: How deep is your)의 들여쓰기 위치를 조절하고, 제2 들여쓰기 인디케이터(1433)를 조절하여 제2 줄 내지 제3 줄(예: ①. love, ♡, ② Eyes, ③ pocket)의 들여쓰기 위치를 조절할 수 있다. 예를 들어, 프로세서(120)는 제1 줄 내지 제4 줄을 분류하고, 제1 줄은 제1 문단이고, 제2 줄 내지 제4 줄은 제2 문단으로 분류할 수 있다. 프로세서(120)는 제1 문단에 대응하는 제1 들여쓰기 인디케이터(1431)와 제2 문단에 대응하는 제2 들여쓰기 인디케이터(1433)를 제공할 수 있다. 사용자는 제1 들여쓰기 인디케이터(1431)와 제2 들여쓰기 인디케이터(1433)를 조절하여 제1 문단과 제2 문단에 대해서 동일하게 또는 다르게 들여쓰기를 적용시킬 수 있다.
도 14b는 다양한 실시예들에 따른 전자 장치에서 들여쓰기를 설정하는 다른 사용자 인터페이스를 도시한 도면이다.
도 14b를 참조하면, 프로세서(120)는 들여쓰기 인디케이터(1451, 1453)를 포함하는 제3 사용자 인터페이스(1450)를 표시할 수 있다. 예를 들어, 프로세서(120)는 제1 줄 내지 제4 줄을 분류하고, 각 줄의 왼쪽 끝 및 오른쪽 끝에 각각 들여쓰기 인디케이터를 포함하는 제3 사용자 인터페이스(1450)를 표시할 수 있다. 예를 들어, 제3 사용자 인터페이스(1450)는 제1 줄에 해당하는 왼쪽 끝에 제1 들여쓰기 인디케이터(1451) 및 제2 줄에 해당하는 왼쪽 끝에 제2 들여쓰기 인디케이터(1453)를 포함할 수 있다.
프로세서(120)는 사용자 입력에 기반하여 제2 줄 내지 제4 줄에 해당하는 왼쪽 끝에 표시된 들여쓰기 인디케이터가 선택되는 경우, 제4 사용자 인터페이스(1470)를 제공할 수 있다. 제4 사용자 인터페이스(1470)는 제2 줄 내지 제4 줄이 들여쓰기가 적용된 예시일 수 있다. 예를 들어, 프로세서(120)는 들여쓰기 인디케이터가 한번 선택되면, 설정된 영역만큼 줄의 문자로 분류된 손글씨 획들을 수평(예: 좌, 우)으로 이동시킬 수 있다.
도 15a 내지 도 15c는 다양한 실시예들에 따른 전자 장치에서 사용자 제스처에 따라 손글씨를 정렬하는 사용자 인터페이스를 도시한 도면들이다.
도 15a는 다양한 실시예들에 따른 전자 장치에서 사용자 제스처에 따라 손글씨를 정렬하는 사용자 인터페이스를 도시한 도면이다.
도 15a를 참조하면, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101)는 전자 장치 하우징의 평행한 두 측면의 길이가, 나머지 평행한 두 측면의 길이보다 길거나, 짧게 형성될 수 있다. 사용자가 전자 장치(101)의 디스플레이(예: 도 1의 디스플레이 모듈(160))를 정면으로 보고 있을 때, 전자 장치 하우징의 평행한 두 측면의 짧은 길이가 위로 오는 경우 수직 방향(또는 세로 방향)이고, 전자 장치 하우징의 평행한 두 측면의 긴 길이가 위로 오는 경우 수평 방향(또는 가로 방향)일 수 있다.
프로세서(예: 도 1의 프로세서(120))는 손글씨를 입력받고, 전자 장치(101)가 수직 방향인 상태에서 전자 장치(101)의 아래 측면에 충격을 가하는 사용자 제스처를 검출할 수 있다. 상기 사용자 제스처는 여러 장의 종이를 정렬할 때, 책상에 종이를 툭툭 쳐서 종이를 정렬하는 것과 유사한 제스처일 수 있다. 예를 들어, 제1 상황(1510)과 같이, 사용자는 전자 장치(101)를 수직 방향으로 잡은 상태에서, 손으로 전자 장치(101)의 아래 측면을 칠 수 있다. 또는, 제2 상황(1520)과 같이, 사용자는 전자 장치(101)가 수직 방향인 상태에서, 평면(예: 책상)에 전자 장치(101)의 아래 측면을 칠 수 있다. 프로세서(120)는 제1 상황(1510) 또는 제2 상황(1520)과 같은 사용자 제스처가 검출되면, 손글씨가 수직 방향으로 정렬된 제1 사용자 인터페이스(1530)를 제공할 수 있다. 제1 사용자 인터페이스(1530)는 제1 줄(1531)에 포함된 손글씨 기울기를 보정하고, 제2 줄 내지 제4 줄에 포함된 손글씨의 기울기 또는 줄 간격을 보정한 것일 수 있다.
다양한 실시예들에 따르면, 프로세서(120)는 사용자 제스처가 검출된 횟수에 기반하여 손글씨를 정렬할 수 있다. 예를 들어, 프로세서(120)는 사용자 제스처가 한번 검출되면, 손글씨의 기울기를 정렬하고, 사용자 제스처가 두 번 검출되면, 손글씨의 기울기 및 들여쓰기를 정렬하고, 사용자 제스처가 세 번 검출되면, 손글씨의 기울기, 들여쓰기, 줄 간격을 정렬하고, 사용자 제스처가 네 번 검출되면, 손글씨의 기울기, 들여쓰기, 줄 간격, 및 줄 높이를 정렬할 수 있다. 이는, 이해를 돕기 위한 예시일 뿐, 설명에 의해 본 발명이 제한되는 것은 아니다.
도 15b는 다양한 실시예들에 따른 전자 장치에서 사용자 제스처에 따라 손글씨를 정렬하는 다른 사용자 인터페이스를 도시한 도면이다.
도 15b를 참조하면, 프로세서(120))는 손글씨를 입력받고, 전자 장치(101)가 수직 방향 또는 전자 장치(101)가 수평 방향인 상태에서 전자 장치(101)의 왼쪽 측면에 충격을 가하는 사용자 제스처를 검출할 수 있다. 예를 들어, 제3 상황(1540)과 같이, 사용자는 전자 장치(101)를 수직 방향으로 잡은 상태에서, 손으로 전자 장치(101)의 왼쪽 측면을 칠 수 있다. 또는, 제4 상황(1550)과 같이, 사용자는 전자 장치(101)를 수평 방향인 상태에서, 평면(예: 책상)에 전자 장치(101)의 왼쪽 측면을 칠 수 있다. 프로세서(120)는 제3 상황(1540) 또는 제4 상황(1550)과 같은 사용자 제스처가 검출되면, 손글씨가 수평 방향으로 정렬된 제2 사용자 인터페이스(1560)를 제공할 수 있다. 제2 사용자 인터페이스(1560)는 손글씨의 손글씨 기울기가 보정되고, 왼쪽으로 손글씨의 들여쓰기가 정렬된 것일 수 있다. 제2 사용자 인터페이스(1560)와 같이 정렬되면, 오른쪽에 빈 공간이 생성될 수 있다. 사용자는 제2 사용자 인터페이스(1560)와 같이 정렬한 상태에서 빈 공간에 추가적인 손글씨(예: 그림(1571))를 더 입력할 수 있다. 제3 사용자 인터페이스(1570)는 제2 사용자 인터페이스(1560)에 그림(1571)이 더 포함된 예시일 수 있다.
도 15c는 다양한 실시예들에 따른 전자 장치에서 사용자 제스처에 따라 손글씨를 정렬하는 또 다른 사용자 인터페이스를 도시한 도면이다.
도 15c를 참조하면, 프로세서(120))는 손글씨를 입력받고, 전자 장치(101)가 수직 방향 또는 전자 장치(101)가 수평 방향인 상태에서 전자 장치(101)의 오른쪽 측면에 충격을 가하는 사용자 제스처를 검출할 수 있다. 예를 들어, 제5 상황(1580)과 같이, 사용자는 전자 장치(101)를 수직 방향으로 잡은 상태에서, 손으로 전자 장치(101)의 오른쪽 측면을 칠 수 있다. 또는, 제6 상황(1585)과 같이, 사용자는 전자 장치(101)를 수평 방향인 상태에서, 평면(예: 책상)에 전자 장치(101)의 오른쪽 측면을 칠 수 있다. 프로세서(120)는 제5 상황(1580) 또는 제6 상황(1585)과 같은 사용자 제스처가 검출되면, 손글씨의 기울기가 수평 방향으로 정렬된 제4 사용자 인터페이스(1590)를 제공할 수 있다. 제4 사용자 인터페이스(1590)는 손글씨의 손글씨 기울기가 보정되고, 오른쪽으로 손글씨의 들여쓰기가 정렬된 것일 수 있다. 제4 사용자 인터페이스(1590)와 같이 정렬되면, 왼쪽에 빈 공간이 생성될 수 있다. 사용자는 제4 사용자 인터페이스(1590)와 같이 정렬한 상태에서 빈 공간에 추가적인 손글씨(예: 그림(1591))를 더 입력할 수 있다. 제5 사용자 인터페이스(1595)는 제4 사용자 인터페이스(1590)에 그림(1591)이 더 포함된 예시일 수 있다.
본 발명의 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101))의 동작 방법은 손글씨를 문자에 해당하는 획들과 문자에 해당하지 않는 비문자 획들로 분류하는 동작, 문자 정렬 방법에 기반하여 상기 문자로 분류된 손글씨 획들을 정렬하는 동작, 및 상기 비문자 획들과 연관된 문자 그룹을 매칭하고, 상기 매칭된 문자 그룹에 적용된 정렬 파라미터에 기반하여 상기 비문자로 분류된 손글씨 획들을 정렬하는 동작을 포함할 수 있다.
상기 문자로 분류된 손글씨 획들을 정렬하는 동작은, 상기 문자로 분류된 손글씨 획들의 분류된 손글씨 획들의 특징점에 기반하여 손글씨 기울기를 판단하는 동작, 각 줄의 기준 위치에 기반하여 들여쓰기를 결정하는 동작, 줄의 중심 높이에 기반하여 각 줄의 높이를 결정하는 동작, 및 각 줄의 높이에 기반하여 줄 간격을 조절하여 상기 문자로 분류된 손글씨 획들을 정렬하는 동작을 포함할 수 있다.
상기 손글씨 기울기를 판단하는 동작은, 상기 문자로 분류된 손글씨 획들을 부분 영역으로 구분하는 동작, 상기 부분 영역별 특징점을 획득하는 동작, 서로 이웃하는 부분 영역의 특징점에 기반하여 일부 특징점을 제외하는 동작, 및 나머지 특징점에 기반하여 손글씨 기울기를 판단하여 상기 문자로 분류된 손글씨 획들의 기울기를 정렬하는 동작을 포함할 수 있다.
상기 들여쓰기를 결정하는 동작은, 상기 문자로 분류된 손글씨의 줄을 분류하는 동작, 각 줄의 시작 위치를 식별하여 상기 식별된 시작 위치를 클러스터링하는 동작, 및 상기 클러스터링된 줄의 들여쓰기를 결정하여 상기 문자로 분류된 손글씨 획들의 들여쓰기 위치를 정렬하는 동작을 포함할 수 있다.
상기 각 줄의 높이를 결정하는 동작은, 상기 문자로 분류된 손글씨의 줄을 분류하는 동작, 각 줄에 포함된 문자를 부분 영역으로 구분하는 동작, 상기 부분 영역들의 평균 높이에 기반하여 각 줄의 중심 높이를 결정하는 동작, 및 상기 중심 높이에 기반하여 상기 문자로 분류된 손글씨 획들의 줄 높이를 정렬하는 동작을 포함할 수 있다.
상기 각 줄의 높이를 결정하는 동작은, 상기 각 줄의 중심 높이에 기반하여 모든 줄의 평균 높이를 계산하는 동작, 상기 평균 높이에 기반하여 문단을 구분하는 동작, 상기 문단에 속하는 줄들의 평균 높이를 계산하는 동작, 및 상기 문단에 속하는 각 줄의 중심 높이를 평균 높이에 맞도록 상기 문자로 분류된 손글씨 획들의 줄 높이를 정렬하는 동작을 포함할 수 있다.
상기 비문자로 분류된 손글씨 획들을 정렬하는 동작은, 상기 비문자로 분류된 획들에 대해 도형 인식을 통해 도형으로 인식된 획들을 도형 그룹으로 할당하고, 비도형으로 분류된 획들을 클러스터링하여 비도형 그룹으로 할당하여 비문자 그룹을 생성하는 동작, 문자 그룹에 포함된 특징점 분포와 상기 비문자 그룹의 정해진 위치에 기반하여 매칭할 문자 그룹을 결정하는 동작, 및 상기 결정된 문자 그룹에 적용된 정렬 파라미터를 상기 비문자 그룹에 적용하는 동작을 포함할 수 있다.
본 명세서와 도면에 개시된 본 발명의 다양한 실시 예들은 본 발명의 기술 내용을 쉽게 설명하고 본 발명의 이해를 돕기 위해 특정 예를 제시한 것일 뿐이며, 본 발명의 범위를 한정하고자 하는 것은 아니다. 따라서 본 발명의 범위는 여기에 개시된 실시 예들 이외에도 본 발명의 기술적 사상을 바탕으로 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.

Claims (15)

  1. 전자 장치에 있어서,
    디스플레이 모듈;
    메모리; 및
    상기 디스플레이 모듈 상기 메모리와 작동적으로 연결되는 프로세서를 포함하고,
    상기 프로세서는,
    손글씨를 문자에 해당하는 획들과 문자에 해당하지 않는 비문자 획들로 분류하고,
    문자 정렬 방법에 기반하여 상기 문자로 분류된 손글씨 획들을 정렬하고,
    상기 비문자 획들과 연관된 문자 그룹을 매칭하고, 상기 매칭된 문자 그룹에 적용된 정렬 파라미터에 기반하여 상기 비문자로 분류된 손글씨 획들을 정렬하도록 설정된 전자 장치.
  2. 제1항에 있어서, 상기 프로세서는,
    상기 문자로 분류된 손글씨 획들의 특징점에 기반하여 손글씨 기울기를 판단하고, 각 줄의 기준 위치에 기반하여 들여쓰기를 결정하고, 줄의 중심 높이에 기반하여 각 줄의 높이를 결정하고, 각 줄의 높이에 기반하여 줄 간격을 조절하여 상기 문자로 분류된 손글씨 획들을 정렬하도록 설정된 전자 장치.
  3. 제1항에 있어서, 상기 프로세서는,
    문자로 분류된 손글씨 획들을 부분 영역으로 구분하고, 부분 영역별 특징점을 획득하고, 서로 이웃하는 부분 영역의 특징점에 기반하여 일부 특징점을 제외하고, 나머지 특징점에 기반하여 손글씨 기울기를 판단하여 상기 문자로 분류된 손글씨 획들의 기울기를 정렬하도록 설정된 전자 장치.
  4. 제1항에 있어서, 상기 프로세서는,
    상기 문자로 분류된 손글씨의 줄을 분류하고, 각 줄의 시작 위치를 식별하고, 시작 위치를 클러스터링하여 클러스터링된 줄의 들여쓰기를 결정하여 상기 문자로 분류된 손글씨 획들의 들여쓰기 위치를 정렬하도록 설정된 전자 장치.
  5. 제4항에 있어서, 상기 프로세서는,
    상기 식별된 시작 위치가 제1 위치, 제2 위치가 존재하는 경우, 상기 제1 위치, 상기 제2 위치 또는 제1 위치와 제2 위치의 평균 중 적어도 하나를 들여쓰기 위치로 결정하도록 설정된 전자 장치.
  6. 제1항에 있어서, 상기 프로세서는,
    상기 문자로 분류된 손글씨의 줄을 분류하고, 각 줄에 포함된 문자를 부분 영역으로 구분하고, 부분 영역들의 평균 높이에 기반하여 각 줄의 중심 높이를 결정하고, 중심 높이에 기반하여 상기 문자로 분류된 손글씨 획들의 줄 높이를 정렬하도록 설정된 전자 장치.
  7. 제6항에 있어서, 상기 프로세서는,
    각 줄에 포함된 전체 부분 영역의 높이 또는 각 부분 영역의 평균 높이에서 제1 임계치를 초과하거나, 제2 임계치 미만인 중심 높이를 제외하고,
    나머지 중심 높이에 기반하여 각 줄에 포함된 부분 영역의 평균 높이를 계산하도록 설정된 전자 장치.
  8. 제6항에 있어서, 상기 프로세서는,
    각 줄의 중심 높이에 기반하여 모든 줄의 평균 높이를 계산하고, 평균 높이에 기반하여 문단을 구분하고, 문단에 속하는 줄들의 평균 높이를 계산하고, 문단에 속하는 각 줄의 중심 높이를 평균 높이에 맞도록 상기 문자로 분류된 손글씨 획들의 줄 높이를 정렬하도록 설정된 전자 장치.
  9. 제1항에 있어서, 상기 프로세서는,
    상기 문자로 분류된 손글씨 획들에 포함된 각 줄의 중심 높이 영역을 기준으로 상기 문자로 분류된 손글씨 획들의 줄 간격을 조절하거나, 각 줄의 중심점을 기준으로 상기 문자로 분류된 손글씨 획들의 줄 간격을 조절하도록 설정된 전자 장치.
  10. 제1항에 있어서, 상기 프로세서는,
    상기 비문자 획들을 클러스터링하여 그룹화하고, 상기 그룹화된 비문자 획들을 문자 그룹에 매칭시켜 매칭된 문자 그룹의 정렬 파라미터에 기반하여 상기 비문자로 분류된 손글씨 획들을 정렬하도록 설정된 전자 장치.
  11. 제10항에 있어서, 상기 프로세서는,
    상기 비문자 획들 중에서, 도형 인식(shape recognition)을 통해 도형으로 인식된 비문자 획들을 도형 그룹으로 할당하고, 비도형으로 분류된 비문자 획들을 클러스터링하여 비도형 그룹으로 할당하여 비문자 그룹을 생성하고, 상기 문자 그룹에 포함된 특징점 분포와 상기 비문자 그룹의 정해진 위치에 기반하여 매칭할 문자 그룹을 결정하고, 결정된 문자 그룹에 적용된 정렬 파라미터를 상기 비문자 그룹에 적용하도록 설정된 전자 장치.
  12. 제10항에 있어서, 상기 프로세서는,
    비도형 그룹과 도형 그룹 간의 거리가 임계치 이하인 경우, 상기 도형 그룹과 상기 비도형 그룹을 하나의 통합 그룹으로 만들고, 상기 통합 그룹과 매칭된 문자 그룹에 적용된 정렬 파라미터를 적용하여 상기 통합 그룹을 정렬하도록 설정된 전자 장치.
  13. 제11항에 있어서, 상기 프로세서는,
    상기 문자 그룹과 상기 비문자 그룹 간의 거리가 임계치를 초과하거나, 또는 상기 도형 그룹과 상기 비도형 그룹 간의 거리가 임계치를 초과하는 비문자 그룹에 대해서 정렬하지 않도록 설정된 전자 장치.
  14. 전자 장치의 동작 방법에 있어서,
    손글씨를 문자에 해당하는 획들과 문자에 해당하지 않는 비문자 획들로 분류하는 동작;
    문자 정렬 방법에 기반하여 상기 문자로 분류된 손글씨 획들을 정렬하는 동작; 및
    상기 비문자 획들과 연관된 문자 그룹을 매칭하고, 상기 매칭된 문자 그룹에 적용된 정렬 파라미터에 기반하여 상기 비문자로 분류된 손글씨 획들을 정렬하는 동작을 포함하는 방법.
  15. 제14항에 있어서, 상기 문자로 분류된 손글씨 획들을 정렬하는 동작은,
    상기 문자로 분류된 손글씨 획들의 특징점에 기반하여 손글씨 기울기를 판단하는 동작;
    각 줄의 기준 위치에 기반하여 상기 문자로 분류된 손글씨 획들의 들여쓰기를 결정하는 동작;
    줄의 중심 높이에 기반하여 상기 문자로 분류된 손글씨 획들의 각 줄의 높이를 결정하는 동작; 및
    각 줄의 높이에 기반하여 줄 간격을 조절하여 상기 문자로 분류된 손글씨 획들을 정렬하는 동작을 포함하는 방법.
PCT/KR2021/009787 2020-08-04 2021-07-28 손글씨 정렬 방법 및 장치 WO2022030865A1 (ko)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP21853078.0A EP4170545A4 (en) 2020-08-04 2021-07-28 METHOD AND APPARATUS FOR HANDWRITING ALIGNMENT

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2020-0097593 2020-08-04
KR1020200097593A KR20220017290A (ko) 2020-08-04 2020-08-04 손글씨 정렬 방법 및 장치

Publications (1)

Publication Number Publication Date
WO2022030865A1 true WO2022030865A1 (ko) 2022-02-10

Family

ID=80118189

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2021/009787 WO2022030865A1 (ko) 2020-08-04 2021-07-28 손글씨 정렬 방법 및 장치

Country Status (3)

Country Link
EP (1) EP4170545A4 (ko)
KR (1) KR20220017290A (ko)
WO (1) WO2022030865A1 (ko)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116400831A (zh) * 2023-06-08 2023-07-07 深圳市上融科技有限公司 一种无源电磁触控屏手写压力感应补偿算法

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024150907A1 (ko) * 2023-01-10 2024-07-18 삼성전자 주식회사 보정된 획입력을 제공하는 방법 및 그 표시 장치

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030185444A1 (en) * 2002-01-10 2003-10-02 Tadashi Honda Handwriting information processing apparatus, handwriting information processing method, and storage medium having program stored therein for handwriting information processing
KR20140089915A (ko) * 2013-01-08 2014-07-16 주식회사 인프라웨어 필기 문자 조정 방법 및 장치
KR20160062566A (ko) * 2014-11-25 2016-06-02 삼성전자주식회사 필기 문자를 보정하는 디바이스 및 방법
US20170060406A1 (en) * 2015-08-25 2017-03-02 Myscript System and method of guiding handwriting input
US20170091153A1 (en) * 2015-09-29 2017-03-30 Apple Inc. Device, Method, and Graphical User Interface for Providing Handwriting Support in Document Editing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030185444A1 (en) * 2002-01-10 2003-10-02 Tadashi Honda Handwriting information processing apparatus, handwriting information processing method, and storage medium having program stored therein for handwriting information processing
KR20140089915A (ko) * 2013-01-08 2014-07-16 주식회사 인프라웨어 필기 문자 조정 방법 및 장치
KR20160062566A (ko) * 2014-11-25 2016-06-02 삼성전자주식회사 필기 문자를 보정하는 디바이스 및 방법
US20170060406A1 (en) * 2015-08-25 2017-03-02 Myscript System and method of guiding handwriting input
US20170091153A1 (en) * 2015-09-29 2017-03-30 Apple Inc. Device, Method, and Graphical User Interface for Providing Handwriting Support in Document Editing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4170545A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116400831A (zh) * 2023-06-08 2023-07-07 深圳市上融科技有限公司 一种无源电磁触控屏手写压力感应补偿算法
CN116400831B (zh) * 2023-06-08 2023-08-18 深圳市上融科技有限公司 一种无源电磁触控屏手写压力感应补偿算法

Also Published As

Publication number Publication date
EP4170545A1 (en) 2023-04-26
EP4170545A4 (en) 2023-12-27
KR20220017290A (ko) 2022-02-11

Similar Documents

Publication Publication Date Title
WO2014185624A1 (ko) 문자 입력 장치 및 문자 입력 방법
WO2021025290A1 (ko) 필기 입력을 텍스트로 변환하는 방법 및 전자 장치
WO2022030865A1 (ko) 손글씨 정렬 방법 및 장치
CN100587660C (zh) 一种手写字符预测识别的方法和装置
WO2020159196A1 (en) Electronic device and method for correcting handwriting by same
WO2015030461A1 (en) User device and method for creating handwriting content
WO2019022567A2 (en) METHOD FOR AUTOMATICALLY PROVIDING AUTOMATIC COMPLETION SUGGESTIONS BASED ON GESTURES AND ASSOCIATED ELECTRONIC DEVICE
WO2023008745A1 (ko) 전자 장치 및 필기 인식 방법
WO2022211271A1 (ko) 학습 기반의 필기 입력을 처리하는 전자 장치, 그 동작 방법 및 저장매체
US11995308B2 (en) Method and device for providing handwriting input in electronic device
WO2021025495A1 (en) Electronic device and method for processing handwriting input thereof
KR20040043454A (ko) 펜 컴퓨팅 시스템에서의 펜 입력 방법 및 장치
WO2023096162A1 (ko) 전자 장치 및 전자 장치에서 필기 정보 마스킹 및 언마스킹 방법
EP3039512A1 (en) User device and method for creating handwriting content
WO2022197076A1 (ko) 전자 장치 및 오타 보정 방법
WO2022010279A1 (en) Electronic device for converting handwriting to text and method therefor
WO2020060121A1 (ko) 필기 입력에 대한 보정 방법, 이를 위한 전자 장치 및 저장 매체
WO2022203330A1 (ko) 전자 장치 및 그것의 지문 인식 방법
WO2021091226A1 (en) Method and electronic device for correcting handwriting input
WO2024014655A1 (ko) 획들에 의해 나타나는 문장을 식별하기 위한 전자 장치 및 방법
WO2023149664A1 (ko) 사용자 입력에 대한 인식 성능 개선 방법 및 전자 장치
WO2016200194A1 (ko) 문제 콘텐트 제공 방법 및 디바이스
WO2022131617A1 (ko) 필기 입력을 처리하는 전자 장치 및 그 작동 방법
WO2023146077A1 (ko) 가상 키보드 상의 터치 입력으로부터 사용자 의도를 인식하기 위한 전자 장치, 방법, 및 비일시적 컴퓨터 판독가능 저장 매체
WO2023195617A1 (ko) 손글씨 동기화 방법 및 전자 장치

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021853078

Country of ref document: EP

Effective date: 20230123

NENP Non-entry into the national phase

Ref country code: DE