CN108769521A - A kind of photographic method, mobile terminal and computer readable storage medium - Google Patents
A kind of photographic method, mobile terminal and computer readable storage medium Download PDFInfo
- Publication number
- CN108769521A CN108769521A CN201810570646.1A CN201810570646A CN108769521A CN 108769521 A CN108769521 A CN 108769521A CN 201810570646 A CN201810570646 A CN 201810570646A CN 108769521 A CN108769521 A CN 108769521A
- Authority
- CN
- China
- Prior art keywords
- preview screen
- foreground target
- image
- foreground
- characteristic information
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/64—Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
Abstract
The application is suitable for technical field of image processing, provides a kind of photographic method, mobile terminal and computer readable storage medium, the photographic method and includes:Obtain the preview screen of the camera acquisition, identify the characteristic information of the preview screen, and image procossing is carried out to the preview screen based on the characteristic information, the characteristic information of the preview screen includes the background label of the preview screen, after receiving the instruction taken pictures, obtain the original image of the camera acquisition, characteristic information based on the preview screen of default frame before the original image, image procossing is carried out to the original image and obtains photo, memory consumption when taking pictures can be reduced by the application.
Description
Technical field
The application belongs to technical field of image processing more particularly to a kind of photographic method, mobile terminal and computer-readable
Storage medium.
Background technology
With the development of intelligent mobile terminal, people are more and more frequent for the use taken pictures on the mobile terminals such as mobile phone.
The camera function of existing major part mobile terminal supports image procossing, for example, for the filter function of face, grinding skin function,
Whitening function etc..
Currently, when preview is shown and is taken pictures, the preview screen of camera acquisition is detected and corresponding image
Processing, so that identical effect is presented in preview screen and photo of taking pictures.However, the memory of this shooting style consumption compared with
Greatly.
Invention content
In view of this, the embodiment of the present application provides a kind of photographic method, mobile terminal and computer readable storage medium,
It is larger with the shooting style consumption memory for solving the problems, such as current.
The first aspect of the embodiment of the present application provides a kind of photographic method, including:
Obtain the preview screen of the camera acquisition;
It identifies the characteristic information of the preview screen, and the preview screen is carried out at image based on the characteristic information
Reason, the characteristic information of the preview screen includes the background label of the preview screen;
After receiving the instruction taken pictures, the original image of the camera acquisition is obtained;
Based on the characteristic information of the preview screen of default frame before the original image, image is carried out to the original image
Processing obtains photo.
The second aspect of the embodiment of the present application provides a kind of mobile terminal, including:
Preview screen acquisition module, the preview screen for obtaining the camera acquisition;
Preview screen processing module, the characteristic information of the preview screen for identification, and it is based on the characteristic information pair
The preview screen carries out image procossing, and the characteristic information of the preview screen includes the background label of the preview screen;
Characteristic information acquisition module, the original graph for after receiving the instruction taken pictures, obtaining the camera acquisition
Picture;
It takes pictures processing module, for the characteristic information based on the preview screen of default frame before the original image, to institute
It states original image and carries out image procossing acquisition photo.
The third aspect of the embodiment of the present application provides a kind of mobile terminal, 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
The step of realizing the method that the embodiment of the present application first aspect provides.
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, the computer program to realize the embodiment of the present application when being executed by one or more processors
On the one hand the step of the method provided.
5th aspect of the embodiment of the present application provides a kind of computer program product, and the computer program product includes
Computer program, the computer program realize that the embodiment of the present application first aspect provides when being executed by one or more processors
The method the step of.
The embodiment of the present application obtains the preview screen of the camera acquisition first, identifies the feature letter of the preview screen
Breath, and image procossing is carried out to the preview screen based on the characteristic information, the characteristic information of the preview screen includes institute
The background label for stating preview screen obtains the original image of the camera acquisition, is based on institute after receiving the instruction taken pictures
The characteristic information of the preview screen of default frame before stating original image carries out image procossing to the original image and obtains photo,
Due to the identification without carrying out background label to the original image for acquisition of taking pictures when taking pictures in the application, but use original image
The background label for presetting the preview screen of frame before carries out image procossing to original image, can not only reduce interior when taking pictures
It deposits, additionally it is possible to which same effect is presented in the photo for the acquisition that ensures to take pictures and the preview screen that user sees when preview.
Description of the drawings
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 having to pay creative labor, can also be according to these
Attached drawing obtains other attached drawings.
Fig. 1 is a kind of implementation process schematic diagram of photographic method provided by the embodiments of the present application;
Fig. 2 is the implementation process schematic diagram of another photographic method provided by the embodiments of the present application;
Fig. 3 is the implementation process schematic diagram of another photographic method provided by the embodiments of the present application;
Fig. 4 is a kind of schematic block diagram of mobile terminal provided by the embodiments of the present application;
Fig. 5 is the schematic block diagram of another mobile terminal provided by the embodiments of the present application.
Specific implementation mode
In being described below, for illustration and not for limitation, it is proposed that such as tool of particular system structure, technology etc
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 can also be realized 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.
It should be appreciated that ought use in this specification and in the appended claims, the instruction of term " comprising " 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, element, component and/or its presence or addition gathered.
It is also understood that the term used in this present specification is merely for the sake of the mesh for describing 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 singulative, "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 combinations and all possible combinations of one or more of associated item listed, and includes 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 order to illustrate technical solution described herein, illustrated below by specific embodiment.
Fig. 1 is a kind of implementation process schematic diagram of photographic method provided by the embodiments of the present application, is applied to mobile terminal, such as
This method may comprise steps of shown in figure:
Step S101 obtains the preview screen of the camera acquisition.
In the embodiment of the present application, when user needs to take pictures, it will usually start the camera of mobile terminal, camera meeting
Acquisition preview screen in real time, while the preview screen that camera acquires in real time can be shown on the screen of mobile terminal.
Step S102 identifies the characteristic information of the preview screen, and based on the characteristic information to the preview screen
Image procossing is carried out, the characteristic information of the preview screen includes the background label of the preview screen.
In the embodiment of the present application, the characteristic information of the preview screen includes the background label of the preview screen, is known
The characteristic information of the not described preview screen is the scene by preview screen described in scene Recognition Model Identification, according to the preview
The scene of picture obtains the background label of the preview screen, and the scene Recognition model can be convolutional neural networks model.
The background label of the preview screen is used to carry out relevant image procossing to the pending image.
As an example, the background label is night scene label, noise reduction process can be carried out to the preview screen, to institute
After stating preview screen progress noise reduction process, image enhancement processing, the background mark are being carried out to the preview screen after noise reduction process
Label are setting sun label, and the processing for promoting brightness of image can be carried out to the preview screen.
Further include before the characteristic information for identifying the preview screen as the another embodiment of the application:
Compression processing is carried out to the preview screen of camera acquisition.
Correspondingly, the characteristic information of the identification preview screen includes:
Identify the characteristic information of the preview screen after compression processing.
In the embodiment of the present application, if scene Recognition is carried out to the preview screen of camera acquisition, due to camera shooting
The preview screen of head acquisition is bigger, then the time of scene Recognition will increase, while memory occupation rate can also increase, in order to
Memory occupation rate is reduced, while reducing the time of scene Recognition, compression processing, identification compression can be carried out to the preview screen
The characteristic information for preview screen that treated.
In practical applications, camera is at predetermined intervals in acquisition preview screen, in further decreasing
Occupation rate is deposited, the preview screen that can not be directed to the acquisition of each frame carries out scene Recognition, but every several frame preview screens,
A scene Recognition is carried out, for example, the 1st frame preview screen carries out the background label that scene Recognition obtains the 1st frame, the 1st to 5 frame is pre-
The background label that picture of looking at is based on the 1st frame carries out image procossing, it can also be expected that the background label of the 2nd to 5 frame preview screen
It is exactly the background label of the 1st frame, the 6th frame preview screen carries out the background label that scene Recognition obtains the 6th frame, and the 6th to 10 frame is pre-
The background label that picture of looking at is based on the 6th frame carries out image procossing, it can also be expected that the background mark of the 7th to 10 frame preview screen
Label are exactly the background label of the 6th frame, and the 11st frame preview screen carries out the background label ... ... that scene Recognition obtains the 11st frame.It needs
It is noted that if not receiving photographing instruction, above-mentioned steps persistently carry out, i.e., camera often acquires frame preview picture
Face, it is necessary to which the characteristic information based on every frame preview screen carries out image procossing to present frame preview screen, only some frames
The characteristic information of preview screen is the characteristic information of identification itself, the previous frame preview that the characteristic information of the preview screen of some frames is
The characteristic information of picture.
Step S103 obtains the original image of the camera acquisition after receiving the instruction taken pictures.
Step S104, based on the characteristic information of the preview screen of default frame before the original image, to the original graph
Photo is obtained as carrying out image procossing.
In the embodiment of the present application, after receiving the instruction taken pictures, the original image of the camera acquisition is obtained, without
It is that screenshotss are carried out to current preview screen.Because occupying although carrying out screenshotss to current preview screen and can reduce memory
Rate, while the photo with preview screen same effect is obtained, however, the resolution ratio for the photo that screenshotss obtain is too low, cannot be satisfied
People are to daily high-resolution requirement of taking pictures.After the original image for obtaining the camera acquisition, without identifying the original
The background label of beginning image, but the background label based on the preview screen of default frame before the original image is to described original
Image carries out image procossing and obtains photo, for example, original image is the 120th frame picture of camera acquisition, then can be based on
The background label of 116th frame preview screen carries out image procossing to the original image and obtains photo, can also be based on the 119th frame
The background label of preview screen carries out image procossing to the original image and obtains photo.
Due to the identification without carrying out background label to the original image for acquisition of taking pictures when taking pictures in the embodiment of the present application, and
It is that image procossing is carried out to original image using the background label of the preview screen of default frame before original image, can not only drops
Low memory when taking pictures, additionally it is possible to which same effect is presented in the preview screen that user sees when the photo for the acquisition that ensures to take pictures and preview
Fruit.
Fig. 2 is the flow diagram of another photographic method provided by the embodiments of the present application, and this method as shown in the figure can be with
Include the following steps:
Step S201 obtains the preview screen of the camera acquisition.
Step S202 carries out the background label that scene Recognition obtains the preview screen to the preview screen.
The content of step S201 to step S202 and consistent with the content of step S101 to step S102, specifically can refer to step
Rapid S101 is to the description of step S102, and details are not described herein.
Step S203 is detected and be whether there is foreground target in the preview screen, if there are foregrounds in the preview screen
Target then obtains the foreground label of the foreground target.
In the embodiment of the present application, it in order to obtain preferable effect of taking pictures, can not only be based on before the original image
The background label of the preview screen of default frame carries out image procossing to the original image and obtains photo, is also based on described
The foreground label of foreground target in original image carries out image procossing to the foreground target of the original image, in order to enable with
Family in preview phase just it can be seen that effect of taking pictures, can the foreground label based on foreground target in the preview screen to described
Foreground target in preview screen carries out image procossing, however, this is just needed in preview screen, there are could when foreground target
It is enough to realize, it whether there is foreground target in the preview screen so needing to detect, if there are foreground mesh in the preview screen
Mark, then obtain the foreground label of the foreground target.It can identify in the preview screen whether deposit by Model of Target Recognition
In foreground target, when there are foreground target, detection block can be shown in preview screen, while generating foreground label, detect
It is the foreground target recognized in frame, in practical application, can not also shows detection block, only export foreground label.
If there are foreground targets in the preview screen, the characteristic information of the preview screen includes that the preview is drawn
The foreground label of foreground target in the background label in face, the preview screen.
Step S204, the background label based on the preview screen carry out Global treatment to the preview screen.
The step can refer to the description in step S102, and details are not described herein.
Step S205, the foreground label based on foreground target in the preview screen is to the foreground mesh in the preview screen
Mark carries out Local treatment.
In the embodiment of the present application, when foreground label is face label, the relevant processing of U.S. face can be carried out to face,
When foreground label is cuisines label, can cuisines be carried out with the processing for promoting colour vividness, other foreground labels are no longer lifted
, in practical application, different foreground target image procossing modes can be set according to different foreground labels.
Step S206 obtains the original image of the camera acquisition after receiving the instruction taken pictures.
The background label of step S207, the preview screen based on the original image former frame carry out the original image
Global treatment.
Step S208 is detected and be whether there is foreground target in the original image;If in the original image, there are foregrounds
Target then obtains the location information of the foreground label and the foreground target of foreground target in the original image.
Step S209, the position letter of foreground label and the foreground target based on foreground target in the original image
Breath carries out Local treatment to the foreground target in the original image.
In the embodiment of the present application, after receiving photographing instruction, the original image of the camera acquisition is obtained, to institute
The image processing process for stating original image is consistent with the image processing process of original image former frame preview screen, is only
The background label of preview screen based on the original image former frame carries out Global treatment to the original image, based on described
The location information of the foreground label and the foreground target of foreground target in original image, to the foreground mesh in the original image
Mark carries out Local treatment.
In the embodiment of the present application, when handling preview screen, the background label based on preview screen and foreground target
Foreground label, image procossing is carried out to preview screen, when taking pictures, in order to reduce memory usage, while obtaining and being drawn with preview
The identical image effect in face, using the background label of the preview screen for the original image former frame taken pictures and the foreground of original image
The foreground label of target carries out image procossing to original image.
Fig. 3 is the flow diagram of another photographic method provided by the embodiments of the present application, this method as shown in the figure be
It on the basis of embodiment illustrated in fig. 2, describes when carrying out Local treatment to the foreground target in the original image, how will
Foreground target is split from original image, may comprise steps of:
Step S301 in obtaining original image after the location information of foreground target, obtains institute in the original image
State the image in detection block.
In the embodiment of the present application, if desired in the original image foreground target carry out Local treatment, need by
Affiliated foreground target is split from original image, on the basis of embodiment shown in Fig. 2, is already available to the foreground
The detection block of target, since the image in detection block is largely foreground target image, so, it can be based in the detection block
Image segmentation described in foreground target.
Step S302, based on the shade of gray of the image in the detection block, before identifying in the image in the detection block
The boundary of scape target obtains foreground target contour line.
In the embodiment of the present application, the boundary of foreground target is to discriminate between the important evidence of foreground target and background image, and
In general, surrounding's gray-value variation rate of foreground target boundary point is higher, therefore, before being identified by the shade of gray of image
The boundary of scape target obtains foreground target contour line.However, foreground target contour line can also have a problem that is:In image
Actually boundary, however since graded unobvious may would not generate contour line;Alternatively, actually not boundary,
Contour line is generated inside foreground target since the gray-value variation inside foreground target is more apparent.So generating at this time
Foreground target contour line be not be real foreground target contour line.
Step S303 obtains gray threshold sequence, and by each gray threshold in the gray threshold sequence to institute
The image stated in detection block carries out binary conversion treatment, obtains gray scale foreground target image sequence.
In the embodiment of the present application, gray proces are carried out to the image in the detection block first, obtains gray level image, so
Gray threshold sequence is obtained afterwards, and two are carried out to the image in the detection block by each gray threshold in gray threshold sequence
Value is handled, so that it may to obtain gray scale foreground target image sequence, in these gray scale foreground target image sequences, can there is one
Gray scale foreground target image, this gray scale foreground target image can rough expression foreground target regions.
In gray threshold sequence, if threshold value setting is suitable, the foreground target region can be obtained.However, practical
In, foreground target and background image are separated to suitable threshold value it is difficult to accurately choose, even if choosing to suitable
Threshold value can inevitably have pixel identical with the gray value of the pixel in foreground target in background image.
By the analysis of step S302 and step S303 it is found that in fact, the method for the method and shade of gray of binaryzation
Can there be certain defect, the result of acquisition is not highly precisely result.It is accurate as a result, this Shen in order to obtain
Please embodiment the method for the method of binaryzation and shade of gray is combined together acquisition foreground target, such as step S304 is to walking
The content of rapid S305 descriptions.
Step S304 is obtained with the foreground target shape matching degree most from the gray scale foreground target image sequence
High gray scale foreground target image.
In the embodiment of the present application, in gray scale foreground target image sequence, before having in a width gray scale foreground target image
How the regional extent of scape target obtains closest to the true regional extent of foreground target from gray scale foreground target image sequence
Image closest to the true regional extent of foreground target can be obtained from the gray scale foreground target image sequence and institute
State the highest gray scale foreground target image of foreground target shape matching degree.Matching degree can pass through binarization method and gray scale ladder
The registration in the region for the foreground target that degree method obtains respectively is as matching degree.In each gray scale foreground target image sequence
Target area can temporarily regard foreground target region as, the region in foreground target contour line that shade of gray method obtains
Foreground target region can temporarily be regarded as, find the highest gray scale of foreground target area coincidence degree obtained with shade of gray method
Foreground target image.Before foreground target region in this gray scale foreground target image comparatively can be than more actually indicating
Scape target area, but nor completely accurate foreground target region.
Step S305, by with the highest gray scale foreground target image of the matching degree of the foreground target contour line with it is described before
The fusion of scape target profile curve generates continuous foreground target region, the figure in the foreground target region described in the original image
As being foreground target.
In the embodiment of the present application, the foreground in the highest gray scale foreground target image of matching degree actually no matter obtained
The foreground target region that the foreground target contour line that target area or shade of gray method obtain indicates all can not accurately retouch
State foreground target region, however, it is possible to by with the highest gray scale foreground target image of the matching degree of the foreground target contour line
It is merged with the foreground target contour line and generates continuous foreground target region, shade of gray is abandoned by binary image and is obtained
Inaccurate part, the foreground target contour line obtained by shade of gray method abandon ash in the foreground target contour line obtained
Part inaccurate in foreground target image is spent, continuous foreground target region is obtained after fusion, the foreground mesh obtained after fusion
It is not real foreground target image to mark region, because being merged by gray level image after binaryzation and contour line, institute
With the foreground target region expression of acquisition is coordinate of the foreground target in the original image.Before in original image
Image in scape target area is only foreground target.
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.
Fig. 4 is that the schematic block diagram for the mobile terminal that one embodiment of the application provides only is shown and this Shen for convenience of description
It please the relevant part of embodiment.
The mobile terminal 4 can be the software unit being built in the mobile terminals such as mobile phone, tablet computer, notebook, hard
Part unit or the unit of soft or hard combination can also be used as independent pendant and be integrated into the mobile phone, tablet computer, notebook etc.
In mobile terminal.
The mobile terminal 4 includes:
Preview screen acquisition module 41, the preview screen for obtaining the camera acquisition;
Preview screen processing module 42, the characteristic information of the preview screen for identification, and it is based on the characteristic information
Image procossing is carried out to the preview screen, the characteristic information of the preview screen includes the background label of the preview screen;
Characteristic information acquisition module 43, for after receiving the instruction taken pictures, obtaining the original of the camera acquisition
Image;
Processing module of taking pictures 44 is right for the characteristic information based on the preview screen of default frame before the original image
The original image carries out image procossing and obtains photo.
Optionally, the preview screen processing module 42 includes:
First background label recognition unit 421 obtains the preview picture for carrying out scene Recognition to the preview screen
The background label in face;
First foreground tag recognition unit 422 whether there is foreground target, if described for detecting in the preview screen
There are foreground targets in preview screen, then obtain the foreground label of the foreground target;
Using the foreground label of foreground target in the background label of the preview screen and the preview screen as described pre-
Look at the characteristic information of picture;
Correspondingly, the characteristic information of the preview screen further includes:The foreground label of foreground target in the preview screen.
Optionally, the preview screen processing module 42 further includes:
First Global treatment unit 423 carries out the preview screen for the background label based on the preview screen
Global treatment;
First partial processing unit 424, for the foreground label based on foreground target in the preview screen to described pre-
The foreground target look in picture carries out Local treatment.
Optionally, the processing module 44 of taking pictures includes:
Second Global treatment unit 441 is used for the background label pair of the preview screen based on the original image former frame
The original image carries out Global treatment;
Second foreground tag recognition unit 442 whether there is foreground target for detecting in the original image;If described
There are foreground targets in original image, then obtain the foreground label of foreground target in the original image and the foreground target
Location information;
Second local processing unit 443, for based on foreground target in the original image foreground label and it is described before
The location information of scape target carries out Local treatment to the foreground target in the original image.
Optionally, the location information of the foreground target is the location information of the corresponding detection block of the foreground target,
The processing module 44 of taking pictures further includes:
Detection block image acquisition unit obtains after the location information of foreground target in obtaining the original image
Take the image in detection block described in the original image;
Target profile curve acquiring unit is used for the shade of gray based on the image in the detection block, identifies the detection
The boundary of foreground target in image in frame obtains foreground target contour line;
Target image sequence acquiring unit, for obtaining gray threshold sequence, and by the gray threshold sequence
Each gray threshold carries out binary conversion treatment to the image in the detection block, obtains gray scale foreground target image sequence;
Integrated unit, for determining foreground based on the gray scale foreground target image sequence and the foreground target contour line
Target area, the image in the foreground target region described in the original image are foreground target.
Optionally, the integrated unit includes:
Target image obtains subelement, for being obtained and the foreground target from the gray scale foreground target image sequence
The highest gray scale foreground target image of shape matching degree;
Merge subelement, for by with the highest gray scale foreground target image of the matching degree of the foreground target contour line with
The foreground target contour line fusion generates continuous foreground target region.
Optionally, the mobile terminal 4 further includes:
Compression module 45, for before the characteristic information for identifying the preview screen, being acquired to the camera pre-
Picture of looking at carries out compression processing;
Correspondingly, the preview screen processing module is additionally operable to:
Identify the characteristic information of the preview screen after compression processing.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each work(
Can unit, module division progress for example, in practical application, can be as needed and by above-mentioned function distribution by different
Functional unit, module are completed, i.e., the internal structure of the mobile terminal are divided into different functional units or module, to complete
All or part of function described above.Each functional unit, module in embodiment can be integrated in a processing unit,
Can also be that each unit physically exists alone, can also be during two or more units be integrated in one unit, above-mentioned collection
At unit both may be used hardware form realize, can also be realized in the form of SFU software functional unit.In addition, each function
Unit, module specific name also only to facilitate mutually distinguish, the protection domain being not intended to limit this application.Above-mentioned dress
Set middle unit, module specific work process, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
Fig. 5 is the schematic block diagram for the mobile terminal that the another embodiment of the application provides.As shown in figure 5, the shifting of the embodiment
Moving terminal 5 includes:It one or more processors 50, memory 51 and is stored in the memory 51 and can be in the processing
The computer program 52 run on device 50.The processor 50 realizes above-mentioned each side of taking pictures when executing the computer program 52
Step in method embodiment, such as step S101 to S104 shown in FIG. 1.Alternatively, the processor 50 executes the computer
The function of each module/unit in above-mentioned mobile terminal embodiment, such as the work(of module 41 to 44 shown in Fig. 4 are realized when program 52
Energy.
Illustratively, the computer program 52 can be divided into one or more module/units, it is one or
Multiple module/units are stored in the memory 51, and are executed by the processor 50, 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 52 in the mobile terminal 5 is described.For example, the computer program 52 can be divided
It is cut into preview screen acquisition module, preview screen processing module, characteristic information acquisition module, processing module of taking pictures.
The preview screen acquisition module, the preview screen for obtaining the camera acquisition;
The preview screen processing module, the characteristic information of the preview screen for identification, and believed based on the feature
Breath carries out image procossing to the preview screen, and the characteristic information of the preview screen includes the background mark of the preview screen
Label;
The characteristic information acquisition module, the original for after receiving the instruction taken pictures, obtaining the camera acquisition
Beginning image;
The processing module of taking pictures, the characteristic information of the preview screen for presetting frame before based on the original image,
Image procossing is carried out to the original image and obtains photo.
Other modules or unit can refer to the description in embodiment shown in Fig. 4, and details are not described herein.
The mobile terminal includes but are not limited to processor 50, memory 51.It will be understood by those skilled in the art that figure
5 be only an example of mobile terminal 5, does not constitute the restriction to mobile terminal 5, may include more more or less than illustrating
Component, either combine certain components or different components, for example, the mobile terminal can also include input equipment, it is defeated
Go out equipment, network access equipment, bus etc..
The processor 50 can be central processing unit (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor
Deng.
The memory 51 can be the internal storage unit of the mobile terminal 5, such as the hard disk of mobile terminal 5 or interior
It deposits.The memory 51 can also be to be equipped on the External memory equipment of the mobile terminal 5, such as the mobile terminal 5
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 51 can also both include the storage inside list of the mobile terminal 5
Member also includes External memory equipment.The memory 51 is for storing needed for the computer program and the mobile terminal
Other programs and data.The memory 51 can be also used for temporarily storing the data that has exported or will export.
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 realize that lists 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, depends on the specific application and design constraint of 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 mobile terminal and method can pass through it
Its mode is realized.For example, mobile terminal embodiment described above is only schematical, for example, the module or list
Member division, only a kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or
Component can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point is shown
The mutual coupling or direct-coupling or communication connection shown or discussed can be by some interfaces, between device or unit
Coupling or communication connection are connect, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple
In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme
's.
In addition, each functional unit in each embodiment of the application can be integrated in a processing unit, it can also
It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list
The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or
In use, can be stored in a computer read/write memory medium.Based on this understanding, the application realizes above-mentioned implementation
All or part of flow 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
May include:Any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic of the computer program code can be carried
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 legislation in jurisdiction and the requirement of patent practice
Subtract, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium do not include be electric carrier signal and
Telecommunication signal.
Embodiment described above is only to illustrate the technical solution of the application, rather than its limitations;Although with reference to aforementioned reality
Example is applied the application is described in detail, it will be understood by those of ordinary skill in the art that:It still can be to aforementioned each
Technical solution recorded in embodiment is modified or equivalent replacement of some of the technical features;And these are changed
Or replace, 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
Within the protection domain of the application.
Claims (10)
1. a kind of photographic method, which is characterized in that be applied to mobile terminal, the photographic method includes:
Obtain the preview screen of the camera acquisition;
It identifies the characteristic information of the preview screen, and image procossing is carried out to the preview screen based on the characteristic information,
The characteristic information of the preview screen includes the background label of the preview screen;
After receiving the instruction taken pictures, the original image of the camera acquisition is obtained;
Based on the characteristic information of the preview screen of default frame before the original image, image procossing is carried out to the original image
Obtain photo.
2. photographic method as described in claim 1, which is characterized in that the characteristic information packet of the identification preview screen
It includes:
The background label that scene Recognition obtains the preview screen is carried out to the preview screen;
It detects in the preview screen and obtains institute if there are foreground targets in the preview screen with the presence or absence of foreground target
State the foreground label of foreground target;
The foreground label of foreground target in the background label of the preview screen and the preview screen is drawn as the preview
The characteristic information in face;
Correspondingly, the characteristic information of the preview screen further includes:The foreground label of foreground target in the preview screen.
3. photographic method as claimed in claim 2, which is characterized in that described to be based on the characteristic information to the preview screen
Carrying out image procossing includes:
Background label based on the preview screen carries out Global treatment to the preview screen;
Foreground label based on foreground target in the preview screen carries out at part the foreground target in the preview screen
Reason.
4. photographic method as claimed in claim 3, which is characterized in that described to preset the pre- of frame before based on the original image
Look at the characteristic information of picture, image procossing carried out to the original image obtain photo include:
The background label of preview screen based on the original image former frame carries out Global treatment to the original image;
It detects and whether there is foreground target in the original image;
If there are foreground target in the original image, the foreground label of foreground target in the original image and described is obtained
The location information of foreground target;
Based on the location information of the foreground label and the foreground target of foreground target in the original image, to the original graph
Foreground target as in carries out Local treatment.
5. photographic method as claimed in claim 4, which is characterized in that the location information of the foreground target is the foreground mesh
The location information of corresponding detection block is marked,
In obtaining the original image after the location information of foreground target, further include:
Obtain the image in detection block described in the original image;
Based on the shade of gray of the image in the detection block, the boundary of foreground target in the image in the detection block is identified,
Obtain foreground target contour line;
Gray threshold sequence is obtained, and by each gray threshold in the gray threshold sequence to the figure in the detection block
As carrying out binary conversion treatment, gray scale foreground target image sequence is obtained;
Foreground target region is determined based on the gray scale foreground target image sequence and the foreground target contour line, in the original
Image in foreground target region described in beginning image is foreground target.
6. photographic method as claimed in claim 5, which is characterized in that it is described based on the gray scale foreground target image sequence and
The foreground target contour line determines that foreground target region includes:
It is obtained and the highest gray scale foreground of the foreground target shape matching degree from the gray scale foreground target image sequence
Target image;
By with the highest gray scale foreground target image of the matching degree of the foreground target contour line and the foreground target contour line
Fusion generates continuous foreground target region.
7. such as claim 1 to 6 any one of them photographic method, which is characterized in that in the feature for identifying the preview screen
Before information, further include:
Compression processing is carried out to the preview screen of camera acquisition;
Correspondingly, the characteristic information of the identification preview screen includes:
Identify the characteristic information of the preview screen after compression processing.
8. a kind of mobile terminal, which is characterized in that including:
Preview screen acquisition module, the preview screen for obtaining the camera acquisition;
Preview screen processing module, the characteristic information of the preview screen for identification, and based on the characteristic information to described
Preview screen carries out image procossing, and the characteristic information of the preview screen includes the background label of the preview screen;
Characteristic information acquisition module, the original image for after receiving the instruction taken pictures, obtaining the camera acquisition;
It takes pictures processing module, for the characteristic information based on the preview screen of default frame before the original image, to the original
Beginning image carries out image procossing and obtains photo.
9. a kind of mobile terminal, including memory, processor and it is stored 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, which is characterized in that the computer-readable recording medium storage has computer journey
Sequence realizes the step such as any one of claim 1 to 7 the method when the computer program is executed by one or more processors
Suddenly.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810570646.1A CN108769521B (en) | 2018-06-05 | 2018-06-05 | Photographing method, mobile terminal and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810570646.1A CN108769521B (en) | 2018-06-05 | 2018-06-05 | Photographing method, mobile terminal and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108769521A true CN108769521A (en) | 2018-11-06 |
CN108769521B CN108769521B (en) | 2021-02-02 |
Family
ID=63999004
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810570646.1A Active CN108769521B (en) | 2018-06-05 | 2018-06-05 | Photographing method, mobile terminal and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108769521B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113572980A (en) * | 2020-04-28 | 2021-10-29 | 华为技术有限公司 | Photographing method and device, terminal equipment and storage medium |
CN115484403A (en) * | 2022-08-08 | 2022-12-16 | 荣耀终端有限公司 | Video recording method and related device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040008773A1 (en) * | 2002-06-14 | 2004-01-15 | Canon Kabushiki Kaisha | Multiple image processing and synthesis using background image extraction |
CN103514446A (en) * | 2013-10-16 | 2014-01-15 | 北京理工大学 | Outdoor scene recognition method fused with sensor information |
CN106101547A (en) * | 2016-07-06 | 2016-11-09 | 北京奇虎科技有限公司 | The processing method of a kind of view data, device and mobile terminal |
CN107948617A (en) * | 2017-12-06 | 2018-04-20 | 广东欧珀移动通信有限公司 | Image processing method, device, computer-readable recording medium and computer equipment |
CN108024107A (en) * | 2017-12-06 | 2018-05-11 | 广东欧珀移动通信有限公司 | Image processing method, device, electronic equipment and computer-readable recording medium |
-
2018
- 2018-06-05 CN CN201810570646.1A patent/CN108769521B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040008773A1 (en) * | 2002-06-14 | 2004-01-15 | Canon Kabushiki Kaisha | Multiple image processing and synthesis using background image extraction |
CN103514446A (en) * | 2013-10-16 | 2014-01-15 | 北京理工大学 | Outdoor scene recognition method fused with sensor information |
CN106101547A (en) * | 2016-07-06 | 2016-11-09 | 北京奇虎科技有限公司 | The processing method of a kind of view data, device and mobile terminal |
CN107948617A (en) * | 2017-12-06 | 2018-04-20 | 广东欧珀移动通信有限公司 | Image processing method, device, computer-readable recording medium and computer equipment |
CN108024107A (en) * | 2017-12-06 | 2018-05-11 | 广东欧珀移动通信有限公司 | Image processing method, device, electronic equipment and computer-readable recording medium |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113572980A (en) * | 2020-04-28 | 2021-10-29 | 华为技术有限公司 | Photographing method and device, terminal equipment and storage medium |
CN113572980B (en) * | 2020-04-28 | 2022-10-11 | 华为技术有限公司 | Photographing method and device, terminal equipment and storage medium |
CN115484403A (en) * | 2022-08-08 | 2022-12-16 | 荣耀终端有限公司 | Video recording method and related device |
CN115484403B (en) * | 2022-08-08 | 2023-10-24 | 荣耀终端有限公司 | Video recording method and related device |
Also Published As
Publication number | Publication date |
---|---|
CN108769521B (en) | 2021-02-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108765278A (en) | A kind of image processing method, mobile terminal and computer readable storage medium | |
CA2867365C (en) | Method, system and computer storage medium for face detection | |
CN108776819A (en) | A kind of target identification method, mobile terminal and computer readable storage medium | |
US20170124717A1 (en) | Method and system of background-foreground segmentation for image processing | |
CN111583097A (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
CN101599175B (en) | Detection method for determining alteration of shooting background and image processing device | |
CN107172354B (en) | Video processing method and device, electronic equipment and storage medium | |
CN104486552A (en) | Method and electronic device for obtaining images | |
CN106921804B (en) | Method and device for creating schedule in terminal and terminal equipment | |
US20140056519A1 (en) | Method, apparatus and system for segmenting an image in an image sequence | |
CN109005368A (en) | A kind of generation method of high dynamic range images, mobile terminal and storage medium | |
CN110335216A (en) | Image processing method, image processing apparatus, terminal device and readable storage medium storing program for executing | |
CN109785246A (en) | A kind of noise-reduction method of non-local mean filtering, device and equipment | |
CN104484652A (en) | Method for fingerprint recognition | |
CN108764139A (en) | A kind of method for detecting human face, mobile terminal and computer readable storage medium | |
CN110503704A (en) | Building method, device and the electronic equipment of three components | |
CN109286758A (en) | A kind of generation method of high dynamic range images, mobile terminal and storage medium | |
CN108805838A (en) | A kind of image processing method, mobile terminal and computer readable storage medium | |
CN108769521A (en) | A kind of photographic method, mobile terminal and computer readable storage medium | |
CN111369529A (en) | Article loss and leave-behind detection method and system | |
CN110363747A (en) | Intelligent abnormal cell judgment method, device and computer readable storage medium | |
CN110807457A (en) | OSD character recognition method, device and storage device | |
CN106228165A (en) | A kind of method of photo classification and mobile terminal | |
CN108810407A (en) | A kind of image processing method, mobile terminal and computer readable storage medium | |
Garg et al. | Color based segmentation using K-mean clustering and watershed segmentation |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |