Detailed Description
The method, the terminal and the storage medium for generating the nail effect map provided by the embodiment of the invention can generate the nail effect map, and are convenient for a user to determine a design image.
In order for those skilled in the art to better understand the present application, embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims of this application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
In order to illustrate the technical solution according to the embodiments of the present invention, the following description is made by specific embodiments.
Fig. 1 is a schematic flow chart of a nail effect map generation according to an embodiment of the present invention. The specific contents are as follows:
101 a first image comprising the user's nail and at least one design image are displayed on a terminal touch screen.
The terminal according to the embodiment of the invention comprises, but is not limited to, electronic devices such as a mobile phone, a tablet personal computer, a PDA (Personal Digital Assistant, a palm computer), a computer, a notebook computer, a nail art machine and the like.
As shown in fig. 9, a structural frame diagram of a terminal provided in an embodiment of the present invention is shown, where the terminal in the embodiment of the present invention may include a part of a component, a module or a unit thereof, and may also include other components, modules or units shown as a representation. The specific description is as follows:
as shown in fig. 9, the terminal 900 may include an image pickup device 910, a processor 920, a communication device 930, a memory 940, a display device 950, and an input device 960. Memory 940 stores computer programs including operating system programs 9422, application programs 9421, and the like. The processor 920 is configured to read the computer program in the memory 940 and then execute methods defined by the computer program, for example, the processor 920 reads an operating system program 9422 to run an operating system on the printing device to implement various functions of the operating system, or reads one or more application programs 9421 to run applications on the printing device.
The imaging device 910 is a device for capturing an image, and may be a camera or an optical scanner. The user's nail may be captured by the camera 910, and in particular, as shown in fig. 10-13, capturing an image with the user's nail. The terminal provided by the embodiment of the invention can comprise one or more image capturing devices 910.
The processor 920 may include one or more processors, for example, the processor 920 may include one or more central processors, or include one central processor and one graphics processor. When the processor 920 includes a plurality of processors, the plurality of processors may be inherited on the same chip or may be separate chips. A processor may include one or more processing cores. The processor 920 may process the image information and may also control the terminal.
The communication device 930 is used for a device or module for establishing a wireless connection with an external terminal or apparatus, such as a WiFi network device (WiFi antenna), a bluetooth network device (bluetooth antenna), or the like. The communication device 930 may receive an image transmitted from an external device such as a terminal or a server.
Memory 940 also stores other data 9423 in addition to computer programs, where other data 9423 may include data generated after operating system 9422 or application programs 9421 are executed, including system data (e.g., configuration parameters of the operating system) and user data, such as data generated during process execution.
Memory 940 generally includes memory 941 and external memory 942. Memory 941 may be Random Access Memory (RAM), read Only Memory (ROM), CACHE memory (CACHE), etc. The storage space of the embodiment of the invention can comprise flash memory (flash), a hard disk, an optical disk, a USB disk, a floppy disk or a tape drive, etc. Computer programs are typically stored on the memory 942, and the processor 920 loads the computer programs from the memory 941 before performing the processing.
The display device 950 is used to display information of the terminal to a user, and may include, but is not limited to, a display screen, a projector, etc.
The input device 550 is a device for inputting data and information to the terminal, and may specifically include a keyboard, a touch screen, and a microphone, and in some cases, the image capturing device may also be used as an input device. The terminal provided by the embodiment of the invention comprises a touch screen.
The first image in the embodiment of the present invention is an image including the user's nail, and the first image may be an image captured by an image capturing device of the terminal, or may be an image sent by another device, for example, a printing device (a device for printing a pattern on the user's nail).
The design image in the embodiment of the invention is a pattern or an image designed for the nail of the user, and after the user selects the corresponding design image, the design image can be printed to the nail of the user through a printing device.
The terminal provided by the embodiment of the invention can display one or more design images on the touch screen for selection by a user. As shown in fig. 10 to 13, the terminal displays a plurality of design images on a touch screen, and a user can select a corresponding design image according to preference.
102 identify the first image to determine a regional scope of the user's nail.
The first image is identified, including but not limited to processing, extracting features, matching, etc. of the image to determine the extent of the area of the user's nail. For example, in fig. 10-13, the extent of the user's nail and corresponding coordinates are identified.
103 detects a user selection operation of the design image.
A user selection operation, such as a click, press, double click, etc., of one or more design images is detected on the touch screen to determine the design image selected by the user. Specifically, the user may select one design image at a time; or may be a selection of one or more design images at a time.
One possible embodiment, as shown in fig. 3, is as follows:
301 detects a first operation of a user within a first operation range on a touch screen.
One or more groups of design images are displayed on the touch screen. The one or more groups of displayed design images are displayed in a set range of the touch screen, namely, in a first operation range according to the embodiment of the invention. The selection operation in the first operation range by the user is the first operation, and the specific first operation may include, but is not limited to, clicking, long pressing, double clicking, sliding, dragging, and the like.
302, according to the first operation, providing at least one set of design images to a user selection.
According to a first operation of a user, one or more groups of design images selected by the user are determined, and corresponding design images are provided to the user. The embodiment of the invention can display the design image in the range of the first part of the user of the first image.
One possible implementation is as shown in fig. 4, the details are as follows:
401 detecting at least one set of design images selected by a user, wherein one set of design images comprises design images for respective fingernails of the user.
The user selected set of design images includes design images for each of the user's fingernails, i.e., the number of design images is greater than the number of fingernails, and at least one design image is matched for each fingernail.
402 adds the design image for each fingernail of the user to the range of the image area of the fingernail corresponding to the user.
The design image for each finger is added to the range of the finger nail portion corresponding to the user. In this way, the user can quickly see the preview effect.
The selection operation of the embodiment of the present invention may also be as described in fig. 5, and the specific implementation manner is as follows:
501 detect a second operation of a second operation range of the user on the touch screen.
The second operation range of the user on the touch screen can be specifically a setting range of an image of the fingernail part of the user; other settings are possible, such as the upper part of the interface. As shown in fig. 11 and 13, the user's operation within the setting range of the thumb is an example of a second operation range of the embodiment of the present invention. The second operation of the present invention is an operation for designing an image for the nail, and specifically includes, but is not limited to, clicking, long pressing, double clicking, sliding, dragging, and the like.
502, according to the second operation, displaying design image selectable items for the nail on a touch screen.
For a second operation of the user, selectable items of the design image of the corresponding fingernail part are provided to the user for the user to select whether to change to other design images.
Another implementation manner of the embodiment of the present invention is as shown in fig. 6, and the specific implementation contents are as follows:
601 detects a third operation of the user within a user nail image setting range on the touch screen.
Upon detection of user setting in the nail
And 602, according to the third operation, providing an enlarged image of the current nail image on the touch screen.
104 adding the user selected design image to the first image within the user nail region to generate a preview of the nail effect.
And adding the design image selected by the user to the range of the user's nail in the first image. As shown in fig. 10-13, after the user's nail is identified, the user-selected design image is overlaid onto or displayed over the range of the nail.
Further, in the embodiment of the present invention, if the user selects one or more design images, the design images may be added to the corresponding nail according to the set sequence, that is, different nail is added.
By the method, the user can quickly preview the printing effect.
Further, as shown in fig. 7, the design image may be adjusted according to a third operation of the user, and the specific embodiment is as follows:
701 detect a third operation of a user within the user's nail region, wherein the third operation comprises one or more combinations of a rotation, a method, a zoom-out, or a drag operation.
702 adjusting the design image for the nail based on a third operation of the user.
According to the third operation of the user, the position, proportion, angle and other effects of the design image for the nail can be adjusted. Specifically, the position of the design image can be adjusted by dragging the design image; the angle of the design image may be adjusted by rotation; the proportion of the design image may be adjusted by opening or kneading of the two fingers, etc.
703 displaying the adjusted design image in real time on the enlarged image of the current nail image.
And displaying the adjusted design image on the fingernail part of the user in real time according to the operation of the user.
One implementation of the embodiment of the invention is to display the range of the adjusted design image in the range of the user's nail. As shown in fig. 8, the specific embodiment is as follows:
801 detect the coordinate range of the adjusted design image.
And displaying the adjusted design image in real time for a third operation of the user, and determining the coordinate range of the adjusted design image.
802 determines whether the coordinate range exceeds an area range of the user's nail.
And acquiring the coordinate range of the nail of the user, comparing the coordinate ranges of the adjusted design image, and determining the part exceeding the coordinate range of the nail of the user and the part falling into the coordinate range of the nail in the design image.
803 displays the design image that does not exceed the user's nail region range.
And displaying the design image falling in the A coordinate range, and hiding or eliminating the part of the design image exceeding the A coordinate range.
In this way, the user can conveniently know the nail beautifying effect.
Example 2
201 displays a first image including a user's nail and at least one design image on a terminal touch screen.
202 identify the first image to determine a regional scope of the user's nail, wherein the first image is a three-dimensional image.
203 detects a user selection operation of the design image.
204 obtaining curved surface information of the user nail image.
The curved surface information of the nail image of the user may be information identified from an image generated by photographing from different angles by the photographing device, or may be curved surface state information of the nail measured by a laser scanning method. In a possible implementation manner, the curved surface information in the embodiment of the present invention may be curved surface degree information of the nail. The curved surface information of the nail part of the embodiment of the invention can comprise curved surface information of the nail part of one or a plurality of fingers.
205, performing surface treatment on the design image selected by the user according to the surface information.
And carrying out curved surface processing on the design image selected by the user according to the curved surface information, specifically, selecting a corresponding curved surface model or parameter according to a deformation template corresponding to the curved surface information of the nail, and carrying out curved surface processing on the design image. The higher the degree of bending of the nail portion, the higher the degree of deformation during the design image curved surface processing, i.e., the more the bending.
206 adding the design image of the visualization to the user's nail region area of the first image to generate a preview of the nail effect.
By adding the image after the surface treatment to the region area of the user's nail of the first image, a stereoscopic image can be generated.
The embodiment of the invention also provides a terminal, which comprises: a processor, a memory for storing instructions executable by the processor; wherein the processor is configured to perform any of the methods described above.
The embodiment of the invention also provides a computer readable storage medium, wherein instructions are stored in the computer readable storage medium, when running on a terminal, for causing the terminal to execute any one of the methods.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, printing device, or data center to another website, computer, printing device, or data center by a wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a printing apparatus, a data center, or the like that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The above embodiments are merely for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.