CN105631883B - A kind of method and apparatus of target area in determining image - Google Patents
A kind of method and apparatus of target area in determining image Download PDFInfo
- Publication number
- CN105631883B CN105631883B CN201511031777.5A CN201511031777A CN105631883B CN 105631883 B CN105631883 B CN 105631883B CN 201511031777 A CN201511031777 A CN 201511031777A CN 105631883 B CN105631883 B CN 105631883B
- Authority
- CN
- China
- Prior art keywords
- unit
- setting
- area
- continuous
- brightness degree
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 36
- 238000010586 diagram Methods 0.000 description 11
- 238000004590 computer program Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 238000012986 modification Methods 0.000 description 5
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000035040 seed growth Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000004321 preservation Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image 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/10004—Still image; Photographic image
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a kind of method and apparatus of the target area in determining image, for solve the problem of it is existing in the prior art when being shot using electronic equipment it is difficult to be accurately captured projected image.Method includes:If the image collected is divided into a unit, and calculate the average brightness value of each unit;According to the correspondence of preset average brightness value and brightness degree, the corresponding brightness degree of the average brightness value of each unit is determined;When brightness degree is greater than or equal to the first condition of number satisfaction setting of the unit of given threshold in the images, from the image, at least one continuous luminance area is determined;From at least one continuous luminance area, choose comprising the most continuous luminance area of pixel;When the number for the pixel for including in selected continuous luminance area meets the second condition of setting, using selected continuous luminance area as target area, so as to use electronic equipment quickly and accurately to capture highlighted image.
Description
Technical field
The present invention relates to technical field of image processing, more particularly to the method and dress of the target area in a kind of determining image
It sets.
Background technology
In daily life and work, people often participate in the activities such as meeting, training, speech.At the scene, participant is often used
Projecting apparatus is by the required content told about to present to audience on the form flash to projection screen of PPT.In order to by useful projection
Image is recorded in time, and participant spectators usually use the electronic equipments such as mobile phone, tablet computer, digital camera will be on projection screen
Projected image shoot and be saved in the electronic equipment of oneself, in order to subsequent reference use.
Due to using projecting apparatus play image when, in order to ensure played projected image can by scene sight
Crowd is clearly seen that, the brightness of the light of ambient enviroment is needed to be less than the brightness of projection screen, the brightness of the light of ambient enviroment
Bigger with the contrast of the brightness of projection screen, the projected image that spectators are seen is more clear.Due to ambient enviroment light it is bright
Spend low, the brightness height of projection screen so that when being shot using electronic equipment, it is difficult to be accurately captured projected image.
Invention content
An embodiment of the present invention provides a kind of method and apparatus of the target area in determining image, for solving existing skill
The brightness of light present in art due to ambient enviroment is low, and the brightness of projection screen is high so that is shot using electronic equipment
When, it is difficult to the problem of being accurately captured projected image.
The method of target area in a kind of determining image provided in an embodiment of the present invention, including:
If the image collected is divided into a unit, and calculate the average brightness value of each unit;
According to the correspondence of preset average brightness value and brightness degree, the average brightness value pair of each unit is determined
The brightness degree answered;
Brightness degree is greater than or equal to the first condition of the number satisfaction setting of the unit of given threshold in described image
When, from described image, determine at least one continuous luminance area, each unit pair for including in the continuous luminance area
The brightness degree answered be all higher than or equal to setting luminance threshold;
From at least one continuous luminance area, choose comprising the most continuous luminance area of pixel;
It, will be selected when the number for the pixel for including in selected continuous luminance area meets the second condition of setting
The continuous luminance area taken is as target area.
Optionally, the number for the unit that brightness degree is greater than or equal to given threshold in described image meets the first of setting
Condition, including:
Brightness degree is greater than or equal to first of number more than or equal to setting of the unit of given threshold in described image
Threshold value;Or the unit that brightness degree is greater than or equal to the number of the unit of given threshold in described image and described image includes
Total number ratio be greater than or equal to setting second threshold.
Optionally, described image meet setting first condition after, from described image, determine it is at least one
Before continuous luminance area, further include:Continuous treatment is carried out to described image;
From described image, at least one continuous luminance area is determined, including:Determine the image after continuous treatment
At least one of continuous luminance area.
Optionally, continuous treatment is carried out to described image, including:
Each unit is traversed with the sliding window of setting, the size of the sliding window is the region shared by a*b unit
Size, a are less than the number for the unit that often row includes in described image, and b is less than the number for the unit that each column includes in described image;
In the a*b unit in the sliding window, brightness degree is full less than the number of the unit of the luminance threshold
When the third condition set enough, the brightness degree by brightness degree less than the unit of the luminance threshold is adjusted to the luminance threshold
Value.
Optionally, brightness degree meets the third condition of setting less than the number of the unit of the luminance threshold, including:
Brightness degree is less than or equal to the third threshold value of setting less than the number of the unit of the luminance threshold;Or brightness
Grade is less than less than the ratio of the total number for the unit for including in the number of the unit of the luminance threshold and the sliding window
Or the 4th threshold value equal to setting.
Optionally, this method further includes:Brightness degree is greater than or equal to of the unit of given threshold in described image
When number is unsatisfactory for the first condition of setting, the image collected is reacquired.
Optionally, the number for the pixel for including in selected continuous luminance area meets the second condition of setting, packet
It includes:
The number for the pixel for including in selected luminance area is greater than or equal to the 5th threshold value of setting;Or it is selected
The ratio of the number for the pixel for including in the number and described image of the pixel for including in the luminance area taken is more than or waits
In the 6th threshold value of setting.
Optionally, this method further includes:The number for the pixel for including in selected continuous luminance area is unsatisfactory for
When the second condition of setting, the image collected is reacquired.
Optionally, using selected continuous luminance area as target area, including:
It determines the pixel of four apexes in the target area, and preserves the coordinate information for the pixel determined;
According to direction clockwise or counterclockwise, it is sequentially connected the pixel determined by straight line, obtains quadrangle envelope
Closed region, and using obtained closed area as final target area.
The device of target area in a kind of determining image provided in an embodiment of the present invention, including:
Dividing elements module, if for the image collected to be divided into a unit, and calculate the average bright of each unit
Angle value;
Brightness degree determining module is determined for the correspondence according to preset average brightness value and brightness degree
The corresponding brightness degree of average brightness value of each unit;
Continuous luminance area determining module is used for the unit that the brightness degree in described image is greater than or equal to given threshold
Number when meeting the first condition of setting, from described image, determine at least one continuous luminance area, it is described continuous bright
Degree region in include the corresponding brightness degree of each unit be all higher than or equal to setting luminance threshold;
Module is chosen, for from least one continuous luminance area, is chosen comprising most continuous bright of pixel
Spend region;
The number satisfaction of target area determining module, the pixel for including in selected continuous luminance area is set
When fixed second condition, using selected continuous luminance area as target area.
Optionally, the number for the unit that brightness degree is greater than or equal to given threshold in described image meets the first of setting
Condition, including:
Brightness degree is greater than or equal to first of number more than or equal to setting of the unit of given threshold in described image
Threshold value;Or the unit that brightness degree is greater than or equal to the number of the unit of given threshold in described image and described image includes
Total number ratio be greater than or equal to setting second threshold.
Optionally, the continuous luminance area determining module is specifically used for:
Continuous treatment is carried out to described image;Determine the continuous brightness of at least one of image after continuous treatment
Region.
Optionally, the continuous luminance area determining module carries out continuous treatment to described image, including:
Each unit is traversed with the sliding window of setting, the size of the sliding window is the region shared by a*b unit
Size, a are less than the number for the unit that often row includes in described image, and b is less than the number for the unit that each column includes in described image;
In the a*b unit in the sliding window, brightness degree is full less than the number of the unit of the luminance threshold
When the third condition set enough, the brightness degree by brightness degree less than the unit of the luminance threshold is adjusted to the luminance threshold
Value.
Optionally, brightness degree meets the third condition of setting less than the number of the unit of the luminance threshold, including:
Brightness degree is less than or equal to the third threshold value of setting less than the number of the unit of the luminance threshold;Or brightness
Grade is less than less than the ratio of the total number for the unit for including in the number of the unit of the luminance threshold and the sliding window
Or the 4th threshold value equal to setting.
Optionally, the number for the pixel for including in selected continuous luminance area meets the second condition of setting, packet
It includes:
The number for the pixel for including in selected luminance area is greater than or equal to the 5th threshold value of setting;Or it is selected
The ratio of the number for the pixel for including in the number and described image of the pixel for including in the luminance area taken is more than or waits
In the 6th threshold value of setting.
Optionally, target area determining module is additionally operable to:
It determines the pixel of four apexes in the target area, and preserves the coordinate information for the pixel determined;
According to direction clockwise or counterclockwise, it is sequentially connected the pixel determined by straight line, obtains quadrangle closed area, and
Using obtained closed area as final target area.
In method and apparatus provided in an embodiment of the present invention, if the image collected is divided into a unit, and calculate every
The average brightness value of a unit;According to the correspondence of preset average brightness value and brightness degree, each unit is determined
The corresponding brightness degree of average brightness value;Brightness degree is greater than or equal to the number satisfaction of the unit of given threshold in the images
When the first condition of setting, from the image, at least one continuous luminance area is determined;It is at least one continuous from what is determined
In luminance area, choose comprising the most continuous luminance area of pixel;The picture for including in selected continuous luminance area
When the number of vegetarian refreshments meets the second condition of setting, using selected continuous luminance area as target area, so as to make
Highlighted image is quickly and accurately captured with electronic equipment, and target area is provided for subsequent processing.
Description of the drawings
Fig. 1 is the method schematic diagram of the target area in a kind of determining image provided in an embodiment of the present invention;
Fig. 2A is the schematic diagram one during continuous treatment provided in an embodiment of the present invention;
Fig. 2 B are the schematic diagram two during continuous treatment provided in an embodiment of the present invention;
Fig. 2 C are the schematic diagram three during continuous treatment provided in an embodiment of the present invention;
Fig. 3 is a kind of flow diagram of specific embodiment provided in an embodiment of the present invention;
The schematic device of target area in a kind of determining image that Fig. 4 inventive embodiments provide.
Specific implementation mode
The embodiment of the present invention is described in further detail with reference to the accompanying drawings of the specification.It should be appreciated that described herein
Embodiment only for the purpose of illustrating and explaining the present invention and is not intended to limit the present invention.
An embodiment of the present invention provides a kind of methods of the target area in determining image, as shown in Figure 1, this method packet
It includes:
If the image collected S11, is divided into a unit, and calculate the average brightness value of each unit;
S12, according to the correspondence of preset average brightness value and brightness degree, determine the average brightness of each unit
It is worth corresponding brightness degree;
The number that S13, in the images brightness degree are greater than or equal to the unit of given threshold meets first set
When part, from the image, at least one continuous luminance area is determined, each unit for including in the continuous luminance area corresponds to
Brightness degree be all higher than or equal to setting luminance threshold;
S14, from least one continuous luminance area determined, choose comprising the most continuous brightness region of pixel
Domain;
It, will when the second condition of the number satisfaction setting of S15, the pixel for including in selected continuous luminance area
Selected continuous luminance area is as target area.
In the embodiment of the present invention, if the image collected is divided into a unit, and the average brightness of each unit is calculated
Value;According to the correspondence of preset average brightness value and brightness degree, determine that the average brightness value of each unit is corresponding
Brightness degree;Brightness degree is greater than or equal to the first condition of the number satisfaction setting of the unit of given threshold in the images
When, from the image, determine at least one continuous luminance area;From at least one continuous luminance area determined, choosing
It takes comprising the most continuous luminance area of pixel;The number for the pixel for including in selected continuous luminance area meets
When the second condition of setting, using selected continuous luminance area as target area, so as to use electronic equipment quickly,
Highlighted image is accurately captured, target area is provided for subsequent processing.
In force, if the image collected is divided into a unit in S11, specially:Assuming that the image collected
Size is [W, H], divides the image into the unit of several m*m, and the preferred values of m are 16 or 32 pixels, then are divided
The number of unit be M=(W/m) * (H/m), wherein W is the number of pixel that often row includes in the image, and H is the image
The number for the pixel that middle each column includes.
In force, the correspondence of average brightness value and brightness degree is preset, brightness degree N in S12
Grade, the preferred values of N are 3 or 5, for example, N=1 (i.e. 1 grade) indicates that brightness is most dark, N=5 (i.e. 5 grades) indicates that brightness is most bright.
In force, S13 determines at least one continuous luminance area, specially from the image:Utilize seed growth
Algorithm determines at least one independent continuous luminance area from the image.
In force, after S12, before S13, this method further includes:It counts brightness degree and is greater than or equal to setting
The number of the unit of luminance threshold;
Brightness degree is greater than or equal to the number of the unit of given threshold and meets the of setting in the image collected in S13
One condition, including:Brightness degree is greater than or equal to more than or equal to the number of the unit of given threshold and sets in the image collected
Fixed first threshold;Or brightness degree is greater than or equal to the number and the image of the unit of given threshold in the image collected
Including unit total number ratio be greater than or equal to setting second threshold.
Based on any of the above-described embodiment, after S12, before S13, further include:Continuous treatment is carried out to the image;
In S13 from the image, at least one continuous luminance area is determined, including:After determining continuous treatment
The continuous luminance area of at least one of image.
In force, continuous treatment is carried out to the image collected, including:
Each unit is traversed with the sliding window of setting, the size of the sliding window is big for the region shared by a*b unit
Small, a is less than the number for the unit that often row includes in the image, and b is less than the number for the unit that each column includes in the image;
In the a*b unit in the sliding window, brightness degree is full less than the number of the unit of the luminance threshold of setting
When the third condition set enough, the brightness degree by brightness degree less than the unit of the luminance threshold of setting is adjusted to the setting
Luminance threshold.
Optionally, the size of the sliding window set as the area size shared by 2*2 unit, or setting sliding window
The size of mouth is the area size shared by 3*3 unit.
Optionally, brightness degree meets the third condition of setting less than the number of the unit of the luminance threshold of setting, including:
Brightness degree is less than or equal to the third threshold value of setting less than the number of the unit of the luminance threshold of setting;Or it is bright
Ratio of the degree grade less than the total number for the unit for including in the number of the unit of the luminance threshold of setting and the sliding window
Less than or equal to the 4th threshold value of setting.
It illustrates, it is assumed that the size of sliding window is 2*2 unit, and the luminance threshold set is 2 grade, then brightness degree
Unit less than 2 is low-light level unit.Assuming that the 4th threshold value set is 1/4, if the low-light level list for including in sliding window then
When the ratio for the unit total number (i.e. 4) for including in the number of member and the sliding window is less than or equal to 1/4, brightness degree is determined
Less than the third condition that the unit of the luminance threshold of setting meets setting.As shown in Figure 2 A, 4 lists for including in the sliding window
The corresponding brightness degree of member is 2,3,2,1 respectively, and low-light level unit is 1, the then number of low-light level unit and the sliding window
The ratio for the unit total number for including inside is equal to 1/4, meets the third condition of setting.Finally, low-light level unit is corresponding bright
Degree level adjustment is the luminance threshold (i.e. 2) of setting, then the brightness degree after the unit adjustment for including in the sliding window is as schemed
Shown in 2B.Using above-mentioned processing, each unit is traversed, as shown in Figure 2 C.
In force, as another realization method, this method further includes:
Brightness degree is greater than or equal to the number of the unit of given threshold and is unsatisfactory for the of setting in the image collected
When one condition, the image collected is reacquired.
Specifically, brightness degree is greater than or equal to the number satisfaction setting of the unit of given threshold in the image collected
First condition when, execute S13~S15;When the image collected is unsatisfactory for the first condition of setting, reacquisition collects
Image, and re-execute S11~S15.
In force, the number for the pixel for including in continuous luminance area selected in S15 meets the second of setting
Condition, including:
The number for the pixel for including in selected luminance area is greater than or equal to the 5th threshold value of setting;Or it is selected
The ratio of the number for the pixel for including in the number and the image collected of the pixel for including in the luminance area taken is more than
Or the 6th threshold value equal to setting.
In force, as another realization method, this method further includes:
When the number for the pixel for including in selected continuous luminance area is unsatisfactory for the second condition of setting, again
The image collected is obtained, and re-executes S11~S15.
In force, using selected continuous luminance area as target area in S15, including:
It determines the pixel of four apexes in target area, and preserves the coordinate information for the pixel determined;
According to direction clockwise or counterclockwise, it is sequentially connected the pixel determined by straight line, obtains quadrangle envelope
Closed region, and using obtained closed area as final target area.
With reference to a specific embodiment, to the target area in a kind of determining image provided in an embodiment of the present invention
Method is described in detail.
Embodiment one, as shown in figure 3, the present embodiment comprises the following processes:
S301, the preview image that size is [W, H] is obtained;
S302, as unit of m*m, preview image is divided into (W/m) * (H/m) a unit;
S303, the average brightness value for calculating each unit, and determine corresponding brightness degree;
The unit for the luminance threshold that S304, statistics meet setting accounts for the ratio R of preview imaget;
S305, judge RtWhether the second threshold R of setting is greater than or equal to;
If so, executing S306;
If it is not, then returning to S301;
S306, continuous treatment is executed;
S307, using seed growth algorithm, obtain maximum continuous luminance area Amax, and calculate AmaxAccount for the ratio of preview image
Example Rmax;
S308, judge RmaxWhether sixth threshold value R of setting is greater than or equal toa;
If so, executing S309;
If it is not, then executing S301;
The most upper left of the maximum continuous luminance area of S309, statistics, most lower-left, most upper right, four coordinate points of most bottom right;
The coordinate information for four coordinate points that S310, preservation preview image size and S309 are determined;
S311, the instruction according to user, it is determined whether take pictures;
If so, executing S312;
If it is not, then executing S301;
S312, the extension information that the coordinate information of S309 four coordinate points determined is saved in captured photo files
In.
Above method process flow can realize that the software program can be stored in a storage medium with software program, when
When the software program of storage is called, above method step is executed.
Based on same inventive concept, a kind of dress of the target area in determining image is additionally provided in the embodiment of the present invention
It sets, the principle solved the problems, such as due to the device is similar to the method for target area in a kind of above-mentioned determining image, the dress
The implementation set may refer to the implementation of method, and overlaps will not be repeated.
The device of target area in a kind of determining image provided in an embodiment of the present invention, as shown in figure 4, the device packet
It includes:
Dividing elements module 41, if for the image collected to be divided into a unit, and calculate being averaged for each unit
Brightness value;
Brightness degree determining module 42 is determined for the correspondence according to preset average brightness value and brightness degree
Go out the corresponding brightness degree of average brightness value of each unit;
Continuous luminance area determining module 43 is used for the list that the brightness degree in described image is greater than or equal to given threshold
When the number of member meets the first condition of setting, from described image, at least one continuous luminance area is determined, it is described continuous
The corresponding brightness degree of each unit for including in luminance area be all higher than or equal to setting luminance threshold;
Module 44 is chosen, for from least one continuous luminance area, is chosen comprising most continuous of pixel
Luminance area;
The number of target area determining module 45, the pixel for including in selected continuous luminance area meets
When the second condition of setting, using selected continuous luminance area as target area.
In force, the number for the unit that brightness degree is greater than or equal to given threshold in described image meets the of setting
One condition includes:
Brightness degree is greater than or equal to first of number more than or equal to setting of the unit of given threshold in described image
Threshold value;Or the unit that brightness degree is greater than or equal to the number of the unit of given threshold in described image and described image includes
Total number ratio be greater than or equal to setting second threshold.
Optionally, continuous luminance area determining module 43 is specifically used for:
Continuous treatment is carried out to described image;Determine the continuous brightness of at least one of image after continuous treatment
Region.
Optionally, continuous luminance area determining module 43 carries out continuous treatment to described image, including:
Each unit is traversed with the sliding window of setting, the size of the sliding window is the region shared by a*b unit
Size, a are less than the number for the unit that often row includes in described image, and b is less than the number for the unit that each column includes in described image;
In the a*b unit in the sliding window, brightness degree is full less than the number of the unit of the luminance threshold
When the third condition set enough, the brightness degree by brightness degree less than the unit of the luminance threshold is adjusted to the luminance threshold
Value.
Optionally, brightness degree meets the third condition of setting less than the number of the unit of the luminance threshold, including:
Brightness degree is less than or equal to the third threshold value of setting less than the number of the unit of the luminance threshold;Or brightness
Grade is less than less than the ratio of the total number for the unit for including in the number of the unit of the luminance threshold and the sliding window
Or the 4th threshold value equal to setting.
In force, the number for the pixel for including in selected luminance area meets the second condition of setting, including:
The number for the pixel for including in selected luminance area is greater than or equal to the 5th threshold value of setting;Or it is selected
The ratio of the number for the pixel for including in the number and described image of the pixel for including in the luminance area taken is more than or waits
In the 6th threshold value of setting.
Optionally, target area determining module 45 is additionally operable to:
It determines the pixel of four apexes in the target area, and preserves the coordinate information for the pixel determined;
According to direction clockwise or counterclockwise, it is sequentially connected the pixel determined by straight line, obtains quadrangle closed area, and
Using obtained closed area as final target area.
Image processing apparatus provided in an embodiment of the present invention may be disposed at mobile phone, tablet computer, laptop, digital phase
Machine, DV etc. have in the electronic equipment of shooting function and image processing function.
It should be understood by those skilled in the art that, the embodiment of the present invention can be provided as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, the present invention can be used in one or more wherein include computer usable program code computer
The computer program production implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that can be realized by computer program instructions every first-class in flowchart and/or the block diagram
The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided
Instruct the processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine so that the instruction executed by computer or the processor of other programmable data processing devices is generated for real
The device for the function of being specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that instruction generation stored in the computer readable memory includes referring to
Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device so that count
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, in computer or
The instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic
Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as
It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
God and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
Claims (8)
1. a kind of method of the target area in determining image, which is characterized in that this method includes:
The image collected is divided into several units, and calculates the average brightness value of each unit;
According to the correspondence of preset average brightness value and brightness degree, determine that the average brightness value of each unit is corresponding
Brightness degree;
When brightness degree is greater than or equal to the first condition of number satisfaction setting of the unit of given threshold in described image, from
In described image, determine that at least one continuous luminance area, each unit for including in the continuous luminance area are corresponding
Brightness degree be all higher than or equal to setting luminance threshold;
From at least one continuous luminance area, choose comprising the most continuous luminance area of pixel;
It, will be selected when the number for the pixel for including in selected continuous luminance area meets the second condition of setting
Continuous luminance area is as target area;
Brightness degree is greater than or equal to the first condition of the number satisfaction setting of the unit of given threshold in described image, including:
Brightness degree is greater than or equal to first threshold of the number more than or equal to setting of the unit of given threshold in described image;
Or the unit that brightness degree is greater than or equal to the number of the unit of given threshold in described image and described image includes is total
The ratio of number is greater than or equal to the second threshold of setting;
Brightness degree is greater than or equal to after the first condition of number satisfaction setting of the unit of given threshold in described image,
Before from described image, determining at least one continuous luminance area, further include:Described image is carried out at serialization
Reason;
From described image, at least one continuous luminance area is determined, including:It determines in the image after continuous treatment
At least one continuous luminance area;
Continuous treatment is carried out to described image, including:
Each unit is traversed with the sliding window of setting, the size of the sliding window is the area size shared by a*b unit,
A is less than the number for the unit that often row includes in described image, and b is less than the number for the unit that each column includes in described image;
In the a*b unit in the sliding window, brightness degree is set less than the number satisfaction of the unit of the luminance threshold
When fixed third condition, the brightness degree by brightness degree less than the unit of the luminance threshold is adjusted to the luminance threshold.
2. the method as described in claim 1, which is characterized in that brightness degree is full less than the number of the unit of the luminance threshold
The third condition set enough, including:
Brightness degree is less than or equal to the third threshold value of setting less than the number of the unit of the luminance threshold;Or brightness degree
Ratio less than the total number for the unit for including in the number of the unit of the luminance threshold and the sliding window is less than or waits
In the 4th threshold value of setting.
3. the method as described in claim 1, which is characterized in that this method further includes:
When brightness degree is unsatisfactory for the first condition of setting more than or equal to the number of the unit of given threshold in described image,
Reacquire the image collected.
4. the method as described in claim 1, which is characterized in that for the pixel for including in selected continuous luminance area
Number meets the second condition of setting, including:
The number for the pixel for including in selected luminance area is greater than or equal to the 5th threshold value of setting;Or it is selected
The ratio of the number for the pixel for including in the number and described image of the pixel for including in luminance area, which is greater than or equal to, to be set
The 6th fixed threshold value.
5. method as claimed in claim 4, which is characterized in that this method further includes:
When the number for the pixel for including in selected continuous luminance area is unsatisfactory for the second condition of setting, reacquire
The image collected.
6. the method as described in claim 1, which is characterized in that using selected continuous luminance area as target area, packet
It includes:
It determines the pixel of four apexes in the target area, and preserves the coordinate information for the pixel determined;
According to direction clockwise or counterclockwise, it is sequentially connected the pixel determined by straight line, obtains quadrangle enclosed area
Domain, and using obtained closed area as final target area.
7. a kind of device of the target area in determining image, which is characterized in that the device includes:
Dividing elements module for the image collected to be divided into several units, and calculates the average brightness of each unit
Value;
Brightness degree determining module is determined each for the correspondence according to preset average brightness value and brightness degree
The corresponding brightness degree of average brightness value of unit;
Continuous luminance area determining module is used for that the brightness degree in described image is greater than or equal to the unit of given threshold
When number meets the first condition of setting, from described image, at least one continuous luminance area, the continuous brightness region are determined
The corresponding brightness degree of each unit for including in domain be all higher than or equal to setting luminance threshold;
Module is chosen, for from least one continuous luminance area, choosing comprising the most continuous brightness region of pixel
Domain;
The number of target area determining module, the pixel for including in selected continuous luminance area meets setting
When second condition, using selected continuous luminance area as target area;
The continuous luminance area determining module is specifically used for:
Continuous treatment is carried out to described image;Determine the continuous brightness region of at least one of image after continuous treatment
Domain;
The continuous luminance area determining module carries out continuous treatment to described image, including:
Each unit is traversed with the sliding window of setting, the size of the sliding window is the area size shared by a*b unit,
A is less than the number for the unit that often row includes in described image, and b is less than the number for the unit that each column includes in described image;
In the a*b unit in the sliding window, brightness degree is set less than the number satisfaction of the unit of the luminance threshold
When fixed third condition, the brightness degree by brightness degree less than the unit of the luminance threshold is adjusted to the luminance threshold.
8. device as claimed in claim 7, which is characterized in that target area determining module is additionally operable to:
It determines the pixel of four apexes in the target area, and preserves the coordinate information for the pixel determined;According to
Direction clockwise or counterclockwise is sequentially connected the pixel determined by straight line, obtains quadrangle closed area, and incite somebody to action
The closed area arrived is as final target area.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201511031777.5A CN105631883B (en) | 2015-12-31 | 2015-12-31 | A kind of method and apparatus of target area in determining image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201511031777.5A CN105631883B (en) | 2015-12-31 | 2015-12-31 | A kind of method and apparatus of target area in determining image |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105631883A CN105631883A (en) | 2016-06-01 |
CN105631883B true CN105631883B (en) | 2018-08-07 |
Family
ID=56046769
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201511031777.5A Active CN105631883B (en) | 2015-12-31 | 2015-12-31 | A kind of method and apparatus of target area in determining image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105631883B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110766745B (en) * | 2018-12-18 | 2023-11-03 | 极米科技股份有限公司 | Method for detecting interference before projector lens, projector and storage medium |
CN112399065A (en) * | 2019-08-12 | 2021-02-23 | 青岛海信移动通信技术股份有限公司 | Method and equipment for adjusting focal length |
CN111276106A (en) * | 2020-02-19 | 2020-06-12 | 京东方科技集团股份有限公司 | Area statistics-based anomaly labeling method and device |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101043609A (en) * | 2006-03-24 | 2007-09-26 | 株式会社东芝 | Subtitle detection apparatus, subtitle detection method and pull-down signal detection apparatus |
CN101155265A (en) * | 2006-09-25 | 2008-04-02 | 三星电子株式会社 | System, medium, and method compensating brightness of an image |
CN103051844A (en) * | 2012-12-31 | 2013-04-17 | 青岛中星微电子有限公司 | Method and device for image backlight compensation |
CN104050651A (en) * | 2014-06-19 | 2014-09-17 | 青岛海信电器股份有限公司 | Scene image processing method and device |
CN104301624A (en) * | 2014-10-30 | 2015-01-21 | 青岛海信移动通信技术股份有限公司 | Image shooting brightness control method and device |
CN104299188A (en) * | 2013-07-18 | 2015-01-21 | 深圳富泰宏精密工业有限公司 | Image correction method and image correction system |
CN105049728A (en) * | 2015-08-17 | 2015-11-11 | 广东欧珀移动通信有限公司 | Method and device for acquiring shot image |
CN105205798A (en) * | 2015-10-19 | 2015-12-30 | 北京经纬恒润科技有限公司 | Image processing method and system |
-
2015
- 2015-12-31 CN CN201511031777.5A patent/CN105631883B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101043609A (en) * | 2006-03-24 | 2007-09-26 | 株式会社东芝 | Subtitle detection apparatus, subtitle detection method and pull-down signal detection apparatus |
CN101155265A (en) * | 2006-09-25 | 2008-04-02 | 三星电子株式会社 | System, medium, and method compensating brightness of an image |
CN103051844A (en) * | 2012-12-31 | 2013-04-17 | 青岛中星微电子有限公司 | Method and device for image backlight compensation |
CN104299188A (en) * | 2013-07-18 | 2015-01-21 | 深圳富泰宏精密工业有限公司 | Image correction method and image correction system |
CN104050651A (en) * | 2014-06-19 | 2014-09-17 | 青岛海信电器股份有限公司 | Scene image processing method and device |
CN104301624A (en) * | 2014-10-30 | 2015-01-21 | 青岛海信移动通信技术股份有限公司 | Image shooting brightness control method and device |
CN105049728A (en) * | 2015-08-17 | 2015-11-11 | 广东欧珀移动通信有限公司 | Method and device for acquiring shot image |
CN105205798A (en) * | 2015-10-19 | 2015-12-30 | 北京经纬恒润科技有限公司 | Image processing method and system |
Also Published As
Publication number | Publication date |
---|---|
CN105631883A (en) | 2016-06-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105574813B (en) | A kind of image processing method and device | |
JP6388673B2 (en) | Mobile terminal and imaging method thereof | |
CN104917950B (en) | A kind of information processing method and electronic equipment | |
US9118841B2 (en) | Determining an image capture payload burst structure based on a metering image capture sweep | |
JP5843751B2 (en) | Information processing apparatus, information processing system, and information processing method | |
CN104853106B (en) | A kind of information processing method and electronic equipment | |
WO2016019770A1 (en) | Method, device and storage medium for picture synthesis | |
CN105120247B (en) | A kind of white balance adjustment method and electronic equipment | |
US20140285698A1 (en) | Viewfinder Display Based on Metering Images | |
CN105141841B (en) | Picture pick-up device and its method | |
CN105049728A (en) | Method and device for acquiring shot image | |
CN104125407A (en) | Object motion track shooting method and mobile terminal | |
KR20150108774A (en) | Method for processing a video sequence, corresponding device, computer program and non-transitory computer-readable medium | |
CN105657262B (en) | A kind of image processing method and device | |
CN105631883B (en) | A kind of method and apparatus of target area in determining image | |
CN107645628B (en) | Information processing method and device | |
EP4412234A1 (en) | Image processing method, model training method and electronic device | |
WO2014093048A1 (en) | Determining an image capture payload burst structure | |
CN113840090B (en) | Shutter adjustment method, device, apparatus and storage medium | |
US20170214847A1 (en) | Method for Setting Shooting Parameters of HDR mode and Electronic Device Using the Same | |
CN109547699A (en) | A kind of method and device taken pictures | |
CN108737852A (en) | A kind of method for processing video frequency, terminal, the device with store function | |
CN108134928A (en) | VR display methods and device | |
CN109120856B (en) | Camera shooting method and device | |
EP3799415A2 (en) | Method and device for processing videos, and medium |
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 | ||
CP03 | Change of name, title or address |
Address after: Shandong City, Qingdao Province, Jiangxi City Road No. 11 Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd. Country or region after: China Address before: Shandong City, Qingdao Province, Jiangxi City Road No. 11 Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd. Country or region before: China |
|
CP03 | Change of name, title or address |