CN116708723A - Camera exception handling method and system - Google Patents

Camera exception handling method and system Download PDF

Info

Publication number
CN116708723A
CN116708723A CN202310825039.6A CN202310825039A CN116708723A CN 116708723 A CN116708723 A CN 116708723A CN 202310825039 A CN202310825039 A CN 202310825039A CN 116708723 A CN116708723 A CN 116708723A
Authority
CN
China
Prior art keywords
area
black
image
block
black pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310825039.6A
Other languages
Chinese (zh)
Inventor
陈标龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Smalon Electronic Co ltd
Original Assignee
Shenzhen Smalon Electronic Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Smalon Electronic Co ltd filed Critical Shenzhen Smalon Electronic Co ltd
Priority to CN202310825039.6A priority Critical patent/CN116708723A/en
Publication of CN116708723A publication Critical patent/CN116708723A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B21/00Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
    • G08B21/18Status alarms
    • G08B21/24Reminder alarms, e.g. anti-loss alarms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/002Diagnosis, testing or measuring for television systems or their details for television cameras

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Emergency Management (AREA)
  • Business, Economics & Management (AREA)
  • Geometry (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Quality & Reliability (AREA)
  • Closed-Circuit Television Systems (AREA)

Abstract

The application relates to a camera exception handling method and a camera exception handling system, wherein the camera exception handling method comprises the following steps: the method comprises the steps of reading a detection image from a storage unit, reading a first contrast image at a previous time point of the detection image, comparing whether the number of black pixel blocks in the two images is large, judging whether the pixel block changes suddenly or gradually change in the detection image by calculating an average pixel mutation value of the black pixel blocks if the number of the black pixel blocks in the two images is large, judging whether the area of the black pixel blocks influences the monitoring purpose or not by calculating an average pixel mutation value of the black pixel blocks if the number of the black pixel blocks in the two images is large, and then reading a second contrast image at a time point of the detection image in the storage unit to judge whether the occlusion object can change the area after the time point of the detection image or not, and if the area change can effectively reduce the influence on a camera, transmitting a foreign object occlusion signal. The application plays a role in timely reminding to treat the shielding problem and recovering the monitoring visual purpose.

Description

Camera exception handling method and system
Technical Field
The application relates to the technical field of intelligent cameras, in particular to a method and a system for processing camera anomalies.
Background
At present, intelligent cameras are popular more and more, and development of display equipment is accelerated while practice is carried out. The intelligent camera can be matched with various displays: the intelligent mobile phone, the intelligent display screen, the intelligent integrated machine and the like are used for monitoring. But intelligent camera is applied to each scene now, and wherein outdoor camera carries out real-time supervision to house gate, district gate and construction site to need a plurality of cameras to carry out the monitoring operation simultaneously, improve the factor of safety in each region.
When using intelligent camera to realize monitoring operation, often because of surrounding environment influences, lead to the camera to shelter from by the foreign matter, fuzzy collection image, and when showing the image that a plurality of cameras gathered, one of them camera is sheltered from by the foreign matter, is difficult to learn rapidly from external display device.
Aiming at the related technology, the inventor considers that the image can not be processed in time after being shielded by foreign matters, and the defect that the image acquisition of a camera is influenced and the monitoring function can not be achieved is overcome.
Disclosure of Invention
In order to timely remind of processing the shielding problem and restore the monitoring visual purpose after the camera is shielded by the foreign matter, the application provides a camera abnormality processing method and system.
In a first aspect, the present application provides a method for processing camera abnormality, which adopts the following technical scheme:
a camera exception handling method comprises the following steps:
reading a detection image input from a camera and a first contrast image positioned at a previous time point of the detection image in a storage unit;
calculating the difference value of the number of black pixel blocks in the detection image and the first contrast image to obtain the difference value of the number of black blocks;
when the difference value of the number of the black blocks is larger than a preset value of abnormal increment of the black blocks, calculating an average pixel mutation value of the black pixel blocks of the first control image corresponding to the detection image;
when the average pixel mutation value is larger than a preset abnormal mutation value, calculating the area of a black pixel block in the detection image to obtain the area of the black block;
when the black block area in the detection image is larger than the abnormal area preset value, reading a second comparison image which is input from the camera in the storage unit and is positioned at the later time point of the detection image;
calculating the area difference between the area of the black pixel block and the area of the black block on the second control image;
and when the area difference value is smaller than the area variation preset value, transmitting a foreign matter shielding signal to the external display equipment.
By adopting the technical scheme, the detection image is read from the storage unit, the first contrast image at the previous time point of the detection image is read in a matching way, whether the difference value of the quantity of black pixel blocks in the two images is larger is compared, if the difference value is larger, the fact that more black pixel blocks appear in the images within a short time is proved, then the average pixel mutation value is calculated to judge whether the change of the pixel blocks in the detection image into the black pixel blocks is suddenly changed or gradually changed, the black pixel blocks caused by the problems of light rays and the like are eliminated, then whether the concentrated area of the black pixel blocks is larger is calculated, if the concentrated area is larger, the monitoring purpose is judged to be influenced, then the latest acquired image in the storage unit is read, whether the change of the shielding object can be carried out is judged, and if the change of the shielding object can effectively reduce the influence on the camera, if the image acquired by the camera is still influenced, a foreign object shielding signal is sent, the shielding problem is timely reminded of processing, and the monitoring visual purpose is restored.
Preferably, the step of reading the detection image input from the camera and the first reference image at a previous time point of the detection image in the storage unit further includes:
the storage unit stores images acquired by the camera according to preset interval time, records acquisition time nodes,
and comparing the time nodes of the images in the storage unit, and acquiring the image closest to the current time node as a detection image and a first comparison image positioned at the previous time point of the detection image.
By adopting the technical scheme, according to the current time node, the comparison of the time node is carried out from the storage unit, the detection image near the time node is taken, the first comparison image before the time node of the detection image is obtained for reference comparison, the current latest detection image is obtained, and the timeliness of exception handling is improved.
Preferably, the step of calculating the difference between the numbers of black pixel blocks in the detection image and the first control image to obtain the difference between the numbers of black pixel blocks further includes:
comparing black pixel blocks in the detection image and the first control image through preset black pixel values,
positioning coordinates of the black pixel blocks, positioning a concentrated area of the black pixel blocks according to the coordinate communication,
and calculating the number of black pixel blocks in the black pixel block concentrated area in the detection image and the first contrast image, and finally calculating to obtain a difference value of the number of the black blocks.
Through adopting above-mentioned technical scheme, can carry out accurate contrast judgement to the black pixel piece in detection image and the first contrast image through the black pixel value of predetermineeing to through the adjacent judgement coordinate intercommunication of the coordinate of location black pixel piece and coordinate, can discern the black piece region that influences the control, reduce the influence of noise black piece, promote the rigor and the reliability of data.
Preferably, the step of calculating an average pixel mutation value of the black pixel block of the first control image corresponding to the detection image further includes:
and calculating pixel difference values of black pixel blocks in the black pixel block concentrated area in the detection image and black pixel blocks in the corresponding area in the first contrast image, and obtaining an average pixel mutation value through the number of the black pixel blocks in the black pixel block concentrated area in the detection image.
By adopting the technical scheme, the pixel difference value calculation is performed according to the black pixel blocks in the black pixel block concentrated area in the detection image, so that the data can be more referenced when the average difference value of the pixel values is calculated.
Preferably, when the average pixel abrupt change value is greater than a preset abnormal abrupt change value, calculating an area of a black pixel block in the detected image to obtain a black block area, and further including:
and when the average pixel mutation value is larger than a preset abnormal mutation value, calculating the area of a black pixel block concentrated area in the detection image to obtain the black block area.
By adopting the technical scheme, only the area of the concentrated area of the black pixel blocks in the detection image is calculated, the concentrated area of the black pixel blocks is positioned according to the coordinate communication of the black pixel blocks, the communicated black pixel blocks affect the monitoring effect, and the scattered black pixel blocks can be eliminated without interference, so that the data has more referential property.
Preferably, when the area of the black block in the detected image is greater than the preset value of the abnormal area, the step of reading the second comparison image in the storage unit, which is input from the camera and is located at the later time point of the detected image, further includes:
and when the area of the black block in the detection image is larger than the preset value of the abnormal area, according to the preset delay time length, delaying and reading a second comparison image which is input from the camera in the storage unit and is positioned at the later time point of the detection image.
Through adopting above-mentioned technical scheme, carry out the time delay according to predetermining the time delay length and read, can judge more objectively whether the shelter from thing at this moment has the condition that the removal range is great, if the removal range is great, can judge whether shelter from the thing and reduce by oneself at follow-up certain moment, avoid influencing the monitoring effect of camera, the time delay can make its second contrast image have more the reference and contrast with the detected image.
Preferably, the step of calculating an area difference between the area of the black pixel block and the area of the black pixel block on the second control image further includes:
comparing black pixel blocks on the second control image by preset black pixel values,
a black pixel block concentrated region is located according to the coordinate adjacent connectivity,
calculating the number of black pixel blocks in the black pixel block concentrated area, obtaining the area of the black pixel block on the second contrast image according to the product of the area of each pixel block and the number of the black pixel blocks,
and finally, calculating the area difference value between the area of the black pixel block and the area of the black block on the second control image.
Through adopting above-mentioned technical scheme, when judging that the area difference is greater than the area variation value of predetermineeing, can judge whether there is obvious reduction in the foreign matter, if there is obvious reduction, judge that the foreign matter can reduce by oneself to can resume monitoring function rapidly, if not obvious reduction then judge to still influence the control of picture, carry out in time send the foreign matter and shelter from the signal and remind the clearance.
On the other hand, the camera exception handling system provided by the application adopts the following technical scheme:
a camera anomaly handling system, comprising:
a reading detection module for reading the detection image input from the camera in the storage unit and a first contrast image at a previous time point of the detection image;
the pixel block counting module is used for calculating the quantity difference value of black pixel blocks in the detection image and the first contrast image to obtain a black block quantity difference value;
a pixel value change module, configured to calculate an average pixel abrupt change value of a black pixel block of the first control image corresponding to the detection image when the difference value of the number of black blocks is greater than a preset value of abnormal increment of the black blocks;
the calculation area module is used for calculating the area of the black pixel block concentrated area in the detection image to obtain the black block area when the average pixel abrupt change value is larger than a preset abnormal abrupt change value;
the reading comparison module is used for reading a second comparison image which is latest input from the camera and is positioned at a later time point of the detection image in the storage unit when the black block area in the detection image is larger than the abnormal area preset value;
the area change module is used for calculating the difference value between the area of the black pixel block concentrated area on the second control image and the area of the black pixel block concentrated area in the detection image;
and the abnormal sending module is used for sending a foreign matter shielding signal to the external display equipment when the area difference value is smaller than the area variation preset value.
By adopting the technical scheme, the reading detection module reads the detection image and the first contrast image positioned at the previous time point of the detection image from the storage module, the pixel block counting module judges whether the detection image has more newly added black pixel blocks, the pixel value change module judges whether the black pixel blocks in the detection image are suddenly formed or not, the calculation area module judges whether the concentrated area of the black pixel blocks in the detection image is too large to influence the monitoring purpose, the reading contrast module reads the latest second contrast image from the storage module, the positioning area module compares whether the second contrast image is reduced in area and offset relative to the concentrated area of the black module of the detection image, and finally the abnormal sending module sends a foreign matter shielding signal to external display equipment to prompt the processing shielding problem and restore the monitoring visual purpose.
Preferably, the pixel value changing module includes:
the black block quantity difference judging module is used for acquiring a black block quantity difference value and judging whether the black block quantity difference value is larger than a black block abnormal increment preset value or not;
the concentrated region pixel difference module is used for calculating pixel difference values of black pixel blocks in the concentrated region of the black pixel blocks in the detection image and black pixel blocks in the corresponding region in the first contrast image;
and the concentrated area average pixel change module is used for obtaining pixel difference values and dividing the pixel difference values by the number of black pixel blocks in the concentrated areas of the black pixel blocks in the detection image to obtain average pixel mutation values.
By adopting the technical scheme, only the pixel difference value of the black pixel block in the concentrated area of the black pixel block in the detection image and the pixel difference value of the black pixel block in the corresponding area in the first contrast image are calculated, the concentrated area is the area which really affects the monitoring, and only the pixel difference value of the part is calculated, so that the average pixel mutation value obtained next can have more referential property, and the influence of the black pixel block of other noise points in the image is eliminated.
Preferably, the read control module includes:
the black block area judging module is used for acquiring the black block area in the detection image and judging whether the black block area in the detection image is larger than an abnormal area preset value or not;
and the delay reading module is used for delay reading a second contrast image which is latest input from the camera and is positioned at a later time point of the detection image in the storage unit according to a preset delay time when the black block area in the detection image is larger than the abnormal area preset value.
By adopting the technical scheme, the delayed reading of the second contrast image can be better and more intuitively compared with the detection image, so that the later data has more referential property, and the phenomenon that the black pixel block is not obviously changed or intuitively changed due to too short time is avoided.
In summary, the present application includes at least one of the following beneficial technical effects:
1. according to the method, whether the difference value of the quantity of black pixel blocks in two images is larger is firstly compared, whether the pixel blocks in the detected images are changed into the black pixel blocks or suddenly changed or gradually changed is judged, whether the concentrated area of the black pixel blocks is larger is calculated, whether the foreign matters change is judged, the influence on a camera can be effectively reduced due to the change, a foreign matter shielding signal is finally sent, the shielding problem is timely reminded to be processed, and the purpose of monitoring the visibility is restored;
2. by presetting the delay time length in the scheme, carrying out delay reading, judging whether the shielding object has a larger moving amplitude or not more objectively, if the moving amplitude is larger, judging whether the shielding object reduces the influence on the monitoring effect of the camera at a certain subsequent moment or not, and delaying can enable the second comparison image to have more referential performance for judgment;
3. according to the scheme, black pixel blocks in the detection image and the first contrast image are compared according to the preset black pixel values, coordinates of the black pixel blocks are located, and then a black pixel block concentrated area is located according to the communication of the coordinates of the black pixel blocks, so that scattered black pixel block interference data are eliminated.
4. According to the scheme, the number of black pixel blocks of the detection image and the first contrast image is firstly judged, and compared with the range size which is firstly judged that the pixel change value is judged, namely whether the foreign matter suddenly appears or not and the influence of the foreign matter cannot be judged, useless calculation of a subsequent algorithm is avoided.
Drawings
Fig. 1 is a schematic workflow diagram of embodiment 1 of a camera anomaly handling method.
Fig. 2 is a specific workflow diagram of embodiment 1 of a camera anomaly handling method.
Fig. 3 is a schematic logic structure diagram of embodiment 2 of a camera anomaly handling system.
Reference numerals illustrate: 1. a reading detection module; 2. a pixel block counting module; 3. a pixel value variation module; 31. a module for judging the difference value of the number of the black blocks; 32. a concentrated region pixel difference module; 33. a concentrated area average pixel change module; 4. calculating an area module; 5. reading a comparison module; 51. judging a black block area module; 52. a delay reading module; 6. an area change module; 7. and an abnormal sending module.
Detailed Description
When the intelligent camera is used for monitoring operation, the camera is shielded by foreign matters and the collected images are blurred due to the influence of surrounding environment, and when images collected by a plurality of cameras are displayed, one camera is shielded by the foreign matters and is difficult to know rapidly from display equipment, a processing method for shielding the camera by the foreign matters is needed to prompt and clean the external display equipment in time, and the monitoring effect of the camera is guaranteed.
The application is described in further detail below with reference to fig. 1-3.
The embodiment 1 of the application discloses a camera anomaly processing method, which comprises the following steps:
with reference to figure 1 of the drawings,
s101, reading a detection image input from a camera in a storage unit and a first contrast image positioned at a previous time point of the detection image,
after the camera collects the external image, the image information and the time node information are transmitted to the storage unit for storage at regular intervals, the processing terminal obtains a certain time node, compares the time node with the time node of the image in the storage unit, finds out the image of the nearest time node to serve as a detection image, and then obtains the image 1.5 seconds earlier than the detection image as a first comparison image by obtaining the time node of the detection image.
S102, calculating the number difference value of black pixel blocks in the detection image and the first contrast image to obtain the number difference value of the black blocks;
the processing terminal presets a gray value as an abnormal gray value for judging black, compares each pixel block on the first comparison image, converts the RGB color value of the pixel block into the gray value, judges the pixel block as black if the gray value is smaller than the abnormal gray value, counts to obtain the number of the black pixel blocks in the detection image and the first comparison image, and finally calculates the difference value of the number of the black blocks.
S103, when the difference value of the number of the black blocks is larger than a preset value of abnormal increment of the black blocks, calculating an average pixel mutation value of the black pixel blocks of the first control image corresponding to the detection image;
the processing terminal obtains the difference value of the number of the black blocks calculated in the step S102, compares the difference value with the preset value of the abnormal increment of the black blocks, calculates the difference of the gray values of the black pixel blocks of the detection image and the pixel blocks at the corresponding positions in the first contrast image if the difference value of the number of the black blocks is larger than the preset value of the abnormal increment of the black blocks, accumulates the gray values of the pixel blocks at the corresponding positions, and then carries out average calculation according to the number of the black pixel blocks to obtain an average pixel mutation value.
S104, when the average pixel mutation value is larger than a preset abnormal mutation value, calculating the area of a black pixel block in the detection image to obtain the area of the black block;
the processing terminal obtains the average pixel mutation value obtained by the calculation in the step S103, compares the average pixel mutation value with an abnormal mutation value preset by the processing terminal, obtains the number of black pixel blocks in the detection image if the average pixel mutation value is larger than the abnormal mutation value, and multiplies the area of each pixel block to obtain the black block area.
S105, when the black block area in the detection image is larger than the abnormal area preset value, reading a second comparison image which is input from the camera in the storage unit and is positioned at the later time point of the detection image;
and the processing terminal acquires S104, calculates and obtains the black block area, compares the black block area with an abnormal area value preset by the processing terminal, and if the black block area is larger than the abnormal area preset value, the processing terminal compares the time nodes after detecting the images and acquires the image closest to the time node in the storage unit as a second comparison image.
S106, calculating the area difference value between the area of the black pixel block and the area of the black block on the second control image;
the processing terminal converts the RGB color value of the pixel block of the second contrast image into a gray value through the abnormal gray value preset by the processing terminal, if the gray value is smaller than the abnormal gray value, the pixel block is judged to be a black pixel block, the black pixel block is counted, the area of the black pixel block on the second contrast image is obtained through multiplying the area of each pixel block, and then the area of the black block is obtained to calculate the difference value between the two areas, so that the area difference value is obtained.
S107, when the area difference value is smaller than the area variation preset value, a foreign matter shielding signal is sent to external display equipment;
the processing terminal obtains the area difference value, compares the area difference value with a preset area variation preset value, and when the area difference value is smaller than the area variation preset value, the processing terminal sends a foreign matter shielding signal to external display equipment, wherein the external display equipment is usually an intelligent display screen, an intelligent mobile phone, an intelligent watch and the like.
Referring to fig. 2, the step of S101 includes the following sub-steps:
s1011, matching the image of the time node of the image in the storage unit nearest to the current time node according to the current time node as a detection image,
each image stored in the storage unit at intervals of 0.5 seconds has image information and time node information, the processing terminal acquires the current time node, and the detection image closest to the current time point is found out through comparison of the time nodes, so that the detection image information is acquired;
s1012, selecting an image before the time node of the detected image as a first contrast image according to the time node of the detected image,
and acquiring a time node of the detection image, and taking an image corresponding to the time node 1.5s before the time node as a first comparison image.
Referring to fig. 2, the step of S102 includes the following sub-steps:
s1021. locating black pixel blocks in the detection image and the first control image,
presetting a gray value as an abnormal gray value for judging black through a processing terminal, comparing each pixel block on a first comparison image, converting the RGB color value of the pixel block into the gray value, judging the pixel block as the black pixel block if the gray value is smaller than the abnormal gray value, and positioning the coordinates of the black pixel block;
s1022, locating a black pixel module concentrated area, calculating a black block quantity difference value of the concentrated area,
and according to the principle that coordinates are adjacent and are communicated, if the coordinates of the black pixel blocks are communicated by more than 30, the black pixel block concentrated area is formed, the number of the black pixel blocks in the black pixel block concentrated area in the detection image and the first comparison image is calculated, and finally, the difference value of the number of the black blocks is calculated.
Referring to fig. 2, the step of S103 includes the following sub-steps:
s1031, calculating pixel difference values of black pixel blocks in a black pixel block concentrated area in the detection image,
presetting a black block abnormal increment preset value by a processing terminal, and subtracting the pixel value of the black pixel block in the black pixel block concentrated area from the pixel value of the pixel block in the corresponding area in the first contrast image to obtain a pixel difference value when the black block quantity difference value is larger than the black block abnormal increment preset value;
s1032, calculating average pixel mutation value according to the black pixel blocks in the concentrated area,
and dividing the pixel difference value by the number of the black pixel blocks in the black pixel block concentrated region in the detection image to obtain an average pixel abrupt change value.
Referring to fig. 2, the step of S104 includes the following sub-steps:
s1041, when the average pixel mutation value is larger than a preset abnormal mutation value, obtaining the number of black pixel blocks in a concentrated area,
the processing terminal is preset with an abnormal mutation value, and when the average pixel mutation value is larger than the preset abnormal mutation value, the number of black pixel blocks in the black pixel block concentrated area in the detection image is obtained;
s1042, obtaining the area of each pixel block, and calculating the area of the output black block;
and obtaining the black block area according to the area of each pixel block multiplied by the number of the black pixel blocks in the black pixel block concentrated area in the detection image.
Referring to fig. 2, the step of S105 includes the following sub-steps:
s1051, obtaining the black block area in the detection image, judging whether the black block area is larger than an abnormal area preset value,
the processing terminal is preset with an abnormal area value, the black block area in the detection image is obtained, and when the black block area in the detection image is larger than the abnormal area preset value;
s1052. delay reading the second control image in the storage unit at the later point in time of the detected image,
and presetting delay time length for 2 seconds by the processing terminal, acquiring a delayed time node after delay for 2 seconds, and reading an image of the time node which is compared with the nearest time node in the storage unit as a second comparison image.
Referring to fig. 2, the step of S106 includes the following sub-steps:
s1061, positioning a black pixel block on the second control image,
converting the RGB color value of the pixel block on the second control image into a gray value by presetting an abnormal gray value, judging the pixel block as a black pixel block if the gray value of the pixel block is smaller than the abnormal gray value, and positioning the coordinates of the black pixel block;
s1062, locating a black pixel module concentrated region in the second comparison image, calculating the black block area of the concentrated region, finally obtaining the area difference value of the concentrated region and the black pixel block concentrated region in the detection image,
and according to the principle that coordinates are adjacent and are communicated, if the coordinates of the black pixel blocks are communicated by more than 30, the black pixel block concentrated area is formed, the number of the black pixel blocks in the black pixel block concentrated area of the second comparison image is calculated, the area of the black pixel blocks in the black pixel block concentrated area on the second comparison image is obtained according to the product of the area of each pixel block and the number of the black pixel blocks, and finally the area difference value of the black pixel blocks in the black pixel block concentrated area on the second comparison image and the black pixel blocks in the detection image is calculated.
The implementation principle of the embodiment 1 of the application is as follows: and reading a detection image from a storage unit, reading a first contrast image at a previous time point of the detection image, comparing whether the number of black pixel blocks in the two images is large, if the difference is large, proving that more black pixel blocks appear in the images in a short time, then judging whether the pixel blocks in the detection image change into the black pixel blocks or are changed gradually by calculating an average pixel mutation value, eliminating the black pixel blocks caused by problems such as light rays and the like, then calculating whether the concentrated area of the black pixel blocks is large, if the concentrated area is large, judging that the monitoring purpose is influenced, then reading the image which is acquired recently in the storage unit, judging whether the shielding object changes, and if the change can effectively reduce the influence on a camera, if the image which is acquired by the camera is still influenced, transmitting a foreign matter shielding signal, reminding in time, processing the shielding problem, and recovering the monitoring visual purpose.
The embodiment 2 of the application discloses a camera exception handling system, which comprises the following modules:
referring to fig. 3, the reading module matches the image of the time node of the image in the storage module closest to the time node according to a certain time node to obtain the image as a detection image, selects the image before the time node of the detection image as a first comparison image according to the time node of the detection image, and transmits the detection image and the first comparison image to the pixel block counting module.
Referring to fig. 3, a pixel block counting module receives a detection image and a first contrast image, a processing terminal presets a gray value as an abnormal gray value for judging black, compares each pixel block on the first contrast image, converts an RGB color value of the pixel block into a gray value, judges as a black pixel block if the gray value is smaller than the abnormal gray value, compares the black pixel blocks existing in the detection image and the first contrast image, locates coordinates of the black pixel block, locates a black pixel block concentrated area according to the coordinates, counts to obtain the number of the black pixel blocks in the detection image and the first contrast image, calculates the number difference of the black pixel blocks in the detection image and the first contrast image, obtains a black block number difference value, and transmits the black block number difference value to a pixel value change module.
Referring to fig. 3, the pixel value change module receives the difference value of the number of black blocks, and when the difference value of the number of black blocks is greater than the abnormal increment preset value of the black blocks, calculates the pixel value of the black pixel blocks in the black pixel block concentrated area in the detection image and the pixel value of the black pixel blocks in the corresponding area in the first contrast image, and obtains the average pixel abrupt change value through the number of the black pixel blocks in the black pixel block concentrated area in the detection image.
Referring to fig. 3, the calculation area module obtains an average pixel abrupt change value, and when the average pixel abrupt change value is greater than a preset abnormal abrupt change value, the area calculation is performed on the black pixel block concentrated area to obtain a black block area, and the black block area is transmitted to the read control module.
Referring to fig. 3, the reading comparison module receives the black block area, and is configured to delay, when the black block area in the detected image is greater than the preset value of the abnormal area, the second comparison image in the detected image, which is input from the camera in the storage module, according to the preset delay time length and the time node after the delay time length.
Referring to fig. 3, the area change module compares black pixel blocks on the second control image by presetting black pixel values, calculates the number of the black pixel blocks, obtains the area of the black pixel blocks on the second control image according to the product of the area of each pixel block and the number of the black pixel blocks, finally obtains the area difference value of the black pixel blocks in the detection image, and transmits the area difference value to the abnormal transmission module.
Referring to fig. 3, the anomaly transmission module receives the area difference value, and determines whether the area difference value is smaller than the area variation preset value according to the preset area variation preset value, and if the area difference value is smaller than the area variation preset value, transmits a foreign matter shielding signal to the display device.
The implementation principle of the embodiment 2 of the application is as follows: the reading module acquires the detection image from the storage module according to the time node, reads a first comparison image positioned at the previous time point of the detection image, and compares whether the difference value of the quantity of black pixel blocks in the two images is larger or not through the pixel block counting module. If more black pixel blocks appear in the image in a short time, then an average pixel mutation value is calculated through a pixel value change module to judge whether the pixel blocks in the detected image are changed into the black pixel blocks suddenly changed or gradually changed, and the black pixel blocks caused by the problems of light rays and the like are eliminated. Then the calculation area module calculates whether the area in the black pixel block set is larger, if the area is larger, the monitoring purpose is judged to be affected, then the reading comparison module reads the second comparison image which is newly acquired in the storage module, the area change module judges whether the shielding object has area reduced change or not, and whether the change can effectively reduce the influence on the camera or not, if the image acquired by the camera is still affected, the abnormal transmission module transmits a foreign matter shielding signal, timely reminds of processing shielding problems, and recovers the monitoring visual purpose.
The above embodiments are not intended to limit the scope of the present application, so: all equivalent changes in structure, shape and principle of the application should be covered in the scope of protection of the application.

Claims (10)

1. The camera anomaly processing method is characterized by comprising the following steps of:
reading a detection image input from a camera and a first contrast image positioned at a previous time point of the detection image in a storage unit;
calculating the difference value of the number of black pixel blocks in the detection image and the first contrast image to obtain the difference value of the number of black blocks;
when the difference value of the number of the black blocks is larger than a preset value of abnormal increment of the black blocks, calculating an average pixel mutation value of the black pixel blocks of the first control image corresponding to the detection image;
when the average pixel mutation value is larger than a preset abnormal mutation value, calculating the area of a black pixel block in the detection image to obtain the area of the black block;
when the black block area in the detection image is larger than the abnormal area preset value, reading a second comparison image which is input from the camera in the storage unit and is positioned at the later time point of the detection image;
calculating the area difference between the area of the black pixel block and the area of the black block on the second control image;
and when the area difference value is smaller than the area variation preset value, transmitting a foreign matter shielding signal to the external display equipment.
2. The camera anomaly handling method according to claim 1, wherein: the step of reading the detection image input from the camera and the first contrast image at the previous time point of the detection image in the storage unit further comprises the following steps:
the storage unit stores images acquired by the camera according to preset interval time, records acquisition time nodes,
and comparing the time nodes of the images in the storage unit, and acquiring the image closest to the current time node as a detection image and a first comparison image positioned at the previous time point of the detection image.
3. The camera anomaly handling method according to claim 2, wherein: the step of calculating the difference value of the number of the black pixel blocks in the detection image and the first contrast image to obtain the difference value of the number of the black blocks further comprises the following steps:
comparing black pixel blocks in the detection image and the first control image through preset black pixel values,
positioning coordinates of the black pixel blocks, positioning a concentrated area of the black pixel blocks according to the coordinate communication,
and calculating the number of black pixel blocks in the black pixel block concentrated area in the detection image and the first contrast image, and finally calculating to obtain a difference value of the number of the black blocks.
4. A camera anomaly handling method as claimed in claim 3, wherein the step of calculating an average pixel abrupt change value of a black pixel block of the first control image corresponding to the detected image further comprises:
and calculating pixel difference values of black pixel blocks in the black pixel block concentrated area in the detection image and black pixel blocks in the corresponding area in the first contrast image, and obtaining an average pixel mutation value through the number of the black pixel blocks in the black pixel block concentrated area in the detection image.
5. The method for processing camera anomaly according to claim 4, wherein when the average pixel mutation value is greater than a preset anomaly mutation value, calculating an area of a black pixel block in the detected image to obtain a black block area, further comprising:
and when the average pixel mutation value is larger than a preset abnormal mutation value, calculating the area of a black pixel block concentrated area in the detection image to obtain the black block area.
6. The method for processing camera anomaly according to claim 5, wherein when the black block area in the detected image is larger than the anomaly area preset value, the step of reading the second reference image in the storage unit, which is input from the camera and is located at the later time point of the detected image, further comprises:
and when the area of the black block in the detection image is larger than the preset value of the abnormal area, according to the preset delay time length, delaying and reading a second comparison image which is input from the camera in the storage unit and is positioned at the later time point of the detection image.
7. The method for processing camera anomaly according to claim 6, wherein the step of calculating an area difference between an area of a black pixel block on the second control image and an area of the black block further comprises:
comparing black pixel blocks on the second control image by preset black pixel values,
a black pixel block concentrated region is located according to the coordinate adjacent connectivity,
calculating the number of black pixel blocks in the black pixel block concentrated area, obtaining the area of the black pixel block on the second contrast image according to the product of the area of each pixel block and the number of the black pixel blocks,
and finally, calculating the area difference value between the area of the black pixel block and the area of the black block on the second control image.
8. A camera anomaly handling system, comprising:
a reading detection module for reading the detection image input from the camera in the storage unit and a first contrast image at a previous time point of the detection image;
the pixel block counting module is used for calculating the quantity difference value of black pixel blocks in the detection image and the first contrast image to obtain a black block quantity difference value;
a pixel value change module, configured to calculate an average pixel abrupt change value of a black pixel block of the first control image corresponding to the detection image when the difference value of the number of black blocks is greater than a preset value of abnormal increment of the black blocks;
the calculation area module is used for calculating the area of the black pixel block concentrated area in the detection image to obtain the black block area when the average pixel abrupt change value is larger than a preset abnormal abrupt change value;
the reading comparison module is used for reading a second comparison image which is latest input from the camera and is positioned at a later time point of the detection image in the storage unit when the black block area in the detection image is larger than the abnormal area preset value;
the area change module is used for calculating the difference value between the area of the black pixel block concentrated area on the second control image and the area of the black pixel block concentrated area in the detection image;
and the abnormal sending module is used for sending a foreign matter shielding signal to the external display equipment when the area difference value is smaller than the area variation preset value.
9. The camera anomaly handling system of claim 8, wherein the pixel value change module comprises:
the black block quantity difference judging module is used for acquiring a black block quantity difference value and judging whether the black block quantity difference value is larger than a black block abnormal increment preset value or not;
the concentrated region pixel difference module is used for calculating pixel difference values of black pixel blocks in the concentrated region of the black pixel blocks in the detection image and black pixel blocks in the corresponding region in the first contrast image;
and the concentrated area average pixel change module is used for obtaining pixel difference values and dividing the pixel difference values by the number of black pixel blocks in the concentrated areas of the black pixel blocks in the detection image to obtain average pixel mutation values.
10. The camera anomaly handling system of claim 9, wherein the read-reference module comprises:
the black block area judging module is used for acquiring the black block area in the detection image and judging whether the black block area in the detection image is larger than an abnormal area preset value or not;
and the delay reading module is used for delay reading a second contrast image which is latest input from the camera and is positioned at a later time point of the detection image in the storage unit according to a preset delay time when the black block area in the detection image is larger than the abnormal area preset value.
CN202310825039.6A 2023-07-06 2023-07-06 Camera exception handling method and system Pending CN116708723A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310825039.6A CN116708723A (en) 2023-07-06 2023-07-06 Camera exception handling method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310825039.6A CN116708723A (en) 2023-07-06 2023-07-06 Camera exception handling method and system

Publications (1)

Publication Number Publication Date
CN116708723A true CN116708723A (en) 2023-09-05

Family

ID=87831268

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310825039.6A Pending CN116708723A (en) 2023-07-06 2023-07-06 Camera exception handling method and system

Country Status (1)

Country Link
CN (1) CN116708723A (en)

Similar Documents

Publication Publication Date Title
JP4718253B2 (en) Image abnormality detection device for surveillance camera
JP4203736B2 (en) Image motion detection apparatus and computer program
JP4729610B2 (en) Smoke detector
CN102176758A (en) Video quality diagnosis system and realization method thereof
US20070285511A1 (en) Video verification system and method for central station alarm monitoring
CN112449147B (en) Video cluster monitoring system of photovoltaic power station and image processing method thereof
CN100375530C (en) Movement detecting method
CN111476964A (en) Remote forest fire prevention monitoring system and method
CN102542673A (en) Automatic teller machine (ATM) pre-warning method and system based on computer vision
JP5235718B2 (en) Video surveillance system
CN103606348A (en) Fault detection device and method for displayer of video player
CN101646066B (en) Video monitoring system and method
AU2006344505A1 (en) Video verification system and method for central station alarm monitoring
JP5792671B2 (en) Abnormality detection method and abnormality detection device
CN116708723A (en) Camera exception handling method and system
CN102695075A (en) Method, equipment and system for detecting display screen without video signal
JP3571628B2 (en) Image processing device
JP5710230B2 (en) Monitoring system and monitoring method
CN116229854A (en) Monitoring device and method for abnormal display content of liquid crystal display screen glass
JP2000137877A (en) Fire detecting device
CN111818286A (en) Video monitoring equipment fault detection system
CN104378629A (en) Camera fault detection method
CN111787311B (en) Fault detection system and method for security monitoring camera
JP2011061651A (en) Suspicious object detection system
CN116962645A (en) Video data transmission method for electric power

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