CN107295255A - Determination method, device and the terminal of screening-mode - Google Patents

Determination method, device and the terminal of screening-mode Download PDF

Info

Publication number
CN107295255A
CN107295255A CN201710477720.0A CN201710477720A CN107295255A CN 107295255 A CN107295255 A CN 107295255A CN 201710477720 A CN201710477720 A CN 201710477720A CN 107295255 A CN107295255 A CN 107295255A
Authority
CN
China
Prior art keywords
night scene
region
brightness value
preview image
environment
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
Application number
CN201710477720.0A
Other languages
Chinese (zh)
Other versions
CN107295255B (en
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.)
Oneplus Technology Shenzhen Co Ltd
Original Assignee
Oneplus Technology Shenzhen 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 Oneplus Technology Shenzhen Co Ltd filed Critical Oneplus Technology Shenzhen Co Ltd
Priority to CN201710477720.0A priority Critical patent/CN107295255B/en
Publication of CN107295255A publication Critical patent/CN107295255A/en
Application granted granted Critical
Publication of CN107295255B publication Critical patent/CN107295255B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Studio Devices (AREA)

Abstract

The invention provides determination method, device and the terminal of a kind of screening-mode, it is related to camera technique for taking field, this method includes:When terminal captures preview image, preview image is divided into multiple regions;According to the rgb value of each pixel in each region, the brightness value in each region is obtained;Whether according to the brightness value in each region, it is night scene environment to judge current environment;If it is, determining that current shooting pattern is night scene mode.The brightness value that the present invention passes through preview image is judged current environment, when in night scene environment, and it is night scene mode to determine screening-mode, eliminates the troublesome operation of artificial selection night scene mode, preferably improves Consumer's Experience.

Description

