CN103942523B - A kind of sunshine scene recognition method and device - Google Patents

A kind of sunshine scene recognition method and device Download PDF

Info

Publication number
CN103942523B
CN103942523B CN201310027029.4A CN201310027029A CN103942523B CN 103942523 B CN103942523 B CN 103942523B CN 201310027029 A CN201310027029 A CN 201310027029A CN 103942523 B CN103942523 B CN 103942523B
Authority
CN
China
Prior art keywords
image
sun
scene
described image
scene characteristic
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.)
Active
Application number
CN201310027029.4A
Other languages
Chinese (zh)
Other versions
CN103942523A (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.)
Huawei Device Co Ltd
Original Assignee
Huawei Device 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 Huawei Device Co Ltd filed Critical Huawei Device Co Ltd
Priority to CN201310027029.4A priority Critical patent/CN103942523B/en
Publication of CN103942523A publication Critical patent/CN103942523A/en
Application granted granted Critical
Publication of CN103942523B publication Critical patent/CN103942523B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

Embodiment of the invention discloses that a kind of sunshine scene recognition method and device, are related to image processing field, it is possible to increase the accuracy of identification of sunshine scene.This method includes:Gather image;The view data of described image and the metadata of described image are obtained, and the position of sun in described image is detected according to the metadata of described image data and described image;The scene characteristic of the position of sun is extracted in described image, the scene characteristic of the position of sun is matched with the scene characteristic of the position of sun prestored, scene Recognition result is generated.Embodiments of the invention are applied to image procossing.

Description

