CN108171155A - A kind of image-scaling method and terminal - Google Patents

A kind of image-scaling method and terminal Download PDF

Info

Publication number
CN108171155A
CN108171155A CN201711441650.XA CN201711441650A CN108171155A CN 108171155 A CN108171155 A CN 108171155A CN 201711441650 A CN201711441650 A CN 201711441650A CN 108171155 A CN108171155 A CN 108171155A
Authority
CN
China
Prior art keywords
terminal
image
scaling
distance
eyebrow
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
Application number
CN201711441650.XA
Other languages
Chinese (zh)
Inventor
吴新兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Spreadrise Technologies Co Ltd
Original Assignee
Shanghai Spreadrise Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Spreadrise Technologies Co Ltd filed Critical Shanghai Spreadrise Technologies Co Ltd
Priority to CN201711441650.XA priority Critical patent/CN108171155A/en
Publication of CN108171155A publication Critical patent/CN108171155A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • G06V40/171Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction 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 for image manipulation, e.g. dragging, rotation, expansion or change of colour

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the invention discloses a kind of image-scaling method and terminals, wherein method includes, after terminal opens the first zoom function, obtain the facial image comprising eyebrow and pupil, and detect the vertical range in the facial image between eyebrow and pupil, according to the correspondence of distance and scaling speed, the corresponding target scale speed of the vertical range is got, and processing is zoomed in and out to the image that terminal is currently shown according to the target scale speed.By implementing the above method, terminal can be made to zoom in and out processing to the image that terminal is currently shown according to the eyebrow and the distance of pupil that detect, the scaling of image can be realized without the slide of user's finger on the touchscreen, enhance the intelligent of terminal-pair image scaling processing.

Description

