Camera warning method, warning device and computer readable storage medium

文档序号:170591 发布日期:2021-10-29 浏览:31次 中文

阅读说明:本技术 一种摄像机警戒方法、警戒装置和计算机可读存储介质 (Camera warning method, warning device and computer readable storage medium ) 是由 陈果 于 2021-06-25 设计创作,主要内容包括:本申请公开了一种摄像机警戒方法、警戒装置和计算机可读存储介质,该方法包括:对获取到的当前帧图像进行分块,得到多个图像块;计算图像块的RGB像素值的平均值,并对平均值进行处理,得到第一特征值;统计所有第一特征值中与预设特征值之间的相似度大于预设相似度的第一特征值的数量,记作统计值;利用多个图像块的总数量与统计值,计算出当前帧图像中的红外反光强度;根据红外反光强度判断是否有入侵行为;若有入侵行为,则发出相应警示。通过上述方式,本申请能够对入侵行为进行警示。(The application discloses a camera warning method, a warning device and a computer readable storage medium, wherein the method comprises the following steps: partitioning the obtained current frame image to obtain a plurality of image blocks; calculating an average value of RGB pixel values of the image block, and processing the average value to obtain a first characteristic value; counting the number of first characteristic values of which the similarity with a preset characteristic value is greater than the preset similarity in all the first characteristic values, and recording the number as a statistical value; calculating the infrared reflection intensity in the current frame image by using the total number and the statistical value of the plurality of image blocks; judging whether an intrusion behavior exists according to the infrared reflection intensity; if the intrusion behavior exists, corresponding warning is sent out. Through the mode, the intrusion behavior warning method and the intrusion behavior warning device can warn intrusion behavior.)

1. A camera surveillance method, comprising:

partitioning the obtained current frame image to obtain a plurality of image blocks;

calculating an average value of RGB pixel values of the image block, and processing the average value to obtain a first characteristic value;

counting the number of first characteristic values of which the similarity with a preset characteristic value is greater than the preset similarity in all the first characteristic values, and recording the number as a statistical value;

calculating the infrared reflection intensity in the current frame image by using the total number of the plurality of image blocks and the statistical value;

judging whether an intrusion behavior exists according to the infrared reflection intensity;

if the intrusion behavior exists, corresponding warning is sent out.

2. The camera surveillance method according to claim 1, wherein the step of blocking the acquired current frame image to obtain a plurality of image blocks comprises:

acquiring a first preset data statistical range and the size of the image block, wherein the first preset data statistical range comprises a first initial coordinate and a first terminal coordinate;

calculating the size of an area surrounded by the first starting coordinate and the first end point coordinate to obtain a first statistical size;

and partitioning the current frame image according to the first statistical size and the sizes of the image blocks to obtain a plurality of image blocks.

3. The camera surveillance method according to claim 1, wherein the RGB pixel values comprise a first pixel value, a second pixel value and a third pixel value, and the step of calculating the average of the RGB pixel values of the image block comprises:

and respectively carrying out summation and averaging on all the first pixel values, all the second pixel values and all the third pixel values in the image block to obtain a first pixel average value, a second pixel average value and a third pixel average value.

4. The camera surveillance method according to claim 3, wherein the first feature value comprises a first sub-feature value and a second sub-feature value, and the step of processing the average value to obtain the first feature value comprises:

dividing the first pixel average value by the second pixel average value to obtain the first sub-feature value;

and dividing the third pixel average value by the second pixel average value to obtain the second sub-characteristic value.

5. The camera surveillance method according to claim 4, wherein the step of counting the number of first feature values having a similarity greater than a preset similarity to a preset feature value among all the first feature values, and recording the counted number as a statistical value comprises:

setting an initial value of the statistical count to zero;

sequentially selecting one first characteristic value from all the first characteristic values as a current characteristic value;

judging whether the similarity between the current characteristic value and the preset characteristic value is greater than the preset similarity or not;

if yes, adding one to the statistical count;

and repeatedly executing the steps until the first characteristic values of all the image blocks are traversed, and taking the final value of the statistical count as the statistical value.

6. The camera surveillance method according to claim 5, wherein the preset feature value comprises a first preset feature value and a second preset feature value, and the step of determining whether the similarity between the current feature value and the preset feature value is greater than the preset similarity comprises:

