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

A kind of image-scaling method and terminal Download PDF

Info

Publication number
CN106933487A
CN106933487A CN201710153903.7A CN201710153903A CN106933487A CN 106933487 A CN106933487 A CN 106933487A CN 201710153903 A CN201710153903 A CN 201710153903A CN 106933487 A CN106933487 A CN 106933487A
Authority
CN
China
Prior art keywords
minification
actual
multiplication factor
benchmark
image
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.)
Withdrawn
Application number
CN201710153903.7A
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.)
Shenzhen Jinli Communication Equipment Co Ltd
Original Assignee
Shenzhen Jinli Communication Equipment 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 Shenzhen Jinli Communication Equipment Co Ltd filed Critical Shenzhen Jinli Communication Equipment Co Ltd
Priority to CN201710153903.7A priority Critical patent/CN106933487A/en
Publication of CN106933487A publication Critical patent/CN106933487A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • 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/0487Interaction 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/0488Interaction 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
    • G06F3/04883Interaction 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 for inputting data by handwriting, e.g. gesture or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04806Zoom, i.e. interaction techniques or interactors for controlling the zooming operation

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)
  • Image Processing (AREA)

Abstract

The present invention discloses a kind of image-scaling method and terminal, and the method includes:Detection zooms in or out operation to image;Obtain the region that described image is operated;If the region for being operated includes characteristic information, the corresponding characteristic area of the characteristic information is obtained;Size according to the characteristic area determines actual multiplication factor or actual minification;Described image is zoomed in or out according to the actual multiplication factor or actual minification.The image-scaling method and terminal of the embodiment of the present invention, when being zoomed in and out to image, if user zooms in and out for a certain characteristic area, size according to characteristic area is zoomed in and out, when being scaled for less characteristic area, using larger multiplication factor or less minification zoomed image, when being scaled for larger characteristic area, using less multiplication factor or larger minification zoomed image.

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 terminal.
Background technology
At present, with intelligent terminal, the especially popularization of smart mobile phone, it is essential that mobile phone increasingly becomes people's life Instrument.User is taken pictures by mobile phone, when photo is checked, is amplified with opening by the kneading of finger and contracted Small picture.When user start to open it is double refer to amplification pictures or mediate finger and reduce picture when, finger open or mediate away from From bigger, the multiple for zooming in or out is bigger.
In some cases, when user need to some less features carry out the amplification of larger multiple on picture when, it is double Referring to needs the distance slided very big, feature can be amplified to one than larger ratio, or because of certain particular case , it is necessary to very big sliding distance can meet requirement when needing to narrow down to certain proportion to a certain larger feature, this shadow Ring the operating experience of user.
The content of the invention
The embodiment provides a kind of image-scaling method and terminal, the characteristic area that can be exaggerated as needed The size in domain carries out image scaling.
In a first aspect, the embodiment of the invention provides a kind of image-scaling method, the method includes:
Detection zooms in or out operation to image;
Obtain the region that described image is operated;
If the region for being operated includes characteristic information, the corresponding characteristic area of the characteristic information is obtained;
Size according to the characteristic area determines actual multiplication factor or actual minification;
Described image is zoomed in or out according to the actual multiplication factor or actual minification.
Second aspect, the embodiment of the present invention additionally provides a kind of terminal, and the terminal includes:
Detection unit, operation is zoomed in or out for detecting to image;
First acquisition unit, for obtaining the region that described image is operated;
Second acquisition unit, if including characteristic information for the region for being operated, obtains the characteristic information pair The characteristic area answered;
Determining unit, for determining actual multiplication factor or actual minification according to the size of the characteristic area;
Unit for scaling, for described image to be amplified or contracted according to the actual multiplication factor or actual minification It is small.
The image-scaling method and terminal of the embodiment of the present invention, when being zoomed in and out to the image comprising characteristic area, if User is zoomed in and out for a certain characteristic area, then the size according to characteristic area is zoomed in and out, for less characteristic area During scaling, using larger multiplication factor or less minification zoomed image, when being scaled for larger characteristic area, adopt With less multiplication factor or larger minification zoomed image, user need not slide larger distance to contract by finger Put image.
Brief description of the drawings
Technical scheme in order to illustrate more clearly the embodiments of the present invention, embodiment will be described below needed for be used Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the present invention, general for this area For logical technical staff, on the premise of not paying creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow diagram of image-scaling method provided in an embodiment of the present invention;
Fig. 2 is a kind of another schematic flow diagram of image-scaling method provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic block diagram of terminal provided in an embodiment of the present invention;
Fig. 4 is the schematic block diagram of determining unit provided in an embodiment of the present invention;
Fig. 5 is a kind of another schematic block diagram of terminal provided in an embodiment of the present invention;
Fig. 6 is another schematic block diagram of determining unit provided in an embodiment of the present invention;
Fig. 7 is a kind of structural schematic block diagram of terminal provided in an embodiment of the present invention.
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 a part of embodiment of the invention, rather than whole embodiments.Based on this hair Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained under the premise of creative work is not made Example, belongs to the scope of protection of the invention.
It should be appreciated that when using in this specification and in the appended claims, term " including " and "comprising" instruction The presence of described feature, entirety, step, operation, element and/or component, but it is not precluded from one or more of the other feature, whole The presence or addition of body, step, operation, element, component and/or its set.
It is also understood that the term used in this description of the invention is merely for the sake of the mesh for describing specific embodiment And be not intended to limit the present invention.As used in description of the invention and appended claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singulative, " one " and " being somebody's turn to do " is intended to include plural form.
Fig. 1 is referred to, Fig. 1 is a kind of schematic flow diagram of image-scaling method provided in an embodiment of the present invention.The method Intelligent terminal (such as Android phone, IOS mobile phones) is can apply to, the method comprises the following steps S101~S105.
S101, detection zoom in or out operation to image.
Further, the operation that zooms in or out to image includes double referring to slides or singly referring to that behaviour is clicked in repetition Make.
User opens the image for being stored in terminal, and image is displayed in touch screen, and user is by two fingers in touch screen table Face enters line slip and opens or mediate, i.e., double finger slides, can zoom in and out operation to image, or user is fast with a finger Fast double-click image same place, i.e., singly refer to repetition clicking operation, and operation can be zoomed in and out to image.If a terminal detects that double fingers Slide singly refers to repetition clicking operation, then illustrate that user needs to zoom in or out operation to image.
The region that S102, acquisition described image are operated.
Further, if the operation that zooms in or out to image refers to slide, the region that described image is operated for double It is the border circular areas formed by diameter with the line of the contact point of screen with double fingers, or is the contact point with double fingers with screen Line is the rectangular area that diagonal is formed;If zooming in or out operation singly to refer to repetition clicking operation, the figure to image As the region that is operated be with finger repeat touch point in clicking operation as the center of circle, the border circular areas that are formed of predetermined length radius, Or centered on touch point in finger clicking operation, the rectangular area of preset length diagonal formation.
In embodiments of the present invention, the predetermined length is 0.5cm-1.5cm, and the preset length is 0.5cm-1.5cm, More specifically, the predetermined length elects 0.5cm as, the preset length elects 1cm as.
In specific implementation process, if centered on touch point in finger clicking operation, the diagonal of predetermined length formed Rectangular area be the region for being operated, cornerwise angle of inclination is preferably 45 °.
In addition, in specific implementation process, rectangle is preferably square by operating area.
If S103, the region for being operated include characteristic information, the corresponding characteristic area of the characteristic information is obtained.
The region for being operated is being obtained, i.e., after the object that user's needs are zoomed in and out, is judging whether the region has There is characteristic information, if having characteristic information, then it is assumed that it is the corresponding spy of this feature information that user needs the specific object of scaling Region is levied, the scaled image according to characteristic area, otherwise, according to existing zoom technology zoomed image.
Characteristic information can be multiple, and characteristic area can be multiple, for example, the characteristic information is believed for face characteristic Breath, including at least one in human eye, nose and face, the characteristic area are human face region.The region for being operated can Eyes, face and/or the nose of same person can be included, then the corresponding characteristic area of these characteristic informations is a face Region, the region for being operated is likely to include the face characteristic information of different people, then characteristic area is respective people The respective human face region of face characteristic information correspondence.
S104, according to the size of the characteristic area determine actual multiplication factor or actual minification.
It is currently practical according to characteristic area after above-mentioned steps obtain out the characteristic area that user's needs are zoomed in and out Size is shown to determine its actual multiplication factor or actual minification.
In embodiments of the present invention, the step S104 includes:
If the human face region is one, the size of the human face region is calculated, obtain the size of the human face region The interval corresponding benchmark multiplication factor in place or benchmark minification, the benchmark multiplication factor or benchmark minification are actual Multiplication factor or actual minification;
If the human face region is at least two, the size of each human face region is calculated respectively, everyone is obtained respectively Interval corresponding benchmark multiplication factor or benchmark minification where the size in face region, calculate mean baseline multiplication factor or flat Equal benchmark minification, the mean baseline multiplication factor or mean baseline minification are actual multiplication factor or actual diminution Multiple.
If the face characteristic of the region one-man operated in image, illustrate that user wants to carry out a face Scaling, actual multiplication factor or actual minification are related to the size of the human face region, and where the size of human face region one Individual interval correspondence one benchmark multiplication factor or benchmark minification, calculate the size of this human face region, find the size Corresponding interval, just can obtain corresponding benchmark multiplication factor or benchmark minification.
If the region operated in image has the face characteristic of at least two people, illustrate user it is desired to this at least two The face of people is zoomed in and out, and actual multiplication factor or actual minification are related to the size of at least two human face region, meter The size of at least two human face region is calculated, the corresponding interval of the size is found respectively, obtain at least two human face region Corresponding benchmark multiplication factor or benchmark minification, take average benchmark multiplication factor or mean baseline minification in fact respectively Border multiplication factor or actual minification.
In the present embodiment, human face region is square or ellipse, if square, the size available width of human face region, Length or cartographic represenation of area, if oval, the size of human face region can use oval major axis, short axle or cartographic represenation of area.
With human face region as square, as a example by size length is represented, if size it is interval (0,1], benchmark multiplication factor is 5, size it is interval (1,1.5], benchmark multiplication factor is 4, size it is interval (1.5,2], benchmark multiplication factor is 3, and size exists It is interval (2,3], benchmark multiplication factor is 2, size it is interval (3,4.5] benchmark multiplication factor is 1.5, size it is interval (4, ∞), benchmark multiplication factor is 1.
If size is in interval (12, ∞), benchmark minification is 4, size it is interval (12,9], benchmark minification is 3, Size it is interval (8,6], benchmark minification is 2, size it is interval (6,3], benchmark minification is 1.5, and size is in interval (3,0], benchmark minification is 1.
The above is interval and interval corresponding benchmark multiplication factor or benchmark minification are only an implementation of the invention Example, in specific implementation process, interval and interval corresponding benchmark multiplication factor or benchmark minification can be other relations.
S105, described image is zoomed in or out according to the actual multiplication factor or actual minification.
The actual multiplication factor or actual minification are related to the size of characteristic area, therefore, if when user needs When carrying out the scaling of larger multiple to image with double finger slides, it is to be capable of achieving that finger slides shorter distance.
After a zoom operations are carried out to image using the above method, if not reaching the zooming effect of user's needs, user Can be repeated the above steps on the basis of the image being scaled carries out secondary or even multiple zoom operations.
A kind of image-scaling method of the embodiment of the present invention, when being zoomed in and out to the image comprising characteristic area, if with Family is zoomed in and out for a certain characteristic area, then the size according to characteristic area is zoomed in and out, for the contracting of less characteristic area When putting, using larger multiplication factor or less minification zoomed image, when being scaled for larger characteristic area, use Less multiplication factor or larger minification zoomed image.
Fig. 2 is referred to, Fig. 2 is a kind of another schematic flow diagram of image-scaling method provided in an embodiment of the present invention, should Method comprises the following steps S201~S205.
S201, detection zoom in or out operation to image.
Further, the operation that zooms in or out to image includes double referring to slides or singly referring to that behaviour is clicked in repetition Make.
The region that S202, acquisition described image are operated, and if the operation that zooms in or out to image refers to cunning for double Dynamic operation, calculates double total distances for referring to and sliding.
Further, if the operation that zooms in or out to image refers to slide, the region that described image is operated for double It is the border circular areas formed by diameter with the line of the contact point of screen with double fingers, or is the contact point with double fingers with screen Line is the rectangular area that diagonal is formed;If zooming in or out operation singly to refer to repetition clicking operation, the figure to image As the region that is operated be with finger repeat touch point in clicking operation as the center of circle, the border circular areas that are formed of predetermined length radius, Or centered on touch point in finger clicking operation, the rectangular area of preset length diagonal formation.
It is double to refer to that the total distance slided is relevant with the actual scaling multiple of image, it is double to refer to that the total distance slided is bigger, image Actual scaling multiple is bigger.
If S203, the region for being operated include characteristic information, the corresponding characteristic area of the characteristic information is obtained.
Further, the characteristic information is at least one in face characteristic information, including human eye, nose and face, The characteristic area is human face region.The region for being operated may include eyes, face and/or the nose of same person Son, then the corresponding characteristic area of these characteristic informations is a human face region, and the region for being operated is likely to include The face characteristic information of different people, then characteristic area is the respective face characteristic information respective human face region of correspondence.
S204, the size according to the characteristic area and total distance determine actual multiplication factor or actual diminution times Number.
In embodiments of the present invention, the step S205 includes:
If the human face region is one, the size of the human face region is calculated, obtain the size of the human face region The interval corresponding benchmark multiplication factor in place or benchmark minification, calculate actual multiplication factor or actual minification, actual Multiplication factor or actual minification are multiplied by the benchmark multiplication factor equal to total distance or total distance be multiplied by it is described Benchmark minification;
If the human face region is at least two, the size of each human face region is calculated respectively, everyone is obtained respectively Interval corresponding benchmark multiplication factor or benchmark minification where the size in face region, calculate mean baseline multiplication factor or flat Equal benchmark minification, calculates actual multiplication factor or actual minification, and actual multiplication factor or actual minification are equal to Total distance is multiplied by the mean baseline multiplication factor or total distance is multiplied by the mean baseline minification.
If the face characteristic of the region one-man for being operated, illustrate that user wants to contract a face Put, actual multiplication factor or actual minification are related to the size of the human face region, one where the size of human face region Interval correspondence one benchmark multiplication factor or benchmark minification, calculate the size of this human face region, find the size pair The interval answered, just can obtain corresponding benchmark multiplication factor or benchmark minification, and it is Ncm that double fingers slide total distance, then actual Multiplication factor (actual minification)=N* benchmark multiplication factor (benchmark minification).
If the region for being operated has the face characteristic of at least two people, illustrate that user is wanted at least two people Face zoom in and out, actual multiplication factor or actual minification are related to the size of at least two human face region, calculate Go out the size of at least two human face region, the corresponding interval of the size is found respectively, obtain at least two human face region point Not corresponding benchmark multiplication factor or benchmark minification, it is reality to take average benchmark multiplication factor or mean baseline minification Multiplication factor or actual minification, it is Ncm that double fingers slide total distance, then actual multiplication factor (actual minification)=N* puts down Equal benchmark multiplication factor (mean baseline minification).
With human face region as square, as a example by the size length of human face region is represented, interval where size (0,1] correspondence Benchmark multiplication factor be 5, it is interval (1,1.5] corresponding benchmark multiplication factor is 4, interval (1.5,2] corresponding benchmark amplifies Multiple is 3, interval (2,3] corresponding benchmark multiplication factor is 2, interval (3,4.5] corresponding benchmark multiplication factor is 1.5, area Between (4, ∞) corresponding benchmark multiplication factor be 1.
Interval (12, ∞) corresponding benchmark minification is 4, interval (12,9] corresponding benchmark minification is 3, interval (8,6] corresponding benchmark minification is 2, interval (6,3] corresponding benchmark minification is 1.5, size it is interval (3,0] it is right The benchmark minification answered is 1.
S205, described image is zoomed in or out according to the actual multiplication factor or actual minification.
The size and the distance of double finger slides of the actual multiplication factor or actual minification and characteristic area It is relevant, when being scaled for less characteristic area, using larger multiplication factor or less minification zoomed image, for When larger characteristic area is scaled, using less multiplication factor or larger minification zoomed image, finger slide always away from From bigger, actual scaling multiple is bigger, therefore, when user needs to carry out image by double finger slides the contracting of larger multiple When putting, it is to be capable of achieving that finger slides shorter distance, and when user needs to carry out the scaling of bigger multiple to image, is somewhat increased Plus a little always distance of sliding is capable of achieving.
Fig. 3 is referred to, Fig. 3 is a kind of schematic block diagram of terminal 100 provided in an embodiment of the present invention, and the terminal 100 is wrapped Include detection unit 101, first acquisition unit 102, second acquisition unit 103, determining unit 104 and unit for scaling 105.
The detection unit 101, operation is zoomed in or out for detecting to image.
Further, the operation that zooms in or out to image includes double referring to slides or singly referring to that behaviour is clicked in repetition Make.
The first acquisition unit 102, for obtaining the region that described image is operated.
Further, if the operation that zooms in or out to image refers to slide, the region that described image is operated for double It is the border circular areas formed by diameter with the line of the contact point of screen with double fingers, or is the contact point with double fingers with screen Line is the rectangular area that diagonal is formed.
If zooming in or out operation singly to refer to repetition clicking operation to image, the region that described image is operated is with hand Refer to that touch point is the center of circle, the border circular areas of predetermined length radius formation in repeating clicking operation, or touched with finger clicking operation Centered on touching a little, preset length diagonal formed rectangular area.
The second acquisition unit 103, if including characteristic information for the region for being operated, obtains the feature The corresponding characteristic area of information.
Terminal 100 detects double finger and is opened with slip or kneading action in touch-control screen surfaces, or to detect finger quick Double-click image same place, then explanation needs to zoom in or out operation to image, and now terminal 100 obtains the area that image is operated Domain, judges whether the region has characteristic information, if having characteristic information, then it is assumed that it is the spy that user needs the object of scaling Reference ceases corresponding characteristic area, the scaled image according to characteristic area.
Further, the characteristic information is at least one in face characteristic information, including human eye, nose and face, The characteristic area is human face region.
The determining unit 104, for determining actual multiplication factor or actual diminution according to the size of the characteristic area Multiple.
Further, as shown in figure 4, the determining unit 104, including computation subunit 1041 and first obtains subelement 1042。
The computation subunit 1041, the size for calculating each human face region.
Described first obtains subelement 1042, is used for:
If the human face region is one, interval corresponding benchmark times magnification where the size of the human face region is obtained Number or benchmark minification, the benchmark multiplication factor or benchmark minification are actual multiplication factor or actual minification; Or
If the human face region is at least two, interval corresponding base where the size of each human face region is obtained respectively Quasi- multiplication factor or benchmark minification, calculate mean baseline multiplication factor or mean baseline minification, the mean baseline Multiplication factor or mean baseline minification are actual multiplication factor or actual minification.
The unit for scaling 105, for being carried out to described image according to the actual multiplication factor or actual minification Zoom in or out.
Actual multiplication factor or actual minification are related to the size of characteristic area, when user need to carry out image compared with During the scaling of big multiple, actual multiplication factor or actual minification are determined by the size of characteristic area.
After a zoom operations are carried out to image, if not reaching the zooming effect of user's needs, user can be contracted Secondary or even multiple zoom operations are carried out on the basis of the image put.
A kind of terminal 100 of the embodiment of the present invention, when user scales for less characteristic area, using larger amplification Multiple or less minification zoomed image, scale, using less multiplication factor or larger for larger characteristic area Minification zoomed image, user need not slide larger distance come zoomed image by finger.
Fig. 5 is referred to, Fig. 5 is a kind of schematic block diagram of terminal provided in an embodiment of the present invention, and the terminal includes detection Unit 201, first acquisition unit 202, computing unit 203, second acquisition unit 204, determining unit 205 and unit for scaling 206.
The detection unit 201, operation is zoomed in or out for detecting to image.
Further, the operation that zooms in or out to image includes double referring to slides or singly referring to that behaviour is clicked in repetition Make.
The first acquisition unit 202, the region where for obtaining double fingers.
Further, if the operation that zooms in or out to image refers to slide, the region that described image is operated for double It is the border circular areas formed by diameter with the line of the contact point of screen with double fingers, or is the contact point with double fingers with screen Line is the rectangular area that diagonal is formed;If zooming in or out operation singly to refer to repetition clicking operation, the figure to image As the region that is operated be with finger repeat touch point in clicking operation as the center of circle, the border circular areas that are formed of predetermined length radius, Or centered on touch point in finger clicking operation, the rectangular area of preset length diagonal formation.
The computing unit 203, if referring to slide for double for the operation that zooms in or out to image, calculates double Refer to the total distance slided.
The second acquisition unit 204, if including characteristic information for the region for being operated, obtains the feature The corresponding characteristic area of information.
Further, the characteristic information is at least one in face characteristic information, including human eye, nose and face, The characteristic area is human face region.
The determining unit 205, actual times magnification is determined for the size according to the characteristic area and total distance Number or actual minification.
Further, as shown in fig. 6, the determining unit 205, including computation subunit 2051 and second obtains subelement 2052。
The computation subunit 2051, the size for calculating each human face region;
Described second obtains subelement 2052, is used for:
If the human face region is one, interval corresponding benchmark times magnification where the size of the human face region is obtained Number or benchmark minification, calculate actual multiplication factor or actual minification, actual multiplication factor or actual minification etc. The benchmark multiplication factor is multiplied by total distance or total distance is multiplied by the benchmark minification;Or
If the human face region is at least two, interval corresponding base where the size of each human face region is obtained respectively Quasi- multiplication factor or benchmark minification, calculate mean baseline multiplication factor or mean baseline minification, calculate actual amplification Multiple or actual minification, actual multiplication factor or actual minification are multiplied by the mean baseline equal to total distance to be put Big multiple or total distance are multiplied by the mean baseline minification.
If the face characteristic of the region one-man operated in image, illustrate that user wants to carry out a face Scaling, actual multiplication factor or actual minification are related to the size of the human face region, and where the size of human face region one Individual interval correspondence one benchmark multiplication factor or benchmark minification, calculate the size of this human face region, find the size Corresponding interval, just can obtain corresponding benchmark multiplication factor or benchmark minification, and it is Ncm that double fingers slide total distance, then real Border multiplication factor (actual minification)=N* benchmark multiplication factor (benchmark minification).
If the region operated in image has the face characteristic of at least two people, illustrate user it is desired to this at least two The face of people is zoomed in and out, and actual multiplication factor or actual minification are related to the size of at least two human face region, meter The size of at least two human face region is calculated, the corresponding interval of the size is found respectively, obtain at least two human face region Corresponding benchmark multiplication factor or benchmark minification, take average benchmark multiplication factor or mean baseline minification in fact respectively Border multiplication factor or actual minification, it is Ncm that double fingers slide total distance, then actual multiplication factor (actual minification)=N* Mean baseline multiplication factor (mean baseline minification).
The unit for scaling 206, for being carried out to described image according to the actual multiplication factor or actual minification Zoom in or out.
The terminal of the embodiment of the present invention, the actual multiplication factor or actual minification of image and the size of characteristic area with And double distance dependents for referring to slide, for less characteristic area scaling, using larger multiplication factor or less contracting Small multiple zoomed image, scales for larger characteristic area, is scaled using less multiplication factor or larger minification Image, always distance is bigger for finger slip, and actual scaling multiple is bigger, therefore, when user is entered by pair finger slides to image During the scaling of the larger multiple of row, it is to be capable of achieving that finger slides shorter distance, and working as user needs to carry out bigger multiple to image Scaling when, somewhat increase and a little slide total distance and be capable of achieving.
Fig. 7 is referred to, Fig. 7 is a kind of structure composition schematic diagram of terminal 300 provided in an embodiment of the present invention.The terminal 300 memory 302, the outputs that can include input equipment 301, include one or more computer-readable recording mediums Equipment 303, transceiver 304 and include the part such as or the processor 305 of more than one processing core.Ability Field technique personnel are appreciated that the restriction of the structure of terminal 300 shown in Fig. 7 not structure paired terminal 300, can include than figure Show more or less part, or combine some parts, or different part arrangements.
Input equipment 301 can be used to receive the numeral or character information of input, and produce the key relevant with function control Disk, mouse, action bars, optics or trace ball signal input.Specifically, in a specific embodiment, input equipment 301 May include Touch sensitive surface and other input units.Touch sensitive surface, also referred to as touch display screen or Trackpad, can collect user Thereon or neighbouring touch operation (such as user is using any suitable objects such as finger, stylus or annex in Touch sensitive surface The upper or operation near Touch sensitive surface), and corresponding attachment means are driven according to formula set in advance.Optionally, it is touch-sensitive Surface may include two parts of touch detecting apparatus and touch controller.Wherein, touch detecting apparatus detect the touch side of user Position, and the signal that touch operation brings is detected, transmit a signal to touch controller;Touch controller is from touch detecting apparatus Touch information is received, and is converted into contact coordinate, then give processor 305, and the order that energy receiving processor 305 is sent And performed.Furthermore, it is possible to realize touch-sensitive table using polytypes such as resistance-type, condenser type, infrared ray and surface acoustic waves Face.Except Touch sensitive surface, input equipment 301 can also include other input units.
Memory 302 can be used to store application program and data.Include and can hold in the application program of the storage of memory 302 Line code.Application program can constitute various functions module.Processor 305 is by running application journey of the storage in memory 302 Sequence, so as to perform various function application and data processing.Memory 302 can mainly include storing program area and data storage Area, wherein, application program that storing program area can be needed for storage program area, at least one function (such as sound-playing function, Image player function etc.) etc.;Storage data field can store according to terminal 300 use created data (such as voice data, Phone directory etc.) etc..Additionally, memory 302 can include high-speed random access memory, non-volatile memories can also be included Device, for example, at least one disk memory, flush memory device or other volatile solid-state parts.Correspondingly, memory 302 can also include Memory Controller, to provide access of the processor 305 to memory 302.
Output equipment 303 is used for the output data of external output terminal 300, it may include display, loudspeaker etc..Further , the display panel of display can cover Touch sensitive surface, when Touch sensitive surface is detected thereon or after neighbouring touch operation, pass Processor 305 is given to determine the type of touch event, with preprocessor 305 according to the type of touch event on a display panel Corresponding visual output is provided.
Transceiver 304, for sending data to other equipment or receiving data from other equipment.In general, receiving Hair equipment 304 may include bluetooth, radio-frequency antenna, near-field communication module etc..
Processor 305 is the control centre of terminal 300, using each of various interfaces and the whole terminal 300300 of connection Individual part, by running or performing application program of the storage in memory 302, and calls storage in memory 302 Data, perform the various functions and processing data of terminal 300, so as to carry out integral monitoring to terminal 300.Optionally, processor 305 may include one or more processing cores;Preferably, processor 305 can integrated application processor and modem processor, Wherein, application processor mainly processes operating system, user interface and application program etc., and modem processor mainly processes nothing Line communicates.It is understood that above-mentioned modem processor can not also be integrated into processor 305.
Although not shown in Fig. 7, it will be understood to those skilled in the art that terminal 300 can also include camera, indigo plant Tooth, Wireless Fidelity etc., will not be repeated here.
Specifically in the present embodiment, the processor 305 of terminal 300 can be according to following instruction, by one or more Application program the corresponding executable code of process or data be loaded into memory 302, run by processor 305 or grasped Program code in the memory 302 or data are stored, and performs following operation:
Detection zooms in or out operation to image;Obtain the region that described image is operated;If the area for being operated Domain includes characteristic information, then obtain the corresponding characteristic area of the characteristic information;Size according to the characteristic area determines real Border multiplication factor or actual minification;Described image is amplified according to the actual multiplication factor or actual minification Or reduce.
Further, the processor 305 also performs following operation:Detection zooms in or out operation to image;Obtain The region that described image is operated, and if the operation that zooms in or out to image is pair finger slides, the double finger cunnings of calculating Dynamic total distance;If the region for being operated includes characteristic information, the corresponding characteristic area of the characteristic information is obtained;Root Size and total distance according to the characteristic area determine actual multiplication factor or actual minification;Actually put according to described Big multiple or actual minification are zoomed in or out to described image.
Those of ordinary skill in the art are it is to be appreciated that the list of each example described with reference to the embodiments described herein Unit and algorithm steps, can be realized, with electronic hardware, computer software or the combination of the two in order to clearly demonstrate hardware With the interchangeability of software, the composition and step of each example are generally described according to function in the above description.This A little functions are performed with hardware or software mode actually, depending on the application-specific and design constraint of technical scheme.Specially Industry technical staff can realize described function to each specific application using distinct methods, but this realization is not It is considered as beyond the scope of this invention.
It is apparent to those skilled in the art that, for convenience of description and succinctly, the end of foregoing description End and the specific work process of unit, may be referred to the corresponding process in preceding method embodiment, will not be repeated here.
In several embodiments provided herein, it should be understood that disclosed terminal and method, can be by it Its mode is realized.For example, device embodiment described above is only schematical, for example, the division of the unit, only Only a kind of division of logic function, can there is other dividing mode when actually realizing, such as multiple units or component can be tied Another system is closed or is desirably integrated into, or some features can be ignored, or do not perform.In addition, shown or discussed phase Coupling or direct-coupling or communication connection between mutually can be INDIRECT COUPLING or the communication by some interfaces, device or unit Connection, or electricity, machinery or other forms connections.
Step in present invention method can according to actual needs carry out order adjustment, merge and delete.
Unit in embodiment of the present invention terminal can according to actual needs be merged, divides and deleted.
The unit that is illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit The part for showing can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be according to the actual needs selected to realize embodiment of the present invention scheme Purpose.
In addition, during each functional unit in each embodiment of the invention can be integrated in a processing unit, it is also possible to It is that unit is individually physically present, or two or more units are integrated in a unit.It is above-mentioned integrated Unit can both be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
If the integrated unit is to realize in the form of SFU software functional unit and as independent production marketing or use When, can store in a computer read/write memory medium.Based on such understanding, technical scheme is substantially The part for being contributed to prior art in other words, or all or part of the technical scheme can be in the form of software product Embody, the computer software product is stored in a storage medium, including some instructions are used to so that a computer Equipment (can be personal computer, server, or network equipment etc.) performs the complete of each embodiment methods described of the invention Portion or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.
The above, specific embodiment only of the invention, but protection scope of the present invention is not limited thereto, and it is any Those familiar with the art the invention discloses technical scope in, various equivalent modifications can be readily occurred in or replaced Change, these modifications or replacement should all be included within the scope of the present invention.Therefore, protection scope of the present invention should be with right It is required that protection domain be defined.

