CN115344187B - Method and device for identifying painting brush style by using safety Zhuo Huatu software - Google Patents
Method and device for identifying painting brush style by using safety Zhuo Huatu software Download PDFInfo
- Publication number
- CN115344187B CN115344187B CN202210968412.9A CN202210968412A CN115344187B CN 115344187 B CN115344187 B CN 115344187B CN 202210968412 A CN202210968412 A CN 202210968412A CN 115344187 B CN115344187 B CN 115344187B
- Authority
- CN
- China
- Prior art keywords
- level
- touch area
- tmp
- determining
- calculation
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000010422 painting Methods 0.000 title claims abstract description 19
- 238000004364 calculation method Methods 0.000 claims description 38
- 238000004590 computer program Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 9
- 230000008569 process Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 7
- 230000003287 optical effect Effects 0.000 description 4
- 230000002776 aggregation Effects 0.000 description 2
- 238000004220 aggregation Methods 0.000 description 2
- 238000005056 compaction Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 239000000243 solution Substances 0.000 description 2
- VLCQZHSMCYCDJL-UHFFFAOYSA-N tribenuron methyl Chemical compound COC(=O)C1=CC=CC=C1S(=O)(=O)NC(=O)N(C)C1=NC(C)=NC(OC)=N1 VLCQZHSMCYCDJL-UHFFFAOYSA-N 0.000 description 2
- 108010001267 Protein Subunits Proteins 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000010267 cellular communication Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000002347 injection Methods 0.000 description 1
- 239000007924 injection Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000003909 pattern recognition Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction 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/0488—Interaction 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
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The present disclosure provides a method and apparatus for identifying a brush style of an An Zhuo Huatu software, wherein the method includes: when a touch event of a target object is detected, acquiring the touch area of the target object; determining a target level corresponding to the target object according to the touch area, wherein the android drawing software is provided with a plurality of levels, each level corresponds to a drawing style, and the plurality of levels comprise the target level; and identifying a target painting brush style corresponding to the target level. According to the method and the device for drawing the touch area, the problem that the touch area standards reported by different touch frames in the related art are not uniform is solved, the fact that drawing is allowed to be carried out in different painting brush styles simultaneously on the basis of a touch area interval is achieved, and the limitation that a customized touch pen needs to be used is avoided.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for identifying a painting brush style by using software of An Zhuo Huatu.
Background
With the popularization of commercial display and touch televisions, android drawing software designed for large screens of commercial display and touch televisions is also increasing. The functions of drawing lines, changing the color of the drawing lines, changing the thickness of the drawing lines, or changing the strokes of the drawing lines, etc. are all developed around one of the core functions of the android drawing software.
In the prior art, the color, thickness, stroke, transparency and the like of the drawn lines can be modified, so that the drawn lines have different 'patterns', but the modification of the patterns is usually aimed at a whole single user. However, a large screen such as a commercial display and a touch television has a use scene in which multiple users draw lines on the screen at the same time. It is also true that in this case, each simultaneously operating user is given the same style. However, if the user is given one more choice, each user operating at the same time can draw the line of the exclusive style, the user experience is better.
In order to realize the result, a set of pens with different widths can be provided for users when commercial display and touch televisions are sold, and the built-in android drawing software is used for distinguishing the users operating simultaneously according to the touch widths obtained when the pens touch the touch screen and the preset touch widths. However, the defects are also obvious, the preset touch area cannot be modified, and the touch width of the infrared frame and the capacitive screen reported to the same width is different, so that even if the infrared frames of different manufacturers of the infrared frame report, the infrared frames of the same manufacturer report different firmware versions. It can be seen that the solution of drawing lines of different widths by providing the user with pens of different widths is severely limited by hardware and cumbersome and has a poor user experience.
At present, effective solutions have not been proposed for the problem that the touch area standards reported by different touch frames in the related art are not uniform.
Disclosure of Invention
The invention aims at overcoming the defects in the prior art, and provides a method and a device for identifying a painting brush style of safety Zhuo Huatu software, so as to at least solve the problem that the touch area standards reported by different touch frames in the related art are not uniform.
According to an aspect of the present disclosure, there is provided a method for identifying a brush style of an An Zhuo Huatu software, including:
when a touch event of a target object is detected, acquiring the touch area of the target object;
determining a target level corresponding to the target object according to the touch area, wherein the android drawing software is provided with a plurality of levels, each level corresponds to a drawing style, and the plurality of levels comprise the target level;
and identifying a target painting brush style corresponding to the target level.
According to another aspect of the present disclosure, there is provided an apparatus for recognizing a brush style of an An Zhuo Huatu software, comprising:
the first acquisition unit is used for acquiring the touch area of the target object when the touch event of the target object is detected;
the determining unit is used for determining a target level corresponding to the target object according to the touch area, wherein the android drawing software is provided with a plurality of levels, each level corresponds to a drawing style, and the plurality of levels comprise the target level;
and the identification unit is used for identifying the target painting brush style corresponding to the target level.
According to another aspect of the present disclosure, there is provided an electronic device including:
a processor; and
a memory in which a program is stored,
wherein the program comprises instructions which, when executed by the processor, cause the processor to perform the method of recognition of the android software brush style in the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method of recognition of the android software brush style in the present disclosure.
According to one or more technical schemes provided by the embodiment of the disclosure, when a touch event of a target object is detected, the touch area of the target object is obtained; determining a target level corresponding to the target object according to the touch area, wherein the android drawing software is provided with a plurality of levels, each level corresponds to a drawing style, and the plurality of levels comprise the target level; and identifying a target painting brush style corresponding to the target level. According to the method and the device for drawing the touch area, the problem that the touch area standards reported by different touch frames in the related art are not uniform is solved, the fact that drawing is allowed to be carried out in different painting brush styles simultaneously on the basis of a touch area interval is achieved, and the limitation that a customized touch pen needs to be used is avoided.
Drawings
Further details, features and advantages of the present disclosure are disclosed in the following description of exemplary embodiments, with reference to the following drawings, wherein:
FIG. 1 illustrates a flowchart of a method of identifying an android software brush style in accordance with an exemplary embodiment of the present disclosure;
FIG. 2 illustrates a schematic diagram of a multi-stage calibration process according to an exemplary embodiment of the present disclosure;
FIG. 3 shows a schematic diagram of a multi-level style selection process according to an exemplary embodiment of the present disclosure;
FIG. 4 shows a schematic diagram of a multi-level pattern recognition process according to an exemplary embodiment of the present disclosure;
FIG. 5 illustrates a schematic block diagram of an identification device of an android drawing software brush style in accordance with an exemplary embodiment of the present disclosure;
fig. 6 illustrates a block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below. It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
Aspects of the present disclosure are described below with reference to the accompanying drawings.
The exemplary embodiment of the disclosure provides a method for identifying a drawing style of An Zhuo Huatu software. Fig. 1 shows a flowchart of a method of identifying an android drawing software brush style according to an exemplary embodiment of the present disclosure, as shown in fig. 1, the method including the steps of:
step S101, when a touch event of a target object is detected, acquiring the touch area of the target object;
step S102, determining a target level corresponding to the target object according to the touch area, wherein the android drawing software is provided with a plurality of levels, each level corresponds to a drawing style, and the plurality of levels comprise the target level;
step S103, identifying a target painting brush pattern corresponding to the target level.
Through the steps, the drawing is allowed to be performed in different painting brush styles at the same time based on the touch area interval, the problem of different touch area standards reported by different touch frames is solved, and the limitation that a customized touch pen is needed to be used is avoided.
In some embodiments, the method for identifying the brush style of the android drawing software further comprises:
acquiring a touch area set of each level in the plurality of levels;
judging whether the touch area set of each level in the multiple levels meets preset requirements or not;
and if the touch area set of each of the multiple levels meets the preset requirement, calculating the demarcation value of the touch area set of the adjacent level.
In some embodiments, determining whether the set of touch areas for each of the plurality of levels meets a preset requirement includes:
judgment S n And S is equal to n-1 Whether or not the intersection of (1) exceeds the fault tolerance range, wherein S n Set of touch areas of n level, S n-1 A touch area set of n-1 level, n being an integer greater than 1;
if S n And S is equal to n-1 The intersection part of (1) does not exceed the fault tolerance range, and S is judged n Whether or not the data in (a) is concentrated;
if S n In the data set, then determine S n Meets the preset requirement.
In some of these embodiments, S is determined n And S is equal to n-1 Whether the intersection of (2) exceeds the fault tolerance range includes:
acquisition S n-1 MAX of (2) n-1 ;
Calculation S n Less than MAX n-1 The ratio of the elements of (2);
if the duty ratio is greater than the first threshold, determining S n And S is equal to n-1 Is beyond the fault tolerance range;
if the duty ratio is less than or equal to the first threshold value, determining S n And S is equal to n-1 Is not beyond the fault tolerance range.
In some of these embodiments, S is determined n Whether or not the data in (a) is concentrated includes:
calculation S n Variance sigma of (a);
if the variance sigma is greater than the second threshold, repeating the following steps until the variance sigma' is less than the second threshold: calculation S n Variance sigma after removal of maximum 1 And S is n Variance sigma after removal of minimum 2 The method comprises the steps of carrying out a first treatment on the surface of the According to variance sigma 1 Sum of variances sigma 2 Acquisition of the size relation S n ' wherein if the variance sigma 1 Less than variance sigma 2 ,S n ' S n The set obtained after removing the maximum value, ifVariance sigma 2 Less than variance sigma 1 ,S n ' S n Removing the set obtained after the minimum value; calculation S n 'variance σ', and will S n ' as S n ;
Calculation S n Becomes S n ' data to be removed takes up S n Is a percentage of (2);
if the percentage is greater than the first threshold, determining S n Is included in the data set.
In some embodiments, if the touch area set of each of the plurality of levels meets the preset requirement, calculating the demarcation value of the touch area set of the adjacent level includes:
calculation S n-1 Average Avg of (a) n-1 And Avg is taken n-1 Assignment to P left Calculate S n Average Avg of (a) n And Avg is taken n Assignment to P right ;
Calculation= (P left +P right )/2;
Calculation S n-1 Is greater than P tmp Duty ratio A of data of (2) 1 Calculate S n Less than P tmp Duty ratio A of data of (2) 2 ;
If the ratio is A 1 Sum of duty cycle A 2 Are all less than or equal to the first threshold, P will be tmp Assignment to D n-1 Wherein D is n-1 Is S n-1 And S is n Is defined by the boundary value of (2);
if the ratio is A 1 Greater than the first threshold, and/or a duty cycle A 2 If the value of P is larger than the first threshold value, the value of P is taken as P left Or P right ;
If P is greater than P tmp Assigning P to P right ' P is to tmp Assignment to P left ’;
If P is less than or equal to P tmp Assigning P to P left ' P is to tmp Assignment to P right ’;
Calculation of P tmp ’=(P left ’+P right ’)/2;
Will P tmp ' assign value to the P tmp And returns to perform the calculation S n-1 Is greater than P tmp Duty ratio A of data of (2) 1 Calculate S n Less than P tmp Duty ratio A of data of (2) 2 Is carried out by a method comprising the steps of.
In some embodiments, determining the target level corresponding to the target object according to the touch area includes:
judging the grading value of the touch area;
if the touch area is smaller than D1, determining the target level corresponding to the target object as a first level;
if the touch area is greater than or equal to D n-2 And the is less than D n-1 Determining the target level corresponding to the target object as an n-1 level;
if the touch area is greater than or equal to D n-1 And determining the target level corresponding to the target object as an nth level.
The embodiment of the disclosure can be divided into a multi-stage calibration module, a multi-stage pattern selection module and a multi-stage identification module based on the acquisition and calculation of touch events.
In practical applications, only two stages are generally calibrated, generally referred to as the 1-stage is the thin pen and the 2-stage is the thick pen. More stages can be opened according to the requirements of clients, and the names of the stages can be set according to the preference of the clients. The screen is calibrated by having a light gray transparent circle in the middle of the screen, which is used for guiding the user to touch the screen with different gestures, and the circle can be displayed in different places after clicking each time, so as to guide the user to touch the screen with different gestures. The number of times of each calibration is also configurable, such as 10 times, although it is also arbitrary to change the profile to 30 times if the customer has a demand.
The multi-stage style selection module can switch and select the grade 1 or grade 2 painting brush style, can select the painting brush type, can select different painting brush types, can select thickness and color, and can also have more style settings such as transparency, granularity and the like.
The specific implementation method of the embodiment of the disclosure is described as follows:
as shown in fig. 2, the implementation process of the multi-stage calibration module specifically includes:
1. a multi-level recognition level N is selected (different sets of drawing patterns are divided into N sets according to different widths of the brushes when drawing lines).
2. And if N is 1, ending the calibration, and if N is more than or equal to 2, carrying out N rounds of data acquisition.
3. Each round of calibration corresponds to a level of data acquisition, and the level goes from low to high, corresponding to a thin to thick width. The first round, level 1 data acquisition, is taken as an example.
a. The software will then prompt the user that this is a level 1 calibration round and guide the user through multiple touches of different gestures with the same object.
a-1. Since one object is touched with different gestures, the touch area thereof is different. Taking a pen as an example, the different gestures can be understood as the angle formed by the pen and the screen, the pen point is one area when falling perpendicular to the screen, the pen point is another area when falling at 45 degrees with the screen, and the pen point is another area when falling at 10 degrees with the screen. Considering that when a user uses the device normally, it is common for the user to have different gestures, and the gestures are different in area but all need to be classified into one type or one level, so that data of touches with different gestures need to be collected for subsequent calculation.
b. The collected touch area set to level 1 is denoted as S 1 . (analogically, level 2 is S 2 Grade N is S n )。
4. After the calibration is finished, S is obtained 1 、S 2 、...、S n 。
5. According to S 1 、S 2 、...、S n Whether the requirements are met or not is judged by whether the requirements are met or not, such as whether the data are concentrated enough or not, whether the intersection parts of adjacent sets exceed the fault tolerance range or not, and the like, and other standards.
6. If the user does not meet the requirements, a friendly prompt is popped up, and the user is recommended to use other objects as line drawing tools or the multi-level recognition level is reduced.
7. If the data meets the requirements, calculating a demarcation value according to the adjacent sets, and marking the demarcation value as D n-1 In S form 1 、S 2 For example, the boundary value D is calculated 1 。
567-1. First, it is determined whether or not the intersection of the current aggregate set and the aggregate set one level lower than itself exceeds the fault tolerance range. The criterion is to take the maximum value in the aggregate one level lower than itself (if S 1 Corresponding to 0), the current set S is calculated n If the element duty ratio is larger than C1 (the first threshold value), the data is considered to be unsatisfactory, and the process proceeds to 6. Otherwise, 567-2 is entered.
567-2, determining if the data is sufficiently focused.
a. The variance σ of the current set is calculated, and if σ is greater than C2 (the second threshold degree described above), then the data is considered to need further refinement.
b. Calculating the variance sigma of the aggregate after removing the current maximum 1 Variance sigma after the current minimum value is removed by the aggregate 2 Judging sigma 1 And sigma (sigma) 2 The size is taken as the simplifying basis of the aggregation, and a new aggregation is obtained. For example, if sigma 1 Smaller means that we have removed and concentrated the current maximum, resulting in a new set.
c. And calculating the variance sigma of the new set, and if sigma is larger than C2, considering that the data needs to be further simplified. And continuing to execute b.
d. If σ is equal to or less than C2, the data compaction is considered to be completed (considering the worst case, only one compaction is left, the condition that d is always satisfied enters e.)
e. And calculating the percentage of the removed data in the process of changing the original collection into the simplified collection to be the original collection, if the percentage is larger than C1, considering that the data is not satisfactory, entering 6, otherwise, entering 7. ( And (3) injection: entering 7, the original set before simplifying is used as temporary judgment )
567-3 calculating a demarcation value D 1 。
a. Calculate set S 1 Average value A of (2) vg1 Assign it to P left Calculate S 2 Average value A of (2) vg2 Assign it to P right 。
b. Through (P) left +P right ) (2) obtaining P tmp
c. Calculation S 1 Is greater than P tmp The duty ratio of the data of (2) is calculated S 2 Less than P tmp Is a duty cycle of the data of (a). If the duty ratio of both the two sets is less than or equal to C1, the value is given to D 1 Obtaining a demarcation value D 1 . If not, enter D, find D by dichotomy 1 .
d. If a certain duty ratio is larger than C1, taking P (or one of P) close to another collection for subsequent processing, and if P is larger than C1, assigning P to P right ’,P tmp Assignment to P left '. Otherwise, assign P to P left ' assign to P right '. Then calculate P tmp ’=(P left ’+P right ' s/2, P tmp ' assign value to the P tmp And returns to the step c. (because of the front faces 567-1, 567-2, the case where the duty ratio of both the two pools is larger than C1 does not occur at the same time)
For example, we calculate S 1 That is S 1 Is greater than P tmp If the duty ratio of the data is larger than C1, we get closer to another set, namely S 2 P of (2) is defined according to our progression from thin to thick, that is S 2 Is larger. Plus we are to P left And P right Assignment of P right Is a ratio P left Larger, so is closer to S 2 P of (2) is P right 。
e. Repeating b.c.d. eventually always find D 1 。
8. By calculation, D is obtained 1 、D 2 。。。。。。。
9. And (5) successful calibration, and completing the calibration.
As shown in fig. 3, the process of the multi-stage style selection module specifically includes:
1. and providing a corresponding style selection interface according to the success level of the last multi-stage calibration module.
2. And selecting a corresponding series on the interface, and entering a style selection interface of the corresponding series (for example, the last successful grade is 3, and 1,2 and 3 are included in the three series).
3. Patterns with adjustable corresponding series number, including width, color, transparency, strokes, primitive painting points and other customized pattern effects, and recording the patterns corresponding to the corresponding series number as Y 1 ,Y 2 ,...,。
As shown in fig. 4, the process of the multi-stage identification module specifically includes:
1. when an object touches, when an action_pointer_down event occurs (action_pointer_down represents a touch event when one object is pressed), the number of stages is determined based on the touch area recorded by the touch event being recorded as area, and the POINTER (POINTER is a value used by android to indicate to which finger/object a single touch event belongs) is recorded.
2. The judging method comprises the following steps: if area < D1, the level is 1, and if D1 is less than or equal to area < D2, the level is 2 n-1 The number of the area is less than or equal to N.
After judging the number of levels, the line drawn by the touch event corresponding to the post-PointerID uses the pattern of the number of levels, for example, if the number of levels is judged to be 2, pattern Y is used 2 。
The embodiment of the disclosure is based on the touch area interval, allows drawing with different painting brush styles at the same time, solves the problem of different touch area standards reported by different touch frames through the calibration module, and avoids the limitation of needing to use a customized touch pen.
It should be noted that the steps illustrated in the above-described flow or flow diagrams of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flow diagrams, in some cases, the steps illustrated or described may be performed in an order other than that illustrated herein.
The exemplary embodiment of the disclosure further provides a device for identifying a brush style of the software Zhuo Huatu, which is used for implementing the foregoing embodiment and the preferred embodiment, and is not described in detail. As used below, the terms "module," "unit," "sub-unit," and the like may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 5 shows a schematic block diagram of an identification device of an android drawing software brush style according to an exemplary embodiment of the present disclosure, as shown in fig. 5, the device includes:
a first obtaining unit 51, configured to obtain a touch area of a target object when a touch event of the target object is detected;
a determining unit 52, configured to determine a target level corresponding to the target object according to the touch area, where the android drawing software is provided with a plurality of levels, each level corresponds to a brush style, and the plurality of levels includes the target level;
and the identifying unit 53 is configured to identify a target brush style corresponding to the target level.
In some embodiments, the device for identifying the brush style of the android drawing software further comprises:
a second acquisition unit configured to acquire a set of touch areas of each of the plurality of levels;
the judging unit is used for judging whether the touch area set of each level in the multiple levels meets the preset requirement or not;
the computing unit is used for computing the demarcation value of the adjacent level touch area set if the touch area set of each level in the multiple levels meets the preset requirement.
In some of these embodiments, the determining unit includes:
a first judging module for judging S n And S is equal to n-1 Whether or not the intersection of (1) exceeds the fault tolerance range, wherein S n Set of touch areas of n level, S n-1 A touch area set of n-1 level, n being an integer greater than 1;
a second judging module for judging if S n And S is equal to n-1 The intersection part of (1) does not exceed the fault tolerance range, and S is judged n Whether or not the data in (a) is concentrated;
a first determining module for determining if S n In the data set, then determine S n Meets the preset requirement.
In some embodiments, the first determining module includes:
an acquisition sub-module for acquiring S n-1 MAX of (2) n-1 ;
A first calculation sub-module for calculating S n Less than MAX n-1 The ratio of the elements of (2);
a first determination submodule for determining S if the duty ratio is greater than a first threshold value n And S is equal to n-1 Is beyond the fault tolerance range;
a second determining submodule for determining S if the duty ratio is less than or equal to the first threshold value n And S is equal to n-1 Is not beyond the fault tolerance range.
In some embodiments, the second determining module includes:
a second calculation sub-module for calculating S n Variance sigma of (a);
and the execution submodule is used for repeatedly executing the following steps until the variance sigma' is smaller than the second threshold value if the variance sigma is larger than the second threshold value: calculation S n Variance sigma after removal of maximum 1 And S is n Variance sigma after removal of minimum 2 The method comprises the steps of carrying out a first treatment on the surface of the According to variance sigma 1 Sum of variances sigma 2 Acquisition of the size relation S n ' wherein if the variance sigma 1 Less than variance sigma 2 , Sn’ Is S n The set obtained after removing the maximum value, if the variance sigma 2 Less than variance sigma 1 ,S n ' S n Removing the set obtained after the minimum value; calculation S n 'variance σ', and will S n ' as S n ;
A third calculation sub-module for calculating S n Becomes S n ' data to be removed takes up S n Is a percentage of (2);
a third determination sub-module for determining S if the percentage is greater than the first threshold n Is included in the data set.
In some of these embodiments, the computing unit comprises:
a first calculation module for calculating S n-1 Average Avg of (a) n-1 And Avg is taken n-1 Assignment to P left Calculate S n Average Avg of (a) n And Avg is taken n Assignment to P right ;
A second calculation module for calculating P tmp =(P left +P right )/2;
A third calculation module for calculating S n-1 Is greater than P tmp Duty ratio A of data of (2) 1 Calculate S n Less than P tmp Duty ratio A of data of (2) 2 ;
A first assignment module for determining if the duty ratio A 1 Sum of duty cycle A 2 Are all less than or equal to the first threshold, P will be tmp Assignment to D n-1 Wherein D is n-1 Is S n-1 And S is n Is defined by the boundary value of (2);
a second assignment module for determining if the duty ratio A 1 Greater than the first threshold, and/or a duty cycle A 2 If the value of P is larger than the first threshold value, the value of P is taken as P left Or P right ;
A third assignment module for if P is greater than P tmp Assigning P to P right ' Ptmp is assigned to P left ’;
A fourth assignment module for if P is less than or equal to P tmp Assigning P to P left ' P is to tmp Assignment to P right ’;
A fourth calculation module for calculating P tmp ’=(P left ’+P right ’)/2;
A fifth assignment module for assigning P tmp 'Fu' for treating hypertensionValue to said P tmp And returns to perform the calculation S n-1 Is greater than P tmp Duty ratio A of data of (2) 1 Calculate S n Less than P tmp Duty ratio A of data of (2) 2 Is carried out by a method comprising the steps of.
In some of these embodiments, the determining unit 52 includes:
the third judging module is used for judging the grading value of the touch area;
a second determining module for determining if the touch area is smaller than D 1 Determining the target level corresponding to the target object as a first level;
a third determining module for determining if the touch area is greater than or equal to D n-2 And the is less than D n-1 Determining the target level corresponding to the target object as an n-1 level;
a fourth determining module, configured to, if the touch area is greater than or equal to D n-1 And determining the target level corresponding to the target object as an nth level.
The above-described respective modules may be functional modules or program modules, and may be implemented by software or hardware. For modules implemented in hardware, the various modules described above may be located in the same processor; or the above modules may be located in different processors in any combination.
The exemplary embodiments of the present disclosure also provide an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor. The memory stores a computer program executable by the at least one processor for causing the electronic device to perform a method according to embodiments of the present disclosure when executed by the at least one processor.
The present disclosure also provides a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is for causing the computer to perform a method according to an embodiment of the present disclosure.
The present disclosure also provides a computer program product comprising a computer program, wherein the computer program, when executed by a processor of a computer, is for causing the computer to perform a method according to embodiments of the disclosure.
Referring to fig. 6, a block diagram of an electronic device 600 that may be a server or a client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Electronic devices are intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the electronic device 600 includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 may also be stored. The computing unit 601, ROM 602, and RAM 603 are connected to each other by a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the electronic device 600 are connected to the I/O interface 605, including: an input unit 606, an output unit 607, a storage unit 608, and a communication unit 609. The input unit 606 may be any type of device capable of inputting information to the electronic device 600, and the input unit 606 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls of the electronic device. The output unit 607 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, video/audio output terminals, vibrators, and/or printers. Storage unit 608 may include, but is not limited to, magnetic disks, optical disks. The communication unit 609 allows the electronic device 600 to exchange information/data with other devices through a computer network, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above. For example, in some embodiments, the method of identifying the android software brush style may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 600 via the ROM 602 and/or the communication unit 609. In some embodiments, the computing unit 601 may be configured to perform the method of recognition of the android software brush style by any other suitable means (e.g., by means of firmware).
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
Claims (7)
1. A method for identifying a brush style by using software of An Zhuo Huatu, comprising the steps of:
when a touch event of a target object is detected, acquiring the touch area of the target object;
determining a target level corresponding to the target object according to the touch area, wherein the android drawing software is provided with a plurality of levels, each level corresponds to a drawing style, and the plurality of levels comprise the target level;
identifying a target painting brush style corresponding to the target level;
acquiring a touch area set of each level in the plurality of levels;
judging whether the touch area set of each level in the multiple levels meets preset requirements or not;
if the touch area set of each level in the multiple levels meets the preset requirement, calculating the demarcation value of the touch area set of the adjacent level;
the step of judging whether the touch area set of each level in the plurality of levels meets the preset requirements comprises the following steps:
judgment S n And S is equal to n-1 Whether or not the intersection of (1) exceeds the fault tolerance range, wherein S n Set of touch areas of n level, S n-1 A touch area set of n-1 level, n being an integer greater than 1;
if S n And S is equal to n-1 The intersection part of (1) does not exceed the fault tolerance range, and S is judged n Whether or not the data in (a) is concentrated;
if S n In the data set, then determine S n Meets the preset requirement;
judgment S n Whether or not the data in (a) is concentrated includes:
calculation S n Variance sigma of (a);
if the variance sigma is greater than the second threshold, repeating the following steps until the variance sigma' is less than the second threshold: calculation S n Variance sigma after removal of maximum 1 And S is n Variance sigma after removal of minimum 2 The method comprises the steps of carrying out a first treatment on the surface of the According to variance sigma 1 Sum of variances sigma 2 Acquisition of the size relation S n ' wherein if the variance sigma 1 Less than variance sigma 2 ,S n ' S n The set obtained after removing the maximum value, if the variance sigma 2 Less than variance sigma 1 ,S n ' S n Removing the set obtained after the minimum value; calculation S n 'variance σ', and will S n ' as S n ;
Calculation S n Becomes S n ' data to be removed takes up S n Is a percentage of (2);
if the percentage is greater than a first threshold, determining S n Is included in the data set.
2. The method for recognizing the brush style of the android drawing software as claimed in claim 1, wherein the step of judging S n And S is equal to n-1 Cross of (2)Whether the portion exceeds the fault tolerance range includes:
acquisition S n-1 MAX of (2) n-1 ;
Calculation S n Less than MAX n-1 The ratio of the elements of (2);
if the duty ratio is greater than the first threshold, determining S n And S is equal to n-1 Is beyond the fault tolerance range;
if the duty ratio is less than or equal to the first threshold value, determining S n And S is equal to n-1 Is not beyond the fault tolerance range.
3. The method for identifying a brush style of android drawing software according to claim 1, wherein if the touch area set of each of the plurality of levels meets the preset requirement, calculating the demarcation value of the touch area set of the adjacent level comprises:
calculation S n-1 Average Avg of (a) n-1 And Avg is taken n-1 Assignment to P left Calculate S n Average Avg of (a) n And Avg is taken n Assignment to P right ;
Calculation of P tmp =(P left +P right )/2;
Calculation S n-1 Is greater than P tmp Duty ratio A of data of (2) 1 Calculate S n Less than P tmp Duty ratio A of data of (2) 2 ;
If the ratio is A 1 Sum of duty cycle A 2 Are all less than or equal to the first threshold, P will be tmp Assignment to D n-1 Wherein D is n-1 Is S n-1 And S is n Is defined by the boundary value of (2);
if the ratio is A 1 Greater than the first threshold, and/or a duty cycle A 2 If the value of P is larger than the first threshold value, the value of P is taken as P left Or P right ;
If P is greater than P tmp Assigning P to P right ' P is to tmp Assignment to P left ’;
If P is less than or equal to P tmp Then assign PValue to P left ' P is to tmp Assignment to P right ’;
Calculation of P tmp ’=(P left ’+P right ’)/2;
Will P tmp ' assign value to the P tmp And returns to perform the calculation S n-1 Is greater than P tmp Duty ratio A of data of (2) 1 Calculate S n Less than P tmp Duty ratio A of data of (2) 2 Is carried out by a method comprising the steps of.
4. The method for identifying a brush style of android drawing software as recited in claim 3, wherein determining a target level corresponding to the target object according to the touch area comprises:
judging the grading value of the touch area;
if the touch area is smaller than D1, determining the target level corresponding to the target object as a first level;
if the touch area is greater than or equal to D n-2 And is smaller than D n-1 Determining the target level corresponding to the target object as an n-1 level;
if the touch area is greater than or equal to D n-1 And determining the target level corresponding to the target object as an nth level.
5. An apparatus for identifying a brush style using software of security Zhuo Huatu, comprising:
the first acquisition unit is used for acquiring the touch area of the target object when the touch event of the target object is detected;
the determining unit is used for determining a target level corresponding to the target object according to the touch area, wherein the android drawing software is provided with a plurality of levels, each level corresponds to a drawing style, and the plurality of levels comprise the target level;
the identifying unit is used for identifying the target painting brush style corresponding to the target level;
a second acquisition unit configured to acquire a set of touch areas of each of the plurality of levels;
the judging unit is used for judging whether the touch area set of each level in the multiple levels meets the preset requirement or not;
the computing unit is used for computing the demarcation value of the adjacent level touch area set if the touch area set of each level in the multiple levels meets the preset requirement;
the judging unit includes:
a first judging module for judging S n And S is equal to n-1 Whether or not the intersection of (1) exceeds the fault tolerance range, wherein S n Set of touch areas of n level, S n-1 A touch area set of n-1 level, n being an integer greater than 1;
a second judging module for judging if S n And S is equal to n-1 The intersection part of (1) does not exceed the fault tolerance range, and S is judged n Whether or not the data in (a) is concentrated;
a first determining module for determining if S n In the data set, then determine S n Meets the preset requirement;
the second judging module includes:
a second calculation sub-module for calculating S n Variance sigma of (a);
and the execution submodule is used for repeatedly executing the following steps until the variance sigma' is smaller than the second threshold value if the variance sigma is larger than the second threshold value: calculation S n Variance sigma after removal of maximum 1 And S is n Variance sigma after removal of minimum 2 The method comprises the steps of carrying out a first treatment on the surface of the According to variance sigma 1 Sum of variances sigma 2 Acquisition of the size relation S n ' wherein if the variance sigma 1 Less than variance sigma 2 , Sn’ Is S n The set obtained after removing the maximum value, if the variance sigma 2 Less than variance sigma 1 ,S n ' S n Removing the set obtained after the minimum value; calculation S n 'variance σ', and will S n ' as S n ;
A third calculation sub-module for calculating S n Becomes S n ' data to be removed takes up S n Percent of (v)Ratio of;
a third determination sub-module for determining S if the percentage is greater than a first threshold n Is included in the data set.
6. An electronic device, comprising:
a processor; and
a memory in which a program is stored,
wherein the program comprises instructions which, when executed by the processor, cause the processor to perform the method of recognition of an android software brush style according to any one of claims 1-4.
7. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of identifying an android software brush style according to any one of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210968412.9A CN115344187B (en) | 2022-08-12 | 2022-08-12 | Method and device for identifying painting brush style by using safety Zhuo Huatu software |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210968412.9A CN115344187B (en) | 2022-08-12 | 2022-08-12 | Method and device for identifying painting brush style by using safety Zhuo Huatu software |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115344187A CN115344187A (en) | 2022-11-15 |
CN115344187B true CN115344187B (en) | 2024-03-12 |
Family
ID=83951070
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210968412.9A Active CN115344187B (en) | 2022-08-12 | 2022-08-12 | Method and device for identifying painting brush style by using safety Zhuo Huatu software |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115344187B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103164158A (en) * | 2013-01-10 | 2013-06-19 | 深圳市欧若马可科技有限公司 | Method, system and device of creating and teaching painting on touch screen |
CN106547433A (en) * | 2016-11-07 | 2017-03-29 | 青岛海信电器股份有限公司 | Written handwriting determines method and device |
CN106843650A (en) * | 2017-01-17 | 2017-06-13 | 创维光电科技(深圳)有限公司 | The touch identification method and system of a kind of touch screen integrated machine |
CN109885201A (en) * | 2019-02-19 | 2019-06-14 | Oppo广东移动通信有限公司 | Touch screen touches area detection method, electronic device and computer readable storage medium |
CN113296616A (en) * | 2021-05-12 | 2021-08-24 | 深圳市宝视达光电有限公司 | Pen point selection method and device and intelligent terminal |
CN114385098A (en) * | 2020-10-20 | 2022-04-22 | 全方位语言解决方案有限责任公司 | Computerized method and apparatus for determining accuracy of written characters |
CN114816130A (en) * | 2022-06-29 | 2022-07-29 | 长沙朗源电子科技有限公司 | Writing recognition method and system of electronic whiteboard, storage medium and electronic whiteboard |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190004698A1 (en) * | 2013-04-15 | 2019-01-03 | Carnegie Mellon University | Virtual tools for use with touch-sensitive surfaces |
-
2022
- 2022-08-12 CN CN202210968412.9A patent/CN115344187B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103164158A (en) * | 2013-01-10 | 2013-06-19 | 深圳市欧若马可科技有限公司 | Method, system and device of creating and teaching painting on touch screen |
CN106547433A (en) * | 2016-11-07 | 2017-03-29 | 青岛海信电器股份有限公司 | Written handwriting determines method and device |
CN106843650A (en) * | 2017-01-17 | 2017-06-13 | 创维光电科技(深圳)有限公司 | The touch identification method and system of a kind of touch screen integrated machine |
CN109885201A (en) * | 2019-02-19 | 2019-06-14 | Oppo广东移动通信有限公司 | Touch screen touches area detection method, electronic device and computer readable storage medium |
CN114385098A (en) * | 2020-10-20 | 2022-04-22 | 全方位语言解决方案有限责任公司 | Computerized method and apparatus for determining accuracy of written characters |
CN113296616A (en) * | 2021-05-12 | 2021-08-24 | 深圳市宝视达光电有限公司 | Pen point selection method and device and intelligent terminal |
CN114816130A (en) * | 2022-06-29 | 2022-07-29 | 长沙朗源电子科技有限公司 | Writing recognition method and system of electronic whiteboard, storage medium and electronic whiteboard |
Also Published As
Publication number | Publication date |
---|---|
CN115344187A (en) | 2022-11-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104375797B (en) | Information processing method and electronic equipment | |
CN105117062A (en) | Screen luminance regulation method and mobile terminal | |
CN108628656A (en) | Interface adaptation method, device, computer equipment and storage medium on ios device | |
EP2869174A1 (en) | Method and device for text input and display of intelligent terminal | |
CN107943365B (en) | Line handwriting presenting method and device, electronic equipment and storage medium | |
CN109118447B (en) | Picture processing method, picture processing device and terminal equipment | |
CN104898981A (en) | Gesture recognizing method, device and terminal | |
CN106648326B (en) | The method and mobile terminal of screen time is put out in adjustment | |
CN109784365B (en) | Feature selection method, terminal, readable medium and computer program | |
CN110377215B (en) | Model display method and device and terminal equipment | |
CN108965575B (en) | Gesture action recognition method and device and terminal equipment | |
TWI610220B (en) | Apparatus and method for automatically controlling display screen density | |
CN109358927B (en) | Application program display method and device and terminal equipment | |
CN110928600A (en) | Cleaning method and device for terminal background application, mobile terminal and electronic equipment | |
CN115344187B (en) | Method and device for identifying painting brush style by using safety Zhuo Huatu software | |
CN108415890B (en) | Method for setting top display unit cell, terminal equipment and computer readable storage medium | |
CN105739771A (en) | Display interface management method and device as well as terminal | |
KR20150095523A (en) | Electronic apparatus and method for extracting color in electronic apparatus | |
CN111913644B (en) | Line drawing method and device for whiteboard and readable storage medium | |
CN103809909A (en) | Information processing method and electronic devices | |
CN106020691B (en) | A kind of item selection method and mobile terminal | |
CN105487801B (en) | Progress bar adjusting method and mobile terminal | |
CN114385295A (en) | Method and system for displaying picture in waterfall flow comparison mode | |
CN105493145A (en) | Method and device for determining user input on basis of visual information on user's fingernails or toenails | |
CN114518859A (en) | Display control method, display control device, electronic equipment and storage medium |
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 |