A kind of sunshine scene recognition method and device
Technical field
The present invention relates to image processing field, more particularly to a kind of sunshine scene recognition method and device.
Background technology
The scene information that scene Recognition technology is reflected by the analysis to picture material, cognitive map picture, such as blue sky, day Fall, backlight etc..Scene Recognition can be understood as an item of image sorting technique, be under the jurisdiction of image understanding (Image ) and computer vision (ComputerVision) field Understanding.
Scene Recognition has a wide range of applications, such as:Image/video retrieval, intelligence configure parameter etc. of taking pictures, digital at present Intelligent scene identification function on camera is popularized very much, under different scenes, and automatically selection is best suitable for this to camera The parameter of taking pictures of scene, so as to realize the lifting for effect of taking pictures.In existing technological means, mainly by extracting image Metadata (metadata), and an image scene classification judgement is generated according to metadata features;Extract characteristics of image, such as face Color, texture etc., scene classification judgement is generated according to characteristics of image;Two court verdicts of fusion generate final image scene classification Judgement, or directly carry out scene Recognition by analyzing picture material.However, it is found by the inventors that in the prior art, it is single By metadata or figure as feature carries out scene Recognition easily inaccurate into recognition result, and when by metadata and passing through Scene classification court verdict that characteristics of image is generated respectively is integrated when carrying out scene Recognition, if by metadata and to pass through image special Levy when the scene classification court verdict generated respectively is differed and scene Recognition misjudgment phenomenon just occurs, therefore above method is difficult Accurately realize scene Recognition.
The content of the invention
Embodiments of the invention provide a kind of sunshine scene recognition method and device, it is possible to increase the identification essence of sunshine scene Degree.
To reach above-mentioned purpose, embodiments of the invention are adopted the following technical scheme that:
On the one hand there is provided a kind of sunshine scene recognition method, including:
Gather image;
The view data of described image and the metadata of described image are obtained, and according to described image data and described image Metadata detection described image in position of sun;
The scene characteristic of the position of sun is extracted in described image, by the scene characteristic of the position of sun and in advance The scene characteristic of the position of sun of storage is matched, and generates scene Recognition result.
In the first possible implementation, with reference in a first aspect, the scene characteristic by the position of sun with Before the scene characteristic of the position of sun prestored is matched, in addition to:
According to sample scene capturing sample image;
The scene characteristic of position of sun is extracted in the sample image, and is stored as the position of sun prestored Scene characteristic.
It is described by the position of sun with reference to the first possible implementation in second of possible implementation Scene characteristic matched with the scene characteristic of the position of sun prestored, generate scene Recognition result, including:
The scene characteristic of the position of sun is matched with the scene characteristic of the position of sun prestored, will be described Corresponding to the scene characteristic matched in the scene characteristic of the position of sun prestored with the scene characteristic of the position of sun The sample scene is used as the scene Recognition result.
In the third possible implementation, with reference in a first aspect, the view data for obtaining described image and institute The metadata of image is stated, and position of sun in described image, bag are detected according to the metadata of described image data and described image Include:
View data and First Kind Graph picture that picture signal processing obtains described image are carried out to the described image collected Metadata;
The Equations of The Second Kind image metadata of described image is obtained by aspect sensor;
Solar direction judgement is carried out according to the First Kind Graph pel data and the Equations of The Second Kind image metadata;
When solar direction is preset in the First Kind Graph pel data and Equations of The Second Kind image metadata matching, according to institute State position of sun described in Equations of The Second Kind image metadata and described image Data Detection.
It is described according to the Equations of The Second Kind with reference to second of possible implementation in the 4th kind of possible implementation Position of sun described in image metadata and described image Data Detection, including:
The sun is obtained according to the Equations of The Second Kind image metadata and rises or falls reference direction of the direction in described image;
Described image is divided into wide subgraph according to described image data according to the reference direction;
The mean luminance differences of the adjacent subgraph are calculated, two adjacent subgraph mean luminance differences are more than The location determination of two subgraphs of predetermined threshold value is the position of sun.
In the 5th kind of possible implementation, with reference to any one possible realization side in first aspect or first aspect Formula, the scene characteristic that the position of sun is extracted in described image includes:
Calculate in described image and to be risen or fallen in the sun on direction at the position of sun described in the image of both sides Scene characteristic, the scene characteristic includes First Kind Graph pel data and Equations of The Second Kind image metadata.
In the 6th kind of possible implementation, with reference to the third in first aspect, the 4th kind or the 5th kind of possible realization Any one possible implementation in mode, the First Kind Graph pel data includes:The color of described image, resolution Rate, brightness, white balance, the image acquisition time of described image or time for exposure;
The Equations of The Second Kind image metadata includes:Pass through gravity or magnetic force or image perception during collection described image The bearing data of acquisition.
Second aspect there is provided a kind of sunshine scene identifying device, including:
Image acquisition units, for gathering image;
Image identification unit, view data and the figure for obtaining the described image that described image collecting unit is gathered The metadata of picture, and the position of sun in described image is detected according to the metadata of described image data and described image;And The scene characteristic of the position of sun is extracted in described image, by the scene characteristic of the position of sun and the sun prestored The scene characteristic of position is matched, and generates scene Recognition result.
In the first possible implementation, with reference to second aspect, specifically include:
Described image collecting unit is additionally operable to, according to sample scene capturing sample image;
Described image recognition unit is additionally operable to extract the scene characteristic of position of sun in the sample image, and is stored as The scene characteristic of the position of sun prestored.
In second of possible implementation, with reference to the first possible implementation, described image recognition unit tool Body is used to be matched the scene characteristic of the position of sun with the scene characteristic of the position of sun prestored, will be described pre- Institute corresponding to the scene characteristic matched in the scene characteristic of the position of sun first stored with the scene characteristic of the position of sun Sample scene is stated as the scene Recognition result.
In the third possible implementation, with reference to second aspect, described image recognition unit includes:
Image procossing subelement, the described image for being collected to described image collecting unit carries out picture signal processing Obtain the view data and First Kind Graph pel data of described image;
Detection sub-unit, the Equations of The Second Kind image metadata for obtaining described image by aspect sensor;
Just subelement is sentenced, for handling First Kind Graph pel data or the detection that subelement is obtained according to described image The Equations of The Second Kind image metadata that subelement is obtained carries out solar direction judgement;
Position detection sub-unit, the First Kind Graph pel data and described second are judged for sentencing subelement at the beginning of described During the default solar direction of class image metadata matching, the Equations of The Second Kind image metadata that is obtained according to the detection sub-unit and described Position of sun in the described image Data Detection described image that image procossing subelement is obtained.
In possible implementation in the 4th, with reference to the third possible implementation, the position detection sub-unit Including:
Reference direction acquisition module, exists for rising or falling direction according to the Equations of The Second Kind image metadata acquisition sun Reference direction in described image;
Figure splits module, for the reference direction that is determined according to the reference direction acquisition module by described image It is divided into wide subgraph;
Position computation module, for calculating the average bright of the adjacent subgraph that described image segmentation module segmentation goes out Degree is poor, and it is described that two adjacent subgraph mean luminance differences are more than to the location determination of two subgraphs of predetermined threshold value Position of sun.
In five kinds of possible implementations, with reference to any one possible realization side in second aspect or second aspect Formula, described image recognition unit is specifically additionally operable to:Calculate in described image the sun rise or fall on direction it is described too The scene characteristic of both sides image at positive position, the scene characteristic includes First Kind Graph pel data and Equations of The Second Kind image primitive Data.
Sunshine scene recognition method and device that embodiments of the invention are provided, by by first number of view data and image According to knot merga pass once match the identification that judging process realizes scene, effectively improve sunrise sunset scene identification essence Degree.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying drawings.
A kind of sunshine scene identifying device structural representation that Fig. 1 provides for embodiments of the invention;
A kind of sunshine scene identifying device structural representation that Fig. 2 provides for another embodiment of the present invention;
A kind of device structure schematic diagram for application sunshine scene identifying device that Fig. 3 provides for embodiments of the invention;
A kind of sunshine scene recognition method schematic flow sheet that Fig. 4 provides for embodiments of the invention;
A kind of sunshine scene recognition method schematic flow sheet that Fig. 5 provides for another embodiment of the present invention;
Fig. 6 is a kind of position of sun calculating process schematic flow sheet of another embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
A kind of sunshine scene identifying device of embodiments of the invention shown in reference picture 1, the device be specifically as follows camera, Camera module on video camera, mobile phone or palm PC, specifically, the device includes:
Image acquisition units 11, for gathering image.
Image identification unit 12, view data and first number of image for obtaining the image that image acquisition units 11 are gathered According to, and the position of sun in view data and the metadata detection image of image;And position of sun is extracted in the picture Scene characteristic, the scene characteristic of position of sun is matched with the scene characteristic of the position of sun prestored, generates scene Recognition result.
Optionally, image acquisition units 11 are additionally operable to, according to sample scene capturing sample image.
Image identification unit 12 is additionally operable to, and the scene characteristic of position of sun is extracted in sample image, and is stored as in advance The scene characteristic of the position of sun of storage;Wherein, image identification unit 12 is specifically for by the scene characteristic of position of sun and in advance The scene characteristic of the position of sun first stored is matched, by the scene characteristic of the position of sun prestored with position of sun Scene characteristic matching scene characteristic corresponding to sample scene be used as scene Recognition result.
So sunshine scene identifying device can first carry out the sun in image according to view data and the metadata of image The detection of position, then the scene of the position of sun according to the scene characteristic of the position of sun prestored to being extracted in image is special Levying progress, once matching (judging process) can obtain unique scene Recognition result, it is to avoid the generation of misjudgment phenomenon.
The sunshine scene identifying device that embodiments of the invention are provided, passes through the knot in view data and the metadata of image Merga pass once matches the identification that judging process realizes scene, effectively improves the accuracy of identification of sunrise sunset scene.
Shown in reference picture 2,3, by taking the mobile phone for the sunshine scene identifying device that application embodiments of the invention are provided as an example, i.e., Illustrated by taking the mobile phone for possessing camera function as an example, the sunshine scene identifying device includes:
Image acquisition units 21, for gathering image;The specific image acquisition units can use mirror as shown in Figure 2 Head 21a and imaging sensor 21b, wherein imaging sensor 21b are generally divided into CCD for converting optical signals into electric signal (Charge-coupled Device, charge coupled cell) and CMOS (Complementary Metal Oxide Semiconductor, complementary metal oxide semiconductor) two major classes, imaging sensor 21b pass through camera lens 21a gather image;Tool The image acquisition units 21 of body are additionally operable to according to sample scene capturing sample image, and its process is identical with image acquisition process no longer Repeat.
Image identification unit 22, view data and first number of image for obtaining the image that image acquisition units 21 are gathered According to, and the position of sun in view data and the metadata detection image of image;And position of sun is extracted in the picture Scene characteristic, the scene characteristic of position of sun is matched with the scene characteristic of the position of sun prestored, generates scene Recognition result.
The specific image identification unit 22 can include image-signal processor 22a, sensing processor 22b and identification is calculated Method processor 22c, wherein image-signal processor 22a as image identification unit 22 image procossing subelement 221 be used for pair The image that image acquisition units 21 are collected carries out the view data and First Kind Graph pixel number that picture signal processing obtains image According to, the picture signal of the imaging sensor 21b outputs specifically for handling front end, the color of progress bad point detection acquisition image, The first kind metadata such as resolution ratio, brightness, white balance, image acquisition time or time for exposure.
Sensing processor 22b is used for the Equations of The Second Kind that described image is obtained by aspect sensor as detection sub-unit 222 Image metadata;Certainly sensing directional implement body here can include:Gravity sensor, magnetometric sensor or image sensing Device, waits the sensor judged as orientation, when obtaining direction as aspect sensor using imaging sensor, can directly adopt With the recognition result of image acquisition units 21.
Recognizer processor 22c, which is used to realize, just sentences subelement 223 and position detection sub-unit 224, wherein just sentencing son Unit 223, what First Kind Graph pel data or detection sub-unit 222 for being obtained according to image procossing subelement 221 were obtained Equations of The Second Kind image metadata carries out solar direction judgement;Position detection sub-unit 224, was judged for sentencing subelement 223 originally When one class image metadata and the default solar direction of Equations of The Second Kind image metadata matching, the obtained according to detection sub-unit 222 Position of sun in the view data detection image that two class image metadatas and image procossing subelement 221 are obtained.
The position detection sub-unit 224 includes:
Reference direction acquisition module 2241, for obtaining the sun side of rising or falling according to the Equations of The Second Kind image metadata To the reference direction in described image.
Figure splits module 2242, for the reference side determined according to view data according to reference direction acquisition module 2241 To dividing an image into wide subgraph.
Position computation module 2243, for calculating the average bright of the adjacent subgraph that image segmentation module 2243 is partitioned into Degree is poor, and the location determination for two subgraphs that two adjacent sub- mean picture brightness differences are more than into predetermined threshold value is sun position Put.
Image identification unit 22 is calculated by recognizer processor 22c and risen or fallen in image in the sun on direction too The scene characteristic of both sides image at positive position, scene characteristic includes First Kind Graph pel data and Equations of The Second Kind image metadata.
Certainly, image identification unit 22 is additionally operable to extract the scene characteristic of position of sun in sample image, and is stored as The scene characteristic of the position of sun prestored;The process is calculated with image identification unit 22 by recognizer processor 22c The method of the scene characteristic of image is identical, and the scene characteristic that position of sun is simply extracted in sample image can consider sun position It is one position of sun of known i.e. each sample scene correspondence to put.Finally, image identification unit 12 is handled by recognizer Device 22c is matched the scene characteristic of position of sun with the scene characteristic of the position of sun prestored, by what is prestored Sample scene corresponding to the scene characteristic matched in the scene characteristic of position of sun with the scene characteristic of position of sun is as field Scape recognition result.
So, sunshine scene identifying device can according to view data and the metadata of image (be specially the first image with Data and the second image metadata) (specific detection process is calculated referring to above-mentioned identification for the detection of position of sun that first carries out in image Method processor 22c concrete processing procedure), then according to the scene characteristic of position of sun that prestores to being extracted in image The scene characteristic of position of sun carries out once matching (judging process) is that can obtain unique scene Recognition result, it is to avoid erroneous judgement The generation of phenomenon.
During certainly by taking mobile phone as an example, the mobile phone can also include back-end image processor 23 and display 24 and image storage Device 25, wherein, back-end image processor 23 increases according to the scene Recognition result of recognizer processor to the image of input By force, comprising denoising, contrast enhancing is sharpened, stored after color treatments to image processor 25, user can pass through display 23 Image is checked, or is transferred to network, PC (personal computer, personal computer) machine etc..
Based on existing smart mobile phone function, in apparatus above embodiment, the function of each processor, which is realized, can pass through hand Machine CPU (Central Processing Unit, central processing unit) carries out overall control, user can by touch-screen or The sunshine scene identifying device that the form of button realizes man-machine interaction to control embodiments of the invention to be provided.
The function performed by sunshine scene identifying device that embodiments of the invention described above are provided can be by a processor Perform, here is omitted.
The sunshine scene identifying device that embodiments of the invention are provided, passes through the knot in view data and the metadata of image Merga pass once matches the identification that judging process realizes scene, effectively improves the accuracy of identification of sunrise sunset scene.
The sunshine scene recognition method that embodiments of the invention are provided can be applied to camera, mobile phone, palm PC etc. Electronic equipment, specifically, shown in reference picture 4, the sunshine scene recognition method includes:
301st, image is gathered.
302nd, the view data of image and the metadata of image are obtained, and is detected according to view data and the metadata of image Position of sun in image.
303rd, the scene characteristic of position of sun is extracted in the picture, by the scene characteristic of position of sun with prestoring too The scene characteristic of positive position is matched, and generates scene Recognition result.
So, the detection of the position of sun in image can be first carried out according to view data and the metadata of image, then The scene characteristic of position of sun according to the scene characteristic of the position of sun prestored to being extracted in image is once matched (judging process) be that can obtain unique scene Recognition result, it is to avoid the generation of misjudgment phenomenon.
The sunshine scene recognition method that embodiments of the invention are provided, passes through the knot in view data and the metadata of image Merga pass once matches the identification that judging process realizes scene, effectively improves the accuracy of identification of sunrise sunset scene.
Shown in reference picture 4, embodiments of the invention provide a kind of recognition methods of sunshine scene, including:
401st, image is gathered.
402nd, view data and First Kind Graph pixel number that picture signal processing obtains image are carried out to the image collected According to.
403rd, the Equations of The Second Kind image metadata of image is obtained by aspect sensor.
Wherein, First Kind Graph pel data includes:The color of image, resolution ratio, brightness, white balance, the image of image are adopted Collection time or time for exposure;Equations of The Second Kind image metadata includes:Pass through gravity or magnetic force or image perception in collection image process The bearing data of acquisition.
404th, solar direction judgement is carried out according to First Kind Graph pel data and Equations of The Second Kind image metadata.
405th, when solar direction is preset in First Kind Graph pel data and the matching of Equations of The Second Kind image metadata, according to Equations of The Second Kind Image metadata and view data detection position of sun.
Shown in reference picture 5, position of sun is detected according to Equations of The Second Kind image metadata and view data in step 405, specifically Including:
405a, according to Equations of The Second Kind image metadata obtain the sun rise or fall the reference direction of direction in the picture.
Here Equations of The Second Kind metadata is the bearing data obtained by gravity or magnetic force or image perception, it is of course possible to used The aspect sensors such as gravity, magnetic force or imaging sensor are obtained.
405b, wide subgraph is divided an image into according to reference direction.
405c, the mean luminance differences for calculating adjacent subgraph, two adjacent sub- mean picture brightness differences are more than pre- If the location determination of two subgraphs of threshold value is position of sun.
406th, the scene characteristic for rising or falling both sides image at position of sun on direction in image in the sun is calculated, will too The scene characteristic of positive position is matched with the scene characteristic of the position of sun prestored, generates scene Recognition result.
The scene characteristic includes First Kind Graph pel data and Equations of The Second Kind image metadata.
Wherein according to step 405 by the scene characteristic of the position of sun and the scene characteristic of position of sun prestored Before being matched, in addition to:
401a, according to sample scene capturing sample image.
402a, the scene characteristic for extracting in sample image position of sun, and the position of sun for being stored as prestoring Scene characteristic.
Wherein, the scene characteristic of position of sun and the scene characteristic of the position of sun prestored are carried out in step 406 Matching, generates scene Recognition result, is specially:
The scene characteristic of position of sun is matched with the scene characteristic of the position of sun prestored, will be prestored Position of sun scene characteristic in sample scene conduct corresponding to the scene characteristic that is matched with the scene characteristic of position of sun Scene Recognition result.
So, according to view data and the metadata of image (being specially the first image and data and the second image metadata) The detection (specific detection process embodiment shown in Figure 5) of the position of sun in image is first carried out, then basis is deposited in advance The scene characteristic of position of sun of the scene characteristic of the position of sun of storage to being extracted in image carries out once matching (judging process) It can obtain unique scene Recognition result, it is to avoid the generation of misjudgment phenomenon.
The sunshine scene recognition method that embodiments of the invention are provided, passes through the knot in view data and the metadata of image Merga pass once matches the identification that judging process realizes scene, effectively improves the accuracy of identification of sunrise sunset scene.
Specifically by taking mobile phone photograph as an example, reference picture 3 is illustrated, and user opens the image capture software on mobile phone, such as Camera function etc., light is projected on imaging sensor 21b by camera lens 21a, and imaging sensor 21b converts light signals into electricity Signal formation view data, view data passes through image-signal processor 22a processing, goes out to be schemed in back-end image processor 23 Display 24 is shown to after image intensifying algorithm process, at this moment user sees preview screen of taking pictures.
Meanwhile, the view data of user's preview enters recognizer processor 22c through image-signal processor 22a processing, Recognizer processor 22c obtains metadata from mobile phone sensing processor 22b and image-signal processor 22a, by member The analysis of data and view data, produce current scene whether recognition result, and send the scene information of identification to figure As signal processor 22a and back-end image processor 23, image-signal processor 22a and back-end image processor 23 are according to identification Scene information intelligence selection parameter, so as to realize for preview and the optimization for effect of taking pictures under selected sunshine scene.Such as, Under sunrise/sunset scene, image-signal processor 22a can adjust AWB, and (Automatic white balance are put down in vain automatically Weighing apparatus) scope of statistics, suitably increase red gain.Back-end image processor 23 lifts image overall contrast, appropriate enhancing figure As saturation degree so that sunset/sunrise scene is more splendid.
By taking sunset/sunrise scene Recognition as an example, specific embodiments of the invention provide processing procedure as described below, this The sunshine scene recognizer of embodiment analyzes preview image of taking pictures, and generally 30 frames are per second, whole sunset/sunrise scene Recognition Algorithm is divided into training (as shown in step 401a and 402a in Fig. 2) and recognizes the two large divisions (as shown in 401-406 in Fig. 2).Instruction Practice part by the study to a large amount of sunsets/sunrise sample, generate the disaggregated model for recognizing sunset/sunrise scene, the portion Divide it is considered that position of sun is known, and does not need equipment automatic identification.Identification division for input image, according to figure As the result extraction feature of the aspect sensor processing on signal processor 22a, mobile phone, and by the feature of extraction with training part Sunset/sunrise scene classification model carry out matching judgement.Recognizer processor 22c, which is extracted, can reflect that sunset/day appears on the scene The characteristics of image of scape feature, these features include image YUV (a kind of colour coding method) average and variance, image top and the bottom The mean luminance differences divided, inclined red pixel ratio, the time for exposure, gravity sensor value, photo opporunity etc., and according to machine learning Method analyze a large amount of training samples, generate the disaggregated model for detecting sunset/sunrise scene.Wherein machine learning method is Can be SVM (support vector machine SVMs).Recognizer processor 22c combination sensing processors 22b information, calculates mobile phone towards ground, towards day, towards information such as all directions, and sensing processor 22b can use gravity here One kind or multiple combination in sensor, magnetometric sensor, imaging sensor calculate the direction of mobile phone.Recognizer processor The first kind metadata such as the photo opporunity that 22c combination image-signal processors 22a is obtained and mobile phone orientation information refusal fall that A little is not the scene of sunset/sunrise, for example, scene of the mobile phone towards ground or towards day is not sunset/sunrise scene;Photo opporunity (i.e. image acquisition time) in the morning 3 points to 9 points and mobile phone towards east, or photo opporunity in the afternoon 3 points at 9 points in evening and hand Machine is likely to be sunset/sunrise scene towards the scene in west.Sun position in recognizer processor 22c detection images to be recognized Put.In typical sunset scene, sun above section image is substantially bright in the sun once parts of images, moreover, red pixel partially Big focus mostly on is appeared in sun above section image.Detect after position of sun, characteristic extracting module is calculated on position of sun Square image and the sun lower images mean luminance differences, and the ratio of inclined red pixel in sun upper images is calculated, count simultaneously Calculate partially blue, the partially green and partially red pixel ratio of position of sun lower images.For non-sunset scene, it can generally also examine A false position of sun is measured, but the characteristics of image extracted according to this position of sun can not meet top and become clear, it is partially red, The upper part or the specific orientation of lower part of the sun in the feature on lower section very dark and color saturation ground, certain above example It is that reference direction is used as using the direction reflection that rises or falls of the sun in the picture.
Wherein, mobile phone direction is judged according to aspect sensor, is specifically as follows and mobile phone screen is judged according to gravity sensor Reverses direction, setting (gX, gY, g Z) is value of the gravity sensor in (x, y, z) direction, then setting mobile phone screen overturns 0 degree Direction be microphone below receiver, at this moment the value of gravity sensor is that gX is approximately equal to zero, and gY is much larger than 0;Set mobile phone screen It is microphone on the right side of receiver to turn over and turn 90 degrees direction, and at this moment the value of gravity sensor is that gY is approximately equal to 0, and gX is much larger than 0;Set hand Machine screen turning turnback direction be microphone above receiver, at this moment the value of gravity sensor is that gX is approximately equal to 0, and gX is much smaller than 0;It is microphone on the left of receiver to set mobile phone screen and overturn 270 degree directions, and at this moment the value of gravity sensor is approximately equal to 0 for gY, and GX is much smaller than 0.The photographer's face walking direction mobile phone screen reverses direction that can certainly be detected according to front camera, Now aspect sensor may be considered an imaging sensor, it is assumed that photographer, which is vertical head, shoots sunset/day Go out scene, if the face eyes line detected is perpendicular to mobile phone microphone receiver line, and face is in microphone direction, then The mobile phone screen of correspondence setting overturns 0 degree of direction, naturally it is also possible to set mobile phone reverses direction according to using gravity sensor Principle sets other reference directions.
Finally for the detection of position of sun, after reference direction determination, it will be inputted according to mobile phone screen reverses direction Image is divided into the subgraph slice parallel to horizontal fixed width, and the direction from horizon to day calculates adjacent sub-images successively The mean luminance differences of bar, position of sun is calculated according to adjacent sub-images mean luminance differences, and position of sun refers to from horizon here To the corresponding image coordinate of the upward sun of old name for the Arabian countries in the Middle East, if the mean luminance differences of adjacent sub-images are more than given threshold value, then the sun Position is exactly this boundary position to subgraph bar;Or the mean luminance differences of all adjacent sub-images bars are calculated, correspondence is maximum The boundary position of the adjacent sub-images bar of mean luminance differences is the position of sun detected;Or the calculating time of correspondence position of sun Go through from horizon to all possible positions in sky direction so that the maximum position of above image and image lower section mean luminance differences is just It is the position of sun detected.Then recognizer processor 22c extracts sunset/sunrise scene characteristic, with the classification trained Model Matching, formed whether be sunset/sunrise scene judgement.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be contained Cover within protection scope of the present invention.Therefore, protection scope of the present invention described should be defined by scope of the claims.

