A visible video camera screening method based on scene space bidirectional detection

By adopting a two-way detection method in the scenery space, using binary feature codes and bit operations, the visible video cameras are quickly screened out, solving the problem of inefficient fusion between video and three-dimensional in the prior art, and achieving efficient fusion between video and three-dimensional.

CN114598862BActive Publication Date: 2025-04-22NANJING NORMAL UNIVERSITY +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210029762.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-12
Publication Date
2025-04-22
Estimated Expiration
2042-01-12

AI Technical Summary

Technical Problem

The prior art is difficult to quickly and accurately screen out visible video cameras in video and three-dimensional fusion scenarios, resulting in inefficient fusion.

Method used

A two-way detection method based on scenery space is adopted, through forward detection and reverse detection, and binary feature codes and bit operations are used to quickly filter out visible video cameras.

Benefits of technology

It realizes the rapid and precise screening of visible video cameras in the scenery space, improving the efficiency of video and three-dimensional integration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114598862B_ABST
    Figure CN114598862B_ABST
Patent Text Reader

Abstract

This invention discloses a visible video camera selection method based on bidirectional detection in scene space. It performs bidirectional detection on both the video camera and the main camera in scene space, including forward detection and reverse detection. The forward detection process is as follows: obtain the plane equations of the six faces of the main camera's view frustum; construct a discriminant based on the plane equations and calculate the six-bit binary feature codes of all vertices of the video camera's view frustum; perform a bitwise "&" operation on the feature codes of all vertices to obtain the detection code; if the detection code is not equal to 0, the video camera is invisible and the process exits; otherwise, continue with the reverse detection process, which is the same as the forward detection process. This invention achieves high efficiency in selection by utilizing binary feature codes and bitwise operations within scene space, and achieves high accuracy by utilizing bidirectional detection, thus improving the efficiency of video-to-3D fusion in video-enhanced scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of spatial information, and in particular relates to a visible video camera screening method based on scene space bidirectional detection. Background Art

[0002] In the 3D scene of video enhancement, the video needs to be decoded frame by frame and loaded into the GPU for fusion. The number of videos involved in the fusion has a great impact on the fusion efficiency. One case is to let all video cameras participate in the fusion calculation. This method is suitable for scenes with a small number of video cameras. Another case is to group the video cameras. Since each group has fewer video cameras involved, the fusion efficiency can be improved. However, the grouping needs to be manually specified in advance, and the grouping results may not be completely consistent with the actual situation, which limits the application of this method. Therefore, efficient screening of visible video cameras is an effective means to improve fusion efficiency.

[0003] Among the methods for screening visible cameras, the method based on line of sight can only make judgments in one direction (line of sight direction), the method based on line of sight angle can only be used to eliminate cameras with poor fusion effects, and the method based on the view cone bounding box is too simple and rough, which may cause invisible video cameras to be incorrectly screened. Patent ZL201711057783.7 proposes a method for screening visible cameras by calculating the visible pixel ratio of the video camera's view cone. Although this method is relatively accurate, it involves a rasterization process and has a large amount of calculation. Therefore, a fast and accurate method for screening visible video cameras is the key to improving video and three-dimensional fusion performance. Summary of the invention

[0004] Purpose of the invention: In view of the deficiencies of the above-mentioned prior art, the present invention proposes a visible video camera screening method based on scene space bidirectional detection, which can automatically screen each video camera according to the field of view under the user's current viewpoint, and screen out visible video cameras with speed and accuracy.

[0005] Technical solution: The present invention proposes a visible video camera screening method based on scene space bidirectional detection, which performs bidirectional detection on the video camera and the main camera in the scene space, including forward detection and reverse detection;

[0006] The forward detection implementation process is as follows:

[0007] A1: Get the plane equations of the six faces of the main camera's frustum;

[0008] A2: Construct a discriminant based on the plane equation and calculate the six-bit binary feature code of all vertices of the video camera's viewing cone;

[0009] A3: Perform a bitwise “&” operation on the feature codes of all vertices of the video camera’s viewing cone to obtain the detection code CP1;

[0010] A4: If CP1 is not equal to 0, the video camera is not visible and exit; otherwise, continue to perform reverse detection;

[0011] The reverse detection implementation process is as follows:

[0012] B1: Get the plane equations of the six faces of the video camera's viewing cone;

[0013] B2: Construct a discriminant based on the plane equation and calculate the six-bit binary feature code of all vertices of the main camera's viewing cone;

[0014] B3: Perform a bitwise “&” operation on the feature codes of all vertices of the main camera’s viewing cone to obtain the detection code CP2;