Claims (10)

1. a kind of image-scaling method, it is characterised in that including:
Detection zooms in or out operation to image;
Obtain the region that described image is operated;
If the region for being operated includes characteristic information, the corresponding characteristic area of the characteristic information is obtained;
Size according to the characteristic area determines actual multiplication factor or actual minification;
Described image is zoomed in or out according to the actual multiplication factor or actual minification.
2. the method for claim 1, it is characterised in that the operation that zooms in or out to image includes that double finger slides Operation singly refers to repetition clicking operation;
If the operation that zooms in or out to image refers to slide for double, the region that described image is operated is with double fingers and screen Contact point the border circular areas that are formed by diameter of line, or be the line with double fingers and the contact point of screen as diagonally linear Into rectangular area;
If zooming in or out operation singly to refer to repetition clicking operation to image, the region that described image is operated is with finger weight Touch point is the center of circle, the border circular areas of predetermined length radius formation in multiple clicking operation, or with touch point in finger clicking operation Centered on, preset length diagonal formed rectangular area.
3. method as claimed in claim 2, it is characterised in that the characteristic information is face characteristic information, including human eye, nose Son and face at least one, the characteristic area be human face region.
4. method as claimed in claim 3, it is characterised in that described that actual amplification is calculated according to the size of the characteristic area Multiple or actual minification, including:
If the human face region is one, the size of the human face region is calculated, obtain the size place of the human face region Interval corresponding benchmark multiplication factor or benchmark minification, the benchmark multiplication factor or benchmark minification amplify for actual Multiple or actual minification;
If the human face region is at least two, the size of each human face region is calculated respectively, each face area is obtained respectively Interval corresponding benchmark multiplication factor or benchmark minification where the size in domain, calculate mean baseline multiplication factor or average base Quasi- minification, the mean baseline multiplication factor or mean baseline minification are actual multiplication factor or actual diminution times Number.
5. method as claimed in claim 3, it is characterised in that also include:If the operation that zooms in or out to image is double fingers Slide, calculates double total distances for referring to and sliding;
It is described that actual multiplication factor or actual minification are determined according to the size of the characteristic area, including:
If the human face region is one, the size of the human face region is calculated, obtain the size place of the human face region Interval corresponding benchmark multiplication factor or benchmark minification, calculate actual multiplication factor or actual minification, actual to amplify Multiple or actual minification are multiplied by the benchmark multiplication factor equal to total distance or total distance is multiplied by the benchmark Minification;
If the human face region is at least two, the size of each human face region is calculated respectively, each face area is obtained respectively Interval corresponding benchmark multiplication factor or benchmark minification where the size in domain, calculate mean baseline multiplication factor or average base Quasi- minification, calculates actual multiplication factor or actual minification, and actual multiplication factor or actual minification are equal to described Total distance is multiplied by the mean baseline multiplication factor or total distance is multiplied by the mean baseline minification.
6. a kind of terminal, it is characterised in that including:
Detection unit, operation is zoomed in or out for detecting to image;
First acquisition unit, for obtaining the region that described image is operated;
Second acquisition unit, if including characteristic information for the region for being operated, obtains the characteristic information corresponding Characteristic area;
Determining unit, for determining actual multiplication factor or actual minification according to the size of the characteristic area;
Unit for scaling, for being zoomed in or out to described image according to the actual multiplication factor or actual minification.
7. terminal as claimed in claim 6, it is characterised in that the operation that zooms in or out to image includes that double finger slides Operation singly refers to repetition clicking operation;
If the operation that zooms in or out to image refers to slide for double, the region that described image is operated is with double fingers and screen Contact point the border circular areas that are formed by diameter of line, or be the line with double fingers and the contact point of screen as diagonally linear Into rectangular area;
If zooming in or out operation singly to refer to repetition clicking operation to image, the region that described image is operated is with finger weight Touch point is the center of circle, the border circular areas of predetermined length radius formation in multiple clicking operation, or with touch point in finger clicking operation Centered on, preset length diagonal formed rectangular area.
8. terminal as claimed in claim 7, it is characterised in that the characteristic information is face characteristic information, including human eye, nose Son and face at least one, the characteristic area be human face region.
9. terminal as claimed in claim 8, it is characterised in that the determining unit, including:
Computation subunit, the size for calculating each human face region;
First obtains subelement, is used for:
If the human face region is one, obtain interval corresponding benchmark multiplication factor where the size of the human face region or Benchmark minification, the benchmark multiplication factor or benchmark minification are actual multiplication factor or actual minification;Or
If the human face region is at least two, interval corresponding benchmark where the size of each human face region is obtained respectively is put Big multiple or benchmark minification, calculate mean baseline multiplication factor or mean baseline minification, and the mean baseline amplifies Multiple or mean baseline minification are actual multiplication factor or actual minification.
10. terminal as claimed in claim 8, it is characterised in that also including computing unit, the computing unit is used for:If right The operation that zooms in or out of image refers to slide for double, calculates double total distances for referring to and sliding;
The determining unit, including:
Computation subunit, the size for calculating each human face region;
Second obtains subelement, is used for:
If the human face region is one, obtain interval corresponding benchmark multiplication factor where the size of the human face region or Benchmark minification, calculates actual multiplication factor or actual minification, and actual multiplication factor or actual minification are equal to institute State that total distance is multiplied by the benchmark multiplication factor or total distance is multiplied by the benchmark minification;Or
If the human face region is at least two, interval corresponding benchmark where the size of each human face region is obtained respectively is put Big multiple or benchmark minification, calculate mean baseline multiplication factor or mean baseline minification, calculate actual multiplication factor Or actual minification, actual multiplication factor or actual minification are multiplied by the mean baseline times magnification equal to total distance Several or described total distance is multiplied by the mean baseline minification.
CN201710153903.7A 2017-03-15 2017-03-15 A kind of image-scaling method and terminal Withdrawn CN106933487A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710153903.7A CN106933487A (en) 2017-03-15 2017-03-15 A kind of image-scaling method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710153903.7A CN106933487A (en) 2017-03-15 2017-03-15 A kind of image-scaling method and terminal

