CN106775374A - Color obtaining method and device based on touch screen - Google Patents
Color obtaining method and device based on touch screen Download PDFInfo
- Publication number
- CN106775374A CN106775374A CN201611033744.9A CN201611033744A CN106775374A CN 106775374 A CN106775374 A CN 106775374A CN 201611033744 A CN201611033744 A CN 201611033744A CN 106775374 A CN106775374 A CN 106775374A
- Authority
- CN
- China
- Prior art keywords
- color
- user
- touch
- value
- screen
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 32
- 238000000605 extraction Methods 0.000 claims abstract description 21
- 239000003086 colorant Substances 0.000 claims abstract description 19
- 239000000284 extract Substances 0.000 claims description 13
- 238000001514 detection method Methods 0.000 claims description 7
- 230000008569 process Effects 0.000 abstract description 6
- 230000036410 touch Effects 0.000 description 40
- 230000006870 function Effects 0.000 description 8
- 230000006399 behavior Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000001960 triggered 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
-
- 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/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
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 invention discloses a color obtaining method and device based on a touch screen, wherein the method comprises the following steps: detecting contact of a user with the touch screen; determining a target area for performing color extraction according to the contact when the detected contact corresponds to a predetermined touch operation; extracting color values of all colors contained in the target area; displaying corresponding colors according to the extracted color values so that a user can select colors according to the displayed colors; and when the user's selection operation of the currently displayed color is monitored, acquiring the color selected by the user. By adopting the method and the device, the color required by the user can be acquired more quickly and accurately, the process of acquiring the target color is simplified, the working efficiency is improved, the accuracy of acquiring the target color is improved, and the user experience is enhanced.
Description
Technical field
The present invention relates to computer vision field, more particularly to a kind of color acquisition methods and device based on touch-screen.
Background technology
Intelligent flat is a kind of new electronic display unit, and user can scheme in writing words and drafting on Intelligent flat
Shape, is widely used in the fields such as education and instruction, enterprise's meeting, commercial exhibition.
Generally, user can distinguish different classes of written contents using the person's handwriting of different colours, and user mostly wants
Same category of content is write using the person's handwriting of same color.Therefore, in writing process, when user is needed to being write preceding
When the content crossed is supplemented, then need to switch back into preceding used person's handwriting color.In existing scheme, user is existed by naked eyes
Screened in the color software instrument of Intelligent flat, to give for change in preceding used person's handwriting color, however, color software instrument
In often there are multiple Adjacent colors, user needs to expend many time and efforts and goes to compare, and reduces the easy-to-use of color selection
Property, and the user having is relatively low to the identification capability of color, easily occurs deviation during selection, the normal of influence user is used.
The content of the invention
The technical problems to be solved by the invention are, there is provided a kind of color acquisition methods and device based on touch-screen,
Can faster and more accurately obtain the color that user needs.
In order to solve the above-mentioned technical problem, the one side of the embodiment of the present invention provides a kind of color based on touch-screen and obtains
Method is taken, methods described includes:
Detection contact of the user with touch-screen;
When the contact for detecting is corresponding with predetermined touch operation, determined for carrying out color extraction according to the contact
Target area;
Extract the color value of all colours included in the target area;
Color value according to extracting shows corresponding color, allows the user to carry out color choosing according to the color of display
Select;
When user is listened to currently displaying color when choosing operation, the color that user is chosen is obtained.
Preferably, the predetermined touch operation is the operation of two touches;
The target area determined according to the contact for carrying out color extraction, specially:
Obtain two coordinates of touch point on the touch-screen;
Calculate the coordinate at the midpoint between described two touch points;
It is determined that the circular scope region with the midpoint as the center of circle and with default numerical value as radius, and by the circle
Range areas are used as the target area for carrying out color extraction.
Preferably, before the color value that the basis is extracted shows corresponding color, also include:
The color value that will be extracted is preserved to default storage set;
The color value that the basis is extracted shows corresponding color, specially:
The color value in the storage set is read, and shows the color corresponding with the color value for reading.
Preferably, before the color value that the basis is extracted shows corresponding color, also include:
Obtain the color value corresponding to current background color;
When there is the color value corresponding to the current background color in the storage set, in the deletion storage set
Color value corresponding to the current background color.
Preferably, it is characterised in that before the color value that the basis is extracted shows corresponding color, also include:
The shared pixel in the target area of the acquisition color stored corresponding to the color value stored in set
Quantity;
According to the pixel quantity from more to few to corresponding color value sequence in the storage set;Wherein, pixel is accounted for
The color value corresponding to color more than quantity is arranged in front.
Preferably, the color value that the basis is extracted shows corresponding color, allows the user to the face according to display
Color carries out color selection, specifically includes:
Show that (i-1) the j+1 color value in the storage set is right to the i-th * j color values institute by color panel
The color answered;Wherein, the initial value of i is 1;J is default fixed numbers;
When user is listened to the handover operation of the currently displaying color of the color panel, i=i+1 is made, and according to
Current i values update the color shown by the color panel;
It is described to obtain the color that user is chosen when user is listened to currently displaying color when choosing operation, tool
Body is:
When user's color when choosing operation currently displaying to the color panel is listened to, obtain what user was chosen
Color.
Accordingly, the one side of the embodiment of the present invention also provides a kind of color acquisition device based on touch-screen, described
Device includes:
Contact detection module, for detecting contact of the user with touch-screen;
Target area determining module, for when the contact for detecting is corresponding with predetermined touch operation, being connect according to described
Touch the target area determined for carrying out color extraction;
Color value extraction module, the color value for extracting all colours included in the target area;
Color display module, for showing corresponding color according to the color value for extracting, allows the user to according to aobvious
The color shown carries out color selection;And,
Color acquisition module, for when user is listened to currently displaying color when choosing operation, obtaining user institute
The color chosen.
Preferably, the predetermined touch operation is the operation of two touches;
The target area determining module is specifically included:
Point coordinates acquiring unit is touched, for obtaining two coordinates of touch point on the touch-screen;
Midpoint coordinate calculating unit, the coordinate for calculating the midpoint between described two touch points;And,
Target area determining unit, for determining the circle with the midpoint as the center of circle and with default numerical value as radius
Range areas, and using the circular scope region as the target area for carrying out color extraction.
Preferably, described device also includes:
Color value preserving module, the color value for that will extract is preserved to default storage set;
The color display module specifically for:
The color value in the storage set is read, and shows the color corresponding with the color value for reading.
Preferably, described device also includes:
Background colour color value acquisition module, for obtaining the color value corresponding to current background color;And,
Background colour color value removing module, for when there is face corresponding to the current background color in the storage set
During colour, the color value corresponding to current background color described in the storage set is deleted.
Preferably, described device also includes:
Pixel quantity acquisition module, for obtaining the color corresponding to the color value stored in the storage set described
Shared pixel quantity in target area;And,
Color value order module, for according to the pixel quantity from more to few to corresponding color in the storage set
Value sequence;Wherein, the color value corresponding to the color more than pixel quantity is accounted for be arranged in front.
Preferably, the color display module is specifically included:
Color display unit to be selected, for showing (i-1) the j+1 color in the storage set by color panel
It is worth the color corresponding to the i-th * j color values;Wherein, the initial value of i is 1;J is default fixed numbers;And,
Color updating block to be selected, for working as the switching behaviour for listening to user to the currently displaying color of the color panel
When making, i=i+1, and the color according to current i values update the color panel are made;
The color acquisition module specifically for:
When user's color when choosing operation currently displaying to the color panel is listened to, obtain what user was chosen
Color.
Implement the present invention, have the advantages that:
Color acquisition methods and device based on touch-screen provided in an embodiment of the present invention, by detecting user and touch-screen
Contact, according to the contact determine user need the color chosen where target area, extract the target area Nei Bao
The color value of all colours for containing, corresponding color is shown further according to the color value for extracting, and is filtered out based on color value to be selected
Color, and be presented to user, and then user carries out color selection from color to be selected again, can be faster and more accurately
The color that user needs is obtained, the process for obtaining color of object is simplified, operating efficiency is improve, and improve color of object
The accuracy of acquisition, enhances Consumer's Experience.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of the one embodiment for the color acquisition methods based on touch-screen that the present invention is provided;
Fig. 2 is the structural representation of the one embodiment for the color acquisition device based on touch-screen that the present invention is provided.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made
Embodiment, belongs to the scope of protection of the invention.
The one side of the embodiment of the present invention provides a kind of color acquisition methods based on touch-screen.
Fig. 1 is referred to, is that the flow of the one embodiment for the color acquisition methods based on touch-screen that the present invention is provided is shown
It is intended to, methods described comprises the following steps:
S11, detection contact of the user with touch-screen;
In the present embodiment, user can contact the touch-screen on display device by writing implement, such as in touch-screen
Enterprising running hand write operation, is slided on the touchscreen by writing implement, to realize for handwriting trace being input to display device, and then
Corresponding person's handwriting lines are shown by display device, or, function control operation is carried out on the touchscreen, such as existed by writing implement
Completed on touch-screen 2 points long by, 2 points double-click or click on be arranged on touch-screen specific region function buttons, with trigger
Display device responds corresponding function control event.Wherein, display device can be mobile phone, Intelligent flat or PC, write
Instrument can be the finger of user or the electronic pen used cooperatively with display device, and the present invention is not especially limited.
S12, when the contact for detecting is corresponding with predetermined touch operation, determined for carrying out color according to the contact
The target area of extraction;
In this example it is shown that having pre-defined a touch operation in equipment, the touch operation obtains thing with color
Part is associated, and when contact of the user to touch-screen is matched with predetermined touch operation, triggering display device response color is obtained
Event, that is, perform step S12 to S15;In the specific implementation, the touch operation can have multiple choices, such as enter on the touchscreen
2 points of row is long to be pressed, 2 points double-click, the length more than 2 points is pressed, the double-click more than 2 points, contact area are more than predetermined threshold value and stop
What the time exceeded predetermined threshold value touchs, clicks on function button of specific region for being arranged on touch-screen etc..It should be noted that
Several touch operations can be pre-defined in display device, each touch operation correspondence One function control event works as detection
When contact to user to touch-screen is matched with predetermined touch operation, triggering display device responds corresponding function control thing
Part, it is only necessary to ensure that default touch operation is corresponded with function control event, do not collide with one another.
In the present embodiment, contact of the user to the touch-screen of display device, not only acts as trigger action, and the contact is also wrapped
The demand information to color of user is contained.Usually, when being pressed using 2 points long, 2 points double-click, the length more than 2 points by or
When the operation such as double-click more than 2 points obtains event to trigger color, user can be needed the color of selection to be placed in two touches
In region between point;When carrying out on the touchscreen, contact area is more than predetermined threshold value and the residence time exceedes touching for predetermined threshold value
Touch operation to trigger during color acquisition event, user can be needed the color of selection to be placed in the region of contact surface covering;When
When color acquisition event is triggered using the function button for clicking on the specific region for being arranged on touch-screen, can be on the display device
The selected frame in ejection target area, user can on the touchscreen move operation change the selected frame in target area size and
Position, the selected inframe in the target area is placed in by the color that user wants selection;In sum, can be according to user and touch
The contact of screen determines the target area for carrying out color extraction.
S13, the color value for extracting all colours included in the target area;
In this example it is shown that equipment is determined behind target area, it is necessary to extract in target area according to user's request
Comprising color color value, however, the size of target area is relevant with the writing implement that user uses, for example user uses hand
Abutment touch-screen, coverage rate is than larger when being contacted due to finger, therefore is possible in target area not only comprising user's needs
The color of object of extraction, and also have other colors, in order to more accurately obtain the color of user's needs, it is necessary to by target area
Comprising the color value of all colours all extract.Extracting the implementation method of color value can be, when it is determined that behind target area,
Sectional drawing is carried out to target area, and then extracts the color value of the color included in picture one by one, it is to be understood that how carried
Color value is taken for prior art, is not added with repeating herein.Wherein, color value refers to the rgb value of color.
The color value that S14, basis are extracted shows corresponding color, allows the user to carry out face according to the color of display
Color sorting is selected;
In this example it is shown that equipment shows corresponding color on the display panel according to the color value for extracting, by it
User is presented to, thus, user can carry out color selection operation by touch-screen, to choose the color of oneself needs.In addition,
The mode of display has various, and the corresponding color of all colours value that such as display device will be extracted from target area is disposable
Display.
S15, when user is listened to currently displaying color when choosing operation, obtain the color that user is chosen.
In the present embodiment, real-time monitoring users are to the selection operation of currently displaying color, when user passes through touch-screen
(i.e. user performs to currently displaying color and chooses behaviour for order of choosing to display device input to currently displaying color
Make, position for example on the touchscreen where certain color carries out single-click operation) when, display device obtains the face that user is chosen
Color value corresponding to color, and as the color of the output person's handwriting for writing operation next time.
The color acquisition methods based on touch-screen that the present embodiment is provided, by detecting contact of the user with touch-screen, root
Target area where the color that user's needs are chosen is determined according to the contact, extracts all face included in the target area
The color value of color, corresponding color is shown further according to the color value for extracting, and color to be selected is filtered out based on color value, and by its
User is presented to, and then user carries out color selection from color to be selected again, faster and more accurately can obtain user needs
The color wanted, simplifies the process for obtaining color of object, improves operating efficiency, and improve the accurate of color of object acquisition
Property, enhance Consumer's Experience.
Preferably, the predetermined touch operation is the operation of two touches;
The target area determined according to the contact for carrying out color extraction, specially:
Obtain two coordinates of touch point on the touch-screen;
Calculate the coordinate at the midpoint between described two touch points;
It is determined that the circular scope region with the midpoint as the center of circle and with default numerical value as radius, and by the circle
Range areas are used as the target area for carrying out color extraction.
In the present embodiment, two touch is operated for 2 points long by operation, i.e., when display device detects touch
When there is two contacts and duration simultaneously on screen and exceeding default time threshold, triggering color obtains event, carries out first
The determination of target area, according to the operating habit of user, can typically be needed the color of selection to be placed between two touch points
Region in, therefore, using two midpoints of the line of touch point as the center of circle, and using a default numerical value as radius, and
Determine a circular scope region, as long as default numerical value is chosen properly, usual user want selection color can by comprising
In the circular scope region, it is preferable that default numerical value can be slightly larger than two half of the length of the line of touch point.Separately
Outward, the two touches operation can also be 2 double click operations, be not added with repeating herein.
Preferably, before the color value that the basis is extracted shows corresponding color, also include:
The color value that will be extracted is preserved to default storage set;
The color value that the basis is extracted shows corresponding color, specially:
The color value in the storage set is read, and shows the color corresponding with the color value for reading.
In the present embodiment, all colours corresponding color value included in the target area is carried one by one
Take, at the same time, the color value that will be extracted is preserved to default storage one by one to be gathered, in the specific implementation, can be while carrying
Take while preserve, that is, extract a color value, the color value that first will currently extract is preserved to default storage set, with
Afterwards, then a color is extracted, then the color value that will currently extract is preserved to default storage set, until in target area
The corresponding color value of all of color is all saved to default storage set.In addition, storage set can for array, chained list or
Any one in key-value pair.
It should be noted that the color value that will be extracted is preserved to default storage set, can very easily to color
Value is focused on, for example delete or sort etc., greatly improve data-handling efficiency.
Preferably, before the color value that the basis is extracted shows corresponding color, also include:
Obtain the color value corresponding to current background color;
When there is the color value corresponding to the current background color in the storage set, in the deletion storage set
Color value corresponding to the current background color.
It should be noted that if the color to be selected for being presented to user occurs in that the current background color of display device, user misses
Select current background color, display device to obtain current background color, background colour has been write the face of the output person's handwriting of operation as next time
Color, when user carries out writing operation, its person's handwriting write will be unable to normal display, and Consumer's Experience is not good.
In the present embodiment, before corresponding color is shown according to the color value for extracting, just by storage set
Color value corresponding to current background color is deleted, therefore, the current background color of display device will not be shown as color to be selected
Show, and then user just cannot again choose current background color, significantly reduce the probability of user misoperation, improve color acquisition
Accuracy.In addition, when the color value corresponding to current background color is extracted, just not by the color corresponding to current background color
Value is preserved to storage to be gathered, and can also be solved the above problems, and it implements process and is not added with repeating herein.
Preferably, before the color value that the basis is extracted shows corresponding color, also include:
The shared pixel in the target area of the acquisition color stored corresponding to the color value stored in set
Quantity;
According to the pixel quantity from more to few to corresponding color value sequence in the storage set;Wherein, pixel is accounted for
The color value corresponding to color more than quantity is arranged in front.
It should be noted that when target area is directly determined by display device according to the contact of user, rather than with
Family is after predetermined touch operation triggers color acquisition event, in addition it is also necessary to which user participates in carrying out the determination of target area, according to
The operating habit of user, the position that the pixel quantity of the color that general user can select required for it is more is touched, because
This, generally, the color in the target area more than shared pixel quantity is the possibility of color that user needs to choose
Than larger.
Therefore, in the present embodiment, according to pixel quantity, corresponding color value is carried out from more to few set to storage
Sequence, will account for color alignment more than pixel quantity preceding, and then corresponding to the color value that will can be arranged in front of display device
Color is displayed in more obvious position (being for example displayed in forward position in color panel), or in more obvious mode
Shown (for example occupy larger display area in color panel), be conducive to helping user more quickly in color to be selected
In select user required for color, be effectively improved operating efficiency.
Preferably, the color value that the basis is extracted shows corresponding color, allows the user to the face according to display
Color carries out color selection, specifically includes:
Show that (i-1) the j+1 color value in the storage set is right to the i-th * j color values institute by color panel
The color answered;Wherein, the initial value of i is 1;J is default fixed numbers;
When user is listened to the handover operation of the currently displaying color of the color panel, i=i+1 is made, and according to
Current i values update the color shown by the color panel;
It is described to obtain the color that user is chosen when user is listened to currently displaying color when choosing operation, tool
Body is:
When user's color when choosing operation currently displaying to the color panel is listened to, obtain what user was chosen
Color.
In the present embodiment, color can be carried out from various ways to show, for example, ejection color panel, color face
Plate once only shows the color of predetermined number.Specifically, the predetermined number being arranged in front in color panel reading storage set
Color value, and the color corresponding to the current color value for reading is shown, if user is not in the face that color panel is currently displaying
Color required for it is chosen in color, display device further according to user to the handover operation of color panel, in reading storage set
The color value of the predetermined number being arranged in front in the color value not being read, and show corresponding to the current color value for reading
Color, the like, until user chooses currently displaying color, obtain the color that user chooses, or gather in storage
In when not existed the color value not being read, but user still without currently displaying color is chosen, judge that color is obtained
Failure.Furthermore it is possible to according to the order for reading color value, color is carried out in sequence and is shown, the face that will first read
The forward position in color panel of color alignment corresponding to colour, is conducive to causing user to note, helps user faster
Carry out color selection.And, when user's color currently displaying to the color panel makes handover operation, can delete
The color value read in storage set, reduces the occupancy to memory space.
Accordingly, the one side of the embodiment of the present invention also provides a kind of color acquisition device based on touch-screen, can
Realize all flows in the color acquisition methods based on touch-screen that the one side of the embodiment of the present invention is provided.
Fig. 2 is referred to, is that the structure of the one embodiment for the color acquisition device based on touch-screen that the present invention is provided is shown
It is intended to, described device includes:
Contact detection module 11, for detecting contact of the user with touch-screen;
Target area determining module 12, for when the contact for detecting is corresponding with predetermined touch operation, according to described
Contact determines the target area for carrying out color extraction;
Color value extraction module 13, the color value for extracting all colours included in the target area;
Color display module 14, for showing corresponding color according to the color value for extracting, allows the user to basis
The color of display carries out color selection;And,
Color acquisition module 15, for when user is listened to currently displaying color when choosing operation, obtaining user
The color chosen.
Preferably, the predetermined touch operation is the operation of two touches;
The target area determining module 12 is specifically included:
Point coordinates acquiring unit is touched, for obtaining two coordinates of touch point on the touch-screen;
Midpoint coordinate calculating unit, the coordinate for calculating the midpoint between described two touch points;And,
Target area determining unit, for determining the circle with the midpoint as the center of circle and with default numerical value as radius
Range areas, and using the circular scope region as the target area for carrying out color extraction.
Preferably, described device also includes:
Color value preserving module, the color value for that will extract is preserved to default storage set;
The color display module 14 specifically for:
The color value in the storage set is read, and shows the color corresponding with the color value for reading.
Preferably, the storage set can be any one in array, chained list or key-value pair.
Preferably, described device also includes:
Background colour color value acquisition module, for obtaining the color value corresponding to current background color;And,
Background colour color value removing module, for when there is face corresponding to the current background color in the storage set
During colour, the color value corresponding to current background color described in the storage set is deleted.
Preferably, described device also includes:
Pixel quantity acquisition module, for obtaining the color corresponding to the color value stored in the storage set described
Shared pixel quantity in target area;And,
Color value order module, for according to the pixel quantity from more to few to corresponding color in the storage set
Value sequence;Wherein, the color value corresponding to the color more than pixel quantity is accounted for be arranged in front.
Preferably, the color display module 14 is specifically included:
Color display unit to be selected, for showing (i-1) the j+1 color in the storage set by color panel
It is worth the color corresponding to the i-th * j color values;Wherein, the initial value of i is 1;J is default fixed numbers;
Color updating block to be selected, for working as the switching behaviour for listening to user to the currently displaying color of the color panel
When making, i=i+1, and the color according to current i values update the color panel are made;
The color acquisition module 15 specifically for:
When user's color when choosing operation currently displaying to the color panel is listened to, obtain what user was chosen
Color.
Color acquisition methods and device based on touch-screen provided in an embodiment of the present invention, by detecting user and touch-screen
Contact, according to the contact determine user need the color chosen where target area, extract the target area Nei Bao
The color value of all colours for containing, corresponding color is shown further according to the color value for extracting, and is filtered out based on color value to be selected
Color, and be presented to user, and then user carries out color selection from color to be selected again, can be faster and more accurately
The color that user needs is obtained, the process for obtaining color of object is simplified, operating efficiency is improve, and improve color of object
The accuracy of acquisition, enhances Consumer's Experience.
The above is the preferred embodiment of the present invention, it is noted that for those skilled in the art
For, under the premise without departing from the principles of the invention, some improvement and deformation can also be made, these are improved and deformation is also considered as
Protection scope of the present invention.
One of ordinary skill in the art will appreciate that all or part of flow in realizing above-described embodiment method, can be
The hardware of correlation is instructed to complete by computer program, described program can be stored in a computer read/write memory medium
In, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, RAM) etc..
Claims (10)
1. a kind of color acquisition methods based on touch-screen, it is characterised in that including:
Detection contact of the user with touch-screen;
When the contact for detecting is corresponding with predetermined touch operation, the mesh for carrying out color extraction is determined according to the contact
Mark region;
Extract the color value of all colours included in the target area;
Color value according to extracting shows corresponding color, allows the user to carry out color selection according to the color of display;
When user is listened to currently displaying color when choosing operation, the color that user is chosen is obtained.
2. the color acquisition methods of touch-screen are based on as claimed in claim 1, it is characterised in that the predetermined touch operates and is
Two touches are operated;
The target area determined according to the contact for carrying out color extraction, specially:
Obtain two coordinates of touch point on the touch-screen;
Calculate the coordinate at the midpoint between described two touch points;
It is determined that the circular scope region with the midpoint as the center of circle and with default numerical value as radius, and by the circular scope
Region is used as the target area for carrying out color extraction.
3. the color acquisition methods of touch-screen are based on as claimed in claim 1, it is characterised in that the face that the basis is extracted
Before colour shows corresponding color, also include:
The color value that will be extracted is preserved to default storage set;
The color value that the basis is extracted shows corresponding color, specially:
The color value in the storage set is read, and shows the color corresponding with the color value for reading.
4. the color acquisition methods of touch-screen are based on as claimed in claim 3, it is characterised in that the face that the basis is extracted
Before colour shows corresponding color, also include:
Obtain the color value corresponding to current background color;
When there is the color value corresponding to the current background color in the storage set, delete described in the storage set
Color value corresponding to current background color.
5. color acquisition methods based on touch-screen as any one of claim 3 or 4, it is characterised in that described
Before showing corresponding color according to the color value for extracting, also include:
The shared pixel quantity in the target area of the acquisition color stored corresponding to the color value stored in set;
According to the pixel quantity from more to few to corresponding color value sequence in the storage set;Wherein, pixel quantity is accounted for
Color value corresponding to many colors is arranged in front.
6. the color acquisition methods of touch-screen are based on as claimed in claim 5, it is characterised in that the face that the basis is extracted
Colour shows corresponding color, allows the user to carry out color selection according to the color of display, specifically includes:
Shown corresponding to (i-1) the j+1 color value to the i-th * j color values in the storage set by color panel
Color;Wherein, the initial value of i is 1;J is default fixed numbers;
When user is listened to the handover operation of the currently displaying color of the color panel, i=i+1 is made, and according to current
I values update color shown by the color panel;
It is described when user is listened to currently displaying color when choosing operation, obtain the color that user is chosen, specially:
When user's color when choosing operation currently displaying to the color panel is listened to, the face that user is chosen is obtained
Color.
7. a kind of color acquisition device based on touch-screen, it is characterised in that including:
Contact detection module, for detecting contact of the user with touch-screen;
Target area determining module, it is true according to the contact for when the contact for detecting is corresponding with predetermined touch operation
The fixed target area for being used to carry out color extraction;
Color value extraction module, the color value for extracting all colours included in the target area;
Color display module, for showing corresponding color according to the color value for extracting, allows the user to according to display
Color carries out color selection;And,
Color acquisition module, for when user is listened to currently displaying color when choosing operation, obtaining user and being chosen
Color.
8. the color acquisition device of touch-screen is based on as claimed in claim 7, it is characterised in that the predetermined touch operates and is
Two touches are operated;
The target area determining module is specifically included:
Point coordinates acquiring unit is touched, for obtaining two coordinates of touch point on the touch-screen;
Midpoint coordinate calculating unit, the coordinate for calculating the midpoint between described two touch points;And,
Target area determining unit, for determining the circular scope with the midpoint as the center of circle and with default numerical value as radius
Region, and using the circular scope region as the target area for carrying out color extraction.
9. the color acquisition device of touch-screen is based on as claimed in claim 8, it is characterised in that described device also includes:
Color value preserving module, the color value for that will extract is preserved to default storage set;
Pixel quantity acquisition module, for obtaining the color corresponding to the color value stored in the storage set in the target
Shared pixel quantity in region;And,
Color value order module, for being arranged corresponding color value in the storage set from more to few according to the pixel quantity
Sequence;Wherein, the color value corresponding to the color more than pixel quantity is accounted for be arranged in front.
10. the color acquisition device of touch-screen is based on as claimed in claim 9, it is characterised in that the color display module
Specifically include:
Color display unit to be selected, for showing (i-1) the j+1 color value in the storage set by color panel extremely
Color corresponding to i-th * j color values;Wherein, the initial value of i is 1;J is default fixed numbers;And,
Color updating block to be selected, handover operation of the user to the currently displaying color of the color panel is listened to for working as
When, make i=i+1, and the color according to current i values update the color panel;
The color acquisition module specifically for:
When user's color when choosing operation currently displaying to the color panel is listened to, the face that user is chosen is obtained
Color.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611033744.9A CN106775374A (en) | 2016-11-17 | 2016-11-17 | Color obtaining method and device based on touch screen |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611033744.9A CN106775374A (en) | 2016-11-17 | 2016-11-17 | Color obtaining method and device based on touch screen |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106775374A true CN106775374A (en) | 2017-05-31 |
Family
ID=58971075
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611033744.9A Pending CN106775374A (en) | 2016-11-17 | 2016-11-17 | Color obtaining method and device based on touch screen |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106775374A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018082239A1 (en) * | 2016-11-07 | 2018-05-11 | 广州视源电子科技股份有限公司 | Method and apparatus for obtaining color based on touch screen |
CN108170363A (en) * | 2017-12-29 | 2018-06-15 | 努比亚技术有限公司 | picture editing method, intelligent terminal and computer readable storage medium |
CN109375854A (en) * | 2018-09-26 | 2019-02-22 | Oppo(重庆)智能科技有限公司 | Drawing practice, device, storage medium and electronic equipment |
CN109427036A (en) * | 2017-08-22 | 2019-03-05 | 北京搜狗科技发展有限公司 | The treating method and apparatus of skin color |
CN111435282A (en) * | 2019-01-14 | 2020-07-21 | 阿里巴巴集团控股有限公司 | Image processing method and device and electronic equipment |
CN111435276A (en) * | 2019-01-14 | 2020-07-21 | 阿里巴巴集团控股有限公司 | Image processing method and device and electronic equipment |
CN113946262A (en) * | 2020-07-15 | 2022-01-18 | 中移(苏州)软件技术有限公司 | Color taking method and device and storage medium |
WO2023040505A1 (en) * | 2021-09-16 | 2023-03-23 | 华为技术有限公司 | Cross-device drawing system |
CN115938244A (en) * | 2023-02-20 | 2023-04-07 | 深圳市英唐数码科技有限公司 | Display method, system and storage medium of electronic paper book adapting to multiple pen shapes |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103092520A (en) * | 2013-01-25 | 2013-05-08 | 广东欧珀移动通信有限公司 | Method and device of screen image clipping and touch screen mobile device |
CN104915971A (en) * | 2015-05-29 | 2015-09-16 | 深圳市金立通信设备有限公司 | Method and terminal for obtaining color values |
CN106033305A (en) * | 2015-03-20 | 2016-10-19 | 广州金山移动科技有限公司 | Screen color picking method and device |
CN106056530A (en) * | 2016-06-01 | 2016-10-26 | 腾讯科技(深圳)有限公司 | Method and device for displaying picture content in application |
-
2016
- 2016-11-17 CN CN201611033744.9A patent/CN106775374A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103092520A (en) * | 2013-01-25 | 2013-05-08 | 广东欧珀移动通信有限公司 | Method and device of screen image clipping and touch screen mobile device |
CN106033305A (en) * | 2015-03-20 | 2016-10-19 | 广州金山移动科技有限公司 | Screen color picking method and device |
CN104915971A (en) * | 2015-05-29 | 2015-09-16 | 深圳市金立通信设备有限公司 | Method and terminal for obtaining color values |
CN106056530A (en) * | 2016-06-01 | 2016-10-26 | 腾讯科技(深圳)有限公司 | Method and device for displaying picture content in application |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018082239A1 (en) * | 2016-11-07 | 2018-05-11 | 广州视源电子科技股份有限公司 | Method and apparatus for obtaining color based on touch screen |
CN109427036A (en) * | 2017-08-22 | 2019-03-05 | 北京搜狗科技发展有限公司 | The treating method and apparatus of skin color |
CN109427036B (en) * | 2017-08-22 | 2022-09-30 | 北京搜狗科技发展有限公司 | Skin color treatment method and device |
CN108170363A (en) * | 2017-12-29 | 2018-06-15 | 努比亚技术有限公司 | picture editing method, intelligent terminal and computer readable storage medium |
CN109375854A (en) * | 2018-09-26 | 2019-02-22 | Oppo(重庆)智能科技有限公司 | Drawing practice, device, storage medium and electronic equipment |
CN111435282A (en) * | 2019-01-14 | 2020-07-21 | 阿里巴巴集团控股有限公司 | Image processing method and device and electronic equipment |
CN111435276A (en) * | 2019-01-14 | 2020-07-21 | 阿里巴巴集团控股有限公司 | Image processing method and device and electronic equipment |
CN113946262A (en) * | 2020-07-15 | 2022-01-18 | 中移(苏州)软件技术有限公司 | Color taking method and device and storage medium |
CN113946262B (en) * | 2020-07-15 | 2024-04-09 | 中移(苏州)软件技术有限公司 | Color taking method and device and storage medium |
WO2023040505A1 (en) * | 2021-09-16 | 2023-03-23 | 华为技术有限公司 | Cross-device drawing system |
CN115938244A (en) * | 2023-02-20 | 2023-04-07 | 深圳市英唐数码科技有限公司 | Display method, system and storage medium of electronic paper book adapting to multiple pen shapes |
CN115938244B (en) * | 2023-02-20 | 2023-06-02 | 深圳市英唐数码科技有限公司 | Multi-pen-shaped adaptive electronic paper book display method, system and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106775374A (en) | Color obtaining method and device based on touch screen | |
CN103827785B (en) | Using pressure differences with a touch-sensitive display screen | |
US7979805B2 (en) | Button discoverability | |
EP2869174A1 (en) | Method and device for text input and display of intelligent terminal | |
CN102289325B (en) | Mobile terminal, touch area recognition device and method | |
CN108829314B (en) | Screenshot selecting interface selection method, device, equipment and storage medium | |
CN108829327B (en) | Writing method and device of interactive intelligent equipment | |
DE202007013923U1 (en) | Multiple event input system | |
CN106168870A (en) | A kind of split screen window display method and terminal | |
CN111475097A (en) | Handwriting selection method and device, computer equipment and storage medium | |
CN104866225A (en) | Electronic device having touch display screen and control method therefor | |
CN107193519A (en) | Display control method and device, computer installation and computer-readable recording medium | |
CN105426082B (en) | A kind of application interface windows switching method and terminal | |
WO2017140242A1 (en) | Information processing method and client | |
CN106325663A (en) | Mobile terminal and screen capturing method thereof | |
CN104951193B (en) | menu display method and device | |
CN103150170A (en) | Table top generation and operation methods of mobile terminal and corresponding devices thereof | |
CN112057847A (en) | Game object control method and device | |
CN109976599A (en) | A kind of unread message processing method, device and the equipment of application program | |
CN113835580A (en) | Application icon display method and device, electronic equipment and storage medium | |
CN107239222A (en) | The control method and terminal device of a kind of touch-screen | |
CN104571811B (en) | Information processing method and electronic equipment | |
CN103106022A (en) | Method for setting and detecting virtual key of touch panel | |
CN104932772B (en) | The application display method and device of smartwatch | |
CN106201399A (en) | A kind of split screen window display method and terminal |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170531 |