[0015] B4: If CP2 is not equal to 0, the video camera is invisible, otherwise the video camera is visible and retained, and the screening is completed.

[0016] Furthermore, the plane equation of each face of the viewing cone is ax+by+cz+d=0, and its normal (a, b, c) points to the outside of the viewing cone.

[0017] Furthermore, the six-bit binary feature code of the vertex is P5P4P3P2P1P0, which corresponds one-to-one to the six faces of the viewing cone. The calculation method of the i-th bit (0<=i<=5) Pi is: let the plane equation corresponding to this bit be ax+by+cz+d=0, construct the discriminant f=ax+by+cz+d, substitute the coordinates of the vertex to be detected into f, if f>0, then Pi=1, otherwise Pi=0.

[0018] Furthermore, the bitwise “&” operation described in the forward detection is a serial operation on the six-bit binary feature codes of the eight vertices. In the forward detection, as long as the result of a certain bitwise “&” operation is 0, it is possible to directly jump to the reverse detection; in the reverse detection, as long as the result of a certain bitwise “&” operation is 0, it is possible to directly determine that the video camera is visible and terminate the screening in advance.

[0019] Beneficial effects: Compared with the prior art, the present invention has the following beneficial effects: the present invention utilizes binary feature codes and bit operations in scene space to achieve efficient screening, utilizes bidirectional detection to achieve accurate screening, and improves the efficiency of video and three-dimensional fusion in video enhancement scenes. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a flow chart of the present invention;

[0021] Figure 2 This is the classification result diagram after frustum screening. DETAILED DESCRIPTION

[0022] The present invention will be further described in detail below in conjunction with the accompanying drawings.

[0023] The present invention provides a visible video camera screening method based on scene space bidirectional detection, the flow chart is shown in Figure 1, and bidirectional detection is performed on the video camera and the main camera, including forward detection and reverse detection, as follows:

[0024] (1) The forward detection process for the video camera and the main camera is as follows:

[0025] (1.1) Obtain the plane equations of the six faces of the main camera's viewing cone: Assume that the plane equation of each face of the viewing cone is ax+by+cz+d=0, and require that its normal (a, b, c) points outside the viewing cone.

[0026] (1.2) Calculate the six-bit binary feature codes of all vertices of the video camera based on the plane equation.

[0027] The method for calculating the six-bit binary feature code of all vertices Vi (0<=i<=7) according to the plane equation is as follows: suppose the six-bit binary feature code is P5P4P3P2P1P0, which corresponds one-to-one to the six faces of the viewing cone. The plane equation corresponding to the j-th bit Pj (0<=j<=5) is ax+by+cz+d=0. Construct the discriminant f=ax+by+cz+d, substitute the coordinates of the vertex to be detected into the discriminant f, if f>0, then Pj=1, otherwise Pj=0.

[0028] definition:

[0029] CLIP_RIGHT=1<<0, CLIP_TOP=1<<1,

[0030] CLIP_FAR=1<<2, CLIP_LEFT=1<<3,

[0031] CLIP_BOTTOM=1<<4,CLIP_NEAR=1<<5

[0032] The calculation method of the feature code ClipFlag[i] of vertex Vi is as follows:

[0033] ClipFlag[i]=((a0*Vi.x+b0*Vi.y+c0*Vi.z+d0>0)?CLIP_RIGHT:0)

[0034] |((a1*Vi.x+b1*Vi.y+c1*Vi.z+d1>0)?CLIP_TOP:0)

[0035] |((a2*Vi.x+b2*Vi.y+c2*Vi.z+d2>0)?CLIP_FAR:0)

[0036] |((a3*Vi.x+b3*Vi.y+c3*Vi.z+d3>0)?CLIP_LEFT:0)

[0037] |((a4*Vi.x+b4*Vi.y+c4*Vi.z+d4>0)?CLIP_BOTTOM:0)

[0038] |((a5*Vi.x+b5*Vi.y+c5*Vi.z+d5>0)?CLIP_NEAR:0)

[0039] (1.3) Perform a bitwise “&” operation on the feature codes of all vertices of the video camera’s viewing cone to obtain the detection code CP1.

[0040] CP1=ClipFlag[0]&ClipFlag[1]&ClipFlag[2]&ClipFlag[3]&ClipFlag[4]&ClipFlag[5]&ClipFlag[6]&ClipFlag[7];

[0041] (1.4) If CP1 is not equal to 0, the video camera is not visible and exit; otherwise, continue with reverse detection.