calculating a square value of a difference value between the first preset characteristic value and the first sub-characteristic value to obtain a first numerical value;

calculating a square value of a difference value between the second preset characteristic value and the second sub-characteristic value to obtain a second numerical value;

carrying out root number operation on the sum of the first numerical value and the second numerical value to obtain a third numerical value;

and judging whether the third numerical value is greater than the preset similarity.

7. The camera surveillance method according to claim 1, wherein the step of calculating the infrared reflection intensity using the total number of the plurality of image blocks and the statistical value comprises:

and dividing the statistical value with the total number of the plurality of image blocks to obtain the infrared reflection intensity.

8. The camera surveillance method according to claim 1, wherein the step of determining whether there is an intrusion based on the intensity of the infrared reflection comprises:

judging whether the infrared reflection intensity is greater than a preset reflection intensity;

if yes, judging that the intrusion behavior exists, and sending out corresponding warning;

the current frame image comprises a monitoring target, the warning strength is related to the distance between the camera and the monitoring target, and the warning comprises sound warning, image warning, light warning or vibration warning.

9. The camera surveillance method according to claim 8, wherein the alert is an audible alert, and the step of issuing a corresponding alert comprises:

calculating the current sound intensity by utilizing the infrared reflection intensity and the maximum sound intensity; or obtaining the current sound intensity by using the infrared reflection intensity and a preset mapping table, wherein the preset mapping table comprises the infrared reflection intensity and the current sound intensity corresponding to the infrared reflection intensity;

and playing a preset warning sound according to the current sound intensity.

10. The camera surveillance method according to claim 9, characterized in that the method further comprises:

and multiplying the infrared reflection intensity by the maximum sound intensity to obtain the current sound intensity.

11. The camera surveillance method according to claim 1, wherein the step of counting the number of first feature values having a similarity greater than a preset similarity to a preset feature value among all the first feature values, before the step of recording as the statistical value, comprises:

acquiring an infrared image, wherein the infrared image is an image generated by a sensor in a camera under the irradiation of infrared light;

partitioning the infrared image to obtain a plurality of infrared blocks;

calculating an average value of RGB pixel values of the infrared block, and processing the average value to obtain a second characteristic value;

and summing and averaging all the second characteristic values to obtain the preset characteristic value.

12. The camera surveillance method according to claim 11, wherein the step of blocking the infrared image to obtain a plurality of infrared blocks comprises:

acquiring a second preset data statistical range and the size of the infrared block, wherein the second preset data statistical range comprises a second initial coordinate and a second end coordinate;

calculating the size of an area enclosed by the second initial coordinate and the second end coordinate to obtain a second statistical size;

and partitioning the infrared image according to the second statistical size and the size of the infrared block to obtain a plurality of infrared blocks.

13. The camera surveillance method according to claim 11, wherein the RGB pixel values comprise a fourth pixel value, a fifth pixel value and a sixth pixel value, and the step of calculating the average value of the RGB pixel values of the infrared block comprises:

and respectively carrying out summation and averaging on all the fourth pixel values, all the fifth pixel values and all the sixth pixel values in the infrared block to obtain a fourth pixel average value, a fifth pixel average value and a sixth pixel average value.

14. The camera surveillance method according to claim 13, wherein the second feature value comprises a third sub-feature value and a fourth sub-feature value, the preset feature value comprises a first preset feature value and a second preset feature value, and the step of processing the average value to obtain the second feature value comprises:

dividing the fourth pixel average value by the fifth pixel average value to obtain the third sub-feature value;

dividing the sixth pixel average value by the fifth pixel average value to obtain the fourth sub-feature value;

the step of summing and averaging all the second characteristic values to obtain the preset characteristic value includes:

summing and averaging all the third sub-characteristic values to obtain the first preset characteristic value;

and summing and averaging all the fourth sub-characteristic values to obtain the second preset characteristic value.

15. An surveillance apparatus comprising a memory and a processor connected to each other, wherein the memory is adapted to store a computer program which, when executed by the processor, is adapted to carry out the camera surveillance method of any one of claims 1-14.

16. A computer-readable storage medium for storing a computer program, characterized in that the computer program, when being executed by a processor, is adapted to carry out the camera surveillance method according to any one of claims 1-14.

