Lens occlusion joint detection method and system of binocular camera

CN117788859BActive Publication Date: 2026-10-13BEIHANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311773704.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-21
Publication Date
2026-10-13
Estimated Expiration
2043-12-21

AI Technical Summary

Technical Problem

在此方法中,相邻两帧之间的灰度直方图相似性可能会受到图像移动或者光线变化等因素的影响,因此只依靠直方图相似性判断遮挡状态可能会产生误判

Benefits of technology

[0047](1)本发明获取两个图像对应位置的灰度值并进行比较,通过统计被遮挡像素点的数量来判断图像是否被遮挡,有效提高了遮挡检测的准确性;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117788859B_ABST
    Figure CN117788859B_ABST
Patent Text Reader

Abstract

The application relates to a lens blocking joint detection method and system of a binocular camera, and belongs to the technical field of image and video processing.The application uses feature matching and conversion matrix solving to realize accurate mapping between two images, compares the gray values of corresponding position pixel points of two images obtained by a binocular camera, judges whether the image is blocked by counting the number of blocked pixel points, and obtains the blocked pixel points by testing the gray continuity of corresponding image pixel points of the binocular camera, so that the accuracy of the blocking judgment is improved, and the accuracy of the blocking detection is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image and video processing technology, and specifically to a method and system for joint detection of lens occlusion in a binocular camera. Background Technology

[0002] In fields such as autonomous driving and intelligent transportation systems, real-time perception of the driving environment and ensuring safety are crucial. Camera occlusion can lead to missing or misjudged visual information, thus necessitating the development of reliable occlusion detection technologies to provide accurate scene perception for the system.

[0003] Binocular cameras can acquire depth information of a visual scene, enabling 3D reconstruction and scene understanding through stereo matching algorithms. However, when occlusion occurs, depth information may be missing or inaccurate, affecting the integration of realism and virtual content. In visual SLAM, simultaneous localization and map building are achieved by analyzing feature point matching and geometric relationships between adjacent frames. However, when occlusion exists, errors may occur in the calculation of feature point matching and geometric relationships, leading to a degrade in the performance of the SLAM system.

[0004] Most existing methods for detecting visual information at camera occlusions are based on monocular cameras, such as methods based on single image information, methods based on video streams, and methods based on deep learning.

[0005] The detection method based on single-frame image information determines whether the denoised image is occluded by comparing the variance value with a preset threshold. However, this method is dependent on a fixed scene, as the variance value of brightness changes significantly with scene changes. Furthermore, this method cannot determine the location of occluded areas.

[0006] The video stream-based method compares the histogram similarity between the current frame and a reference frame; if the similarity exceeds a threshold, it is considered an occlusion. However, the grayscale histogram similarity between adjacent frames can be affected by factors such as image movement or lighting changes, so relying solely on histogram similarity to determine occlusion may lead to misjudgments. Summary of the Invention

[0007] In view of the above problems, the present invention provides a joint detection method and system for lens occlusion using a binocular camera. The present invention uses feature matching and transformation matrix solving to achieve accurate mapping between two images. The gray values ​​of corresponding pixels in the two images are obtained by the binocular camera and compared. The number of occluded pixels is counted to determine whether the image is occluded. The gray value continuity of the corresponding image pixels of the binocular camera is checked to obtain the occluded pixels. This not only improves the accuracy of occlusion judgment, but also effectively improves the accuracy of occlusion detection.

[0008] This invention provides a joint detection system for lens occlusion of a binocular camera, comprising: an image acquisition module, a transformation matrix solving module, an image mapping module, a pixel difference calculation module, a consistency verification module, a statistics module, and an occlusion judgment module;

[0009] The image acquisition module is used to acquire image sequence one and image sequence two from two perspectives of the pre-detection image, and to create image sequence three with the same size as image sequence one;

[0010] The transformation matrix solving module is used to establish the transformation matrix between image sequence one and image sequence two; the pixel coordinates in image sequence three are transformed to the coordinate system of image sequence two based on the transformation matrix, and the pixel points of image sequence three are updated;

[0011] The image mapping module is used to map the gray values ​​of one pixel in an image sequence to the gray values ​​of three pixels in an image sequence one by one, so as to obtain a combination of multiple mapped pixel gray values.

