CN110766710B - Image target discrimination method - Google Patents

Image target discrimination method Download PDF

Info

Publication number
CN110766710B
CN110766710B CN201811055041.5A CN201811055041A CN110766710B CN 110766710 B CN110766710 B CN 110766710B CN 201811055041 A CN201811055041 A CN 201811055041A CN 110766710 B CN110766710 B CN 110766710B
Authority
CN
China
Prior art keywords
matrix
real
frame
time image
temperature
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811055041.5A
Other languages
Chinese (zh)
Other versions
CN110766710A (en
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.)
Chengdu Jimi Technology Co Ltd
Original Assignee
Chengdu Jimi Technology 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 Chengdu Jimi Technology Co Ltd filed Critical Chengdu Jimi Technology Co Ltd
Priority to CN201811055041.5A priority Critical patent/CN110766710B/en
Publication of CN110766710A publication Critical patent/CN110766710A/en
Application granted granted Critical
Publication of CN110766710B publication Critical patent/CN110766710B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses an image target discrimination method, which comprises the following steps: obtaining a foreground temperature matrix of a kth frame of real-time image; obtaining a background point binary matrix, a pseudo target point binary matrix and a target point binary matrix of the kth frame of real-time image; judging whether k is larger than a preset frame value, if so, carrying out continuity judgment on each pseudo target point of a pseudo target point binary matrix of the nearest m frames of real-time images including the kth frame of real-time image, and judging continuous pseudo target points as quasi target points to obtain a quasi target point binary matrix; and performing OR operation on the target point binary matrix of the k-th frame of real-time image and the obtained quasi-target point binary matrix, taking the binary matrix obtained by operation as a target discrimination binary matrix of the k-th frame of real-time image, and then performing the step of obtaining the foreground temperature matrix of the k-th frame of real-time image. According to the invention, the lower false detection rate and the lower missed detection rate can be realized simultaneously by setting the high threshold and the low threshold.

Description