Publications (1)

Publication Number Publication Date
CN106933487A true CN106933487A (en) 2017-07-07

Family

ID=59432821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710153903.7A Withdrawn CN106933487A (en) 2017-03-15 2017-03-15 A kind of image-scaling method and terminal

Country Status (1)

Country Link
CN (1) CN106933487A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108268200A (en) * 2018-01-22 2018-07-10 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment, computer program and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103207742A (en) * 2012-01-13 2013-07-17 深圳富泰宏精密工业有限公司 Article selecting method and system
CN103210367A (en) * 2012-09-29 2013-07-17 华为终端有限公司 Electronic apparatus and method for controlling display object scaling
CN103699329A (en) * 2013-12-31 2014-04-02 优视科技有限公司 Page scaling method, page scaling device and terminal equipment
WO2014147945A1 (en) * 2013-03-19 2014-09-25 Sony Corporation Image processing method, image processing device and image processing program
CN104866202A (en) * 2015-06-15 2015-08-26 北京金山安全软件有限公司 Page scaling method and device
CN105094297A (en) * 2014-05-13 2015-11-25 小米科技有限责任公司 Display content zooming method and display content zooming device
CN105700804A (en) * 2015-12-31 2016-06-22 杭州华为数字技术有限公司 Method for responding operation track and operation track response device
CN105745612A (en) * 2013-11-19 2016-07-06 微软技术许可有限责任公司 Resizing technique for display content
CN105988700A (en) * 2015-02-12 2016-10-05 中兴通讯股份有限公司 Terminal screen display method and device
CN106126088A (en) * 2016-06-15 2016-11-16 青岛海信移动通信技术股份有限公司 A kind of picture amplifies the method and device of display

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103207742A (en) * 2012-01-13 2013-07-17 深圳富泰宏精密工业有限公司 Article selecting method and system
CN103210367A (en) * 2012-09-29 2013-07-17 华为终端有限公司 Electronic apparatus and method for controlling display object scaling
WO2014147945A1 (en) * 2013-03-19 2014-09-25 Sony Corporation Image processing method, image processing device and image processing program
CN105745612A (en) * 2013-11-19 2016-07-06 微软技术许可有限责任公司 Resizing technique for display content
CN103699329A (en) * 2013-12-31 2014-04-02 优视科技有限公司 Page scaling method, page scaling device and terminal equipment
CN105094297A (en) * 2014-05-13 2015-11-25 小米科技有限责任公司 Display content zooming method and display content zooming device
CN105988700A (en) * 2015-02-12 2016-10-05 中兴通讯股份有限公司 Terminal screen display method and device
CN104866202A (en) * 2015-06-15 2015-08-26 北京金山安全软件有限公司 Page scaling method and device
CN105700804A (en) * 2015-12-31 2016-06-22 杭州华为数字技术有限公司 Method for responding operation track and operation track response device
CN106126088A (en) * 2016-06-15 2016-11-16 青岛海信移动通信技术股份有限公司 A kind of picture amplifies the method and device of display

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108268200A (en) * 2018-01-22 2018-07-10 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment, computer program and storage medium