[0012] The image pixel difference calculation module is used to calculate the pixel difference value of the combination of gray values ​​of multiple mapped pixels to obtain multiple pixel difference values; the multiple pixel difference values ​​are compared with a preset difference threshold in turn to obtain the occluded pixels;

[0013] The consistency check module is used to check the continuity of grayscale values ​​of the occluded pixels to obtain the final occluded pixels;

[0014] The statistics module is used to count the number of pixels that are ultimately occluded in image sequence one and image sequence three, respectively.

[0015] The occlusion judgment module is used to determine whether the number of occluded pixels in image sequence one or image sequence three exceeds the preset occlusion pixel number threshold, and obtain the judgment result of the pre-detection image.

[0016] This invention also proposes a joint detection method for lens occlusion in a binocular camera, comprising:

[0017] Camera 1 and Camera 2 are selected, and their intrinsic parameters are calibrated to obtain calibrated Camera 1 and calibrated Camera 2; the camera intrinsic parameters include focal length and pixel size;

[0018] Image sequence one is obtained by capturing a pre-detection image using calibration camera one, and image sequence two is obtained by capturing a pre-detection image using calibration camera two. Feature point one of image sequence one and feature point two of image sequence two are extracted respectively. Feature point one and feature point two are matched to obtain matching point pairs of image sequence one and image sequence two.

[0019] Preferably, feature descriptors are used to extract feature point one and feature point two; the feature descriptors include the SIFT feature point extraction algorithm and the SURF feature point extraction algorithm.

[0020] Establish a two-dimensional coordinate system for matching point pairs, obtain the coordinates of matching points in image sequence one and image sequence two based on the two-dimensional coordinate system, establish a transformation matrix equation based on the coordinates of matching points in image sequence one and image sequence two, and solve the transformation matrix equation to obtain the transformation matrix;

[0021] Preferably, the image sequence matching point coordinates specifically comprises four sets of matching point coordinates, namely (x... i ,y i (i = 1, 2, 3, 4), the image sequence two matching point coordinates specifically consists of four sets of matching point coordinates, namely (x... i ′ ,y i ′ (i = 1, 2, 3, 4);

[0022] The transformation matrix equation is expressed as follows:

[0023]

[0024] Among them, H 3×3 It is a 3×3 transformation matrix; x i Let x and y be the x-axis coordinates of the i-th matching point in the image sequence. i x is the y-axis coordinate of the i-th matching point in the image sequence; i ′ Let x and y be the x-axis coordinates of the matching point in the i-th group of image sequence two. i ′ Let x be the x-axis coordinate of the i-th matching point in the second image sequence, i = 1, 2, 3, 4.

[0025] The transformation matrix expression is:

[0026]

[0027] Among them, H 3×3 Let h11 be the unknown in the first row and first column of the transformation matrix, h12 be the unknown in the first row and second column of the transformation matrix, h13 be the unknown in the first row and third column of the transformation matrix, h21 be the unknown in the second row and first column of the transformation matrix, h22 be the unknown in the second row and second column of the transformation matrix, h23 be the unknown in the second row and third column of the transformation matrix, h31 be the unknown in the third row and first column of the transformation matrix, and h32 be the unknown in the third row and second column of the transformation matrix.

[0028] Create image sequence three with the same dimensions as image sequence one;

[0029] Obtain the pixel coordinates (a) in image sequence three i ,b i ), the pixel coordinates (a) in image sequence three i ,b i Based on the transformation matrix, the coordinates of the updated pixel points (a′) in image sequence three are obtained by transforming the coordinates into the coordinate system of image sequence two. i ,b′ i ); Update the pixel coordinates (a′) of the image sequence three times. i ,b′ i The image sequence is processed to obtain the updated pixel points.

[0030] Obtain the grayscale value of the second pixel in the image sequence, and obtain the grayscale value of the updated pixel in the third image sequence based on the processed pixel and the grayscale value of the second pixel in the image sequence;

[0031] Preferably, the step of determining the grayscale value of the updated pixel point after processing the coordinates (a′i, b′i) of the third update pixel point in the image sequence specifically includes:

[0032] Obtain the grayscale value of the second pixel in the image sequence, determine whether the coordinates of the updated pixel in the third image sequence are integers, and if they are integers, assign the obtained grayscale value of the second pixel in the image sequence to the updated pixel to obtain the grayscale value of the updated pixel in the third image sequence.