Image target discrimination method
Technical Field
The invention relates to the field of image processing, in particular to an image target distinguishing method.
Background
Image processing refers to a technique of analyzing an image by using a computer to achieve a required result, and is also called image processing, generally, image processing refers to digital image processing, digital images refer to a large two-dimensional array obtained by shooting with equipment such as an industrial camera, a video camera, a scanner and the like, elements of the array are called pixels, also called pixel points, and values of the pixels are called gray values, and in the computer, the images can be divided into binary images, gray images, index images and true color RGB images according to the number of colors and gray levels.
The existing image processing technology relates to the need of judging whether an image contains a target or not, and the process of judging the target relates to the use of a threshold value for judging the target, but at present, only a single threshold value method is used, because the single threshold value can only emphasize the performance of one aspect of a system and sacrifice the performance of the other aspect, for example, the threshold value is selected to be higher, the false detection rate of the target can be reduced, the false detection rate of the target can be increased, the threshold value is selected to be lower, the false detection rate of the target can be reduced, but the false detection rate of the target can be increased, so that the method for judging the image target, which can balance the false detection rate and the false detection rate, has very important significance.
Disclosure of Invention
In view of this, the present application provides an image target discrimination method, in which two thresholds, i.e., a high threshold and a low threshold, are set, a point lower than the low threshold is determined as a background point, a point higher than the low threshold is determined as a pseudo target point, and a point higher than the high threshold is determined as a target point, and the background point, the target point, and the pseudo target point are separately processed, so as to achieve the purpose of simultaneously reducing a false detection rate and a false detection rate. In order to solve the technical problems, the technical scheme provided by the invention is as follows:
an image object discrimination method comprising:
obtaining a foreground temperature matrix of a kth frame of real-time image, wherein k is more than or equal to 1;
comparing each element value in the foreground temperature matrix of the kth frame of real-time image with a preset low-temperature threshold value and a preset high-temperature threshold value respectively to obtain a background point binary matrix, a pseudo target point binary matrix and a target point binary matrix;
judging whether k is larger than a preset frame value, if so, carrying out the next step, otherwise, taking the target point binary matrix as a target discrimination binary matrix of the kth frame of real-time image, and then carrying out the step of obtaining a foreground temperature matrix of the kth frame of real-time image;
carrying out continuity judgment on each pseudo target point of a pseudo target point binary matrix of the nearest m frames of real-time images including the kth frame of real-time image, judging the continuous pseudo target points as quasi target points, and judging the discontinuous pseudo target points as background points to obtain a quasi target point binary matrix, wherein m is less than or equal to k;
and performing OR operation on the target point binary matrix of the k-th frame of real-time image and the obtained quasi-target point binary matrix, taking the binary matrix obtained by operation as a target discrimination binary matrix of the k-th frame of real-time image, and then performing the step of obtaining the foreground temperature matrix of the k-th frame of real-time image.
Further, the step of comparing each element value in the foreground temperature matrix of the kth frame of real-time image with a preset low temperature threshold and a preset high temperature threshold respectively to obtain a background point binary matrix, a pseudo target point binary matrix and a target point binary matrix includes:
comparing each element value in a foreground temperature matrix of the kth frame of real-time image with a low preset temperature threshold and a high preset temperature threshold respectively, determining pixel points corresponding to element values lower than the low preset temperature threshold as background points, obtaining background point binary matrixes, determining pixel points corresponding to element values higher than the low preset temperature threshold as pseudo target points, obtaining pseudo target point binary matrixes, determining pixel points corresponding to element values higher than the high preset temperature threshold as target points, and obtaining target point binary matrixes.
Further, the step of obtaining the foreground temperature matrix of the kth frame of real-time image specifically includes:
obtaining a current background temperature matrix;
collecting a kth frame of real-time image to obtain a temperature matrix of the kth frame of real-time image;
and calculating the difference value between the temperature matrix of the k-th frame of real-time image and the current background temperature matrix to obtain the foreground temperature matrix of the k-th frame of real-time image.
Further, the step of obtaining the current background temperature matrix specifically includes: when the target of the first frame of real-time image is judged, an initial background temperature matrix is firstly obtained to serve as a current background temperature matrix when the target of the first frame of real-time image is judged, when the target of the r-th frame of real-time image is judged, the current background temperature matrix of the r-1-th frame of real-time image is firstly updated, the updated background temperature matrix is the current background temperature matrix of the r-th frame of real-time image, and r is larger than or equal to 2.
Further, the obtaining an initial background temperature matrix specifically includes:
acquiring a plurality of frames of images to obtain a first temperature matrix;
setting a first threshold T1 according to the first temperature matrix;
judging whether the element value larger than a first threshold value T1 exists in the first temperature matrix, if so, carrying out the next step, otherwise, obtaining the first temperature matrix as an initial background temperature matrix;
averaging all the element values smaller than a first threshold value T1 in the first temperature matrix;
updating all the element values in the first temperature matrix, which are greater than a first threshold value T1, to the average value to obtain an initial background temperature matrix;
wherein, a temperature matrix corresponds to a frame of image, and the element values in the temperature matrix are the temperature values of different pixel points in the image respectively.
Further, the acquiring a plurality of frames of images to obtain the first temperature matrix specifically includes:
acquiring t frames of images to obtain a temperature matrix of each frame of image;
respectively averaging all element values in the temperature matrix of each frame of image;
removing the a frame image with the highest average value and removing the a frame image with the lowest average value;
and obtaining a first temperature matrix according to the temperature matrixes of the rest t-2a frame images, wherein the element values in the first temperature matrix are the average values of all corresponding element values in the t-2a temperature matrixes respectively.
Further, the step of setting the first threshold T1 according to the first temperature matrix specifically includes: the first threshold T1 is calculated according to equation (1),
T1=(Tmax+Tmin)/2+T0 (1)
where Tmax is the maximum element value in the first temperature matrix, Tmin is the minimum element value in the temperature matrix, and T0 is a constant.
Further, a static interference judgment step is further included after the target discrimination binary matrix is obtained from each frame of real-time image, so that a final target discrimination binary matrix is obtained, and then the step of obtaining the foreground temperature matrix of the k-th frame of real-time image is performed.
Further, the step of determining the stationary interference specifically includes:
acquiring an initial interference matrix and a target discrimination binary matrix of a current real-time image;
updating the initial interference matrix to the current interference matrix according to formula (2), wherein IkRepresenting the current interference matrix, Ik-1Initial interference matrix, U, representing the current real-time imagekRepresenting a target discrimination binary matrix of the current real-time image, wherein k represents the frame number of the current real-time image;
Ik=Ik-1&Uk (2)
judging whether k is larger than a preset value k0If so, performing the next step, otherwise, obtaining a target discrimination binary matrix of the current real-time image as a final target discrimination binary matrix of the current real-time image;
performing expansion processing on the current interference matrix to obtain an expanded interference matrix;
updating the target discrimination binary matrix of the obtained current real-time image according to a formula (3), wherein the updated current real-time image target discrimination binary matrix is the final target discrimination binary matrix of the current real-time image, and I'kRepresenting an interference matrix, U 'obtained by performing expansion processing on the current interference matrix'kRepresenting the updated current real-time image target discrimination binary matrix,
U′k=Uk-I′k (3)。
further, the action of acquiring the initial interference matrix of the current real-time image is specifically as follows: when the static interference judgment is carried out on the first frame of real-time image, the initial interference matrix is the matrix which has the same specification as the acquired first frame of real-time image target judgment binary matrix and all the element values are 1, when the static interference judgment is carried out on the r-th frame of real-time image, the initial interference matrix is the interference matrix obtained after the initial interference matrix of the r-1-th frame of real-time image is updated, wherein r is more than or equal to 2.
The image target distinguishing method provided by the invention has the advantages that two thresholds of high and low are set, the point lower than the low threshold is judged as the background point, the point higher than the low threshold is judged as the false target point, the point higher than the high threshold is judged as the target point, and the background point, the target point and the false target point are separately processed, so that the purposes of lower false detection rate and lower false detection rate are realized.
Drawings
FIG. 1 is a flow chart of a method provided by the present invention.
Fig. 2 is a flowchart of an optimization method provided in the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood by those skilled in the art, the present invention will be further described in detail with reference to the accompanying drawings and specific embodiments.
Example 1
As shown in fig. 1, the present embodiment provides an image object discriminating method, including:
s1: obtaining a foreground temperature matrix of a kth frame of real-time image, wherein k is more than or equal to 1;
s2: comparing each element value in the foreground temperature matrix of the kth frame of real-time image with a preset low-temperature threshold value and a preset high-temperature threshold value respectively to obtain a background point binary matrix, a pseudo target point binary matrix and a target point binary matrix;
s3: judging whether k is larger than a preset frame value, if so, carrying out the next step, otherwise, taking the target point binary matrix as a target discrimination binary matrix of the kth frame of real-time image, and then carrying out the step of obtaining a foreground temperature matrix of the kth frame of real-time image;
s4: carrying out continuity judgment on each pseudo target point of a pseudo target point binary matrix of the nearest m frames of real-time images including the kth frame of real-time image, judging the continuous pseudo target points as quasi target points, and judging the discontinuous pseudo target points as background points to obtain a quasi target point binary matrix, wherein m is less than or equal to k, and if no continuous pseudo target points exist, the obtained quasi target point binary matrix is a matrix of all 0;
s5: and performing OR operation on the target point binary matrix of the k-th frame of real-time image and the obtained quasi-target point binary matrix, taking the binary matrix obtained by operation as a target discrimination binary matrix of the k-th frame of real-time image, and then performing the step of obtaining the foreground temperature matrix of the k-th frame of real-time image.
It should be noted that, this embodiment may be used in a projection apparatus, and may be specifically applied to a projection control system with an infrared array sensor, and now further described in this embodiment, in step S2, in the background point binary matrix, the element value determined as the background point is 1, the remaining element values are 0, in the pseudo target point binary matrix, the element value determined as the pseudo target point is 1, the remaining element values are 0, in the target point binary matrix, the element value determined as the target point is 1, and the remaining element values are 0; in step S3, for better understanding, assuming that the preset frame value is 10, the target point binary matrices obtained in step S2 are used as respective target discrimination binary matrices for the 1 st frame real-time image to the 9 th frame real-time image, and then output as the final target discrimination result, in step S4, assuming that m is also 10 (may be other value less than 10, such as 8), for the real-time images including the 10 th frame, continuity judgment is performed on the pseudo target points in various pseudo target point binary matrices, for example, continuity judgment of the pseudo target points is required for the pseudo target point binary matrices of the 10 th frame of real-time images, and determining the continuous pseudo target points as target points, wherein the element value is 1, and updating the discontinuous pseudo target points as background points, wherein the element value is 0, thereby obtaining a quasi target point binary matrix.
It should be noted that, the setting of the high and low dual temperature thresholds mainly aims at balancing the missing detection rate and the false detection rate, the high temperature threshold can obtain a low false detection rate, the low temperature threshold can obtain a low missing detection rate, and the existence of the false target point is to reduce the missing detection as much as possible on the premise of obtaining a low false detection rate by the high temperature threshold, so the missing detection is reduced by adopting the method of continuously judging the false target point, because in the image target discrimination, the target is movable, but is usually in a relatively stable state in the time of second, the edge point of the target or the target point far away from the projection control device is likely to have a small temperature difference with the background (here, the element value corresponding to the foreground temperature matrix of the real-time image in the kth frame is small in step S1), if the target passes through a higher temperature threshold value, the target cannot be determined as the target, and therefore a missing detection situation occurs, because in an actual situation, the image acquisition frequency is relatively high, and usually, tens of frames of images can be acquired within 1 second, while the target is in a relatively stable state within the time of seconds, once the target is continuously determined as a false target point within m frames, the false target point can be determined as the target point, and therefore the missing detection rate is reduced. Compared with a single threshold, the double-threshold method can well balance the missed detection rate and the false detection rate.
Specifically, the step of comparing each element value in the foreground temperature matrix of the kth frame of real-time image with a preset low temperature threshold and a preset high temperature threshold respectively to obtain a background point binary matrix, a pseudo target point binary matrix, and a target point binary matrix, that is, step S2 includes:
comparing each element value in a foreground temperature matrix of the kth frame of real-time image with a low preset temperature threshold and a high preset temperature threshold respectively, determining pixel points corresponding to element values lower than the low preset temperature threshold as background points, obtaining background point binary matrixes, determining pixel points corresponding to element values higher than the low preset temperature threshold as pseudo target points, obtaining pseudo target point binary matrixes, determining pixel points corresponding to element values higher than the high preset temperature threshold as target points, and obtaining target point binary matrixes.
It should be noted that, in this embodiment, the background point binary matrix and the dummy target point binary matrix are mutually exclusive, and the dummy target point binary matrix includes the target point binary matrix.
Specifically, the obtaining of the foreground temperature matrix of the k-th frame of real-time image, that is, step S1 specifically includes:
s11: obtaining a current background temperature matrix;
s12: collecting a kth frame of real-time image to obtain a temperature matrix of the kth frame of real-time image;
s13: and calculating the difference value between the temperature matrix of the k-th frame of real-time image and the current background temperature matrix to obtain the foreground temperature matrix of the k-th frame of real-time image.
It should be noted here that when a temperature matrix of a certain frame of image is obtained, an image may be collected by a camera and subjected to related processing, or each frame of image may be collected by an infrared array sensor and a temperature matrix of each frame of image may be obtained, each collected frame of image is an infrared image, for the infrared array sensor, there are a plurality of sensors distributed in an array, one sensor has a plurality of collection points, each collection point may collect a temperature value of a pixel point in a frame of image, and the temperature values collected by all collection points constitute the temperature matrix corresponding to the frame of image.
To specifically illustrate, in this embodiment, the step S11 of obtaining the current background temperature matrix specifically includes: when the target of the first frame of real-time image is judged, an initial background temperature matrix is firstly obtained to serve as a current background temperature matrix when the target of the first frame of real-time image is judged, when the target of the r-th frame of real-time image is judged, the current background temperature matrix of the r-1-th frame of real-time image is firstly updated, the updated background temperature matrix is the current background temperature matrix of the r-th frame of real-time image, and r is larger than or equal to 2.
Wherein the act of obtaining an initial background temperature matrix specifically comprises:
p1: acquiring a plurality of frames of images to obtain a first temperature matrix;
p2: setting a first threshold T1 according to the first temperature matrix;
p3: judging whether the element value larger than a first threshold value T1 exists in the first temperature matrix, if so, carrying out the next step, otherwise, obtaining the first temperature matrix as an initial background temperature matrix;
p4: averaging all the element values smaller than a first threshold value T1 in the first temperature matrix;
p5: updating all the element values in the first temperature matrix, which are greater than a first threshold value T1, to the average value to obtain an initial background temperature matrix;
wherein, a temperature matrix corresponds to a frame of image, and the element values in the temperature matrix are the temperature values of different pixel points in the image respectively.
Wherein, the acquiring a plurality of frame images to obtain a first temperature matrix, that is, step P1 specifically includes:
p11: acquiring t frames of images to obtain a temperature matrix of each frame of image;
p12: respectively averaging all element values in the temperature matrix of each frame of image;
p13: removing the a frame image with the highest average value and removing the a frame image with the lowest average value;
p14: and obtaining a first temperature matrix according to the temperature matrixes of the rest t-2a frame images, wherein the element values in the first temperature matrix are the average values of all corresponding element values in the t-2a temperature matrixes respectively.
Preferably, the first threshold T1 is set according to the first temperature matrix, that is, the step P2 is specifically: the first threshold T1 is calculated according to equation (1),
T1=(Tmax+Tmin)/2+T0 (1)
where Tmax is the maximum element value in the first temperature matrix, Tmin is the minimum element value in the temperature matrix, and T0 is a constant.
To better explain the embodiment, when the initial background temperature matrix is obtained, t > 2a, where t may be 5, a may be 1, and the temperature matrices corresponding to the acquired 5 frames of images are respectively
Figure GDA0003632283660000091
And
Figure GDA0003632283660000092
the average value of each corresponding temperature matrix is 1.75, 2, 3, 2 and 2.5, respectively, and then, the first frame image and the third frame image are removed,the temperature matrixes corresponding to the remaining second frame image, the fourth frame image and the fifth frame image (which are arranged in sequence for better illustration) are respectively
Figure GDA0003632283660000093
And
Figure GDA0003632283660000094
then, the element values at the corresponding positions in the 3 matrixes are averaged respectively, that is, the average value of the element values in the first row and the first column is: (2+1+2)/3 ═ 1.67; the element values of the first row and second column are averaged as: (3+1+2)/3 ═ 2; the element values of the second row and the first column are averaged as follows: (2+2+2)/3 ═ 2; averaging the values of the elements in the second row and the second column as: (1+4+4)/3 ═ 3; thus, a first temperature matrix is obtained of
Figure GDA0003632283660000095
In this embodiment, the images with the highest and lowest mean values are removed, so that the effectiveness and objectivity of the image data can be ensured, and the accuracy of the final background acquisition can be further improved.
To further illustrate, for the first temperature matrix, the types of element values are two types: in this embodiment, the background points and the target points are distinguished by a first threshold T1, and once the background points and the target points are distinguished, the background points corresponding to the target points need to be assigned. For example, the first temperature matrix is
Figure GDA0003632283660000096
The first threshold T1 is 2.84 (the value of T1 may be set empirically or may be obtained by the following method, and for the sake of uniformity, the value of the first temperature matrix and the value of T1 may be selected from the result values obtained by the following methods), then a point with an element value of 3 is determined as the target point, and the background point with an element value of 3 is reassigned to (1.67+2+ 2)/3-1.89, and the obtained temperature matrix is obtained
Figure GDA0003632283660000097
For the final initial background temperature matrix, in practice, there are far more than 4 acquisition points, where the amount of data is simplified to help better understanding.
To explain further, the value of T0 is usually small, for example, it may be 0.5, and then the first temperature matrix obtained above is used as the basis
Figure GDA0003632283660000101
T1 ═ 2.84 can be obtained (1.67+3)/2+ 0.5. The value of the first threshold value T1 is determined by the method, a reasonable threshold value can be obtained for the images with targets and without targets, for example, for the images with targets, the maximum element value is the temperature of the target, the minimum element value is the temperature of the background, the maximum element value and the minimum element value are averaged and added with a smaller value, and the target and the background can be effectively distinguished; for the image without the target, all points are backgrounds, the temperature values are similar, the maximum element value and the minimum element value are background temperatures, the obtained first threshold value T1 is higher than the background value, and the target and the background can be effectively distinguished.
In addition, in the specific method of step S11, the present embodiment provides that the current background temperature matrix of the r-1 th frame (where, r ≧ 2) real-time image is updated, where the specific background updating method includes:
r1: acquiring a pseudo target point binary matrix of a current real-time image, a current background temperature matrix and a temperature matrix of the current real-time image;
r2: and updating the element values of the current background temperature matrix corresponding to the determined background point and the determined pseudo target point respectively.
Specifically, in step R2, the updating the current background temperature matrix element value corresponding to the determined background point specifically includes:
updating the element value of the current background temperature matrix corresponding to the determined background point according to the formula (4),
Bk+1=Bk+u(Yk-Bk) (4)
wherein, BkRepresenting the current of the k-th frame real-time imageA background temperature matrix, u represents the update rate, the value range of u is 0-1, and YkAnd a real-time image temperature matrix representing the k-th frame of real-time image.
Specifically, in step R2, the updating the current background temperature matrix element value corresponding to the determined pseudo target point specifically includes:
averaging the element values of the current background temperature matrix corresponding to all the judged background points;
and updating the current background temperature matrix element values corresponding to all the determined pseudo target points to be the average value of the current real-time image temperature matrix element values corresponding to all the determined background points.
It should be noted here that the detection frequency is high so that the update rate can be appropriately reduced, and when the detection frequency is low, the update rate can be appropriately increased, and the AMG8833 detects that the frequency is 10FPS, that is, one second and ten frames, and at this time, the update rate u can be set to 0.5.
To better illustrate the embodiment, the current background temperature matrix (i.e. the initial background temperature matrix) of the 1 st frame of real-time image is taken as an example, and as mentioned above, if the initial background temperature matrix is
Figure GDA0003632283660000111
If the temperature matrix of the 1 st frame of real-time image is
Figure GDA0003632283660000112
The foreground temperature matrix is then
Figure GDA0003632283660000113
The low temperature threshold and the high temperature threshold are respectively 0.8 and 2, and the background point binary matrix, the pseudo target binary matrix and the target point binary matrix obtained at this time are respectively
Figure GDA0003632283660000114
And
Figure GDA0003632283660000115
now according to the formula(4) Updating two elements in the first column of the initial background temperature matrix, wherein the updated values of the elements in the first row and the first column are as follows: 1.67+0.5 (1.8-1.67) ═ 1.74, the values of the elements in the second row and the first column are updated as: 2+0.5 (1.5-2) ═ 1.75, the values of the elements in the first row and the second column are updated to: (1.8+1.5)/2 ═ 1.65, the element values in the second row and second column are updated as follows: (1.8+1.5)/2 is 1.65, therefore, the new background temperature matrix obtained is
Figure GDA0003632283660000116
Preferably, as shown in fig. 2, in this embodiment, after obtaining the target discrimination binary matrix in each frame of real-time image, a step of determining stationary interference is further included, so as to obtain a final target discrimination binary matrix, and then the step of obtaining the foreground temperature matrix of the k-th frame of real-time image is performed.
Specifically, the step of determining the stationary interference specifically includes:
x1: acquiring an initial interference matrix and a target discrimination binary matrix of a current real-time image;
x2: updating the initial interference matrix to the current interference matrix according to formula (2), wherein IkRepresenting the current interference matrix, Ik-1Initial interference matrix, U, representing the current real-time imagekRepresenting a target discrimination binary matrix of the current real-time image, wherein k represents the frame number of the current real-time image;
Ik=Ik-1&Uk (2)
x3: judging whether k is larger than a preset value k0If so, performing the next step, otherwise, obtaining a target discrimination binary matrix of the current real-time image as a final target discrimination binary matrix of the current real-time image;
x4: performing expansion processing on the current interference matrix to obtain an expanded interference matrix;
x5: updating the target discrimination binary matrix of the obtained current real-time image according to a formula (3), wherein the updated target discrimination binary matrix of the current real-time image is the final target discrimination binary matrix of the current real-time imageWherein, I'kRepresenting an interference matrix, U 'obtained by performing expansion processing on the current interference matrix'kRepresenting the updated current real-time image target discrimination binary matrix,
U′k=Uk-I′k (3)。
specifically, the step of acquiring the initial interference matrix specifically includes: when the static interference judgment is carried out on the first frame of real-time image, the initial interference matrix is a matrix I which has the same specification as the acquired first frame of real-time image target judgment binary matrix and has all the element values of 10When the static interference judgment is carried out on the r-th frame of real-time image, the initial interference matrix is obtained by updating the initial interference matrix of the r-1-th frame of real-time image, wherein r is more than or equal to 2.
It should be noted that, in the embodiment, the still interference determination is performed only once for each frame of the real-time image, and for the k-th frame of the real-time image, the number of frames of the current real-time image is equal to the number of still interference determinations.
It should be further noted that the step of determining the stationary interference is added in this embodiment because a common electrical appliance may cause a large interference to the infrared target detection in the infrared real-time image target determination process, and there are two methods for removing the stationary interference at present, namely, distinguishing the human body from other interferences by image features, and marking the target and determining the motion characteristics thereof for distinguishing by target identification and target tracking. The two methods have higher algorithm complexity, and have higher requirement on image precision, when the image precision is lower, the feature extraction becomes difficult, and the interference cannot be eliminated; the second method is difficult to deal with the problem of superposition of the interference and the target, and when the interference is superposed and close to the human target, target recognition errors are easy to generate. The static interference judging method of the embodiment has low algorithm complexity and low requirement on image pixels, and is suitable for the situation that static interference is superposed on a target.
It should be further noted that, in this embodiment, as there may be jumping points at the edge of the stationary interference heat source, the target point and the background point are intermittently determined, the purpose of the expansion processing is to remove the interference of these points, it is a mature technical means to perform expansion processing on a binary matrix, for a determined binary matrix, once the expansion structure is determined, a determined binary matrix subjected to the expansion processing may be obtained, and in terms of the selection of the expansion structure, an expansion structure commonly used in the expansion processing may be selected.
The above is only a preferred embodiment of the present invention, and it should be noted that the above preferred embodiment should not be considered as limiting the present invention, and the protection scope of the present invention should be subject to the scope defined by the claims. It will be apparent to those skilled in the art that various modifications and adaptations can be made without departing from the spirit and scope of the invention, and these modifications and adaptations should be considered within the scope of the invention.

