Detailed description of the invention
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, completeDescribe, it is clear that described embodiment is a part of embodiment of the present invention rather than whole embodiments wholely.Based on thisEmbodiment in bright, the every other enforcement that those of ordinary skill in the art are obtained under not making creative work premiseExample, broadly falls into the scope of protection of the invention.
Should be appreciated that when using in this specification and in the appended claims, term " includes " and " comprising " instructionDescribed feature, entirety, step, operation, element and/or the existence of assembly, but it is not precluded from one or more further feature, wholeBody, step, operation, element, assembly and/or the existence of its set or interpolation.
It is also understood that the term used in this description of the invention is merely for the sake of the mesh describing specific embodimentAnd be not intended to limit the present invention.As used in description of the invention and appended claims, unless onHereafter clearly indicating other situation, otherwise " ", " " and " being somebody's turn to do " of singulative is intended to include plural form.
It will be further appreciated that, the term "and/or" used in description of the invention and appended claims isRefer to the one or more any combination being associated in the item listed and likely combine, and including that these combine.
As used in this specification and in the appended claims, term " if " can be according to context quiltBe construed to " when ... " or " once " or " in response to determining " or " in response to detecting ".Similarly, phrase is " if reallyFixed " or " if be detected that [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " ringShould be in determining " or " [described condition or event] once being detected " or " in response to [described condition or event] being detected ".
In implementing, the terminal described in the embodiment of the present invention includes but not limited to such as have touch sensitive surfaceMobile phone, laptop computer or the tablet PC of (such as, touch-screen display and/or touch pad) etc other justPortable device.It is to be further understood that in certain embodiments, described equipment not portable communication device, but have tactileTouch the desk computer of sensing surface (such as, touch-screen display and/or touch pad).
In discussion below, describe the terminal including display and touch sensitive surface.It is, however, to be understood thatIt is that terminal can include such as physical keyboard, mouse and/or control other physical user-interface device one or more of bar.
Terminal supports various application programs, such as following in one or more: drawing application program, demonstration application journeySequence, word-processing application, website create application program, dish imprinting application program, spreadsheet applications, game applicationProgram, telephony application, videoconference application, email application, instant messaging applications, exerciseSupport the application of application program, photo management application program, digital camera application program, digital camera application program, web-browsingProgram, digital music player application and/or video frequency player application program.
The various application programs that can perform in terminal can use at least one of such as touch sensitive surface publicPhysical user-interface device.Among applications and/or can adjust in corresponding application programs and/or change and touch sensitive tableThe corresponding information of display in one or more functions in face and terminal.So, the public physical structure of terminal (such as, touchesSensing surface) the various application programs with the most directly perceived and transparent user interface can be supported.
See accompanying drawing 1, be a kind of exemplary flow of the processing method of preview screen when shooting of providing of the embodiment of the present inventionFigure.In the present embodiment, during shooting, the executive agent of the processing method of preview screen can be the terminal with shoot function, such as,Smart mobile phone, panel computer etc..During shooting, the processing method of preview screen can comprise the following steps S101 extremely as shown in Figure 1S103, describes in detail as follows:
S101, carries out Fuzzy processing to preview screen and obtains blurred picture.
With the mobile terminal of display screen, finding a view for the ease of user's shooting, its camera typically all can be carried out after startingLive preview, and when switching screening-mode, such as, exposal model switch to RECORD mode or cut by zero propagation exposal modelShifting to non-zero propagation exposal model, or change the parameters such as preview ratio, such as preview ratio changes from 4:3 and can stop to during 16:9Only preview.In embodiments of the present invention, preview screen is acquired in a flash before can being when stopping preview or stopping previewPreview screen, and to when stopping preview or the preview screen that stops obtaining in a flash before preview carries out Fuzzy processing and obtainsBlurred picture.
As one embodiment of the invention, preview screen carrying out Fuzzy processing and obtains blurred picture can be to describedPreview screen carries out box Fuzzy Processing at least one times and obtains blurred picture.Box fuzzy (box filter) is also called average mouldSticking with paste, speed that it has time algorithm speed is fast, blur size is big does not declines and can be with advantages such as O (1) complexity realizations, such as,When described preview screen is carried out twice box Fuzzy Processing, it is possible to make algorithm closer to the blur effect of Gaussian Blur,Picture looks more natural.In embodiments of the present invention, it is possible to use OpenCV increases income in machine vision algorithm storehouseBoxfilter function realizes box and obscures.It should be noted that in embodiments of the present invention, however it is not limited to use box to obscurePreview screen is processed, it is also possible to use bilateral fuzzy, Gaussian Blur that OpenCV increases income in machine vision algorithm storehouse andThe fuzzy algorithmic approaches such as intermediate value is fuzzy obtain blurred picture to preview screen is carried out process.
Specifically, preview screen carries out box Fuzzy Processing at least one times obtaining blurred picture can be at least one timesEach box during box is fuzzy is fuzzy all carries out a sub-level average Fuzzy Processing and once vertically average Fuzzy Processing obtainsDescribed blurred picture.Why carry out at least one times, such as, twice box Fuzzy Processing, and every time box is fuzzy all carries outOne sub-level average Fuzzy Processing and once vertical average Fuzzy Processing, allowing for this processing mode has plurality of advantages, exampleAs, caching can be optimized, internal storage access is more continuous, and the hit rate that buffering prefetches data is higher, reduces the CPU waiting time;By waterFlat-die is stuck with paste and is separated analysis with vertical obscuring, and uses rolling calculation, greatly reduces and process the DDR access times that a pixel needs,Thus shorten the process time, and make the complexity of algorithm unrelated with blur radius;Using ARM NEON instruction, single instrction is manyData, an instruction processes 8 pixels simultaneously, and treatment effeciency is high;Using multithreading to realize multi-core parallel concurrent to calculate, raising processes speedDegree, etc..
S102, fades to the opaquest by being set to fully transparent blurred picture control, wherein, and fully transparent mouldSticking with paste picture control corresponding with blurred picture, fully transparent blurred picture control is covered in the preview control that preview screen is correspondingOn.
In image processing field, picture category control shows the setting depending on transparency parameter, and transparency parameter is used for tableShow the degree that this control is transparent.Such as, when certain control being set to fully transparent, it is meant that user can't see this control, andCan only see the control under this control;For another example, certain control is set to complete opaque time, it is meant that this control is to userFully visible, but user can't see the control under this control, etc..In embodiments of the present invention, when being set to the most thoroughlyBright blurred picture control fades to the opaquest and when being covered on the preview control that preview screen is corresponding, preview control pairThe preview screen answered is become the most invisible to user by fully visible, and this process is process rather than the sudden change of gradual changeProcess, from the experience bad without cause the user.
S103, gradual change fully opaque blurred picture control is to fully transparent so that the preview screen after renewal is graduallyDisplay.
In embodiments of the present invention, when carrying out the processing procedure of step S101 to S103, preview screen is also constantly becomingChange and i.e. update.As it was previously stated, control becomes fully transparent, it is meant that user can't see this control, and can only see this control itUnder control.Therefore, the preview after updating when covering the blurred picture control on preview control and being changed to fully transparentPicture can show.Similarly, it is the process of a gradual change owing to blurred picture control becomes fully transparent, therefore, preview screenRenewal will not the bad experience of cause the user.
When the shooting that above-mentioned accompanying drawing 1 example provides knowable to the processing method of preview screen, blurred picture control is by completelyTransparent become the opaquest and to eventually become fully transparent be all the process of a gradual change by the opaquest, and, mouldStick with paste picture control by fully transparent fade to fully opaque during be covered on preview control, therefore, previewThe renewal of picture alleviates pause, the sensation suddenlyd change or deform to user, and whole process becomes more to smooth so that Yong HuDuring shooting, the experience of preview becomes more preferable.
See accompanying drawing 2, the exemplary flow of the processing method of preview screen when being the shooting of another embodiment of the present invention offerFigure.In the present embodiment, during shooting, the executive agent of the processing method of preview screen can be the terminal with shoot function, such as,Smart mobile phone, panel computer etc..During shooting, the processing method of preview screen can comprise the following steps S201 extremely as shown in Figure 2S206, describes in detail as follows:
S201, carries out Fuzzy processing to preview screen and obtains blurred picture.
With the mobile terminal of display screen, finding a view for the ease of user's shooting, its camera typically all can be carried out after startingLive preview, and when switching screening-mode, such as, exposal model switch to RECORD mode or cut by zero propagation exposal modelShifting to non-zero propagation exposal model, or change the parameters such as preview ratio, such as preview ratio changes from 4:3 and can stop to during 16:9Only preview.In embodiments of the present invention, preview screen is acquired in a flash before can being when stopping preview or stopping previewPreview screen, and to when stopping preview or the preview screen that stops obtaining in a flash before preview carries out Fuzzy processing and obtainsBlurred picture.
As one embodiment of the invention, preview screen carrying out Fuzzy processing and obtains blurred picture can be to describedPreview screen carries out box Fuzzy Processing at least one times and obtains blurred picture.
Box fuzzy (box filter) is also called average and obscures, speed time algorithm speed is fast, blur size is big that it hasDo not decline and can be with advantages such as O (1) complexity realizations, such as, when described preview screen being carried out twice box Fuzzy ProcessingTime, it is possible to making algorithm closer to the blur effect of Gaussian Blur, picture looks more natural.In embodiments of the present invention, may be usedWith use OpenCV increase income the boxfilter function in machine vision algorithm storehouse realize box obscure.It should be noted that at thisIn inventive embodiments, however it is not limited to use that box is fuzzy to be processed preview screen, it is also possible to use OpenCV to increase income machineBilateral fuzzy, Gaussian Blur in vision algorithm storehouse and the fuzzy algorithmic approach such as intermediate value is fuzzy obtain mould to preview screen is carried out processStick with paste picture.
Specifically, preview screen carries out box Fuzzy Processing at least one times obtaining blurred picture can be at least one timesEach box during box is fuzzy is fuzzy all carries out a sub-level average Fuzzy Processing and once vertically average Fuzzy Processing obtainsDescribed blurred picture.Why carry out at least one times, such as, twice box Fuzzy Processing, and every time box is fuzzy all carries outOne sub-level average Fuzzy Processing and once vertical average Fuzzy Processing, allowing for this processing mode has plurality of advantages, exampleAs, caching can be optimized, internal storage access is more continuous, and the hit rate that buffering prefetches data is higher, reduces the CPU waiting time;By waterFlat-die is stuck with paste and is separated analysis with vertical obscuring, and uses rolling calculation, greatly reduces and process the DDR (Double that a pixel needsData Rate, Double Data Rate synchronous DRAM) access times, thus shorten the process time, and make algorithmComplexity is unrelated with blur radius;Using ARM NEON instruction, single-instruction multiple-data, an instruction processes 8 pixels, place simultaneouslyReason efficiency is high;Use multithreading to realize multi-core parallel concurrent to calculate, improve processing speed, etc., NEON technology is ARM Cortex-A128 SIMD (single-instruction multiple-data) architecture extensions of series processors, it is intended to provide more powerful for multimedia applicationAcceleration function, thus be obviously improved program feature.
S202, fades to the opaquest by being set to fully transparent blurred picture control, wherein, and fully transparent mouldSticking with paste picture control corresponding with blurred picture, fully transparent blurred picture control is covered in the preview control that preview screen is correspondingOn.
In image processing field, picture category control shows the setting depending on transparency parameter, and transparency parameter is used for tableShow the degree that this control is transparent.Such as, when certain control being set to fully transparent, it is meant that user can't see this control, andCan only see the control under this control;For another example, certain control is set to complete opaque time, it is meant that this control is to userFully visible, but user can't see the control under this control, etc..In embodiments of the present invention, when being set to the most thoroughlyBright blurred picture control fades to the opaquest and when being covered on the preview control that preview screen is corresponding, preview control pairThe preview screen answered is become the most invisible to user by fully visible, and this process is process rather than the sudden change of gradual changeProcess, from the experience bad without cause the user.
S203, it is fully transparent for arranging preview control.
In embodiments of the present invention, during owing to being set to fully transparent by preview control, this preview control will not to userVisible, therefore, follow-up when zoom in and out it, move etc. operates, user also can't see.
S204, moves to new preview area by fully opaque blurred picture control and fully transparent preview control.
Specifically, in embodiments of the present invention, by fully opaque blurred picture control and fully transparent preview controlPart move to new preview area may is that gradually scale fully opaque blurred picture control and gradually scaling or quickly contractDischarge the preview control of all-transparent, by preview control fully transparent after fully opaque blurred picture control after scaling and scalingPart moves to new preview area, and herein, blurred picture control, preview control and preview area are same big according to zooming in proportionLittle, such as, all it is amplified to 16:9 with 4:3.
It should be noted that owing to fully opaque blurred picture control is to cover on preview control, in order toThe lofty sense of cause the user when alleviating change, in embodiments of the present invention, fully opaque blurred picture control is at scalingTime gradually scale, and preview control is under blurred picture control, therefore, its process scaled is not done requirement, canBeing gradually to scale, it is also possible to be quick scaling, even suddenly change.
S205, sets up the preview control of all-transparent for the opaquest.
Preview control become be set to the opaquest, it is meant that as long as on it not controlled member cover or it on covering beFully transparent control, then this preview control is visible to user.
S206, gradual change fully opaque blurred picture control is to fully transparent so that the preview screen after renewal is graduallyDisplay.
In embodiments of the present invention, when carrying out the processing procedure of step S201 to S205, preview screen is also constantly becomingChange and i.e. update.As it was previously stated, control becomes fully transparent, it is meant that user can't see this control, and can only see this control itUnder control.Therefore, the preview after updating when covering the blurred picture control on preview control and being changed to fully transparentPicture can show.Similarly, it is the process of a gradual change owing to blurred picture control becomes fully transparent, therefore, preview screenRenewal will not the bad experience of cause the user.
When the shooting that above-mentioned accompanying drawing 2 example provides knowable to the processing method of preview screen, blurred picture control is by completelyTransparent become the opaquest and to eventually become fully transparent be all the process of a gradual change by the opaquest, and, mouldStick with paste picture control by fully transparent fade to fully opaque during be covered on preview control, therefore, previewThe renewal of picture alleviates pause, the sensation suddenlyd change or deform to user, and whole process becomes more to smooth so that Yong HuDuring shooting, the experience of preview becomes more preferable.
See accompanying drawing 3, be the schematic block diagram of a kind of terminal that the embodiment of the present invention provides.Terminal can be that band shoots meritThe smart mobile phone of energy, panel computer etc., but it is not limited to this, it is also possible to for other-end, do not limit.The present embodimentThe each module that terminal includes each step in the embodiment performing accompanying drawing 1 or accompanying drawing 2 correspondence, specifically refer to accompanying drawing 1 orAssociated description in the embodiment of accompanying drawing 2 and accompanying drawing 1 or accompanying drawing 2 correspondence, does not repeats.The terminal of the present embodiment includes mouldGelatinizing unit the 301, first control gradual change unit 302 and the second control gradual change unit 303, wherein:
Fuzzier unit 301, obtains blurred picture for preview screen is carried out Fuzzy processing;
First control gradual change unit 302, for fading to the most impermeable by being set to fully transparent blurred picture controlBright, wherein, fully transparent blurred picture control is corresponding with described blurred picture, and fully transparent blurred picture control is covered inOn the preview control that preview screen is corresponding;
Second control gradual change unit 303, for gradual change fully opaque blurred picture control to fully transparent so that morePreview screen after Xin gradually shows.
The terminal of accompanying drawing 3 example can also include first arranging unit 401, moving unit 402 and second and arrange unit403, the terminal that the embodiment of the present invention four provides as shown in Figure 4, wherein:
First arranges unit 401, will be set to fully transparent blurred picture control for the first control gradual change unit 302Fade to the opaquest before, it is fully transparent for arranging preview control;
Move unit 402, for fully opaque blurred picture control and fully transparent preview control being moved to newlyPreview area;
Second arranges unit 403, for setting up the preview control of all-transparent for the opaquest.
The moving unit 402 and can include unit for scaling 501 and control mobile unit 502, such as accompanying drawing 5 institute of accompanying drawing 4 exampleShow the terminal that the embodiment of the present invention five provides, wherein:
Unit for scaling 501, for gradually scaling fully opaque blurred picture control and gradually scaling or quickly contractDischarge the preview control of all-transparent;
Control mobile unit 502, for by fully transparent after fully opaque blurred picture control after scaling and scalingPreview control move to new preview area.
It should be noted that in the present embodiment, blurred picture control, preview control and preview area are according to contracting in proportionPut to onesize.
The fuzzier unit 301 of accompanying drawing 3 to accompanying drawing 5 any example can include box blur unit 601, such as accompanying drawing 6-aThe terminal provided to the embodiment of the present invention six to eight shown in accompanying drawing 6-c.Box blur unit 601 for preview screen is carried out toA few box Fuzzy Processing obtains blurred picture.
Accompanying drawing 6-a can include average blur unit 701 to the box blur unit 601 of accompanying drawing 6-c any example, as attachedThe terminal that Fig. 7-a provides to the embodiment of the present invention nine to ten one shown in accompanying drawing 7-c.Average blur unit 701 is at least oneEach box during secondary box is fuzzy is fuzzy all carries out a sub-level average Fuzzy Processing and once vertically average Fuzzy Processing obtainsTo described blurred picture.
See Fig. 8, be a kind of terminal schematic block diagram of another embodiment of the present invention offer.In the present embodiment as depictedTerminal may include that one or more processor 801;One or more input equipments 802, one or more outut devices803 and memorizer 804.Above-mentioned processor 801, input equipment 802, outut device 803 and memorizer 804 are by bus 805 evenConnect.
Memorizer 804 is used for storing programmed instruction.
Processor 801 is for performing following operation according to the programmed instruction of memorizer 804 storage: preview screen is carried out mouldGelatinizing processes and obtains blurred picture;Fade to the opaquest by being set to fully transparent blurred picture control, described completelyTransparent blurred picture control is corresponding with described blurred picture, and described fully transparent blurred picture control is covered in described previewOn the preview control that picture is corresponding;Fully opaque blurred picture control described in gradual change is to fully transparent so that after renewalPreview screen gradually shows.
Further, processor 801 is additionally operable to be set to fully transparent blurred picture control and fades to the opaquestBefore, it is fully transparent for arranging described preview control, by described fully opaque blurred picture control and described fully transparentPreview control move to new preview area, described fully transparent preview control is set for the opaquest.
Further, processor 801 is additionally operable to gradually to scale described fully opaque blurred picture control and graduallyScaling or the quickly described fully transparent preview control of scaling, by blurred picture control fully opaque after described scaling and institutePreview control fully transparent after stating scaling moves to new preview area, and blurred picture control, preview control and preview area are pressedOnesize according to zooming in proportion.
Further, processor 801 is additionally operable to described preview screen and carries out box Fuzzy Processing at least one times and obtain describedBlurred picture.
Further, processor 801 is additionally operable to all carry out once each box in fuzzy of the box at least one times is fuzzyHorizontal average Fuzzy Processing and once vertical average Fuzzy Processing obtain described blurred picture.
Should be appreciated that in embodiments of the present invention, alleged processor 801 can be CPU (CentralProcessing Unit, CPU), this processor can also is that other general processors, digital signal processor (DigitalSignal Processor, DSP), special IC (Application Specific Integrated Circuit,ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other FPGAsDevice, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this atReason device can also be the processor etc. of any routine.
Input equipment 802 can include that Trackpad, fingerprint adopt sensor (for gathering the finger print information of user and fingerprintDirectional information), mike etc., outut device 803 can include display (LCD etc.), speaker etc..
This memorizer 804 can include read only memory and random access memory, and to processor 801 provide instruction andData.A part for memorizer 804 can also include nonvolatile RAM.Such as, memorizer 804 can also be depositedThe information of storage device type.
In implementing, processor 801, input equipment 802 and outut device 803 described in the embodiment of the present invention canPerform the first embodiment of processing method of preview screen during the shooting that the embodiment of the present invention provides and the second embodiment are retouchedThe implementation stated, it is possible to the implementation of execution terminal described by the embodiment of the present invention, does not repeats them here.
Those of ordinary skill in the art are it is to be appreciated that combine the list of each example that the embodiments described herein describesUnit and algorithm steps, it is possible to electronic hardware, computer software or the two be implemented in combination in, in order to clearly demonstrate hardwareWith the interchangeability of software, the most generally describe composition and the step of each example according to function.ThisA little functions perform with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.SpeciallyIndustry technical staff can use different methods to realize described function to each specifically should being used for, but this realization is notIt is considered as beyond the scope of this invention.
Those skilled in the art is it can be understood that arrive, for convenience of description and succinctly, and the end of foregoing descriptionEnd and the specific works process of unit, be referred to the corresponding process in preceding method embodiment, do not repeat them here.
In several embodiments provided herein, it should be understood that disclosed terminal and method, can be passed through itIts mode realizes.Such as, device embodiment described above is only schematically, such as, and the division of described unit, onlyBeing only a kind of logic function to divide, actual can have other dividing mode, the most multiple unit or assembly to tie when realizingClose or be desirably integrated into another system, or some features can be ignored, or not performing.It addition, shown or discussed phaseCoupling between Hu or direct-coupling or communication connection can be the INDIRECT COUPLING by some interfaces, device or unit or communicationConnect, it is also possible to be electric, machinery or other form connect.
Step in embodiment of the present invention method can carry out order according to actual needs and adjust, merges and delete.
Unit in embodiment of the present invention terminal can merge according to actual needs, divides and delete.
The described unit illustrated as separating component can be or may not be physically separate, shows as unitThe parts shown can be or may not be physical location, i.e. may be located at a place, or can also be distributed to multipleOn NE.Some or all of unit therein can be selected according to the actual needs to realize embodiment of the present invention schemePurpose.
It addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it is also possible toIt is that unit is individually physically present, it is also possible to be that two or more unit are integrated in a unit.Above-mentioned integratedUnit both can realize to use the form of hardware, it would however also be possible to employ the form of SFU software functional unit realizes.
If described integrated unit realizes and as independent production marketing or use using the form of SFU software functional unitTime, can be stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantiallyThe part in other words prior art contributed, or this technical scheme completely or partially can be with the form of software productEmbodying, this computer software product is stored in a storage medium, including some instructions with so that a computerEquipment (can be personal computer, server, or the network equipment etc.) performs the complete of method described in each embodiment of the present inventionPortion or part steps.And aforesaid storage medium includes: USB flash disk, portable hard drive, read only memory (ROM, Read-OnlyMemory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journeyThe medium of sequence code.
The above, the only detailed description of the invention of the present invention, but protection scope of the present invention is not limited thereto, and anyThose familiar with the art, in the technical scope that the invention discloses, can readily occur in the amendment of various equivalence or replaceChanging, these amendments or replacement all should be contained within protection scope of the present invention.Therefore, protection scope of the present invention should be with rightThe protection domain required is as the criterion.