CN113132718B - Day and night type image pickup device switching abnormality detection method, device, equipment and storage medium - Google Patents
Day and night type image pickup device switching abnormality detection method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN113132718B CN113132718B CN202110426431.4A CN202110426431A CN113132718B CN 113132718 B CN113132718 B CN 113132718B CN 202110426431 A CN202110426431 A CN 202110426431A CN 113132718 B CN113132718 B CN 113132718B
- Authority
- CN
- China
- Prior art keywords
- image
- switching
- day
- layers
- night type
- 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
Images
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
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
Landscapes
- Engineering & Computer Science (AREA)
- Quality & Reliability (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Closed-Circuit Television Systems (AREA)
Abstract
The invention is suitable for the technical field of computers, and provides a method, a device, equipment and a storage medium for detecting the switching abnormity of a day and night type camera device, wherein the method for detecting the switching abnormity of the day and night type camera device comprises the following steps: acquiring a differential image, wherein the differential image is the differential image between images acquired by a front camera device and a rear camera device before the action of a filter; constructing a feature map between single image layers of the differential image: y is R × k + G × m + B × n, where R, G, B are data obtained by separating each single image layer of the difference image, and k, m, and n are coefficient values preset according to the training result; and judging whether the switching of the day and night type camera device is abnormal or not according to the characteristic diagram between the single diagram layers of the difference image by utilizing a sparse algorithm. According to the scheme, the characteristic diagram among the single diagram layers of the differential image is constructed, and then whether the day and night type camera device is abnormally switched or not is judged through a sparse algorithm according to Y, so that compared with the mode that whether the optical filter is abnormally switched or not is manually detected, the detection efficiency is effectively improved, and the labor cost is saved.
Description
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a method, device equipment and storage medium for detecting switching abnormity of a day-night type camera device.
Background
A day and night type image pickup apparatus is an image pickup apparatus that can be used both in the daytime and at night. The day and night type image pickup apparatus generally employs a filter switching device such as an IR-CUT dual filter switching device for filtering. The specific working process of the optical filter switching device is as follows: when the device is in the daytime, the optical filter is switched to filter out infrared light so as to ensure the imaging effect of the image; when the image is in the night time period, the optical filter is removed to ensure the transmission of the full spectrum, and the brightness of the image is improved. However, in the process of using the day and night type image pickup apparatus, due to the influence of environmental factors, poor hardware materials, aging of the apparatus, and the like, switching abnormality of the optical filter switching apparatus may occur.
In the prior art, whether the optical filter switching device is switched abnormally is generally detected manually, so that manual detection is complicated and the efficiency is low.
It is apparent that it is desirable to provide a method for detecting switching abnormality of a day and night type image pickup apparatus instead of manual detection.
Disclosure of Invention
The embodiment of the invention aims to provide a method for detecting switching abnormity of a day and night type camera device, and aims to solve the technical problems that whether an optical filter switching device is abnormally switched or not is manually detected in the prior art, and the working efficiency is low.
The embodiment of the invention is realized in such a way that the method for detecting the switching abnormality of the day and night type camera device comprises the following steps:
acquiring a difference image, wherein the difference image is the difference image between images acquired by a front camera device and a rear camera device before the action of a filter;
constructing a feature map between single image layers of the differential image:
Y=R×k+G×m+B×n,
y is a characteristic diagram among single image layers of the difference image, R, G, B is data obtained by separating the single image layers of the difference image respectively, and k, m and n are coefficient values related to the characteristic of the filter;
and judging whether the switching of the day and night type camera device is abnormal or not according to the characteristic diagram between the single diagram layers of the difference image by utilizing a sparse algorithm.
It is another object of an embodiment of the present invention to provide a device for detecting switching abnormality of a day/night type image pickup device, including
The acquisition module is used for acquiring a difference image, wherein the difference image is a difference image between images acquired by the front camera device and the rear camera device before the action of the filter;
a construction module, configured to construct a feature map between single map layers of the difference image:
Y=R×k+G×m+B×n,
y is a characteristic diagram among single image layers of the difference image, R, G, B is data obtained by separating the single image layers of the difference image respectively, and k, m and n are coefficient values related to the characteristic of the filter;
and the judging module is used for judging whether the switching of the day and night type camera device is abnormal or not according to the characteristic diagram among the single diagram layers of the difference image by utilizing a sparse algorithm.
It is another object of an embodiment of the present invention to provide a day and night type image pickup device switching abnormality detection apparatus including a memory in which a computer program is stored and a processor, the computer program causing the processor to execute the steps of the day and night type image pickup device switching abnormality detection method described above when executed by the processor.
It is another object of an embodiment of the present invention to provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the processor to execute the steps of the above-mentioned day and night type image pickup apparatus switching abnormality detection method.
According to the method for detecting the switching abnormity of the day and night type camera device, provided by the embodiment of the invention, the difference image between the images collected by the camera device before and after the action of the filter plate is obtained, then the characteristic diagram between the single image layers of the difference image is constructed, and then the sparse algorithm is utilized to judge whether the switching of the day and night type camera device is abnormal or not according to the characteristic diagram between the single image layers of the difference image.
Drawings
Fig. 1 is an application environment diagram of a method for detecting switching abnormality of a day-and-night type image pickup apparatus according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for detecting switching abnormality of a day-night type image pickup apparatus according to an embodiment of the present invention;
FIG. 3 is a flowchart of obtaining difference images according to an embodiment of the present invention;
fig. 4 is a flowchart for determining whether switching of a day-and-night type image capturing apparatus is abnormal according to a feature map between single image layers of a difference image by using a sparse algorithm according to an embodiment of the present invention;
fig. 5 is a flowchart of a method for detecting switching abnormality of a day-and-night type image capturing apparatus according to an embodiment of the present invention, the method including binarizing a feature map between single image layers of a difference image;
fig. 6 is a flowchart of a method for detecting switching abnormality of a day-and-night type camera device, which includes determining whether there is a dynamic feature in an image capturing field of view of the camera device according to an embodiment of the present invention;
fig. 7 is a block diagram showing a configuration of a switching abnormality detection device of a day-and-night type image pickup device according to an embodiment of the present invention;
FIG. 8 is a block diagram showing an internal configuration of a computer device according to one embodiment;
fig. 9 is a schematic diagram of two terminal positions of the motion trail of the filter;
fig. 10 is a schematic diagram of a filter segment at two adjacent abnormal positions.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms unless otherwise specified. These terms are only used to distinguish one element from another. For example, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script, without departing from the scope of the present application.
Fig. 1 is a diagram of an application environment of a method for detecting an abnormal switching of a day-and-night type image capturing apparatus according to an embodiment of the present invention, as shown in fig. 1, in the application environment, the day-and-night type image capturing apparatus 110 and a computer device 120 are included.
The computer device 120 may be an independent physical server or terminal, may also be a server cluster formed by a plurality of physical servers, and may be a cloud server providing basic cloud computing services such as a cloud server, a cloud database, a cloud storage, and a CDN.
The day and night type image pickup apparatus 110 is provided with a filter module 111. The day and night type camera 110 and the computer device 120 may be connected through a network, and the present invention is not limited thereto.
As shown in fig. 2, in one embodiment, a method for detecting an abnormality in switching of a day-night type image pickup apparatus is proposed, and this embodiment is mainly exemplified by applying this method to the computer device 120 in fig. 1 described above. The method for detecting the switching abnormality of the day and night type image pickup device may specifically include the steps of:
step S202, obtaining a difference image, wherein the difference image is the difference image between the images collected by the front and rear camera devices before and after the action of the filter.
In the embodiment of the invention, the action of the filter plate means that the filter plate module controls the filter plate to move to shield the lens, and the lens is still not shielded or part of the lens is shielded after the action of the filter plate, so that the switching is abnormal. And subtracting the images collected by the front and rear image pick-up devices of the filter plate to obtain a difference image.
In the embodiment of the present invention, a specific obtaining method of the difference image is not limited, and as shown in fig. 3, in an embodiment of the present invention, the step S202 may include the following steps:
and step S302, acquiring an image collected by the camera before the filter acts.
In step S304, a filter action command is issued.
In the embodiment of the invention, the sending of the filter action instruction means informing the camera device to enable the filter module to control the filter action so as to collect the image after the filter action.
And S306, acquiring an image acquired by the camera device after the filter plate acts.
In the embodiment of the invention, the image collected by the camera device after the filter is operated can be acquired after a certain time delay after the filter operation instruction is sent out, for example, the time delay is 0.3 second, so that the filter operation is completed when the image collected by the camera device after the filter is operated is acquired.
And step S308, subtracting the image acquired by the camera device before the filter plate acts from the image acquired by the camera device after the filter plate acts to obtain a difference image.
In the embodiment of the invention, whether the filter is switched abnormally can be judged according to the characteristics of the differential image by acquiring the differential image between the images acquired by the camera before and after the action of the filter.
Step S204, constructing a feature map between single image layers of the difference image:
Y=R×k+G×m+B×n,
wherein, Y is a characteristic diagram between single image layers of the difference image, R, G, B is data obtained by separating the single image layers of the difference image, and k, m and n are coefficient values related to the characteristic of the filter.
In the embodiment of the present invention, a specific method for constructing a feature map between single image layers of a difference image is not limited, and in an embodiment of the present invention, step S203 may include the following steps:
step S402, compressing the difference image to a specified pixel size to obtain a compressed difference image.
In the embodiment of the present invention, the feature map between the single image layers of the difference image is constructed, and the data R, G, B obtained by separating the single image layers of the difference image is obtained by directly separating the color RGB image layers of the difference image. In this embodiment, the differential image is compressed to a specified pixel size, for example, to 300 × 300 pixels, and then the color RGB layers of the compressed differential image are separated, so that the amount of calculation can be effectively reduced, and the detection efficiency is improved.
Step S404, separating the color RGB layers of the compressed differential image.
In the embodiment of the invention, the data R, G and B of each single layer can be obtained by separating and compressing the color RGB layers of the differential image, and R, G and B are respectively the set of the color values of each pixel point in each single layer.
Step S406, constructing a feature map between the single image layers of the difference image according to the separated data of the RGB image layers of the colors.
In the embodiment of the present invention, the coefficient values k, m, and n are obtained in step S404 and R, G, B, and then the coefficient values k, m, and n are set according to the characteristics of the filter, for example, when the filter is an infrared filter, the infrared filter has the greatest influence on the red layer, so that the coefficient of the R layer is set to be larger than m and n, and k, m, and n may be 1, 0.2, and 0.2, so that the characteristic diagram between the single image layers of the difference image may be constructed:
and Y is R multiplied by k + G multiplied by m + B multiplied by n, and the values of k, m and n are the same as the values of the dictionary matrix when the acquisition switching is abnormal and the dictionary matrix when the switching is normal.
In step S206, it is determined whether or not switching of the day-and-night type image pickup apparatus is abnormal, based on the feature map between the single image layers of the difference image, using the sparse algorithm.
In the embodiment of the present invention, a specific method for determining whether the switching of the day and night type imaging apparatus is abnormal by using the sparse algorithm according to the feature map between the single image layers of the difference image is not limited, for example, as shown in fig. 4, step S206 may specifically include the following steps:
step S502, sparse representation of Y:
Y=X×D,
wherein D is a dictionary matrix and X is a coefficient matrix.
In step S504, the dictionary matrix D1 when switching is abnormal and the dictionary matrix D2 when switching is normal are respectively substituted into D to solve the following formula:
y is a characteristic diagram among the single image layers of the differential image, T is a preset constant, the dictionary matrix during switching abnormity comprises the characteristic diagram among the single image layers of the time difference image during switching abnormity, and the dictionary matrix during switching normality comprises the characteristic diagram among the single image layers of the time difference image during switching normality.
In the embodiment of the present invention, T is a preset constant, and may take a value of 2, for example, but is not limited thereto.
In the embodiment of the present invention, the dictionary matrix D1 in abnormal switching and the dictionary matrix D2 in normal switching may be obtained by training, where feature elements included in the dictionary matrix in abnormal switching are all feature elements acquired when the filter is abnormally switched, and feature elements included in the dictionary matrix in normal switching are all feature elements acquired when the filter is normally switched, for example, when feature elements in the dictionary matrix in normal switching are acquired: firstly, respectively acquiring an image when the filter plate acts to completely shield the camera lens of the camera and an image when the filter plate is completely withdrawn from the camera lens of the camera; then, subtracting an image when the filter moves to completely shield the lens of the camera from an image when the filter is completely removed from the lens of the camera to obtain a differential image; the differential image is compressed proportionally, for example, to a pixel size of 300 × 300; re-separating the compressed difference imageObtaining data R, G, B of each single layer; setting system values k, m and n according to the characteristics of the filter; obtaining a characteristic diagram among single image layers of the differential image: z ═ R × k + G × m + B × n, for example, when the filter is an infrared filter, values of k, m, and n are 1, 0.2, and 0.2, respectively; acquiring Z values (Z) under alpha different daytime scenes1,Z2,……Zɑ) The value of a may be, but is not limited to, 5 to 10 as a feature element in the dictionary matrix when the handover is normal. When collecting the characteristic elements in the dictionary matrix when the switching is abnormal, the training can be performed by selecting a white cloth picture on the occasion in the daytime, and the method specifically comprises the following steps: firstly, respectively collecting an image when the filter plate operates to an abnormal position and an image when the filter plate is completely withdrawn from a lens of the camera device; then, subtracting the image when the filter operates to the abnormal position from the image when the filter is completely removed from the lens of the camera to obtain a difference image; compressing the differential image in equal proportion to the same pixel size as that when collecting the characteristic elements in the dictionary matrix when switching is normal; separating the color RGB layers of the compressed difference image to obtain data R, G, B of each single layer; then setting and collecting coefficient values k, m and n which are the same when characteristic elements in the dictionary matrix are switched to be normal; obtaining a characteristic diagram among single image layers of the differential image: e ═ R × k + G × m + B × n; collecting E values (E) of different abnormal positions of beta filter plates1,E2,……Eβ) As a feature element in the dictionary matrix at the time of switching abnormality. When different abnormal positions are selected, the ratio of the interval between two adjacent abnormal positions to the total length of the normal switching track of the filter is not more than 10%, for example, 5% may be selected, and each abnormal position is in a half-shielding state of the filter, as shown in fig. 9, the distance between two terminal positions of the motion track of the filter is λ, as shown in fig. 10, and the interval Δ L between two adjacent abnormal positions is not more than 0.1 × λ.
Step S506, comparing the solution obtained by using the dictionary matrix in the abnormal switching with the solution obtained by using the dictionary in the normal switching, and switching to be normal when the solution obtained by switching the dictionary in the abnormal switching is larger than the solution obtained by switching the dictionary in the normal switching, otherwise, switching to be abnormal.
In the embodiment of the present invention, after solving the above inequality by substituting the dictionary matrix D1 in switching anomaly and the dictionary matrix D2 in switching normality into D, the magnitude of the solution obtained by using the dictionary matrix in switching anomaly and the magnitude of the solution obtained by switching normal dictionary are compared, whereby it is possible to detect whether or not switching is abnormal.
According to the method for detecting the switching abnormity of the day and night type camera device, the difference image between the images collected by the camera device before and after the action of the filter plate is obtained, the characteristic diagram between the single image layers of the difference image is constructed, and the sparse algorithm is utilized to judge whether the switching of the day and night type camera device is abnormal or not according to the characteristic diagram between the single image layers of the difference image.
In another embodiment of the present invention, as shown in fig. 5, before determining whether or not the switching of the day and night type image pickup apparatus is abnormal from the feature map between the single map layers of the difference image by using the sparse algorithm, the method for detecting the switching abnormality of the day and night type image pickup apparatus further includes:
in step S205, a binarization process is performed on the feature map between the single image layers of the difference image.
In the embodiment of the present invention, by performing binarization processing on the obtained feature map between the single image layers, the pixel value of each pixel point in the image can be set to 0 or 255, so that the amount of calculation on the feature map between the single image layers of the difference image is effectively reduced when step 206 is executed, and the detection speed is increased.
As shown in fig. 4, in another embodiment of the present invention, the determining whether the switching of the day and night type image pickup apparatus is abnormal or not by using the sparse algorithm based on the feature map between the single image layers of the difference image further includes:
step S508, when the solution obtained by the dictionary in the abnormal switching is greater than the solution obtained by the dictionary in the normal switching, determining whether each pixel value in the feature map between the single image layers of the differential image satisfies a preset threshold, and when each pixel value in the feature map between the single image layers of the differential image satisfies the preset threshold, switching is normal, otherwise, switching is abnormal.
In the embodiment of the present invention, when the filter is switched abnormally, the filter does not block the lens at all, in which case, the images collected before and after the filter operates are the same, and in this case, the characteristic diagram between the single image layers of the difference image cannot be determined, so a determination condition is added to determine whether each pixel value in the characteristic diagram between the single image layers of the difference image is within the preset threshold range.
In the embodiment of the present invention, when the preset threshold range is used for collecting the feature elements in the dictionary matrix when the switching is normal, the average value of each pixel point in Z is obtained as the preset threshold, and whether each pixel value in the feature map between the single image layers of the difference image meets the preset threshold means that each pixel value in the feature map between the single image layers of the difference image is smaller than the preset threshold.
According to the method for detecting the switching abnormity of the day and night type camera device, the judgment condition is added to judge whether the pixel values in the characteristic diagram between the single image layers of the difference image meet the preset threshold value, and the reliability of detection is effectively improved.
As shown in fig. 6, in another embodiment of the present invention, the day and night type image pickup apparatus switching abnormality detecting method further includes, before acquiring the difference image:
step S201, judging whether the image acquisition field of the camera device has dynamic characteristics.
In the embodiment of the invention, the dynamic characteristics refer to objects which move rapidly and frequently, and if the dynamic characteristics exist in the acquisition field of view of the lens, images acquired by the camera device before and after the action of the filter can be different from the filter, so that the accuracy of the detection result is influenced. Whether dynamic characteristics exist in the image acquisition visual field of the camera device is judged firstly, and then differential images are acquired when no dynamic characteristics exist, so that the reliability of the detection result is effectively guaranteed.
In this embodiment, the specific method for determining whether there is a dynamic feature in the image capturing field of view of the image capturing device is not limited, for example, by performing picture detection for 2 seconds, and using an adjacent frame difference algorithm, it is calculated whether there is a fast and frequent moving object in the image capturing field of view, if it is determined that there is a fast moving object, the detection is performed after a delay of 5 seconds, and if it is determined that there is no fast moving object, a differential image is captured.
As shown in fig. 7, in an embodiment, a day and night type image capturing device switching abnormality detection device is provided, which may be integrated in the computer device 120 described above, and specifically may include an obtaining module 610, a constructing module 620, and a determining module 630.
The obtaining module 610 is configured to obtain a difference image, where the difference image is a difference image between images collected by the front and rear image capturing devices;
a constructing module 620, configured to construct a feature map between single map layers of the difference image:
Y=R×k+G×m+B×n,
y is a characteristic diagram among single image layers of the difference image, R, G, B is data obtained by separating the single image layers of the difference image respectively, and k, m and n are coefficient values related to the characteristic of the filter;
and a judging module 630, configured to judge whether switching of the day and night type image capturing device is abnormal according to the feature map between the single image layers of the difference image by using a sparse algorithm.
The embodiment of the present invention provides a device for detecting switching abnormality of a day and night type camera device, wherein the functions of the acquisition module 610, the construction module 620 and the judgment module 630 are implemented in a one-to-one correspondence manner with the steps S202, S204 and S206 in the method for detecting switching abnormality of a day and night type camera device, and for the specific explanation, the detailed and optimized contents of the device for detecting switching abnormality of a day and night type camera device, reference is made to the specific embodiment of the method for detecting switching abnormality of a day and night type camera device, and no further description is given here.
FIG. 8 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be computer device 120 in fig. 1. As shown in fig. 8, the computer apparatus includes a processor, a memory, a network interface, an input device, and a display screen connected through a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may further store a computer program that, when executed by the processor, causes the processor to implement a day and night type image pickup apparatus switching abnormality detection method. The internal memory may also store a computer program that, when executed by the processor, causes the processor to execute a method for detecting a day-night switching abnormality of the image pickup apparatus. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the day and night type image pickup apparatus switching abnormality detecting apparatus provided by the present application may be implemented in the form of a computer program that is executable on a computer device as shown in fig. 8. The memory of the computer apparatus may store therein various program modules constituting the day-and-night type image pickup device switching abnormality detection means, such as the acquisition module 610, the construction module 620, and the judgment module 630 shown in fig. 7. The computer program constituted by the respective program modules causes the processor to execute the steps in the day-and-night type image pickup apparatus switching abnormality detection method of the respective embodiments of the present application described in the present specification.
For example, the computer apparatus shown in fig. 8 may execute step S202 by switching the acquisition module in the abnormality detection device by the day-and-night type image pickup device as shown in fig. 7. The computer device may perform step S204 by the construction module. The computer device may execute step S206 through the determination module.
In one embodiment, a computer device is proposed, the computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
step S202, obtaining a difference image, wherein the difference image is the difference image between the images collected by the front and rear camera devices before and after the action of the filter;
step S204, constructing a feature map between single image layers of the difference image:
Y=R×k+G×m+B×n,
y is a characteristic diagram among single image layers of the difference image, R, G, B is data obtained by separating the single image layers of the difference image respectively, and k, m and n are coefficient values related to the characteristic of the filter;
in step S206, it is determined whether or not switching of the day-and-night type image pickup apparatus is abnormal, based on the feature map between the single image layers of the difference image, using the sparse algorithm.
In one embodiment, a computer readable storage medium is provided, having a computer program stored thereon, which, when executed by a processor, causes the processor to perform the steps of:
step S202, obtaining a difference image, wherein the difference image is the difference image between the images collected by the front and rear camera devices before and after the action of the filter;
step S204, constructing a feature map between single image layers of the difference image:
Y=R×k+G×m+B×n,
y is a characteristic diagram among single image layers of the difference image, R, G, B is data obtained by separating the single image layers of the difference image respectively, and k, m and n are coefficient values related to the characteristic of the filter;
in step S206, it is determined whether or not switching of the day-and-night type image pickup apparatus is abnormal, based on the feature map between the single image layers of the difference image, using the sparse algorithm.
It should be understood that, although the steps in the flowcharts of the embodiments of the present invention are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in various embodiments may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus (Rambus) direct RAM (RDRAM), direct bused dynamic RAM (DRDRAM), and bused dynamic RAM (RDRAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.
Claims (10)
1. A method for detecting an abnormality in switching of a day-and-night type image pickup apparatus, comprising:
acquiring a difference image, wherein the difference image is the difference image between images acquired by a front camera device and a rear camera device before the action of a filter;
constructing a feature map between single image layers of the differential image:
Y=R×k+G×m+B×n,
y is a characteristic diagram among single image layers of the differential image, R, G, B is data of each single image layer obtained by separating the differential image, and k, m and n are coefficient values related to the characteristics of the filter;
and judging whether the switching of the day and night type camera device is abnormal or not according to the characteristic diagram between the single diagram layers of the difference image by utilizing a sparse algorithm.
2. The method for detecting an abnormality of switching of a day-and-night type image pickup apparatus according to claim 1, wherein determining whether the switching of the day-and-night type image pickup apparatus is abnormal or not based on a feature map between single map layers of the difference image by using a thinning algorithm includes:
and substituting the dictionary matrix D1 when switching is abnormal and the dictionary matrix D2 when switching is normal into D' respectively to solve the following formula:
y is a characteristic diagram between single image layers of the differential image, T is a preset constant, X is a coefficient matrix, a dictionary matrix in abnormal switching corresponds to the characteristic diagram between the single image layers of the abnormal time differential image, and a dictionary matrix in normal switching corresponds to the characteristic diagram between the single image layers of the normal time differential image;
and comparing the solution obtained by using the dictionary matrix in the abnormal switching with the solution obtained by using the dictionary matrix in the normal switching, and if the solution obtained by using the dictionary matrix in the abnormal switching is larger than the solution obtained by using the dictionary matrix in the normal switching, switching to be normal, otherwise, switching to be abnormal.
3. The method for detecting switching abnormality of a day-and-night type image pickup apparatus according to claim 2, wherein when the solution obtained by using the dictionary matrix at the time of switching abnormality is larger than the solution obtained by using the dictionary matrix at the time of switching normality, the switching is normal, and otherwise, the switching abnormality is specifically:
and when the solution obtained by using the dictionary matrix in the abnormal switching is larger than the solution obtained by using the dictionary matrix in the normal switching, judging whether each pixel value in the characteristic diagram Y between the single image layers of the differential image meets a preset threshold value, when each pixel value in the characteristic diagram Y between the single image layers of the differential image meets the preset threshold value, the normal switching is carried out, otherwise, the abnormal switching is carried out.
4. The method for detecting a switching abnormality of a day-and-night type image pickup apparatus according to claim 1, wherein acquiring the difference image includes:
acquiring an image collected by a camera device before the filter plate acts;
sending out a filter action instruction;
acquiring an image acquired by the camera device after the filter plate acts;
and subtracting the image acquired by the camera device before the filter plate acts from the image acquired by the camera device after the filter plate acts to obtain a difference image.
5. The method for detecting switching abnormality of a day-and-night type image pickup apparatus according to claim 1, wherein constructing a feature map between single map layers of a difference image comprises:
compressing the difference image to a specified pixel size to obtain a compressed difference image;
separating the R layer, the G layer and the B layer of the compressed differential image;
and constructing a characteristic diagram among the single image layers of the differential image according to the separated data of the R image layer, the G image layer and the B image layer.
6. The method for detecting a switching abnormality of a day/night type image pickup apparatus according to claim 1, wherein before judging whether or not the switching of the day/night type image pickup apparatus is abnormal from a feature map between single map layers of the difference image by using a thinning algorithm, the method for detecting a switching abnormality of a day/night type image pickup apparatus further comprises:
and carrying out binarization processing on the feature maps among the single image layers of the difference image.
7. The method of claim 1, wherein the method of detecting a day-and-night switching abnormality of the day-and-night image pickup apparatus further comprises, before acquiring the difference image:
and judging whether the image acquisition field of the camera device has dynamic characteristics.
8. A device for detecting abnormality in switching between day and night type image pickup devices, comprising
The acquisition module is used for acquiring a difference image, wherein the difference image is a difference image between images acquired by the front camera device and the rear camera device before the action of the filter;
a construction module, configured to construct a feature map between single map layers of the difference image:
Y=R×k+G×m+B×n,
y is a characteristic diagram among single image layers of the differential image, R, G, B is data of each single image layer obtained by separating the differential image, and k, m and n are coefficient values related to the characteristics of the filter;
and the judging module is used for judging whether the switching of the day and night type camera device is abnormal or not according to the characteristic diagram among the single diagram layers of the difference image by utilizing a sparse algorithm.
9. A day-and-night type image pickup device switching abnormality detection apparatus characterized by comprising a memory in which is stored a computer program and a processor, the computer program causing the processor to execute the steps of the day-and-night type image pickup device switching abnormality detection method according to any one of claims 1 to 7 when executed by the processor.
10. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, causes the processor to execute the steps of the day and night type image pickup apparatus switching abnormality detection method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110426431.4A CN113132718B (en) | 2021-04-20 | 2021-04-20 | Day and night type image pickup device switching abnormality detection method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110426431.4A CN113132718B (en) | 2021-04-20 | 2021-04-20 | Day and night type image pickup device switching abnormality detection method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113132718A CN113132718A (en) | 2021-07-16 |
CN113132718B true CN113132718B (en) | 2022-05-24 |
Family
ID=76778414
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110426431.4A Active CN113132718B (en) | 2021-04-20 | 2021-04-20 | Day and night type image pickup device switching abnormality detection method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113132718B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114972339B (en) * | 2022-07-27 | 2022-10-21 | 金成技术股份有限公司 | Data enhancement system for bulldozer structural member production abnormity detection |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102143379B (en) * | 2011-03-25 | 2012-09-05 | 东北大学 | Reliability detection device for automatic switchover filter disc of vidicon and control method thereof |
TWI479432B (en) * | 2012-10-09 | 2015-04-01 | Taiwan Secom Co Ltd | Abnormal detection method for a video camera |
CN105554409B (en) * | 2015-12-16 | 2018-01-16 | 浙江宇视科技有限公司 | A kind of method and apparatus of change detection round the clock |
CN108111843B (en) * | 2017-12-25 | 2019-12-27 | 信利光电股份有限公司 | Test method and test system for mobile optical filter camera module |
WO2019127176A1 (en) * | 2017-12-28 | 2019-07-04 | 天彩电子(深圳)有限公司 | Method and device for realizing ir-cut state feedback on the basis of infrared luminance change |
KR102592230B1 (en) * | 2019-01-15 | 2023-10-23 | 한화비전 주식회사 | method for detecting filter switching error of surveillance camera |
CN110505477A (en) * | 2019-09-17 | 2019-11-26 | 普联技术有限公司 | Double filter test methods, device, equipment and storage medium |
CN110602488B (en) * | 2019-09-18 | 2021-07-02 | 普联技术有限公司 | Day and night type camera device switching abnormity detection method and device and camera device |
-
2021
- 2021-04-20 CN CN202110426431.4A patent/CN113132718B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN113132718A (en) | 2021-07-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
DE60013102T2 (en) | FAST DETERMINISTIC APPROACH TO DETECT DEFECTIVE PIXELS IN AN IMAGE SENSOR | |
DE112017000816T5 (en) | Driver assistance system with variable image resolution | |
CN110517186B (en) | Method, device, storage medium and computer equipment for eliminating invoice seal | |
CN111242128B (en) | Object detection method, device, computer readable storage medium and computer equipment | |
CN113132718B (en) | Day and night type image pickup device switching abnormality detection method, device, equipment and storage medium | |
CN113781393B (en) | Screen defect detection method, device, equipment and storage medium | |
CN108847031B (en) | Traffic behavior monitoring method and device, computer equipment and storage medium | |
US20140369552A1 (en) | Method of Establishing Adjustable-Block Background Model for Detecting Real-Time Image Object | |
JP7156527B2 (en) | Road surface inspection device, road surface inspection method, and program | |
CN109996063B (en) | Video image screen splash detection method and device, computer equipment and storage medium | |
CN114141187A (en) | Mura compensation method, device and system and display equipment | |
CN116431857B (en) | Video processing method and system for unmanned scene | |
JP3134845B2 (en) | Apparatus and method for extracting object in moving image | |
CN110880003B (en) | Image matching method and device, storage medium and automobile | |
CN108345858A (en) | A kind of vehicle load condition detection method and system | |
CN115631198B (en) | Crack detection method and device for glass display screen and computer equipment | |
KR101559338B1 (en) | System for testing camera module centering and method for testing camera module centering using the same | |
CN112995666B (en) | Video horizontal and vertical screen conversion method and device combined with scene switching detection | |
CN110662047B (en) | Image storage method and device, electronic equipment and computer storage medium | |
CN114267076A (en) | Image identification method, device, equipment and storage medium | |
CN109996062B (en) | Video image quality detection method and device, computer equipment and storage medium | |
CN112734719A (en) | Dead pixel detection method of image sensor, storage medium and shooting device | |
JP4599136B2 (en) | Image state determination apparatus, image state determination method, and image state determination program | |
JP5473836B2 (en) | Parking detection device, parking detection method, and parking detection program | |
CN110992883A (en) | Display compensation method, device, equipment and 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 |