Claims (9)

1. An image object discrimination method, comprising:
obtaining a foreground temperature matrix of a kth frame of real-time image, wherein k is more than or equal to 1;
traversing the numerical value relationship between each element value in the foreground temperature matrix of the kth frame of real-time image and a low preset temperature threshold value and a high preset temperature threshold value, extracting pixel points with element values lower than the low preset temperature threshold value as background points and constructing a background point binary matrix, extracting pixel points with element values higher than the low preset temperature threshold value as pseudo target points and constructing a pseudo target point binary matrix, and extracting pixel points with element values higher than the high preset temperature threshold value as target points and constructing a target point binary matrix;
judging whether k is larger than a preset frame value, if so, carrying out the next step, otherwise, taking the target point binary matrix as a target discrimination binary matrix of the kth frame of real-time image, and then carrying out the step of obtaining a foreground temperature matrix of the kth frame of real-time image;
carrying out continuity judgment on each pseudo target point of a pseudo target point binary matrix of the nearest m frames of real-time images including the kth frame of real-time image, judging the continuous pseudo target points as quasi target points, and judging the discontinuous pseudo target points as background points to obtain a quasi target point binary matrix, wherein m is less than or equal to k;
and performing OR operation on the target point binary matrix of the k-th frame of real-time image and the obtained quasi-target point binary matrix, taking the binary matrix obtained by operation as a target discrimination binary matrix of the k-th frame of real-time image, and then performing the step of obtaining the foreground temperature matrix of the k-th frame of real-time image.
2. The image target discrimination method according to claim 1, wherein the step of obtaining the foreground temperature matrix of the k-th frame of real-time image specifically comprises:
obtaining a current background temperature matrix;
collecting a kth frame of real-time image to obtain a temperature matrix of the kth frame of real-time image;
and calculating the difference value between the temperature matrix of the k-th frame of real-time image and the current background temperature matrix to obtain the foreground temperature matrix of the k-th frame of real-time image.
3. The method for discriminating an image object according to claim 2, wherein the step of obtaining the current background temperature matrix specifically comprises: when the target of the first frame of real-time image is judged, an initial background temperature matrix is firstly obtained to serve as a current background temperature matrix when the target of the first frame of real-time image is judged, when the target of the r-th frame of real-time image is judged, the current background temperature matrix of the r-1-th frame of real-time image is firstly updated, the updated background temperature matrix is the current background temperature matrix of the r-th frame of real-time image, and r is larger than or equal to 2.
4. The method according to claim 3, wherein the step of obtaining the initial background temperature matrix specifically comprises:
acquiring a plurality of frames of images to obtain a first temperature matrix;
setting a first threshold T1 according to the first temperature matrix;
judging whether the element value larger than a first threshold value T1 exists in the first temperature matrix, if so, carrying out the next step, otherwise, obtaining the first temperature matrix as an initial background temperature matrix;
averaging all the element values smaller than a first threshold value T1 in the first temperature matrix;
updating all the element values in the first temperature matrix, which are greater than a first threshold value T1, to the average value to obtain an initial background temperature matrix;
wherein, a temperature matrix corresponds to a frame of image, and the element values in the temperature matrix are the temperature values of different pixel points in the image respectively.
5. The method for discriminating the image target according to claim 4, wherein the step of acquiring a plurality of frames of images to obtain the first temperature matrix specifically comprises:
acquiring t frames of images to obtain a temperature matrix of each frame of image;
respectively averaging all element values in the temperature matrix of each frame of image;
removing the a frame image with the highest average value and removing the a frame image with the lowest average value;
and obtaining a first temperature matrix according to the temperature matrixes of the rest t-2a frame images, wherein the element values in the first temperature matrix are the average values of all corresponding element values in the t-2a temperature matrixes respectively.
6. The method according to claim 4, wherein the step of setting the first threshold T1 according to the first temperature matrix includes: the first threshold T1 is calculated according to equation (1),
T1=(Tmax+Tmin)/2+T0 (1)
where Tmax is the maximum element value in the first temperature matrix, Tmin is the minimum element value in the first temperature matrix, and T0 is a constant.
7. The image target discrimination method according to claim 1, further comprising a step of determining stationary disturbance after obtaining the target discrimination binary matrix for each frame of real-time image, thereby obtaining a final target discrimination binary matrix, and then performing the step of obtaining the foreground temperature matrix for the k-th frame of real-time image.
8. The method according to claim 7, wherein the still image target determining step specifically includes:
acquiring an initial interference matrix and a target discrimination binary matrix of a current real-time image;
updating the initial interference matrix to the current interference matrix according to formula (2), wherein IkRepresenting the current interference matrix, Ik-1Initial interference matrix, U, representing the current real-time imagekRepresenting a target discrimination binary matrix of the current real-time image, wherein k represents the frame number of the current real-time image;
Ik=Ik-1&Uk (2)
judging whether k is larger than a preset value k0If so, performing the next step, otherwise, obtaining a target discrimination binary matrix of the current real-time image as a final target discrimination binary matrix of the current real-time image;
performing expansion processing on the current interference matrix to obtain an expanded interference matrix;
updating the target discrimination binary matrix of the obtained current real-time image according to a formula (3), wherein the updated current real-time image target discrimination binary matrix is the final target discrimination binary matrix of the current real-time image, and I'kRepresenting an interference matrix, U 'obtained by performing expansion processing on the current interference matrix'kRepresenting the updated current real-time image target discrimination binary matrix,
U′k=Uk-I′k (3)。
9. the method for discriminating an image target according to claim 8, wherein the act of obtaining the initial interference matrix of the current real-time image is specifically: when the static interference judgment is carried out on the first frame of real-time image, the initial interference matrix is the same as and has the same specification as the acquired first frame of real-time image target judgment binary matrixMatrix I with all 1's of elements0When the static interference judgment is carried out on the r-th frame of real-time image, the initial interference matrix is obtained by updating the initial interference matrix of the r-1-th frame of real-time image, wherein r is more than or equal to 2.
CN201811055041.5A 2018-09-11 2018-09-11 Image target discrimination method Active CN110766710B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811055041.5A CN110766710B (en) 2018-09-11 2018-09-11 Image target discrimination method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811055041.5A CN110766710B (en) 2018-09-11 2018-09-11 Image target discrimination method