[0033] If the value is not an integer, then the gray values ​​of the pixels in the second image sequence are combined with the gray values ​​of the pixels in the third image sequence, and the gray values ​​of the updated pixels in the third image sequence are calculated using bilinear interpolation to obtain the gray values ​​of the updated pixels in the third interpolated image sequence.

[0034] The expression for updating the grayscale value of the pixel in the interpolated image sequence is:

[0035] g(a′ i , b′ i )=(1-a′ i +[a′ i ])(1-b′ i +[b′ i ])g([a′ i ],[b′ i ])+(1-a′ i +[a′i])(b′ i -[b′ i ])g([a′ i ],[b′ i ]+1)+(a′ i -[a′ i ])(1-b′ i +[b′i ])g([a′ i ]+1,[b′ i ])+(a′ i -[a′ i ])(b′ i -[a′ i ])g([a′ i ]+1,[b′ i +1)

[0036] Among them, g(a′) i , b′ i To update the grayscale value of a pixel, a′ i Update the x-axis coordinates of pixels in image sequence three, b′ i Update the y-axis coordinates of pixels in image sequence three.

[0037] Obtain the grayscale value of a pixel in image sequence one, and map the grayscale value of the pixel in image sequence one to the grayscale value of the updated pixel in image sequence three to obtain a combination of multiple mapped pixel grayscale values.

[0038] Calculate the gray value difference of each mapped pixel gray value combination, obtain the square of the gray value difference of each mapped pixel gray value combination, and represent the square of the gray value difference of each mapped pixel gray value combination as the pixel difference value; thus obtaining multiple pixel difference values.

[0039] A preset difference threshold is set, and the difference values ​​of the multiple pixels are compared with the preset difference threshold in turn to detect whether there are any pixel difference values ​​that exceed the preset difference threshold. If so, the pixel difference value that exceeds the preset difference threshold is found and defined as the occluded pixel difference. The pixel gray value combination corresponding to the occluded pixel difference is found, and the corresponding image sequence one pixel and image sequence three updated pixel are further obtained. The corresponding image sequence three updated pixel is marked as an occluded pixel.

[0040] The continuity of grayscale values ​​is checked on the occluded pixels to obtain the final occluded pixels and the judgment result of the pre-detection image.

[0041] The continuity test of grayscale values ​​specifically includes:

[0042] Based on the occluded pixel, calculate multiple grayscale differences between the pixel in image sequence one corresponding to the occluded pixel and its surrounding pixels; calculate multiple grayscale differences between the pixel in image sequence three corresponding to the occluded pixel and its surrounding pixels.

[0043] If multiple grayscale difference values ​​1 and multiple grayscale difference values ​​2 both exceed the preset grayscale difference threshold, the pixel corresponding to the larger grayscale difference value among the multiple grayscale difference values ​​1 and multiple grayscale difference values ​​2 is determined as the occluded pixel, thus obtaining the final occluded pixel in image sequence 1 and image sequence 3.

[0044] The statistics module was used to count the number of pixels that were ultimately occluded in image sequence one and image sequence three, respectively.

[0045] A preset threshold for the number of occluded pixels is set. If the number of occluded pixels in image sequence one or image sequence three exceeds the preset threshold, the pre-detection image is determined to be occluded.

[0046] Compared with the prior art, the present invention has at least the following beneficial effects:

[0047] (1) The present invention obtains the gray values ​​of corresponding positions of two images and compares them. By counting the number of occluded pixels, it determines whether the image is occluded, which effectively improves the accuracy of occlusion detection.

[0048] (2) The present invention uses feature matching and transformation matrix solving to achieve accurate mapping between images in the binocular camera occlusion judgment;

[0049] (3) The present invention proposes a binocular camera consistency verification module based on grayscale continuity. By comparing the grayscale value of a pixel determined to be occluded in the binocular camera with its surrounding pixels, the continuity of the grayscale value at the pixel is verified, thereby further improving the accuracy of occlusion judgment. Attached Figure Description

[0050] The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of the invention.

[0051] Figure 1 This is a schematic flowchart of the detection method of the present invention;

[0052] Figure 2 This is a schematic diagram of the detection method of the present invention. Detailed Implementation

[0053] To better understand the above-described objectives, features, and advantages of the present invention, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments of the present invention and the features thereof can be combined with each other. Furthermore, the present invention can be implemented in other ways different from those described herein; therefore, the scope of protection of the present invention is not limited to the specific embodiments disclosed below.

[0054] A specific embodiment of the present invention, such as Figure 1-2 This invention discloses a lens occlusion joint detection system and method for binocular cameras. To illustrate the effectiveness of the proposed method, a specific embodiment is provided below for detailed explanation of the above-mentioned technical solution.

[0055] This invention provides a joint detection system for lens occlusion of a binocular camera, comprising: an image acquisition module, a transformation matrix solving module, an image mapping module, a pixel difference calculation module, a consistency verification module, a statistics module, and an occlusion judgment module;

[0056] The image acquisition module is used to acquire image sequence one and image sequence two from two perspectives of the pre-detection image, and to create image sequence three with the same size as image sequence one;

[0057] The transformation matrix solving module is used to establish the transformation matrix between image sequence one and image sequence two; the pixel coordinates in image sequence three are transformed to the coordinate system of image sequence two based on the transformation matrix, and the pixel points of image sequence three are updated;

[0058] The image mapping module is used to map the gray values ​​of one pixel in the image sequence to the gray values ​​of three pixels in the image sequence one by one, so as to obtain a combination of multiple mapped pixel gray values.

[0059] The image pixel difference calculation module is used to calculate the pixel difference value of the combination of gray values ​​of multiple mapped pixels, and obtain multiple pixel difference values; the multiple pixel difference values ​​are compared with the preset difference threshold in turn to obtain the occluded pixels;

[0060] The consistency check module is used to check the continuity of grayscale values ​​of the occluded pixels to obtain the final occluded pixels;

[0061] The statistics module is used to count the number of pixels that are ultimately occluded in image sequence one and image sequence three, respectively.

[0062] The occlusion judgment module is used to determine whether the number of occluded pixels in image sequence one or image sequence three exceeds the preset occlusion pixel number threshold, and obtain the judgment result of the pre-detection image.

[0063] This invention also proposes a joint detection method for lens occlusion in a binocular camera, comprising:

[0064] Camera 1 and Camera 2 are selected, and their intrinsic parameters are calibrated to obtain calibrated Camera 1 and calibrated Camera 2; the camera intrinsic parameters include focal length and pixel size;

[0065] Image sequence one is obtained by capturing a pre-detection image using calibration camera one, and image sequence two is obtained by capturing a pre-detection image using calibration camera two. Feature point one of image sequence one and feature point two of image sequence two are extracted respectively. Feature point one and feature point two are matched to obtain matching point pairs of image sequence one and image sequence two.

[0066] Preferably, feature descriptors are used to extract feature point one and feature point two; the feature descriptors include the SIFT feature point extraction algorithm and the SURF feature point extraction algorithm.

[0067] Establish a two-dimensional coordinate system for matching point pairs, obtain the coordinates of matching points in image sequence one and image sequence two based on the two-dimensional coordinate system, establish a transformation matrix equation based on the coordinates of matching points in image sequence one and image sequence two, and solve the transformation matrix equation to obtain the transformation matrix;

[0068] Preferably, the image sequence matching point coordinates specifically comprises four sets of matching point coordinates, namely (x... i ,y i (i = 1, 2, 3, 4), the image sequence two matching point coordinates specifically consists of four sets of matching point coordinates, namely (x′) i ,y′ i (i = 1, 2, 3, 4);

[0069] The transformation matrix equation is expressed as follows:

[0070]

[0071] Among them, H 3×3 It is a 3×3 transformation matrix; x i Let x and y be the x-axis coordinates of the i-th matching point in the image sequence. i x′ is the y-coordinate of the i-th matching point in the image sequence. i Let x' be the x-axis coordinate of the i-th matching point in image sequence two, and y' be the y' of the matching point. i Let x be the x-axis coordinate of the i-th matching point in the second image sequence, i = 1, 2, 3, 4.

[0072] The transformation matrix expression is:

[0073]

[0074] Among them, H 3×3Let h11 be the unknown in the first row and first column of the transformation matrix, h12 be the unknown in the first row and second column of the transformation matrix, h13 be the unknown in the first row and third column of the transformation matrix, h21 be the unknown in the second row and first column of the transformation matrix, h22 be the unknown in the second row and second column of the transformation matrix, h23 be the unknown in the second row and third column of the transformation matrix, h31 be the unknown in the third row and first column of the transformation matrix, and h32 be the unknown in the third row and second column of the transformation matrix.

[0075] Create image sequence three with the same dimensions as image sequence one;

[0076] Obtain the pixel coordinates (a) in image sequence three i ,b i ), the pixel coordinates (a) in image sequence three i ,b i Based on the transformation matrix, the coordinates of the updated pixel points (a′) in image sequence three are obtained by transforming the coordinates into the coordinate system of image sequence two. i ,b′ i ); Update the pixel coordinates (a′) of the image sequence three times. i ,b′ i The image sequence is processed to obtain the updated pixel points.

