CN109087366B - Method, device, equipment and storage medium for improving nail painting effect - Google Patents

Method, device, equipment and storage medium for improving nail painting effect Download PDF

Info

Publication number
CN109087366B
CN109087366B CN201810912986.8A CN201810912986A CN109087366B CN 109087366 B CN109087366 B CN 109087366B CN 201810912986 A CN201810912986 A CN 201810912986A CN 109087366 B CN109087366 B CN 109087366B
Authority
CN
China
Prior art keywords
value
nail art
nail
color
picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810912986.8A
Other languages
Chinese (zh)
Other versions
CN109087366A (en
Inventor
钟伟钊
梁辉
吴建建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
GCI Science and Technology Co Ltd
Original Assignee
GCI Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by GCI Science and Technology Co Ltd filed Critical GCI Science and Technology Co Ltd
Priority to CN201810912986.8A priority Critical patent/CN109087366B/en
Publication of CN109087366A publication Critical patent/CN109087366A/en
Application granted granted Critical
Publication of CN109087366B publication Critical patent/CN109087366B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J3/00Typewriters or selective printing or marking mechanisms characterised by the purpose for which they are constructed
    • B41J3/407Typewriters or selective printing or marking mechanisms characterised by the purpose for which they are constructed for marking on special material

Abstract

The invention discloses a method for improving a nail painting effect, which comprises the following steps: acquiring input operation of a user; when the input operation is selecting a nail art picture, performing pixel processing on the selected nail art picture according to the pre-stored color concentration to obtain a new nail art picture; when the input operation is to select the color density, the pre-stored nail art picture is subjected to pixel processing according to the selected color density so as to obtain a new nail art picture, the direct operation on pixel points is adopted, the color density of the nail art picture is changed to achieve the effect of improving printing, the problem that the printing density cannot be adjusted by adjusting an ink box is solved, namely, the effect of exerting force for realizing the color density of the picture under the condition that the structure of the nail art machine is not changed is realized, the printing effect is better, the aesthetic requirement of a consumer on the nail art picture is met better, and the further development of the nail art market is greatly promoted.

Description

Method, device, equipment and storage medium for improving nail painting effect
Technical Field
The invention relates to the technical field of nail art, in particular to a method, a device, equipment and a storage medium for improving nail art painting effect.
Background
The main function of nail-beautifying machine is to draw pattern on the hand, foot nail or artificial nail patch of human body, and the nail-beautifying machine is usually formed from main hardware of computer, microprocessor, ink-jet printer and display, and the pattern used by nail-beautifying machine is stored in the hard disk of computer or other memory capable of being called by computer and microprocessor, and its pattern can be displayed on the display for user to view and select, and can be controlled by its related software so as to implement the function of printing pattern on the hand, foot nail or artificial nail patch of human body.
Usually, thousands or even tens of thousands of colored patterns with different shapes and types are stored in the nail art to meet different aesthetic requirements of pursuing individuation of users. The user's needs are endless, which requires the pattern designer of the manicure machine to continually provide new patterns for the user to select. Each independent pattern is designed according to the shape of a hand, a foot nail or an artificial nail patch of a human body according to a certain proportion, position and size, and can be correspondingly printed on the surface of one hand, foot nail or one artificial nail patch of the human body.
The inventor, when implementing the invention, finds that the application mode of nail art beautifying pattern has serious disadvantages:
nail art patterns are usually obtained by shooting objects, computer painting, manual painting or printed matter scanning, and pattern designers utilize the existing mature and convenient computer image editing tool software to process the obtained original patterns into nail art application patterns with certain rules and then store the patterns in a storage device in the nail art. Because patterns are always sought by users, in order to meet the needs of the users, the patterns are required to be provided as many as possible, the larger the user needs, the more the patterns are, the larger the design amount is, the more complicated and time-consuming the manufacturing process, and the larger the memory space is occupied. The existing nail-beautifying patterns are lack of change, the patterns are all filled in the whole nail surface, the color of the patterns is relatively fixed, the quality of the pattern design completely depends on the aesthetic property of designers, and users can only passively accept the patterns; even if the pattern designer is of a highly specialized level, it is difficult to accurately grasp the different aesthetic needs of many users for nail art. The pictures are generally stored on the SDCard, and after the device is produced, the pictures are fixed to a certain extent and are not modified. In many cases, the user selects a colored drawing pattern and then colored-draws the pattern on the fingernail, and the color difference between the pattern color drawn on the fingernail and the pattern color drawn on the original image is large. Different users have personal preferences on the color of the picture, and when the color of the selected picture is too light or too strong, the color concentration is hopefully adjusted, but the adjustment cannot be realized.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a device, and a storage medium for improving a nail painting effect, so as to solve the technical problem in the prior art that a user cannot adjust the color density of a picture according to his/her preference.
In a first aspect, an embodiment of the present invention provides a method for improving a nail painting effect, including the following steps:
acquiring input operation of a user;
when the input operation is selecting a nail art picture, performing pixel processing on the selected nail art picture according to the pre-stored color concentration to obtain a new nail art picture;
and when the input operation is to select the color density, performing pixel processing on a pre-stored nail art picture according to the selected color density to obtain a new nail art picture.
In a first possible implementation manner of the first aspect, the pixel processing includes:
acquiring all pixel points in the nail art picture;
and adjusting the RGB value of each pixel point according to the color concentration.
With reference to the first aspect and the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, when the input operation is selecting a nail art picture, performing pixel processing on the selected nail art picture according to a pre-stored color density to obtain a new nail art picture includes:
when the input operation is selecting a nail art picture, performing pixel processing on the selected nail art picture according to each pre-stored color concentration, so that the color concentration of the selected nail art picture changes along with each pre-stored color concentration, and n new nail art pictures are obtained; wherein n is greater than 1.
With reference to the first aspect and the first possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, when the input operation is to select a color density, performing pixel processing on a pre-stored nail art picture according to the selected color density, so that changing an original color density of the pre-stored nail art picture includes:
when the input operation is to select the color concentration, performing pixel processing on each pre-stored nail art picture according to the selected color concentration so that the color concentration of each pre-stored nail art picture is changed along with the selected color concentration to obtain m new nail art pictures; wherein m is greater than 1.
With reference to the first aspect and the first possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the adjusting, for each pixel point, an RGB value according to the color density includes:
step A: acquiring a current pixel point to obtain a specific numerical value of the pixel point R, G or B;
and B: judging whether the RGB value of the pixel point is close to a pure white numerical value or not;
if the value is close to the pure white value, executing the step C: if the R, G or B value of the pixel point is less than 0, the corresponding R, G or B is assigned as 0, and if the R, G or B value of the pixel point is greater than 255, the corresponding R, G or B is assigned as 255;
if not, executing step D: judging whether the RGB value of the pixel point is close to a gray numerical value or not;
if not, executing step E: assigning values to the R, G value and the B value according to a preset concentration change value and the average value corresponding to the R, G value or the B value;
if the gray value is close to the gray value, executing the step F: judging whether the RGB value of the pixel point is close to a black numerical value or not;
if the black value is close to the black value, executing the step G: assigning both R, G and B a value of 0;
if not, executing step H: obtaining the maximum value of the average values of the R, G and the B values, and assigning values to the R, G and the B values according to the maximum value and the preset concentration change value;
step C is performed after step E, G or H is performed.
In a fifth possible implementation manner of the first aspect, the method further includes:
after step C is performed, the current number of executions is increased by one;
when the current execution times is larger than or equal to the total numerical value of all the pixel points, the step of adjusting the RGB value according to the color density is not executed for the next pixel point;
and when the current execution times is less than the total numerical value of all the pixel points, executing a step on the next pixel point to adjust the RGB value according to the color density.
In a sixth possible implementation manner of the first aspect, the method further includes:
acquiring the selection operation of the user on the new nail art picture;
and deleting the nail art picture which is not selected according to the selection operation.
In a second aspect, an embodiment of the present invention further provides a device for improving a nail painting effect, including:
the operation acquisition module is used for acquiring input operation of a user;
the first pixel processing module is used for carrying out pixel processing on the selected nail art picture according to the pre-stored color concentration to obtain a new nail art picture when the input operation is to select the nail art picture;
and the second pixel processing module is used for performing pixel processing on the pre-stored nail art picture according to the selected color concentration when the input operation is the selection of the color concentration so as to obtain a new nail art picture.
In a third aspect, an embodiment of the present invention further provides an apparatus for improving a nail painting effect, which is characterized by comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the method for improving the nail painting effect is implemented.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, where when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute the method for improving the nail painting effect described above.
The embodiment of the invention has the following beneficial effects:
acquiring input operation of a user; when the input operation is selecting a nail art picture, performing pixel processing on the selected nail art picture according to the pre-stored color concentration to obtain a new nail art picture; when the input operation is to select the color density, the pre-stored nail art picture is subjected to pixel processing according to the selected color density so as to obtain a new nail art picture, the direct operation on pixel points is adopted, the color density of the nail art picture is changed to achieve the effect of improving printing, the problem that the printing density cannot be adjusted by adjusting an ink box is solved, namely, the effect of exerting force for realizing the color density of the picture under the condition that the structure of the nail art machine is not changed is realized, the printing effect is better, the aesthetic requirement of a consumer on the nail art picture is met better, and the further development of the nail art market is greatly promoted.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
fig. 1 is a schematic view of an apparatus for improving nail painting effect according to a first embodiment of the present invention;
fig. 2 is a schematic flow chart of a method for improving a nail painting effect according to a second embodiment of the present invention;
fig. 3 is a schematic flow chart of a method for improving a nail painting effect according to a third embodiment of the present invention;
fig. 4 is a schematic flow chart of another method for improving the nail painting effect according to the third embodiment of the present invention;
fig. 5 is a schematic structural diagram of the fourth embodiment of the present invention for improving the nail painting effect.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As will be appreciated by one skilled in the art, the present invention may be embodied as an apparatus, method or computer program product. Accordingly, the present disclosure may be embodied in the form of: may be embodied entirely in hardware, entirely in software (including firmware, resident software, micro-code, etc.) or in a combination of hardware and software, and may be referred to herein generally as a "circuit," module "or" system. Furthermore, in some embodiments, the invention may also be embodied in the form of a computer program product in one or more computer-readable media having computer-readable program code embodied in the medium.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The present invention is described below with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a virtual machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable medium that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable medium produce an article of manufacture including instruction means (instructions) which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
Example one
Referring to fig. 1, fig. 1 is a schematic view of an apparatus for improving a nail painting effect according to an embodiment of the present invention, configured to execute a method for improving a nail painting effect according to an embodiment of the present invention, as shown in fig. 1, the apparatus for improving a nail painting effect includes: at least one processor 11, such as a CPU, at least one network interface 14 or other user interface 13, a memory 15, at least one communication bus 12, the communication bus 12 being used to enable connectivity communications between these components. The user interface 13 may optionally include a USB interface, and other standard interfaces, wired interfaces. The network interface 14 may optionally include a Wi-Fi interface as well as other wireless interfaces. The memory 15 may comprise a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 15 may optionally comprise at least one memory device located remotely from the aforementioned processor 11.
In some embodiments, memory 15 stores the following elements, executable modules or data structures, or a subset thereof, or an expanded set thereof:
an operating system 151, which contains various system programs for implementing various basic services and for processing hardware-based tasks;
and (5) a procedure 152.
Specifically, the processor 11 is configured to call the program 152 stored in the memory 15, and execute the method for improving the nail painting effect according to the above embodiment.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general processor can be a microprocessor or the processor can also be any conventional processor and the like, the processor is a control center of the method for improving the nail painting effect, and various interfaces and lines are utilized to connect all parts of the whole method for improving the nail painting effect.
The memory can be used for storing the computer program and/or the module, and the processor realizes various functions of the electronic device for improving the nail painting effect by running or executing the computer program and/or the module stored in the memory and calling the data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, a text conversion function, etc.), and the like; the storage data area may store data (such as audio data, text message data, etc.) created according to the use of the cellular phone, etc. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The module for improving the nail painting effect integration can be stored in a computer readable storage medium if the module is realized in the form of a software functional unit and sold or used as an independent product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The method for improving the nail painting effect according to the embodiment of the invention will be described below with reference to the accompanying drawings.
Example two
Fig. 2 is a schematic flow chart of a method for improving a nail painting effect according to a second embodiment of the present invention.
A method for improving nail painting effect comprises the following steps:
s11, acquiring input operation of a user;
s12, when the input operation is selecting a nail art picture, performing pixel processing on the selected nail art picture according to the pre-stored color concentration to obtain a new nail art picture;
and S13, when the input operation is to select the color density, performing pixel processing on the pre-stored nail picture according to the selected color density to obtain a new nail picture.
It should be noted that steps S12 and S13 are not in sequence, and are selectively executed according to the input operation of the user.
It should be noted that, the manner of improving the nail painting effect according to the embodiment of the present invention may be implemented by a nail printer or a nail lamp, and the present invention is not limited to this.
It should be noted that a pixel is defined as being composed of small tiles of an image, so-called pixels (pixels), which have a specific position and assigned color value, and the color and position of the small tiles determine the appearance of the image. A pixel can be considered to be an indivisible unit or element in the entire image, indivisible meaning that it cannot be cut into smaller units or elements again, which exist as a single color cell. Each dot matrix image contains a certain number of pixels that determine the size of the image to be presented on the screen.
Preferably, the pixel processing comprises: acquiring all pixel points in the nail art picture; and adjusting the RGB value of each pixel point according to the color concentration.
It should be noted that the RGB color scheme is a color standard in the industry, and various colors are obtained by changing three color channels of red (R), green (G), and blue (B) and superimposing them with each other, where RGB represents the colors of the three channels of red, green, and blue, and the standard almost includes all colors that can be perceived by human vision, and is one of the most widely used color systems at present. See table 1.
Red The necessary parameters; integer type. The values range from 0 to 255, representing the red component of the color.
Green The necessary parameters; integer type. The values range from 0 to 255, representing the green component of the color.
Blue The necessary parameters; integer type. The numerical value ranges from 0 to 255 and represents colorThe blue component of the color.
TABLE 1
In this embodiment, each pixel point is analyzed, and the purpose of modifying the color value of the whole picture is achieved by changing the specific RGB value of each pixel point.
Preferably, when the input operation is selecting a nail art picture, performing pixel processing on the selected nail art picture according to a pre-stored color density to obtain a new nail art picture includes:
when the input operation is selecting a nail art picture, performing pixel processing on the selected nail art picture according to each pre-stored color concentration, so that the color concentration of the selected nail art picture changes along with each pre-stored color concentration, and n new nail art pictures are obtained; wherein n is greater than 1.
It should be noted that, when n is greater than or equal to the number of the pre-stored color densities, for example, the number of the pre-stored color densities is 3, and when pixel processing is performed according to the three pre-stored color densities, 3 or more new pictures can be obtained, which is not limited in the present invention.
In this embodiment, when the user inputs that the nail art picture is selected, the nail art picture may be subjected to pixel processing according to a pre-stored color density, for example, 5 color densities are pre-stored, and when the user selects two nail art pictures, the following operations are performed on each nail art picture, and the pixel processing is performed on the nail art picture according to the 5 color densities, so as to obtain at least 5 new nail art pictures.
Preferably, when the input operation is to select the color density, the pixel processing is performed on the pre-stored nail art picture according to the selected color density, so that the pre-stored nail art picture changes the original color density, including:
when the input operation is to select the color concentration, performing pixel processing on each pre-stored nail art picture according to the selected color concentration so that the color concentration of each pre-stored nail art picture is changed along with the selected color concentration to obtain m new nail art pictures; wherein m is greater than 1.
It should be noted that, when m is greater than or equal to the number of the pre-stored nail art pictures, for example, the number of the pre-stored nail art pictures is 3, when the three nail art pictures are subjected to pixel processing, 3 or more new pictures can be obtained, which is not limited in the present invention.
In this embodiment, when the user inputs that the color density is selected, pixel processing is performed on each pre-stored nail art picture according to the selected color density, for example, only one pre-stored nail art picture is provided, and one or more new nail art pictures can be obtained after the pixel processing is performed according to the selected color density, which is not limited in this embodiment of the invention.
Preferably, the method further comprises the following steps:
acquiring the selection operation of the user on the new nail art picture;
and deleting the nail art picture which is not selected according to the selection operation.
In this embodiment, a plurality of new patterns can be generated, but all of them are temporary, belong to the process file, and in order to facilitate the user to visually observe the change of the picture and the difference with the original picture, a new picture is generated for printing after the user determines the required new nail pattern. The nail art machine prints on the nail according to the input picture and the printing coordinate, the deeper the color in the picture is, the deeper the printing color is, of course, on different screens, because of the existence of color difference, there will be a certain degree of deviation, for the nail art picture that is not selected, will delete, in order to save the storage space.
The embodiment has the following beneficial effects:
acquiring input operation of a user; when the input operation is selecting a nail art picture, performing pixel processing on the selected nail art picture according to the pre-stored color concentration to obtain a new nail art picture; when the input operation is to select the color density, the pre-stored nail art picture is subjected to pixel processing according to the selected color density so as to obtain a new nail art picture, the direct operation on pixel points is adopted, the color density of the nail art picture is changed to achieve the effect of improving printing, the problem that the printing density cannot be adjusted by adjusting an ink box is solved, namely, the effect of exerting force for realizing the color density of the picture under the condition that the structure of the nail art machine is not changed is realized, the printing effect is better, the aesthetic requirement of a consumer on the nail art picture is met better, and the further development of the nail art market is greatly promoted.
EXAMPLE III
On the basis of the second embodiment
Referring to fig. 3, a flow chart of a method for improving a nail painting effect according to a third embodiment of the present invention is shown.
The adjusting the RGB value of each pixel point according to the color density comprises the following steps:
step A: acquiring a current pixel point to obtain a specific numerical value of the pixel point R, G or B;
and B: judging whether the RGB value of the pixel point is close to a pure white numerical value or not;
if the value is close to the pure white value, executing the step C: if the R, G or B value of the pixel point is less than 0, the corresponding R, G or B is assigned as 0, and if the R, G or B value of the pixel point is greater than 255, the corresponding R, G or B is assigned as 255;
if not, executing step D: judging whether the RGB value of the pixel point is close to a gray numerical value or not;
if not, executing step E: assigning values to the R, G value and the B value according to a preset concentration change value and the average value corresponding to the R, G value or the B value;
if the gray value is close to the gray value, executing the step F: judging whether the RGB value of the pixel point is close to a black numerical value or not;
if the black value is close to the black value, executing the step G: assigning both R, G and B a value of 0;
if not, executing step H: obtaining the maximum value of the average values of the R, G and the B values, and assigning values to the R, G and the B values according to the maximum value and the preset concentration change value;
step C is performed after step E, G or H is performed.
Further, after step C is performed, the current number of times of execution is increased by one;
when the current execution times is larger than or equal to the total numerical value of all the pixel points, the step of adjusting the RGB value according to the color density is not executed for the next pixel point;
and when the current execution times is less than the total numerical value of all the pixel points, executing a step on the next pixel point to adjust the RGB value according to the color density.
Specifically, referring to fig. 4, when the user's input operation is selecting a nail art, performing pixel processing on the selected nail art, and when the user's input operation is selecting a color, performing pixel processing on all the pre-stored nail art, first obtaining the nail art subjected to pixel processing, and defining the number of pixels included in the nail art in the length direction and the number of pixels included in the nail art in the width direction as well as the number of pixels included in the nail art as width and height, respectively; by the formula: calculating the total number of pixels of the input picture as an integer total; defining an rgbmeans array with 3 units; traversing the total pixel points, obtaining the numerical values of three different channels of RGB of each pixel point, and obtaining the numerical values of the three different channels of RGB by the following formula:
Figure BDA0001761646380000141
calculating the mean of the R, G and B values, the mean of the R values being defined as rgbmeans [0]]The average value of G values is defined as rgbmeans [1]]The average value of B values is defined as rgbmeans [2]]An rgbmeans [0]]、rgbmeans[1]、rgbmeans[2]Assigning values to the rgbmeans array, and comparing the rgbmeans [0]]、rgbmeans[1]、rgbmeans[2]The maximum value is defined as tmp; defining a value Y1 for screening pixels in the subsequent steps to select the pixels needing to be changed; defining a value Y2 for screening pixels in subsequent steps to select an image to be changedPrime points; defining values contast and brightness for representing the amplitude value of color change, and adjusting the two values to achieve different color density effects; defining an array of arrayColors with total cells; the current execution times is defined as count;
executing the following steps for each pixel point:
step A: obtaining R, G, B specific values of the current pixel points, which are respectively defined as tr, tg and tb;
and B: judging whether the RGB value of the pixel point is close to a pure white numerical value: if the sum of the tr, the tg, the tb and the Y1 is less than the product of 255 and 3, the RGB value of the image point is not close to pure white, the change is needed, and the next screening is carried out, namely the step D is transferred; if the sum of tr, tg, tb and Y1 is not less than the product of 255 and 3, it indicates that the RGB value of the image point is close to pure white, and no change is needed, execute step C;
and C: if tr is larger than 255, tr is assigned to be 255, and if tr is smaller than 0, tr is assigned to be 0; if tg is larger than 255, tg is assigned 255, and if tg is smaller than 0, tg is assigned 0; if tb is greater than 255, tb is assigned 255, and if tb is less than 0, tb is assigned 0;
step D: if the three conditions that the absolute value of the difference between tg and tr is smaller than Y1, the absolute value of the difference between tg and tb is smaller than Y1 and the absolute value of the difference between tb and tr is smaller than Y1 are met, the RGB value of the pixel point is close to the gray value, the next screening is needed, and then the step F is executed; if the three conditions are not satisfied, the RGB numerical value of the pixel point is not close to the gray numerical value, namely the RGB numerical value is other colors except pure white and gray, numerical value reassignment is needed in the next step, namely step E is executed;
step E: and (3) first assignment:
the re-assignment of tr is the difference between tr and rgbmeans [0 ];
tg reassign is the difference between tr and rgbmeans [1 ];
tb is reassigned as the difference between tb and rgbmeans [2 ];
and (5) second assignment:
the re-assignment of tr is the product of tr and constast;
the re-assignment of tg is the product of tg and constast;
the re-assignment of tb is the product of tb and constast;
and (3) third assignment:
re-assigning tr as the sum of tr and the product of rgbmeans [0] and brightness;
the re-assignment of tg is the sum of tg and the product of rgbmeans [1] and brightness;
the re-assignment of tb is the sum of tb and the product of rgbmeans [2] and brightness;
the first assignment function is to calculate the change base number, the second assignment function is to calculate the product of the change base number and the constast coefficient to obtain the respective increasing or decreasing numerical values, and the third assignment function is to finally assign values to deepen or lighten other colors (except three colors of black, white and gray).
Step F: if tr is less than Y2, tb is less than Y2, and tg is less than Y2, the three conditions are all satisfied, which indicates that the pixel point is black or close to black, because it has been determined in the previous determination that the pixel point is close to gray or close to gray, the black needs to be further darkened, and step G is executed; if the three conditions are not satisfied, representing that the color is close to gray or close to gray, carrying out numerical value reassignment and executing the step H;
step G: re-assigning tr, tg and tb to be 0; this step serves to turn black to pure black, darken color, RGB (0,0, 0);
step H: and (3) first assignment:
the re-assignment of tr is the difference between tr and tmp;
the tg reassign value is the difference between tg and tmp;
the re-assignment of tb is the difference between tb and tmp;
and (5) second assignment:
the re-assignment of tr is the product of tr and constast;
the re-assignment of tg is the product of tg and constast;
the re-assignment of tb is the product of tb and constast;
and (3) third assignment:
the re-assignment of tr is the sum of the product of tmp and bright and tr;
the tg reassign value is the sum of tg and the product of tmp and brightness;
the re-assignment of tb is the sum of tb and the product of tmp and bright;
the first assignment is to calculate the change base number, the second assignment is to calculate the product of the change base number and the constast coefficient to obtain the respective increased or decreased numerical values, and the third assignment is to finally assign the value to deepen or lighten the gray, wherein the numerical value is smaller than the original value, namely deepen, and conversely, the numerical value is lightened.
After executing step E, G or H, executing step C, so that for newly assigned tr, tg, and tb, in the RGB value reunion range (0-255), arrayColor [ count ] ═ color. Judging whether the current execution times count is more than or equal to the total number of the pixel points, if not, continuously acquiring the next pixel point to execute the steps; and if the process is finished, regenerating a new picture with the same size according to the width, height and arrayColor array.
In this embodiment, all the pixel points in the nail art picture may execute the above steps in parallel, or may execute the above steps sequentially, which is not limited in this embodiment of the invention.
In the embodiment of the present invention, the value range of RGB is 0 to 255, RGB (255, 255, 255) represents pure white, and when the value of RGB (255, 255, 255) is gradually decreased, pure white approaches to gray, and b + g + r + Y1< (255 × 3); the value range of Y1 is about 0-15, and the RGB color is only required to be close to pure white, such as RGB (250, 250, 250), and the function is to distinguish white from other colors, so that the pixel points close to pure white can be screened conveniently; RGB (0,0,0) represents pure black, when the RGB (0,0,0) numerical value slowly increases, pure black is close to grey, RGB (Y2, Y2, Y2), the value range of Y2 is about 10-30, only need to ensure that RGB colour is close to pure black can, like RGB (25,25,25), the effect is to screen out the pixel point that is close to pure black, makes it change into pure black, reaches the effect of deepening black. Specific values of Y1 and Y2 are not intended to limit the present invention.
In the embodiment of the invention, the conast and bright theory values are any values (minus infinity to plus infinity), because of the condition constraint of step C, the final values are all between 0 and 255, the values are too huge and have no meaning, actually, the conast and bright values should be between 0 and 2, and when the conast and bright are both 1, the conast and bright represent that only white, black and gray are changed, and other colors are not processed, so that the original state is maintained. When the contrast is less than 1, the color becomes gorgeous, when the contrast is greater than 1, the color becomes grayish, when the brightness is less than 1, the brightness becomes dark, and when the brightness is greater than 1, the brightness becomes bright. Different contrast and brightness values are set to make the processed colors of the same picture different, so that patterns with different colors can be generated by adjusting the contrast and brightness values; or different pictures are processed under the same contrast and brightness values, and the colors of the pictures are changed in batches.
The embodiment has the following beneficial effects:
acquiring input operation of a user; when the input operation is selecting a nail art picture, performing pixel processing on the selected nail art picture according to the pre-stored color concentration to obtain a new nail art picture; when the input operation is to select the color density, the pre-stored nail art picture is subjected to pixel processing according to the selected color density so as to obtain a new nail art picture, the direct operation on pixel points is adopted, the color density of the nail art picture is changed to achieve the effect of improving printing, the problem that the printing density cannot be adjusted by adjusting an ink box is solved, namely, the effect of exerting force for realizing the color density of the picture under the condition that the structure of the nail art machine is not changed is realized, the printing effect is better, the aesthetic requirement of a consumer on the nail art picture is met better, and the further development of the nail art market is greatly promoted. Through setting the value range of the color concentration, a certain numerical value range is set, the picture concentration is dynamically changed, and the color concentration of the nail beautifying pattern can be changed in real time. The method has the advantages that the batch processing can be realized, tools such as PS (polystyrene) and the like are not needed to be used for modification one by one, the cost of manual image modification is greatly reduced, the style of the image is not changed, and the change range is adjustable, flexible and changeable.
Example four
Referring to fig. 5, a schematic structural diagram of the fourth embodiment of the present invention for improving a nail painting effect;
a device for improving nail painting effect comprises:
an operation acquiring module 51, configured to acquire an input operation of a user;
a pixel processing module 52, configured to, when the input operation is selecting a nail art picture, perform pixel processing on the selected nail art picture according to a pre-stored color density to obtain a new nail art picture;
and a second pixel processing module 53, configured to, when the input operation is selecting a color density, perform pixel processing on a pre-stored nail art picture according to the selected color density to obtain a new nail art picture.
Preferably, the pixel processing comprises:
a pixel point obtaining unit, configured to obtain all pixel points in the nail art picture;
and the RGB value adjusting unit is used for adjusting the RGB value of each pixel point according to the color concentration.
Preferably, the pixel processing module 52 includes:
when the input operation is selecting a nail art picture, performing pixel processing on the selected nail art picture according to each pre-stored color concentration, so that the color concentration of the selected nail art picture changes along with each pre-stored color concentration, and n new nail art pictures are obtained; wherein n is greater than 1.
Preferably, the pixel processing two-module 53 includes:
when the input operation is to select the color concentration, performing pixel processing on each pre-stored nail art picture according to the selected color concentration so that the color concentration of each pre-stored nail art picture is changed along with the selected color concentration to obtain m new nail art pictures; wherein m is greater than 1.
Preferably, the RGB value adjusting unit includes:
step A: acquiring a current pixel point to obtain a specific numerical value of the pixel point R, G or B;
and B: judging whether the RGB value of the pixel point is close to a pure white numerical value or not;
if the value is close to the pure white value, executing the step C: if the R, G or B value of the pixel point is less than 0, the corresponding R, G or B is assigned as 0, and if the R, G or B value of the pixel point is greater than 255, the corresponding R, G or B is assigned as 255;
if not, executing step D: judging whether the RGB value of the pixel point is close to a gray numerical value or not;
if not, executing step E: assigning values to the R, G value and the B value according to a preset concentration change value and the average value corresponding to the R, G value or the B value;
if the gray value is close to the gray value, executing the step F: judging whether the RGB value of the pixel point is close to a black numerical value or not;
if the black value is close to the black value, executing the step G: assigning both R, G and B a value of 0;
if not, executing step H: obtaining the maximum value of the average values of the R, G and the B values, and assigning values to the R, G and the B values according to the maximum value and the preset concentration change value;
step C is performed after step E, G or H is performed.
Preferably, the method further comprises the following steps: after step C is performed, the current number of executions is increased by one;
when the current execution times is larger than or equal to the total numerical value of all the pixel points, the step of adjusting the RGB value according to the color density is not executed for the next pixel point;
and when the current execution times is less than the total numerical value of all the pixel points, executing a step on the next pixel point to adjust the RGB value according to the color density.
Preferably, the method further comprises the following steps:
the operation selection module is used for acquiring the selection operation of the user on the new nail art picture;
and the deleting module is used for deleting the nail art pictures which are not selected according to the selecting operation.
The embodiment has the following beneficial effects:
acquiring input operation of a user; when the input operation is selecting a nail art picture, performing pixel processing on the selected nail art picture according to the pre-stored color concentration to obtain a new nail art picture; when the input operation is to select the color density, the pre-stored nail art picture is subjected to pixel processing according to the selected color density so as to obtain a new nail art picture, the direct operation on pixel points is adopted, the color density of the nail art picture is changed to achieve the effect of improving printing, the problem that the printing density cannot be adjusted by adjusting an ink box is solved, namely, the effect of exerting force for realizing the color density of the picture under the condition that the structure of the nail art machine is not changed is realized, the printing effect is better, the aesthetic requirement of a consumer on the nail art picture is met better, and the further development of the nail art market is greatly promoted. Through setting the value range of the color concentration, a certain numerical value range is set, the picture concentration is dynamically changed, and the color concentration of the nail beautifying pattern can be changed in real time. The method has the advantages that the batch processing can be realized, tools such as PS (polystyrene) and the like are not needed to be used for modification one by one, the cost of manual image modification is greatly reduced, the style of the image is not changed, and the change range is adjustable, flexible and changeable.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.
It should be noted that, in the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and in a part that is not described in detail in a certain embodiment, reference may be made to the related descriptions of other embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are preferred and that acts and simulations are necessarily required in accordance with the invention.