A kind of image-scaling method and terminal
Technical field
The present invention relates to electronic technology field more particularly to a kind of image-scaling method and terminals.
Background technology
At present, with universal, the terminal work indispensable in having become for people's lives of terminal (mobile phone, tablet computer etc.) One of tool.Terminal can store various images in picture library, when user needs to check the image stored in picture library, use Then family is needing the position that scales to carry out two fingers kneading operation firstly the need of the position people of determining scaling, user equipment can be with Two fingers mediate the scaling that picture is carried out centered on the central point of the line of screen drop point.If the distance between finger increases, put The image shown in big terminal, if distance reduces between finger, reduces the image shown in terminal.
The method of above-mentioned control image scaling needs one hand rest of user to live terminal, and the finger of another hand is sliding on touch screen It is dynamic, that is, need the control of user's both hands that could realize the scaling of image, terminal also must could be to image by receiving touch operation It zooms in and out, it is impossible to processing is intelligently zoomed in and out to image.
Invention content
Technical problem to be solved of the embodiment of the present invention is, provides a kind of image-scaling method and terminal, is conducive to The scaling of the realization picture of intelligence.
In order to solve the above-mentioned technical problem, first aspect of the embodiment of the present invention discloses a kind of image-scaling method, described Method includes:
The first zoom function is opened, first zoom function is that image is carried out according to the distance between eyebrow and pupil The function of scaling;
The facial image comprising eyebrow and pupil is obtained, and is detected vertical between eyebrow and pupil in the facial image Distance;
According to the correspondence of distance and scaling speed, the corresponding target scale speed of the vertical range is obtained;
Processing is zoomed in and out to the image that terminal is currently shown according to the target scale speed.
Second aspect of the embodiment of the present invention discloses a kind of terminal, and the terminal includes:
Receiving unit, for opening the first zoom function, first zoom function is according between eyebrow and pupil The function that distance zooms in and out image;
Acquiring unit, for obtaining the facial image comprising eyebrow and pupil, and detect in the facial image eyebrow and Vertical range between pupil;
The acquiring unit is additionally operable to the correspondence with scaling speed according to distance, obtains the vertical range and corresponds to Target scale speed;
Processing unit, for zooming in and out processing to the image that terminal is currently shown according to the target scale speed.
The third aspect of the embodiment of the present invention discloses a kind of terminal, and the terminal is set including processor, input equipment, output Standby and memory, the processor, input equipment, output equipment and memory are connected with each other, wherein, the memory is used to deposit Computer program is stored up, the computer program includes program instruction, and the processor is configured for calling described program instruction, The method for performing described image scaling.
Fourth aspect of the embodiment of the present invention discloses a kind of computer readable storage medium, and the computer storage media is deposited Computer program is contained, the computer program includes program instruction, and described program instruction makes described when being executed by a processor The method that processor performs described image scaling.
In the embodiment of the present invention, after terminal opens the first zoom function, the facial image comprising eyebrow and pupil is obtained, and The vertical range between eyebrow and pupil in the facial image is detected, according to the correspondence of distance and scaling speed, is obtained To the corresponding target scale speed of the vertical range, and according to the target scale speed to the image that terminal is currently shown into The processing of row scaling.By implementing the above method, terminal can be made according to the eyebrow and the distance of pupil detected to currently showing Image zoom in and out processing, the scaling of image can be realized without receiving the slide of user's finger on the touchscreen, increase Strong terminal-pair image scaling processing it is intelligent.
Description of the drawings
It in order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to institute in embodiment Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the present invention Example, for those of ordinary skill in the art, without creative efforts, can also obtain according to these attached drawings Obtain other attached drawings.
Fig. 1 is a kind of flow diagram of image-scaling method provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of another image-scaling method provided in an embodiment of the present invention;
Fig. 3 a are a kind of terminal display interface schematic diagram provided in an embodiment of the present invention;
Fig. 3 b are a kind of terminal display interface schematic diagram provided in an embodiment of the present invention;
Fig. 4 is a kind of structure diagram of terminal provided in an embodiment of the present invention;
Fig. 5 is the structure diagram of another terminal provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without making creative work Embodiment shall fall within the protection scope of the present invention.
Fig. 1 is referred to, is a kind of flow diagram of image-scaling method provided in an embodiment of the present invention, this method can wrap It includes:
S101, terminal open the first zoom function.
Wherein, which is the function of being zoomed in and out according to the distance between eyebrow and pupil to image.
Wherein, which may include but be not limited to the terminals such as smart mobile phone, tablet computer, laptop, desktop computer. The operating system of the terminal may include but be not limited to Android operation system, IOS operating system, Symbian (Saipan) operations system System, Black Berry (blackberry, blueberry) operating system and Windows operating system etc., the embodiment of the present invention do not limit.
In the embodiment of the present invention, when the content that terminal is currently shown is image, first zoom function can be detected whether For opening, if first zoom function is not opened, terminal can open first zoom function in the following manner.
Optionally, after terminal detects that user clicks an image, the image of full screen display user's click, and before unlatching It puts camera and obtains facial image, if facial image has not been obtained, optionally, terminate this flow, if getting facial image, Detect whether the facial image matches with the facial image in default picture library, if so, first zoom function is opened, if It is no, optionally, terminate this flow.It should be noted that it can be that user voluntarily adds that the image in default picture library, which is, Yong Huke It is put into the default picture library with that will have characteristic facial image, the characteristic facial image of the tool can be that user's one eye is opened It opens, image that the image or user that another eye is closed are frowned etc., the embodiment of the present invention does not limit.
For example, include the image that a user frowns in default picture library, when terminal is displayed in full screen an image, The image of front camera acquisition face is opened at interval of preset duration, and detects whether the facial image got frowns Image, if so, opening the first zoom function.
Optionally, when terminal present displayed content is image, the pressing operation that user is directed to image input is received, if The press pressure value of pressing operation input by user is more than preset pressure value, alternatively, during the pressing of pressing operation input by user It is long to be more than preset duration, then open the first zoom function.
Optionally, it when terminal present displayed content is image, detects rocking for terminal, opens the first scaling work( Energy.
Optionally, user selects to open the first zoom function in interface is set, for the tool of first zoom function Body opening ways, the embodiment of the present invention do not limit.
S102, terminal obtain the facial image comprising eyebrow and pupil, and detect in facial image between eyebrow and pupil Vertical range.
In the embodiment of the present invention, after terminal opens the first zoom function, the face comprising eyebrow and pupil can be obtained Image, and detect the vertical range between the facial image mesophryon hair and pupil.It should be noted that between eyebrow and pupil Vertical range can be between left eye eyebrow and pupil of left eye vertical range or right eye eyebrow and pupil of right eye between it is vertical Distance, the embodiment of the present invention do not limit.
Optionally, when face is constant with a distance from terminal, user can control eyebrow to move up, then the eyebrow that terminal detects The distance between hair and pupil can increase;Alternatively, user's control eyebrow moves down, then between terminal detects eyebrow and pupil Distance can reduce.
Optionally, user does not have to the movement of control eyebrow, when face becomes near with a distance from terminal, eyebrow that terminal is got The distance between hair and pupil can increase, when face becomes remote with a distance from terminal, between eyebrow and pupil that terminal is got Distance can reduce.
S103, terminal are obtained in facial image according to the correspondence of distance and scaling speed between eyebrow and pupil The corresponding target scale speed of vertical range.
In the embodiment of the present invention, if terminal detects that the vertical range between eyebrow and pupil is more than pre-determined distance, root According to distance and the correspondence for amplifying speed, the corresponding target amplification speed of vertical range between eyebrow and pupil is obtained;And Difference between vertical range and pre-determined distance is bigger, and target amplification speed is bigger.
If terminal detects that the vertical range between eyebrow and pupil is less than pre-determined distance, according to distance with reducing speed Correspondence, obtain the corresponding shrinking of object speed of vertical range between eyebrow and pupil, and vertical range with it is default away from Difference between is bigger, and shrinking of object speed is bigger.
S104, terminal zoom in and out processing according to target scale speed to the image that terminal is currently shown.
In the embodiment of the present invention, if vertical range between eyebrow and pupil is more than pre-determined distance, according to this vertically away from Processing is amplified to the image that terminal is currently shown from corresponding target amplification speed.If between eyebrow and pupil it is vertical away from From less than pre-determined distance, then the image that terminal is currently shown is reduced according to the vertical range corresponding shrinking of object speed Processing.
Optionally, terminal obtains facial image at interval of preset duration, and detect from facial image eyebrow and pupil it Between distance, it should be noted that the preset duration can be 0.1 second, 0.2 second, 0.5 second etc., the embodiment of the present invention does not limit It is fixed.
For example, terminal using the distance between eyebrow and pupil in the facial image got for the first time as it is default away from From 0.5 second and then the secondary distance for obtaining face and eyebrow, if the distance is more than the pre-determined distance.Then according to image with putting The correspondence of big speed obtains the corresponding target amplification speed of the vertical range.Target amplification speed was amplified for every 0.5 second 1.1 times, terminal is by 1.1 times of the image magnification of display.After 0.5 second, terminal obtains facial image again by camera, lays equal stress on Above-mentioned steps are answered to zoom in and out processing to image.
Optionally, after terminal gets pre-determined distance by camera, which is extended to a section model It encloses, for example, the pre-determined distance got is 1 centimetre, terminal is extended to the interval range between 0.95 centimetre to 1.05, inspection If surveying the distance between the eyebrow got after preset duration and pupil between 0.95 to 1.05, figure is currently shown to terminal As without scaling processing.By setting an interval range for the pre-determined distance got, user's normal browsing figure can be made During picture, the minor change of the vertical range between eyebrow and pupil will not imaged image scaling, avoid terminal accidentally scaling Situation.
Optionally, when terminal is after the first zoom function is opened, facial image is not detected in preset time period, eventually First zoom function is closed at end.It should be noted that the preset time period can be 10 seconds, 20 seconds etc., the embodiment of the present invention It does not limit.
It should be noted that when terminal zooms in and out place according to the target scale speed to the image that terminal is currently shown After reason, display scaling treated image.Optionally, when the facial image for getting human eye closure, first contracting is closed Playing function.
In the embodiment of the present invention, after terminal opens the first zoom function, the facial image comprising eyebrow and pupil is obtained, And the vertical range between the facial image mesophryon hair and pupil is detected, according to the correspondence of distance and scaling speed, obtain The image that terminal is currently shown is zoomed in and out to the corresponding target scale speed of the vertical range, and according to target scale speed Processing.By implementing the above method, terminal can be made according to the eyebrow and the distance of pupil detected to the image that currently shows Processing is zoomed in and out, the scaling of image can be realized without the slide of user's finger on the touchscreen, enhance terminal-pair Image scaling is handled intelligent.
Fig. 2 is referred to, for the flow diagram of another image-scaling method provided in an embodiment of the present invention, this method can Including:
S201, terminal open camera identification human face expression.
In the embodiment of the present invention, when terminal detects the content currently shown as image, open camera and obtain face figure Picture, and identify the expression of face in image.If the human face expression recognized matches with preset human face expression, step is performed S202。
Optionally, default human face expression can be smile, grin, dejected etc., can specifically be selected by user, work as end After end gets facial image, will recognise that the expression of face in facial image, and judge the human face expression recognized whether with Preset human face expression matches.
Optionally, default human face expression can will include user by user setting, terminal according to the move received The image of face is put into the default expression picture library in terminal, and terminal determines that the image in default expression picture library is default face Facial expression image.Optionally, default Facial Expression Image can be the simple eye facial image for opening simple eye closure of user, mouth opening Facial image or other facial images.After terminal opens camera acquisition facial image, by the facial image got with presetting The facial image stored in expression picture library is compared, if the facial image got and the facial image in default expression picture library Similarity is more than predetermined threshold value, it is determined that the human face expression got matches with default expression.
It should be noted that the manner of comparison of the facial image got and default facial image can be to calculate image Cryptographic Hash, if the difference through cryptographic Hash that two images are calculated is within preset range, it is determined that the face table got Feelings match with default expression.Optionally, two images are subjected to binary conversion treatments, count 0 after binary conversion treatment in image The number occurred with 1, if the 0 and 1 number difference occurred is within preset range in two images, it is determined that the face table got Feelings match with default expression.Optionally, terminal can also be by other image procossing modes come to the facial image got It is compared with default facial image, the embodiment of the present invention does not limit.
If S202, terminal recognition to human face expression match with preset human face expression, open the first zoom function.
In the embodiment of the present invention, when terminal recognition to human face expression and preset human face expression match after, open the One zoom function, first zoom function are the function of being zoomed in and out according to the distance between eyebrow and pupil to image.
S203, scaling centre mark is shown in terminal currently shows image.
It, as shown in Figure 3a, can be in currently display image after terminal opens the first zoom function in the embodiment of the present invention Display scaling centre mark 320.
When terminal moves, optionally, scaling centre mark 320 is moved with pre-set velocity, scales centre mark 320 moving direction is identical with the moving direction of terminal, and optionally, terminal is according to the movement speed of terminal and scaling centre mark The correspondence of 320 movement speed determines 320 movement speed of scaling centre mark, optionally, scaling centre mark 320 Moving direction is opposite with the moving direction of terminal.
When terminal is static, stop the movement to scaling centre mark 320, and the position residing for by scaling centre mark 320 Put the center as image scaling.When the static duration of terminal is more than preset duration, optionally, scaling terminal label is hidden 320, when detect again terminal it is mobile when, terminal shows that scaling and is moved centre mark 320 accordingly again.
Optionally, when terminal receives clicking operation of the user for image input, the position of the clicking operation can be obtained, and Scaling centre mark 320 is moved to the position in the corresponding terminal of clicking operation.Optionally, terminal receives user in scaling The slide that heart label 320 inputs, and scaling centre mark 320 is slided accordingly.
S204, terminal obtain the facial image comprising eyebrow and pupil, detect in facial image between eyebrow and pupil Vertical range.
In the embodiment of the present invention, after terminal opens the first zoom function, the image comprising face can be obtained, and from acquisition To image in detection eyebrow and pupil between vertical range.It should be noted that the vertical range between eyebrow and pupil Vertical range between vertical range or right eye eyebrow and pupil of right eye that can be between left eye eyebrow and pupil of left eye.
Optionally, terminal can detect moving up degree or moving down degree for the eyebrow achieved by user.Specifically, terminal The maximum distance between prompt message prompting user setting eyebrow and pupil is sent out, then terminal is obtained by camera comprising eyebrow The facial image of hair and pupil, and the distance between eyebrow and pupil are detected, and using the distance as maximum distance;Optionally, Terminal sends out the minimum range between prompt message prompting user setting eyebrow and pupil, and then terminal is obtained by camera and wrapped Facial image containing eyebrow and pupil, and the distance between eyebrow and pupil are detected, and using the distance as minimum range.
After maximum distance and minimum range is determined, optionally, 4 etc. are set between maximum distance and minimum range Grade, respectively the first pre-determined distance, the second pre-determined distance, third pre-determined distance and the 4th pre-determined distance.Wherein, third preset away from From more than the first pre-determined distance, the first pre-determined distance is more than the second pre-determined distance, and the second pre-determined distance is more than the 4th pre-determined distance.
Optionally, if the vertical range is more than the first pre-determined distance and less than third pre-determined distance, according to distance with Amplify the correspondence of speed, obtain the corresponding target amplification speed of the vertical range;
Optionally, after terminal detects the vertical range between eyebrow and pupil, the vertical range and first is calculated in advance If the difference of distance, according to the correspondence of preset difference and amplification speed, the vertical range and the first pre-determined distance are obtained Difference corresponding target amplification speed.
Optionally, preset difference can be 0.1 centimetre of corresponding 1.1 times of amplification per second with the correspondence for amplifying speed, 0.2 centimetre of correspondence, 1.2 times of amplification per second, it should be noted that the correspondence of difference and amplification speed may be other feelings Condition is set by the user, and the embodiment of the present invention does not limit.
It should be noted that after terminal detects the distance between eyebrow and pupil, can also directly according to vertically away from Target amplification speed is got from amplifying the correspondence of speed or according to vertical range and the ratio of the first pre-determined distance Target amplification speed is obtained, the embodiment of the present invention does not limit.
Optionally, if the vertical range is less than the second pre-determined distance and more than the 4th pre-determined distance, according to distance with The correspondence of speed is reduced, obtains the corresponding shrinking of object speed of the vertical range.
Optionally, if the vertical range is more than third pre-determined distance, terminal currently being shown to, image is preset by first Multiple is amplified.
Optionally, during terminal counting user each enlarged drawing image amplification factor, and put access times are most Big multiple is as the first preset multiple;Optionally, terminal using maximum multiple as the first preset multiple wherein, which is User is amplified image the upper limit value of processing;Optionally, the concrete numerical value of the first preset multiple can also set by user It puts in interface and sets, for the concrete numerical value of the first preset multiple, the embodiment of the present invention does not limit.
Optionally, if the vertical range is less than the 4th pre-determined distance, terminal currently being shown to, image is preset by second Multiple is reduced.
Optionally, during terminal counting user each downscaled images image minification, and by the most contracting of access times Small multiple is as the second preset multiple, optionally, terminal using minimum multiple as the second preset multiple, wherein, the minimum multiple To image reduce the lower limiting value of processing for user;Optionally, which can also be by user at setting interface Middle setting, for the concrete numerical value of the second preset multiple, the embodiment of the present invention does not limit.
Optionally, shown in current display interface between eyebrow and pupil apart from schematic diagram, Fig. 3 a are real for the present invention A kind of terminal display interface schematic diagram of example offer is applied, as shown in figure 3, the distance between eyebrow and pupil schematic diagram 310 is in The lower right corner of Fig. 3, including corresponding first vertical line 311 of the first pre-determined distance, corresponding first vertical line 312 of the second pre-determined distance, Corresponding first vertical line 313 of third pre-determined distance, corresponding 4th vertical line 314 of the 4th pre-determined distance, the eyebrow and pupil got The corresponding vertical line 315 in the distance between hole.Minimum range 310 and maximum distance 316.
If receiving for operation is single clickd on apart from schematic diagram 310, Figure 31 0 is amplified, as shown in Figure 3b, is being schemed In 3b, user can slide vertical line and change the value of the distance corresponding to vertical line, for example, user slides to the right the first vertical line 311 1 centimetre dynamic, then the first pre-determined distance accordingly increases by 0.1 centimetre or the first vertical line 311 is slided to the right 1 centimetre by user, Then the first pre-determined distance accordingly increases by 0.2 centimetre, the specific change for the corresponding pre-determined distance of the corresponding vertical line of sliding distance Numerical value, the embodiment of the present invention do not limit.Optionally, when the clicking operation for receiving user again, by this apart from schematic diagram 310 are contracted to shown in Fig. 3 a.Optionally, when receiving user and being more than default for the pressing duration apart from schematic diagram 310 During long pressing operation, this is hidden apart from schematic diagram 310.
S205, terminal zoom in and out processing according to target scale speed to the image that terminal is currently shown.
In the embodiment of the present invention, after terminal is determined to currently showing the target scale speed of image, it can be contracted according to target It puts speed and processing is zoomed in and out to the image that terminal is currently shown.
Optionally, the vertical range between eyebrow and pupil is more than the first pre-determined distance, then according to distance with amplifying speed Correspondence, obtain the vertical range corresponding target amplification speed, and speed is amplified to scale center mark according to target Position where note is amplified image processing.
Optionally, the vertical range between eyebrow and pupil is less than the first pre-determined distance, then according to distance with reducing speed Correspondence, obtain the corresponding shrinking of object speed of the vertical range, and according to shrinking of object speed to scale center mark Position where note is amplified image processing.
Optionally, after terminal-pair image zooms in and out processing, default human face expression is detected by camera, closes institute State the first zoom function.
In the embodiment of the present invention, after the first zoom function is opened, terminal can show a scaling center in the picture Label, the label can change position in the picture with the movement of terminal so that user only needs mobile terminal, it is possible to Change the center of image scaling.When the control eyebrow of user moves up, the distance of eyebrow and pupil increase to it is default more than first away from From then terminal-pair currently shows that image is amplified, and when user's control eyebrow moves down, the distance of eyebrow and pupil decreases below Second pre-determined distance, then terminal-pair currently show that image is reduced.According to the eyebrow and the distance of pupil detected to terminal Processing currently is zoomed in and out to the image of display, the contracting of image can be realized without the slide of user's finger on the touchscreen It puts, enhances the intelligent of terminal-pair image scaling processing.
It describes in detail below in conjunction with attached drawing 4 to terminal provided in an embodiment of the present invention.It should be noted that attached drawing Terminal shown in 4 for performing the method for Fig. 1-embodiment illustrated in fig. 2 of the present invention, for convenience of description, illustrates only and this hair The bright relevant part of embodiment, particular technique details do not disclose, through with reference to Fig. 1 of the present invention-embodiment shown in Fig. 2.
Fig. 4 is referred to, is a kind of structure diagram of terminal provided by the invention;The terminal 40 may include:Receiving unit 401st, acquiring unit 402, processing unit 403.
Opening unit 401, for opening the first zoom function, first zoom function is according between eyebrow and pupil The function that is zoomed in and out to image of distance;
Acquiring unit 402 for obtaining the facial image comprising eyebrow and pupil, and detects eyebrow in the facial image Vertical range between pupil;
The acquiring unit 402 is additionally operable to the correspondence with scaling speed according to distance, obtains the vertical range pair The target scale speed answered;
Processing unit 403, for zooming in and out processing to the image that terminal is currently shown according to the target scale speed.
Optionally, the terminal described in the embodiment of the present invention can also include:
Display unit 404, for showing scaling centre mark in currently showing image in terminal
Mobile unit 405, for when the terminal moves, being moved with pre-set velocity to the scaling centre mark Dynamic, the moving direction of the scaling centre mark is identical with the moving direction of the terminal;
The mobile unit 405 is additionally operable to when the terminal is static, stop the movement to the scaling centre mark.
Optionally, the terminal described in the embodiment of the present invention can also include:
Recognition unit 406, for identifying human face expression;
It is described to open list if the human face expression that the recognition unit 406 recognizes matches with preset human face expression Member 401 opens first zoom function.
Optionally, if the vertical range is more than the first pre-determined distance, the acquiring unit 402 is according to distance and amplification speed The correspondence of degree obtains the corresponding target amplification speed of the vertical range;
Optionally, if the vertical range is less than the second pre-determined distance, the acquiring unit 402 is according to distance with reducing speed The correspondence of degree, obtains the corresponding shrinking of object speed of the vertical range, and first pre-determined distance is more than described second Pre-determined distance.
Optionally, the terminal described in the embodiment of the present invention can also include:
Amplifying unit 407 if the vertical range is more than third pre-determined distance, terminal is currently shown image by first Preset multiple is amplified, and the third pre-determined distance is more than first pre-determined distance;
Reducing unit 408 if the vertical range is less than the 4th pre-determined distance, terminal is currently shown image by second Preset multiple is reduced, and the 4th pre-determined distance is less than second pre-determined distance.
In the embodiment of the present invention, when the display content for detecting terminal includes image, opening unit 401 opens the first contracting After playing function, acquiring unit 402 obtains the facial image comprising eyebrow and pupil, and detect in facial image eyebrow and pupil it Between vertical range;Acquiring unit 402 gets the corresponding target of vertical range according to the correspondence of distance and scaling speed Scaling speed, processing unit 403 zoom in and out processing according to target scale speed to the image that terminal is currently shown.Pass through implementation The above method can make terminal zoom in and out place to the image that terminal is currently shown according to the eyebrow and the distance of pupil that detect Reason, the scaling of image can be realized without the slide of user's finger on the touchscreen, enhance at terminal-pair image scaling That manages is intelligent.
Fig. 5 is referred to, is the structure diagram an embodiment of the present invention provides another terminal.As shown in figure 5, the terminal Including:At least one processor 501, input equipment 503, output equipment 504, memory 505, at least one communication bus 502. Wherein, communication bus 502 is used to implement the connection communication between these components.Wherein, input equipment 503 can be control panel Or microphone etc., output equipment 504 can be display screens etc..Wherein, memory 505 can be high-speed RAM memory, also may be used To be non-labile memory (non-volatile memory), for example, at least a magnetic disk storage.Memory 505 can Choosing can also be at least one storage device for being located remotely from aforementioned processor 501.Wherein processor 501 can combine Fig. 4 Described terminal stores batch processing code, and processor 501, input equipment 503, output equipment 504 in memory 505 The program code stored in memory 505 is called, for performing the following operations:
Processor 501 opens the first zoom function;First zoom function is according to the distance between eyebrow and pupil The function of being zoomed in and out to image;
Input equipment 503 obtains the facial image comprising eyebrow and pupil, and processor 501 detects the facial image mesophryon Vertical range between hair and pupil;
Processor 501 obtains the corresponding target scale of the vertical range according to the correspondence of distance and scaling speed Speed;
Processor 501 zooms in and out processing according to the target scale speed to the image that terminal is currently shown.
Output equipment 504 shows scaling centre mark in terminal currently shows image;
When the terminal moves, processor 501 moves the scaling centre mark with pre-set velocity, the contracting The moving direction for putting centre mark is identical with the moving direction of the terminal;
When the terminal is static, processor 501 stops the movement to the scaling centre mark.
Human face expression is identified by input equipment 503;
If the human face expression recognized matches with preset human face expression, processor 501 opens first scaling Function.
If the vertical range is more than the first pre-determined distance, processor 501 is according to distance and the corresponding pass of amplification speed System, input equipment 503 obtain the corresponding target amplification speed of the vertical range;
If the vertical range is less than the second pre-determined distance, processor 501 is according to distance and the corresponding pass for reducing speed System, input equipment 503 obtain the corresponding shrinking of object speed of the vertical range, and first pre-determined distance is more than described second Pre-determined distance.
If the vertical range is more than third pre-determined distance, terminal is currently shown that image is pre- by first by processor 501 If multiple is amplified, the third pre-determined distance is more than first pre-determined distance;
If the vertical range is less than the 4th pre-determined distance, terminal is currently shown that image is pre- by second by processor 501 If multiple is reduced, the 4th pre-determined distance is less than second pre-determined distance.
In the embodiment of the present invention, after processor 501 opens the first zoom function, input equipment 503 is obtained comprising eyebrow With the facial image of pupil, processor 501 detects the vertical range between eyebrow and pupil, processor in the facial image 501, according to the correspondence of distance and scaling speed, obtain the corresponding target scale speed of the vertical range, processor 501 Processing is zoomed in and out to the image that terminal is currently shown according to the target scale speed.By implementing the above method, can make Terminal zooms in and out processing according to the eyebrow and the distance of pupil that detect to the image that terminal is currently shown, without user's finger The scaling of image can be realized in slide on the touchscreen, enhances the intelligent of terminal-pair image scaling processing.
Unit described in the embodiment of the present invention can pass through universal integrated circuit, such as CPU (Central Processing Unit, central processing unit) or pass through ASIC (Application Specific Integrated Circuit, application-specific integrated circuit) it realizes.
It should be appreciated that in embodiments of the present invention, alleged processor 501 can be central processing unit (Central Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic Device, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this at It can also be any conventional processor etc. to manage device.
Bus 504 can be that industry standard architecture (Industry Standard Architecture, ISA) is total Line, Peripheral Component Interconnect (Peripheral Component, PCI) bus or extended industry-standard architecture (Extended Industry Standard Architecture, EISA) bus etc., it is total which can be divided into address bus, data Line, controlling bus etc., for ease of representing, Fig. 5 is only represented with a thick line, it is not intended that an only bus or a type Bus.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in computer storage media, the journey Sequence is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, the computer storage media can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
The above disclosure is only the preferred embodiments of the present invention, cannot limit the right model of the present invention with this certainly It encloses, therefore equivalent variations made according to the claims of the present invention, is still within the scope of the present invention.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in computer storage media, the journey Sequence is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, the computer storage media can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
The above disclosure is only the preferred embodiments of the present invention, cannot limit the right model of the present invention with this certainly It encloses, therefore equivalent variations made according to the claims of the present invention, is still within the scope of the present invention.

Claims (10)

1. a kind of image-scaling method, which is characterized in that including:
The first zoom function is opened, first zoom function is zooms in and out image according to the distance between eyebrow and pupil Function;
Obtain the facial image comprising eyebrow and pupil, and detect in the facial image between eyebrow and pupil it is vertical away from From;
According to the correspondence of distance and scaling speed, the corresponding target scale speed of the vertical range is obtained;
Processing is zoomed in and out to the image that terminal is currently shown according to the target scale speed.
2. according to the method described in claim 1, it is characterized in that, after unlatching first zoom function, further include:
Scaling centre mark is shown in terminal currently shows image;
When the terminal moves, the scaling centre mark is moved with pre-set velocity, the scaling centre mark Moving direction is identical with the moving direction of the terminal;
When the terminal is static, stop the movement to the scaling centre mark.
3. according to the method described in claim 1, it is characterized in that, it is described open first zoom function before, the side Method further includes:
Human face expression is identified by camera;
If the human face expression recognized matches with preset human face expression, first zoom function is opened.
4. according to the method described in claim 1, it is characterized in that, the correspondence according to distance and scaling speed, is obtained The corresponding target scale speed of the vertical range is taken, including:
If the vertical range is more than the first pre-determined distance, according to distance and the correspondence for amplifying speed, described hang down is obtained Directly amplify speed apart from corresponding target;
If the vertical range is less than the second pre-determined distance, according to distance and the correspondence for reducing speed, described hang down is obtained Directly apart from corresponding shrinking of object speed, first pre-determined distance is more than second pre-determined distance.
5. according to the method described in claim 4, it is characterized in that, in the detection facial image between eyebrow and pupil Vertical range after, further include:
If the vertical range is more than third pre-determined distance, terminal currently being shown to, image is put by the first preset multiple Greatly, the third pre-determined distance is more than first pre-determined distance;
If the vertical range is less than the 4th pre-determined distance, terminal currently being shown to, image contracts by the second preset multiple Small, the 4th pre-determined distance is less than second pre-determined distance.
6. a kind of terminal, which is characterized in that the terminal includes:
Opening unit, for opening the first zoom function, first zoom function is according to the distance between eyebrow and pupil The function of being zoomed in and out to image;
Acquiring unit for obtaining the facial image comprising eyebrow and pupil, and detects eyebrow and pupil in the facial image Between vertical range;
The acquiring unit is additionally operable to the correspondence with scaling speed according to distance, obtains the corresponding mesh of the vertical range Mark scaling speed;
Processing unit, for zooming in and out processing to the image that terminal is currently shown according to the target scale speed.
7. terminal according to claim 6, which is characterized in that the terminal further includes:
Display unit, for showing scaling centre mark in currently showing image in terminal;
Mobile unit, for when the terminal moves, being moved with pre-set velocity to the scaling centre mark, the contracting The moving direction for putting centre mark is identical with the moving direction of the terminal;
The mobile unit is additionally operable to when the terminal is static, stop the movement to the scaling centre mark.
8. terminal according to claim 6, which is characterized in that the terminal further includes:
Recognition unit, for identifying human face expression;
The opening unit is specifically used for:
If the human face expression that the recognition unit recognizes matches with preset human face expression, the first scaling work(is opened Energy.
9. a kind of terminal, which is characterized in that the processor, defeated including processor, input equipment, output equipment and memory Enter equipment, output equipment and memory to be connected with each other, wherein, the memory is used to store computer program, the computer Program includes program instruction, and the processor is configured for calling described program instruction, perform such as any one of claim 1-5 The method.
10. a kind of computer readable storage medium, which is characterized in that the computer storage media is stored with computer program, The computer program includes program instruction, and described program instruction makes the processor perform such as right when being executed by a processor It is required that 1-5 any one of them methods.
CN201711441650.XA 2017-12-26 2017-12-26 A kind of image-scaling method and terminal Pending CN108171155A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711441650.XA CN108171155A (en) 2017-12-26 2017-12-26 A kind of image-scaling method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711441650.XA CN108171155A (en) 2017-12-26 2017-12-26 A kind of image-scaling method and terminal

Publications (1)

Publication Number Publication Date
CN108171155A true CN108171155A (en) 2018-06-15

Family

ID=62521753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711441650.XA Pending CN108171155A (en) 2017-12-26 2017-12-26 A kind of image-scaling method and terminal

Country Status (1)

Country Link
CN (1) CN108171155A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112114732A (en) * 2020-09-18 2020-12-22 歌尔科技有限公司 Screen content amplifying method and device and computer readable storage medium
CN117472256A (en) * 2023-12-26 2024-01-30 荣耀终端有限公司 Image processing method and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1691740A (en) * 2004-04-23 2005-11-02 欧姆龙株式会社 Magnified display apparatus and magnified image control apparatus
CN102880290A (en) * 2012-08-24 2013-01-16 中兴通讯股份有限公司 Display control method, device and terminal
CN103914150A (en) * 2014-04-08 2014-07-09 小米科技有限责任公司 Camera control method and device
CN105528080A (en) * 2015-12-21 2016-04-27 魅族科技(中国)有限公司 Method and device for controlling mobile terminal
CN106201261A (en) * 2016-06-30 2016-12-07 捷开通讯(深圳)有限公司 A kind of mobile terminal and display picture adjusting method thereof
CN106973222A (en) * 2017-02-28 2017-07-21 维沃移动通信有限公司 The control method and mobile terminal of a kind of Digital Zoom

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1691740A (en) * 2004-04-23 2005-11-02 欧姆龙株式会社 Magnified display apparatus and magnified image control apparatus
CN102880290A (en) * 2012-08-24 2013-01-16 中兴通讯股份有限公司 Display control method, device and terminal
CN103914150A (en) * 2014-04-08 2014-07-09 小米科技有限责任公司 Camera control method and device
CN105528080A (en) * 2015-12-21 2016-04-27 魅族科技(中国)有限公司 Method and device for controlling mobile terminal
CN106201261A (en) * 2016-06-30 2016-12-07 捷开通讯(深圳)有限公司 A kind of mobile terminal and display picture adjusting method thereof
CN106973222A (en) * 2017-02-28 2017-07-21 维沃移动通信有限公司 The control method and mobile terminal of a kind of Digital Zoom

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112114732A (en) * 2020-09-18 2020-12-22 歌尔科技有限公司 Screen content amplifying method and device and computer readable storage medium
US12039155B2 (en) 2020-09-18 2024-07-16 Goertek Inc. Screen content magnification method and device, and computer readable storage medium
CN117472256A (en) * 2023-12-26 2024-01-30 荣耀终端有限公司 Image processing method and electronic equipment
CN117472256B (en) * 2023-12-26 2024-08-23 荣耀终端有限公司 Image processing method and electronic equipment

Similar Documents

Publication Publication Date Title
CN105183284B (en) A kind of method and user terminal for checking short message
CN105045454B (en) A kind of terminal false-touch prevention method and terminal
CN109242765B (en) Face image processing method and device and storage medium
CN107222790A (en) A kind of method, terminal and computer-readable recording medium for sending barrage
CN108073346A (en) A kind of record screen method, terminal and computer readable storage medium
US20240077948A1 (en) Gesture-based display interface control method and apparatus, device and storage medium
CN104731688A (en) Method and device for prompting reading schedule
CN105224216B (en) A kind of user terminal control method and user terminal
CN109254707A (en) A kind of method, mobile terminal and computer readable storage medium that window is adjusted
CN110286840A (en) Gesture zooming control method and device of touch equipment and related equipment
CN104820549B (en) Sending method, device and the terminal of social networking application message
CN104267931A (en) Electronic equipment and method for processing information
CN108446389A (en) Speech message searching and displaying method, device, computer equipment and storage medium
CN108171155A (en) A kind of image-scaling method and terminal
RU2616160C2 (en) Method deleting image and device therefor
WO2017032069A1 (en) Text-message processing method and user terminal
CN105094297A (en) Display content zooming method and display content zooming device
CN110050254B (en) Control display method and device for flexible display equipment
CN108153458A (en) A kind of dialog box processing method, terminal device and computer readable storage medium
CN109101174A (en) A kind of scaling method, device, terminal and medium
CN107341000A (en) A kind of method and device, terminal for showing fingerprint typing image
CN107958273A (en) volume adjusting method, device and storage medium
WO2023082569A1 (en) Video information extraction method and apparatus
CN105739761A (en) Figure input method and device
CN105511795B (en) A kind of method and mobile terminal of operating user interface

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

Application publication date: 20180615

RJ01 Rejection of invention patent application after publication