Publications (2)

Publication Number Publication Date
CN110766710A CN110766710A (en) 2020-02-07
CN110766710B true CN110766710B (en) 2022-07-08

Family

ID=69328943

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811055041.5A Active CN110766710B (en) 2018-09-11 2018-09-11 Image target discrimination method

Country Status (1)

Country Link
CN (1) CN110766710B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621615A (en) * 2009-07-24 2010-01-06 南京邮电大学 Self-adaptive background modeling and moving target detecting method
CN101894381A (en) * 2010-08-05 2010-11-24 上海交通大学 Multi-target tracking system in dynamic video sequence
CN104616290A (en) * 2015-01-14 2015-05-13 合肥工业大学 Target detection algorithm in combination of statistical matrix model and adaptive threshold
KR101631023B1 (en) * 2015-04-03 2016-06-15 경희대학교 산학협력단 Neighbor-based intensity correction device, background acquisition device and method thereof
CN106023259A (en) * 2016-05-26 2016-10-12 史方 Method and device for detecting moving target frequency

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621615A (en) * 2009-07-24 2010-01-06 南京邮电大学 Self-adaptive background modeling and moving target detecting method
CN101894381A (en) * 2010-08-05 2010-11-24 上海交通大学 Multi-target tracking system in dynamic video sequence
CN104616290A (en) * 2015-01-14 2015-05-13 合肥工业大学 Target detection algorithm in combination of statistical matrix model and adaptive threshold
KR101631023B1 (en) * 2015-04-03 2016-06-15 경희대학교 산학협력단 Neighbor-based intensity correction device, background acquisition device and method thereof
CN106023259A (en) * 2016-05-26 2016-10-12 史方 Method and device for detecting moving target frequency

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于矩阵像素阈值判定的运动目标检测;黄敏 等;《郑州轻工业学院学报(自然科学版)》;20101215;第25卷(第06期);第87-90页 *