Similar Documents

Publication Publication Date Title
CN103530050B (en) Display packing and information processor
EP2310930B1 (en) Apparatus, method and computer program product for manipulating a device using dual side input devices
CN105068727B (en) A kind of implementation method and device of drawing tool
CN105068731B (en) A kind of picture Zoom method and user terminal
CN107402667A (en) Electronic equipment comprising display
CN107085479A (en) The method and the electronic installation suitable for it of handwriting style calibration function are provided
CN107924213A (en) Can be from the method and apparatus of the separated electronic equipment of another electronic equipment for operating
CN104714731A (en) Display method and device for terminal interface
CN106651338A (en) Method for payment processing and terminal
CN107589963A (en) A kind of image processing method, mobile terminal and computer-readable recording medium
CN107850982A (en) Screen operating method and the electronic equipment for supporting this method
US20150160819A1 (en) Crane Gesture
CN108463799A (en) The flexible display and its operating method of electronic equipment
CN107340964A (en) The animation effect implementation method and device of a kind of view
CN106596394A (en) Hair detection method, terminal and comb
CN106775182A (en) A kind for the treatment of method and apparatus of suspension control
CN110286840A (en) Can touch control device current scale control method, device and relevant device
CN106681612A (en) Adjusting method applied to mobile terminal and mobile terminal
CN103793178A (en) Vector graph editing method of touch screen of mobile device
CN107450841A (en) interactive object control method and device
CN107665187A (en) A kind of method and apparatus for judging mobile device application interface and whether changing
CN107678646A (en) Pay control method, device, computer installation and computer-readable recording medium
CN106873888A (en) A kind of method and terminal for showing user interface
CN102750035B (en) The determination method and apparatus of display position of cursor
CN108170214A (en) Electronic device, display control method and related product

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20170707

WW01 Invention patent application withdrawn after publication