[0077] Obtain the grayscale value of the second pixel in the image sequence, and obtain the grayscale value of the updated pixel in the third image sequence based on the processed pixel and the grayscale value of the second pixel in the image sequence;

[0078] Preferably, the step of updating the pixel coordinates (a′) of the image sequence three times... i , b′ i After the judgment and processing, the specific updates to the grayscale values ​​of the pixels in image sequence three include:

[0079] Obtain the grayscale value of the second pixel in the image sequence, determine whether the coordinates of the updated pixel in the third image sequence are integers, and if they are integers, assign the obtained grayscale value of the second pixel in the image sequence to the updated pixel to obtain the grayscale value of the updated pixel in the third image sequence.

[0080] If the value is not an integer, then the gray values ​​of the pixels in the second image sequence are combined with the gray values ​​of the pixels in the third image sequence, and the gray values ​​of the updated pixels in the third image sequence are calculated using bilinear interpolation to obtain the gray values ​​of the updated pixels in the third interpolated image sequence.

[0081] The expression for updating the grayscale value of the pixel in the interpolated image sequence is:

[0082] g(a′ i , b′ i )=(1-a′ i +[a′ i])(1-b′ i +[b′ i ])g([a′ i ],[b′ i ])+(1-a′ i +[a′ i ])(b′ i -[b′ i ])g([a′ i ],[b′ i ]+1)+(a′ i -[a′ i ])(1-b′ i +[b′ i ])g([a′ i ]+1,[b′ i ])+(a′ i -[a′ i ])(b′ i -[a′ i ])g([a′ i ]+1,[b′ i +1)

[0083] Among them, g(a′) i , b′ i To update the grayscale value of a pixel, a′ i Update the x-axis coordinates of pixels in image sequence three, b′ i Update the y-axis coordinates of pixels in image sequence three.

[0084] Obtain the grayscale value of a pixel in image sequence one, and map the grayscale value of the pixel in image sequence one to the grayscale value of the updated pixel in image sequence three to obtain a combination of multiple mapped pixel grayscale values.

[0085] Calculate the gray value difference of each mapped pixel gray value combination, obtain the square of the gray value difference of each mapped pixel gray value combination, and represent the square of the gray value difference of each mapped pixel gray value combination as the pixel difference value; thus obtaining multiple pixel difference values.

[0086] A preset difference threshold is set, and the difference values ​​of the multiple pixels are compared with the preset difference threshold in turn to detect whether there are any pixel difference values ​​that exceed the preset difference threshold. If so, the pixel difference value that exceeds the preset difference threshold is found and defined as the occluded pixel difference. The pixel gray value combination corresponding to the occluded pixel difference is found, and the corresponding image sequence one pixel and image sequence three updated pixel are further obtained. The corresponding image sequence three updated pixel is marked as an occluded pixel.

[0087] The continuity of grayscale values ​​is checked on the occluded pixels to obtain the final occluded pixels and the judgment result of the pre-detection image.

[0088] The continuity test of grayscale values ​​specifically includes:

[0089] Based on the occluded pixel, calculate multiple grayscale differences between the pixel in image sequence one corresponding to the occluded pixel and its surrounding pixels; calculate multiple grayscale differences between the pixel in image sequence three corresponding to the occluded pixel and its surrounding pixels.

[0090] If multiple grayscale difference values ​​1 and multiple grayscale difference values ​​2 both exceed the preset grayscale difference threshold, the pixel corresponding to the larger grayscale difference value among the multiple grayscale difference values ​​1 and multiple grayscale difference values ​​2 is determined as the occluded pixel, thus obtaining the final occluded pixel in image sequence 1 and image sequence 3.

[0091] The statistics module was used to count the number of pixels that were ultimately occluded in image sequence one and image sequence three, respectively.

[0092] A preset threshold for the number of occluded pixels is set. If the number of occluded pixels in image sequence one or image sequence three exceeds the preset threshold, the pre-detection image is determined to be occluded.

[0093] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A lens occlusion joint detection system for a binocular camera, characterized in that, include: The system includes an image acquisition module, a transformation matrix solving module, an image mapping module, a pixel difference calculation module, a consistency check module, a statistics module, and an occlusion judgment module. The image acquisition module is used to acquire image sequence one and image sequence two from two perspectives of the pre-detection image, and to create image sequence three with the same size as image sequence one; The transformation matrix solving module is used to establish the transformation matrix between image sequence one and image sequence two; the pixel coordinates in image sequence three are transformed to the coordinate system of image sequence two based on the transformation matrix, and the pixel points of image sequence three are updated. The image mapping module is used to map the gray value of a pixel in an image sequence to the gray value of a three-pixel in an image sequence one by one, so as to obtain a combination of multiple mapped pixel gray values. The image pixel difference calculation module is used to calculate the pixel difference value of the combination of gray values ​​of multiple mapped pixels to obtain multiple pixel difference values; the multiple pixel difference values ​​are compared with a preset difference threshold in turn to obtain the occluded pixels; The consistency verification module is used to perform a continuity verification of the grayscale values ​​of the occluded pixels to obtain the final occluded pixels. The statistics module is used to count the number of pixels that are ultimately occluded in image sequence one and image sequence three, respectively. The occlusion judgment module is used to determine whether the number of occluded pixels in image sequence one or image sequence three exceeds a preset occlusion pixel number threshold, and to obtain the judgment result of the pre-detection image; The continuity test of grayscale values ​​specifically includes: Based on the occluded pixel, calculate multiple grayscale differences between the pixel in image sequence one corresponding to the occluded pixel and its surrounding pixels; calculate multiple grayscale differences between the pixel in image sequence three corresponding to the occluded pixel and its surrounding pixels. If multiple grayscale difference values ​​1 and multiple grayscale difference values ​​2 both exceed the preset grayscale difference threshold, the pixel corresponding to the larger grayscale difference value among the multiple grayscale difference values ​​1 and multiple grayscale difference values ​​2 is determined as the occluded pixel, thus obtaining the final occluded pixel in image sequence 1 and image sequence 3. Count the number of pixels that are ultimately occluded in image sequence one and image sequence three; A preset threshold for the number of occluded pixels is set. If the number of occluded pixels in image sequence one or image sequence three exceeds the preset threshold, the pre-detection image is determined to be occluded.

2. A method for joint detection of lens occlusion in a binocular camera, characterized in that, include: Select camera one and camera two, use camera one and camera two to process the pre-detection image to generate image sequence one and image sequence two, and obtain matching point pairs of image sequence one and image sequence two; Establish a two-dimensional coordinate system for the matching point pair, and establish a transformation matrix based on the two-dimensional coordinate system; Create image sequence three with the same dimensions as image sequence one; Obtain the pixel coordinates in image sequence three, and transform the pixel coordinates in image sequence three into the coordinate system of image sequence two based on the transformation matrix to obtain the updated pixel coordinates of image sequence three; The coordinates of the updated pixels in the image sequence are judged and processed to obtain the updated pixels of the image sequence after processing. Obtain the grayscale value of the second pixel in the image sequence, and obtain the grayscale value of the updated pixel in the third image sequence based on the processed pixel and the grayscale value of the second pixel in the image sequence; Obtain the grayscale value of a pixel in image sequence one, and map the grayscale value of the pixel in image sequence one to the grayscale value of the updated pixel in image sequence three to obtain a combination of multiple mapped pixel grayscale values. Multiple pixel difference values ​​are obtained based on the combination of the gray values ​​of the multiple mapped pixels; A preset difference threshold is set, and the difference values ​​of the multiple pixels are compared with the preset difference threshold in turn to detect whether there are any pixel difference values ​​that exceed the preset difference threshold. If so, the pixel difference value that exceeds the preset difference threshold is found and defined as the occluded pixel difference. The pixel gray value combination corresponding to the occluded pixel difference is found, and the corresponding image sequence one pixel and image sequence three updated pixel are further obtained. The corresponding image sequence one pixel and image sequence three updated pixel are both marked as occluded pixels. The continuity of grayscale values ​​is checked for the occluded pixels to obtain the final occluded pixels and the judgment result of the pre-detection image is obtained. The continuity test of grayscale values ​​specifically includes: Based on the occluded pixel, calculate multiple grayscale differences between the pixel in image sequence one corresponding to the occluded pixel and its surrounding pixels; calculate multiple grayscale differences between the pixel in image sequence three corresponding to the occluded pixel and its surrounding pixels. If multiple grayscale difference values ​​1 and multiple grayscale difference values ​​2 both exceed the preset grayscale difference threshold, the pixel corresponding to the larger grayscale difference value among the multiple grayscale difference values ​​1 and multiple grayscale difference values ​​2 is determined as the occluded pixel, thus obtaining the final occluded pixel in image sequence 1 and image sequence 3. Count the number of pixels that are ultimately occluded in image sequence one and image sequence three; A preset threshold for the number of occluded pixels is set. If the number of occluded pixels in image sequence one or image sequence three exceeds the preset threshold, the pre-detection image is determined to be occluded.

3. The detection method according to claim 2, characterized in that, Establishing the transformation matrix specifically includes: A two-dimensional coordinate system for matching point pairs is established. Based on the two-dimensional coordinate system, the coordinates of matching points in image sequence one and image sequence two are obtained. A transformation matrix equation is established based on the coordinates of matching points in image sequence one and image sequence two. The transformation matrix is ​​obtained by solving the transformation matrix equation.

4. The detection method according to claim 3, characterized in that, The transformation matrix equation is expressed as follows: ; in, It is a 3×3 transformation matrix; For image sequence one i Group matching points x Axis coordinates For image sequence one i Group matching points y Axis coordinates; For image sequence two i Group matching points x Axis coordinates For image sequence two i Group matching points x Axis coordinates i =1,2,3,4.

5. The detection method according to claim 2, characterized in that, Obtaining matching point pairs between image sequence one and image sequence two specifically includes: The intrinsic parameters of camera one and camera two are calibrated to obtain calibrated camera one and calibrated camera two; Image sequence one is obtained by capturing a pre-detection image using calibration camera one, and image sequence two is obtained by capturing a pre-detection image using calibration camera two. Feature point one of image sequence one and feature point two of image sequence two are extracted respectively. Feature point one and feature point two are matched to obtain matching point pairs of image sequence one and image sequence two.

6. The detection method according to claim 5, characterized in that, Feature point one and feature point two are extracted using feature descriptors; the feature descriptors include the SIFT feature point extraction algorithm and the SURF feature point extraction algorithm.

7. The detection method according to claim 2, characterized in that, The specific steps for updating the grayscale values ​​of pixels in image sequence three include: Obtain the grayscale value of the second pixel in the image sequence, determine whether the coordinates of the updated pixel in the third image sequence are integers, and if they are integers, assign the obtained grayscale value of the second pixel in the image sequence to the updated pixel to obtain the grayscale value of the updated pixel in the third image sequence. If the value is not an integer, then the gray values ​​of the pixels in the second image sequence are combined with the gray values ​​of the pixels in the third image sequence, and the gray values ​​of the updated pixels in the third image sequence are calculated using bilinear interpolation to obtain the gray values ​​of the updated pixels in the third interpolated image sequence.

8. The detection method according to claim 7, characterized in that, The expression for updating the grayscale value of the pixel in the interpolated image sequence is: in, To update the grayscale value of a pixel, Update the x-axis coordinates of pixels in image sequence 3 Update the y-axis coordinates of pixels in image sequence three.

Citation Information

Patent Citations

  • Monitoring video occlusion detection method and system

    CN111723644A

  • Video-based camera lens shielding detection method and system

    CN112927262A