CN113747149B - Abnormality detection method and device for optical filter, electronic device and storage medium - Google Patents
Abnormality detection method and device for optical filter, electronic device and storage medium Download PDFInfo
- Publication number
- CN113747149B CN113747149B CN202110987484.3A CN202110987484A CN113747149B CN 113747149 B CN113747149 B CN 113747149B CN 202110987484 A CN202110987484 A CN 202110987484A CN 113747149 B CN113747149 B CN 113747149B
- Authority
- CN
- China
- Prior art keywords
- camera
- value
- working mode
- mode
- optical filter
- 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
- 238000001514 detection method Methods 0.000 title claims abstract description 97
- 230000003287 optical effect Effects 0.000 title claims abstract description 80
- 230000005856 abnormality Effects 0.000 title claims abstract description 65
- 238000000034 method Methods 0.000 claims abstract description 46
- 230000002159 abnormal effect Effects 0.000 claims abstract description 27
- 238000012545 processing Methods 0.000 claims abstract description 9
- 238000004590 computer program Methods 0.000 claims description 15
- 238000012360 testing method Methods 0.000 claims description 15
- 238000010801 machine learning Methods 0.000 claims description 14
- 238000005192 partition Methods 0.000 claims description 4
- 230000000694 effects Effects 0.000 abstract description 5
- 238000005516 engineering process Methods 0.000 abstract description 4
- 230000008569 process Effects 0.000 description 13
- 230000008901 benefit Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 4
- 238000012706 support-vector machine Methods 0.000 description 4
- 238000012549 training Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000013145 classification model Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000013178 mathematical model Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000004297 night vision Effects 0.000 description 1
- 238000003909 pattern recognition Methods 0.000 description 1
- 238000000611 regression analysis Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
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
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- Physics & Mathematics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Medical Informatics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
Abstract
The application relates to an abnormality detection method, device, electronic device and storage medium of an optical filter, wherein the method comprises the following steps: when the camera operates in a first working mode, determining whether a first ambient light brightness value acquired by the camera falls in a preset switching threshold value interval, acquiring first image data and first shooting parameter data under the condition that the first ambient light brightness value falls in the switching threshold value interval, switching the camera from the first working mode to a second working mode, acquiring second image data and second shooting parameter data, processing the first image data, the first shooting parameter data, the second image data and the second shooting parameter data by using a trained abnormality detection model, and determining whether an abnormality exists in the optical filter according to a detection result output by the trained abnormality detection model. According to the method and the device, the problem of low reliability of abnormal detection of the optical filter in the related technology is solved, and the technical effect of improving the reliability of abnormal detection of the optical filter is achieved.
Description
Technical Field
The present disclosure relates to the field of camera technologies, and in particular, to a method and an apparatus for detecting an abnormality of an optical filter, an electronic device, and a storage medium.
Background
With the development and progress of technology, all-weather monitoring is required in many scenes. The light is sufficient in daytime, the brightness is sufficient, the color of the image is ensured to be truly restored as accurately as possible, and the common image sensor can sense near infrared components to cause color distortion, so that the infrared components are filtered by the infrared cut-off filter, the restoration authenticity of the color of the camera is ensured, and the camera is used for shooting color scenes.
The night environment illumination is insufficient, and an infrared band-pass filter is needed so that the image sensor receives as much light as possible to ensure enough brightness of the image, and night vision brightness of the camera at night is increased for shooting of black and white scenes. Therefore, the optical filter is critical to the camera, if the optical filter of the camera is abnormal or fails in the process of delivery or operation, the image is abnormal, the monitoring effect and the user experience are affected, and therefore, the normal operation of the optical filter is required to be ensured in the delivery and operation processes of the camera.
Currently, in the related art, the method for detecting the abnormal color of the optical filter calculates and judges the scanning black edge existing in the optical filter switching process, and determines whether the scanning black edge which is not smaller than a preset scanning black edge judging threshold exists in an image obtained by a camera, so as to judge whether the current optical filter works normally. However, in such a technical solution, since the current mainstream filter will not generate black edges during the switching process, the accuracy and reliability of the technical solution are low only when the technical solution is adapted to specific equipment.
At present, no effective solution is proposed for the problem of low reliability of anomaly detection of the optical filter in the related art.
Disclosure of Invention
The embodiment of the application provides an abnormality detection method, an abnormality detection device, an abnormality detection electronic device and a storage medium for an optical filter, so as to at least solve the problem of low abnormality detection reliability of the optical filter in the related art.
In a first aspect, an embodiment of the present application provides a method for detecting an abnormality of an optical filter in a camera including a dual-filter switcher, where the dual-filter switcher is used for switching a first working mode and a second working mode in the camera, and the method includes: when the camera operates in a first working mode, determining whether a first ambient light brightness value acquired by the camera falls into a preset switching threshold interval; acquiring first image data and first shooting parameter data acquired by the camera when the camera operates in a first working mode under the condition that the first ambient light brightness value falls into the switching threshold value interval; switching the camera from a first working mode to a second working mode, and acquiring second image data and second shooting parameter data acquired by the camera when the camera operates in the second working mode; and processing the first image data, the second image data and the second image data by using the trained abnormality detection model, and determining whether the optical filter has abnormality according to the detection result output by the trained abnormality detection model.
In some embodiments, the switching threshold interval includes a first threshold interval and a second threshold interval, where an upper limit value of the first threshold interval and a lower limit value of the second threshold interval are preset switching thresholds; when the first operation mode is a day mode and the second operation mode is a night mode, determining whether the first ambient light intensity value acquired by the camera falls within a preset switching threshold interval includes: determining whether a first ambient light level value acquired by the camera falls within the first threshold interval; when the first operation mode is a night mode and the second operation mode is a day mode, determining whether the first ambient light intensity value acquired by the camera falls within a preset switching threshold interval includes: determining whether a first ambient light level value acquired by the camera falls within the second threshold interval.
In some embodiments, in a case where the first operation mode is a day mode and the second operation mode is a night mode, before determining whether the first ambient light intensity value acquired by the camera falls within a preset switching threshold interval, the method further includes: after the camera is powered on and started, configuring the camera into a second working mode; under the condition that the camera operates in a second working mode, switching the working mode of the camera to a first working mode, and determining whether a second ambient light brightness value acquired by the camera falls into the second threshold interval; and under the condition that the second ambient light brightness value falls into the second threshold value interval, determining the working mode of the camera to be a first working mode.
In some embodiments, in a case where the first operation mode is a night mode and the second operation mode is a day mode, before determining whether the first ambient light intensity value acquired by the camera falls within a preset switching threshold interval, the method further includes: after the camera is powered on and started, configuring the camera into a first working mode; under the condition that the camera operates in a first working mode, switching the working mode of the camera to a second working mode, and determining whether a second ambient light brightness value acquired by the camera falls into the first threshold interval; and under the condition that the second ambient light brightness value falls into the first threshold value interval, switching the working mode of the camera to a first working mode.
In some of these embodiments, the method further comprises: constructing an initial machine learning model; obtaining a test sample, wherein the test sample comprises an abnormal sample and a normal sample, and the test sample comprises image data and shooting parameter data corresponding to each sample; inputting the image data and the image pickup parameter data corresponding to the abnormal sample and the image data and the image pickup parameter data corresponding to the normal sample into the initial machine learning model, and updating the parameters of the initial machine learning model to obtain the trained abnormality detection model.
In some of these embodiments, the first image data includes a first RGB average and a first luminance average; acquiring first image data acquired by the camera while operating in a first mode of operation includes acquiring a first target image acquired by the camera while operating in the first mode of operation; dividing the first target image into a plurality of statistical partitions of the same size; acquiring a first RGB value of each statistical block; according to the first RGB value of each statistical block, calculating to obtain a first RGB average value of the first target image; and calculating a first brightness average value of the first target image according to the first RGB average value.
In some of these embodiments, the first camera parameter data includes a first infrared component ratio; the method further comprises the steps of: according to the first RGB value of the statistical block, calculating to obtain a first white balance parameter value of the statistical block; determining a statistical block corresponding to a first white balance parameter value, the distance between the first statistical block and a preset white balance parameter threshold value of which is smaller than a preset first threshold value, as a first target statistical block, wherein the white balance parameter threshold value is a white balance parameter value of a preset image shot by the camera in a pure infrared environment; and determining the ratio of the number of the first target statistical blocks to the number of all the statistical blocks in the first target image as a first infrared component ratio obtained when the camera operates in a first working mode.
In some of these embodiments, the second image data includes a second RGB average and a second luminance average; acquiring second image data acquired by the camera while operating in a second mode of operation includes: acquiring a second target image acquired by the camera when operating in a second working mode; dividing the second target image into a plurality of statistical partitions of the same size; acquiring a second RGB value of each statistical block; calculating a second RGB average value of the second target image according to the second RGB value of each statistical block; and calculating a second brightness average value of the second target image according to the second RGB average value.
In some of these embodiments, the second camera parameter data includes a second infrared component ratio; the method further comprises the steps of: calculating to obtain a second white balance parameter value of the statistical block according to the second RGB value of the statistical block; determining a statistical block corresponding to a second white balance parameter value, the distance between the second statistical block and a preset white balance parameter threshold value of which is smaller than a preset first threshold value, as a second target statistical block, wherein the white balance parameter threshold value is a white balance parameter value of a preset image shot by the camera in a pure infrared environment; and determining the ratio of the number of the second target statistical blocks to the number of all the statistical blocks in the second target image as a second infrared component ratio acquired when the camera operates in a second working mode.
In a second aspect, an embodiment of the present application provides an anomaly detection apparatus for an optical filter, where the anomaly detection apparatus is applied to anomaly detection of the optical filter in a camera including a dual-filter switcher, and the dual-filter switcher is used for switching a first working mode and a second working mode in the camera, and the apparatus includes: the judging module is used for determining whether a first environment light brightness value acquired by the camera falls into a preset switching threshold value interval when the camera operates in a first working mode; the first acquisition module is used for acquiring first image data and first shooting parameter data acquired when the camera operates in a first working mode under the condition that the first environment light brightness value falls into the switching threshold value interval; the second acquisition module is used for switching the camera from the first working mode to the second working mode and acquiring second image data and second shooting parameter data acquired when the camera operates in the second working mode; and the output module is used for processing the first image data, the first shooting parameter data, the second image data and the second shooting parameter data by using the trained abnormality detection model and determining whether the optical filter is abnormal or not according to the detection result output by the trained abnormality detection model.
In a third aspect, an embodiment of the present application further provides an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to run the computer program to perform the method for detecting an anomaly of the optical filter according to the first aspect.
In a fourth aspect, an embodiment of the present application further provides a storage medium, where a computer program is stored, where the computer program when executed by a processor implements the method for detecting an anomaly of the optical filter according to the first aspect.
Compared with the related art, the method, the device, the electronic device and the storage medium for detecting the abnormality of the optical filter provided by the embodiment of the invention determine whether the first ambient light brightness value acquired by the camera falls in the preset switching threshold interval when the camera operates in the first working mode, acquire the first image data and the first shooting parameter data acquired when the camera operates in the first working mode under the condition that the first ambient light brightness value falls in the switching threshold interval, switch the camera from the first working mode to the second working mode, acquire the second image data and the second shooting parameter data acquired when the camera operates in the second working mode, process the first image data, the first shooting parameter data, the second image data and the second shooting parameter data by using the trained abnormality detection model, determine whether the optical filter has abnormality according to the detection result output by the trained abnormality detection model, solve the problem that the abnormality detection reliability of the optical filter in the related art is low, and realize the technical effect of improving the reliability of the abnormality detection of the optical filter.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more thorough understanding of the other features, objects, and advantages of the application.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
fig. 1 is a flowchart of an anomaly detection method of a filter according to an embodiment of the present application;
fig. 2 is a flowchart of an abnormality detection method of the optical filter according to the preferred embodiment of the present application;
fig. 3 is a block diagram of a structure of an abnormality detection device of the optical filter according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described and illustrated below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden on the person of ordinary skill in the art based on the embodiments provided herein, are intended to be within the scope of the present application. Moreover, it should be appreciated that while such a development effort might be complex and lengthy, it would nevertheless be a routine undertaking of design, fabrication, or manufacture for those of ordinary skill having the benefit of this disclosure, and thus should not be construed as having the benefit of this disclosure.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is to be expressly and implicitly understood by those of ordinary skill in the art that the embodiments described herein can be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar terms herein do not denote a limitation of quantity, but rather denote the singular or plural. The terms "comprising," "including," "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to only those steps or elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "connected," "coupled," and the like in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as used herein means greater than or equal to two. "and/or" describes an association relationship of an association object, meaning that there may be three relationships, e.g., "a and/or B" may mean: a exists alone, A and B exist together, and B exists alone. The terms "first," "second," "third," and the like, as used herein, are merely distinguishing between similar objects and not representing a particular ordering of objects.
The embodiment provides an anomaly detection method of an optical filter, which is applied to anomaly detection of the optical filter in a camera including a dual-optical-filter switcher, wherein the dual-optical-filter switcher is used for switching a first working mode and a second working mode in the camera, and fig. 1 is a flowchart of the anomaly detection method of the optical filter according to the embodiment of the application, and as shown in fig. 1, the method includes:
in step S101, when the camera is operating in the first operation mode, it is determined whether the first ambient light level value acquired by the camera falls within a preset switching threshold interval.
In this embodiment, the camera may include an infrared cut-off filter and an infrared band-pass filter, and the dual-filter switch switches the filter of the camera to the infrared cut-off filter when the camera is operating in a diurnal mode (i.e., when facing a color scene demand); when the camera operates in a night mode (i.e. when facing the black and white scene requirement), the dual-filter switcher switches the filter of the camera to the infrared band-pass filter, wherein the first working mode can be a day mode or a night mode, and when the first working mode is the day mode, the second working mode is the night mode; when the first operation mode is the night mode, the second operation mode is the day mode.
Step S102, acquiring first image data and first image capturing parameter data acquired by the camera when the camera is operating in the first operation mode, in the case that the first ambient light level value falls within the switching threshold interval.
In this embodiment, the first ambient light level value may be obtained by the following formula:
wherein ev cur Brightness is the first ambient light level cur The average image brightness value of the image shot by the camera is the current shutter time of the camera, the gain is the current gain value of the camera, and the ir ration is the current infrared component ratio detected by the camera.
The switching threshold interval comprises a first threshold interval and a second threshold interval, wherein the upper limit value of the first threshold interval and the lower limit value of the second threshold interval are preset switching threshold color2black_thr, and the switching threshold color2black_thr can be set according to actual needs or experimental data.
In the above embodiment, in the case where the first operation mode is the day mode and the second operation mode is the night mode, it may be determined whether the first ambient light intensity value falls within the first threshold interval (- ≡color2 black_thr), that is, when ev cur Less than color2black thr may then determine that the camera is currently meeting the condition of switching from the first mode of operation (i.e., day mode) to the second mode of operation (i.e., night mode).
In case the first operating mode is a night mode, and the second operating mode is a day mode, it may be determined whether the first ambient light level value falls within a second threshold interval (color 2black _ thr, + -infinity), i.e. when ev cur Greater than color2black_thr may then determine that the camera is currently satisfying the secondary first mode of operation (i.e., nightMode) to a second operating mode (i.e. day mode).
Step S103, switching the camera from the first operation mode to the second operation mode, and acquiring second image data and second image capturing parameter data acquired by the camera when the camera is operating in the second operation mode.
In this embodiment, the infrared cut-off filter is used to filter a part of infrared light, typically infrared light too much greater than 700nm, so as to ensure the authenticity of the color; the infrared band-pass filter is of a full-transmission band, so that all light sources are ensured to enter the image sensor in the camera, and the brightness of the image is ensured.
The information acquired by the image sensor of the camera comprises a plurality of pixel points, each pixel point comprises corresponding information under R, G, B channels, the RGB data acquired by the image sensor is used as the basis, the current environment can be subjected to statistics and analysis on multiple dimensions such as brightness, infrared components and ultraviolet components, and the brightness information and the infrared component ratio in the current environment can be analyzed by utilizing a mathematical model.
Step S104, the trained abnormality detection model is used for processing the first image data, the first shooting parameter data, the second image data and the second shooting parameter data, and whether the optical filter is abnormal or not is determined according to the detection result output by the trained abnormality detection model.
In the present embodiment, the infrared cut filter filters out infrared light, so that when the camera operates in the daytime mode, the infrared component ratio of the image photographed by the camera is low and the brightness is low; on the other hand, the infrared band pass filter does not filter infrared light, and therefore, when the camera is operated in the night mode, the infrared component ratio of the image photographed by the camera is high and the brightness is high.
According to the rules, the first image data, the first image pickup parameter data, the second image data and the second image pickup parameter data are processed by using the trained anomaly detection model, whether the optical filter is abnormal or not is determined according to the detection result output by the trained anomaly detection model, whether the optical filter is abnormal or not is adaptively identified by utilizing the switching of the infrared cut-off optical filter and the infrared band-pass optical filter in the camera, the detection speed of a production line is improved, and the reliability of the anomaly detection of the optical filter is improved.
Through the steps S101 to S104, when the camera is operated in the first operation mode, it is determined whether the first ambient light level value acquired by the camera falls within a preset switching threshold interval, and when the first ambient light level value falls within the switching threshold interval, the first image data and the first image capturing parameter data acquired by the camera when operated in the first operation mode are acquired, the camera is switched from the first operation mode to the second operation mode, and the second image data and the second image capturing parameter data acquired by the camera when operated in the second operation mode are acquired, and the first image data, the first image capturing parameter data, the second image data and the second image capturing parameter data are processed by using the trained abnormality detection model, and whether the optical filter has an abnormality is determined according to the detection result output by the trained abnormality detection model. According to the method and the device, the problem of low reliability of abnormal detection of the optical filter in the related technology is solved, and the technical effect of improving the reliability of abnormal detection of the optical filter is achieved.
In some embodiments, the training process of the trained anomaly detection mode includes the following steps:
and 1, constructing an initial machine learning model.
And 2, acquiring a test sample, wherein the test sample comprises an abnormal sample and a normal sample, and the test sample comprises image data and shooting parameter data corresponding to each sample.
And step 3, inputting the image data and the image pickup parameter data corresponding to the abnormal sample and the image data and the image pickup parameter data corresponding to the normal sample into an initial machine learning model, and updating parameters of the initial machine learning model to obtain a trained abnormality detection model.
In this embodiment, the initial machine learning model may select a support vector machine (Support Vector Machine, abbreviated as SVM) model, where the support vector machine model is a generalized linear classifier that performs binary classification on data according to a supervised learning manner, and the decision boundary is a maximum margin hyperplane for solving learning samples, and the support vector machine model is suitable for applications with more sample features such as images and texts, and has a good effect in solving the problems of pattern recognition, classification, regression analysis, and the like.
In the above embodiment, a radial basis function (Radial Basis Function, abbreviated as RBF) may be used, a support vector classification model (C-Support Vector Classification, abbreviated as c_svc) is used as an initial machine learning model, image data and image capturing parameter data corresponding to an abnormal sample in a test sample, and image data and image capturing parameter data corresponding to a normal sample are used as inputs, and parameters such as a maximum threshold value and a minimum threshold value of an acquired value are obtained through training, and a trained abnormality detection model is obtained through training.
In this embodiment, the trained anomaly detection model may process the first image data, the first image capturing parameter data, the second image data and the second image capturing parameter data, and output a detection result corresponding to the optical filter, where the detection result includes two types of anomaly and normal, and if the detection result is anomaly, alarm processing is performed; and if the detection result is normal, continuing to monitor the optical filter.
In some of these embodiments, in the case where the first operation mode is a day mode and the second operation mode is a night mode, before determining whether the first ambient light intensity value acquired by the camera falls within the preset switching threshold interval, the method further performs the steps of:
step 1, after the camera is powered on, the camera is configured into a second working mode.
And step 2, under the condition that the camera operates in the second working mode, switching the working mode of the camera to the first working mode, and determining whether the second ambient light brightness value acquired by the camera falls into a second threshold value interval.
And step 3, determining the working mode of the camera as a first working mode under the condition that the second ambient light brightness value falls into a second threshold value interval.
In this embodiment, after the camera is powered on, the operation mode of the camera needs to be switched back and forth once, that is, the ir cut filter and the ir band pass filter are switched once, so as to prevent the default filter from being not in its correct position due to transportation or other reasons (for example, the ir cut filter is configured when the camera is operated in the night mode).
In the above embodiment, after the camera is powered on and started, the optical filter of the camera can be forcibly switched to the infrared band-pass optical filter by using a preset software design, and then is forcibly switched to the infrared cut-off optical filter, so that the optical filter of the camera is ensured to be positioned at the correct position by self-checking.
At this time, it is further determined whether the current ambient light level (i.e. the second ambient light level value) falls within a second threshold interval (color 2black thr, ++ infinity a) of the above-mentioned components, and under the condition that the second ambient light brightness value is larger than the switching threshold value color2black_thr, determining that the working mode of the camera is a day mode, namely keeping the working mode of the camera to be a first working mode.
In this embodiment, when the first operation mode is the night mode and the second operation mode is the day mode, the self-test is performed by:
Step 1, after the camera is powered on, the camera is configured into a first working mode.
And step 2, under the condition that the camera operates in the first working mode, switching the working mode of the camera to the second working mode, and determining whether the second ambient light brightness value acquired by the camera falls into a first threshold value interval.
And step 3, switching the working mode of the camera to the first working mode under the condition that the second ambient light brightness value falls into the first threshold value interval.
In the above embodiment, by determining whether the current ambient light level (i.e., the second ambient light level value) falls within the first threshold interval (- ≡color2 black_thr), when the second ambient light level value is smaller than the switching threshold color2black_thr, the operation mode of the camera is determined to be the night mode, i.e., the operation mode of the camera is switched from the second operation mode to the first operation mode.
In some of these embodiments, the first image data includes a first RGB average and a first luminance average; the acquisition of the first image data acquired by the camera when operating in the first operating mode is achieved by:
step 1, a first target image acquired by a camera when operating in a first working mode is acquired.
And step 2, dividing the first target image into a plurality of statistical blocks with the same size.
And step 3, acquiring a first RGB value of each statistical block.
And 4, calculating to obtain a first RGB average value of the first target image according to the first RGB value of each statistical block.
And step 5, calculating to obtain a first brightness average value of the first target image according to the first RGB average value.
In this embodiment, the first target image may be divided into m×n blocks of statistical blocks with the same size, and the first RGB value of each statistical block under R, G, B three channels may be recorded respectively, and may be recorded according to the position coordinates (i, j) of each statistical block in the first target image, for example, the first RGB values of the statistical blocks located in (i, j) are (ri j, gi j, bi j) respectively.
After counting the first RGB values of all the statistical blocks, a first RGB average of the first target image is calculated, denoted Ravg0, gavg0, bavg0.
In the above embodiment, the first luminance average value of the first target image may be calculated by the following formula:
Yavg0=0.2989*Ravg0+0.5866*Gavg0+0.1145*Bavg0;
wherein, 0.2989, 0.5866, 0.1145 can all be selected according to actual needs, and the application is not limited herein.
In the present embodiment, the first imaging parameter data includes a first infrared component ratio; the method also comprises the following steps:
Step 1, calculating to obtain a first white balance parameter value of the statistical block according to a first RGB value of the statistical block.
And 2, determining a statistical block corresponding to a first white balance parameter value, the distance between the first statistical block and a preset white balance parameter threshold value of which is smaller than a preset first threshold value, as a first target statistical block, wherein the white balance parameter threshold value is a white balance parameter value of a preset image shot by a camera in a pure infrared environment.
And 3, determining the ratio of the number of the first target statistical blocks to the number of all the statistical blocks in the first target image as a first infrared component ratio obtained when the camera operates in a first working mode.
In this embodiment, the first image capturing parameter data further includes a first shutter value jitter 0, a first gain value gain0, a first brightness value bright 0, and a first white balance parameter value including a red gain value rGain and a blue gain bGain of the statistical block.
The first white balance parameter value can be calculated by the following formula:
in this embodiment, the camera may be tested in a pure infrared environment, a preset image captured by the camera in the pure infrared environment is obtained, white balance parameter values irRGain and irBGain of the preset image are obtained by analysis, and the white balance parameter values of the preset image are used as preset white balance parameter thresholds.
The distance X between the statistical block and the preset white balance parameter threshold can be calculated by the following formula:
X=|rGain-irRGain|+|bGain-irBGain|;
the first threshold value irRationThr can be set according to actual needs, the distance X between each statistical block and a preset white balance parameter threshold value is analyzed and counted, if X is smaller than irRationThr, the statistical block is considered to be connected with a near infrared component, the statistical block is determined to be a first target statistical block, and the total number irTotal of the statistical first target statistical blocks is counted.
In the above embodiment, the first infrared component ratio obtained when the camera operates in the first operation mode may be determined by:
total is the Total number of statistical blocks in the first target image, and irRation0 is the first infrared component ratio obtained when the camera operates in the first working mode.
In some of these embodiments, the second image data includes a second RGB average and a second luminance average; the acquisition of the second image data acquired by the camera when operating in the second mode of operation is achieved by:
step 1, a second target image acquired by the camera when operating in a night mode is acquired.
And step 2, dividing the second target image into a plurality of statistical blocks with the same size.
And step 3, obtaining a second RGB value of each statistical block.
And 4, calculating to obtain a second RGB average value of the second target image according to the second RGB value of each statistical block.
And step 5, calculating a second brightness average value of the second target image according to the second RGB average value.
In this embodiment, the calculation process of the second RBG average values Ravg1, gavg1, bavg1 corresponding to the second target image and the calculation process of the second luminance average value Yavg1 corresponding to the second target image are similar to those in the foregoing embodiment, and a specific example may refer to the foregoing embodiment and examples described in the optional implementation manner, and this embodiment will not be repeated herein.
In the present embodiment, the second imaging parameter data includes a second infrared component ratio; the method also comprises the following steps:
and step 1, calculating to obtain a second white balance parameter value of the statistical block according to a second RGB value of the statistical block.
And 2, determining a statistical block corresponding to a second white balance parameter value, the distance between the second statistical block and a preset white balance parameter threshold value of which is smaller than a preset first threshold value, as a second target statistical block, wherein the white balance parameter threshold value is a white balance parameter value of a preset image shot by a camera in a pure infrared environment.
And 3, determining the ratio of the number of the second target statistical blocks to the number of all the statistical blocks in the second target image as a second infrared component ratio obtained when the camera operates in a second working mode.
In this embodiment, the second image capturing parameter data further includes a second shutter value filter 1, a second gain value gain1, and a second brightness value bright 1, where a calculation process of the second infrared component ratio irRation1 is similar to that in the above embodiment, and a specific example may refer to the examples described in the above embodiment and the optional implementation manner, and this embodiment is not repeated herein.
In the above embodiment, the first image data and the first image capturing parameter data acquired when the camera operates in the first operation mode are obtained: the method comprises the steps of inputting 16 characteristic values of all 2 groups of data into a trained abnormality detection model after Ravg0, gavg0, bavg0, yavg0, filter 0, irRation0, second image data and second shooting parameter data Ravg1, gavg1, bavg1, yavg1, filter 1, gain1, and irRation1, which are acquired when a camera operates in a second working mode, so that whether an optical filter of the camera is abnormal or not can be determined, and the detection speed of the production line and the reliability of abnormal detection of the optical filter are improved by utilizing the switching of an infrared cut filter and an infrared band pass filter in the camera to adaptively identify whether the optical filter is abnormal.
Fig. 2 is a flowchart of a method for anomaly detection of a filter according to a preferred embodiment of the present application, as shown in fig. 2, in some embodiments, the method includes:
in step S201, the camera is powered on.
Step S202, the optical filter of the camera is switched to an infrared band-pass optical filter.
Step S203, the filter of the camera is switched to the infrared cut filter.
Step S204, determining the working mode of the camera according to the current ambient light brightness, and entering step S205 under the condition that the camera is determined to work in a daytime mode; in the case where it is determined that the video camera is operating in the night mode, the flow advances to step S210.
In step S205, the filter of the camera is maintained as an infrared cut filter.
Step S206, judging whether the current ambient light brightness is smaller than a preset switching threshold.
In step S207, in the case where the current ambient light brightness is less than the switching threshold, the statistical camera acquires the first image data and the first image capturing parameter data corresponding to the first target image.
Step S208, the optical filter of the camera is switched to an infrared band-pass optical filter.
In step S209, second image data and second image capturing parameter data corresponding to the second target image acquired by the statistical camera.
Step S210, the optical filter of the camera is switched to an infrared band-pass optical filter.
Step S211, determining whether the current ambient light brightness is greater than a preset switching threshold.
Step S212, in the case that the current ambient light brightness is greater than the switching threshold, counting the third image data and the third image capturing parameter data corresponding to the third target image acquired by the camera.
Step S213, the filter of the camera is switched to the infrared cut filter.
In step S214, the fourth image data and the fourth image capturing parameter data corresponding to the fourth target image acquired by the statistical camera.
In step S215, 16 feature values of the two sets of data are obtained.
Step S216, inputting the 16 characteristic values into the trained abnormality detection model.
Step S217, obtaining the detection result output by the trained abnormality detection model.
Step S218, the detection result is that the optical filter is normal; returning to step S204.
Step S219, detecting that the filter is abnormal; step S218 is entered.
Step S220, sending alarm information.
It should be noted that, specific examples in this embodiment may refer to examples described in the foregoing embodiments and alternative implementations, and this embodiment is not repeated herein.
The embodiment provides an abnormality detection device for an optical filter, which is applied to abnormality detection of the optical filter in a camera including a dual-optical-filter switcher, wherein the dual-optical-filter switcher is used for switching a first working mode and a second working mode in the camera, and fig. 3 is a block diagram of the abnormality detection device for the optical filter according to the embodiment of the application, as shown in fig. 3, and the device includes: a judging module 30, configured to determine, when the camera is operating in the first operation mode, whether a first ambient light brightness value acquired by the camera falls within a preset switching threshold interval; a first obtaining module 31, configured to obtain, when the first ambient light brightness value falls within the switching threshold interval, first image data and first image capturing parameter data obtained when the camera operates in the first operation mode; a second acquisition module 32 for switching the camera from the first operation mode to the second operation mode and acquiring second image data and second image capturing parameter data acquired by the camera when the camera is operating in the second operation mode; and an output module 33, configured to process the first image data, the first image capturing parameter data, the second image data, and the second image capturing parameter data using the trained abnormality detection model, and determine whether the optical filter has an abnormality according to the detection result output by the trained abnormality detection model.
In some embodiments, the switching threshold interval includes a first threshold interval and a second threshold interval, wherein an upper limit value of the first threshold interval and a lower limit value of the second threshold interval are preset switching thresholds; in the case where the first operation mode is the day mode and the second operation mode is the night mode, the determining module 30 is further configured to determine whether the first ambient light intensity value acquired by the camera falls within a first threshold interval; in case the first operating mode is the night mode and the second operating mode is the day mode, the determination module 30 is further configured for determining whether the first ambient light level value acquired by the camera falls within the second threshold interval.
In some embodiments, the device further comprises a self-checking module, wherein the self-checking module is used for configuring the camera into a second working mode after the camera is powered on and started when the first working mode is a day mode and the second working mode is a night mode; under the condition that the camera operates in a second working mode, switching the working mode of the camera to the first working mode, and determining whether a second ambient light brightness value acquired by the camera falls into a second threshold value interval; and under the condition that the second ambient light brightness value falls into a second threshold value interval, determining the working mode of the camera as a first working mode.
In some of these embodiments, the self-test module is further configured to configure the camera to the first operational mode after the camera is powered on if the first operational mode is a night mode and the second operational mode is a day mode; under the condition that the camera operates in the first working mode, switching the working mode of the camera to a second working mode, and determining whether a second ambient light brightness value acquired by the camera falls into a first threshold value interval; and under the condition that the second ambient light brightness value falls into the first threshold value interval, switching the working mode of the camera to the first working mode.
In some of these embodiments, the apparatus further comprises a training module for constructing an initial machine learning model; obtaining a test sample, wherein the test sample comprises an abnormal sample and a normal sample, and the test sample comprises image data and shooting parameter data corresponding to each sample; inputting the image data and the image pickup parameter data corresponding to the abnormal sample and the image data and the image pickup parameter data corresponding to the normal sample into an initial machine learning model, and updating parameters of the initial machine learning model to obtain a trained abnormal detection model.
In some of these embodiments, the first image data includes a first RGB average and a first luminance average; the first acquisition module 31 is further configured for acquiring a first target image acquired by the camera while operating in the first mode of operation; dividing a first target image into a plurality of statistical blocks with the same size; acquiring a first RGB value of each statistical block; according to the first RGB value of each statistical block, calculating to obtain a first RGB average value of a first target image; and calculating a first brightness average value of the first target image according to the first RGB average value.
In some of these embodiments, the first camera parameter data includes a first infrared component ratio; the first obtaining module 31 is further configured to calculate a first white balance parameter value of the statistical block according to the first RGB value of the statistical block; determining a statistical block corresponding to a first white balance parameter value, the distance between the first statistical block and a preset white balance parameter threshold value of which is smaller than a preset first threshold value, as a first target statistical block, wherein the white balance parameter threshold value is a white balance parameter value of a preset image shot by a camera in a pure infrared environment; the ratio of the number of the first target statistical blocks to the number of all the statistical blocks in the first target image is determined to be a first infrared component ratio obtained when the camera operates in the first working mode.
In some of these embodiments, the second image data includes a second RGB average and a second luminance average; the second acquisition module 32 is further configured to acquire a second target image acquired by the camera while operating in a second mode of operation; dividing the second target image into a plurality of statistical blocks of the same size; acquiring a second RGB value of each statistical block; according to the second RGB value of each statistical block, calculating to obtain a second RGB average value of a second target image; and calculating a second brightness average value of the second target image according to the second RGB average value.
In some of these embodiments, the second camera parameter data includes a second infrared component ratio; the second obtaining module 32 is further configured to calculate a second white balance parameter value of the statistical block according to the second RGB value of the statistical block; determining a statistical block corresponding to a second white balance parameter value, the distance between the second statistical block and a preset white balance parameter threshold value of which is smaller than a preset first threshold value, as a second target statistical block, wherein the white balance parameter threshold value is a white balance parameter value of a preset image shot by a camera in a pure infrared environment; and determining the ratio of the number of the second target statistical blocks to the number of all the statistical blocks in the second target image as a second infrared component ratio obtained when the camera operates in a second working mode.
It should be noted that, specific examples in this embodiment may refer to examples described in the foregoing embodiments and alternative implementations, and this embodiment is not repeated herein.
The present embodiment also provides an electronic device, fig. 4 is a schematic diagram of a hardware structure of the electronic device according to the embodiment of the present application, and as shown in fig. 4, the electronic device includes a memory 404 and a processor 402, where the memory 404 stores a computer program, and the processor 402 is configured to execute the computer program to perform the steps in any one of the method embodiments described above.
In particular, the processor 402 may include a Central Processing Unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC), or may be configured to implement one or more integrated circuits of embodiments of the present application.
Memory 404 may include, among other things, mass storage for data or instructions. By way of example, and not limitation, memory 404 may comprise a Hard Disk Drive (HDD), floppy Disk Drive, solid state Drive (Solid State Drive, SSD), flash memory, optical Disk, magneto-optical Disk, tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of the foregoing. Memory 404 may include removable or non-removable (or fixed) media, where appropriate. The memory 404 may be internal or external to the anomaly detection means of the filter, where appropriate. In a particular embodiment, the memory 404 is a Non-Volatile (Non-Volatile) memory. In a particular embodiment, the Memory 404 includes Read-Only Memory (ROM) and random access Memory (Random Access Memory, RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, abbreviated PROM), an erasable PROM (Erasable Programmable Read-Only Memory, abbreviated EPROM), an electrically erasable PROM (Electrically Erasable Programmable Read-Only Memory, abbreviated EEPROM), an electrically rewritable ROM (Electrically Alterable Read-Only Memory, abbreviated EAROM), or a FLASH Memory (FLASH), or a combination of two or more of these. The RAM may be Static Random-Access Memory (SRAM) or dynamic Random-Access Memory (Dynamic Random Access Memory DRAM), where the DRAM may be a fast page mode dynamic Random-Access Memory (Fast Page Mode Dynamic Random Access Memory FPMDRAM), extended data output dynamic Random-Access Memory (Extended Date Out Dynamic Random Access Memory EDODRAM), synchronous dynamic Random-Access Memory (Synchronous Dynamic Random-Access Memory SDRAM), or the like, as appropriate.
Memory 404 may be used to store or cache various data files that need to be processed and/or used for communication, as well as possible computer program instructions for execution by processor 402.
The processor 402 reads and executes the computer program instructions stored in the memory 404 to implement the abnormality detection method of any one of the filters in the above-described embodiments.
Optionally, the electronic apparatus may further include a transmission device 406 and an input/output device 408, where the transmission device 406 is connected to the processor 402 and the input/output device 408 is connected to the processor 402.
Alternatively, in the present embodiment, the above-mentioned processor 402 may be configured to execute the following steps by a computer program:
s1, when the camera operates in a first working mode, determining whether a first ambient light brightness value acquired by the camera falls into a preset switching threshold value interval.
And S2, under the condition that the first ambient light brightness value falls into a switching threshold value interval, acquiring first image data and first shooting parameter data acquired by the camera when the camera operates in a first working mode.
S3, switching the camera from the first working mode to the second working mode, and acquiring second image data and second shooting parameter data acquired by the camera when the camera operates in the second working mode.
S4, processing the first image data, the first shooting parameter data, the second image data and the second shooting parameter data by using the trained abnormality detection model, and determining whether the optical filter is abnormal according to the detection result output by the trained abnormality detection model.
It should be noted that, specific examples in this embodiment may refer to examples described in the foregoing embodiments and alternative implementations, and this embodiment is not repeated herein.
In addition, in combination with the method for detecting the abnormality of the optical filter in the above embodiment, the embodiment of the application may provide a storage medium. The storage medium has a computer program stored thereon; the computer program, when executed by a processor, implements the abnormality detection method of any one of the filters of the above embodiments.
It should be understood by those skilled in the art that the technical features of the above embodiments may be combined in any manner, and for brevity, all of the possible combinations of the technical features of the above embodiments are not described, however, they should be considered as being within the scope of the description provided herein, as long as there is no contradiction between the combinations of the technical features.
The foregoing examples merely represent several embodiments of the present application, the description of which is more specific and detailed and which should not be construed as limiting the scope of the present application in any way. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.
Claims (12)
1. An abnormality detection method of an optical filter applied to abnormality detection of an optical filter in a camera including a dual-filter switcher for switching between a first operation mode and a second operation mode in the camera, the method comprising:
when the camera operates in a first working mode, determining whether a first ambient light brightness value acquired by the camera falls into a preset switching threshold interval;
acquiring first image data and first shooting parameter data acquired by the camera when the camera operates in a first working mode under the condition that the first ambient light brightness value falls into the switching threshold value interval;
switching the camera from a first working mode to a second working mode, and acquiring second image data and second shooting parameter data acquired by the camera when the camera operates in the second working mode;
and processing the first image data, the second image data and the second image data by using the trained abnormality detection model, and determining whether the optical filter has abnormality according to the detection result output by the trained abnormality detection model.
2. The abnormality detection method of the optical filter according to claim 1, wherein the switching threshold section includes a first threshold section and a second threshold section, wherein an upper limit value of the first threshold section and a lower limit value of the second threshold section are preset switching threshold values;
when the first operation mode is a day mode and the second operation mode is a night mode, determining whether the first ambient light intensity value acquired by the camera falls within a preset switching threshold interval includes:
determining whether a first ambient light level value acquired by the camera falls within the first threshold interval;
when the first operation mode is a night mode and the second operation mode is a day mode, determining whether the first ambient light intensity value acquired by the camera falls within a preset switching threshold interval includes:
determining whether a first ambient light level value acquired by the camera falls within the second threshold interval.
3. The abnormality detection method of the optical filter according to claim 2, wherein in a case where the first operation mode is a day mode and the second operation mode is a night mode, before determining whether or not a first ambient light intensity value acquired by the camera falls within a preset switching threshold interval, the method further includes:
After the camera is powered on and started, configuring the camera into a second working mode;
under the condition that the camera operates in a second working mode, switching the working mode of the camera to a first working mode, and determining whether a second ambient light brightness value acquired by the camera falls into the second threshold interval;
and under the condition that the second ambient light brightness value falls into the second threshold value interval, determining the working mode of the camera to be a first working mode.
4. The abnormality detection method of the optical filter according to claim 2, wherein in a case where the first operation mode is a night mode and the second operation mode is a day mode, before determining whether or not a first ambient light intensity value acquired by the camera falls within a preset switching threshold interval, the method further includes:
after the camera is powered on and started, configuring the camera into a first working mode;
under the condition that the camera operates in a first working mode, switching the working mode of the camera to a second working mode, and determining whether a second environment light brightness value acquired by the camera falls into a preset first switching threshold value interval;
And under the condition that the second ambient light brightness value falls into the first threshold value interval, switching the working mode of the camera to a first working mode.
5. The abnormality detection method of the optical filter according to claim 1, characterized in that the method further comprises:
constructing an initial machine learning model;
obtaining a test sample, wherein the test sample comprises an abnormal sample and a normal sample, and the test sample comprises image data and shooting parameter data corresponding to each sample;
inputting the image data and the image pickup parameter data corresponding to the abnormal sample and the image data and the image pickup parameter data corresponding to the normal sample into the initial machine learning model, and updating the parameters of the initial machine learning model to obtain the trained abnormality detection model.
6. The abnormality detection method of the optical filter according to claim 1, wherein the first image data includes a first RGB average value and a first luminance average value; acquiring first image data acquired by the camera while operating in a first mode of operation includes:
acquiring a first target image acquired by the camera when the camera operates in a first working mode;
Dividing the first target image into a plurality of statistical partitions of the same size;
acquiring a first RGB value of each statistical block;
according to the first RGB value of each statistical block, calculating to obtain a first RGB average value of the first target image;
and calculating a first brightness average value of the first target image according to the first RGB average value.
7. The abnormality detection method of the optical filter according to claim 6, wherein the first image pickup parameter data includes a first infrared component ratio; the method further comprises the steps of:
according to the first RGB value of the statistical block, calculating to obtain a first white balance parameter value of the statistical block;
determining a statistical block corresponding to a first white balance parameter value, the distance between the first statistical block and a preset white balance parameter threshold value of which is smaller than a preset first threshold value, as a first target statistical block, wherein the white balance parameter threshold value is a white balance parameter value of a preset image shot by the camera in a pure infrared environment;
and determining the ratio of the number of the first target statistical blocks to the number of all the statistical blocks in the first target image as a first infrared component ratio obtained when the camera operates in a first working mode.
8. The abnormality detection method of the optical filter according to claim 1, wherein the second image data includes a second RGB average value and a second luminance average value; acquiring second image data acquired by the camera while operating in a second mode of operation includes:
acquiring a second target image acquired by the camera when operating in a second working mode;
dividing the second target image into a plurality of statistical partitions of the same size;
acquiring a second RGB value of each statistical block;
calculating a second RGB average value of the second target image according to the second RGB value of each statistical block;
and calculating a second brightness average value of the second target image according to the second RGB average value.
9. The abnormality detection method of the optical filter according to claim 8, wherein the second image pickup parameter data includes a second infrared component ratio; the method further comprises the steps of:
calculating to obtain a second white balance parameter value of the statistical block according to the second RGB value of the statistical block;
determining a statistical block corresponding to a second white balance parameter value, the distance between the second statistical block and a preset white balance parameter threshold value of which is smaller than a preset first threshold value, as a second target statistical block, wherein the white balance parameter threshold value is a white balance parameter value of a preset image shot by the camera in a pure infrared environment;
And determining the ratio of the number of the second target statistical blocks to the number of all the statistical blocks in the second target image as a second infrared component ratio acquired when the camera operates in a second working mode.
10. An abnormality detection device of an optical filter applied to abnormality detection of an optical filter in a camera including a dual-filter switcher for switching between a first operation mode and a second operation mode in the camera, the device comprising:
the judging module is used for determining whether a first environment light brightness value acquired by the camera falls into a preset switching threshold value interval when the camera operates in a first working mode;
the first acquisition module is used for acquiring first image data and first shooting parameter data acquired when the camera operates in a first working mode under the condition that the first environment light brightness value falls into the switching threshold value interval;
the second acquisition module is used for switching the camera from the first working mode to the second working mode and acquiring second image data and second shooting parameter data acquired when the camera operates in the second working mode;
And the output module is used for processing the first image data, the first shooting parameter data, the second image data and the second shooting parameter data by using the trained abnormality detection model and determining whether the optical filter is abnormal or not according to the detection result output by the trained abnormality detection model.
11. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of anomaly detection of the optical filter of any one of claims 1 to 9.
12. A storage medium having a computer program stored therein, wherein the computer program when executed by a processor implements the anomaly detection method of the optical filter of any one of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110987484.3A CN113747149B (en) | 2021-08-26 | 2021-08-26 | Abnormality detection method and device for optical filter, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110987484.3A CN113747149B (en) | 2021-08-26 | 2021-08-26 | Abnormality detection method and device for optical filter, electronic device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113747149A CN113747149A (en) | 2021-12-03 |
CN113747149B true CN113747149B (en) | 2024-04-16 |
Family
ID=78732988
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110987484.3A Active CN113747149B (en) | 2021-08-26 | 2021-08-26 | Abnormality detection method and device for optical filter, electronic device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113747149B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114430461B (en) * | 2022-04-01 | 2022-07-19 | 深圳市一心视觉科技有限公司 | Method, device, terminal and storage medium for realizing soft photosensitivity based on deep learning |
CN118018830B (en) * | 2024-04-03 | 2024-07-05 | 深圳市积加创新技术有限公司 | Automatic light matching method for IR-CUT double-filter camera |
Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20050001106A (en) * | 2003-06-27 | 2005-01-06 | 삼성전자주식회사 | a filter changeover equipment for camera and a method thereof |
WO2012128233A1 (en) * | 2011-03-18 | 2012-09-27 | 東洋インキScホールディングス株式会社 | Colored composition for color filters, and color filters |
CN103945201A (en) * | 2013-01-21 | 2014-07-23 | 浙江大华技术股份有限公司 | IR-Cut optical filter switching method, device and camera |
CN104035200A (en) * | 2014-06-12 | 2014-09-10 | 苏州大学 | Method for generating abnormal hollow beams and device thereof |
CN105991936A (en) * | 2015-02-15 | 2016-10-05 | 广东中星电子有限公司 | Method for controlling automatic switching of infrared filter |
CN106231179A (en) * | 2016-07-29 | 2016-12-14 | 浙江大华技术股份有限公司 | One the most double optical-filter switcher changing method and device |
CN106254778A (en) * | 2016-08-23 | 2016-12-21 | 上海集光安防科技股份有限公司 | A kind of method carrying out automatic switchover optical filter based on image |
CN107026967A (en) * | 2016-02-01 | 2017-08-08 | 杭州海康威视数字技术股份有限公司 | A kind of camera operation mode switching method and device |
CN110572637A (en) * | 2019-09-18 | 2019-12-13 | 普联技术有限公司 | Image anomaly detection method, terminal device and storage medium |
CN110602488A (en) * | 2019-09-18 | 2019-12-20 | 普联技术有限公司 | Day and night type camera device switching abnormity detection method and device and camera device |
WO2020062276A1 (en) * | 2018-09-30 | 2020-04-02 | 浙江宇视科技有限公司 | Day and night switching method and apparatus, electronic device and readable storage medium |
CN111263078A (en) * | 2020-02-04 | 2020-06-09 | 浙江大华技术股份有限公司 | Method and device for determining image pickup mode, storage medium and electronic device |
KR20200088554A (en) * | 2019-01-15 | 2020-07-23 | 한화테크윈 주식회사 | method for detecting filter switching error of surveillance camera |
CN112422784A (en) * | 2020-10-12 | 2021-02-26 | 浙江大华技术股份有限公司 | Imaging method, imaging apparatus, electronic apparatus, and storage medium |
CN113031386A (en) * | 2019-12-25 | 2021-06-25 | 浙江宇视科技有限公司 | Method, apparatus, device and medium for detecting abnormality of dual-filter switcher |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005334298A (en) * | 2004-05-27 | 2005-12-08 | Fuji Photo Film Co Ltd | Method, apparatus and program for detecting abnormal shadow |
US9091903B2 (en) * | 2010-07-29 | 2015-07-28 | Logitech Europe S.A. | Optimized movable IR filter in cameras |
-
2021
- 2021-08-26 CN CN202110987484.3A patent/CN113747149B/en active Active
Patent Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20050001106A (en) * | 2003-06-27 | 2005-01-06 | 삼성전자주식회사 | a filter changeover equipment for camera and a method thereof |
WO2012128233A1 (en) * | 2011-03-18 | 2012-09-27 | 東洋インキScホールディングス株式会社 | Colored composition for color filters, and color filters |
CN103945201A (en) * | 2013-01-21 | 2014-07-23 | 浙江大华技术股份有限公司 | IR-Cut optical filter switching method, device and camera |
CN104035200A (en) * | 2014-06-12 | 2014-09-10 | 苏州大学 | Method for generating abnormal hollow beams and device thereof |
CN105991936A (en) * | 2015-02-15 | 2016-10-05 | 广东中星电子有限公司 | Method for controlling automatic switching of infrared filter |
CN107026967A (en) * | 2016-02-01 | 2017-08-08 | 杭州海康威视数字技术股份有限公司 | A kind of camera operation mode switching method and device |
CN106231179A (en) * | 2016-07-29 | 2016-12-14 | 浙江大华技术股份有限公司 | One the most double optical-filter switcher changing method and device |
CN106254778A (en) * | 2016-08-23 | 2016-12-21 | 上海集光安防科技股份有限公司 | A kind of method carrying out automatic switchover optical filter based on image |
WO2020062276A1 (en) * | 2018-09-30 | 2020-04-02 | 浙江宇视科技有限公司 | Day and night switching method and apparatus, electronic device and readable storage medium |
KR20200088554A (en) * | 2019-01-15 | 2020-07-23 | 한화테크윈 주식회사 | method for detecting filter switching error of surveillance camera |
CN110572637A (en) * | 2019-09-18 | 2019-12-13 | 普联技术有限公司 | Image anomaly detection method, terminal device and storage medium |
CN110602488A (en) * | 2019-09-18 | 2019-12-20 | 普联技术有限公司 | Day and night type camera device switching abnormity detection method and device and camera device |
CN113031386A (en) * | 2019-12-25 | 2021-06-25 | 浙江宇视科技有限公司 | Method, apparatus, device and medium for detecting abnormality of dual-filter switcher |
CN111263078A (en) * | 2020-02-04 | 2020-06-09 | 浙江大华技术股份有限公司 | Method and device for determining image pickup mode, storage medium and electronic device |
CN112422784A (en) * | 2020-10-12 | 2021-02-26 | 浙江大华技术股份有限公司 | Imaging method, imaging apparatus, electronic apparatus, and storage medium |
Non-Patent Citations (4)
Title |
---|
G5彩色滤光片制造生产效率提高的研究;陈瑶;《中国优秀硕士论文电子期刊网》;全文 * |
Tongue shape classification integrating image preprocessing and Convolution Neural Network;Chun-Mei Huo;《2017 2nd Asia-Pacific Conference on Intelligent Robot Systems (ACIRS)》;全文 * |
一种基于MEGA128的IR-CUT检测系统;胡继明;夏路生;;电子制作(23);全文 * |
基于带野值的SVDD的高光谱图像异常检测;蒲晓丰;雷武虎;汤俊杰;黄涛;;光电工程(12);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113747149A (en) | 2021-12-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107241559B (en) | Portrait photographing method and device and camera equipment | |
US8184196B2 (en) | System and method to generate depth data using edge detection | |
CN113747149B (en) | Abnormality detection method and device for optical filter, electronic device and storage medium | |
US7595823B2 (en) | Providing optimized digital images | |
US8379922B2 (en) | Detecting objects in an image being acquired by a digital camera or other electronic image acquisition device | |
US8737695B2 (en) | Photography auto-triage | |
CN112087580B (en) | Image acquisition method and device, electronic equipment and computer readable storage medium | |
US8233094B2 (en) | Methods, systems and apparatuses for motion detection using auto-focus statistics | |
US8593547B2 (en) | Image processing apparatus, image capturing apparatus, and image processing method | |
KR20150020720A (en) | High dynamic range transition | |
JP5246078B2 (en) | Object location program and camera | |
CN108805198A (en) | Image processing method, device, computer readable storage medium and electronic equipment | |
US20190230269A1 (en) | Monitoring camera, method of controlling monitoring camera, and non-transitory computer-readable storage medium | |
US20100141810A1 (en) | Bad Pixel Detection and Correction | |
US7796806B2 (en) | Removing singlet and couplet defects from images | |
CN108053438B (en) | Depth of field acquisition method, device and equipment | |
CN110049240B (en) | Camera control method and device, electronic equipment and computer readable storage medium | |
US10972676B2 (en) | Image processing method and electronic device capable of optimizing hdr image by using depth information | |
CN108881876B (en) | Method and device for carrying out white balance processing on image and electronic equipment | |
CN104243804B (en) | Picture pick-up device, image processing equipment and its control method | |
CN112927247A (en) | Graph cutting method based on target detection, graph cutting device and storage medium | |
JP5862071B2 (en) | Image processing apparatus, imaging apparatus, and program | |
CN116055607A (en) | Zoom smoothness evaluation method and device and electronic equipment | |
CN108198189A (en) | Acquisition methods, device, storage medium and the electronic equipment of picture clarity | |
CN116308992A (en) | Image processing method and device, electronic equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |