CN109035191A - Image processing method, picture processing unit and terminal device - Google Patents

Image processing method, picture processing unit and terminal device Download PDF

Info

Publication number
CN109035191A
CN109035191A CN201810863980.6A CN201810863980A CN109035191A CN 109035191 A CN109035191 A CN 109035191A CN 201810863980 A CN201810863980 A CN 201810863980A CN 109035191 A CN109035191 A CN 109035191A
Authority
CN
China
Prior art keywords
picture
region
sent
preset condition
camera
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810863980.6A
Other languages
Chinese (zh)
Inventor
郭雄伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN201810863980.6A priority Critical patent/CN109035191A/en
Publication of CN109035191A publication Critical patent/CN109035191A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Abstract

The application is suitable for technical field of image processing, provides image processing method, picture processing unit and terminal device, comprising: whether the front camera and rear camera for detecting mobile terminal are switched on, and the number of rear camera is equal to 2;If front camera and rear camera are switched on, detect in the picture of rear camera transmission with the presence or absence of the region for meeting the first preset condition;If there is the region for meeting the first preset condition in the picture that rear camera is sent, the region of same size is intercepted from the picture that front camera is sent according to the size in the region for meeting the first preset condition;The region for meeting the first preset condition present in the picture that the fusion of the region of the same size intercepted from the picture that front camera is sent is sent in rear camera, the picture that obtains that treated;In the preview interface picture that shows that treated.The picture material for the fused picture for enabling to preview interface to show by the above method is more terse.

Description

Image processing method, picture processing unit and terminal device
Technical field
The application belongs to technical field of image processing more particularly to image processing method, picture processing unit, terminal device And computer readable storage medium.
Background technique
Current mobile terminal (such as mobile phone, tablet computer) usually has front camera and rear camera.
Front camera is mainly used for the self-timer of user, and rear camera is mainly used for shooting other things.But either By front camera shoot or by rear camera shoot, in same primary shooting, all only enabling front camera or Only enable rear camera.
But in a practical situation, user may want to the figure of the picture for shooting front camera and rear camera shooting Piece is all embodied on same picture.
Therefore, it is necessary to a kind of new technical solution is provided, to solve the above problems.
Summary of the invention
In view of this, the embodiment of the present application provides image processing method, picture processing unit and terminal device, to solve It is difficult on a picture in the prior art while embodying the picture of front camera shooting and the picture of rear camera shooting The problem of.
The first aspect of the embodiment of the present application provides a kind of image processing method, comprising:
Whether the front camera and rear camera for detecting mobile terminal are switched on, the number etc. of the rear camera In 2;
If front camera and rear camera are switched on, detect and whether deposited in the picture that the rear camera is sent In the region for meeting the first preset condition;
If there is the region for meeting the first preset condition in the picture that the rear camera is sent, according to the satisfaction The size in the region of the first preset condition intercepts the region of same size from the picture that front camera is sent;
The region fusion of the same size intercepted from the picture that front camera is sent is imaged in the postposition The region for meeting the first preset condition present in the picture that hair is sent, the picture that obtains that treated;
Treated the picture is shown in preview interface.
The second aspect of the embodiment of the present application provides a kind of picture processing unit, comprising:
Whether camera open detection unit, front camera and rear camera for detecting mobile terminal are all opened It opens, the number of the rear camera is equal to 2;
Region detection unit detects the rear camera if being switched on for front camera and rear camera With the presence or absence of the region for meeting the first preset condition in the picture of transmission;
Picture interception unit, if there is the area for meeting the first preset condition in the picture sent for the rear camera Domain then intercepts same size from the picture that front camera is sent according to the size in the region for meeting the first preset condition Region;
Picture integrated unit, for melting the region of the same size intercepted from the picture that front camera is sent The region for meeting the first preset condition present in the picture sent in the rear camera is closed, the picture that obtains that treated;
Preview picture unit, for treated picture described in show in preview interface.
The third aspect of the embodiment of the present application provides a kind of terminal device, including memory, processor and is stored in In the memory and the computer program that can run on the processor, when the processor executes the computer program It realizes such as the step of the image processing method.
The fourth aspect of the embodiment of the present application provides a kind of computer readable storage medium, the computer-readable storage Media storage has computer program, and the step such as the image processing method is realized when the computer program is executed by processor Suddenly.
Existing beneficial effect is the embodiment of the present application compared with prior art:
Due to in shooting process, while starting front camera and rear camera, it therefore, can be in preview Interface obtains the picture that front camera and rear camera are sent, also, the figure due to will send from front camera simultaneously Meet the first preset condition present in the picture that the region fusion of the same size intercepted in piece is sent in rear camera Region, therefore, so that the picture material for the fused picture that preview interface is shown is more terse.
Detailed description of the invention
It in order to more clearly explain the technical solutions in the embodiments of the present application, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only some of the application Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is the flow chart for the first image processing method that the embodiment of the present application one provides;
Fig. 2 is the flow chart for second of image processing method that the embodiment of the present application two provides;
Fig. 3 is the flow chart for the third image processing method that the embodiment of the present application three provides;
Fig. 4 A, Fig. 4 B, Fig. 4 C, Fig. 4 D are that the fusion front camera that the embodiment of the present application three provides and rear camera obtain The process schematic of the picture taken;
Fig. 5 is a kind of schematic diagram in preview interface display fusion picture that the embodiment of the present application three provides;
Fig. 6 is a kind of structural schematic diagram for picture processing unit that the embodiment of the present application four provides;
Fig. 7 is the schematic diagram for the terminal device that the embodiment of the present application five provides.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, so as to provide a thorough understanding of the present application embodiment.However, it will be clear to one skilled in the art that there is no these specific The application also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, so as not to obscure the description of the present application with unnecessary details.
In order to illustrate technical solution described herein, the following is a description of specific embodiments.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " instruction is described special Sign, entirety, step, operation, the presence of element and/or component, but be not precluded one or more of the other feature, entirety, step, Operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this present specification merely for the sake of description specific embodiment And be not intended to limit the application.As present specification and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in present specification and the appended claims is Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt Be construed to " when ... " or " once " or " in response to determination " or " in response to detecting ".Similarly, phrase " if it is determined that " or " if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to true It is fixed " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
In the specific implementation, mobile terminal described in the embodiment of the present application is including but not limited to such as with the sensitive table of touch Mobile phone, laptop computer or the tablet computer in face (for example, touch-screen display and/or touch tablet) etc it is other Portable device.It is to be further understood that in certain embodiments, above equipment is not portable communication device, but is had The desktop computer of touch sensitive surface (for example, touch-screen display and/or touch tablet).
In following discussion, the mobile terminal including display and touch sensitive surface is described.However, should manage Solution, mobile terminal may include that one or more of the other physical User of such as physical keyboard, mouse and/or control-rod connects Jaws equipment.
Mobile terminal supports various application programs, such as one of the following or multiple: drawing application program, demonstration application Program, word-processing application, website creation application program, disk imprinting application program, spreadsheet applications, game are answered With program, telephony application, videoconference application, email application, instant messaging applications, forging Refining supports application program, photo management application program, digital camera application program, digital camera application program, web-browsing to answer With program, digital music player application and/or video frequency player application program.
At least one of such as touch sensitive surface can be used in the various application programs that can be executed on mobile terminals Public physical user-interface device.It can be adjusted among applications and/or in corresponding application programs and/or change touch is quick Feel the corresponding information shown in the one or more functions and terminal on surface.In this way, terminal public physical structure (for example, Touch sensitive surface) it can support the various application programs with user interface intuitive and transparent for a user.
In addition, term " first ", " second ", " third " etc. are only used for distinguishing description, and cannot in the description of the present application It is interpreted as indication or suggestion relative importance.
Embodiment one:
Fig. 1 shows the flow chart of the first image processing method of the offer of the embodiment of the present application one, and details are as follows:
Whether step S11, the front camera and rear camera for detecting mobile terminal are switched on, the rear camera Number be equal to 2;
In the step, the rear camera of mobile terminal has 2, this 2 cameras are arranged in parallel in the back of mobile terminal On plate.The mobile terminal includes mobile phone, tablet computer etc..
In this step, judge the front camera with after by the attribute value of detection front camera and rear camera Set whether camera is opened.For example, determining if the attribute value of the front camera currently obtained is identical as the attribute value of unlatching The front camera is currently at open state;Similarly, if the attribute of the attribute value of the rear camera currently obtained and closing It is worth identical, then determines that the rear camera is currently at closed state.
Step S12 detects the picture that the rear camera is sent if front camera and rear camera are switched on In with the presence or absence of meet the first preset condition region;
Wherein, the region of the first preset condition comprises at least one of the following the region of shape: circle, rectangle, square etc.. Rear camera be sent in the picture of preview interface there may be at least one meet the first preset condition region, it is also possible to There is no any regions for meeting the first preset condition.
In the step, rear camera be sent to preview interface picture be postposition dual camera shooting 2 pictures The picture obtained after being merged.Fusion treatment is carried out by 2 pictures shot to dual camera, so that postposition images The picture of head output is more diversified.For example, it is assumed that the dual camera is combined by black and white camera and colour imagery shot, wherein black The white more details of camera charge capture, colour imagery shot charge capture color abundant, then after enabling to fusion treatment Picture the picture of output (i.e. rear camera) effect it is outstanding.Certainly, which is also possible to other kinds of The combination of camera, for example, the combination of dual camera can be wide-angle camera and focal length camera.
In this step, if the first preset condition includes the region of various shapes, for example, simultaneously including rectangle, square Deng, then need to preset the priority of different shapes, for example, setting rectangle priority be higher than square priority.Then Preferential detection rear camera is sent in the picture of preview interface with the presence or absence of the region for meeting rectangle, if not having, then is detected The rear camera is sent in the picture of preview interface with the presence or absence of the region for meeting square.
Step S13, if there is the region for meeting the first preset condition, basis in the picture that the rear camera is sent The size in the region for meeting the first preset condition intercepts the region of same size from the picture that front camera is sent;
Optionally, if being mentioned there is no the region for meeting the first preset condition in the picture that the rear camera is sent Show user-selected area, the region which selects will be as the region for meeting the first preset condition.
Step S14 merges in the region of the same size intercepted from the picture that front camera is sent described Meet the region of the first preset condition present in the picture that rear camera is sent, the picture that obtains that treated;
In the step, it will be sent to the region fusion for intercepting same size in the picture of preview interface from front camera and exist The region for meeting the first preset condition present in the picture that rear camera is sent realizes the different figures of front and rear camera The fusion of piece.
Step S15 shows treated the picture in preview interface.
In the step, in the preview interface of the mobile terminal picture that shows that treated.
In the embodiment of the present application, whether the front camera and rear camera for detecting mobile terminal are switched on, after described The number for setting camera is equal to 2, if front camera and rear camera are switched on, detects what the rear camera was sent With the presence or absence of the region for meeting the first preset condition in picture, meet first if existing in the picture that the rear camera is sent The region of preset condition, then according to the size in the region for meeting the first preset condition from the picture that front camera is sent The region for intercepting same size merges in the region of the same size intercepted from the picture that front camera is sent in institute Meet the region of the first preset condition present in the picture for stating rear camera transmission, the picture that obtains that treated, in preview Treated described in interface display picture.Due to in shooting process, while starting front camera and postposition camera shooting Therefore head can obtain simultaneously the picture that front camera and rear camera are sent in preview interface, also, due to will be from Present in the picture that the region fusion of the same size intercepted in the picture that front camera is sent is sent in rear camera Meet the region of the first preset condition, therefore, so that the picture material for the fused picture that preview interface is shown is more terse.
Optionally, after step s 11, the image processing method further include:
If front camera is opened and rear camera is not opened, show that the front camera is sent in preview interface Picture.
Optionally, after step s 11, the image processing method further include:
If front camera is closed and the dual camera of rear camera is switched on, described in preview interface display fusion Picture after the picture of dual camera shooting.
Optionally, since the function of the dual camera of postposition is different, it is optional in order to obtain different pictures Any one camera for opening postposition is selected, at this point, after step s 11, the image processing method further include:
If front camera is closed and any of dual camera of rear camera is opened, shown in preview interface The picture of the camera shooting of unlatching.
Embodiment two:
In order to show specified picture material in preview interface, Fig. 2 shows second that the embodiment of the present application three provides The flow chart of kind image processing method, in the present embodiment, the step S11 and step of step S21 and step S22 and embodiment one S12 is identical, and step S25 and step S26 are identical as the step S14 of embodiment one and step S15, and details are not described herein again.
Whether step S21, the front camera and rear camera for detecting mobile terminal are switched on, the rear camera Number be equal to 2;
Step S22 detects the picture that the rear camera is sent if front camera and rear camera are switched on In with the presence or absence of meet the first preset condition region;
Step S23 is detected if there is the region for meeting the first preset condition in the picture that the rear camera is sent With the presence or absence of specified picture material in the picture that front camera is sent, the specified picture material includes face and/or human body Non-face position;
Optionally, whether the coverage in order to more quickly determining front camera includes face and/or human body Non-face position, then can mobile terminal increase thermal infrared device, the thermal infrared device be arranged near front camera, should Thermal infrared device quickly confirms whether the coverage of front camera includes human body using infrared thermal imaging feature.
It should be pointed out that the priority of face is higher than other positions of human body, the i.e. step in specified picture material In, when judging that the coverage of front camera includes human body by thermal infrared device, then by recognition of face determine before It sets with the presence or absence of face in the picture of camera transmission, face, then subsequent to be intercepted centered on face and meet first if it exists The identical region of the area size of preset condition, face if it does not exist, then the subsequent non-face position with human body is such as with finger Center interception region identical with the area size of the first preset condition is met.
Step S24 meets first in advance according to described if there is specified picture material in the picture that front camera is sent If the size in the region of condition, and centered on the specified picture material intercept same size region.
Specifically, it is assumed that the region for meeting the first preset condition is rectangle, then in the picture that front camera is sent, with Region identical with the rectangular area size is intercepted centered on the specified content of the picture.
Step S25 merges in the region of the same size intercepted from the picture that front camera is sent described Meet the region of the first preset condition present in the picture that rear camera is sent, the picture that obtains that treated;
Specifically, since the size in the region of interception is identical as the size in region of the first preset condition is met, it can By the region overlay of interception on the region for meeting the first preset condition, so that obtaining both includes what front camera can obtain Picture material includes the picture for the picture material that rear camera can obtain again.
Step S26 shows treated the picture in preview interface.
In the embodiment of the present application, met using specified picture material as center interception area, then by the region overlay of interception On the region of first preset condition, and the specified picture material includes the non-face position of face and/or human body, therefore, so that The picture that preview interface is shown can either show that the picture that rear camera can obtain can show that front camera can obtain again The specified picture material taken.
Embodiment three:
In order to enable the picture that front camera and rear camera obtain merges truer, naturally, Fig. 3 shows this Apply for the flow chart for the third image processing method that embodiment provides, in the present embodiment, step S31 and step S32 and reality The step S11 for applying example one is identical with step S12, and step S36 is identical as the step S15 of embodiment one, and details are not described herein again.
Whether step S31, the front camera and rear camera for detecting mobile terminal are switched on, the rear camera Number be equal to 2;
Step S32 detects the picture that the rear camera is sent if front camera and rear camera are switched on In with the presence or absence of meet the first preset condition region;
Step S33, if there is the region for meeting the first preset condition in the picture that the rear camera is sent, according to institute The parameter for stating rear camera calculates the corresponding plane coordinates of spatial coordinate in the region for meeting the first preset condition, according to The spatial coordinate and plane coordinates determine corresponding transition matrix;
In the step, since the number of rear camera includes 2, according to 2 of the shooting of the dual camera of postposition Picture can determine the spatial coordinate of the same object, and further according to the parameter of the dual camera of the postposition, can to calculate this same The corresponding plane coordinates of the spatial coordinate of a object, so according to the two-dimensional assemblage be spatial coordinate corresponding to solid revolve Turn and near big and far smaller visual zoom ratio obtains corresponding transition matrix.
Step S34 intercepts phase from the picture that front camera is sent according to the corresponding area size of the plane coordinates With the region of size;
For example, it is assumed that the corresponding area size of plane coordinates is 40*30, then it is same from the picture that front camera is sent Intercept the region of 40*30 size.
It optionally, can be with two class of embodiment when intercepting the region of same size from the picture that front camera is sent Seemingly, the region of same size is intercepted centered on specifying picture material.
Step S35 is identical big using what is intercepted from the picture that front camera is sent described in transition matrix processing The corresponding picture material in small region obtains including that treated the corresponding region of picture material, will described include that treated Meet the area of the first preset condition present in the picture that the fusion of picture material corresponding region is sent in the rear camera Domain, the picture that obtains that treated.
Specifically, since the picture of front camera shooting is usually to face object (user oneself), and postposition images The coverage of head is wider, includes facing rear camera in the object of shooting, also includes that the non-postposition that faces images (at this point, the object of shooting will generate certain drawing effect) of head, therefore, in order to guarantee from the area that front camera intercepts The picture that domain can be obtained with rear camera more naturally merges, and needs to wrap the region of interception by the transition matrix of calculating The picture material included is handled.
Step S36 shows treated the picture in preview interface.
Referring particularly to Fig. 4 A, Fig. 4 B, Fig. 4 C, Fig. 4 D, wherein Fig. 4 A is the figure that rear camera is sent to preview interface Piece, the region that white is filled in Fig. 4 B is the region for meeting the first preset condition, and Fig. 4 C is to be sent to preview from front camera The region intercepted centered on face in the picture at interface, Fig. 4 D are in the preview interface picture that shows that treated.
In the embodiment of the present application, due to the image for before merging picture, including by region of the transition matrix to interception Content is handled, therefore, so that fused picture is more natural.
Optionally, in order to enable the region of interception is merged truer with the picture that rear camera obtains, the step S14 or the step S25 include:
Meet the boundary pixel in the region of the first preset condition present in the picture for determining the rear camera transmission Value;
It is sent described in border pixel values modification according to the region for meeting the first preset condition from front camera The border pixel values in the region of the same size intercepted in picture;Specifically, using the left side in the region for meeting the first preset condition Side border pixel values modify the left boundary pixel value from the region of interception, similarly, using the region for meeting the first preset condition The modification of the right border pixel values from the right border pixel values in the region of interception, other are similar, and details are not described herein again.
The region of the modified same size intercepted from the picture that front camera is sent of border pixel values is merged Meet the region of the first preset condition present in the picture that the rear camera is sent, the picture that obtains that treated.
In the present embodiment, the pixel value of the area peripheral edge of the first preset condition is met by choosing, further according to the picture of selection The pixel value of the area peripheral edge of element value modification interception, sends out so that the region of interception can preferably be merged in rear camera It send into the picture of preview interface.
Optionally, for the region of interception prominent in the picture of display, the step S14 or the step S25 include:
The frame that user selects is added to the region of the same size intercepted from the picture that front camera is sent; Wherein, which can be golden frame, be also possible to frame with film editing effect etc..In the step, to interception Region add the pre-selected frame of user, certainly, if the picture plus frame that user show preview interface is unsatisfied with, Option can be changed by frame change the frame being added on the region of interception.
It will be plus the area of the same size intercepted from the picture that front camera is sent described in the frame of user's selection The region for meeting the first preset condition present in the picture that domain fusion is sent in the rear camera, obtains that treated schemes Piece.
Optionally, in order to preview interface accurately show front camera obtain picture, then the step S15 or The step S26 or after the step S36, comprising:
It detects whether to receive region change directive, if receiving region change directive, using the region after change as new The first preset condition of satisfaction region, according to the size in the region of new first preset condition of satisfaction from front camera The region that same size is intercepted in the picture of transmission, by the same size intercepted from the picture that front camera is sent Region is merged in the region of new first preset condition of satisfaction, the picture that obtains that treated, shown in preview interface described in Treated picture.
In the present embodiment, region is provided in mobile terminal and changes function, more properly show preposition camera shooting convenient for user's selection The region for the picture that head obtains.Wherein, change function in the region can be triggered by picture click commands, specifically, mobile terminal The picture click commands for detecting whether to receive user, where determining the picture click commands if receiving picture click commands Screen position, then detect the screen position nearby whether there is meet the first preset condition region.Alternatively, the region is changed Function can change function items triggering by click on area, at this point, mobile terminal detects that user clicks " region change function " item, Then show a rope shape, user determines the region of the first preset condition of satisfaction by drawing the rope.
Optionally, the step S13 is specifically included:
If there is the region of at least one the first preset condition of satisfaction in the picture that the rear camera is sent, from described At least one meets the region that selection predetermined number in the region of the first preset condition meets the second preset condition, according to described pre- If the size that number meets the region of the second preset condition intercepts the region of same size from the picture that front camera is sent.
In the present embodiment, the second preset condition is comprised at least one of the following: region is maximum, region belongs to close shot.Usual feelings Under condition, the region of one the second preset condition of satisfaction of selection from multiple regions for meeting the first preset condition, for example, second When preset condition is region maximum, the maximum region of selection region from multiple regions for meeting the first preset condition.Certainly, It can choose the region that predetermined number meets the second preset condition, at this point, the picture that preview interface is shown is as shown in Figure 5.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present application constitutes any limit It is fixed.
Example IV:
Corresponding with above-described embodiment one, two, three, Fig. 6 shows a kind of picture processing dress of the offer of the embodiment of the present application four The structural schematic diagram set, the picture processing unit can be applied in mobile terminal, which can be mobile phone, tablet computer Deng.For ease of description, part relevant to the embodiment of the present application is illustrated only:
The picture processing unit includes: camera open detection unit 61, region detection unit 62, picture interception unit 63, picture integrated unit 64, preview picture unit 65.Wherein:
Whether camera open detection unit 61, front camera and rear camera for detecting mobile terminal are all opened It opens, the number of the rear camera is equal to 2;
Specifically, the rear camera of mobile terminal has 2, this 2 cameras are arranged in parallel in the backboard of mobile terminal On.
Region detection unit 62 detects the postposition camera shooting if being switched on for front camera and rear camera With the presence or absence of the region for meeting the first preset condition in the picture that hair is sent;
Wherein, the region of the first preset condition comprises at least one of the following the region of shape: circle, rectangle, square etc..
Picture interception unit 63 meets the first preset condition if existing in the picture sent for the rear camera Region is then intercepted from the picture that front camera is sent according to the size in the region for meeting the first preset condition identical big Small region;
Picture integrated unit 64, for by the region of same size intercepted from the picture that front camera is sent The region for meeting the first preset condition present in the picture sent in the rear camera is merged, obtains that treated schemes Piece;
Preview picture unit 65, for treated picture described in show in preview interface.
In the embodiment of the present application, due to in shooting process, while starting front camera and rear camera, Therefore, the picture that front camera and rear camera are sent can be obtained simultaneously in preview interface, also, due to will be from preposition Satisfaction present in the picture that the region fusion of the same size intercepted in the picture that camera is sent is sent in rear camera The region of first preset condition, therefore, so that the picture material for the fused picture that preview interface is shown is more terse.
Optionally, the picture interception unit 63 includes:
Specified image content detection module is preset if existing in the picture sent for the rear camera and meeting first The region of condition is then detected in the picture of front camera transmission with the presence or absence of specified picture material, the specified picture material Non-face position including face and/or human body;
First area interception module, if there is specified picture material, basis in the picture sent for front camera It is described meet the first preset condition region size, and centered on the specified picture material intercept same size area Domain.
Optionally, the picture interception unit 63 includes:
Transition matrix determining module meets the first preset condition if existing in the picture sent for the rear camera Region, according to the parameter of the rear camera calculate it is described meet the first preset condition region spatial coordinate it is corresponding Plane coordinates determines corresponding transition matrix according to the spatial coordinate and plane coordinates;
Second area interception module, for what is sent according to the corresponding area size of the plane coordinates from front camera The region of same size is intercepted in picture;
Accordingly, the picture integrated unit 64 is specifically used for:
The region of the same size intercepted from the picture that front camera is sent is handled using the transition matrix Corresponding picture material obtains including that treated the corresponding region of picture material, the picture material that will described include that treated The region for meeting the first preset condition present in the picture that the fusion of corresponding region is sent in the rear camera, obtains everywhere Picture after reason.
Optionally, the picture integrated unit 64 includes:
Border pixel values determining module, for determining that satisfaction first present in the picture of the rear camera transmission is pre- If the border pixel values in the region of condition;
Border pixel values change module, for being modified according to the border pixel values in the region for meeting the first preset condition The border pixel values in the region of the same size intercepted from the picture that front camera is sent;
Region overlay module, for by the modified phase that intercepts from the picture that front camera is sent of border pixel values The region for meeting the first preset condition present in the picture sent with the region fusion of size in the rear camera, obtains Treated picture.
Optionally, the picture integrated unit 64 includes:
Frame processing module adds for the region to the same size intercepted from the picture that front camera is sent The frame of upper user's selection;
Frame Fusion Module is cut from the picture that front camera is sent described in the frame of user's selection for that will add Meet the area of the first preset condition present in the picture that the region fusion of the same size taken is sent in the rear camera Domain, the picture that obtains that treated.
Optionally, the picture processing unit further include:
Region change directive detection unit, for detecting whether region change directive is received, if receiving region change Instruction, using the region after change as the region of new the first preset condition of satisfaction, presets item according to the new satisfaction first The size in the region of part intercepts the region of same size from the picture that front camera is sent, and described will send out from front camera It merges in the region of new first preset condition of satisfaction, after obtaining processing in the region of the same size intercepted in the picture sent Picture, show treated the picture in preview interface.
Optionally, the picture interception unit 63 is specifically used for:
If there is the region of at least one the first preset condition of satisfaction in the picture that the rear camera is sent, from described At least one meets the region that selection predetermined number in the region of the first preset condition meets the second preset condition, according to described pre- If the size that number meets the region of the second preset condition intercepts the region of same size from the picture that front camera is sent.
Example IV:
Fig. 7 is the schematic diagram for the terminal device that the embodiment of the present application four provides.As shown in fig. 7, the terminal of the embodiment is set Standby 7 include: processor 70, memory 71 and are stored in the meter that can be run in the memory 71 and on the processor 70 Calculation machine program 72.The processor 70 is realized when executing the computer program 72 in above-mentioned each image processing method embodiment The step of, such as step S11 shown in FIG. 1 to step S15.Alternatively, when the processor 70 executes the computer program 72 Realize the function of each module/unit in above-mentioned each Installation practice, such as the function of module 61 to 65 shown in Fig. 6.
Illustratively, the computer program 72 can be divided into one or more module/units, it is one or Multiple module/units are stored in the memory 71, and are executed by the processor 70, to complete the application.Described one A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for Implementation procedure of the computer program 72 in the terminal device 7 is described.For example, the computer program 72 can be divided It is cut into camera open detection unit, region detection unit, picture interception unit, picture integrated unit, preview picture unit, respectively Unit concrete function is as follows:
Whether camera open detection unit, front camera and rear camera for detecting mobile terminal are all opened It opens, the number of the rear camera is equal to 2;
Region detection unit detects the rear camera if being switched on for front camera and rear camera With the presence or absence of the region for meeting the first preset condition in the picture of transmission;
Picture interception unit, if there is the area for meeting the first preset condition in the picture sent for the rear camera Domain then intercepts same size from the picture that front camera is sent according to the size in the region for meeting the first preset condition Region;
Picture integrated unit, for melting the region of the same size intercepted from the picture that front camera is sent The region for meeting the first preset condition present in the picture sent in the rear camera is closed, the picture that obtains that treated;
Preview picture unit, for treated picture described in show in preview interface.
The terminal device 7 can be the calculating such as desktop PC, notebook, palm PC and cloud server and set It is standby.The terminal device may include, but be not limited only to, processor 70, memory 71.It will be understood by those skilled in the art that Fig. 7 The only example of terminal device 7 does not constitute the restriction to terminal device 7, may include than illustrating more or fewer portions Part perhaps combines certain components or different components, such as the terminal device can also include input-output equipment, net Network access device, bus etc..
Alleged processor 70 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 71 can be the internal storage unit of the terminal device 7, such as the hard disk or interior of terminal device 7 It deposits.The memory 71 is also possible to the External memory equipment of the terminal device 7, such as be equipped on the terminal device 7 Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge Deposit card (Flash Card) etc..Further, the memory 71 can also both include the storage inside list of the terminal device 7 Member also includes External memory equipment.The memory 71 is for storing needed for the computer program and the terminal device Other programs and data.The memory 71 can be also used for temporarily storing the data that has exported or will export.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed Scope of the present application.
In embodiment provided herein, it should be understood that disclosed device/terminal device and method, it can be with It realizes by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute The division of module or unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation, such as Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device Or the INDIRECT COUPLING or communication connection of unit, it can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or In use, can store in a computer readable storage medium.Based on this understanding, the application realizes above-mentioned implementation All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation Code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium It may include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic that can carry the computer program code Dish, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described The content that computer-readable medium includes can carry out increasing appropriate according to the requirement made laws in jurisdiction with patent practice Subtract, such as does not include electric carrier signal and electricity according to legislation and patent practice, computer-readable medium in certain jurisdictions Believe signal.
Embodiment described above is only to illustrate the technical solution of the application, rather than its limitations;Although referring to aforementioned reality Example is applied the application is described in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope of each embodiment technical solution of the application that it does not separate the essence of the corresponding technical solution should all Comprising within the scope of protection of this application.