Technical Field

The present application relates to the field of image processing technologies, and in particular, to a camera surveillance method, a surveillance apparatus, and a computer-readable storage medium.

Background

The existing partial InfraRed warning equipment is matched with a Passive InfraRed sensor (PIR) or other sensors to send sensing data to a warning system for warning, and additional sensing devices such as the PIR and the like are needed, so that the hardware cost is increased; in other schemes, the device performs video analysis through a built-in image recognition technology to provide an alarm signal, so that the requirements on a chip and a system are high, and the cost is high.

Disclosure of Invention

The present application provides a camera surveillance method, a surveillance apparatus, and a computer-readable storage medium capable of alerting an intrusion behavior.

In order to solve the technical problem, the technical scheme adopted by the application is as follows: there is provided a camera surveillance method, the method comprising: partitioning the obtained current frame image to obtain a plurality of image blocks; calculating an average value of RGB pixel values of the image block, and processing the average value to obtain a first characteristic value; counting the number of first characteristic values of which the similarity with a preset characteristic value is greater than the preset similarity in all the first characteristic values, and recording the number as a statistical value; calculating the infrared reflection intensity in the current frame image by using the total number and the statistical value of the plurality of image blocks; judging whether an intrusion behavior exists according to the infrared reflection intensity; if the intrusion behavior exists, corresponding warning is sent out.

In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided a surveillance apparatus comprising a memory and a processor connected to each other, wherein the memory is used for storing a computer program, and the computer program, when being executed by the processor, is used for implementing the camera surveillance method according to the above technical solution.

In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided a computer readable storage medium for storing a computer program for implementing the camera surveillance method of the above-described aspect when the computer program is executed by a processor.

Through the scheme, the beneficial effects of the application are that: firstly, partitioning a current frame image to obtain a plurality of image blocks; then calculating the average value of the RGB pixel values of each image block, and processing the average value to obtain a first characteristic value; counting the number of first characteristic values of which the similarity with a preset characteristic value is greater than the preset similarity in all the first characteristic values, and recording the number as a statistical value; calculating the infrared reflection intensity by using the total number and the statistical value of the plurality of image blocks; then judging whether an intrusion behavior exists according to the infrared reflection intensity; if the intrusion behavior exists, sending out corresponding warning; the infrared reflection intensity is obtained by analyzing the data of the current frame image, the infrared reflection intensity can indirectly judge the far and near states of the monitoring target from the camera, when the monitoring target is close to the camera, the intrusion behavior is determined to exist and corresponding warning is carried out, analysis operations such as image recognition are not needed, the algorithm is simple to realize, the data are not needed to be obtained by utilizing an external sensor, and the hardware cost is low.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts. Wherein:

FIG. 1 is a schematic flow chart diagram of one embodiment of a camera surveillance method provided herein;

FIG. 2 is a schematic flow chart diagram of another embodiment of a camera surveillance method provided herein;

fig. 3 is a schematic flow chart for obtaining a preset feature value according to the present application;

FIG. 4 is a schematic diagram of a process for obtaining statistics as provided herein;

fig. 5 is a schematic diagram of the present application with a preset feature value as a circle center and a radius of L;

FIG. 6 is a schematic structural view of an embodiment of the warning device provided herein;

FIG. 7 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided in the present application.

Detailed Description

The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

Referring to fig. 1, fig. 1 is a schematic flowchart illustrating an embodiment of a camera surveillance method provided in the present application, the method including:

step 11: and partitioning the acquired current frame image to obtain a plurality of image blocks.

The method can acquire video data shot by a camera in real time, select a frame of image from the video data as a current frame of image, and then block the current frame of image to obtain a plurality of image blocks.

Furthermore, video data can be acquired from an image sensor of the camera, and one frame of image can be selected from the video data at intervals of preset frames/preset time to serve as a current frame of image, so that the processing pressure is relieved; the current frame image may be a color image, which is divided into a plurality of image blocks of the same size.

Step 12: and calculating the average value of the RGB pixel values of the image block, and processing the average value to obtain a first characteristic value.

For each image block, an average value of its RGB pixel values (i.e., red pixel value, green pixel value, and blue pixel value) may be calculated, and then a first feature value is generated by operating on the average value.