Also Published As

Publication number Publication date
CN110766710A (en) 2020-02-07

Similar Documents

Publication Publication Date Title
JP6451133B2 (en) Anomaly detection device, anomaly detection method, anomaly detection system, and program
US8553980B2 (en) Method and apparatus extracting feature points and image based localization method using extracted feature points
CN106296725B (en) Moving target real-time detection and tracking method and target detection device
US7957592B2 (en) Video object segmentation method and system
CN109740589B (en) Asynchronous object ROI detection method and system in video mode
JP2012089929A (en) Object detection apparatus, object detection method, monitoring camera system and program
US9904853B2 (en) Monitoring camera device and related region-based motion detection method
CN110610150A (en) Tracking method, device, computing equipment and medium of target moving object
EP3200442B1 (en) Method and apparatus for image processing
CN110674886B (en) Video target detection method fusing multi-level features
CN110782426B (en) Background extraction method and target discrimination method
CN110766711A (en) Video shot segmentation method, system, device and storage medium
CN110602504A (en) Video decompression method and system based on YOLOv2 target detection algorithm
JP2020504383A (en) Image foreground detection device, detection method, and electronic apparatus
CN113424516A (en) Method of processing a series of events received asynchronously from a pixel array of an event-based photosensor
KR101214858B1 (en) Moving object detecting apparatus and method using clustering
CN110766710B (en) Image target discrimination method
CN116431857B (en) Video processing method and system for unmanned scene
CN109886963B (en) Image processing method and system
CN112150385B (en) Infrared image filtering method and device
US20140023343A1 (en) Video processing system and video processing method, video processing apparatus, control method of the apparatus, and storage medium storing control program of the apparatus
JP2014121075A (en) Defective pixel detector, defective pixel detection method and program
CN113938671A (en) Image content analysis method and device, electronic equipment and storage medium
CN109886276A (en) A kind of dial plate rolls the half-word judgment method of numerical character
CN108596973B (en) Method for fixed-point monitoring of virtual preset positions for land illegal and illegal buildings

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant