An automatic detection method and device for perspective system penetration and coplanarity defects
The test eye point instruction sequence is generated through automatic detection methods, and the test images of the visual system are automatically generated and analyzed, identifying and recording the mold-through and coplanar areas, solving the problem of inefficient manual detection and achieving efficient and accurate visual system defect detection.
Patent Information
- Application Number
- CN202510657607.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2045-05-21
AI Technical Summary
In the existing visual system, the detection of mold-through and coplanar defects relies on manual methods, resulting in huge workload and inefficiency, easy to miss or misjudgment, and difficult to reproduce and correct problems.
The automatic detection method is used to generate a test eye point instruction sequence, automatically generate a test screen and record a video file, and identify the scene through inter-frame differential and binary processing to automatically record the eye point information of the problem area.
It realizes comprehensive and multi-dimensional coverage of visual scenes, reduces the risk of human misjudgment and omissions, improves the comprehensiveness and accuracy of detection, and reduces the time cost of problem positioning and correction.
Smart Images

Figure CN120179566B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of visual scene detection, and particularly relates to an automatic detection method and device for the problems of model penetration and coplanarity defects in a visual scene system. Background Art
[0002] A flight simulator is used to simulate a real aircraft, and a visual scene system is a key component of the flight simulator. Through computer simulation, it realistically simulates the natural and cultural landscapes outside the cockpit, thereby improving the authenticity of flight training. With the continuous improvement of the modeling complexity of visual scene software, problems of model penetration or coplanarity conflicts between objects will inevitably occur during the modeling process of complex scene elements. These problems will cause abnormal flickering phenomena at the penetration or coplanarity positions from a specific perspective (the scene switches between the penetrated or coplanar models back and forth, resulting in high-frequency flickering in vision). These phenomena not only affect the visual effect but may also mislead the pilot's judgment, thereby reducing the quality and effectiveness of training. Since the scene simulation range of the simulator is very large, it is extremely laborious and inefficient to check for model penetration and coplanarity phenomena through manual methods, and it is very easy to miss problems. In existing visual scene systems, checking for model penetration and coplanarity conflicts mainly relies on manual roaming of the scene. Specifically, the tester manually adjusts the viewing angle and controls the observation of the scene at different eye point positions to observe the model penetration or coplanarity between objects from multiple perspectives. This method relies on the tester's experience and intuition to identify possible abnormal phenomena in the visual scene; after discovering a problem, the tester needs to manually record the specific position information where the model penetration and coplanarity occur for subsequent processing and correction. Although this method can find problems to a certain extent, in complex and large-scale scenes, the manual operation is extremely laborious and inefficient. Moreover, since many coplanarity phenomena can only be seen from specific perspectives, and it is almost impossible to achieve traversal inspection of the scene through manual roaming, many coplanarity and model penetration problems are often missed. Therefore, the manual inspection workload is huge, and due to the limitation of the viewing angle, it is easy to miss or misjudge, affecting the comprehensiveness of detection; after discovering a problem, it is very difficult to manually record the problem viewing angle and generate a problem report; software engineers need to reproduce the problem one by one in the scene according to the problem viewing angle recorded by the tester in order to confirm and modify the problem, and the problem reproduction and troubleshooting are difficult. Summary of the Invention
[0003] In order to overcome the problems existing in the prior art, the present invention provides an automatic detection method and device for the problems of model penetration and coplanarity defects in a visual scene system to overcome the current existing defects.
[0004] An automatic detection method for the problems of model penetration and coplanarity defects in a visual scene system, the method comprising the steps of:
[0005] S1. Generating an automatic test eye point instruction sequence;
[0006] S2. Send the test eye point instruction sequence to the visual system software in sequence. Driven by the test eye point instructions, the visual system automatically generates a test image at the corresponding eye point, saves the test image, and obtains a video file.
[0007] S3. Analyze and screen the video file to obtain the scene penetration and coplanar regions.
[0008] S4. Save the eye point information corresponding to the scene penetration and coplanar regions.
[0009] In the aspects and any possible implementation manners as described above, a further implementation manner is provided. The eye point instruction sequence includes eye point position parameters, and each eye point position parameter includes longitude, latitude, heading angle, altitude, pitch angle, and roll angle parameters.
[0010] In the aspects and any possible implementation manners as described above, a further implementation manner is provided. The S1 includes:
[0011] S11. Set the eye point parameter range and the content of the eye point instruction.
[0012] S12. Generate random eye point position parameters within the eye point parameter range.
[0013] S13. Detect the flickering phenomenon caused by coplanarity and penetration. If no flickering phenomenon is found, randomly select a direction and move forward along this direction at a certain step length to detect the change of the viewing angle.
[0014] S14. If flickering is found, keep the current direction and continue to move forward at the set step length to observe the change of the flickering area.
[0015] S15. If the flickering area becomes larger, repeat S14 until the size of the flickering area exceeds the set threshold to confirm the flickering caused by coplanarity and penetration.
[0016] S16. If the flickering area decreases or disappears, repeat step S13, randomly select a new direction and continue to check.
[0017] S17. In the same scene, repeat S13 to S16 until the specified number of iterations is reached, and end the check.
[0018] In the aspects and any possible implementation manners as described above, a further implementation manner is provided. The S2 includes:
[0019] S21. When receiving the test eye point instruction, record the test image generated by the visual system at the corresponding eye point and keep it still for a certain period of time.
[0020] S22. After the end of the stationary time, start recording and begin to capture and record the test images generated by the vision system;
[0021] S23. The recording lasts for a preset time to obtain the required video clip;
[0022] S24. After the preset recording time, stop the recording and generate an end-of-recording flag, and automatically save the video file of this recording.
[0023] For the aspects and any possible implementation manners as described above, a further implementation manner is provided, and the S3 includes:
[0024] S31. Extract each frame from the video file to obtain each frame of color image;
[0025] S32. Convert each frame of color image into a grayscale image;
[0026] S33. Perform inter-frame difference on three consecutive frames of the grayscale images, calculate the pixel differences between adjacent frames, so as to obtain a first difference image and a second difference image;
[0027] S34. Perform a combined calculation on the first difference image and the second difference image to obtain a combined difference image;
[0028] S35. After performing difference accumulation, normalization processing, binarization processing and superposition on the combined difference image, obtain the scene penetration and coplanar regions.
[0029] For the aspects and any possible implementation manners as described above, a further implementation manner is provided, and the difference accumulation specifically includes: performing an accumulation process on the combined difference image to obtain an accumulated difference image; performing a maximization calculation on all pixel values of the accumulated difference image to obtain the maximum pixel value of the accumulated difference image.
[0030] For the aspects and any possible implementation manners as described above, a further implementation manner is provided, and the normalization processing includes: performing normalization processing on all pixels of the accumulated difference image to map all pixel values to the range of [0, 1].
[0031] For the aspects and any possible implementation manners as described above, a further implementation manner is provided, and the binarization processing includes: comparing the pixel value of a certain point of the normalized accumulated difference image with a set threshold value. When the pixel value of a certain point of the accumulated difference image is greater than or equal to the set threshold value, the region where the point is located is used as a significantly changed region and the value of the point is set to 1; when the pixel value of a certain point of the accumulated difference image is less than the set threshold value, the region where the point is located is used as an unchanged region and the value of the point is set to 0.
[0032] The present invention also provides an automatic detection device for visual scene penetration and coplanarity defects. The device is used to implement the above method and includes the following modules:
[0033] A generation module, configured to generate an automatic test eye point instruction sequence;
[0034] A recording module, configured to sequentially send the test eye point instruction sequence to the visual scene system software. Under the drive of the test eye point instruction, the visual scene system automatically generates a test image at the corresponding eye point, saves the test image, and obtains a video file;
[0035] A screening module, configured to automatically analyze and screen the video file to obtain the scene penetration and coplanarity regions;
[0036] A saving module, configured to save the eye point information corresponding to the scene penetration and coplanarity regions.
[0037] Advantages of the present invention
[0038] The automatic detection method for visual scene penetration and coplanarity defects of the present invention includes the steps of: generating an automatic test eye point instruction sequence; sequentially sending the test eye point instruction sequence to the visual scene system software. Under the drive of the test eye point instruction, the visual scene system automatically generates a test image at the corresponding eye point, saves the test image, and obtains a video file; automatically analyzing and screening the video file to obtain the scene penetration and coplanarity regions; saving the eye point information corresponding to the scene penetration and coplanarity regions. The method of the present invention can identify visual scene model penetration and coplanarity conflicts in real time and efficiently, and guide software R & D personnel to modify problems, thereby improving the realism and reliability of the visual simulation software. The present invention has the following beneficial effects: 1). By automatically generating test eye point instructions for perspective sampling, it can ensure comprehensive and multi-dimensional (including longitude and latitude, pitch angle, heading angle, etc.) coverage sampling of the scene, effectively eliminating problem omissions caused by limited perspective in manual inspection, and improving the comprehensiveness and accuracy of detection.
[0039] 2). The present invention adopts automatic recording and image change analysis technology, completely getting rid of manual experience judgment, and significantly reducing the risk of human misjudgment and omission.
[0040] 3). Automatically record the eye point parameters of the problem area and generate a detailed problem report, which greatly accelerates the process of problem discovery, location and handling. This greatly reduces the operation difficulty and time cost for software engineers to reproduce problems, and testers no longer need to manually record and explain problem perspectives, reducing communication barriers and operation errors, and improving the efficiency of problem troubleshooting and correction.
[0041] 4). Based on automated inter-frame difference analysis and threshold screening, the present invention can accurately extract the significant change regions in the scene caused by penetration or coplanarity. By combining the cumulative difference image and binary image processing, the stability and reliability of anomaly detection are enhanced, providing an accurate basis for scene optimization. Description of the Drawings
[0042] Figure 1 is the flowchart of the method of the present invention;
[0043] Figure 2 is the flowchart of automatically analyzing and screening the penetration and coplanarity regions of the scene of the present invention;
[0044] Figure 3 is the binary image of the cumulative difference result of the present invention;
[0045] Figure 4 is the first frame image of the video;
[0046] Figure 5 is the result image after superimposing processing on the first frame image. Detailed Embodiments
[0047] To better understand the technical solution of the present invention, the content of the present invention includes but is not limited to the following detailed embodiments, and similar technologies and methods should be regarded as within the scope of protection of the present invention. To make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will be described in detail with reference to the drawings and specific embodiments.
[0048] It should be clear that the embodiments described in the present invention are only a part of the embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without creative work belong to the scope of protection of the present invention.
[0049] As Figure 1 shown, an automatic detection method for penetration and coplanarity defects of a visual system provided by the present invention, the method includes the steps:
[0050] S1. Generate an automatic test eye point instruction sequence;
[0051] S2. Send the test eye point instruction sequence to the visual system software in sequence. Under the drive of the test eye point instruction, the visual system automatically generates a test picture at the corresponding eye point, saves the test picture, and obtains a video file;
[0052] S3. Automatically analyze and screen the video file to obtain the penetration and coplanarity regions of the scene;
[0053] S4. Save the eye point information corresponding to the penetration and coplanarity regions of the scene.
[0054] The definitions of the terms used in the present invention are as follows: Model penetration refers to the phenomenon of incorrect spatial intersection or interpenetration of the surfaces of two or more objects in a visual system, that is, the geometric model or texture part of one object passes through another object, resulting in an unreasonable visual effect during the rendering of the visual system. Model penetration occurs in a dynamic scene. When the position, perspective, or calculation error during the animation process of the geometric model of an object causes improper processing of the overlapping relationship of the objects, a visual anomaly of "interpenetration of geometric bodies" appears locally or globally.
[0055] Coplanarity refers to the phenomenon of incorrect consistent overlap of the surfaces of two or more objects in a visual system, that is, the surfaces of multiple objects are in the same spatial layer (or very close layers), resulting in a depth competition problem during the rendering of the visual system. That is, in the depth buffer, it is difficult to determine the front-back relationship of these surfaces, resulting in unstable display effects such as flickering and jittering.
[0056] The eye point is the source position of the camera or perspective in the visual system, that is, the visual center point of the observer or the imaging device. The setting of the eye point determines the display state of the objects under the current perspective.
[0057] Specifically, the specific steps of the present invention are as follows:
[0058] 1. Generate an automatic test eye point instruction sequence
[0059] The eye point instruction sequence includes eye point position parameters for perspective sampling and other signals. The eye point position parameters include six dimensions: longitude, latitude, heading angle, altitude, pitch angle, and roll angle. After setting the ranges of the above eye point position parameters according to specific requirements, an automatic test eye point instruction sequence is generated. Each eye point instruction sequence includes the eye point position parameters as shown in Table 1.
[0060] The settings of the eye point parameter ranges are as follows: Longitude and latitude range: In the present invention, it is set to the maximum and minimum ranges of the current test scene; Pitch angle range: Simulate the normal pitch angle during aircraft flight, set to -30° to 15°; Roll angle: Fixed at 0°, regarded as a perspective test without roll angle; Heading angle: Set to 0° to 360° to cover all-round perspectives; Altitude: Set according to the requirements of the test scene, which is the effective altitude range of the scene.
[0061] The viewing range and viewing angle state of the visual system are set using an eye point instruction sequence, enabling the visual system to generate a visual scene that meets the specified position and viewing angle conditions; the eye point instruction sequence is also used to drive the visual system to generate scene pictures at each position. Each eye point parameter is generated by a random generation method, which can ensure the comprehensiveness of the test range and not miss key positions; the recording signal bAutoRecord in the eye point instruction sequence can start or stop video recording to ensure the accurate storage of scene data corresponding to the eye point viewing angle, providing a test basis for subsequent dynamic analysis.
[0062] Table 1 Eye point parameters included in the eye point instruction
[0063]
[0064] To ensure the diversity and comprehensive coverage of the test eye points, the present invention randomly generates test eye point position parameters:
[0065] Among the eye point position parameters: the longitude L is randomly generated within the range ; the latitude B is randomly generated within the range ; the altitude A is randomly generated within the range ; the heading H is randomly generated within the range ; the pitch angle P is randomly generated within the range ; the roll angle R is randomly generated within the range The formulas for randomly generating the above-mentioned position parameters are as follows:
[0066]
[0067]
[0068]
[0069]
[0070]
[0071] (1), where rand(0, 1) represents generating a random number in the range [0, 1].
[0072] The above-mentioned eye point position parameters are the basis for generating a dynamic viewing angle. By randomizing the viewing angle position and detection direction, they are used to ensure the full-scene coverage of the visual system.
[0073] 2. Recording test scene pictures
[0074] The test eye point instruction sequences generated in step 1 are successively sent to the visual system software. Driven by the test eye point instructions, the visual system will automatically generate test images at the corresponding eye points. The test eye point instruction sequences are simultaneously sent to the screen recording software resident on the computer where the visual system is located. This software can automatically record the screen displaying the test images according to the received instructions and save them as video files. The present invention does not impose requirements on the specifications of the screen recording software.
[0075] The following is the specific recording method:
[0076] a. After receiving a new test eye point instruction, the screen recording software first keeps the screen content static for a certain period of time, such as 5 seconds. This static waiting is to ensure that the visual system has enough time to generate and fully load the test image content at the corresponding eye point, preventing image changes or flickering caused by incomplete loading. During this period, the visual system should have completed all necessary loading and rendering work to prepare for the subsequent recording.
[0077] b. After keeping static for 5 seconds, the screen recording software automatically starts the recording function and begins to capture and record the test images generated by the visual system.
[0078] c. The recording lasts for a preset period of time, such as 10 seconds, to ensure that a long enough video segment is captured to facilitate a comprehensive evaluation of the scene under the test eye point.
[0079] d. After recording for 10 seconds, the screen recording software will automatically stop recording and generate an end-of-recording flag. This flag not only indicates the completion of the current recording session but also serves as a signal to trigger the next recording cycle.
[0080] e. Once the end-of-recording flag is confirmed, the screen recording software will automatically save the video file of this recording.
[0081] f. After successfully saving the video file, it is ready to receive the next test eye point instruction and thus enter the next recording cycle.
[0082] 3. Automatically analyze and screen for scene penetration and coplanar regions
[0083] For each video file generated in step 2 as a test, the following operations are performed. The method flow is as Figure 2 shown. The specific steps are as follows:
[0084] a. Extract the video frames
[0085] A video file consists of a series of consecutive image frames. To meet the requirements of subsequent processing and analysis, frame serialization processing of the video file is needed, that is, frame-by-frame extraction. Each frame is separated from the video file stream and saved as an individual image file to make it in the form of a static image. For the extracted frame-by-frame video images, the video content therein can be analyzed and operated on frame by frame, providing basic support for subsequent processing scene penetration detection or coplanar area screening.
[0086] b. Convert to grayscale image
[0087] After completing frame-by-frame extraction, to reduce the computational complexity and improve the processing speed, the color image is converted to a grayscale image, only retaining the luminance information and removing the RGB color information, thereby simplifying the image data structure, reducing redundant information, and providing a more efficient input basis for subsequent processing.
[0088] Assume that the pixel coordinates of the image are (x, y), where x represents the pixel position of the image on the horizontal axis (lateral), and y represents the pixel position of the image on the vertical axis (longitudinal). Extract the video images of three frames of color images at equal intervals, where the three frames are set as the first n frames, the current frame, and the last n frames, and n is an integer greater than or equal to 1. The converted grayscale images are respectively denoted as the first n frames t - n, the current frame t, and the last n frames t + n. Modifying different values of n is equivalent to sampling the original video file at different intervals, thereby matching different scene flicker frequencies. In the present invention, n = 1 is used for illustration.
[0089] The grayscale conversion formula is as follows:
[0090] The pixel value of the grayscale image of the previous frame is:
[0091] (2)
[0092] The pixel value of the grayscale image of the current frame is:
[0093] (3)
[0094] The pixel value of the grayscale image of the next frame is:
[0095] (4)
[0096] Where: respectively represent the pixel values of the grayscale images of the previous frame, the current frame, and the next frame at the coordinate (x, y).
[0097] , and respectively represent the pixel values of the red components of the original color images of the previous frame, the current frame, and the next frame at the coordinate (x, y).
[0098] , : respectively represent the pixel values of the green components of the previous frame, the current frame, and the next frame of the original color image at the coordinate (x, y).
[0099] , , : respectively represent the pixel values of the blue components of the previous frame, the current frame, and the next frame of the original color image at the coordinate (x, y).
[0100] c. Inter-frame difference calculation
[0101] Perform inter-frame difference on three consecutive frames of grayscale images to calculate the pixel differences between adjacent frames, thereby obtaining two difference images D1 and D2. The specific steps are as follows:
[0102] The difference value between the previous frame and the current frame is: (5)
[0103] The difference value between the current frame and the next frame is: (6)
[0104] Where: represents the pixel value of the three frames of grayscale images at the coordinate (x, y); , represents the difference value at the coordinate (x, y) after two differences, reflecting the change of adjacent frame pixel values.
[0105] d. Merge difference images
[0106] To further remove noise and accurately retain the changed area, perform a bitwise AND operation on each pixel of the two difference images D1 and D2 to obtain a candidate image for the changed area or a merged difference image .
[0107] Merged difference image The calculation formula for the value at the pixel point (x, y) in (7)
[0108] Where: ∧ represents a bitwise AND operation; represents the value at the pixel point (x, y) of the merged difference image.
[0109] e. Difference accumulation and binarization
[0110] In the previous steps, a candidate image for the changed area is obtained through the merged difference image To further highlight the regions with significant changes in the video, it is necessary to accumulate all the merged differential images frame by frame. By traversing and comparing all the merged differential images of all frames and accumulating them frame by frame, a cumulative difference image of all frames is constructed. This cumulative difference image integrates all the information of instantaneous changes in the entire video sequence, thereby being able to prominently display the regions with significant changes during the entire video. The direct manifestations of penetration and coplanarity are the flickering phenomenon. By analyzing the flickering regions, the significant change regions in the visual scene can be effectively identified and highlighted.
[0111] Since directly adding the difference images may cause the pixel values to exceed the standard range (0~1), after generating the cumulative difference image, the present invention performs normalization processing on it. Normalization remaps the pixel values of the cumulative difference image to the range of 0~1 for subsequent processing and analysis.
[0112] Calculating the cumulative difference image The formula for the pixel value at the coordinate (x,y) is as follows:
[0113] (8)
[0114] where: N represents the total number of frames of the video. t is the frame number, representing the discrete points of time in the video, and the range ; S(x,y) is the pixel value of the cumulative difference image at the coordinate (x,y).
[0115] The maximum value of the cumulative difference image is: (9)
[0116] where: represents the maximum pixel value in the cumulative difference image .
[0117] The normalized cumulative difference image is:
[0118] (10)
[0119] where represents the pixel value of the normalized difference image at the coordinate (x,y), and the pixel value is mapped to the range [0,1].
[0120] Binarization processing:
[0121] The value at the coordinate (x,y) of the normalized cumulative difference image is subjected to binarization processing to obtain a binarized image. Specifically, by setting a threshold T, preferably T = 10 in the present invention, is binarized and transformed to obtain the value , so that the binary image has a display change area, and the conversion process is as follows: (11)
[0122] Pixel value When it is greater than or equal to the threshold T, = 1, the area where this 1 value is located is marked as a white area, and this area is regarded as a significant change area, indicating that the pixel point (x, y) belongs to the significant change area; the pixel value When it is less than the threshold T = 0, the area where this 0 value is located is marked as a black area, indicating that the pixel point (x, y) does not belong to the significant change area. Where: T represents the threshold, which is used to distinguish and screen the significant change area, so as to obtain a binary image including a white area and a black area, as Figure 3 shown.
[0123] 4. Detection and confirmation of change area
[0124] In step 3, after analyzing and calculating the video frame difference with a set threshold, a binary image including a significant change area and / or a black area is obtained. The significant change area may have significant dynamic objects or areas, such as flashing points, occluded / occluding objects, etc. In this step, the change area or the black area is further detected and confirmed to obtain the significant change area. If there is flashing in the change area, it indicates the existence of crosstalk and coplanarity. Therefore, the direct manifestation of crosstalk and coplanarity is the flashing phenomenon. By analyzing whether there is a flashing phenomenon in the change area, the significant change area in the visual scene can be effectively identified and highlighted. The specific steps are as follows:
[0125] (1) Detect in the change area. If no flashing phenomenon is found in this change area, it means that no significant change is found in this change area. Then return to the previous step 1, send a test eye point instruction sequence to the visual scene system software, randomly select a direction, and move forward along this direction with a step size of 1 / 1000 of the scene width to detect the change of the viewing angle.
[0126] (2) If a flashing phenomenon is detected in the change area, then this change area is judged as a significant change area. Then return to the previous step 1 to send a test eye point instruction sequence to the visual scene system software, but keep the current direction, and set the continued forward step size to 1 / 1000 of the scene width, and observe the change of the flashing area in the change area.
[0127] (3) If it is found through the observation in step (2) that the flashing area becomes larger, then repeat step (2) until the size of the flashing area exceeds the threshold set when there was a difference in the previous frame. Confirm that there is a flashing problem caused by coplanarity and crosstalk in this change area, and then extract the first frame of the video as the reference background image, as Figure 4As shown, the binary image is used to superimpose on the background image. The white areas in the binary image (representing significant change areas) are overlaid on the reference background image, while the black areas keep the original content of the reference background image unchanged, so as to visually display the changed areas in the video on the reference background image, such as Figure 5 as shown.
[0128] such as Figure 4 The reference background image or the original image as shown is the first frame image of the extracted video, which is generated during the detection process of the vision system of the present invention and is used as a reference background image for detection and analysis. Since this image is the first frame of the video and presents a static picture in the initial state, without any pixel content of dynamic changes (such as flickering, occlusion or penetration phenomenon), it fully reflects the static layout and details of the scene. Since the first frame is stationary or close to the overall relatively stable initial state of the scene, it can visually reflect the environmental basic state from the starting moment of the scene test to the end of the analysis, and be used as a reference for subsequent comparison of video dynamic changes. Taking the first frame, that is, the initial static picture, as the reference background image, that is, the original image, and using the generated binary difference map to perform superimposition processing on it, this superimposition operation can visually present the changed areas on the original image, facilitating quick positioning of the coplanar and penetration positions, so as to effectively troubleshoot problems.
[0129] The picture obtained after the superimposition processing is as Figure 5 shown. The changed areas (white) are highlighted, covering the corresponding pixel points of the original image; and the changed areas or white areas point to the dynamic objects with significant changes, such as flickering points, occluded / occluding objects, penetration or coplanar areas, that is, the scene penetration and coplanar areas obtained by analyzing and screening the test pictures generated by the vision system; the black part retains the original static content of the background, making the result visually display the contrast relationship between the background and the changed areas. Figure 5 The changed areas as shown show the dynamic scenes with significant changes in the video (such as flickering phenomena, blurred or textured changed areas), highlighting the positions and ranges of the target areas, providing data support for detecting penetration and coplanarity, and also directly seeing the distribution of dynamic changes and the severity within the time interval, thus helping to optimize subsequent dynamic analysis and judgment.
[0130] (4) If it is found through the observation in step (2) that the flickering area decreases or disappears, repeat step (1), randomly select a new direction and continue the detection.
[0131] (5) To ensure the comprehensiveness of view angle sampling, in the same scene, repeat the above detection operations until iterated to the set number of times, such as 100,000 times, so as to complete the inspection.
[0132] Each time the eye point position changes, this method randomly generates new eye point position information through step 1 and sends it to the visual scene system. Subsequently, according to steps 2 - 3, the frame difference analysis results are processed to detect whether there are significantly changed areas, and then through step 4, the changed areas are deeply detected and confirmed. Through multiple loop detections, the entire scene can be comprehensively covered, and finally the detection results are output.
[0133] 5. Problem recording and phenomenon reproduction
[0134] For the significantly changed areas that are considered to have penetration and coplanarity phenomena after being detected in step (3) of step 4, save the eye point information including longitude, latitude, pitch angle, roll angle, yaw angle, and height that is considered to be used in the process of the significantly changed areas after being detected in step (3), and record it in a file. When conducting subsequent tests, using these saved eye point information can reproduce the corresponding penetration and coplanarity areas. Software developers can repeat driving the visual scene according to the recorded eye point information to confirm and modify the visual scene.
[0135] As an embodiment disclosed by the present invention, the present invention also discloses an automatic detection device for penetration and coplanarity defects of a visual scene system. The device is used to implement the method, and includes the following modules:
[0136] A generation module, used to generate an automatic test eye point instruction sequence;
[0137] A recording module, used to sequentially send the test eye point instruction sequence to the visual scene system software. Under the drive of the test eye point instructions, the visual scene system automatically generates a test picture at the corresponding eye point and saves the test picture to obtain a video file;
[0138] A screening module, used to automatically analyze and screen the video file to obtain the scene penetration and coplanarity areas;
[0139] A saving module, used to save the eye point information corresponding to the scene penetration and coplanarity areas.
[0140] As an embodiment disclosed by the present invention, the present invention also discloses an electronic device, and the electronic device includes:
[0141] A memory, storing executable instructions;
[0142] A processor, and the processor runs the executable instructions in the memory to implement the method of the present invention.
[0143] As an embodiment disclosed by the present invention, the present invention also discloses a computer storage medium, and a computer program is stored on the medium. The computer program is executed by a processor to implement the method of the present invention.
[0144] The terms used in the embodiments of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The singular forms "a", "the" and "said" used in the embodiments of the present invention and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise.
[0145] The foregoing description has shown and described several preferred embodiments of the present invention. As previously mentioned, it should be understood that the present invention is not limited to the forms disclosed herein, should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be altered within the scope of the application concept described herein by the above teachings or the techniques or knowledge in the relevant field. And the changes and alterations made by those skilled in the art that do not depart from the spirit and scope of the present invention shall fall within the protection scope of the appended claims of the present invention.
Claims
1. An automatic detection method for the defects of scene system penetration and coplanarity, characterized in that The method includes the steps of: S1. Generate an automatic test eye point instruction sequence, including: S11. Set the eye point parameter range and the content of the eye point instruction; S12. Generate random eye point position parameters within the eye point parameter range; S13. Detect the flickering phenomenon caused by coplanarity and penetration. If no flickering phenomenon is found, randomly select a direction and move forward along this direction at a certain step length to detect the change of the viewing angle; S14. If flickering is found, keep the current direction and continue to move forward at the set step length to observe the change of the flickering area; S15. If the flickering area becomes larger, repeat S14 until the size of the flickering area exceeds the set threshold to confirm the flickering caused by coplanarity and penetration; S16. If the flickering area decreases or disappears, repeat step S13, randomly select a new direction and continue to check; S17. In the same scene, repeat S13 to S16 until the specified number of iterations is reached, and end the check; S2. Send the test eye point instruction sequence to the visual scene system software in sequence. Under the drive of the test eye point instruction, the visual scene system automatically generates a test picture at the corresponding eye point, saves the test picture, and obtains a video file; S3. Automatically analyze and screen the video file to obtain the scene penetration and coplanar areas; S4. Save the eye point information corresponding to the scene penetration and coplanar areas.
2. The method according to claim 1, wherein S2 includes: S21. When a new test eye point instruction is received, keep the test picture static for a certain period of time; S22. After the static time ends, automatically start the recording function and start capturing and recording the test pictures generated by the visual scene system; S23. The recording lasts for a preset period of time to obtain the required video segment; S24. After the preset recording time, stop the recording and generate a recording end flag, and automatically save the video file of this recording.
3. The method according to claim 1, wherein S3 includes: S31. Extract each frame of the video file to obtain each frame of color image; S32. Convert each frame of the color image into a grayscale image; S33. Perform inter-frame difference on three consecutive frames of the grayscale images, calculate the pixel difference between adjacent frames, so as to obtain a first difference image and a second difference image; S34. Perform a combined calculation on the first difference image and the second difference image to obtain a combined difference image; S35. After performing difference accumulation, normalization processing, binarization processing and superposition on the combined difference image, obtain the scene penetration and coplanar areas.
4. The method according to claim 3, characterized in that, The difference accumulation specifically includes: performing an accumulation process on the combined difference image to obtain an accumulated difference image; performing a maximization calculation on all pixel values of the accumulated difference image to obtain the maximum pixel value of the accumulated difference image.
5. The method according to claim 4, wherein The normalization processing includes: performing normalization processing on all pixels of the accumulated difference image, and mapping all pixel values to the range of [0, 1].
6. The method according to claim 5, wherein The binarization processing includes: comparing the pixel value of the normalized cumulative difference image with a set threshold value. When the pixel value of a certain point in the cumulative difference image is greater than or equal to the set threshold value, setting the value corresponding to this point in the significant change area to 1; when the pixel value of a certain point in the cumulative difference image is less than the set threshold value, setting the value corresponding to this point in the significant change area to 0.
7. An automatic detection device for visual simulation system penetration and coplanarity defects, characterized in that, The device is used to implement the method according to any one of claims 1-6, and includes the following modules: A generation module, which is used to generate an automatic test eye point instruction sequence; A recording module, which is used to sequentially send the test eye point instruction sequence to the visual system software. Under the drive of the test eye point instruction, the visual system automatically generates a test picture at the corresponding eye point, saves the test picture, and obtains a video file; A screening module, which is used to automatically analyze and screen the video file to obtain a scene penetration and coplanar area; A saving module, which is used to save the eye point information corresponding to the scene penetration and coplanar area.
8. An electronic device, characterized in that, The electronic device includes: A memory, which stores executable instructions; A processor, and the processor runs the executable instructions in the memory to implement the method according to any one of claims 1-6.
9. A computer storage medium, characterized in that, A computer program is stored on the medium, and the computer program is executed by the processor to implement the method according to any one of claims 1-6.
Citation Information
Patent Citations
Cross-model analysis method and device of virtual model, processor and electronic device
CN113177996A