Further, summing and averaging all red pixel values in the image block to obtain a red pixel average value; summing and averaging all the green pixel values in the image block to obtain a green pixel average value; summing and averaging all blue pixel values in the image block to obtain a blue pixel average; normalizing the red pixel average value, the green pixel average value and the blue pixel average value to form a three-dimensional vector which is recorded as a first characteristic value; for example, assuming that the red, green, and blue pixel mean values are A, B and C, the first feature value may be: [ A/B, 1, C/B ], [ A/C, B/C, 1], [1, B/A, C/A ] or [ A/(A + B + C), B/(A + B + C), C/(A + B + C) ]; or the first eigenvalue is a two-dimensional vector such as: [ A/B, C/B ], [ B/A, C/A ], or [ A/C, B/C ].

Step 13: and counting the number of the first characteristic values of which the similarity with the preset characteristic value is greater than the preset similarity in all the first characteristic values, and recording the counted number as a statistical value.

After the first characteristic value corresponding to each image block is calculated, the first characteristic value can be compared with a preset characteristic value, and the similarity between the first characteristic value and the preset characteristic value is calculated; and then comparing the magnitude relation between the similarity and a preset similarity, and if the similarity is greater than the preset similarity, recording to finally obtain the number of the first characteristic values of which the similarity with the preset characteristic value is greater than the preset similarity in all the first characteristic values, wherein the preset characteristic value is a value set according to experience or application requirements.

Step 14: and calculating the infrared reflection intensity in the current frame image by using the total number and the statistical value of the plurality of image blocks.

After the statistical value is obtained, the infrared reflection intensity may be calculated based on the total number of the plurality of image blocks and the statistical value, such as: and dividing the statistical value with the total number of the plurality of image blocks to obtain the infrared reflection intensity, or carrying out weighted summation on the statistical value and the total number of the plurality of image blocks. Specifically, the current frame image includes a monitoring target, the infrared reflection intensity is used to represent the distance between the monitoring target shot by the camera and the camera, the greater the infrared reflection intensity is, the closer the distance between the monitoring target and the camera is, and the monitoring target may be a person or other movable object.

Step 15: and judging whether the intrusion behavior exists according to the infrared reflection intensity.

After the infrared reflection intensity is obtained, the red light reflection intensity can be processed to determine whether intrusion behaviors exist in the current monitoring scene; specifically, whether the infrared reflection intensity is greater than the preset reflection intensity or not can be judged, and if the infrared reflection intensity is less than or equal to the preset reflection intensity, it is determined that no intrusion behavior occurs, and no warning is needed.

Step 16: if the intrusion behavior exists, corresponding warning is sent out.

If there is an intrusion behavior, then warn, the intensity of warning is relevant with the camera and the distance of monitoring target, and the warning includes sound warning, image warning, light warning or vibrations warning, and the sound intensity of sound warning, the light intensity of light warning, the vibrations intensity of vibrations warning are relevant with the camera and the distance of monitoring target promptly, for example: when the distance between the monitoring target and the camera is closer, the sound intensity of the sound alarm, the light intensity of the light alarm and the vibration intensity of the vibration alarm are larger.

In a specific embodiment, the alert is a voice alert, i.e., when there is an intrusion, the voice intensity of the voice alert can be adjusted to the current voice intensity; specifically, the current sound intensity may be the intensity of a sound played by a playing device, and the playing device may be an alarm device or an audio player; for example, taking the alarm device as an example, the current sound intensity is how strong the alarm device plays the preset warning sound, and the preset warning sound may be a whistle or other sound, so as to automatically turn up the volume of the preset warning sound when the monitoring target approaches the camera, so as to play a role of deterrence or reminding.

The embodiment provides a camera alarm triggering method based on image analysis, and the method comprises the steps of carrying out algorithm modeling on acquired data of an image sensor of a camera, indirectly obtaining the far and near state of a current monitoring target and the camera, namely representing the far and near of the monitoring target and the camera by using infrared reflection intensity, adaptively adjusting the intensity of alarm according to the distance, wherein the closer the monitoring target is to the camera, the higher the intensity of alarm is, the function of reminding the monitoring target can be achieved, and PIR or other sensors are not required to be additionally arranged to acquire the data.

Referring to fig. 2, fig. 2 is a schematic flow chart of another embodiment of a camera surveillance method provided in the present application, the method including:

step 21: and acquiring a first preset data statistical range and the size of the image block.

The first preset data statistical range may be set according to experience or application requirements, and includes a first start coordinate and a first end coordinate, where the first start coordinate is a first coordinate of the current frame image or is located behind the first coordinate of the current frame image, and the first end coordinate is a last coordinate of the current frame image or is located before the last coordinate of the current frame image, that is, a size of a region surrounded by the first start coordinate and the first end coordinate is smaller than a size of the current frame image.

Step 22: and calculating the size of an area surrounded by the first start coordinate and the first end coordinate to obtain a first statistical size.

After the first start coordinate and the first end coordinate are obtained, the size of an area surrounded by the first start coordinate and the first end coordinate can be calculated to obtain a first statistical size; specifically, a statistical range of the data may be determined from the first start coordinate and the first end coordinate using a statistical module in an Image Signal Processing (ISP) module; for example, assuming that the size of the current frame image is 64 × 64, the first start coordinate is [5, 5], the first end coordinate is [28, 28], and the first statistical size is 24 × 24.

Step 23: and partitioning the current frame image according to the first statistical size and the sizes of the image blocks to obtain a plurality of image blocks.

Dividing the first statistical size by the size of the image blocks to obtain the horizontal number and the vertical number of the image blocks; specifically, the size of the image blocks may be a size set by a user or a default size, for example, assuming that the first statistical size is 32 × 24 and the size of the image blocks is 4 × 4, the horizontal number of the image blocks is 8 and the vertical number of the image blocks is 6.

Step 24: and respectively carrying out summation and averaging on all the first pixel values, all the second pixel values and all the third pixel values in the image block to obtain a first pixel average value, a second pixel average value and a third pixel average value.

The RGB pixel value of each pixel in the current frame image includes a first pixel value, a second pixel value, and a third pixel value, and the first pixel value, the second pixel value, and the third pixel value may be a red pixel value, a green pixel value, and a blue pixel value, respectively; summing and averaging all red pixel values in the image block to obtain a red pixel average value; summing and averaging all green pixel values in the image block to obtain a green pixel average value; and summing and averaging all blue pixel values in the image block to obtain a blue pixel average value.

Step 25: dividing the first pixel average value and the second pixel average value to obtain a first sub-characteristic value; and dividing the third pixel average value by the second pixel average value to obtain a second sub-feature value.

The first characteristic value comprises a first sub-characteristic value and a second sub-characteristic value, and the average value of red pixels and the average value of green pixels of each image block are divided to obtain a first sub-characteristic value; dividing the average value of the blue pixels of each image block with the average value of the green pixels to obtain a second sub-characteristic value; for example, the total number of image blocks is N × M (N ≧ 1, M ≧ 1), and the average value of red pixels of the ith (1 ≦ i ≦ N × M) image block is RiThe average value of the green pixels of the ith image block is GiThe average value of the blue pixels of the ith image block is BiBy two-dimensional coordinates Xi(Ri/Gi,Bi/Gi) To express the characteristic value of the ith image block, i.e. the characteristic value of the image block is X1,X2,X3,……,Xi,……,XN*M

In a specific embodiment, the steps shown in fig. 3 may be adopted to pre-calibrate the feature values (i.e., the preset feature values) in the environment of pure infrared light, where the preset feature values include a first preset feature value and a second preset feature value, as follows:

step 31: and acquiring an infrared image.

The image sensor in the camera can be irradiated by an infrared fill-in lamp in a sealed small space to obtain an infrared image, namely, the infrared image is an image generated by the sensor in the camera under the irradiation of infrared light, and the image sensor can be a Complementary Metal-Oxide-Semiconductor (CMOS) sensor.

Step 32: and partitioning the infrared image to obtain a plurality of infrared blocks.

A second preset data statistical range and the size of the infrared block can be obtained, wherein the second preset data statistical range comprises a second initial coordinate and a second end coordinate; then calculating the size of an area enclosed by the second initial coordinate and the second end coordinate to obtain a second statistical size; and partitioning the infrared image according to the second statistical size and the size of the infrared block to obtain a plurality of infrared blocks.

Step 33: and calculating the average value of the RGB pixel values of the infrared block, and processing the average value to obtain a second characteristic value.

The RGB pixel value of each pixel in the infrared image comprises a fourth pixel value, a fifth pixel value and a sixth pixel value, wherein the fourth pixel value, the fifth pixel value and the sixth pixel value are respectively a red pixel value, a green pixel value and a blue pixel value; and respectively carrying out summation and averaging on all fourth pixel values, all fifth pixel values and all sixth pixel values in the infrared block to obtain a fourth pixel average value, a fifth pixel average value and a sixth pixel average value.

Further, the second feature value comprises a third sub-feature value and a fourth sub-feature value, and the preset feature value comprises a first preset feature value and a second preset feature value; dividing the fourth pixel average value by the fifth pixel average value to obtain a third sub-characteristic value; and dividing the sixth pixel average value by the fifth pixel average value to obtain a fourth sub-feature value.

Step 34: and summing and averaging all the second characteristic values to obtain a preset characteristic value.

Summing and averaging all the third sub-characteristic values to obtain a first preset characteristic value; and summing and averaging all the fourth sub-characteristic values to obtain a second preset characteristic value.

The infrared light supplement lamp has the advantages that the light source is uniform, sufficient and single, and the preset characteristic values of the infrared blocks in the calibration environment are relatively close to each other; in addition, the preset feature value is related to the image sensor and the infrared light characteristic, and is unique when the image sensor and the infrared light are fixed.

Step 26: and counting the number of the first characteristic values of which the similarity with the preset characteristic value is greater than the preset similarity in all the first characteristic values, and recording the counted number as a statistical value.

The scheme shown in fig. 4 can be used to obtain the statistical value, and specifically includes the following steps:

step 41: the initial value of the statistical count is set to zero.

In order to obtain the number of first feature values of which the similarity with the preset feature value is greater than the preset similarity among all the first feature values, a statistical count may be set, and an initial value of the statistical count may be set to zero.

Step 42: and sequentially selecting one first characteristic value from all the first characteristic values as a current characteristic value.

And selecting a first characteristic value from the first characteristic values of all the image blocks as a current characteristic value according to the arrangement sequence or the randomly selected sequence of the image blocks.

Step 43: and judging whether the similarity between the current characteristic value and the preset characteristic value is greater than the preset similarity.

Calculating a square value of a difference value between the first preset characteristic value and the first sub-characteristic value to obtain a first numerical value; then calculating a square value of a difference value between the second preset characteristic value and the second sub-characteristic value to obtain a second numerical value; and performing root number operation on the sum of the first numerical value and the second numerical value to obtain a third numerical value, wherein the third numerical value is the similarity between the current characteristic value and the preset characteristic value, and the calculation formula is as follows:

wherein S is a third value, Rir/GirIs a first predetermined characteristic value, Bir/GirIs the second preset characteristic value.

Then judging whether the third value is greater than a preset similarity, wherein the preset similarity can be a similarity threshold set according to experience or an application scene; and if the similarity between the current characteristic value and the preset characteristic value is less than or equal to the preset similarity, not processing.

Step 44: and if the similarity between the current characteristic value and the preset characteristic value is greater than the preset similarity, adding one to the statistical count.

And repeating the steps 42 to 43 until the first characteristic values of all the image blocks are traversed, and taking the final value of the statistical count as the statistical value.

The method comprises the steps of firstly obtaining a first characteristic value of each image block in a current frame image, and calculating the first characteristic value and a preset characteristic value of each image block; specifically, the similarity between the first eigenvalue and the preset eigenvalue may be mapped to a distance between two coordinate points in the two-dimensional coordinate system, and when the calculated distance is smaller than the preset distance parameter, it is determined that the similarity between the characteristic information of the current image block and the characteristic information of the infrared block is higher, and the image block is recorded and continuously traversed until N × M image blocks are traversed. For example, as shown in fig. 5, in the two-dimensional coordinate system, the preset feature value is a circle center a (R)ir/Gir,Bir/Gir) If the feature value of an image block falls within a circle with a circle center a and a radius L (L is a preset similarity), that is, the distance between the feature value of the image block and the preset feature value is smaller than L, the image block is considered to be a partition with a higher similarity to the infrared block, and the number of the image blocks falling within the circle center is recorded, that is, the statistical value.

