CN105828067A - Terminal, method and device for determining whether two cameras are occluded - Google Patents
Terminal, method and device for determining whether two cameras are occluded Download PDFInfo
- Publication number
- CN105828067A CN105828067A CN201610244687.2A CN201610244687A CN105828067A CN 105828067 A CN105828067 A CN 105828067A CN 201610244687 A CN201610244687 A CN 201610244687A CN 105828067 A CN105828067 A CN 105828067A
- Authority
- CN
- China
- Prior art keywords
- blocked
- camera
- brightness histogram
- euclidean distance
- photographic head
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N17/00—Diagnosis, testing or measuring for television systems or their details
- H04N17/002—Diagnosis, testing or measuring for television systems or their details for television cameras
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/50—Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10141—Special mode during image acquisition
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Studio Devices (AREA)
Abstract
The invention discloses a terminal, a method and device for determining whether two cameras are occluded. The method for determining whether the two cameras are occluded is used for the terminal, wherein the terminal is provided with a first camera and a second camera. The method for determining whether the two cameras are occluded includes the following steps that: a first luminance histogram of a current image acquired by the first camera and a second luminance histogram of a current image acquired by the second camera are extracted; the Euclidean distance of the first luminance histogram and the second luminance histogram is calculated; and whether the first camera or the second camera is occluded according to the Euclidean distance. With the method and device provided by the technical schemes of the invention adopted, whether the two cameras of the terminal are occluded can be determined more accurately, and an algorithm for determining whether the two cameras are occluded is simplified.
Description
Technical field
The present invention relates to field of terminal technology, be blocked really in particular to a kind of dual camera
Determine method, determination device that a kind of dual camera is blocked and a kind of terminal.
Background technology
At present, in order to improve the quality of the image that terminal taking arrives, two shootings are installed in the terminal
Head, the most main photographic head and secondary photographic head, main photographic head can gather the color letter of scenery in photographed scene
Breath, secondary photographic head can gather in photographed scene the information such as the profile of scenery, details and brightness.These are two years old
Individual photographic head gathers two width images under Same Scene simultaneously, and by image composing technique by two width figures
As synthesizing a higher-quality image.If the two photographic head there being a photographic head be blocked,
Image will be caused to synthesize unsuccessfully, thus cause shooting high-quality composograph.Relevant
In technology, it is analyzed and judges by the scene at detection terminal place, to determine two photographic head
Whether it is blocked.
But, the Scheme algorithm complexity whether the determination photographic head in correlation technique is blocked all compares
High, accuracy rate is low and poor practicability, if the scene at terminal place changes, no meeting causes flase drop
Survey, the most just reduce Consumer's Experience.
Therefore, the most more accurately determine whether the dual camera of terminal is blocked, simplify simultaneously
Determine that the algorithm whether dual camera is blocked becomes problem demanding prompt solution.
Summary of the invention
The present invention is based on the problems referred to above, it is proposed that a kind of new technical scheme, can be more accurate
Ground determines whether the dual camera of terminal is blocked, and simplifies simultaneously and determines whether dual camera is blocked
Algorithm.
In view of this, a first aspect of the present invention proposes a kind of determination method that dual camera is blocked,
For terminal, described terminal is provided with the first photographic head and second camera, including: extract described
First brightness histogram of the present image of the first camera collection, and extract described second camera
Second brightness histogram of the present image gathered;Calculate described first brightness histogram and described second
The Euclidean distance of brightness histogram;Described first photographic head or described is determined according to described Euclidean distance
Whether second camera is blocked.
In this technical scheme, if the first photographic head and second camera be not in the case of being all blocked,
The brightness histogram of the present image that both collect has certain similarity, and two brightness Nogatas
The Euclidean distance of figure can represent the similarity of the two brightness histogram, it is consequently possible to calculate two
The Euclidean distance of brightness histogram, determines whether that photographic head is blocked, it is to avoid use correlation technique
In the current scene at detection terminal place determine whether photographic head is blocked, thus improve and determine
Accuracy that whether photographic head is blocked and practicality, and then promote Consumer's Experience.Simultaneously by above-mentioned
Scheme can simplify the algorithm determining whether dual camera is blocked, thus improves the effect of algorithm process
Rate.
Preferably, when determining that the first photographic head or second camera are blocked, send photographic head and hidden
The prompting of gear, to point out user and block photographic head to process, thus ensure can basis
The present image that the two camera collection arrives synthesizes the final image that quality is higher.
In technique scheme, it is preferable that described first brightness histogram of described calculating and described the
The step of the Euclidean distance of two brightness histograms, specifically includes:
Described Euclidean distance is calculated by below equation:
Wherein, D (pHist, sHist) represents described Euclidean distance, and pHist (i) represents described first brightness
The number of pixels that in rectangular histogram, the i-th gray value rank in multiple gray value ranks is corresponding, sHist (i)
The i-th gray value rank represented in described second brightness histogram in multiple gray value ranks is corresponding
Number of pixels, L represents multiple gray scales in described first brightness histogram and described second brightness histogram
The number of value rank.
In this technical scheme, calculate the first brightness histogram by above-mentioned formula and the second brightness is straight
The Euclidean distance of side's figure, specifically, the multiple gray value ranks calculating the first brightness histogram are corresponding
The number of pixels number of pixels corresponding with multiple gray value ranks of the second brightness histogram Euclidean away from
From, thus determine the first photographic head or second camera according to the Euclidean distance calculated in above-mentioned formula
Whether it is blocked, and then improves accuracy and the practicality whether detection photographic head is blocked.
In any of the above-described technical scheme, it is preferable that described determine described according to described Euclidean distance
The step whether one photographic head or described second camera are blocked, specifically includes: judge described Europe
Whether family name's distance is more than predetermined threshold value;If described Euclidean distance is more than described predetermined threshold value, it is determined that institute
State the first photographic head or described second camera is blocked.
In this technical scheme, Euclidean distance compared with predetermined threshold value, if Euclidean distance is more than
During predetermined threshold value, illustrate that the difference of the first brightness histogram and the second brightness histogram is the biggest, the most really
In fixed two photographic head at least one be blocked, such that it is able to judge dual camera simply, exactly
Whether it is blocked.
In any of the above-described technical scheme, it is preferable that described predetermined threshold value more than or equal to 3000 and
Less than or equal to 5000.
In this technical scheme, predetermined threshold value is in the range of 3000 to 5000, thus improves judgement
Reliability that whether dual camera is blocked and accuracy.
In any of the above-described technical scheme, it is preferable that at described first camera collection of described extraction
First brightness histogram of present image, and extract the present image of described second camera collection
After the step of the second brightness histogram, including: to described first brightness histogram and described second bright
Degree rectangular histogram is normalized.
In this technical scheme, owing to the first photographic head is different with second camera parameter, take the photograph first
In the case of not all being blocked as head and second camera, the brightness Nogata of its present image collected
Figure also can difference, therefore, the first brightness histogram and the second brightness histogram to extracting enter
Row normalized, with the difference avoiding the first brightness histogram and the second brightness histogram itself to be had
Other to determining photographic head impacts when whether being blocked, further increasing and whether determine photographic head
The accuracy being blocked.
A second aspect of the present invention proposes the determination device that a kind of dual camera is blocked, for terminal,
First photographic head and second camera are installed in described terminal, including: extraction unit, it is used for extracting
First brightness histogram of the present image of described first camera collection, and extract described second and take the photograph
The second brightness histogram as the present image that head gathers;Computing unit, is used for calculating described first bright
Degree rectangular histogram and the Euclidean distance of described second brightness histogram;Determine unit, for according to described Europe
Family name's distance determines whether described first photographic head or described second camera are blocked.
In this technical scheme, if the first photographic head and second camera be not in the case of being all blocked,
The brightness histogram of the present image that both collect has certain similarity, and two brightness Nogatas
The Euclidean distance of figure can represent the similarity of the two brightness histogram, it is consequently possible to calculate two
The Euclidean distance of brightness histogram, determines whether that photographic head is blocked, it is to avoid use correlation technique
In the current scene at detection terminal place determine whether photographic head is blocked, thus improve and determine
Accuracy that whether photographic head is blocked and practicality, and then promote Consumer's Experience.Simultaneously by above-mentioned
Scheme can simplify the algorithm determining whether dual camera is blocked, thus improves the effect of algorithm process
Rate.
Preferably, when determining that the first photographic head or second camera are blocked, send photographic head and hidden
The prompting of gear, to point out user and block photographic head to process, thus ensure can basis
The present image that the two camera collection arrives synthesizes the final image that quality is higher.
In technique scheme, it is preferable that described computing unit specifically for,
Described Euclidean distance is calculated by below equation:
Wherein, D (pHist, sHist) represents described Euclidean distance, and pHist (i) represents described first brightness
The number of pixels that in rectangular histogram, the i-th gray value rank in multiple gray value ranks is corresponding, sHist (i)
The i-th gray value rank represented in described second brightness histogram in multiple gray value ranks is corresponding
Number of pixels, L represents multiple gray scales in described first brightness histogram and described second brightness histogram
The number of value rank.
In this technical scheme, calculate the first brightness histogram by above-mentioned formula and the second brightness is straight
The Euclidean distance of side's figure, specifically, the multiple gray value ranks calculating the first brightness histogram are corresponding
The number of pixels number of pixels corresponding with multiple gray value ranks of the second brightness histogram Euclidean away from
From, thus determine the first photographic head or second camera according to the Euclidean distance calculated in above-mentioned formula
Whether it is blocked, and then improves accuracy and the practicality whether detection photographic head is blocked.
In any of the above-described technical scheme, it is preferable that described determine that unit includes: judging unit, use
In judging that whether described Euclidean distance is more than predetermined threshold value;Described determine unit specifically for, if described
Euclidean distance is more than described predetermined threshold value, it is determined that described first photographic head or described second camera
It is blocked.
In this technical scheme, Euclidean distance compared with predetermined threshold value, if Euclidean distance is more than
During predetermined threshold value, illustrate that the difference of the first brightness histogram and the second brightness histogram is the biggest, the most really
In fixed two photographic head at least one be blocked, such that it is able to judge dual camera simply, exactly
Whether it is blocked.
In any of the above-described technical scheme, it is preferable that described predetermined threshold value more than or equal to 3000 and
Less than or equal to 5000.
In this technical scheme, predetermined threshold value is in the range of 3000 to 5000, thus improves judgement
Reliability that whether dual camera is blocked and accuracy.
In any of the above-described technical scheme, it is preferable that also include: processing unit, for described the
One brightness histogram and described second brightness histogram are normalized.
In this technical scheme, owing to the first photographic head is different with second camera parameter, take the photograph first
In the case of not all being blocked as head and second camera, the brightness Nogata of its present image collected
Figure also can difference, therefore, the first brightness histogram and the second brightness histogram to extracting enter
Row normalized, with the difference avoiding the first brightness histogram and the second brightness histogram itself to be had
Other to determining photographic head impacts when whether being blocked, further increasing and whether determine photographic head
The accuracy being blocked.
A third aspect of the present invention proposes a kind of terminal, including: institute any one of technique scheme
The determination device that the dual camera stated is blocked, therefore, this terminal has appoints in technique scheme
The technique effect that determination device that one described dual camera is blocked is identical, does not repeats them here.
By technical scheme, can more accurately determine the dual camera of terminal whether by
Block, simplify the algorithm determining whether dual camera is blocked simultaneously.
Accompanying drawing explanation
Fig. 1 shows the determination method that dual camera according to an embodiment of the invention is blocked
Schematic flow sheet;
Fig. 2 shows the determination method that dual camera according to another embodiment of the invention is blocked
Schematic flow sheet;
Fig. 3 shows the determination device that dual camera according to an embodiment of the invention is blocked
Block diagram;
Fig. 4 shows the block diagram of terminal according to an embodiment of the invention;
Fig. 5 shows the determination device that dual camera according to an embodiment of the invention is blocked
Principle schematic;
Fig. 6 shows the schematic diagram of the dual camera of terminal according to an embodiment of the invention;
Fig. 7 shows the schematic diagram of terminal interface according to an embodiment of the invention;
Fig. 8 A and Fig. 8 B shows what dual camera according to an embodiment of the invention collected
The brightness histogram of image.
Detailed description of the invention
In order to the above-mentioned purpose of the present invention, feature and advantage can be more clearly understood that, below in conjunction with attached
The present invention is further described in detail by figure and detailed description of the invention.It should be noted that not
In the case of conflict, the feature in embodiments herein and embodiment can be mutually combined.
Elaborate a lot of detail in the following description so that fully understanding the present invention, but,
The present invention can implement to use other to be different from other modes described here, therefore, and the present invention
Protection domain do not limited by following public specific embodiment.
Fig. 1 shows the determination method that dual camera according to an embodiment of the invention is blocked
Schematic flow sheet.
As it is shown in figure 1, the determination method that dual camera according to an embodiment of the invention is blocked,
For terminal, described terminal is provided with the first photographic head and second camera, including:
Step 102, extracts the first brightness histogram of the present image of described first camera collection,
And extract the second brightness histogram of the present image that described second camera gathers.
Step 104, calculate the Euclidean of described first brightness histogram and described second brightness histogram away from
From.
Step 106, determines described first photographic head or described second shooting according to described Euclidean distance
Whether head is blocked.
In this technical scheme, if the first photographic head and second camera be not in the case of being all blocked,
The brightness histogram of the present image that both collect has certain similarity, and two brightness Nogatas
The Euclidean distance of figure can represent the similarity of the two brightness histogram, it is consequently possible to calculate two
The Euclidean distance of brightness histogram, determines whether that photographic head is blocked, it is to avoid use correlation technique
In the current scene at detection terminal place determine whether photographic head is blocked, thus improve and determine
Accuracy that whether photographic head is blocked and practicality, and then promote Consumer's Experience.Simultaneously by above-mentioned
Scheme can simplify the algorithm determining whether dual camera is blocked, thus improves the effect of algorithm process
Rate.
Preferably, when determining that the first photographic head or second camera are blocked, send photographic head and hidden
The prompting of gear, to point out user and block photographic head to process, thus ensure can basis
The present image that the two camera collection arrives synthesizes the final image that quality is higher.
In technique scheme, it is preferable that step 104 specifically includes:
Described Euclidean distance is calculated by below equation:
Wherein, D (pHist, sHist) represents described Euclidean distance, and pHist (i) represents described first brightness Nogata
The number of pixels that in figure, the i-th gray value rank in multiple gray value ranks is corresponding, sHist (i) represents
The pixel that in described second brightness histogram, the i-th gray value rank in multiple gray value ranks is corresponding
Number, L represents multiple gray value levels in described first brightness histogram and described second brightness histogram
Other number.
In this technical scheme, calculate the first brightness histogram by above-mentioned formula and the second brightness is straight
The Euclidean distance of side's figure, specifically, the multiple gray value ranks calculating the first brightness histogram are corresponding
The number of pixels number of pixels corresponding with multiple gray value ranks of the second brightness histogram Euclidean away from
From, thus determine the first photographic head or second camera according to the Euclidean distance calculated in above-mentioned formula
Whether it is blocked, and then improves accuracy and the practicality whether detection photographic head is blocked.
In any of the above-described technical scheme, it is preferable that step 106 specifically includes: judge described Euclidean
Whether distance is more than predetermined threshold value;If described Euclidean distance is more than described predetermined threshold value, it is determined that described
First photographic head or described second camera are blocked.
In this technical scheme, Euclidean distance compared with predetermined threshold value, if Euclidean distance is more than
During predetermined threshold value, illustrate that the difference of the first brightness histogram and the second brightness histogram is the biggest, the most really
In fixed two photographic head at least one be blocked, such that it is able to judge dual camera simply, exactly
Whether it is blocked.
In any of the above-described technical scheme, it is preferable that described predetermined threshold value more than or equal to 3000 and
Less than or equal to 5000.
In this technical scheme, predetermined threshold value is in the range of 3000 to 5000, thus improves judgement
Reliability that whether dual camera is blocked and accuracy.
In any of the above-described technical scheme, it is preferable that after step 102, including: to described
One brightness histogram and described second brightness histogram are normalized.
In this technical scheme, owing to the first photographic head is different with second camera parameter, take the photograph first
In the case of not all being blocked as head and second camera, the brightness Nogata of its present image collected
Figure also can difference, therefore, the first brightness histogram and the second brightness histogram to extracting enter
Row normalized, with the difference avoiding the first brightness histogram and the second brightness histogram itself to be had
Other to determining photographic head impacts when whether being blocked, further increasing and whether determine photographic head
The accuracy being blocked.
Fig. 2 shows the determination method that dual camera according to another embodiment of the invention is blocked
Schematic flow sheet.
As in figure 2 it is shown, the determination side that dual camera according to another embodiment of the invention is blocked
Method, including:
Step 202, starts the double of terminal and takes the photograph module, and the first photographic head and second i.e. starting terminal is taken the photograph
As head.
Step 204, extraction is double takes the photograph brightness histogram, i.e. extracts the current figure that the first camera collection arrives
First brightness histogram of picture, and the second brightness extracting the present image that second camera collects is straight
Fang Tu.
Step 206, takes the photograph brightness histogram (the i.e. first brightness histogram and the second brightness histogram) to double
It is normalized.
Step 208, calculates double Euclidean distance taking the photograph brightness histogram.
Step 210, data analysis, and judge whether photographic head is blocked?When judged result is for being,
Enter step 212, otherwise, enter step 214.Specifically, it is judged that double Europe taking the photograph brightness histogram
Whether family name's distance is more than predetermined threshold value, and if so, explanation is double takes the photograph the difference of brightness histogram relatively greatly, and then
Illustrate that the image difference that the two camera collection arrives is bigger, it is determined that at the first photographic head and second
Photographic head there is a photographic head be blocked.
Step 212, prompting user's photographic head is blocked.
Step 214, it is judged that whether user presses shutter?When judged result is for being, enter step
216, otherwise, enter step 204.
Step 216, if judging, user presses shutter, then record image.Specifically by the first photographic head
The present image that the present image collected and second camera collect synthesizes, to synthesize pledge
Measure higher image.
Fig. 3 shows the determination device that dual camera according to an embodiment of the invention is blocked
Block diagram.
As it is shown on figure 3, the determination device that dual camera according to an embodiment of the invention is blocked
300, for terminal, described terminal is provided with the first photographic head and second camera, including: carry
Taking unit 302, computing unit 304 and determine unit 306, described extraction unit 302 is used for extracting
First brightness histogram of the present image of described first camera collection, and extract described second and take the photograph
The second brightness histogram as the present image that head gathers;Described computing unit 304, is used for calculating institute
State the Euclidean distance of the first brightness histogram and described second brightness histogram;Described determine unit 306,
For determining whether described first photographic head or described second camera are hidden according to described Euclidean distance
Gear.
In this technical scheme, if the first photographic head and second camera be not in the case of being all blocked,
The brightness histogram of the present image that both collect has certain similarity, and two brightness Nogatas
The Euclidean distance of figure can represent the similarity of the two brightness histogram, it is consequently possible to calculate two
The Euclidean distance of brightness histogram, determines whether that photographic head is blocked, it is to avoid use correlation technique
In the current scene at detection terminal place determine whether photographic head is blocked, thus improve and determine
Accuracy that whether photographic head is blocked and practicality, and then promote Consumer's Experience.Simultaneously by above-mentioned
Scheme can simplify the algorithm determining whether dual camera is blocked, thus improves the effect of algorithm process
Rate.
Preferably, when determining that the first photographic head or second camera are blocked, send photographic head and hidden
The prompting of gear, to point out user and block photographic head to process, thus ensure can basis
The present image that the two camera collection arrives synthesizes the final image that quality is higher.
In technique scheme, it is preferable that described computing unit 304 specifically for,
Described Euclidean distance is calculated by below equation:
Wherein, D (pHist, sHist) represents described Euclidean distance, and pHist (i) represents described first brightness
The number of pixels that in rectangular histogram, the i-th gray value rank in multiple gray value ranks is corresponding, sHist (i)
The i-th gray value rank represented in described second brightness histogram in multiple gray value ranks is corresponding
Number of pixels, L represents multiple gray scales in described first brightness histogram and described second brightness histogram
The number of value rank.
In this technical scheme, calculate the first brightness histogram by above-mentioned formula and the second brightness is straight
The Euclidean distance of side's figure, specifically, the multiple gray value ranks calculating the first brightness histogram are corresponding
The number of pixels number of pixels corresponding with multiple gray value ranks of the second brightness histogram Euclidean away from
From, thus determine the first photographic head or second camera according to the Euclidean distance calculated in above-mentioned formula
Whether it is blocked, and then improves accuracy and the practicality whether detection photographic head is blocked.
In any of the above-described technical scheme, it is preferable that described determine that unit 306 includes: judging unit
3062, it is used for judging that whether described Euclidean distance is more than predetermined threshold value;Described determine that unit 306 is concrete
For, if described Euclidean distance is more than described predetermined threshold value, it is determined that described first photographic head or institute
State second camera to be blocked.
In this technical scheme, Euclidean distance compared with predetermined threshold value, if Euclidean distance is more than
During predetermined threshold value, illustrate that the difference of the first brightness histogram and the second brightness histogram is the biggest, the most really
In fixed two photographic head at least one be blocked, such that it is able to judge dual camera simply, exactly
Whether it is blocked.
In any of the above-described technical scheme, it is preferable that described predetermined threshold value more than or equal to 3000 and
Less than or equal to 5000.
In this technical scheme, predetermined threshold value is in the range of 3000 to 5000, thus improves judgement
Reliability that whether dual camera is blocked and accuracy.
In any of the above-described technical scheme, it is preferable that also include: processing unit 308, for institute
State the first brightness histogram and described second brightness histogram is normalized.
In this technical scheme, owing to the first photographic head is different with second camera parameter, take the photograph first
In the case of not all being blocked as head and second camera, the brightness Nogata of its present image collected
Figure also can difference, therefore, the first brightness histogram and the second brightness histogram to extracting enter
Row normalized, with the difference avoiding the first brightness histogram and the second brightness histogram itself to be had
Other to determining photographic head impacts when whether being blocked, further increasing and whether determine photographic head
The accuracy being blocked.
Fig. 4 shows the block diagram of terminal according to an embodiment of the invention.
As shown in Figure 4, terminal 400 according to an embodiment of the invention, including: above-mentioned technology
The determination device 300 that dual camera according to any one of scheme is blocked, therefore, this terminal 400
Have identical with the determination device 300 that the dual camera according to any one of technique scheme is blocked
Technique effect, do not repeat them here.
Fig. 5 shows the determination device that dual camera according to an embodiment of the invention is blocked
Principle schematic;Fig. 6 shows showing of the dual camera of terminal according to an embodiment of the invention
It is intended to;Fig. 7 shows the schematic diagram of terminal interface according to an embodiment of the invention.
Technical scheme is described in detail below in conjunction with Fig. 5 to Fig. 7:
As it is shown in figure 5, the determination device that dual camera according to an embodiment of the invention is blocked
500 include: main camera module 502, secondary camera module 504, data processing module 506, Europe
Family name's distance calculation module 508 and threshold value judgment module 510, first pass through main camera module 502 and obtain
Take the present image that main photographic head (the first photographic head) collects, and extract the first of this present image
Brightness histogram, is normalized this first brightness histogram, and by pair shooting head mould
Block 504 obtains the present image that secondary photographic head (second camera) collects, and extracts this and currently scheme
Second brightness histogram of picture, is normalized this second brightness histogram.Then by number
According to processing module 506 by many in the first brightness histogram after normalized and the second brightness histogram
Number of pixels corresponding to individual gray value rank is individually placed in two arrays.Oldham distance calculating module
508 for calculating the Euclidean distance between the number of pixels in these two arrays.Threshold value judgment module
512 for judging that double Euclidean distance of brightness histogram of taking the photograph, whether more than predetermined threshold value, if so, illustrates
Double difference taking the photograph brightness histogram are relatively big, further relate to the image difference ratio that the two camera collection arrives
Bigger, it is determined that to have a photographic head to be blocked in the first photographic head and second camera.
As shown in Figure 6, by the color information of the image of main camera collection current scene, secondary shooting
Head gathers the information such as the profile of image, details and the brightness of current scene, will by image composing technique
Two width images synthesize a higher-quality image.As it is shown in fig. 7, the image of synthesis is carried out pre-
Look at, however, it is determined that when dual camera is blocked, display "!Dual camera is blocked " information,
The dual camera blocked is processed, so that the dual camera blocked is in time with prompting user
Non-occlusion state.
Fig. 8 A and Fig. 8 B shows what dual camera according to an embodiment of the invention collected
The brightness histogram of image.
For extracting the brightness histogram of the present image that camera collection arrives, first obtain present image
In multiple pixels in the gray value rank belonging to each pixel, and add up in multiple gray value rank
Number of pixels corresponding to each gray value rank, using multiple gray value ranks as abscissa, by right
Should the number of pixels of each gray value rank as vertical coordinate, such that it is able to count the bright of present image
Degree rectangular histogram.Alternatively brightness histogram is one-dimensional discrete function:
Wherein, SKFor the kth level gray value of present image, L (such as, L is 256) represents bright
The number of multiple gray value ranks, n in degree rectangular histogramkFor multiple pixels of present image have ash
Angle value is SKThe number of pixel, n represents the total quantity of the multiple pixels in present image, p (SK) table
Show SKThe estimated probability occurred in a plurality of pixels, therefore, brightness histogram gives present image
The distribution situation of gray value, it may also be said to give the gray value of multiple pixels in present image
Whole description.
Owing to the main photographic head of terminal and the distance of secondary photographic head are close, at main photographic head and secondary photographic head
In the case of not being blocked, the brightness histogram of the two present image collected is relatively.But,
The brightness histogram of the present image that the main camera collection that Fig. 8 A is illustrated that in terminal arrives, Fig. 8 B
The brightness histogram of the present image that the secondary camera collection being illustrated that in terminal arrives, it is seen then that figure
The difference of two shown in 8A and Fig. 8 B brightness histogram is bigger, specifically, it can be determined that two
Whether the Euclidean distance of brightness histogram is more than predetermined threshold value, and if so, explanation is double takes the photograph brightness histogram
Difference is relatively big, further relates to the image difference that the two camera collection arrives bigger, it is determined that the
One photographic head and second camera there is a photographic head be blocked.
Technical scheme is described in detail above in association with accompanying drawing, can more accurately determine end
Whether the dual camera of end is blocked, and simplifies the algorithm determining whether dual camera is blocked simultaneously.
In the present invention, term " first ", " second " are only used for the purpose described, and can not manage
Solve as instruction or hint relative importance;Term " multiple " represents two or more.For this
For the those of ordinary skill in field, can understand that above-mentioned term is in the present invention as the case may be
Concrete meaning.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for
For those skilled in the art, the present invention can have various modifications and variations.All essences in the present invention
Within god and principle, any modification, equivalent substitution and improvement etc. made, should be included in the present invention
Protection domain within.
Claims (11)
1. the determination method that dual camera is blocked, for terminal, described terminal is provided with
First photographic head and second camera, it is characterised in that including:
Extract the first brightness histogram of the present image of described first camera collection, and extract institute
State the second brightness histogram of the present image that second camera gathers;
Calculate the Euclidean distance of described first brightness histogram and described second brightness histogram;
Determine whether described first photographic head or described second camera are hidden according to described Euclidean distance
Gear.
The determination method that dual camera the most according to claim 1 is blocked, it is characterised in that
The step of the Euclidean distance of described first brightness histogram of described calculating and described second brightness histogram,
Specifically include:
Described Euclidean distance is calculated by below equation:
Wherein, D (pHist, sHist) represents described Euclidean distance, and pHist (i) represents described first brightness
The number of pixels that in rectangular histogram, the i-th gray value rank in multiple gray value ranks is corresponding, sHist (i)
The i-th gray value rank represented in described second brightness histogram in multiple gray value ranks is corresponding
Number of pixels, L represents multiple gray scales in described first brightness histogram and described second brightness histogram
The number of value rank.
The determination method that dual camera the most according to claim 1 is blocked, it is characterised in that
Described determine whether described first photographic head or described second camera are hidden according to described Euclidean distance
The step of gear, specifically includes:
Judge that whether described Euclidean distance is more than predetermined threshold value;
If described Euclidean distance is more than described predetermined threshold value, it is determined that described first photographic head or described
Second camera is blocked.
The determination method that dual camera the most according to claim 3 is blocked, it is characterised in that
Described predetermined threshold value is more than or equal to 3000 and less than or equal to 5000.
The determination method that dual camera the most according to any one of claim 1 to 4 is blocked,
It is characterized in that, at the first brightness Nogata of the present image of described first camera collection of described extraction
Figure, and extract described second camera gather present image the second brightness histogram step it
After, including:
Described first brightness histogram and described second brightness histogram are normalized.
6. the determination device that dual camera is blocked, for terminal, described terminal is provided with
First photographic head and second camera, it is characterised in that including:
Extraction unit, for extracting the first brightness Nogata of the present image of described first camera collection
Figure, and extract the second brightness histogram of the present image that described second camera gathers;
Computing unit, for calculating the Europe of described first brightness histogram and described second brightness histogram
Family name's distance;
Determine unit, for determining described first photographic head or described second according to described Euclidean distance
Whether photographic head is blocked.
The determination device that dual camera the most according to claim 6 is blocked, it is characterised in that
Described computing unit specifically for,
Described Euclidean distance is calculated by below equation:
Wherein, D (pHist, sHist) represents described Euclidean distance, and pHist (i) represents described first brightness
The number of pixels that in rectangular histogram, the i-th gray value rank in multiple gray value ranks is corresponding, sHist (i)
The i-th gray value rank represented in described second brightness histogram in multiple gray value ranks is corresponding
Number of pixels, L represents multiple gray scales in described first brightness histogram and described second brightness histogram
The number of value rank.
The determination device that dual camera the most according to claim 6 is blocked, it is characterised in that
Described determine that unit includes:
Judging unit, is used for judging that whether described Euclidean distance is more than predetermined threshold value;
Described determine unit specifically for, if described Euclidean distance is more than described predetermined threshold value, it is determined that
Described first photographic head or described second camera are blocked.
The determination device that dual camera the most according to claim 8 is blocked, it is characterised in that
Described predetermined threshold value is more than or equal to 3000 and less than or equal to 5000.
10. the determination device being blocked according to the dual camera according to any one of claim 6 to 9,
It is characterized in that, also include:
Processing unit, for returning described first brightness histogram and described second brightness histogram
One change processes.
11. 1 kinds of terminals, it is characterised in that including: institute as any one of claim 6 to 10
The determination device that the dual camera stated is blocked.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610244687.2A CN105828067A (en) | 2016-04-19 | 2016-04-19 | Terminal, method and device for determining whether two cameras are occluded |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610244687.2A CN105828067A (en) | 2016-04-19 | 2016-04-19 | Terminal, method and device for determining whether two cameras are occluded |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105828067A true CN105828067A (en) | 2016-08-03 |
Family
ID=56527050
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610244687.2A Pending CN105828067A (en) | 2016-04-19 | 2016-04-19 | Terminal, method and device for determining whether two cameras are occluded |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105828067A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105828068A (en) * | 2016-05-06 | 2016-08-03 | 北京奇虎科技有限公司 | Method and device for carrying out occlusion detection on camera and terminal device |
CN106572349A (en) * | 2016-11-18 | 2017-04-19 | 维沃移动通信有限公司 | Camera cleanliness detection method and mobile terminal |
CN107197148A (en) * | 2017-06-14 | 2017-09-22 | 深圳传音通讯有限公司 | Image pickup method, device and electronic equipment |
CN110503771A (en) * | 2019-07-25 | 2019-11-26 | 福建巨昂信息技术有限公司 | A kind of coconut vending machine high safety goods taking device |
CN110971785A (en) * | 2019-11-15 | 2020-04-07 | 北京迈格威科技有限公司 | Camera shielding state detection method and device, terminal and storage medium |
CN111080571A (en) * | 2019-11-15 | 2020-04-28 | 北京迈格威科技有限公司 | Camera shielding state detection method and device, terminal and storage medium |
CN111885371A (en) * | 2020-06-01 | 2020-11-03 | 北京迈格威科技有限公司 | Image occlusion detection method and device, electronic equipment and computer readable medium |
CN111970405A (en) * | 2020-08-21 | 2020-11-20 | Oppo(重庆)智能科技有限公司 | Camera shielding detection method, storage medium, electronic device and device |
WO2021063245A1 (en) * | 2019-09-30 | 2021-04-08 | 虹软科技股份有限公司 | Image processing method and image processing apparatus, and electronic device applying same |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102036013A (en) * | 2009-10-02 | 2011-04-27 | 三洋电机株式会社 | Imaging apparatus |
CN102231223A (en) * | 2011-06-02 | 2011-11-02 | 深圳中兴力维技术有限公司 | Foreign object blocking and alarming method used for camera |
WO2014017317A1 (en) * | 2012-07-27 | 2014-01-30 | 日産自動車株式会社 | Three-dimensional object detection device and foreign object detection device |
CN104036474A (en) * | 2014-06-12 | 2014-09-10 | 厦门美图之家科技有限公司 | Automatic adjustment method for image brightness and contrast |
CN104240235A (en) * | 2014-08-26 | 2014-12-24 | 北京君正集成电路股份有限公司 | Method and system for detecting whether camera is covered or not |
CN104539939A (en) * | 2014-12-17 | 2015-04-22 | 惠州Tcl移动通信有限公司 | Lens cleanliness detection method and system based on mobile terminal |
WO2015085034A1 (en) * | 2013-12-06 | 2015-06-11 | Google Inc. | Camera selection based on occlusion of field of view |
CN104811690A (en) * | 2015-04-01 | 2015-07-29 | 广东欧珀移动通信有限公司 | Message prompting method and device |
CN105122794A (en) * | 2013-04-02 | 2015-12-02 | 谷歌公司 | Camera obstruction detection |
CN105163110A (en) * | 2015-09-02 | 2015-12-16 | 厦门美图之家科技有限公司 | Camera cleanliness detection method and system and shooting terminal |
-
2016
- 2016-04-19 CN CN201610244687.2A patent/CN105828067A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102036013A (en) * | 2009-10-02 | 2011-04-27 | 三洋电机株式会社 | Imaging apparatus |
CN102231223A (en) * | 2011-06-02 | 2011-11-02 | 深圳中兴力维技术有限公司 | Foreign object blocking and alarming method used for camera |
WO2014017317A1 (en) * | 2012-07-27 | 2014-01-30 | 日産自動車株式会社 | Three-dimensional object detection device and foreign object detection device |
CN105122794A (en) * | 2013-04-02 | 2015-12-02 | 谷歌公司 | Camera obstruction detection |
WO2015085034A1 (en) * | 2013-12-06 | 2015-06-11 | Google Inc. | Camera selection based on occlusion of field of view |
CN104036474A (en) * | 2014-06-12 | 2014-09-10 | 厦门美图之家科技有限公司 | Automatic adjustment method for image brightness and contrast |
CN104240235A (en) * | 2014-08-26 | 2014-12-24 | 北京君正集成电路股份有限公司 | Method and system for detecting whether camera is covered or not |
CN104539939A (en) * | 2014-12-17 | 2015-04-22 | 惠州Tcl移动通信有限公司 | Lens cleanliness detection method and system based on mobile terminal |
CN104811690A (en) * | 2015-04-01 | 2015-07-29 | 广东欧珀移动通信有限公司 | Message prompting method and device |
CN105163110A (en) * | 2015-09-02 | 2015-12-16 | 厦门美图之家科技有限公司 | Camera cleanliness detection method and system and shooting terminal |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105828068A (en) * | 2016-05-06 | 2016-08-03 | 北京奇虎科技有限公司 | Method and device for carrying out occlusion detection on camera and terminal device |
CN106572349A (en) * | 2016-11-18 | 2017-04-19 | 维沃移动通信有限公司 | Camera cleanliness detection method and mobile terminal |
CN107197148A (en) * | 2017-06-14 | 2017-09-22 | 深圳传音通讯有限公司 | Image pickup method, device and electronic equipment |
CN110503771A (en) * | 2019-07-25 | 2019-11-26 | 福建巨昂信息技术有限公司 | A kind of coconut vending machine high safety goods taking device |
WO2021063245A1 (en) * | 2019-09-30 | 2021-04-08 | 虹软科技股份有限公司 | Image processing method and image processing apparatus, and electronic device applying same |
US12131490B2 (en) | 2019-09-30 | 2024-10-29 | Arcsoft Corporation Limited | Image processing method and image processing apparatus, and electronic device using same |
CN110971785A (en) * | 2019-11-15 | 2020-04-07 | 北京迈格威科技有限公司 | Camera shielding state detection method and device, terminal and storage medium |
CN111080571A (en) * | 2019-11-15 | 2020-04-28 | 北京迈格威科技有限公司 | Camera shielding state detection method and device, terminal and storage medium |
CN110971785B (en) * | 2019-11-15 | 2022-04-29 | 北京迈格威科技有限公司 | Camera shielding state detection method and device, terminal and storage medium |
CN111080571B (en) * | 2019-11-15 | 2023-10-20 | 北京迈格威科技有限公司 | Camera shielding state detection method, device, terminal and storage medium |
CN111885371A (en) * | 2020-06-01 | 2020-11-03 | 北京迈格威科技有限公司 | Image occlusion detection method and device, electronic equipment and computer readable medium |
CN111970405A (en) * | 2020-08-21 | 2020-11-20 | Oppo(重庆)智能科技有限公司 | Camera shielding detection method, storage medium, electronic device and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105828067A (en) | Terminal, method and device for determining whether two cameras are occluded | |
CN101605209B (en) | Image pick up device and image reproduction device | |
CN102663444B (en) | Method for preventing account number from being stolen and system thereof | |
US20110221933A1 (en) | Backlight detection device and backlight detection method | |
CN105915785A (en) | Double-camera shadedness determining method and device, and terminal | |
CN103905727B (en) | Object area tracking apparatus, control method, and program of the same | |
CN107615334A (en) | Object detector and object identification system | |
US20110234765A1 (en) | Image processing apparatus, image processing method, image processing program, and compound eye digital camera | |
CN108171250A (en) | Object detection method and device | |
CN103942525A (en) | Real-time face optimal selection method based on video sequence | |
CN109510946B (en) | HDR scene detection method and system | |
CN103945088B (en) | scene recognition method and device | |
CN106558046A (en) | A kind of quality determining method and detection means of certificate photo | |
JP4159159B2 (en) | Advertising media evaluation device | |
Goldmann et al. | Temporal synchronization in stereoscopic video: Influence on quality of experience and automatic asynchrony detection | |
CN111970405A (en) | Camera shielding detection method, storage medium, electronic device and device | |
US10074209B2 (en) | Method for processing a current image of an image sequence, and corresponding computer program and processing device | |
CN106331848B (en) | The recognition methods of panoramic video and equipment play video method and equipment | |
CN101299239A (en) | Method and device for acquiring character area image and character recognition system | |
CN109587394A (en) | A kind of intelligence patterning process, electronic equipment and storage medium | |
CN104954627B (en) | A kind of information processing method and electronic equipment | |
EP3163865A1 (en) | Picture processing method and electronic device | |
CN116781857B (en) | Video conference background processing system and method | |
CN112637573A (en) | Multi-lens switching display method and system, intelligent terminal and storage medium | |
CN107995476B (en) | Image processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160803 |
|
RJ01 | Rejection of invention patent application after publication |