Claims (11)

1. a kind of sunshine scene recognition method, it is characterised in that including:
Gather image;
View data and First Kind Graph pixel number that picture signal processing obtains described image are carried out to the described image collected According to;
The Equations of The Second Kind image metadata of described image is obtained by aspect sensor;
Solar direction judgement is carried out according to the First Kind Graph pel data and the Equations of The Second Kind image metadata;
When the First Kind Graph pel data and the default solar direction of Equations of The Second Kind image metadata matching, according to described the Two class image metadatas and described image Data Detection position of sun;
The scene characteristic of the position of sun is extracted in described image, by the scene characteristic of the position of sun with prestoring The scene characteristic of position of sun matched, generate scene Recognition result.
2. according to the method described in claim 1, it is characterised in that the scene characteristic by the position of sun with depositing in advance Before the scene characteristic of the position of sun of storage is matched, in addition to:
According to sample scene capturing sample image;
The scene characteristic of position of sun is extracted in the sample image, and is stored as the field of the position of sun prestored Scape feature.
3. method according to claim 2, it is characterised in that the scene characteristic by the position of sun with depositing in advance The scene characteristic of the position of sun of storage is matched, and generates scene Recognition result, including:
The scene characteristic of the position of sun is matched with the scene characteristic of the position of sun prestored, will be described advance Described in corresponding to the scene characteristic matched in the scene characteristic of the position of sun of storage with the scene characteristic of the position of sun Sample scene is used as the scene Recognition result.
4. according to the method described in claim 1, it is characterised in that described according to the Equations of The Second Kind image metadata and the figure The position of sun as described in Data Detection, including:
The sun is obtained according to the Equations of The Second Kind image metadata and rises or falls reference direction of the direction in described image;
Described image is divided into wide subgraph according to described image data according to the reference direction;
The mean luminance differences of the adjacent subgraph are calculated, two adjacent subgraph mean luminance differences are more than default The location determination of two subgraphs of threshold value is the position of sun.
5. method according to claim 4, it is characterised in that the field that the position of sun is extracted in described image Scape feature, including:
Calculate the scene for rising or falling both sides image at the position of sun on direction in described image in the sun Feature, the scene characteristic includes First Kind Graph pel data and Equations of The Second Kind image metadata.
6. according to the method described in claim 1, it is characterised in that
The First Kind Graph pel data includes:The color of described image, resolution ratio, brightness, white balance, the image of described image Acquisition time or time for exposure;
The Equations of The Second Kind image metadata includes:Obtained during gathering described image by gravity or magnetic force or image perception Bearing data.
7. a kind of sunshine scene identifying device, it is characterised in that including:
Image acquisition units, for gathering image;
Image identification unit, the view data and described image of the described image for obtaining the collection of described image collecting unit Metadata, and the position of sun in described image is detected according to the metadata of described image data and described image;And described The scene characteristic of the position of sun is extracted in image, by the scene characteristic of the position of sun and the position of sun prestored Scene characteristic matched, generate scene Recognition result;
Described image recognition unit includes:
Image procossing subelement, the described image for being collected to described image collecting unit carries out picture signal processing and obtained The view data and First Kind Graph pel data of described image;
Detection sub-unit, the Equations of The Second Kind image metadata for obtaining described image by aspect sensor;
Just subelement is sentenced, for handling First Kind Graph pel data and detection son list that subelement is obtained according to described image The Equations of The Second Kind image metadata that member is obtained carries out solar direction judgement;
Position detection sub-unit, the First Kind Graph pel data and the Equations of The Second Kind figure are judged for sentencing subelement at the beginning of described When solar direction is preset in pel data matching, the Equations of The Second Kind image metadata and described image obtained according to the detection sub-unit Handle the position of sun in the described image Data Detection described image that subelement is obtained.
8. device according to claim 7, it is characterised in that
Described image collecting unit is additionally operable to, according to sample scene capturing sample image;
Described image recognition unit is additionally operable to, and the scene characteristic of position of sun is extracted in the sample image, and is stored as institute State the scene characteristic of the position of sun prestored.
9. device according to claim 8, it is characterised in that described image recognition unit is specifically for by sun position The scene characteristic put is matched with the scene characteristic of the position of sun prestored, by the position of sun prestored The sample scene corresponding to the scene characteristic matched in scene characteristic with the scene characteristic of the position of sun is as described Scene Recognition result.
10. device according to claim 7, it is characterised in that the position detection sub-unit includes:
Reference direction acquisition module, direction is risen or fallen described for obtaining the sun according to the Equations of The Second Kind image metadata Reference direction in image;
Figure splits module, and the reference direction for being determined according to described image data according to the reference direction acquisition module will Described image is divided into wide subgraph;
Position computation module, the mean flow rate for calculating the adjacent subgraph that described image segmentation module segmentation goes out Difference, two adjacent subgraph mean luminance differences are more than predetermined threshold value two subgraphs location determination for it is described too Positive position.
11. device according to claim 10, it is characterised in that described image recognition unit is specifically additionally operable to:Calculate institute State in image and to rise or fall the scene characteristic of both sides image at the position of sun on direction, the field in the sun Scape feature includes First Kind Graph pel data and Equations of The Second Kind image metadata.
CN201310027029.4A 2013-01-18 2013-01-18 A kind of sunshine scene recognition method and device Active CN103942523B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310027029.4A CN103942523B (en) 2013-01-18 2013-01-18 A kind of sunshine scene recognition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310027029.4A CN103942523B (en) 2013-01-18 2013-01-18 A kind of sunshine scene recognition method and device

Publications (2)

Publication Number Publication Date
CN103942523A CN103942523A (en) 2014-07-23
CN103942523B true CN103942523B (en) 2017-11-03

Family

ID=51190189

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310027029.4A Active CN103942523B (en) 2013-01-18 2013-01-18 A kind of sunshine scene recognition method and device

Country Status (1)

Country Link
CN (1) CN103942523B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108600630A (en) * 2018-05-10 2018-09-28 Oppo广东移动通信有限公司 Photographic method, device and terminal device
CN111797873A (en) * 2019-04-09 2020-10-20 Oppo广东移动通信有限公司 Scene recognition method and device, storage medium and electronic equipment
CN110944163A (en) * 2019-11-21 2020-03-31 维沃移动通信有限公司 Image processing method and electronic equipment
WO2021195879A1 (en) * 2020-03-30 2021-10-07 深圳市大疆创新科技有限公司 Image sensor protection method and device, image acquisition device, and unmanned aerial vehicle
CN114286000B (en) * 2021-12-27 2023-06-16 展讯通信(上海)有限公司 Image color processing method and device and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101277394A (en) * 2007-02-19 2008-10-01 精工爱普生株式会社 Information processing method, information processing apparatus and program
CN101895684A (en) * 2009-05-22 2010-11-24 奥林巴斯映像株式会社 Photographing condition control device, camera and photographing condition control method
CN102177719A (en) * 2009-01-06 2011-09-07 松下电器产业株式会社 Apparatus for detecting direction of image pickup device and moving body comprising same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101277394A (en) * 2007-02-19 2008-10-01 精工爱普生株式会社 Information processing method, information processing apparatus and program
CN102177719A (en) * 2009-01-06 2011-09-07 松下电器产业株式会社 Apparatus for detecting direction of image pickup device and moving body comprising same
CN101895684A (en) * 2009-05-22 2010-11-24 奥林巴斯映像株式会社 Photographing condition control device, camera and photographing condition control method