Step 27: and dividing the statistical value by the total number of the plurality of image blocks to obtain the infrared reflection intensity.

If the number (i.e., the statistical value) of the first feature values with higher similarity to the preset feature value is m, the infrared reflection intensity of the current frame image is as follows:

ration=m/(N*M)

wherein 0< ratio <1, N is the total number of image blocks in the horizontal direction, and M is the total number of image blocks in the vertical direction.

Step 28: and judging whether the intrusion behavior exists according to the infrared reflection intensity.

Step 28 is the same as step 15 in the above embodiment, and will not be described again.

Step 29: if the intrusion behavior exists, the current sound intensity is calculated by utilizing the infrared reflection intensity, and the preset warning sound is played according to the current sound intensity.

Calculating the current sound intensity by utilizing the infrared reflection intensity and the maximum sound intensity; specifically, the infrared reflection intensity is multiplied by the maximum sound intensity to obtain the current sound intensity, and the maximum sound intensity is the maximum intensity of the sound that can be emitted by the playing device.

In other embodiments, the current sound intensity may also be obtained by using the infrared reflection intensity and a preset mapping table, where the preset mapping table includes the infrared reflection intensity and the current sound intensity corresponding to the infrared reflection intensity; specifically, the infrared reflection intensity can be used as a search word to be inquired in a preset mapping table, and the sound intensity matched with the search word is found and recorded as the current sound intensity.

After the current sound intensity is calculated, a preset warning sound can be played at the current sound intensity to warn the monitored target, and the preset warning sound can be the pre-recorded speech information, whistle or other sounds of the user.

In the shot monitoring video, if a monitoring target moves in the shooting range of the camera, the far and near states of the monitoring target and the camera can be indirectly judged according to the calculated infrared reflection intensity, the more the monitoring target is connected with the camera, the larger the infrared reflection intensity is, the more the monitoring target is far away from the camera, the smaller the infrared reflection intensity is, the volume of the pre-played video can be dynamically adjusted, and the effects of deterring, reminding or facilitating the use of a user are achieved.

In the embodiment, the characteristic information of each image block in the current frame image and the characteristic information of the pre-calibrated infrared block are compared and calculated to obtain the infrared reflection intensity of the current frame image, so that the far and near states of the monitored target from the camera are indirectly reflected, the closer the monitored target is to the camera, the greater the infrared reflection intensity is, the greater the volume of the warning sound is, the dynamic self-adaptive adjustment of the volume is realized, the alarm triggering can be performed on the intrusion event, and the effects of reminding and deterring the monitored target are achieved.

Referring to fig. 6, fig. 6 is a schematic structural diagram of an embodiment of the surveillance apparatus provided in the present application, the surveillance apparatus 60 includes a memory 61 and a processor 62 connected to each other, the memory 61 is used for storing a computer program, and the computer program is used for implementing the camera surveillance method in the above embodiment when being executed by the processor 62.

According to the method and the device, the infrared components in the environment are estimated according to the algorithm model so as to be used for judging the infrared reflection intensity in the monitored environment, and therefore the far and near states of the monitored target from the camera are estimated, the infrared reflection intensity of the monitored target is larger as the monitored target approaches the camera, and the infrared reflection intensity of the monitored target is smaller as the monitored target is farther away from the camera, so that the volume of pre-played video/audio can be adaptively adjusted based on the infrared reflection intensity, and the purposes of alarming and triggering the intrusion event, reminding or facilitating the use of a user are achieved. In addition, accurate warning trigger signals can be simply and quickly provided by acquiring the original data of the image sensor in the camera so as to carry out dynamic alarm, the realization is simple, and the hardware and software cost is lower.

Referring to fig. 7, fig. 7 is a schematic structural diagram of an embodiment of a computer-readable storage medium 70 provided in the present application, where the computer-readable storage medium 70 is used for storing a computer program 71, and the computer program 71 is used for implementing the camera surveillance method in the foregoing embodiment when being executed by a processor.

The computer readable storage medium 70 may be a server, a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various media capable of storing program codes.

In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules or units is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.

Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The above description is only an example of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings, or which are directly or indirectly applied to other related technical fields, are intended to be included within the scope of the present application.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于语音识别和图像识别技术的AI智能报警主机

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!