Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
For the suppression of moving point light sources, some approaches provided by the prior art are: the influence brought by a moving point light source in a picture is reduced by limiting the gain, when a vehicle enters the picture of the monitoring camera, the light source generated by the vehicle lamp is inhibited in the picture, and the picture brightness is reduced; when the vehicle drives out of the picture of the monitoring camera, the brightness of the picture is unchanged.
However, the above solution may cause the image brightness to be low when there is or there is no vehicle in the image, so that not only the moving point light source is suppressed, but also the entire image brightness is suppressed.
Based on the above-mentioned defects in the prior art, an improvement method provided by the embodiment of the present invention is as follows: and automatically updating the light metering weight table of the current frame picture according to the occurrence probability of all the light metering areas in the current frame picture so as to adjust the exposure parameters of the current frame picture and achieve the purpose of inhibiting the motion point light source.
Referring to fig. 1, fig. 1 shows a schematic structural diagram of animage capturing apparatus 10 according to an embodiment of the present invention, in the embodiment of the present invention, theimage capturing apparatus 10 includes amemory 110, astorage controller 130, one or more processors (only one is shown in the figure) 120, aperipheral interface 140, aradio frequency unit 150, animage capturing unit 170, and the like. These components communicate with each other via one or more communication buses/signal lines 160.
Thememory 110 may be used to store software programs and modules, such as program instructions/modules corresponding to the motion point lightsource suppression device 200 provided in the embodiment of the present invention, and theprocessor 120 executes various functional applications and image processing by running the software programs and modules stored in thememory 110, such as the motion point light source suppression method provided in the embodiment of the present invention.
TheMemory 110 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
Theprocessor 120 may be an integrated circuit chip having signal processing capabilities. TheProcessor 120 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), a voice Processor, a video Processor, and the like; but may also be a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or theprocessor 120 may be any conventional processor or the like.
Theperipheral interface 140 couples various input/output devices to theprocessor 120 as well as to thememory 110. In some embodiments,peripheral interface 140,processor 120, andmemory controller 130 may be implemented in a single chip. In other embodiments of the present invention, they may be implemented by separate chips.
Therf unit 150 is used for receiving and transmitting electromagnetic waves, and implementing interconversion between the electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices.
Thecamera unit 170 is used to take a picture so that theprocessor 120 processes the taken picture.
It is to be understood that the configuration shown in fig. 1 is merely illustrative, and that theimage pickup apparatus 10 may include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating a moving-point light source suppressing method according to an embodiment of the present invention, in which the moving-point light source suppressing method includes the following steps:
step S100, judging whether a current frame picture contains a motion point light source; when yes, step S210 is performed.
First, theimage pickup apparatus 10 determines whether a motion point light source is included in the current frame image according to the captured image, and performs different processing on the current frame image.
Optionally, referring to fig. 3, fig. 3 is a schematic flowchart of the sub-steps of step S100 in fig. 2, in an embodiment of the present invention, step S100 includes the following sub-steps:
and a substep S110, generating a current inter-frame residual error matrix according to the brightness value matrix corresponding to the current frame picture and the brightness value matrix corresponding to the previous frame picture.
In a low-light environment such as night, the luminance information of the moving-point light source in the image of theimage capturing apparatus 10 is significantly different from the luminance information of other objects around the moving-point light source, in the embodiment of the present invention, the current frame picture is divided into a plurality of sub-regions according to a preset dividing manner, and then the luminance value corresponding to each sub-region is obtained through statistics, so as to generate the luminance value matrix corresponding to the current frame picture.
For example, assuming that the resolution of the picture is h × w, the picture is divided into M × N sub-regions, the height of each grid after the forensic processing in the picture is h/M, the width is gw w/N, the luminance value of the line q in the p-th row and the line q in each grid is pix (p, q), and h, w, M, N, p, q are positive integers, h is greater than or equal to M, w is greater than or equal to N, gh is greater than or equal to p greater than or equal to 1, gw is greater than or equal to q greater than or equal to 1, and the average luminance value luma (i, j) of the sub-region in the i-th row and the j-th line is:
after exposure is stable, counting the respective brightness value of each sub-region in the image, and the result obtained by counting can be regarded as obtaining a matrix with the size of M × N.
Assuming that the current frame picture is the kth frame, the statistical result, namely the brightness value matrix corresponding to the current frame picture, is recorded as mluma (k), and k is a positive integer; in the k-1 th frame of the previous frame of picture of the current frame of picture, the statistical result obtained according to the same method, that is, the luminance value matrix corresponding to the previous frame of picture is marked as mluma (k-1), and then the current inter-frame residual error matrix mdif (k) can be expressed as:
mdif(k)=|mluma(k)-mluma(k-1)|。
the above-mentioned inter-frame residual matrix can be understood as: when the point light source changes in the picture, the corresponding sub-regions in two consecutive frames of pictures shot by thecamera device 10 inevitably have changes in brightness values, and the element values of the corresponding sub-regions in the inter-frame residual matrix are inevitably not equal to 0; and in the sub-area where no point light source change occurs, the element value of the corresponding sub-area in the inter-frame residual error matrix is 0. And in order to ensure that only the change of a point light source is reflected in the inter-frame residual error matrix and not reflect that a certain sub-region is changed from a point light source to no point light source or from no point light source to a point light source, each element in the inter-frame residual error matrix is subjected to absolute value processing.
And a substep S120 of traversing all element values in the current inter-frame residual error matrix to obtain a first recording matrix.
In order to eliminate the influence of the change of some weak point light sources, such as the change of a street lamp, a first recording matrix is arranged and used for recording all element values which are greater than a preset interframe difference threshold value in a current interframe residual error matrix.
For example, assume that the first recording matrix is marked as mask _ cur, which is also a matrix with a size of M × N, and all values in the first recording matrix are initially set to 0, and the preset interframe difference threshold is marked as Thresh. After the current inter-frame residual error matrix mdif (k) corresponding to the current frame picture is obtained, all element values contained in the current inter-frame residual error matrix mdif (k) are traversed, all sub-regions in all the current inter-frame residual error matrices, of which the element values are greater than a preset inter-frame difference threshold Thresh, are recorded, the sub-regions are marked as light measurement regions to indicate that a motion point light source possibly exists, and then the value of the corresponding sub-region in the first recording matrix mask _ cur is updated to a first preset value, so that the first recording matrix is updated.
And a substep S130, generating a third recording matrix according to the first recording matrix and the second recording matrix.
The updated first recording matrix mask _ cur is used for representing an area where a motion point light source may exist in the current frame picture, and correspondingly, when it is determined whether a motion point light source exists in the previous frame picture, a recording matrix corresponding to the previous frame picture is calculated and used for representing an area where a motion point light source may exist in the previous frame picture. When judging whether a moving point light source exists in a current frame picture, recording a recording matrix corresponding to a previous frame picture as a second recording matrix, assuming that the second recording matrix is represented as mask _ pre, wherein the second recording matrix mask _ pre is used for representing a region where the moving point light source possibly exists in the previous frame picture, the calculated mode is the same as that of the updated first recording matrix, and the element value in the second recording matrix mask _ pre is the same as that of a sub-region corresponding to a first preset value and that of all element values larger than a preset inter-frame difference threshold value in an inter-frame residual error matrix corresponding to the previous frame picture.
And obtaining a third recording matrix according to the first recording matrix and the second recording matrix in a preset calculation mode, wherein the third recording matrix is used for determining whether dynamic point light sources, namely moving point light sources, are contained in two continuous frames of pictures.
For example, assuming that the third record matrix is denoted as mask, the result of dot multiplication of the first record matrix mask _ cur and the second record matrix mask _ pre is taken as the third record matrix mask, that is:
mask=mask_cur·mask_pre。
sub-step S140, determining whether the sum of all the element values included in the first recording matrix is not equal to 0, and whether the sum of all the element values included in the third recording matrix is equal to 0? If so, determining that the current frame picture contains the motion point light source; and if not, determining that the current frame picture does not contain the motion point light source.
For the obtained first record matrix mask _ cur and the third record matrix mask, traversing all the respective element values in the first record matrix mask _ cur and the third record matrix mask, and obtaining a sum1 of all the element values included in the first record matrix mask _ cur and a sum2 of all the element values included in the third record matrix mask, for example:
the sum of all element values sum1 included in the first recording matrix mask _ cur means: when sum1 is equal to 0, it indicates that all element values included in the first recording matrix mask _ cur are 0, and no point light source appears in the current frame picture; in contrast, when sum1 is not equal to 0, it indicates that the first recording matrix mask _ cur contains element values other than 0, i.e., a point light source appears in the current frame picture.
However, it should be noted that when sum1 is not equal to 0, it can only be said that a point light source appears in the current frame picture, but cannot be said that the point light source is dynamic, that is, the point light source is a moving point light source, for example, when there is a street lamp in the current frame picture, sum1 may not be equal to 0, but the street lamp is static and does not belong to the moving point light source.
Therefore, the meaning of the sum2 of all the element values contained in the third recording matrix mask is as follows: when sum2 is equal to 0, it indicates that all element values included in the third recording matrix mask are 0, and there is no coincidence of a point light source in two consecutive frames of pictures formed by the previous frame of picture and the current frame of picture, that is, the point light source moves in the two consecutive frames of pictures formed by the previous frame of picture and the current frame of picture, or there is no point light source at all; otherwise, when sum2 is not equal to 0, it indicates that the third recording matrix mask includes an element value that is not 0, and indicates that the point light source exists in two consecutive frames of pictures formed by the previous frame of picture and the current frame of picture, and the positions of the point light sources coincide with each other, i.e., the point light source does not move.
Therefore, when it is determined that the sum of all element values sum1 included in the first recording matrix mask _ cur is not equal to 0, and the sum of all element values sum2 included in the third recording matrix mask is equal to 0, it indicates that the current frame picture includes the point light source and the point light source is dynamic, i.e., the current frame picture includes the motion point light source; on the contrary, when it is determined whether the sum1 of all the element values included in the first recording matrix mask _ cur is equal to 0 or the sum2 of all the element values included in the third recording matrix mask is not equal to 0, it indicates that no motion point light source is included in the current frame picture.
Based on the above design, in the method for suppressing a light source of a moving point provided in the embodiments of the present invention, a first recording matrix generated by a residual error matrix between current frames corresponding to a current frame picture and a second recording matrix of a previous frame picture are used to generate a third recording matrix, so that whether the current frame picture includes the light source of the moving point can be automatically determined according to the first recording matrix and the third recording matrix, and the labor cost is saved.
Referring to fig. 2, in step S210, the respective occurrence probabilities of all the photometric areas in the plurality of sub-areas included in the current frame picture are obtained.
When it is determined in step S100 that the current frame picture contains a motion point light source, the occurrence probability of each of all the light metering regions is obtained through statistics according to all the light metering regions determined in step S100 in the current frame picture.
The light metering region is a sub-region in which inter-frame residuals are greater than a preset inter-frame threshold value among a plurality of sub-regions included in the current frame picture, for example, the sub-region corresponding to an element value in the current inter-frame residual matrix mdif (k) that is greater than the preset inter-frame threshold value.
For reducing the determination, the first recording matrix mask _ cur may be directly used to determine the light metering area, for example, the sub-areas corresponding to the element values of the first recording matrix mask _ cur that are not 0 are the light metering areas.
And the occurrence probability of each light metering region is the number of times that the corresponding subregion is determined as a light metering region within a preset time range. For example, a certain time period is counted, the determination of the moving point light source in the step S100 is cycled, and the number of times that each sub-region is determined as the photometric region in all the frame pictures in the certain time period is counted, so as to obtain the occurrence probability of each sub-region.
The statistical probability of each light metering region may be recorded by using a statistical matrix M _ wt, for example, the statistical matrix M _ wt is also set as an M × N matrix, and each element value represents the respective probability of occurrence of the corresponding sub-region.
In step S220, the photometric weight table is updated according to the occurrence probability of each of all the photometric areas, so as to adjust the exposure parameters.
After the occurrence probability of each light metering area is obtained, the light metering weight table is updated according to the occurrence probability of each light metering area, and then the exposure parameters are adjusted to suppress the motion point light source in the current frame picture.
Optionally, referring to fig. 4, fig. 4 is a schematic flow chart of the sub-steps of step S220 in fig. 2, in the embodiment of the present invention, step S220 includes the following sub-steps:
in sub-step S221, light source regions in all the light metering regions are determined.
When the light metering weight table is updated, firstly, all light metering regions in the current frame picture are traversed, and sub-regions with the occurrence probability larger than a preset probability threshold are listed as light source regions according to the respective occurrence probability of each light metering region.
In the substep S222, the photometric weight value corresponding to the light source region is adjusted according to a preset photometric weight adjustment equation, so as to update the photometric weight table.
Correspondingly, after the light emitting source region is determined, the photometric weight value corresponding to the light source region in the photometric weight table is adjusted according to a preset photometric weight adjustment equation to update the photometric weight table, so that the exposure parameters of the sub-region determined as the light source region are adjusted to suppress the moving point light source in the current frame picture, and other regions are not affected.
As an embodiment, with continuing reference to fig. 4, after the step S222 is executed, the step S220 further includes the following steps:
in the substep S223, the respective photometric weight values of all other sub-areas within the preset neighborhood radius range in the light source area are respectively updated according to the preset photometric weight adjustment equation, so as to update the photometric weight table.
The light source area is determined as a moving point light source, and the moving point light source in the light source area can be suppressed by adjusting the photometric weight value corresponding to the light source area.
Therefore, in the embodiment of the present invention, the respective photometric weight values of all other sub-areas within the range that uses the light source area as the center and uses the preset neighborhood as the radius in the current frame picture are respectively updated according to the preset photometric weight adjustment equation, and further the photometric weight table not only suppresses the moving point light source of the light source area, but also suppresses the sub-areas around the light source area.
Optionally, as an embodiment, the manner of adjusting the photometric weight table is as follows:
wherein R isiThe ith sub-region is the occurrence probability of the photometric region, Li is the brightness value corresponding to the ith sub-region, r is the neighborhood radius, and Lij is the ith sub-regionBrightness value, W, corresponding to any sub-region within a range having a domain with r as neighborhood radiusiFor adjusted weight value, W0To weight value before adjustment, WtK is a preset parameter greater than 0 and Thr is a preset probability threshold value.
The significance of the photometric weight adjustment equation in the above manner of adjusting the photometric weight table is as follows: when the occurrence probability of the ith sub-region being a photometric region is greater than a preset probability threshold Thr, the corresponding sub-region is determined as a light source region, and the photometric weight value of the sub-region is determined as the weight value W before adjustment0Adjusted to a preset weighted value Wt(ii) a For other sub-areas with the light source area as the center and r as the neighborhood radius range, the preset weight value is reduced according to the preset parameter k, namely W, according to the smaller value of the brightness in the corresponding sub-area and the light source areai=Wt-k × min (Lij-Li); and for other sub-regions which take the light source region as the center and r is outside the neighborhood radius range, the weight value W before adjustment is kept0。
It should be noted that the sub-step S222 and the sub-step S223 are not sequentially executed, and the sub-step S222 and the sub-step S223 may be executed first, or the sub-step S223 and the sub-step S222 may be executed first, which depends on the specific functional implementation, for example, in some embodiments of the embodiment of the present invention, the sub-step S222 and the sub-step S223 may be executed together.
Based on the above design, the light source suppression method for a motion point provided in the embodiments of the present invention automatically updates the light metering weight table of the current frame picture according to the occurrence probability of each of all light metering areas in the current frame picture when it is determined that the current frame picture contains a motion point light source, so as to adjust the exposure parameter of the current frame picture, thereby achieving the purpose of suppressing the motion point light source.
Optionally, as an implementation manner, please refer to fig. 5, where fig. 5 shows another schematic flowchart of a moving-point light source suppression method provided in an embodiment of the present invention, and in the embodiment of the present invention, the moving-point light source suppression method further includes the following steps:
in step S230, the brightness value of the current frame is adjusted according to the number of sub-regions included in the light source region.
The moving point light source restraining method is to adjust the light metering weight table to adjust the exposure parameters, thereby achieving the purpose of restraining the moving point light source in the current frame picture.
However, in the case of a picture containing a moving point light source, the picture tends to show a high brightness.
Therefore, in the embodiment of the present invention, when the current frame picture is determined to include the motion point light source, the current frame picture brightness value of the current frame picture is further adjusted according to the number of the sub-regions determined as the light source region, so that the overall picture brightness of the current frame picture is suppressed when the current frame picture includes the motion point light source.
Optionally, as an embodiment, the above calculation formula for adjusting the brightness value of the current picture is:
LumaT′=LumaT-X、X=Nwy and X<LumaT*x,
Wherein LumaT is the brightness value of the current picture before adjustment, LumaT' is the brightness value of the current picture after adjustment, NwThe number of the sub-regions included in the light source region is X, which is a preset first proportional parameter, y is a preset second proportional parameter, and X is a picture brightness adjustment value.
The significance of the above calculation formula for adjusting the brightness value of the current picture is as follows: the image brightness value is related to the number of the sub-regions determined as the light source region, and the image brightness value is adjusted to be lower as the number of the sub-regions determined as the light source region in the current frame picture is larger.
In addition, as an embodiment, the preset inter-frame difference threshold Thresh may also be dynamically adjusted according to the number of sub-regions included in the light source region in the current frame picture.
For example, as an embodiment, the calculation formula for dynamically adjusting the preset frame difference threshold is as follows:
Thresh′=Thresh*(1-f(Nw)),
wherein, Thresh' is the adjusted preset interframe difference threshold, Thresh is the interframe difference threshold before adjustment, and f (N)
w) Function values obtained for input of the number of sub-regions included in the light source region, e.g.
M and N are the above-mentioned region sizes into which the current frame picture is divided, respectively, and l is a preset parameter.
Optionally, as an implementation manner, please continue to refer to fig. 5, in an embodiment of the present invention, the method for suppressing a moving-point light source further includes the following steps:
in step S240, the exposure speed is adjusted to a first preset speed.
It should be noted that there is no existing order of execution between step S240 and step S210, step S220 and step S230, and step S210, step S220 and step S230 may be executed after step S240 is executed, or step S240 may be executed after step S210, step S220 and step S230 is executed, which depends on the specific functional module, for example, step S240 may be executed between step S210, step S220 and step S230.
After step S210, step S220, step S230, and step S240, the above step S100 is continuously executed with the next picture as the current picture.
Optionally, as an implementation manner, please continue to refer to fig. 5, in an embodiment of the present invention, when it is determined that the current frame picture does not include the moving point light source, the moving point light source suppressing method further includes the following steps:
in step S310, the exposure speed is adjusted to a second preset speed.
It is worth to be noted that the second predetermined speed is smaller than the first predetermined speed. That is, the exposure speed when the current frame picture contains the motion point light source is higher than the exposure speed when the current frame picture does not contain the motion point light source.
It should be noted that after the step S310 is completed, the next frame of picture is taken as the current frame of picture, and the step S100 is continuously executed.
Referring to fig. 6, fig. 6 shows a schematic structural diagram of a moving-point lightsource suppression device 200 according to an embodiment of the present invention, in which the moving-point lightsource suppression device 200 includes adetermination module 210, an occurrenceprobability calculation module 220, and an exposureparameter adjustment module 230.
The determiningmodule 210 is used to determine whether the current frame picture contains a motion point light source.
The occurrenceprobability calculation module 220 is configured to, when the current frame picture includes a motion point light source, obtain respective occurrence probabilities of all light metering regions in a plurality of sub-regions included in the current frame picture, where the current frame picture is divided into the plurality of sub-regions according to a preset dividing manner, the light metering region is a sub-region in the plurality of sub-regions where inter-frame residuals are greater than a preset inter-frame threshold, and the respective occurrence probability of each light metering region is the number of times that the corresponding sub-region is determined as a light metering region within a preset time range.
Optionally, referring to fig. 7 as an implementation manner, fig. 7 shows a schematic structural diagram of an occurrenceprobability calculation module 220 of a motion pointilluminant suppression device 200 according to an embodiment of the present invention, in the embodiment of the present invention, the occurrenceprobability calculation module 220 includes an inter-frame residualmatrix calculation unit 221, a sub-recordingmatrix generation unit 222, a composite recordingmatrix generation unit 223, and a motion pointilluminant determination unit 224.
The inter-frame residualmatrix calculating unit 221 is configured to generate a current inter-frame residual matrix according to the luminance value matrix corresponding to the current frame picture and the luminance value matrix corresponding to the previous frame picture, where any element value in the luminance value matrix is a luminance value corresponding to a corresponding sub-region in the multiple sub-regions.
The sub-recordingmatrix generating unit 222 is configured to traverse all element values in the current inter-frame residual error matrix to obtain a first recording matrix, where sub-regions corresponding to all element values greater than a preset inter-frame difference threshold in the current inter-frame residual error matrix are the same as sub-regions corresponding to element values in the first recording matrix that are a first preset value.
The composite recordingmatrix generating unit 223 is configured to generate a third recording matrix according to the first recording matrix and the second recording matrix, where a sub-region corresponding to each of all element values greater than a preset inter-frame difference threshold in the inter-frame residual matrix corresponding to the previous frame of picture is the same as a sub-region corresponding to a first preset value of element values in the second recording matrix.
The motion point lightsource determining unit 224 is configured to determine whether a sum of all element values included in the first recording matrix is not equal to 0, and whether a sum of all element values included in the third recording matrix is equal to 0, where when the sum of all element values included in the first recording matrix is not equal to 0, and the sum of all element values included in the third recording matrix is equal to 0, it is determined that a motion point light source is included in the current frame picture; and when the sum of all the element values contained in the first recording matrix is equal to 0 or the sum of all the element values contained in the third recording matrix is not equal to 0, determining that the current frame picture does not contain the motion point light source.
Referring to fig. 6, the exposureparameter adjusting module 230 is configured to update the metering weight table according to the occurrence probability of each of the metering regions, so as to adjust the exposure parameter.
Alternatively, as an embodiment, please refer to fig. 8, fig. 8 shows a schematic structural diagram of an exposureparameter adjusting module 230 of a moving-point lightsource restraining device 200 according to an embodiment of the present invention, in which the exposureparameter adjusting module 230 includes a light sourcearea determining unit 231 and a photometric weighttable updating unit 232.
The light sourceregion determining unit 231 is configured to determine a light source region in all the light measuring regions, where the light source region is a sub-region with an occurrence probability greater than a preset probability threshold.
The photometry weighttable updating unit 232 is configured to adjust a photometry weight value corresponding to the light source region according to a preset photometry weight adjustment equation, so as to update the photometry weight table.
Optionally, as an implementation manner, in an embodiment of the present invention, the photometry weighttable updating unit 232 is further configured to update the photometry weight values of all other sub-areas in the preset neighborhood radius range of the light source area according to the preset photometry weight adjustment equation, so as to update the photometry weight table.
Optionally, as an implementation manner, please continue to refer to fig. 6, in an embodiment of the present invention, the moving point lightsource restraining device 200 further includes an imagebrightness adjusting module 240, and the imagebrightness adjusting module 240 is configured to adjust a current image brightness value according to the number of sub-areas included in the light source area.
Optionally, as an implementation manner, please continue to refer to fig. 6, in an embodiment of the present invention, the moving point lightsource suppressing apparatus 200 further includes an exposurespeed adjusting module 250, where the exposurespeed adjusting module 250 is configured to adjust the exposure speed to a first preset speed when the moving point light source is included in the current frame picture.
Optionally, as an implementation manner, in an embodiment of the present invention, the exposurespeed adjusting module 250 is further configured to adjust the exposure speed to a second preset speed when the current frame picture does not include the motion point light source.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, each functional module in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiment of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In summary, the method and apparatus for suppressing a motion point light source provided in the embodiments of the present invention automatically update the light metering weight table of the current frame picture according to the occurrence probability of each of all light metering areas in the current frame picture when it is determined that a motion point light source is included in the current frame picture, so as to adjust the exposure parameter of the current frame picture, thereby achieving the purpose of suppressing the motion point light source; a first recording matrix generated by a current inter-frame residual error matrix corresponding to a current frame picture and a second recording matrix of a previous frame picture are used for generating a third recording matrix, so that whether the current frame picture contains a moving point light source or not can be automatically judged according to the first recording matrix and the third recording matrix, and the labor cost is saved; and adjusting the brightness value of the current frame of the picture according to the number of the sub-regions determined as the light source region, so that the overall picture brightness of the current frame of the picture is inhibited when the current frame of the picture contains the motion point light source.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.