Also Published As

Publication number Publication date
CN103942523A (en) 2014-07-23

Similar Documents

Publication Publication Date Title
CN111402135B (en) Image processing method, device, electronic equipment and computer readable storage medium
CN103942523B (en) A kind of sunshine scene recognition method and device
US8345986B2 (en) Image processing apparatus, image processing method and computer readable-medium
US11233933B2 (en) Method and device for processing image, and mobile terminal
CN101882034B (en) Device and method for discriminating color of touch pen of touch device
CN110691193B (en) Camera switching method and device, storage medium and electronic equipment
EP3480784B1 (en) Image processing method, and device
CN103929596A (en) Method and device for guiding shooting picture composition
CN101442679B (en) Automatic white balance control system and method thereof
CN107770521B (en) Camera shooting mode method of adjustment
CN104021419B (en) A kind of method and apparatus for counting paper number
CN103501413B (en) Method and system for controlling post camera to focus and take pictures with front camera
JP2016151955A (en) Image processing apparatus, imaging device, distance measuring device, and image processing method
CN108090428A (en) A kind of face identification method and its system
CN109359577B (en) System for detecting number of people under complex background based on machine learning
CN112434546A (en) Face living body detection method and device, equipment and storage medium
CN101794406A (en) Automatic counting system for density of Bemisia tabaci adults
CN110363087B (en) Long-baseline binocular face in-vivo detection method and system
KR102098819B1 (en) Method and apparatus for wireless automated meter reading of analog meter
CN103297670A (en) Subject determination apparatus and subject determination method
WO2023071882A1 (en) Human eye gaze detection method, control method and related device
CN111866374A (en) Image shooting method and device, pan-tilt camera and storage medium
WO2023005827A1 (en) Exposure compensation method and apparatus, and electronic device
CN107948618A (en) Image processing method, device, computer-readable recording medium and computer equipment
CN109191398A (en) Image processing method, device, computer readable storage medium and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20171030

Address after: Metro Songshan Lake high tech Industrial Development Zone, Guangdong Province, Dongguan City Road 523808 No. 2 South Factory (1) project B2 -5 production workshop

Patentee after: HUAWEI terminal (Dongguan) Co., Ltd.

Address before: 518129 Longgang District, Guangdong, Bantian HUAWEI base B District, building 2, building No.

Patentee before: Huawei Device Co., Ltd.

CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 523808 Southern Factory Building (Phase I) Project B2 Production Plant-5, New Town Avenue, Songshan Lake High-tech Industrial Development Zone, Dongguan City, Guangdong Province

Patentee after: Huawei Device Co., Ltd.

Address before: 523808 Southern Factory Building (Phase I) Project B2 Production Plant-5, New Town Avenue, Songshan Lake High-tech Industrial Development Zone, Dongguan City, Guangdong Province

Patentee before: HUAWEI terminal (Dongguan) Co., Ltd.