Summary of the invention
The Summary is provided so that with brief form introduction design, these designs will be in specific implementation below
Mode part is described in detail.The Summary is not intended to identify the key feature of claimed technical solution or must
Feature is wanted, is intended to be used to limit the range of the technical solution of required protection.
In a first aspect, the embodiment of the present disclosure provides a kind of method of image procossing, comprising:
Obtain collected original image frame during image preview;
Special efficacy Rendering operations are executed to obtain special efficacy picture frame to the original image frame, and described in executing in display area
The drafting of special efficacy picture frame operates;
It detects and is presented in preview frame per second and display area that the original image frame is presented during image preview
The drafting frame per second of the special efficacy picture frame;
Based on the difference between the drafting frame per second and the preview frame per second, it is used for during controlling described image preview
Acquire the resolution ratio of new original image frame.
In above scheme, acquisition collected original image frame during image preview, comprising:
Start image preview window by calling the application programming interfaces of camera applications to trigger the camera applications;
By the application programming interfaces, the original graph that the camera applications acquire in described image the preview window is obtained
As frame.
It is described that special efficacy Rendering operations are executed to obtain special efficacy picture frame to the original image frame in above scheme, comprising:
The detected target object in the original image frame;
The region of the target object is corresponded in the original image frame, executes filter, U.S. at least one face and paster
Special efficacy Rendering operations, to obtain the special efficacy picture frame.
In above scheme, the detected target object in the original image frame, comprising:
Obtain detection frame per second during detecting the target object;
When the detection frame per second is less than the preview frame per second, based between the detection frame per second and the preview frame per second
Difference carries out frame losing processing to original image frame collected during image preview;
The detected target object in carrying out frame losing treated original image frame.
In above scheme, the difference based between the detection frame per second and the preview frame per second, to collected original
Beginning picture frame carries out frame losing processing, comprising:
The processing of frame losing at intervals, and the original image of frame losing per second processing are carried out to collected original image frame per second
The quantity of frame is greater than or equal to the difference;
Alternatively,
To collected original image frame per second with carrying out continuity frame losing processing, and the original image that frame losing per second is handled
The quantity of frame is greater than or equal to the difference.
In above scheme, the difference based between the drafting frame per second and the preview frame per second controls described image
For acquiring the resolution ratio of new original image frame during preview, comprising:
Based on the value for drawing frame per second, the difference drawn between frame per second and the preview frame per second and acquisition
The different situations of the value of the resolution ratio of original image frame are used to acquire new original graph during controlling described image preview
As the resolution ratio of frame.
In above scheme, which is characterized in that described based on the value for drawing frame per second and the drafting frame per second and institute
It states the difference between preview frame per second and acquires the different situations of the value of the resolution ratio of original image frame, control described image
For acquiring the resolution ratio of new original image frame during preview, comprising:
When meeting the first preset condition, the control resolution ratio for acquiring new original image frame is constant;
Wherein, first preset condition include: the drafting frame per second be greater than the first preset threshold, the drafting frame per second and
Difference between the preview frame per second less than the second preset threshold and acquires the resolution ratio of original image frame more than or equal to described
Screen resolution;
When meeting the second preset condition, improve described for acquiring the resolution ratio of new original image frame;
Wherein, second preset condition include: the drafting frame per second be greater than the first preset threshold, the drafting frame per second and
Difference between the preview frame per second less than the second preset threshold and acquires the resolution ratio of original image frame less than the screen
Resolution ratio.
In above scheme, which is characterized in that further include:
When original image frame collected during image preview is used for video record,
Also, when meeting the second preset condition;
The resolution ratio for being used to acquire new original image frame is improved, the code rate of recorded video is reduced.
It is described based on the value and the drafting frame per second and the preview frame per second for drawing frame per second in above scheme
Between difference and acquire original image frame resolution ratio value different situations, control described image preview process
In for acquiring the resolution ratio of new original image frame, comprising:
When meeting third preset condition, the control resolution ratio for acquiring new original image frame is constant;
Wherein, the third preset condition includes: that the drafting frame per second is less than or equal to the first preset threshold and is more than or equal to
Third predetermined threshold value, the difference drawn between frame per second and the preview frame per second are more than or equal to the second preset threshold and are less than etc.
In the 4th preset threshold and the resolution ratio of original image frame is acquired more than or equal to screen resolution described in half and is less than
The screen resolution;
When meeting four preset conditions, reduce described for acquiring the resolution ratio of new original image frame;
Wherein, the 4th preset condition includes: that the drafting frame per second is less than or equal to the first preset threshold and is more than or equal to
Third predetermined threshold value, the difference drawn between frame per second and the preview frame per second are more than or equal to the second preset threshold and are less than etc.
In the 4th preset threshold and the resolution ratio of original image frame is acquired less than screen resolution described in half or is more than or equal to
The screen resolution.
It is described based on the value and the drafting frame per second and the preview frame per second for drawing frame per second in above scheme
Between difference and acquire original image frame resolution ratio value different situations, control described image preview process
In for acquiring the resolution ratio of new original image frame, comprising:
When meeting five preset conditions, the control resolution ratio for acquiring new original image frame is constant;
Wherein, the 5th preset condition include: the drafting frame per second be less than third predetermined threshold value, the drafting frame per second and
Difference between the preview frame per second is greater than the 4th preset threshold and acquires the resolution ratio of original image frame less than half
The screen resolution;
When meeting six preset conditions, reduce described for acquiring the resolution ratio of new original image frame;
Wherein, the 6th preset condition include: the drafting frame per second be less than third predetermined threshold value, the drafting frame per second and
Difference between the preview frame per second is greater than the 4th preset threshold and acquires the resolution ratio of original image frame more than or equal to two points
One of described in screen resolution.
Second aspect, the embodiment of the present disclosure provide a kind of device of image procossing, comprising:
Acquiring unit, for obtaining collected original image frame during image preview;
Execution unit, for executing special efficacy Rendering operations to the original image frame to obtain special efficacy picture frame, and aobvious
Show that region executes the drafting operation of the special efficacy picture frame;
Detection unit, for detect presented during image preview the original image frame preview frame per second and
The drafting frame per second of the special efficacy picture frame is presented in display area;
Control unit, for according to the difference between the drafting frame per second and the preview frame per second, control described image to be pre-
For acquiring the resolution ratio of new original image frame during looking at.
In above scheme, the acquiring unit is also used to by calling the application programming interfaces of camera applications to trigger
State camera applications starting image preview window;By the application programming interfaces, it is pre- in described image to obtain the camera applications
The original image frame acquired look in window.
In above scheme, the execution unit is also used to the detected target object in the original image frame;In the original
The region of the target object is corresponded in beginning picture frame, executes the special efficacy Rendering operations of at least one filter, U.S. face and paster, with
Obtain the special efficacy picture frame.
In above scheme, the execution unit is also used to obtain detection frame per second during detecting the target object;
It is right based on the difference between the detection frame per second and the preview frame per second when the detection frame per second is less than the preview frame per second
Collected original image frame carries out frame losing processing during image preview;Carrying out frame losing treated original image frame
Middle detected target object.
In above scheme, the execution unit is also used to lose collected original image frame per second at intervals
Frame processing, and the quantity of the original image frame of frame losing per second processing is greater than or equal to the difference;Alternatively, to per second collected
Original image frame with carrying out continuity frame losing processing, and the quantity of the original image frame of frame losing per second processing is more than or equal to described
Difference.
In above scheme, described control unit is also used to based on value, the drafting frame per second and the institute for drawing frame per second
It states the difference between preview frame per second and acquires the different situations of the value of the resolution ratio of original image frame, control described image
For acquiring the resolution ratio of new original image frame during preview.
In above scheme, described control unit is also used to when meeting the first preset condition, and control is described new for acquiring
Original image frame resolution ratio it is constant;Wherein, first preset condition includes: that the drafting frame per second is greater than the first default threshold
Value, the difference drawn between frame per second and the preview frame per second less than the second preset threshold and acquire original image frame
Resolution ratio is more than or equal to the screen resolution;When meeting the second preset condition, improve described for acquiring new original graph
As the resolution ratio of frame;Wherein, second preset condition includes: that the drafting frame per second is greater than the first preset threshold, the drafting
Difference between frame per second and the preview frame per second less than the second preset threshold and acquires the resolution ratio of original image frame less than institute
State screen resolution.
In above scheme, described control unit is also used to when collected original image frame during image preview
When for video record, also, when meeting the second preset condition;It improves described for acquiring the resolution of new original image frame
Rate reduces the code rate of recorded video.
In above scheme, described control unit is also used to when meeting third preset condition, and control is described new for acquiring
Original image frame resolution ratio it is constant;Wherein, the third preset condition includes: that the drafting frame per second is less than or equal to first in advance
If threshold value and be more than or equal to third predetermined threshold value, the difference drawn between frame per second and the preview frame per second is more than or equal to second
Preset threshold and be less than or equal to the 4th preset threshold and acquire original image frame resolution ratio be more than or equal to half described in
Screen resolution and be less than the screen resolution;When meeting four preset conditions, reduce described new original for acquiring
The resolution ratio of picture frame;Wherein, the 4th preset condition includes: that the drafting frame per second is less than or equal to the first preset threshold and big
In be equal to third predetermined threshold value, the difference drawn between frame per second and the preview frame per second is more than or equal to the second preset threshold and
Less than or equal to the 4th preset threshold and the resolution ratio of acquisition original image frame less than screen resolution described in half or greatly
In equal to the screen resolution.
In above scheme, described control unit is also used to when meeting five preset conditions, and control is described new for acquiring
Original image frame resolution ratio it is constant;Wherein, the 5th preset condition includes: that the drafting frame per second is less than the default threshold of third
Value, the difference drawn between frame per second and the preview frame per second are greater than the 4th preset threshold and acquire original image frame
Resolution ratio is less than screen resolution described in half;When meeting six preset conditions, reduce described for acquiring new original
The resolution ratio of beginning picture frame;Wherein, the 6th preset condition includes: that the drafting frame per second is less than third predetermined threshold value, described
The difference drawn between frame per second and the preview frame per second is big greater than the resolution ratio of the 4th preset threshold and acquisition original image frame
In equal to screen resolution described in half.
The third aspect, the embodiment of the present disclosure provide a kind of electronic equipment, comprising:
Memory, for storing executable instruction;
Processor, when for executing the executable instruction, the method for the image procossing that the realization embodiment of the present disclosure provides.
Fourth aspect, the embodiment of the present disclosure provide a kind of storage medium, are stored with executable instruction, the executable finger
Order is performed, for realizing the method for the image procossing that the embodiment of the present disclosure provides.
The embodiment of the present disclosure has the following beneficial effects:
By executing special efficacy Rendering operations to original image frame collected during image preview to obtain special efficacy
Picture frame, and the drafting operation of the special efficacy picture frame is executed in display area, it is then based on the drafting frame per second of special efficacy picture frame
Difference between the preview frame per second of original image frame is used to acquire new original image during controlling described image preview
The resolution ratio of frame can make the intelligent balance of special effect processing process intermediate-resolution and frame per second, so that user is pre- to camera
The satisfaction of effect and video record of looking at reaches relatively best, and obtains more good usage experience.
Specific embodiment
Embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the certain of the disclosure in attached drawing
Embodiment, it should be understood that, the disclosure can be realized by various forms, and should not be construed as being limited to this
In the embodiment that illustrates, providing these embodiments on the contrary is in order to more thorough and be fully understood by the disclosure.It should be understood that
It is that being given for example only property of the accompanying drawings and embodiments effect of the disclosure is not intended to limit the protection scope of the disclosure.
It should be appreciated that each step recorded in disclosed method embodiment can execute in a different order,
And/or parallel execution.In addition, method implementation may include additional step and/or omit the step of execution is shown.This public affairs
The range opened is not limited in this respect.
Terms used herein " comprising " and its deformation are that opening includes, i.e., " including but not limited to ".Term "based"
It is " being based at least partially on ".Term " one embodiment " expression " at least one embodiment ";Term " another embodiment " indicates
" at least one other embodiment ";Term " some embodiments " expression " at least some embodiments ".The correlation of other terms is fixed
Justice provides in will be described below.
It is noted that the concepts such as " first " that refers in the disclosure, " second " are only used for different devices, module or list
Member distinguishes, and is not intended to limit the sequence or relation of interdependence of function performed by these devices, module or unit.
It is noted that referred in the disclosure "one", the modification of " multiple " be schematically and not restrictive this field
It will be appreciated by the skilled person that being otherwise construed as " one or more " unless clearly indicate otherwise in context.
The being merely to illustrate property of title of the message or information that are interacted between multiple devices in disclosure embodiment
Purpose, and be not used to limit the range of these message or information.
Before the embodiment of the present disclosure is further elaborated, to noun involved in the embodiment of the present disclosure and term
It is illustrated, noun involved in the embodiment of the present disclosure and term are suitable for following explanation.
1) preview frame per second, the original image frame of display per second is (i.e. without the image of special effect processing in image preview window
Frame) quantity.
2) frame per second is drawn, the display component of operating system special efficacy picture frame per second of drawing (includes the picture frame of special efficacy, leads to
Cross and special efficacy added to original image frame and is formed) quantity to be shown in screen.
3) frame per second, the quantity of the original image frame per second for completing target object detection are detected.
It is the structural schematic diagram for realizing the electronic equipment of the embodiment of the present disclosure referring to Fig. 1, Fig. 1.Electronic equipment can be with
It is various terminals, including mobile phone, laptop, digit broadcasting receiver, personal digital assistant (PDA, Personal
Digital Assistant), tablet computer (PAD), portable media player (PMP, Portable Media
Player), the mobile terminal of car-mounted terminal (such as vehicle mounted guidance terminal) etc. and such as DTV (TV), desk-top calculating
The fixed terminal of machine etc..Electronic equipment shown in fig. 1 is only an example, function to the embodiment of the present disclosure and should not be made
With range band come any restrictions.
As shown in Figure 1, electronic equipment may include processing unit (such as central processing unit, graphics processor etc.) 110,
It can add according to the program being stored in read-only memory (ROM, Read-Only Memory) 120 or from storage device 180
The program that is downloaded in random access storage device (RAM, Random Access Memory) 130 and execute various movements appropriate and
Processing.In RAM 130, it is also stored with various programs and data needed for electronic device.Processing unit 110, ROM 120
And RAM130 is connected with each other by bus 140.Input/output (I/O, Input/Output) interface 150 is also connected to bus
140。
In general, following device can connect to I/O interface 150: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph
As the input unit 160 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD, Liquid
Crystal Display), loudspeaker, vibrator etc. output device 170;Storage device including such as tape, hard disk etc.
180;And communication device 190.Communication device 190 can permit electronic equipment wirelessly or non-wirelessly communicated with other equipment with
Exchange data.
Particularly, according to the embodiment of the present disclosure, it is soft that the process of provided flow chart description may be implemented as computer
Part program.For example, the embodiment of the present disclosure includes a kind of computer program product comprising carry on a computer-readable medium
Computer program, computer program include the program code for method shown in execution flow chart.In such embodiments,
Computer program can be downloaded and installed from network by communication device 190, or be mounted from storage device 180, or
Person is mounted from ROM 120.When computer program is executed by processing unit 110, the image procossing of the embodiment of the present disclosure is executed
Function in method.
It should be noted that the above-mentioned computer-readable medium of the embodiment of the present disclosure can be computer-readable signal media
Or computer readable storage medium either the two any combination.Computer readable storage medium for example may include
But it is not limited to system, device or the device of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or any above combination.Meter
The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires
Take formula computer disk, hard disk, RAM, ROM, erasable programmable read only memory (EPROM, Erasable
Programmable Read Only Memory), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), light
Memory device, magnetic memory device or above-mentioned any appropriate combination.
In the embodiments of the present disclosure, computer readable storage medium can be any tangible Jie for including or store program
Matter, the program can be commanded execution system, device or device use or in connection.And in the embodiment of the present disclosure
In, computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated, wherein holding
Computer-readable program code is carried.The data-signal of this propagation can take various forms, including but not limited to electromagnetism
Signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable storage medium
Any computer-readable medium other than matter, computer-readable signal media can send, propagate or transmit for by instructing
Execution system, device or device use or program in connection.The program generation for including on computer-readable medium
Code can transmit with any suitable medium, including electric wire, optical cable, radio frequency (RF, Radio Frequency) etc., Huo Zheshang
Any appropriate combination stated.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not
It is fitted into electronic equipment.
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by electronics
When equipment executes, so that electronic equipment executes the image processing method that the embodiment of the present disclosure provides.
It can be operated to write for executing in the embodiment of the present disclosure with one or more programming languages or combinations thereof
Computer program code, above procedure design language include object oriented program language-such as Java,
Smalltalk, C++ further include conventional procedural programming language-such as " C " language or similar program design language
Speech.Program code can be executed fully on the user computer, partly be executed on the user computer, as an independence
Software package execute, part on the user computer part execute on the remote computer or completely in remote computer or
It is executed on server.In situations involving remote computers, remote computer can pass through the network of any kind, including office
Domain net (LAN, Local Area Network)) and wide area network (WAN, Wide Area Network), to be connected to user's calculating
Machine, or, it may be connected to outer computer (such as being connected using ISP by internet).
The flow chart and block diagram that the embodiment of the present disclosure provides, illustrate the system according to the various embodiments of the disclosure, method
With the architecture, function and operation in the cards of computer program product.In this regard, each of flowchart or block diagram
Box can represent a part of a module, program segment or code, and a part of the module, program segment or code includes one
A or multiple executable instructions for implementing the specified logical function.It should also be noted that in some implementations as replacements,
Function marked in the box can also occur in a different order than that indicated in the drawings.For example, two succeedingly indicate
Box can actually be basically executed in parallel, they can also be executed in the opposite order sometimes, this is according to related function
Depending on.It is also noted that the group of each box in block diagram and or flow chart and the box in block diagram and or flow chart
It closes, can be realized with the dedicated hardware based system for executing defined functions or operations, or specialized hardware can be used
Combination with computer instruction is realized.
Being described in unit involved in the embodiment of the present disclosure can be realized by way of software, can also be by hard
The mode of part is realized.Wherein, the title of unit does not constitute the restriction to the unit itself under certain conditions, for example, the
One acquiring unit is also described as " obtaining the unit of at least two internet protocol addresses ".
Function described in the embodiment of the present disclosure can be executed at least partly by one or more hardware logic components.
For example, without limitation, the hardware logic component for the exemplary type that can be used include: field programmable gate array (FPGA,
Field-Programmable Gate Array), specific integrated circuit (ASIC, Application Specific
Integrated Circuit), Application Specific Standard Product (ASSP, Application Specific Standard Parts)),
System on chip (SOC), complex programmable logic equipment (CPLD) etc..
In the context of the embodiment of the present disclosure, machine readable media can be tangible medium, may include or deposits
Store up the program for using or being used in combination with instruction execution system, device or equipment for instruction execution system, device or equipment.
Machine readable media can be machine-readable signal medium or machine-readable storage medium.Machine readable media may include but not
It is being limited to electronics, magnetic, optical, electromagnetism, infrared or semiconductor system, device or equipment or above content
Any appropriate combination.The more specific example of machine readable storage medium will include the electrical connection of line based on one or more, just
Take formula computer disks, hard disk, random access memory (RAM), read-only memory (ROM), Erasable Programmable Read Only Memory EPROM
(EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage are set
Standby or above content any appropriate combination.
Illustrate to realize unit and/or the module in the image processing apparatus of embodiment of the present disclosure offer below.It is understood that
Ground, unit or module in image processing apparatus can use the software (meter stored in computer software programs as escribed above
Calculation machine program) mode realized in electronic equipment as shown in Figure 2, can also using above-mentioned hardware logic component (such as
FPGA, ASIC, SOC and CPLD) mode realized in electronic equipment as shown in Figure 2.
Referring to fig. 2, Fig. 2 is an optional structural schematic diagram for realizing the image processing apparatus 300 of the embodiment of the present disclosure,
Show with lower unit: acquiring unit 310, execution unit 320, detection unit 330 and control unit 340 will be described hereinafter
The function of each unit.
It may be noted that the classification of said units does not constitute the restriction to electronic equipment itself, such as some units can be with
It is split as two or more subelements, alternatively, some units can be merged into a new unit.
It should also be noted that the title of said units does not constitute the restriction to unit itself under certain conditions, for example, on
State the unit that acquiring unit 310 can also be described as " obtaining collected original image frame during image preview ".
For the same reason, in electronic equipment the unit of not detailed description and/or module do not represent corresponding unit and/
Or module is default, operation performed by all electronic equipments can pass through the corresponding unit and/or mould in electronic equipment
Block is realized.
It is an optional process signal for realizing the image processing method of the embodiment of the present disclosure with continued reference to Fig. 3, Fig. 3
Figure, to run operating system in electronic equipment and be equipped with system camera application and the implementation of the image special effect application execution disclosure
The step of explanatory diagram 3 is shown for the image processing method that example provides, wherein camera applications, which can be default in operating system, to be made
Camera applications, such as primary camera applications (i.e. system camera), image special effect application are can to add the application of special efficacy,
Such as it can be short-sighted frequency APP and (special efficacy added to photos and videos, and shares the user's space for arriving short video platform) He Meiyan
Camera etc..
In step s101, image special effect application calls the application programming interfaces of camera applications to start the pre- of camera applications
Look at function, in step s 102, image special effect application obtains camera applications collected original graph during image preview
As frame.
In some embodiments, it is pre- to trigger camera applications starting image to call the application programming interfaces of camera applications first
It lookes at window, by application programming interfaces, obtains the original image frame that camera applications acquire in image preview window.
As an example, referring to fig. 4, Fig. 4 is an optional principle for realizing the image processing method of the embodiment of the present disclosure
Schematic diagram, when the image special effect application starting installed in electronic equipment, the application journey of camera applications is called in image special effect application
Sequence interface so that starting image preview window shows the original image frame acquired in real time, and is answered with triggering camera applications from camera
Application programming interfaces obtain original image frame, and storage is arrived in the caching (Buffer) of graph image special efficacy application.
In some embodiments, the replacement step as step S101 and step S102, image special effect application can be from behaviour
Make the reading permission that system obtains camera, so as to directly use camera (i.e. not by calling camera applications) starting
Previews, and original image frame is acquired in previews, and store the caching to the application of graph image special efficacy.
As an example, image special effect application can have the reading permission of the camera of electronic equipment, around primary phase
Machine application realize image preview function, i.e., directly from operating system camera interface obtain original image frame data.
In step s 103, image special effect, which is applied, executes special efficacy Rendering operations to original image frame to obtain special efficacy image
Frame.
In some embodiments, image special effect application can be the case where not carrying out target object detection to original image frame
Under, call GPU to complete the Rendering operations to the special efficacy of original image frame.Such as in the unified addition in all positions of original image frame
Special efficacy, including change style (old film) and add picture frame etc..
In further embodiments, image special effect application can call CPU detected target object in original image frame, and
And GPU is called to correspond to the region of target object in original image frame, execute the special efficacy wash with watercolours of at least one filter, U.S. face and paster
Dye operation, to obtain special efficacy picture frame.
As an example, referring to fig. 4, image special effect is applied from camera applications and obtains its original image frame acquired, storage is arrived
In the caching of image special effect application, and the drafting interface of call operation system draws the original image in caching in display area
Frame is to realize live preview function;When user has demarcated face in the original image frame of preview, image special effect application will be adjusted
Original image frame is read from caching with CPU and carries out recognition of face, the original image frame including face recognition result will be deposited
It stores up in corresponding caching;Then image special effect application calls CPU to read original image frame from corresponding caching, and combines and know
Other face and user select filter, the U.S. special efficacys such as face and paster, render to original image frame.
In step S104, image special effect applies the special efficacy picture frame drawn interface and send rendering to operating system, with
Operating system is set to execute the drafting operation of special efficacy picture frame in display area.
As an example, display area can be image preview area, i.e., original image frame is shown when image preview starts
Region, after the completion of the rendering of special efficacy picture frame, the original image frame for covering image preview area carrys out special display effect picture frame.Display
Region is also possible to the region independently of image preview area, such as preview image and special efficacy image split window are shown, convenient same
When viewing acquisition original image frame and add specific special efficacy picture frame.
In step s105, the preview frame per second of image special effect application detection original image frame during image preview,
And it detects operating system and draws the drafting frame per second of special efficacy picture frame in display area.
In some embodiments, the special efficacy that renders in step s 103 can be for detecting in original image frame
What target object carried out.Applicant has found during implementing the embodiment of the present disclosure, if CPU is called to be directed to original image frame
Target detection is carried out to carry out special efficacy rendering, the situation of preview frame per second is less than if there is the detection frame per second of CPU, will lead to subsequent
Special efficacy rendering and the drafting of special efficacy picture frame there is unavoidable delay.
For above situation, referring to Fig. 5, Fig. 5 is that one of image processing method provided by the embodiments of the present application is optional
Flow diagram, step S103 can be realized by step S1031 to step S1035, are able to solve CPU and carried out target object inspection
The technical issues of leading to delay when survey, will be illustrated in conjunction with each step.
Step S1031, image special effect application obtain detection frame per second during detected target object.
Step S1032, when detect frame per second be less than preview frame per second when, based on detection frame per second and preview frame per second between difference,
Image special effect, which is applied, carries out frame losing processing to original image frame collected during image preview.
In some embodiments, when detecting frame per second less than preview frame per second, based between detection frame per second and preview frame per second
Difference carries out the processing of frame losing at intervals, and the original image frame of frame losing per second processing to collected original image frame per second
Quantity be greater than or equal to difference;Alternatively, to collected original image frame per second, frame losing is handled with carrying out continuity, and per second
The quantity of the original image frame of frame losing processing is greater than or equal to difference.
As an example, referring to fig. 4, during image preview, when preview frame per second is greater than detection frame per second, detection unit
Identify the process of target object than relatively time-consuming from original image frame.Image special effect application at this time can call CPU from camera applications
Acquire in the caching of original image frame and read original image frame, with going forward side by side row interval frame losing processing or continuity at frame losing
Reason, so that the frame number of the original image frame obtained after frame losing per second is not more than preview frame per second, then by frame losing, that treated is original
In the caching that picture frame storage is applied to image special effect.
As an example, when detection frame per second is 20 frame, 20 frames of detection unit most processing per second are former when preview frame per second is 30 frames
Beginning image, at this point it is possible to the camera programm frame per second for being transmitted to detection unit be abandoned 10 frames, so as to obtain after interior frame losing per second
The frame number of original image frame be 20 equal with preview frame per second;It can also be with by the camera programm frame per second for being transmitted to detection unit
12 frames are abandoned, so that the frame number of the original image frame obtained after interior frame losing per second is 18, are less than preview frame per second.Wherein, at frame losing
Reason mode can be continuity frame losing, the i.e. continuous original image frame of interior disposable 10 frame of discarding per second;Frame losing processing mode
It can be frame losing at intervals, i.e., it is per second interior at interval of 2 frames, 1 frame original image frame of discarding.
Above-mentioned selection judges the difference for drawing frame per second and preview frame per second, goes to carry out subsequent frame losing processing, and non-selected right
The difference of rendering frame per second and preview frame per second in Fig. 4 is judged, is since the difference between frame per second and preview frame per second is drawn in selection
Value better reflect screen show process and identify target object process between it is possible that delay, pass through selection drawing frames
Difference between rate and preview frame per second can make pre- deterministic process of the processing unit 110 before carrying out frame losing processing more rationally with
And it is accurate.Wherein, rendering frame per second refers to execute special efficacy Rendering operations after output per second original image frame frame number.
The above-mentioned mode that frame losing processing is carried out to original image frame collected during image preview, can not only
Enough reduce detection unit and identify the pressure of target object from original image frame, and can be improved detection unit from original image
The speed of target object is identified in frame.
Step S1033, image special effect apply the detected target object in carrying out frame losing treated original image frame.
As an example, referring to fig. 4, image special effect, which is applied, reads frame losing from the caching that image special effect apply treated original
Beginning picture frame, and recognition of face detected target object is carried out in original image frame.
As an example, when preview frame per second is 30 when detection frame per second is 20, caching can be transmitted to by camera programm is per second
(Buffer) frame abandons 10 frames, so that the frame number of the original image frame obtained after interior frame losing per second is 20, then beauty Yan Xiangji
It can be by calling CPU to go detected target object in remaining 20 frame original image frame.
The mode of the above-mentioned detected target object in carrying out frame losing treated original image frame, not only reduces electronics
Equipment needs to detect the frame number of original image frame, and the further electronic equipment that reduces identifies target object from original image frame
Pressure, and can be improved the speed that electronic equipment identifies target object from original image frame, exist to improve user
Experience in shooting process.
As an example, the mode of detected target object can be automatic detection, the i.e. feature of automatic identification target object, nothing
User is needed to be manually operated.It is also possible to be demarcated according to user and detects, i.e., demarcates at least one in the preview window according to user
Then the object of a need special efficacy to be added detects the object of user's calibration persistently in the original image frame of subsequent acquisition with wash with watercolours
Contaminate special efficacy.
As an example, the type of target object can be people, animal and object wholly or partially.Such as face.
Step S1034, image special effect application call CPU to correspond to the region of target object in original image frame, execute filter
The special efficacy Rendering operations of at least one mirror, U.S. face and paster, to obtain special efficacy picture frame.
It in some embodiments, can be to the corresponding target of original image frame after completing to the detection of target object
Region executes the special efficacy Rendering operations of at least one filter, U.S. face and paster, to obtain the spy after special efficacy Rendering operations
Imitate picture frame.
As an example, can be selected according to face in the position of original image frame on face after completing recognition of face
Carry out the operation such as mill skin, whitening, or the operation such as addition decoration around face, such as: user open U.S. face camera programm into
When row self-timer, camera starting, the position of automatic program identification user's face, then user is according to self demand, wherein into
The operation such as row mill skin or whitening or addition decoration.
Step S1035, the drafting interface of image special effect application call operation system execute special efficacy picture frame in display area
Drafting operation.
In step s 106, image special effect is applied based on the difference drawn between frame per second and preview frame per second, and control image is pre-
For acquiring the resolution ratio of new original image frame during looking at.
Applicant has found during implementing the application, in image preview and during add special efficacy, due to electronics
The limitation of the performance of the CPU and GPU of equipment, so that the real-time of special display effect picture frame depends on preview frame per second and acquisition is original
Difference between the resolution ratio of picture frame, difference is bigger, then the real-time of special display effect picture frame is poorer, it is thus possible to according to
The difference between frame per second and preview frame per second is drawn, the resolution ratio of new original image frame is acquired during controlling image preview,
So that resolution ratio is adapted to the performance of the CPU of electronic equipment and GPU to reduce difference, to guarantee the reality that special efficacy picture frame is shown
Shi Xing.
In some embodiments, step S106 can also be realized in this manner: based on draw frame per second value, with
And it draws the difference between frame per second and preview frame per second and acquires the different situations of the value of the resolution ratio of original image frame, control
For acquiring the resolution ratio (step S1061) of new original image frame during imaged preview.
As an example, according to the value for drawing frame per second and drawing the difference between frame per second and preview frame per second and acquiring
The different situations of the value of the resolution ratio of original image frame are used to acquire new original image frame during controlling image preview
Resolution ratio, specific control strategy is as shown in table 1.
The specific control strategy of table 1
Wherein, the height of the value of frame per second is drawn, neutralizes and low respectively indicates: the first valued space, the second valued space and the
Three valued spaces.
It draws the height of the difference between frame per second and preview frame per second, neutralize low respectively indicate: the 4th valued space, the 5th value
Space and the 6th valued space.
It acquires the height of the value of the resolution ratio of original image frame, neutralize low respectively indicate: the 7th valued space, the 8th value
Space and the 9th valued space.
Wherein, the relationship between above-mentioned valued space can be being also possible to continuously for interval.
Referring to Fig. 6 A, Fig. 6 A is an optional flow diagram of image processing method provided by the embodiments of the present application,
Fig. 6 A shows step S1061 and can be realized by step S10611 to step S10612, will be illustrated in conjunction with each step.
Step S10611 is controlled when meeting the first preset condition for acquiring the resolution ratio of new original image frame not
Become;Wherein, the first preset condition includes: and draws frame per second to be greater than the first preset threshold and draw between frame per second and preview frame per second
Difference less than the second preset threshold and acquire original image frame resolution ratio be more than or equal to screen resolution.
In some embodiments, when drafting frame per second is greater than the first preset threshold and draws between frame per second and preview frame per second
Difference less than the second preset threshold and acquire original image frame resolution ratio be more than or equal to screen resolution when, control use
It is constant in the resolution ratio for acquiring new original image frame.
As an example, second preset threshold is 2 when the first preset threshold is 18, preview frame per second is 20 frames, draws frame per second and is
19 frames, screen resolution are 920,000 pixels, when the resolution ratio for acquiring original image frame is 1,000,000 pixel, draws frame per second 19 and are greater than
First preset threshold 18, and the difference drawn between frame per second and preview frame per second is 1 less than the second preset threshold 2, and acquisition
It is 920,000 pixels that 1,000,000 pixel of resolution ratio of original image frame, which is greater than screen resolution, at this point, the case where acquisition original image frame
For optimum state, the resolution ratio for acquiring new original image frame is not adjusted.
Step S10612 improves the resolution ratio for acquiring new original image frame when meeting the second preset condition;Its
In, the second preset condition includes: to draw frame per second to be greater than the first preset threshold and draw the difference between frame per second and preview frame per second
It is less than screen resolution less than the second preset threshold and the resolution ratio for acquiring original image frame.
In some embodiments, when drafting frame per second is greater than the first preset threshold and draws between frame per second and preview frame per second
Difference less than the second preset threshold and acquire original image frame resolution ratio be less than screen resolution when, improve for adopting
Collect the resolution ratio of new original image frame, wherein the step-length of resolution ratio in proportion or centainly can be improved.
In some embodiments, when drafting frame per second is greater than the first preset threshold and draws between frame per second and preview frame per second
Difference less than the second preset threshold and acquire original image frame resolution ratio be more than or equal to half screen resolution and
When less than screen resolution, for acquiring, the resolution ratio of new original image frame is constant or raising is for acquiring new original for control
The resolution ratio of beginning picture frame.
As an example, second preset threshold is 2 when the first preset threshold is 18, preview frame per second is 20 frames, draws frame per second and is
19 frames, screen resolution are 920,000 pixels, when the resolution ratio for acquiring original image frame is 800,000 pixel, draws frame per second 19 and are greater than the
One preset threshold 18, and the difference drawn between frame per second and preview frame per second is 1 former less than the second preset threshold 2, and acquisition
It is 920,000 pixels and the screen resolution 46 for being greater than half that 800,000 pixel of resolution ratio of beginning picture frame, which is less than screen resolution,
When ten thousand pixels, the resolution ratio for acquiring new original image frame or the resolution ratio 800,000 that original image frame will be acquired can not be adjusted
Pixel is improved to 1,000,000 pixels for acquiring new original image frame.
In some embodiments, when drafting frame per second is greater than the first preset threshold and draws between frame per second and preview frame per second
Difference less than the second preset threshold and acquire original image frame resolution ratio be less than half screen resolution when, mention
Height is for acquiring the resolution ratio of new original image frame.
As an example, second preset threshold is 2 when the first preset threshold is 18, preview frame per second is 20 frames, draws frame per second and is
19 frames, screen resolution are 920,000 pixels, when the resolution ratio for acquiring original image frame is 300,000 pixel, draws frame per second 19 and are greater than the
One preset threshold 18, and the difference drawn between frame per second and preview frame per second is 1 former less than the second preset threshold 2, and acquisition
300,000 pixel of resolution ratio of beginning picture frame is less than 460,000 pixel of screen resolution of half, at this point it is possible to will acquire original
300,000 pixel of resolution ratio of picture frame is improved to 1,000,000 pixels for acquiring new original image frame.
In some embodiments, when original image frame collected during image preview is used for video record,
Also, the difference that frame per second is greater than between the first preset threshold and drafting frame per second and preview frame per second is default less than second when drawing
When threshold value and the resolution ratio for acquiring original image frame are less than screen resolution, improve for acquiring new original image frame
Resolution ratio reduces the code rate of recorded video.Wherein it is possible to which the step-length of code rate in proportion or centainly is improved.
Here, the data bits of transmission per second when the code rate of recorded video is recorded video transmission data, unit is kbps
I.e. kilobit is per second.
In some embodiments, when carrying out video record, it is greater than the first preset threshold and drawing frames when drawing frame per second
Difference between rate and preview frame per second less than the second preset threshold and acquires the resolution ratio of original image frame less than screen resolution
When rate, the resolution ratio for acquiring new original image frame can be improved, is improving the resolution ratio for acquiring new original image frame
Meanwhile it is excessively high and cause to record a video unintelligible to may result in resolution ratio, can reduce the code rate of recorded video at this time, thus meeting
Make to be more clear in video record, improves user experience.
Referring to Fig. 6 B, Fig. 6 B is an optional flow diagram of image processing method provided by the embodiments of the present application,
Fig. 6 B shows step S1061 and can be realized by step S10613 to step S10614, will be illustrated in conjunction with each step.
Step S10613 is controlled when meeting third preset condition for acquiring the resolution ratio of new original image frame not
Become;Wherein, third preset condition include: draw frame per second be less than or equal to the first preset threshold and be more than or equal to third predetermined threshold value,
And the difference for drawing between frame per second and preview frame per second be more than or equal to the second preset threshold and be less than or equal to the 4th preset threshold, with
And the resolution ratio of acquisition original image frame is more than or equal to half screen resolution and is less than screen resolution.
In some embodiments, when draw frame per second be less than or equal to the first preset threshold and be more than or equal to third predetermined threshold value,
And the difference for drawing between frame per second and preview frame per second be more than or equal to the second preset threshold and be less than or equal to the 4th preset threshold, with
And the resolution ratio of acquisition original image frame, more than or equal to half screen resolution and when being less than screen resolution, control is used for
The resolution ratio for acquiring new original image frame is constant.
As an example, second preset threshold is 2, third predetermined threshold value 15 when the first preset threshold is 18, the 4th is default
Threshold value is 3, and preview frame per second is 20 frames, and drafting frame per second is 17 frames, and screen resolution is 920,000 pixels, acquires point of original image frame
When resolution is 800,000 pixel, frame per second 17 is drawn less than the first preset threshold 18 and is greater than third predetermined threshold value 15 and drawing frames
Difference between rate and preview frame per second is 3 equal to the 4th preset threshold 3, and 800,000 pixel of resolution ratio of acquisition original image frame
It is 920,000 pixels and 460,000 pixel of screen resolution for being greater than half less than screen resolution, at this point, acquisition original image
The case where frame is optimum state, does not adjust the resolution ratio for acquiring new original image frame.
Step S10614 reduces the resolution ratio for acquiring new original image frame when meeting four preset conditions;Its
In, the 4th preset condition includes: to draw frame per second to be less than or equal to the first preset threshold and be more than or equal to third predetermined threshold value, Yi Jihui
Difference between frame per second processed and preview frame per second is more than or equal to the second preset threshold and is less than or equal to the 4th preset threshold and acquisition
The resolution ratio of original image frame is less than half screen resolution or is more than or equal to screen resolution.
In some embodiments, when draw frame per second be less than or equal to the first preset threshold and be more than or equal to third predetermined threshold value,
And the difference for drawing between frame per second and preview frame per second be more than or equal to the second preset threshold and be less than or equal to the 4th preset threshold, with
And the resolution ratio of acquisition original image frame, less than half screen resolution or when being more than or equal to screen resolution, reduction is used for
Acquire the resolution ratio of new original image frame, wherein the step-length of resolution ratio in proportion or centainly can be reduced.
In some embodiments, when draw frame per second be less than or equal to the first preset threshold and be more than or equal to third predetermined threshold value,
And the difference for drawing between frame per second and preview frame per second be more than or equal to the second preset threshold and be less than or equal to the 4th preset threshold, with
And when acquiring the resolution ratio of original image frame more than or equal to screen resolution, control the resolution for acquiring new original image frame
Rate is constant or reduces resolution ratio for acquiring new original image frame.
As an example, second preset threshold is 2, third predetermined threshold value 15 when the first preset threshold is 18, the 4th is default
Threshold value is 3, and preview frame per second is 20 frames, and drafting frame per second is 17 frames, and screen resolution is 920,000 pixels, acquires point of original image frame
When resolution is 1,000,000 pixel, frame per second 17 is drawn less than the first preset threshold 18 and is greater than third predetermined threshold value 15 and drawing frames
Difference between rate and preview frame per second is 3 equal to the 4th preset threshold 3, and 1,000,000 picture of resolution ratio of acquisition original image frame
It is 920,000 pixels that element, which is greater than screen resolution, at this point it is possible to not adjust the resolution ratio for acquiring new original image frame or will adopt
1,000,000 pixel of resolution ratio of collection original image frame is reduced to 800,000 pixels for acquiring new original image frame.
In some embodiments, when draw frame per second be less than or equal to the first preset threshold and be more than or equal to third predetermined threshold value,
And the difference for drawing between frame per second and preview frame per second be more than or equal to the second preset threshold and be less than or equal to the 4th preset threshold, with
And it when acquiring the resolution ratio of original image frame less than half screen resolution, reduces for acquiring new original image frame
Resolution ratio.
As an example, second preset threshold is 2, third predetermined threshold value 15 when the first preset threshold is 18, the 4th is default
Threshold value is 3, and preview frame per second is 20 frames, and drafting frame per second is 17 frames, and screen resolution is 920,000 pixels, acquires point of original image frame
When resolution is 300,000 pixel, frame per second 17 is drawn less than the first preset threshold 18 and is greater than third predetermined threshold value 15 and drawing frames
Difference between rate and preview frame per second is 3 equal to the 4th preset threshold 3, and 300,000 pixel of resolution ratio of acquisition original image frame
Less than 460,000 pixel of screen resolution of half, at this point it is possible to which 300,000 pixel of resolution ratio for acquiring original image frame is dropped
Down to 200,000 pixels for acquiring new original image frame.
Referring to Fig. 6 C, Fig. 6 C is an optional flow diagram of image processing method provided by the embodiments of the present application,
Fig. 6 C shows step S1061 and can be realized by step S10615 to step S10616, will be illustrated in conjunction with each step.
Step S10615 is controlled when meeting five preset conditions for acquiring the resolution ratio of new original image frame not
Become;Wherein, the 5th preset condition includes: and draws frame per second to be less than third predetermined threshold value and draw between frame per second and preview frame per second
Difference be greater than the 4th preset threshold and acquire original image frame resolution ratio be less than half screen resolution.
In some embodiments, when drafting frame per second is less than third predetermined threshold value and draws between frame per second and preview frame per second
Difference be greater than the 4th preset threshold and acquire original image frame resolution ratio be less than half screen resolution when, control
It makes constant for acquiring the resolution ratio of new original image frame.
As an example, the 4th preset threshold is 3 when third predetermined threshold value is 15, preview frame per second is 20 frames, draws frame per second and is
14 frames, screen resolution are 920,000 pixels, when the resolution ratio for acquiring original image frame is 300,000 pixel, draw frame per second 14 less than the
Three preset thresholds 15, and the difference drawn between frame per second and preview frame per second is 6 former greater than the 4th preset threshold 2, and acquisition
300,000 pixel of resolution ratio of beginning picture frame is less than 460,000 pixel of half screen resolution, at this point, acquisition original image frame
Situation is optimum state, does not adjust the resolution ratio for acquiring new original image frame.
Step S10616 reduces the resolution ratio for acquiring new original image frame when meeting six preset conditions;Its
In, the 6th preset condition includes: to draw frame per second to be less than third predetermined threshold value and draw the difference between frame per second and preview frame per second
It is more than or equal to half screen resolution greater than the 4th preset threshold and the resolution ratio for acquiring original image frame.
In some embodiments, when drafting frame per second is less than third predetermined threshold value and draws between frame per second and preview frame per second
Difference be greater than the 4th preset threshold and acquire original image frame resolution ratio be more than or equal to half screen resolution
When, reduce the resolution ratio for acquiring new original image frame, wherein the step-length of resolution ratio in proportion or centainly can be carried out
It reduces.
In some embodiments, when drafting frame per second is less than third predetermined threshold value and draws between frame per second and preview frame per second
Difference be greater than the 4th preset threshold and acquire original image frame resolution ratio be more than or equal to half screen resolution and
When less than screen resolution, for acquiring, the resolution ratio of new original image frame is constant or reduction is for acquiring new original for control
The resolution ratio of beginning picture frame.
As an example, the 4th preset threshold is 3 when third predetermined threshold value is 15, preview frame per second is 20 frames, draws frame per second and is
14 frames, screen resolution are 920,000 pixels, when the resolution ratio for acquiring original image frame is 800,000 pixel, draw frame per second 14 less than the
Three preset thresholds 15, and the difference drawn between frame per second and preview frame per second is 6 former greater than the 4th preset threshold 2, and acquisition
It is 920,000 pixels and the screen resolution 46 for being greater than half that 800,000 pixel of resolution ratio of beginning picture frame, which is less than screen resolution,
Ten thousand pixels, at this point it is possible to not adjust the resolution ratio for acquiring new original image frame or the resolution ratio that original image frame will be acquired
800000 pixels are reduced to 300,000 pixels for acquiring new original image frame.
In some embodiments, when drafting frame per second is less than third predetermined threshold value and draws between frame per second and preview frame per second
Difference be greater than the 4th preset threshold and acquire original image frame resolution ratio be more than or equal to screen resolution when, reduce use
In the resolution ratio for acquiring new original image frame.
As an example, the 4th preset threshold is 3 when third predetermined threshold value is 15, preview frame per second is 20 frames, draws frame per second and is
14 frames, screen resolution are 920,000 pixels, when the resolution ratio for acquiring original image frame is 1,000,000 pixel, draws frame per second 14 and are less than
Third predetermined threshold value 15, and the difference drawn between frame per second and preview frame per second is 6 greater than the 4th preset threshold 2, and acquisition
It is 920,000 pixels that 1,000,000 pixel of resolution ratio of original image frame, which is greater than screen resolution, at this point it is possible to which original image frame will be acquired
1,000,000 pixel of resolution ratio be reduced to 300,000 pixels for acquiring new original image frame.
In some embodiments, the new original image frame optimal value of acquisition that electronic equipment can obtain final adjustment into
Row is local to save or is uploaded to server end, in this case, when starting camera next time, can call or from local from server
Obtain last time adjust resulting optimal value as acquisition original image frame resolution ratio initial value carry out using.
As an example, the electronic equipment of same model or similar model goes to take pictures in same or similar application scenarios
Or when video recording, the optimal resolution value in a period of time be it is stable, therefore, can be from local tune when starting camera next time
Adjusted resulting optimal value with or from server acquisition last time is made as the resolution ratio initial value of acquisition original image frame
With
The above-mentioned difference based between drafting frame per second and preview frame per second is used to acquire new during controlling image preview
The mode of the resolution ratio of original image frame can make the intelligent balance of special effect processing process intermediate-resolution and frame per second, to make
It obtains user's satisfaction when carrying out image preview to reach most preferably, and obtains more good usage experience.
Fig. 2 is the composition schematic diagram for the image processing apparatus 300 that the embodiment of the present disclosure provides, and referring to fig. 2, the disclosure is implemented
Example provide image processing apparatus 300 include:
Acquiring unit, for obtaining collected original image frame during image preview;
Execution unit, for executing special efficacy Rendering operations to the original image frame to obtain special efficacy picture frame, and aobvious
Show that region executes the drafting operation of the special efficacy picture frame;
Detection unit, for detect presented during image preview the original image frame preview frame per second and
The drafting frame per second of the special efficacy picture frame is presented in display area;
Control unit, for according to the difference between the drafting frame per second and the preview frame per second, control described image to be pre-
For acquiring the resolution ratio of new original image frame during looking at.
In some embodiments, the acquiring unit is also used to by calling the application programming interfaces of camera applications to touch
Starting image preview window of sending out camera applications described;By the application programming interfaces, the camera applications are obtained in the figure
As the original image frame acquired in the preview window.
In some embodiments, the execution unit is also used to the detected target object in the original image frame;Institute
The region that the target object is corresponded in original image frame is stated, the special efficacy for executing at least one filter, U.S. face and paster renders behaviour
Make, to obtain the special efficacy picture frame.
In some embodiments, the execution unit is also used to obtain detection during detecting the target object
Frame per second;When the detection frame per second is less than the preview frame per second, based on the difference between the detection frame per second and the preview frame per second
Value carries out frame losing processing to original image frame collected during image preview;Carrying out frame losing, that treated is original
Detected target object in picture frame.
In some embodiments, the execution unit is also used to carry out intermittent to collected original image frame per second
Ground frame losing processing, and the quantity of the original image frame of frame losing per second processing is greater than or equal to the difference;Alternatively, to acquisition per second
The original image frame arrived with carrying out continuity frame losing processing, and the quantity of the original image frame of frame losing per second processing is greater than or equal to
The difference.
In some embodiments, described control unit is also used to based on value, the drafting frame per second for drawing frame per second
Difference between the preview frame per second and acquire original image frame resolution ratio value different situations, described in control
For acquiring the resolution ratio of new original image frame during image preview.
In some embodiments, described control unit is also used to when meeting the first preset condition, and control is described for adopting
The resolution ratio for collecting new original image frame is constant;Wherein, first preset condition includes: that the drafting frame per second is greater than first in advance
If threshold value, the difference drawn between frame per second and the preview frame per second are less than the second preset threshold and acquisition original image
The resolution ratio of frame is more than or equal to the screen resolution;When meeting the second preset condition, improve described for acquiring new original
The resolution ratio of beginning picture frame;Wherein, second preset condition includes: that the drafting frame per second is greater than the first preset threshold, described
The difference drawn between frame per second and the preview frame per second is small less than the resolution ratio of the second preset threshold and acquisition original image frame
In the screen resolution.
In some embodiments, described control unit is also used to when collected original graph during image preview
When being used for video record as frame, also, when meeting the second preset condition;It improves described for acquiring new original image frame
Resolution ratio reduces the code rate of recorded video.
In some embodiments, described control unit is also used to when meeting third preset condition, and control is described for adopting
The resolution ratio for collecting new original image frame is constant;Wherein, the third preset condition includes: that the drafting frame per second is less than or equal to the
One preset threshold and be more than or equal to third predetermined threshold value, the difference drawn between frame per second and the preview frame per second is more than or equal to
Second preset threshold and be less than or equal to the 4th preset threshold and acquire original image frame resolution ratio be more than or equal to half
The screen resolution and be less than the screen resolution;When meeting four preset conditions, reduce described new for acquiring
The resolution ratio of original image frame;Wherein, the 4th preset condition includes: that the drafting frame per second is less than or equal to the first preset threshold
And it is more than or equal to third predetermined threshold value, the difference drawn between frame per second and the preview frame per second more than or equal to the second default threshold
It is worth and is less than or equal to the 4th preset threshold and acquires the resolution ratio of original image frame less than screen resolution described in half
Or it is more than or equal to the screen resolution.
In some embodiments, described control unit is also used to when meeting five preset conditions, and control is described for adopting
The resolution ratio for collecting new original image frame is constant;Wherein, the 5th preset condition includes: that the drafting frame per second is pre- less than third
If threshold value, the difference drawn between frame per second and the preview frame per second are greater than the 4th preset threshold and acquisition original image
The resolution ratio of frame is less than screen resolution described in half;When meeting six preset conditions, reduce described new for acquiring
Original image frame resolution ratio;Wherein, the 6th preset condition include: the drafting frame per second be less than third predetermined threshold value,
The difference drawn between frame per second and the preview frame per second is greater than the 4th preset threshold and acquires the resolution of original image frame
Rate is more than or equal to screen resolution described in half.
The embodiment of the present disclosure provides a kind of electronic equipment, comprising:
Memory, for storing executable instruction;
Processor, when for executing the executable instruction, the method for the image procossing that the realization embodiment of the present disclosure provides.
The embodiment of the present disclosure provides a kind of storage medium, is stored with executable instruction, and the executable instruction is performed
When, for realizing the method for the image procossing that the embodiment of the present disclosure provides.
According to one or more other embodiments of the present disclosure, the embodiment of the present disclosure provides a kind of image processing method, comprising:
Obtain collected original image frame during image preview;
Special efficacy Rendering operations are executed to obtain special efficacy picture frame to the original image frame, and described in executing in display area
The drafting of special efficacy picture frame operates;
It detects and is presented in preview frame per second and display area that the original image frame is presented during image preview
The drafting frame per second of the special efficacy picture frame;
Based on the difference between the drafting frame per second and the preview frame per second, it is used for during controlling described image preview
Acquire the resolution ratio of new original image frame.
According to one or more other embodiments of the present disclosure, the embodiment of the present disclosure provides a kind of image processing method, also wraps
It includes:
Acquisition collected original image frame during image preview, comprising:
Start image preview window by calling the application programming interfaces of camera applications to trigger the camera applications;
By the application programming interfaces, the original graph that the camera applications acquire in described image the preview window is obtained
As frame.
According to one or more other embodiments of the present disclosure, the embodiment of the present disclosure provides a kind of image processing method, also wraps
It includes:
It is described that special efficacy Rendering operations are executed to obtain special efficacy picture frame to the original image frame, comprising:
The detected target object in the original image frame;
The region of the target object is corresponded in the original image frame, executes filter, U.S. at least one face and paster
Special efficacy Rendering operations, to obtain the special efficacy picture frame.
According to one or more other embodiments of the present disclosure, the embodiment of the present disclosure provides a kind of image processing method, also wraps
It includes:
The detected target object in the original image frame, comprising:
Obtain detection frame per second during detecting the target object;
When the detection frame per second is less than the preview frame per second, based between the detection frame per second and the preview frame per second
Difference carries out frame losing processing to original image frame collected during image preview;
The detected target object in carrying out frame losing treated original image frame.
According to one or more other embodiments of the present disclosure, the embodiment of the present disclosure provides a kind of image processing method, also wraps
It includes:
The difference based between the detection frame per second and the preview frame per second, carries out collected original image frame
Frame losing processing, comprising:
The processing of frame losing at intervals, and the original image of frame losing per second processing are carried out to collected original image frame per second
The quantity of frame is greater than or equal to the difference;
Alternatively,
To collected original image frame per second with carrying out continuity frame losing processing, and the original image that frame losing per second is handled
The quantity of frame is greater than or equal to the difference.
According to one or more other embodiments of the present disclosure, the embodiment of the present disclosure provides a kind of image processing method, also wraps
It includes:
The difference based between the drafting frame per second and the preview frame per second, during controlling described image preview
For acquiring the resolution ratio of new original image frame, comprising:
Based on the value for drawing frame per second and the difference drawn between frame per second and the preview frame per second and
The different situations of the value of the resolution ratio of original image frame are acquired, are used to acquire new original during controlling described image preview
The resolution ratio of beginning picture frame.
According to one or more other embodiments of the present disclosure, the embodiment of the present disclosure provides a kind of image processing method, also wraps
It includes:
The difference based between the value for drawing frame per second and the drafting frame per second and the preview frame per second,
And the different situations of the value of the resolution ratio of acquisition original image frame, it is used to acquire during controlling described image preview new
Original image frame resolution ratio, comprising:
When meeting the first preset condition, the control resolution ratio for acquiring new original image frame is constant;
Wherein, first preset condition includes: that the drafting frame per second is greater than the first preset threshold and the drawing frames
Difference between rate and the preview frame per second is more than or equal to less than the resolution ratio of the second preset threshold and acquisition original image frame
The screen resolution;
When meeting the second preset condition, improve described for acquiring the resolution ratio of new original image frame;
Wherein, second preset condition includes: that the drafting frame per second is greater than the first preset threshold and the drawing frames
Difference between rate and the preview frame per second less than the second preset threshold and acquires the resolution ratio of original image frame less than described
Screen resolution.
According to one or more other embodiments of the present disclosure, the embodiment of the present disclosure provides a kind of image processing method, also wraps
It includes:
When original image frame collected during image preview is used for video record,
Also, when meeting the second preset condition;
The resolution ratio for being used to acquire new original image frame is improved, the code rate of recorded video is reduced.
According to one or more other embodiments of the present disclosure, the embodiment of the present disclosure provides a kind of image processing method, also wraps
It includes:
The difference based between the value for drawing frame per second and the drafting frame per second and the preview frame per second,
And the different situations of the value of the resolution ratio of acquisition original image frame, it is used to acquire during controlling described image preview new
Original image frame resolution ratio, comprising:
When meeting third preset condition, the control resolution ratio for acquiring new original image frame is constant;
Wherein, the third preset condition includes: that the drafting frame per second is less than or equal to the first preset threshold and is more than or equal to
Third predetermined threshold value and the difference drawn between frame per second and the preview frame per second are more than or equal to the second preset threshold and small
In be equal to the 4th preset threshold and acquire original image frame resolution ratio be more than or equal to half described in screen resolution and
Less than the screen resolution;
When meeting four preset conditions, reduce described for acquiring the resolution ratio of new original image frame;
Wherein, the 4th preset condition includes: that the drafting frame per second is less than or equal to the first preset threshold and is more than or equal to
Third predetermined threshold value and the difference drawn between frame per second and the preview frame per second are more than or equal to the second preset threshold and small
It is less than screen resolution described in half in the resolution ratio for being equal to the 4th preset threshold and acquisition original image frame or is greater than
Equal to the screen resolution.
According to one or more other embodiments of the present disclosure, the embodiment of the present disclosure provides a kind of image processing method, also wraps
It includes:
The difference based between the value for drawing frame per second and the drafting frame per second and the preview frame per second,
And the different situations of the value of the resolution ratio of acquisition original image frame, it is used to acquire during controlling described image preview new
Original image frame resolution ratio, comprising:
When meeting five preset conditions, the control resolution ratio for acquiring new original image frame is constant;
Wherein, the 5th preset condition includes: that the drafting frame per second is less than third predetermined threshold value and the drawing frames
Difference between rate and the preview frame per second is greater than the 4th preset threshold and acquires the resolution ratio of original image frame less than two points
One of described in screen resolution;
When meeting six preset conditions, reduce described for acquiring the resolution ratio of new original image frame;
Wherein, the 6th preset condition includes: that the drafting frame per second is less than third predetermined threshold value and the drawing frames
Difference between rate and the preview frame per second is greater than the 4th preset threshold and the resolution ratio of acquisition original image frame is more than or equal to
Screen resolution described in half.
According to one or more other embodiments of the present disclosure, the embodiment of the present disclosure provides a kind of image processing apparatus, also wraps
It includes:
Acquiring unit, for obtaining collected original image frame during image preview;
Execution unit, for executing special efficacy Rendering operations to the original image frame to obtain special efficacy picture frame, and aobvious
Show that region executes the drafting operation of the special efficacy picture frame;
Detection unit, for detect presented during image preview the original image frame preview frame per second and
The drafting frame per second of the special efficacy picture frame is presented in display area;
Control unit, for according to the difference between the drafting frame per second and the preview frame per second, control described image to be pre-
For acquiring the resolution ratio of new original image frame during looking at.
Above description is only embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art answer
Work as understanding, the open scope involved in the disclosure, however it is not limited to technical solution made of the specific combination of above-mentioned technical characteristic,
It should also cover in the case where not departing from design disclosed above simultaneously, carry out any group by above-mentioned technical characteristic or its equivalent feature
The other technical solutions closed and formed.Such as the skill of (but being not limited to) with similar functions disclosed in features described above and the disclosure
Art feature is replaced mutually and the technical solution that is formed.
Although this is not construed as requiring these operations with institute in addition, depicting each operation using certain order
The certain order that shows executes in sequential order to execute.Under certain environment, multitask and parallel processing may be advantageous
's.Similarly, although containing several specific implementation details in being discussed above, these are not construed as to this public affairs
The limitation for the range opened.Certain features described in the context of individual embodiment can also be realized in combination single real
It applies in example.On the contrary, the various features described in the context of single embodiment can also be individually or with any suitable
The mode of sub-portfolio is realized in various embodiments.
Although having used specific to this theme of the language description of structure feature and/or method logical action, answer
When understanding that theme defined in the appended claims is not necessarily limited to special characteristic described above or movement.On on the contrary,
Special characteristic described in face and movement are only to realize the exemplary forms of claims.