[0042] (2) Perform reverse detection on the video camera and the main camera. The reverse detection step is performed in the same way as the forward detection. The process is as follows:

[0043] (2.1) Obtain the plane equations of the six faces of the video camera's viewing cone.

[0044] (2.2) According to the method in (1.2), the six-bit binary feature codes of all vertices of the main camera's viewing cone are calculated respectively.

[0045] (2.3) Perform a bitwise “&” operation on the feature codes of all vertices of the main camera’s viewing cone to obtain the detection code CP2;

[0046] (2.4) If CP2 is not equal to 0, the video camera is not visible, otherwise the video camera is visible and retained, completing the screening, such as Figure 2 shown.

[0047] The bitwise "&" operation is performed on all vertex feature codes. The bitwise "&" operation is a serial operation on the six-bit binary feature codes of the eight vertices. In the forward detection, as long as the result of a bitwise "&" operation is 0, it can jump directly to 1.2 reverse detection; in the reverse detection, as long as the result of a bitwise "&" operation is 0, it can be directly determined that the video camera is visible and the screening is terminated in advance.

Claims

1. A visible video camera screening method based on scene space bidirectional detection, characterized in that: Perform bidirectional detection on the video camera and the main camera in the scene space, including forward detection and reverse detection; The forward detection implementation process is as follows: A1: Get the plane equations of the six faces of the main camera's frustum; A2: Construct a discriminant based on the plane equation and calculate the six-bit binary feature code of all vertices of the video camera's viewing cone; A3: Perform a bitwise "&" operation on the feature codes of all vertices of the video camera's viewing cone to obtain the detection code CP1; The method for calculating the six-bit binary feature code of all vertices Vi according to the plane equation is as follows: let the six-bit binary feature code be P5P4P3P2P1P0, corresponding to the six faces of the cone one by one, the plane equation corresponding to the j-th bit Pj is ax+by+cz+d=0, construct the discriminant f=ax+by+cz+d, substitute the coordinates of the vertex to be detected into the discriminant f, if f>0, then Pj=1, otherwise Pj=0; where 0<=i<=7, 0<=j<=5; definition: CLIP_RIGHT=1<<0, CLIP_TOP=1<<1, CLIP_FAR=1<<2, CLIP_LEFT=1<<3, CLIP_BOTTOM=1<<4, CLIP_NEAR=1<<5; The calculation method of the feature code ClipFlag[i] of vertex Vi is as follows: ClipFlag[i]=((a0*Vi.x+b0*Vi.y+c0*Vi.z+d0>0)?CLIP_RIGHT:0) |((a1*Vi.x+b1*Vi.y+c1*Vi.z+d1>0)?CLIP_TOP:0) |((a2*Vi.x+b2*Vi.y+c2*Vi.z+d2>0)?CLIP_FAR:0) |((a3*Vi.x+b3*Vi.y+c3*Vi.z+d3>0)?CLIP_LEFT:0) |((a4*Vi.x+b4*Vi.y+c4*Vi.z+d4>0)?CLIP_BOTTOM:0) |((a5*Vi.x+b5*Vi.y+c5*Vi.z+d5>0)?CLIP_NEAR:0); A4: If CP1 is not equal to 0, the video camera is not visible and exit; otherwise, continue to perform reverse detection; The reverse detection implementation process is as follows: B1: Get the plane equations of the six faces of the video camera's viewing cone; B2: Construct a discriminant based on the plane equation and calculate the six-bit binary feature code of all vertices of the main camera's viewing cone; B3: Perform a bitwise "&" operation on the feature codes of all vertices of the main camera's viewing cone to obtain the detection code CP2; B4: If CP2 is not equal to 0, the video camera is not visible, otherwise the video camera is visible and retained, and the screening is completed; The bit "&" operation in the forward detection is a serial operation on the six-bit binary feature codes of the eight vertices. In the forward detection, as long as the result of a certain bit "&" operation is 0, it can directly jump to the reverse detection; in the reverse detection, as long as the result of a certain bit "&" operation is 0, it can be directly determined that the video camera is visible and the screening is terminated in advance.

2. The visible video camera screening method based on scene space bidirectional detection according to claim 1, characterized in that: The plane equation of each face of the viewing cone is ax+by+cz+d=0, and its normal (a, b, c) points to the outside of the viewing cone.

Citation Information

Patent Citations

  • Optimization method for video enhancement scene

    CN107888897A

  • Virtual and actual reality integration method of multiple video streams and three-dimensional scene

    CN104599243A

  • Method, apparatus and device for detecting size of package based on three-dimensional camera

    CN109029250A