Claims (10)

1. a kind of image processing method characterized by comprising
Whether the front camera and rear camera for detecting mobile terminal are switched on, and the number of the rear camera is equal to 2;
If front camera and rear camera are switched on, detect in the picture that the rear camera is sent with the presence or absence of full The region of the first preset condition of foot;
If there is the region for meeting the first preset condition in the picture that the rear camera is sent, meet first according to described The size in the region of preset condition intercepts the region of same size from the picture that front camera is sent;
The region fusion of the same size intercepted from the picture that front camera is sent is sent out in the rear camera The region for meeting the first preset condition present in the picture sent, the picture that obtains that treated;
Treated the picture is shown in preview interface.
2. image processing method as described in claim 1, which is characterized in that if the picture that the rear camera is sent It is middle to there is the region for meeting the first preset condition, then it is intercepted from the picture that front camera is sent according to the size in the region The region of same size, comprising:
If there is the region for meeting the first preset condition in the picture that the rear camera is sent, front camera hair is detected With the presence or absence of specified picture material in the picture sent, the specified picture material includes the non-face position of face and/or human body;
If there is specified picture material in the picture that front camera is sent, according to the region for meeting the first preset condition Size, and centered on the specified picture material intercept same size region.
3. image processing method as claimed in claim 1 or 2, which is characterized in that if what the rear camera was sent There is the region for meeting the first preset condition in picture, then according to the size in the region for meeting the first preset condition from preposition The region of same size is intercepted in the picture that camera is sent, comprising:
If there is the region for meeting the first preset condition in the picture that the rear camera is sent, according to the rear camera Parameter calculate it is described meet the first preset condition region the corresponding plane coordinates of spatial coordinate, according to the spatial coordinate And plane coordinates determines corresponding transition matrix;
The region of same size is intercepted from the picture that front camera is sent according to the corresponding area size of the plane coordinates;
Accordingly, the region by the same size intercepted from the picture that front camera is sent is merged after described Meet the region of the first preset condition present in the picture for setting camera transmission, the picture that obtains that treated specifically:
The region for handling the same size intercepted from the picture that front camera is sent using the transition matrix is corresponding Picture material, obtain including that treated the corresponding region of picture material, will described including that treated, picture material is corresponding The picture that sends in the rear camera of region fusion present in meet the region of the first preset condition, after obtaining processing Picture.
4. image processing method as claimed in claim 3, which is characterized in that described by the figure sent from front camera Meet the first default item present in the picture that the region fusion of the same size intercepted in piece is sent in the rear camera The region of part, the picture that obtains that treated, comprising:
Meet the border pixel values in the region of the first preset condition present in the picture for determining the rear camera transmission;
According to the border pixel values modification picture sent from front camera in the region for meeting the first preset condition The border pixel values in the region of the same size of middle interception;
The region of the modified same size intercepted from the picture that front camera is sent of border pixel values is merged in institute Meet the region of the first preset condition present in the picture for stating rear camera transmission, the picture that obtains that treated.
5. image processing method as claimed in claim 3, which is characterized in that described by the figure sent from front camera Meet the first default item present in the picture that the region fusion of the same size intercepted in piece is sent in the rear camera The region of part, the picture that obtains that treated, comprising:
The frame that user selects is added to the region of the same size intercepted from the picture that front camera is sent;
It will melt plus the region of the same size intercepted from the picture that front camera is sent described in the frame of user's selection The region for meeting the first preset condition present in the picture sent in the rear camera is closed, the picture that obtains that treated.
6. image processing method as claimed in claim 1 or 2, which is characterized in that show the place in preview interface described After picture after reason, comprising:
It detects whether to receive region change directive, if receiving region change directive, expire the region after change as new The region of the first preset condition of foot is sent according to the size in the region of new first preset condition of satisfaction from front camera Picture in intercept the region of same size, by the region of same size intercepted from the picture that front camera is sent Fusion is in the region of new first preset condition of satisfaction, and the picture that obtains that treated shows the processing in preview interface Picture afterwards.
7. image processing method as claimed in claim 1 or 2, which is characterized in that if what the rear camera was sent There is the region for meeting the first preset condition in picture, then according to the size in the region for meeting the first preset condition from preposition The region that same size is intercepted in the picture that camera is sent, specifically includes:
If there is the region of at least one the first preset condition of satisfaction in the picture that the rear camera is sent, from it is described at least Selection predetermined number meets the region of the second preset condition in the region of one the first preset condition of satisfaction, according to described default The size that number meets the region of the second preset condition intercepts the region of same size from the picture that front camera is sent.
8. a kind of picture processing unit characterized by comprising
Whether camera open detection unit, front camera and rear camera for detecting mobile terminal are switched on, institute The number for stating rear camera is equal to 2;
Region detection unit detects the rear camera and sends if being switched on for front camera and rear camera Picture in the presence or absence of meet the first preset condition region;
Picture interception unit, if there is the region for meeting the first preset condition in the picture sent for the rear camera, Same size is then intercepted from the picture that front camera is sent according to the size in the region for meeting the first preset condition Region;
Picture integrated unit, for the region fusion of the same size intercepted from the picture that front camera is sent to exist The region for meeting the first preset condition present in the picture that the rear camera is sent, the picture that obtains that treated;
Preview picture unit, for treated picture described in show in preview interface.
9. a kind of terminal device, including memory, processor and storage are in the memory and can be on the processor The computer program of operation, which is characterized in that the processor realizes such as claim 1 to 7 when executing the computer program The step of any one the method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In when the computer program is executed by processor the step of any one of such as claim 1 to 7 of realization the method.
CN201810863980.6A 2018-08-01 2018-08-01 Image processing method, picture processing unit and terminal device Pending CN109035191A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810863980.6A CN109035191A (en) 2018-08-01 2018-08-01 Image processing method, picture processing unit and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810863980.6A CN109035191A (en) 2018-08-01 2018-08-01 Image processing method, picture processing unit and terminal device