Claims (8)

1. A method for improving nail painting effect is characterized by comprising the following steps:
acquiring input operation of a user;
when the input operation is selecting a nail art picture, performing pixel processing on the selected nail art picture according to the pre-stored color concentration to obtain a new nail art picture;
when the input operation is to select the color density, performing pixel processing on a pre-stored nail art picture according to the selected color density to obtain a new nail art picture;
wherein the pixel processing comprises: acquiring all pixel points in the nail art picture; adjusting the RGB value of each pixel point according to the color concentration;
the adjusting the RGB value of each pixel point according to the color density comprises the following steps:
step A: acquiring a current pixel point to obtain a specific numerical value of the pixel point R, G or B;
and B: judging whether the RGB value of the pixel point is not less than a pure white numerical value or not;
if the white color value is not less than the pure white color value, executing the step C: if the R, G or B value of the pixel point is less than 0, the corresponding R, G or B is assigned as 0, and if the R, G or B value of the pixel point is greater than 255, the corresponding R, G or B is assigned as 255;
if the value is less than the pure white value, executing the step D: judging whether the RGB value of the pixel point meets a preset gray judgment condition or not;
if not, executing the step E: assigning values to the R, G value and the B value according to a preset concentration change value and the average value corresponding to the R, G value or the B value;
if yes, executing the step F: judging whether the RGB value of the pixel point meets a preset black judgment condition or not;
if yes, executing step G: assigning both R, G and B a value of 0;
if not, executing step H: obtaining the maximum value of the average values of the R, G and the B values, and assigning values to the R, G and the B values according to the maximum value and the preset concentration change value;
step C is performed after step E, G or H is performed.
2. The method for improving the nail painting effect according to claim 1, wherein when the input operation is selecting a nail picture, performing pixel processing on the selected nail picture according to a pre-stored color density to obtain a new nail picture comprises:
when the input operation is selecting a nail art picture, performing pixel processing on the selected nail art picture according to each pre-stored color concentration, so that the color concentration of the selected nail art picture changes along with each pre-stored color concentration, and n new nail art pictures are obtained; wherein n is greater than 1.
3. The method for improving the nail painting effect according to claim 1, wherein when the input operation is selecting a color density, performing pixel processing on the pre-stored nail painting picture according to the selected color density, so that the pre-stored nail painting picture changes the original color density, includes:
when the input operation is to select the color concentration, performing pixel processing on each pre-stored nail art picture according to the selected color concentration so that the color concentration of each pre-stored nail art picture is changed along with the selected color concentration to obtain m new nail art pictures; wherein m is greater than 1.
4. The method for improving the nail painting effect according to claim 1, further comprising:
after step C is performed, the current number of executions is increased by one;
when the current execution times is larger than or equal to the total numerical value of all the pixel points, the step of adjusting the RGB value according to the color density is not executed for the next pixel point;
and when the current execution times is less than the total numerical value of all the pixel points, executing a step on the next pixel point to adjust the RGB value according to the color density.
5. The method for improving the nail painting effect according to any one of claims 1 to 4, further comprising:
acquiring the selection operation of the user on the new nail art picture;
and deleting the nail art picture which is not selected according to the selection operation.
6. The utility model provides an improve beautiful first air brushing effect device which characterized in that includes:
the operation acquisition module is used for acquiring input operation of a user;
the first pixel processing module is used for carrying out pixel processing on the selected nail art picture according to the pre-stored color concentration to obtain a new nail art picture when the input operation is to select the nail art picture;
the second pixel processing module is used for carrying out pixel processing on a pre-stored nail art picture according to the selected color concentration when the input operation is the selection of the color concentration so as to obtain a new nail art picture;
wherein the pixel processing comprises: acquiring all pixel points in the nail art picture; adjusting the RGB value of each pixel point according to the color concentration;
the adjusting the RGB value of each pixel point according to the color density comprises the following steps:
step A: acquiring a current pixel point to obtain a specific numerical value of the pixel point R, G or B;
and B: judging whether the RGB value of the pixel point is not less than a pure white numerical value or not;
if the white color value is not less than the pure white color value, executing the step C: if the R, G or B value of the pixel point is less than 0, the corresponding R, G or B is assigned as 0, and if the R, G or B value of the pixel point is greater than 255, the corresponding R, G or B is assigned as 255;
if the value is less than the pure white value, executing the step D: judging whether the RGB value of the pixel point meets a preset gray judgment condition or not;
if not, executing the step E: assigning values to the R, G value and the B value according to a preset concentration change value and the average value corresponding to the R, G value or the B value;
if yes, executing the step F: judging whether the RGB value of the pixel point meets a preset black judgment condition or not;
if yes, executing step G: assigning both R, G and B a value of 0;
if not, executing step H: obtaining the maximum value of the average values of the R, G and the B values, and assigning values to the R, G and the B values according to the maximum value and the preset concentration change value;
step C is performed after step E, G or H is performed.
7. An apparatus for improving nail painting effect, comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, comprising a stored computer program, wherein when the computer program runs, the computer-readable storage medium controls a device to execute the method for improving the nail painting effect according to any one of claims 1 to 5.
CN201810912986.8A 2018-08-10 2018-08-10 Method, device, equipment and storage medium for improving nail painting effect Active CN109087366B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810912986.8A CN109087366B (en) 2018-08-10 2018-08-10 Method, device, equipment and storage medium for improving nail painting effect

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810912986.8A CN109087366B (en) 2018-08-10 2018-08-10 Method, device, equipment and storage medium for improving nail painting effect