Determination method, device and the terminal of screening-mode
Technical field
The present invention relates to camera technique for taking field, more particularly, to determination method, device and the end of a kind of screening-mode End.
Background technology
The terminal that existing mobile phone, camera etc. have camera function would generally provide night scene exposal model.Clapped in the night scene According under pattern, terminal can be shot to terminal preview screen and optimize image, such as be coordinated using slower shutter speed Flash fire is shot, and main body and the background is all suitably exposed.
However, people are when taking pictures at night, the night scene exposal model is only selected in advance, can just apply its function, with Shoot the preferable night scene of effect.If not selecting the night scene screening-mode in advance, the picture effect shot is then poor.This Planting needs the mode taken pictures in advance from night scene exposal model progress night relatively complicated, also often occurs user because forgetting Night scene is shot from the pattern and causes shooting effect not good, it is necessary to the situation re-shoot.
Need to be taken pictures from night scene screening-mode in advance for above-mentioned existing terminal, the problem of process is relatively complicated, Not yet propose effective solution at present.
The content of the invention
In view of this, it is an object of the invention to provide determination method, device and the terminal of a kind of screening-mode, to alleviate Existing terminal needs to be taken pictures from night scene screening-mode in advance, the relatively complicated technical problem of process.
The first technical scheme that the present invention is used is:A kind of determination method of screening-mode, including:When terminal capture it is pre- Look at image when, preview image is divided into multiple regions;According to the rgb value of each pixel in each region, each region is obtained Brightness value;Whether according to the brightness value in each region, it is night scene environment to judge current environment;If it is, determining current shooting mould Formula is night scene mode.
Further, the brightness value in each region of above-mentioned basis, judges the step of whether current environment is night scene environment, bag Include:According to the brightness value in each region, judge to whether there is night scene sky and/or night scene light source in preview image;When judging When there is night scene sky and/or night scene light source, it is night scene environment to determine current environment.
Further, the brightness value in each region of above-mentioned basis, the step of judging to whether there is night scene sky in preview image, Including:According to current style of shooting, sky areas is chosen from the region marked off;Wherein, style of shooting includes laterally clapping Take the photograph mode and longitudinal style of shooting;According to the brightness value of sky areas, judge to whether there is night scene sky in preview image;If It is to determine that current environment is night scene environment.
Further, the current style of shooting of above-mentioned basis, the step of choosing sky areas from the region marked off, bag Include:Obtain the parameter of the acceleration transducer output of terminal;Parameter includes X, Y, the magnitude of angular velocity of Z-direction;Determined according to parameter The style of shooting of terminal;Style of shooting according to determining chooses sky areas from the region marked off.
Further, the above-mentioned brightness value according to sky areas, the step of judging to whether there is night scene sky in preview image, Including:When the average brightness value of sky areas is less than first threshold, or, when brightness value is less than Second Threshold in sky areas Number of pixels and sky areas in the ratio of total number of pixels when being more than setting value, determine to exist in preview image night scene day It is empty.
Further, the brightness value in each region of above-mentioned basis, the step of judging to whether there is night scene light source in preview image, Including:Obtain the matching degree of the brightness value in each region and the brightness value of default kenel spot light;When exist matching degree be more than set When determining the region of matching threshold, determine there is night scene light source in preview image.
Further, the brightness value in each region of above-mentioned basis, judges the step of whether current environment is night scene environment, bag Include:When night scene sky and night scene light source are not present in preview image, judge current according to the brightness contrast value between regional Whether environment is night scene environment, or, point out user to determine current shooting pattern.
Further, the above method also includes:When terminal captures preview image, the angular speed parameter of terminal is obtained;Root Judge whether terminal is in stable state according to angular speed parameter;If it is, performing the step that preview image is divided into multiple regions Suddenly;If not, terminating current operation.
Further, in each region of above-mentioned basis each pixel rgb value, the step of obtaining the brightness value in each region, bag Include:The original RAW data of preview image are obtained, RAW data include:The rgb value of each pixel;The rgb value of each pixel is converted to YUV values;The brightness value in each region is obtained according to the YUV values of each pixel in each region.
Further, the above method also includes:When it is night scene mode to determine current shooting pattern, entered using night scene mode Row is shot.
The second technical scheme that the present invention is used is:A kind of determining device of screening-mode, including:Region division module, For when capturing preview image, preview image to be divided into multiple regions;Brightness value acquisition module, for according to each area The rgb value of each pixel in domain, obtains the brightness value in each region;Night scene environment judge module, for according to the bright of each region Whether angle value, it is night scene environment to judge current environment;Screening-mode determining module, for when the judgement of night scene environment judge module As a result it is that it is night scene mode to determine current shooting pattern when being.
The 3rd technical scheme that the present invention is used is:A kind of terminal, including memory and processor, memory are used to deposit The program of the determination method of computing device any of the above-described screening-mode is supported in storage, and processor is configurable for performing storage The program stored in device.
The embodiments of the invention provide determination method, device and the terminal of a kind of screening-mode, by the way that preview image is drawn It is divided into multiple regions, and obtains the brightness value in each region, and then judges whether current environment is night according to each zone luminance value Scape environment, if it is, determining that screening-mode is night scene mode.This mode without manually selecting screening-mode in advance, you can logical Cross each zone luminance value to determine whether night scene environment and determine night scene mode, eliminate the cumbersome behaviour of artificial selection night scene mode Make, preferably improve Consumer's Experience.
Other features and advantages of the present invention will be illustrated in the following description, also, partly be become from specification Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages are in specification, claims And specifically noted structure is realized and obtained in accompanying drawing.
To enable the above objects, features and advantages of the present invention to become apparent, preferred embodiment cited below particularly, and coordinate Appended accompanying drawing, is described in detail below.
Brief description of the drawings
, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical scheme of the prior art The accompanying drawing used required in embodiment or description of the prior art is briefly described, it should be apparent that, in describing below Accompanying drawing is some embodiments of the present invention, for those of ordinary skill in the art, before creative work is not paid Put, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 shows the determination method flow diagram for the first screening-mode that the embodiment of the present invention is provided;
Fig. 2 shows the determination method flow diagram for second of screening-mode that the embodiment of the present invention is provided;
Fig. 3 shows the determination method flow diagram for the third screening-mode that the embodiment of the present invention is provided;
Fig. 4 shows the determination method flow diagram for the 4th kind of screening-mode that the embodiment of the present invention is provided;
Fig. 5 shows the determination method flow diagram for the 5th kind of screening-mode that the embodiment of the present invention is provided;
Fig. 6 shows a kind of schematic diagram of the determination method for screening-mode that the embodiment of the present invention is provided;
Fig. 7 shows a kind of structured flowchart of the determining device for screening-mode that the embodiment of the present invention is provided;
Fig. 8 shows a kind of structural representation for terminal that the embodiment of the present invention is provided.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with accompanying drawing to the present invention Technical scheme be clearly and completely described, it is clear that described embodiment is a part of embodiment of the invention, rather than Whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not making creative work premise Lower obtained every other embodiment, belongs to the scope of protection of the invention.
Current terminal only people be pre-selected be set to night scene screening-mode when, can just enable the functional mode pair Preview screen is shot and optimized, it is contemplated that this operation manually preselected is relatively complicated, and provided in an embodiment of the present invention one The terminal mentioned in determination method, device and the terminal of kind of screening-mode, the embodiment of the present invention, can be camera or Mobile phone, tablet personal computer, Wearable terminal etc. have take pictures or camera function mobile device, below to the embodiment of the present invention carry out It is discussed in detail.
Embodiment one:
The determination method flow diagram of the first screening-mode shown in Figure 1, this method is applied to have and takes pictures or take the photograph As the terminal of function, comprise the following steps:
Step S102, when terminal captures preview image, multiple regions are divided into by preview image;
The specific mode of zoning and the quantity in region can be preset, and such as be divided into 16*16=256 Region etc..
Step S104, according to the rgb value of each pixel in each region, obtains the brightness value in each region;
Specifically, the rgb value of each pixel can be determined by obtaining the original RAW data of preview image, by by RGB Value is converted to YUV values, so as to exclude the color information in initial data, obtains the brightness value in each region.Wherein, it is original RAW data can be view data that is untreated and directly being captured by terminal, by taking digital camera as an example, usual digital camera Camera is collected after view data, can be carried out relevant treatment by image processor and be preserved again in view data form, In order to save memory space, processing may be compressed to the view data collected, and above-mentioned original RAW data can be Uncompressed initial data.
Include the rgb value of each pixel in the original RAW data.RGB and YUV are color spaces, for representing face Color, both can mutually convert.RGB is a kind of primaries pattern, by red (Red), green (Green), blue (Blue) three primary colors Coloured light be added in varing proportions and produce a variety of coloured light.Y in YUV (also known as YCrCb) represents lightness (Luma), namely ash Rank is worth;U and V represent colourity (Chroma), act as description colors of image and saturation degree.The present embodiment has using yuv format The characteristics of monochrome information and color information are separated, rgb value is converted to after YUV values, obtains the brightness value in each region.
Step S106, whether according to the brightness value in each region, it is night scene environment to judge current environment;
Image of the present embodiment based on varying environment, Luminance Distribution can be different, passes through the brightness of above-mentioned regional Value, and under night scene environment, the Luminance Distribution feature of image, it can be determined that whether go out current environment is night scene environment, such as root Judge according to the brightness value in each region in above-mentioned preview image with the presence or absence of night scene sky, night scene lamp source etc..
Step S108, if it is, determining that current shooting pattern is night scene mode.
In the determination method for the above-mentioned screening-mode that the present embodiment is provided, by the way that preview image is divided into multiple regions, And the brightness value in each region is obtained, and then judge whether current environment is night scene environment according to each zone luminance value, if it is, It is night scene mode to determine screening-mode.This mode without manually selecting screening-mode in advance, you can passes through each zone luminance value Determine whether night scene environment and determine night scene mode, eliminate the troublesome operation of artificial selection night scene mode, preferably lifted Consumer's Experience.
Embodiment two:
The determination method flow diagram of second of screening-mode shown in Figure 2, it is bright that the flow chart emphasis describes region The obtaining step of angle value, while also illustrating the judgment mode of night scene environment, specifically includes following steps:
Step S202, when terminal captures preview image, multiple regions are divided into by preview image;
Step S204, obtains the original RAW data of preview image, wherein, original RAW data include:The RGB of each pixel Value;
Step S206, YUV values are converted to by the rgb value of each pixel;By the way that rgb value is converted to monochrome information and color The YUV values of multimedia message separation characteristic, more can quickly obtain the brightness value in each region.
Transfer process is referred to Y=0.299*R+0.587*G+0.114*B and represents the Y value of brightness to obtain, and specifically may be used Realize, will not be repeated here with reference to correlation technique.
Step S208, the brightness value in each region is obtained according to the YUV values of each pixel in each region.
Wherein, the brightness value of regional can be stored in regional luminance database, in order to subsequently from regional luminance Directly each regional luminance is analyzed in database.
Step S210, according to the brightness value in each region, judges to whether there is night scene sky and/or night scene in preview image Light source, if it is, step S212 is performed, if not, performing step S218;
Under normal circumstances, the brightness value of night scene sky is relatively low, the brightness value in large stretch of multiple regions can be captured, so as to define Whether it is night scene sky.Specifically, connected zone luminance value can be analyzed, if entire area is in a certain threshold in the calculation Under value, then it is considered that the entire area is integral, sky etc..
It is of course also possible to pre-define the spot light of various forms, and the contrast of spot light and background is determined, according to The matching degree of zone luminance value and spot light, determines whether night scene light source.In deterministic process, current end can also be checked Whether end using exposure, and whether the degree of exposure reaches the degree shot needed for night scene, so distinguish conventional spot light and Night scene spot light.
In actual applications, there can be following three kinds of judgment models:(1) it whether there is night scene sky;(2) it whether there is night Scape light source;(3) whether there is night scene sky and night scene light source simultaneously.Above-mentioned three kinds of moulds can be selected according to actual needs and flexibly One of formula is judged, can determine that whether current environment is night scene environment according to judged result.
Step S212, it is night scene environment to determine current environment;
Step S214, it is night scene mode to determine current shooting pattern;
Step S216, is shot using night scene mode, and the shooting can be common takes pictures or with some Specific function is taken pictures, naturally it is also possible to be video recording etc., the embodiment of the present invention is to this without limiting.
Step S218, points out user to determine current shooting pattern.
In another implementation, when night scene sky and night scene light source can also be not present in preview image, according to Brightness contrast value between regional judge current environment whether be night scene environment, this mode, it is necessary to previously according to experience or Person's other manner known under night scene environment, the scope of the brightness contrast value between regional, in each area of present preview image Whether when brightness contrast value between domain belongs to the scope, it is night scene environment to determine current environment.
In the determination method for the above-mentioned screening-mode that the present embodiment is provided, by the way that the rgb value of preview image is converted into YUV Value, so as to which the brightness value in view data is separated, to obtain the brightness value in each region quickly;Further, pass through The brightness value in each region, judges to whether there is night scene sky and/or night scene light source in preview image, determines whether as night Scape environment.It is this according to night scene sky and/or night because night scene sky and night scene light source are the elements that often occur in night scene environment Scape light source determines whether that the mode of night scene environment is more objective, and judging nicety rate is higher, can be opened automatically based on this mode Dynamic night scene mode is shot, and without manually selecting screening-mode in advance, eliminates the troublesome operation of artificial selection night scene mode, Preferably improve Consumer's Experience.
Embodiment three:
The determination method flow diagram of the third screening-mode shown in Figure 3, the flow chart is main with to night scene sky Illustrate, comprise the following steps exemplified by being judged:
Step S302, when terminal captures preview image, multiple regions are divided into by preview image.
Step S304, obtains the original RAW data of preview image, and RAW data include:The rgb value of each pixel.
Step S306, YUV values are converted to by the rgb value of each pixel.
Step S308, the brightness value in each region is obtained according to the YUV values of each pixel in each region.
Step S310, obtains the parameter of the acceleration transducer output of terminal;Parameter includes X, Y, the angular speed of Z-direction Value.The elevation angle and the angle of depression of current mobile phone can be then determined by correlation technique, so that it is determined that the style of shooting of terminal.
Step S312, the style of shooting of terminal is determined according to parameter;Wherein, style of shooting includes horizontal style of shooting and vertical To style of shooting.That is, so that terminal is mobile phone as an example, it may be determined that user is laterally taken pictures using mobile phone, still uses hand Machine is longitudinally taken pictures, and then analyzes which side of the night scene sky areas in preview image.
Step S314, sky areas is chosen according to the style of shooting determined from the region marked off.Selection mode can To preset, such as, when being set in advance in horizontal style of shooting, preview image is chosen from default regional luminance database Middle some regions are used as sky areas.It is of course also possible to be ad hoc sky areas tables of data in regional luminance database, according to bat Take the photograph mode and the corresponding data correspondence in sky areas is stored in the tables of data of sky areas.
Step S316, according to the brightness value of sky areas, judges to whether there is night scene sky in preview image;If it is, Step S318 is performed, if not, performing step S322.
It is relatively low in view of the usual brightness value of night scene sky, or may also be in aerial the appearance such as stars, the moon of night scene day Deng the higher light source of brightness, therefore the present embodiment provides a kind of specific judgment mode of night scene sky:When being averaged for sky areas When brightness value is less than first threshold, or, when number of pixels of the brightness value less than Second Threshold and sky areas in sky areas In total number of pixels ratio be more than setting value when, determine there is night scene sky in preview image.
Step S318, it is night scene environment to determine current environment.
Step S320, it is night scene mode to determine current shooting pattern, and is shot using night scene mode.
Step S322, points out user to determine current shooting pattern.
In the determination method for the above-mentioned screening-mode that the present embodiment is provided, the parameter exported by acceleration transducer is determined The style of shooting of terminal, chooses sky areas, so as to by the brightness value of sky areas, judge preview image according to style of shooting In whether there is night scene sky, determine that current environment is night scene environment there is night scene day space-time, and carry out using night scene mode Shoot.This brightness sky areas is relatively simple quick by way of determining whether night scene sky, judging nicety rate compared with It is high.And aforesaid way determines night scene environment by the judgement to sky areas without manually selecting screening-mode in advance, save The troublesome operation of artificial selection night scene mode has been gone, Consumer's Experience is preferably improved.
Example IV:
The determination method flow diagram of 4th kind of screening-mode shown in Figure 4, the flow chart is main with to night scene light source Illustrate, comprise the following steps exemplified by being judged:
Step S402, when terminal captures preview image, multiple regions are divided into by preview image;
Step S404, obtains the original RAW data of preview image, and RAW data include:The rgb value of each pixel;
Step S406, YUV values are converted to by the rgb value of each pixel;
Step S408, the brightness value in each region is obtained according to the YUV values of each pixel in each region.
Step S410, obtains the matching degree of the brightness value in each region and the brightness value of default kenel spot light;
Default form spot light includes the night light sources such as various neon lights, street lamp and building lamp, the moon.Can be using point Light source detection techniques realize, the brightness value of spot light that is pre-defined and storing each middle form, by by preview image Zhong Ge areas The brightness value in domain carries out matching with the brightness value of default kenel spot light and compared, whether there is night scene light source in analyzed area.
Step S412, judges whether that matching degree is more than the region of setting matching threshold;If it is, performing step S414, if not, step S418 is performed,
Step S414, determines there is night scene light source in preview image;
Step S416, it is night scene environment to determine current environment, and is shot using night scene mode;
Step S418, points out user to determine current shooting pattern.
In the determination method for the above-mentioned screening-mode that the present embodiment is provided, by the way that the rgb value of preview image is converted into YUV Value, obtains the brightness value in each region;By for obtaining the brightness value in each region and the brightness value of default kenel spot light With degree, and judge whether that matching degree is more than the region of setting matching threshold, can effectively determine in preview image whether There is night scene light source, it is night scene environment that current environment is determined when there is night scene light source, and is shot using night scene mode.This Plant relatively simple quick by way of judging night scene light source with the matching degree of the brightness value of default kenel spot light, judge accurate True rate is higher.And aforesaid way determines night scene without manually selecting screening-mode in advance by the judgement to night scene light source Environment, eliminates the troublesome operation of artificial selection night scene mode, preferably improves Consumer's Experience.
Embodiment five:
The determination method flow diagram of 5th kind of screening-mode shown in Figure 5, the flow chart is main with to night scene sky It is combined exemplified by being judged and illustrates with night scene light source, comprises the following steps:
Step S502, when terminal captures preview image, obtains the angular speed parameter of terminal;Specifically, can pass through Angular-rate sensor obtains magnitude of angular velocity.
Step S504, judges whether terminal is in stable state according to angular speed parameter;If it is, step S506 is performed, If not, performing step S532.When being only judged as that terminal is in stable state, just really shooting image is handled, with Avoid occurring data error in subsequent treatment, or avoid misoperation.
Step S506, multiple regions are divided into by preview image.
Step S508, obtains the original RAW data of preview image, wherein, RAW data include:The rgb value of each pixel.
Step S510, YUV values are converted to by the rgb value of each pixel.
Step S512, the brightness value in each region is obtained according to the YUV values of each pixel in each region.
Step S514, obtains the parameter of the acceleration transducer output of terminal;Parameter includes X, Y, the angular speed of Z-direction Value.
Step S516, the style of shooting of terminal is determined according to parameter;Wherein, style of shooting includes horizontal style of shooting and vertical To style of shooting.
Step S518, sky areas is chosen according to the style of shooting determined from the region marked off.
Step S520, according to the brightness value of sky areas, judges to whether there is night scene sky in preview image;If it is, Step S522 is performed, if not, performing step S530.
Step S522, obtains the matching degree of the brightness value in each region and the brightness value of default kenel spot light.
Step S524, judges whether that matching degree is more than the region of setting matching threshold;If it is, performing step S526, if not, performing step S530.
Step S526, determines there is night scene light source in preview image.
Step S528, it is night scene environment to determine current environment, and is shot using night scene mode.
Step S530, points out user to determine current shooting pattern.
Step S532, terminates current operation.
In the determination method for the above-mentioned screening-mode that the present embodiment is provided, first judge whether terminal is located according to angular speed parameter In stable state, to avoid the judgement subsequently to view data from making a fault as far as possible;When terminal is in stable state, pass through day dead zone first The brightness in domain judges whether to whether there is night scene sky in preview image, if there is night scene sky, then further determined whether There is night scene light source, by the dual judgement to night scene sky and night scene light source, effectively improve the accurate of night scene environment judgement Degree.Aforesaid way without manually selecting screening-mode in advance, you can determines whether night scene environment, so that it is determined that screening-mode, The troublesome operation of artificial selection night scene mode is eliminated, Consumer's Experience is preferably improved.
In order to make it easy to understand, a kind of schematic diagram of the determination method for the screening-mode being referred to shown in Fig. 6, this method bag Include:Spot light detection is carried out by raw image data, and determines regional luminance and contrasts;By obtaining magnitude of angular velocity and adding Velocity amplitude, can analyze shooting angle, the three-dimensional spatial information according to residing for X, Y, Z-direction determine terminal;Wherein it is possible to according to The motion-vector and direction of rotation of magnitude of angular velocity and acceleration magnitude detecting terminal, determine the shooting angle of user, namely really Determine the three-dimensional spatial information residing for terminal.
Night scene detecting and alarm can judge according to above-mentioned three-dimensional spatial information, regional luminance contrast and spot light information Whether current shooting environment is night scene, and then exports the judged result of night scene or non-night scene, can directly be determined based on the result Currently whether enable night scene mode.The specific judgment step of night scene detecting and alarm can be with the flow of reference picture 5, herein not Repeat again.
The aforesaid way that the present embodiment is provided, can combine three-dimensional spatial information, the contrast of each regional luminance and point light Whether source information, comprehensive descision current shooting environment is night scene, and then determines whether to be taken pictures using night scene mode, without The artificial troublesome operation for presetting night scene mode, effectively improves user experience.
Embodiment six:
Corresponding to above example, a kind of structured flowchart of the determining device of screening-mode shown in Figure 7, the device Applied in terminal, specifically including following part:
Region division module 702, for when capturing preview image, preview image to be divided into multiple regions;
Brightness value acquisition module 704, for the rgb value according to each pixel in each region, obtains the brightness in each region Value;
Night scene environment judge module 706, whether for the brightness value according to each region, it is night scene ring to judge current environment Border;
Screening-mode determining module 708, for when the judged result of night scene environment judge module is is, it is determined that current clap Pattern is taken the photograph for night scene mode.
The determining device for the above-mentioned screening-mode that the present embodiment is provided, by the way that preview image is divided into multiple regions, and The brightness value in each region is obtained, and then judges whether current environment is night scene environment according to each zone luminance value, is being defined as When being, it is night scene mode to determine screening-mode.This mode without manually selecting screening-mode in advance, you can bright by each region Angle value determines whether night scene environment and determines night scene mode, eliminates the troublesome operation of artificial selection night scene mode, preferably Improve Consumer's Experience.
The technique effect of the device that the present embodiment is provided, its realization principle and generation is identical with previous embodiment, is letter Describe, device embodiment part does not refer to part, refers to corresponding contents in preceding method embodiment.
Embodiment seven:
The method and apparatus provided corresponding to previous embodiment, present embodiments provide a kind of terminal, including memory And processor, memory, which is used to store, supports the determination method of any screening-mode in computing device above-described embodiment Program, processor is configurable for performing the program stored in memory.
It for details, reference can be made to a kind of structural representation of terminal that can be applied in the embodiment of the present invention shown in Fig. 8.Terminal 100 include mobile data switch controlling device 101, memory 102, storage control 104, one or more (only to be shown in figure One) processor 106, Peripheral Interface 108, radio-frequency module 110, audio-frequency module 112, Touch Screen 114 etc..These components pass through One or more communication bus/signal wire 116 is mutually communicated.
The mobile data switch control that memory 102 can be used in storage software program and module, such as embodiment of the present invention Corresponding programmed instruction/the module of method processed, device, processor 106 by operation be stored in the software program in memory 102 with And module, so as to perform various function application and data processing, such as mobile data provided in an embodiment of the present invention switchs control Method.
Memory 102 may include high speed random access memory, may also include nonvolatile memory, such as one or more magnetic Property storage device, flash memory or other non-volatile solid state memories.Processor 106 and other possible components are to storage The access of device 102 can be carried out under the control of storage control 104.
Various input/output devices are coupled to processor 106 and memory 102 by Peripheral Interface 108.In some implementations In example, Peripheral Interface 108, processor 106 and storage control 104 can be realized in one single chip.In some other reality In example, they can be realized by independent chip respectively.
Radio-frequency module 110 is used to receiving and sending electromagnetic wave, realizes the mutual conversion of electromagnetic wave and electric signal, so that with Communication network or other equipment are communicated.
Audio-frequency module 112 provides a user COBBAIF, and it may include one or more microphones, one or more raises Sound device and voicefrequency circuit.
Touch Screen 114 provides an output and inputting interface simultaneously between terminal 100 and user.In the present embodiment In, above-mentioned Touch Screen 114 supports single-point and multi-point touch operation, for example, the Touch Screen 114 can be support single-point and multiple spot Capacitive touch screen or resistive touch screen of touch control operation etc..Support that single-point and multi-point touch operation are the energy of Touch Screen 114 Sense the touch control operation produced simultaneously from one or more positions on the touch-screen, and the multi-point touch that this is sensed Operation transfers to processor 106 to be handled.
It is appreciated that the structure shown in Fig. 8 is only signal, terminal 100 may also include more more or less than shown in Fig. 8 Component, or with the configuration different from shown in Fig. 8.Each component shown in Fig. 8 can be using hardware, software or its combination Realize.
The embodiment of the present invention additionally provides a kind of computer-readable storage medium, and the determination for saving as above-mentioned screening-mode is filled Computer software instructions used are put, it, which is included, is used to perform the journey designed by the determining device that above-mentioned aspect is screening-mode Sequence.The instruction that said procedure includes can be used for performing the method in previous methods embodiment, implements the method for can be found in and implements Example, will not be repeated here.
Flow chart and block diagram in accompanying drawing show system, method and the computer journey of multiple embodiments according to the present invention Architectural framework in the cards, function and the operation of sequence product.At this point, each square frame in flow chart or block diagram can generation The part of one module of table, program segment or code, the part of the module, program segment or code is used for comprising one or more The executable instruction of logic function as defined in realizing.It should also be noted that in some realizations as replacement, being marked in square frame Function can also with different from the order marked in accompanying drawing occur.For example, two continuous square frames can essentially be basic It is performed in parallel, they can also be performed in the opposite order sometimes, this is depending on involved function.It is also noted that The combination of each square frame in block diagram and/or flow chart and the square frame in block diagram and/or flow chart, can use and perform regulation Function or the special hardware based system of action realize, or the combination of specialized hardware and computer instruction can be used To realize.
, can be with several embodiments provided herein, it should be understood that disclosed mthods, systems and devices Realize by another way.Device embodiment described above is only schematical, for example, the division of the module, only Only a kind of division of logic function, can there is other dividing mode when actually realizing, in another example, multiple module or components can be with With reference to or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, it is shown or discussed Coupling each other or direct-coupling or communication connection can be the indirect coupling of device or unit by some communication interfaces Close or communicate to connect, can be electrical, machinery or other forms.
If the function is realized using in the form of SFU software functional unit and is used as independent production marketing or in use, can be with It is stored in a computer read/write memory medium.Understood based on such, technical scheme is substantially in other words The part contributed to prior art or the part of the technical scheme can be embodied in the form of software product, the meter Calculation machine software product is stored in a storage medium, including some instructions are to cause a computer equipment (can be individual People's computer, server, or network equipment etc.) perform all or part of step of each of the invention embodiment methods described. And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), arbitrary access are deposited Reservoir (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.
Finally it should be noted that:Embodiment described above, is only the embodiment of the present invention, to illustrate the present invention Technical scheme, rather than its limitations, protection scope of the present invention is not limited thereto, although with reference to the foregoing embodiments to this hair It is bright to be described in detail, it will be understood by those within the art that:Any one skilled in the art The invention discloses technical scope in, it can still modify to the technical scheme described in previous embodiment or can be light Change is readily conceivable that, or equivalent substitution is carried out to which part technical characteristic;And these modifications, change or replacement, do not make The essence of appropriate technical solution departs from the spirit and scope of technical scheme of the embodiment of the present invention, should all cover the protection in the present invention Within the scope of.Therefore, protection scope of the present invention described should be defined by scope of the claims.

Claims (12)

1. a kind of determination method of screening-mode, it is characterised in that including:
When terminal captures preview image, the preview image is divided into multiple regions;
According to the rgb value of each pixel in each region, the brightness value in each region is obtained;
Whether according to the brightness value in each region, it is night scene environment to judge current environment;
If it is, determining that current shooting pattern is night scene mode.
2. according to the method described in claim 1, it is characterised in that the brightness value in each region of the basis, judge to work as The step of whether preceding environment is night scene environment, including:
According to the brightness value in each region, judge to whether there is night scene sky and/or night scene light source in the preview image;
When judging to have night scene sky and/or night scene light source, it is night scene environment to determine current environment.
3. method according to claim 2, it is characterised in that the brightness value in each region of the basis, judges institute The step of whether there is night scene sky in preview image is stated, including:
According to current style of shooting, sky areas is chosen from the region marked off;Wherein, the style of shooting includes Horizontal style of shooting and longitudinal style of shooting;
According to the brightness value of the sky areas, judge to whether there is night scene sky in the preview image;
If it is, determining that current environment is night scene environment.
4. method according to claim 3, it is characterised in that the current style of shooting of the basis, from the institute marked off The step of choosing sky areas in region is stated, including:
Obtain the parameter of the acceleration transducer output of the terminal;The parameter includes X, Y, the magnitude of angular velocity of Z-direction;
The style of shooting of the terminal is determined according to the parameter;
Sky areas is chosen from the region marked off according to the style of shooting determined.
5. method according to claim 3, it is characterised in that the brightness value according to the sky areas, judges institute The step of whether there is night scene sky in preview image is stated, including:
When the average brightness value of the sky areas is less than first threshold, or, when brightness value is less than in the sky areas When the ratio of total number of pixels in the number of pixels of Second Threshold and the sky areas is more than setting value, the preview is determined There is night scene sky in image.
6. method according to claim 2, it is characterised in that the brightness value in each region of the basis, judges institute The step of whether there is night scene light source in preview image is stated, including:
Obtain the matching degree of the brightness value and the brightness value of default kenel spot light in each region;
When there is matching degree more than the region for setting matching threshold, determine there is night scene light source in the preview image.
7. method according to claim 2, it is characterised in that the brightness value in each region of the basis, judges to work as The step of whether preceding environment is night scene environment, including:
When night scene sky and night scene light source are not present in the preview image, according to each interregional brightness contrast value Whether judge current environment is night scene environment, or, point out user to determine current shooting pattern.
8. according to the method described in claim 1, it is characterised in that methods described also includes:
When terminal captures preview image, the angular speed parameter of the terminal is obtained;
Judge whether the terminal is in stable state according to the angular speed parameter;
If it is, performing described the step of the preview image is divided into multiple regions;
If not, terminating current operation.
9. according to the method described in claim 1, it is characterised in that the rgb value of each pixel in each region of basis, obtain The step of brightness value in each region, including:
The original RAW data of the preview image are obtained, the RAW data include:The rgb value of each pixel;
The rgb value of each pixel is converted into YUV values;
The brightness value in each region is obtained according to the YUV values of each pixel in each region.
10. the method according to claim any one of 1-9, it is characterised in that methods described also includes:
When it is night scene mode to determine current shooting pattern, shot using the night scene mode.
11. a kind of determining device of screening-mode, it is characterised in that including:
Region division module, for when capturing preview image, the preview image to be divided into multiple regions;
Brightness value acquisition module, for the rgb value according to each pixel in each region, obtains the brightness value in each region;
Night scene environment judge module, whether for the brightness value according to each region, it is night scene environment to judge current environment;
Screening-mode determining module, for when the judged result of the night scene environment judge module is is, determining current shooting Pattern is night scene mode.
12. a kind of terminal, it is characterised in that including memory and processor, the memory, which is used to store, supports processor The program of any one of perform claim requirement 1 to 10 methods described, the processor is configurable for performing in the memory The program of storage.
CN201710477720.0A 2017-06-21 2017-06-21 Shooting mode determining method and device and terminal Active CN107295255B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710477720.0A CN107295255B (en) 2017-06-21 2017-06-21 Shooting mode determining method and device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710477720.0A CN107295255B (en) 2017-06-21 2017-06-21 Shooting mode determining method and device and terminal

Publications (2)

Publication Number Publication Date
CN107295255A true CN107295255A (en) 2017-10-24
CN107295255B CN107295255B (en) 2020-08-04

Family

ID=60096984

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710477720.0A Active CN107295255B (en) 2017-06-21 2017-06-21 Shooting mode determining method and device and terminal

Country Status (1)

Country Link
CN (1) CN107295255B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108501670A (en) * 2018-03-01 2018-09-07 苏涛 Vehicle automatic protective system
CN108569260A (en) * 2018-03-09 2018-09-25 徐琳 Fencing protection plate hoistable platform and method
CN115883957A (en) * 2022-11-22 2023-03-31 荣耀终端有限公司 Shooting mode recommendation method

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1571475A (en) * 2004-05-10 2005-01-26 东南大学 Method of image stability improvement for video camera and assistor thereof
CN101211407A (en) * 2006-12-29 2008-07-02 沈阳东软软件股份有限公司 Diurnal image recognition method and device
US20090051783A1 (en) * 2007-08-23 2009-02-26 Samsung Electronics Co., Ltd. Apparatus and method of capturing images having optimized quality under night scene conditions
CN101494738A (en) * 2008-01-22 2009-07-29 索尼株式会社 Image capturing apparatus, image processing apparatus and method, and program therefor
CN101567976A (en) * 2008-01-22 2009-10-28 索尼株式会社 Image capturing apparatus, control method therefor, and program
CN101630107A (en) * 2008-07-15 2010-01-20 佳能株式会社 Image stabilization control apparatus and imaging apparatus
US20100123815A1 (en) * 2008-11-18 2010-05-20 Samsung Digital Imaging Co., Ltd. Scene information displaying method and apparatus and digital photographing apparatus using the scene information displaying method and apparatus
CN101778220A (en) * 2010-03-01 2010-07-14 华为终端有限公司 Method for automatically switching over night scene mode and image pickup device
CN101783882A (en) * 2009-01-15 2010-07-21 华晶科技股份有限公司 Method and image capturing device for automatically determining scenario mode
US20100329561A1 (en) * 2009-06-29 2010-12-30 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and computer program
CN102547079A (en) * 2010-12-29 2012-07-04 株式会社理光 Night scene light source detection device and method
CN105163110A (en) * 2015-09-02 2015-12-16 厦门美图之家科技有限公司 Camera cleanliness detection method and system and shooting terminal
CN105763814A (en) * 2016-04-26 2016-07-13 深圳众思科技有限公司 Night scene shooting method and apparatus thereof
CN105827902A (en) * 2015-06-19 2016-08-03 维沃移动通信有限公司 Night scene detection method and terminal
CN106210496A (en) * 2015-05-06 2016-12-07 小米科技有限责任公司 Method, photo taking and device
US20170126975A1 (en) * 2015-06-12 2017-05-04 Google Inc. Day and Night Detection Based on One or More of Illuminant Detection, Lux Level Detection, and Tiling

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1571475A (en) * 2004-05-10 2005-01-26 东南大学 Method of image stability improvement for video camera and assistor thereof
CN101211407A (en) * 2006-12-29 2008-07-02 沈阳东软软件股份有限公司 Diurnal image recognition method and device
US20090051783A1 (en) * 2007-08-23 2009-02-26 Samsung Electronics Co., Ltd. Apparatus and method of capturing images having optimized quality under night scene conditions
CN101494738A (en) * 2008-01-22 2009-07-29 索尼株式会社 Image capturing apparatus, image processing apparatus and method, and program therefor
CN101567976A (en) * 2008-01-22 2009-10-28 索尼株式会社 Image capturing apparatus, control method therefor, and program
CN101630107A (en) * 2008-07-15 2010-01-20 佳能株式会社 Image stabilization control apparatus and imaging apparatus
US20100123815A1 (en) * 2008-11-18 2010-05-20 Samsung Digital Imaging Co., Ltd. Scene information displaying method and apparatus and digital photographing apparatus using the scene information displaying method and apparatus
CN101783882A (en) * 2009-01-15 2010-07-21 华晶科技股份有限公司 Method and image capturing device for automatically determining scenario mode
US20100329561A1 (en) * 2009-06-29 2010-12-30 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and computer program
CN101778220A (en) * 2010-03-01 2010-07-14 华为终端有限公司 Method for automatically switching over night scene mode and image pickup device
CN102547079A (en) * 2010-12-29 2012-07-04 株式会社理光 Night scene light source detection device and method
CN106210496A (en) * 2015-05-06 2016-12-07 小米科技有限责任公司 Method, photo taking and device
US20170126975A1 (en) * 2015-06-12 2017-05-04 Google Inc. Day and Night Detection Based on One or More of Illuminant Detection, Lux Level Detection, and Tiling
CN105827902A (en) * 2015-06-19 2016-08-03 维沃移动通信有限公司 Night scene detection method and terminal
CN105163110A (en) * 2015-09-02 2015-12-16 厦门美图之家科技有限公司 Camera cleanliness detection method and system and shooting terminal
CN105763814A (en) * 2016-04-26 2016-07-13 深圳众思科技有限公司 Night scene shooting method and apparatus thereof

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108501670A (en) * 2018-03-01 2018-09-07 苏涛 Vehicle automatic protective system
CN108501670B (en) * 2018-03-01 2021-04-20 姚志新 Automatic protection system for vehicle
CN108569260A (en) * 2018-03-09 2018-09-25 徐琳 Fencing protection plate hoistable platform and method
CN115883957A (en) * 2022-11-22 2023-03-31 荣耀终端有限公司 Shooting mode recommendation method
CN115883957B (en) * 2022-11-22 2023-10-20 荣耀终端有限公司 Shooting mode recommendation method

Also Published As

Publication number Publication date
CN107295255B (en) 2020-08-04

Similar Documents

Publication Publication Date Title
CN109961453B (en) Image processing method, device and equipment
CN113112505B (en) Image processing method, device and equipment
CN100556078C (en) Camera head, image processing apparatus and image processing method
US10728510B2 (en) Dynamic chroma key for video background replacement
CN104883504B (en) Open the method and device of high dynamic range HDR functions on intelligent terminal
CN104902088B (en) Mobile terminal adjusts the method and device of screen intensity
WO2022068584A1 (en) Image processing method and apparatus, computer device, and storage medium
US9148564B2 (en) Image pickup apparatus, information processing system and image data processing method
CN111062993B (en) Color combined painting image processing method, device, equipment and storage medium
CN107295255A (en) Determination method, device and the terminal of screening-mode
WO2022152001A1 (en) Gesture recognition method and apparatus, electronic device, readable storage medium, and chip
CN106060473A (en) Big data processing method and big data processing device
CN109413399A (en) Use the devices and methods therefor of depth map synthetic object
CN106165409A (en) Image processing apparatus, camera head, image processing method and program
CN114494566A (en) Image rendering method and device
WO2024027287A9 (en) Image processing system and method, and computer-readable medium and electronic device
CN113132696A (en) Image tone mapping method, device, electronic equipment and storage medium
CN110266955B (en) Image processing method, image processing apparatus, electronic device, and storage medium
CN105488819B (en) Generation method, image processing method and the device of color template
CN105574834B (en) Image processing method and device
WO2024067461A1 (en) Image processing method and apparatus, and computer device and storage medium
US20130212520A1 (en) Apparatus and method for editing image in portable terminal
CN111836058A (en) Method, device and equipment for real-time video playing and storage medium
CN112489144A (en) Image processing method, image processing apparatus, terminal device, and storage medium
CN112435173A (en) Image processing and live broadcasting method, device, equipment and storage medium

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