Publications (1)

Publication Number Publication Date
CN109035191A true CN109035191A (en) 2018-12-18

Family

ID=64648528

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810863980.6A Pending CN109035191A (en) 2018-08-01 2018-08-01 Image processing method, picture processing unit and terminal device

Country Status (1)

Country Link
CN (1) CN109035191A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113810627A (en) * 2021-08-12 2021-12-17 惠州Tcl云创科技有限公司 Video processing method and device and mobile terminal
CN113824871A (en) * 2021-08-02 2021-12-21 惠州Tcl云创科技有限公司 Method and device for processing superposed photographing of front camera and rear camera of mobile terminal and mobile terminal
CN113873151A (en) * 2021-09-18 2021-12-31 维沃移动通信有限公司 Video recording method and device and electronic equipment

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005204015A (en) * 2004-01-15 2005-07-28 Nec Corp Mobile equipment and image processing method
CN102122392A (en) * 2010-01-08 2011-07-13 索尼公司 Information processing apparatus, information processing system, and information processing method
CN103945045A (en) * 2013-01-21 2014-07-23 联想(北京)有限公司 Method and device for data processing
WO2014178235A1 (en) * 2013-04-30 2014-11-06 ソニー株式会社 Image processing device, image processing method, and program
CN105631804A (en) * 2015-12-24 2016-06-01 小米科技有限责任公司 Image processing method and device
CN106027900A (en) * 2016-06-22 2016-10-12 维沃移动通信有限公司 Photographing method and mobile terminal
CN106709894A (en) * 2015-08-17 2017-05-24 北京亿羽舜海科技有限公司 Real-time image splicing method and system
CN107018325A (en) * 2017-03-29 2017-08-04 努比亚技术有限公司 A kind of image combining method and device
CN107169483A (en) * 2017-07-12 2017-09-15 深圳奥比中光科技有限公司 Tasks carrying based on recognition of face
CN107292283A (en) * 2017-07-12 2017-10-24 深圳奥比中光科技有限公司 Mix face identification method
CN206759793U (en) * 2017-05-27 2017-12-15 安徽建筑大学 A kind of room lighting light intelligent control system
CN107635099A (en) * 2017-10-09 2018-01-26 深圳市天视通电子科技有限公司 A kind of double optical-fiber network video cameras of human body sensing and safety defense monitoring system
CN207149023U (en) * 2017-10-24 2018-03-27 石家庄华泰电力工具有限公司 Alarming in short range of electric power system
CN108124102A (en) * 2017-12-28 2018-06-05 北京小米移动软件有限公司 Image processing method, device and computer readable storage medium

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005204015A (en) * 2004-01-15 2005-07-28 Nec Corp Mobile equipment and image processing method
CN102122392A (en) * 2010-01-08 2011-07-13 索尼公司 Information processing apparatus, information processing system, and information processing method
CN103945045A (en) * 2013-01-21 2014-07-23 联想(北京)有限公司 Method and device for data processing
WO2014178235A1 (en) * 2013-04-30 2014-11-06 ソニー株式会社 Image processing device, image processing method, and program
CN106709894A (en) * 2015-08-17 2017-05-24 北京亿羽舜海科技有限公司 Real-time image splicing method and system
CN105631804A (en) * 2015-12-24 2016-06-01 小米科技有限责任公司 Image processing method and device
CN106027900A (en) * 2016-06-22 2016-10-12 维沃移动通信有限公司 Photographing method and mobile terminal
CN107018325A (en) * 2017-03-29 2017-08-04 努比亚技术有限公司 A kind of image combining method and device
CN206759793U (en) * 2017-05-27 2017-12-15 安徽建筑大学 A kind of room lighting light intelligent control system
CN107169483A (en) * 2017-07-12 2017-09-15 深圳奥比中光科技有限公司 Tasks carrying based on recognition of face
CN107292283A (en) * 2017-07-12 2017-10-24 深圳奥比中光科技有限公司 Mix face identification method
CN107635099A (en) * 2017-10-09 2018-01-26 深圳市天视通电子科技有限公司 A kind of double optical-fiber network video cameras of human body sensing and safety defense monitoring system
CN207149023U (en) * 2017-10-24 2018-03-27 石家庄华泰电力工具有限公司 Alarming in short range of electric power system
CN108124102A (en) * 2017-12-28 2018-06-05 北京小米移动软件有限公司 Image processing method, device and computer readable storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113824871A (en) * 2021-08-02 2021-12-21 惠州Tcl云创科技有限公司 Method and device for processing superposed photographing of front camera and rear camera of mobile terminal and mobile terminal
CN113810627A (en) * 2021-08-12 2021-12-17 惠州Tcl云创科技有限公司 Video processing method and device and mobile terminal
CN113810627B (en) * 2021-08-12 2023-12-19 惠州Tcl云创科技有限公司 Video processing method, device, mobile terminal and readable storage medium
CN113873151A (en) * 2021-09-18 2021-12-31 维沃移动通信有限公司 Video recording method and device and electronic equipment

Similar Documents

Publication Publication Date Title
WO2022063023A1 (en) Video shooting method, video shooting apparatus, and electronic device
CN106134176B (en) System and method for multifocal imaging
CN109064390B (en) Image processing method, image processing device and mobile terminal
CN106060419B (en) A kind of photographic method and mobile terminal
US10705671B2 (en) Information sharing method, terminal, and storage medium
CN106210521A (en) A kind of photographic method and terminal
CN106454139A (en) Shooting method and mobile terminal
CN112954210B (en) Photographing method and device, electronic equipment and medium
CN107809593A (en) Method, apparatus, terminal and the storage medium of shooting image
WO2013096086A1 (en) Method and apparatus to enhance details in an image
CN107368810A (en) Method for detecting human face and device
CN109040603A (en) High-dynamic-range image acquisition method, device and mobile terminal
CN109035191A (en) Image processing method, picture processing unit and terminal device
CN109614902A (en) Face image processing process, device, electronic equipment and computer storage medium
CN110457963B (en) Display control method, display control device, mobile terminal and computer-readable storage medium
US20230345113A1 (en) Display control method and apparatus, electronic device, and medium
CN110290324A (en) Equipment imaging method, device, storage medium and electronic equipment
CN106951750A (en) The method and mobile terminal of a kind of mobile terminal switch mode
CN107341777A (en) image processing method and device
EP4047549A1 (en) Method and device for image detection, and electronic device
CN113810588B (en) Image synthesis method, terminal and storage medium
CN110166680A (en) Equipment imaging method, device, storage medium and electronic equipment
CN107302666A (en) Photographic method, mobile terminal and computer-readable recording medium
WO2023066294A1 (en) Icon display method and apparatus, and electronic device
CN106251191A (en) The display control method of a kind of terminal screen and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20181218

RJ01 Rejection of invention patent application after publication