Publications (2)

Publication Number Publication Date
CN109087366A CN109087366A (en) 2018-12-25
CN109087366B true CN109087366B (en) 2021-01-12

Family

ID=64834276

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810912986.8A Active CN109087366B (en) 2018-08-10 2018-08-10 Method, device, equipment and storage medium for improving nail painting effect

Country Status (1)

Country Link
CN (1) CN109087366B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101751647A (en) * 2009-11-27 2010-06-23 庞己人 System and method for simulating body shape and choosing hair style and product on-trial design
CN102774135A (en) * 2011-05-09 2012-11-14 卡西欧计算机株式会社 Nail printing device and printing control method thereof
CN105160582A (en) * 2015-09-15 2015-12-16 广州市显泰工艺制品有限公司 Rapid nail service system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1947614A (en) * 2006-11-07 2007-04-18 王红 Method for making special effect pattern for finger-nail-beauty
CN102254337A (en) * 2011-04-26 2011-11-23 厦门吉比特网络技术股份有限公司 Method for changing colours of 2D (Two-Dimensional) animation chartlet
CN103456279B (en) * 2012-06-04 2017-08-25 希姆通信息技术(上海)有限公司 Mobile terminal and its color display
JP2017046988A (en) * 2015-09-03 2017-03-09 カシオ計算機株式会社 Drawing deice, method for operation control of drawing device, and program for operation control of drawing device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101751647A (en) * 2009-11-27 2010-06-23 庞己人 System and method for simulating body shape and choosing hair style and product on-trial design
CN102774135A (en) * 2011-05-09 2012-11-14 卡西欧计算机株式会社 Nail printing device and printing control method thereof
CN105160582A (en) * 2015-09-15 2015-12-16 广州市显泰工艺制品有限公司 Rapid nail service system

Also Published As

Publication number Publication date
CN109087366A (en) 2018-12-25

Similar Documents

Publication Publication Date Title
US8581922B2 (en) System and method for monochromatic tinting using saturation maps
JP6483221B2 (en) 3D code generation method
CN104076928B (en) A kind of method for adjusting text importing image
CN109783182A (en) A kind of method of adjustment, device, equipment and the medium of page subject matter tone
CN104935902B (en) Image color Enhancement Method, device and electronic equipment
JP5318587B2 (en) Gradation creating method, program and apparatus
CN103677640A (en) Virtual keyboard self-adaptation application theme method and system
CA2442603A1 (en) Digital composition of a mosaic image
Gerstner et al. Pixelated image abstraction with integrated user constraints
US8406566B1 (en) Methods and apparatus for soft edge masking
CN107408401B (en) User slider for simplified adjustment of images
CN110377860A (en) A kind of page color method of adjustment, device and electronic equipment
JP2005151282A (en) Apparatus and method of image processing, and program
CN103065357A (en) Manufacturing method of shadow figure model based on common three-dimensional model
CN112308944A (en) Augmented reality display method of simulated lip makeup
WO2023093291A1 (en) Image processing method and apparatus, computer device, and computer program product
US5828819A (en) Apparatus and method for automatically creating a picture in a style having painting-like coloring using an image processing
CN110335279A (en) Real-time green curtain is scratched as method, apparatus, equipment and storage medium
CN109087366B (en) Method, device, equipment and storage medium for improving nail painting effect
US20100201886A1 (en) Saturation contrast image enhancement
JP4174133B2 (en) Image generation method
US20090031213A1 (en) System and method for website colorization
CN106023196B (en) Non-monochromatic background matting method based on target figure
CN111752506B (en) Digital work display method, display device and computer readable medium
CN102137221A (en) Method and system for sharpening digital video image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant