VR simulation sensor test method and device, storage medium and computer equipment
By analyzing VR running scripts and generating virtual scenes, simulating the mobile parameters of the sensors, and evaluating the sensor accuracy of the VR device, the problems of high testing costs and poor flexibility in the prior art are solved, and efficient and repeatable VR sensor testing is achieved.
Patent Information
- Application Number
- CN202411259652.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-12-17
AI Technical Summary
In the prior art, VR products have high testing costs and poor test repetition and flexibility in different scenarios, making it difficult to meet the needs of high-precision positioning and complex human-computer interaction scenarios.
By obtaining and analyzing VR running scripts, generating virtual scenes, simulating the movement parameters of the sensors, triggering sensors in VR devices to interact, obtaining simulated movement data, adjusting virtual scenes, comparing predicted and actual scene pictures, and evaluating the running accuracy of the sensor.
Reliance on real dynamic environments, hardware costs, test repeatability and flexibility are improved, results are ensured to the stability and adaptability of results, and can quickly respond to the needs of different scenarios and accurately detect the operating accuracy of the sensor.
Smart Images

Figure CN119148853A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automated test control technology, and in particular to a VR simulation sensor testing method, device, storage medium and computer equipment. Background Art
[0002] With the continuous development of virtual reality (VR) technology, VR product testing is increasingly widely used in various industries. In the field of high-precision positioning and performance testing, especially when it comes to complex human-computer interaction scenarios, testing often requires the use of various peripheral devices, such as robotic arms, cars, robots, sensors, and cameras. These devices need to be carefully arranged in the early stages of the test and rely on real dynamic environments for measurement and positioning to ensure the accuracy of the test results. However, this method is not only costly, but also has poor test repeatability and flexibility in different scenarios. Summary of the invention
[0003] The purpose of this application is to solve at least one of the above-mentioned technical defects, especially the technical defects of the prior art that the cost is high and the test repeatability and flexibility in different scenarios are poor.
[0004] In a first aspect, the present application provides a VR simulation sensor testing method, the method comprising:
[0005] Obtain and parse the VR running script to obtain VR movement parameters, and determine multiple predicted scene images in a pre-generated virtual scene according to the VR movement parameters;
[0006] The VR movement parameters are sent to the VR device, and the virtual scene is projected onto the scene projection screen, and the sensors in the VR device are triggered to interact according to the VR movement parameters to achieve simulated movement;
[0007] Acquire simulated motion data corresponding to the sensor, and adjust the virtual scene on the scene projection screen according to the simulated motion data;
[0008] When it is determined that the sensor simulation moves to the preset target position, the actual scene image captured by the VR device from the adjusted scene projection screen is determined;
[0009] The target scene picture corresponding to the preset target position is determined in each predicted scene picture, and the target scene picture is compared with the actual scene picture, and the operation accuracy test result of the sensor is determined according to the comparison result.
[0010] In one embodiment, the process of generating a virtual scene includes:
[0011] Get a 3D scene set, and generate a virtual scene based on the 3D scene set through 3D unity.
[0012] In one embodiment, the VR movement parameters include an initial position, and gyroscope parameters, geomagnetic parameters, and acceleration of each simulated movement;
[0013] The step of determining a plurality of predicted scene images in a pre-generated virtual scene according to VR movement parameters includes:
[0014] Perform simulated movement in the virtual scene according to VR movement parameters;
[0015] Obtaining a predicted scene image of an initial position in the virtual scene, and using the initial position as the current position;
[0016] According to the gyroscope parameters, geomagnetic parameters and acceleration of the current position, the next position is calculated, and the movement to the next position is simulated to obtain the predicted scene picture of the next position, and the next position is used as the current position to continue to obtain the predicted scene picture.
[0017] In one embodiment, the VR device is provided with two cameras on the upper part and two cameras on the lower part;
[0018] When it is determined that the sensor simulates moving to the preset target position, the step of determining the actual scene image collected by the VR device from the adjusted scene projection screen includes:
[0019] Get the scene split screen captured by each camera of the VR device from the adjusted scene projection screen;
[0020] The individual scene screens are spliced together to obtain the actual scene screen.
[0021] In one of the embodiments, the actual scene picture includes at least one random polygon, and the target scene picture includes a predicted polygon corresponding to the random polygon;
[0022] The step of comparing the target scene image with the actual scene image and determining the operation accuracy test result of the sensor according to the comparison result includes:
[0023] Determine the pixel points of the random polygon in the actual scene image and the pixel points of the predicted polygon in the target scene image;
[0024] According to the pixel points of the random polygon in the actual scene picture and the pixel points of the predicted polygon in the target scene picture, it is determined whether the random polygon in the actual scene picture coincides with the predicted polygon in the target scene picture;
[0025] If the random polygon in the actual scene screen coincides with the predicted polygon in the target scene screen, the operating accuracy test result of the sensor is that the operating accuracy meets the standard, otherwise the operating accuracy test result is that the operating accuracy does not meet the standard.
[0026] In one embodiment, the method further comprises:
[0027] The frame rates of the actual scene image and the target scene image are detected to obtain the frame rate detection result of the VR device.
[0028] In one of the embodiments, if the geomagnetic parameter in the VR movement parameter does not include a direction, the geomagnetic parameter is used to simulate rotating the head in place; if it includes a direction, the geomagnetic parameter is used to simulate movement displacement.
[0029] In a second aspect, the present application provides a VR simulation sensor testing device, the device comprising:
[0030] A predicted scene picture determination module is used to obtain and parse the VR running script, obtain VR movement parameters, and determine multiple predicted scene pictures in a pre-generated virtual scene according to the VR movement parameters;
[0031] The sensor simulation movement module is used to send VR movement parameters to the VR device, project the virtual scene to the scene projection screen, and trigger the sensors in the VR device to interact according to the VR movement parameters to achieve simulated movement;
[0032] A virtual scene adjustment module is used to obtain simulated motion data corresponding to the sensor and adjust the virtual scene on the scene projection screen according to the simulated motion data;
[0033] The actual scene picture acquisition module is used to determine the actual scene picture acquired by the VR device from the adjusted scene projection screen when it is determined that the sensor simulation moves to the preset target position;
[0034] The operation accuracy test result determination module is used to determine the target scene picture corresponding to the preset target position in each predicted scene picture, and compare the target scene picture with the actual scene picture, and determine the operation accuracy test result of the sensor according to the comparison result.
[0035] In a third aspect, the present application provides a storage medium: the storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the VR simulation sensor testing method in any of the above embodiments.
[0036] In a fourth aspect, the present application provides a computer device, comprising: one or more processors, and a memory;
[0037] Computer-readable instructions are stored in the memory. When the computer-readable instructions are executed by one or more processors, the steps of the VR simulation sensor testing method in any of the above embodiments are performed.
[0038] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0039] In the VR simulation sensor testing method, device, storage medium and computer equipment provided in the present application, since the dependence on the real dynamic environment is reduced, the test no longer requires expensive peripheral equipment, which reduces the hardware cost. The scene generated in the virtual environment is controllable and repeatable, so the test is more repeatable in different scenarios, and multiple tests can be performed under the same conditions to ensure the stability and reliability of the results. At the same time, the generation and adjustment of virtual scenes are more flexible and can adapt to different test requirements, so that the test can quickly respond to the needs of different scenarios, improving the adaptability of the test. By comparing the predicted target scene picture and the actual scene picture, the operating accuracy of the sensor can be accurately detected. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0041] Figure 1 A flowchart of a VR simulation sensor testing method provided in an embodiment of the present application;
[0042] Figure 2 An example diagram of the overall device configuration provided for an embodiment of the present application;
[0043] Figure 3 An example diagram of scene image comparison provided in an embodiment of the present application;
[0044] Figure 4 A schematic diagram of the structure of a VR simulation sensor testing device provided in an embodiment of the present application;
[0045] Figure 5 A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0047] The present application provides a VR simulation sensor testing method. The following embodiments are described by taking the method applied to a computer device as an example. It can be understood that the computer device can be any device with data processing functions, including but not limited to a single server, a server cluster, a personal laptop computer, a desktop computer, etc. Figure 1 As shown, the method includes:
[0048] S101: Acquire and parse a VR running script to obtain VR movement parameters, and determine multiple predicted scene images in a pre-generated virtual scene according to the VR movement parameters.
[0049] Among them, VR running script refers to the program or instruction set used to control the virtual reality experience. The script can define the behavior, movement trajectory, interaction logic, etc. of the moving objects in the virtual scene. For example, the content contained in the VR running script is "Look up 30° forward (pause for 2 seconds) - head back to the right (2 seconds) - head turn 60° to the right (2 seconds) - head back to the right (2 seconds) - walk 5 meters straight ahead (2 seconds)". VR movement parameters are specific data extracted from the VR running script to control the movement of objects or perspectives in the virtual scene. They may include information such as displacement, rotation, speed, and path, which are used to guide how objects or perspectives in the virtual environment move. Virtual scene refers to a 3D digital environment or simulated space created in a virtual reality system. Predicted scene screen refers to the prediction of possible screens that may appear in the virtual scene at a future moment based on the current VR movement parameters.
[0050] In this step, the VR running script is loaded, and the instructions therein are read and parsed. In the process of parsing the script, the parameters related to the scene movement are identified and extracted. Based on the extracted VR movement parameters, the possible future scenes are calculated in the virtual scene.
[0051] It can be understood that by parsing the script and extracting the movement parameters, it is ensured that the movement in the virtual scene is executed according to the pre-set logic. By predicting the future scene screen, the state of the virtual scene at different time points can be known in advance. By pre-generating multiple predicted scene screens in the virtual environment, multiple scenes can be tested quickly, avoiding frame-by-frame adjustments during actual operation, and improving the efficiency of testing and debugging.
[0052] S102: Send the VR movement parameters to the VR device, project the virtual scene onto the scene projection screen, and trigger the sensors in the VR device to interact according to the VR movement parameters to achieve simulated movement.
[0053] Among them, VR equipment refers to the hardware part of the virtual reality system, including VR headsets, handles, sensors, etc., which are used to generate and display virtual environments and receive user input. Scene projection refers to an external display or projection screen that can display images of virtual scenes. Sensors refer to detection devices in VR devices, including gyroscopes, accelerometers, etc., which are used to detect the movement and rotation of the user's head, hands or other body parts. Simulated movement: refers to the process of simulating actual physical movement through virtual means. Usually, the movement of objects or perspectives in virtual scenes is controlled by software to simulate real motion effects.
[0054] In this step, the VR movement parameters can be sent to the VR device through the VR application or a dedicated communication protocol, and the image of the virtual scene can be projected onto an external display or projection screen through a video output port or wireless projection technology. After that, a control signal is sent to the sensor of the VR device so that the sensor works according to the received movement parameters. For example, the positioning sensor will adjust the capture position according to the parameters, and the motion sensor may simulate the user's gestures.
[0055] As you can understand, sending VR movement parameters to the VR device ensures that the movement in the virtual scene is consistent with the input of the actual device. Projecting the virtual scene to the scene projection screen and using sensors to simulate movement can reduce the dependence on the actual device and environment, making the testing process more efficient and flexible. By triggering the sensor to interact and simulate movement, the sensor response can be captured more accurately.
[0056] S103: Acquire simulated movement data corresponding to the sensor, and adjust the virtual scene on the scene projection screen according to the simulated movement data.
[0057] Among them, simulated motion data refers to the motion data detected by sensors in virtual simulation, which is used to reflect the movement simulated by sensors in the virtual scene, including position, speed, rotation angle and other information.
[0058] In this step, real-time motion data can be obtained from the sensor through wired or wireless transmission methods. The motion data sent back by the sensor is parsed and analyzed, and the elements in the virtual scene are modified based on the simulated motion data obtained by the analysis. For example, if the sensor detects movement in a certain direction, the corresponding object or perspective in the virtual scene is moved accordingly to keep the update of the virtual world consistent with the sensor feedback. The adjusted virtual scene is updated in real time on the scene projection screen.
[0059] S104: When it is determined that the sensor simulation moves to the preset target position, the actual scene image captured by the VR device from the adjusted scene projection screen is determined.
[0060] The preset target position is the final or critical position of the specified sensor movement, which is used as a reference point in testing or simulation to detect and evaluate the accuracy and responsiveness of the sensor.
[0061] In this step, the movement data of the sensor is monitored in real time to determine whether the sensor has reached the preset target position. When the sensor moves to the target position, the VR device can be triggered by instructions to capture the currently displayed image from the adjusted scene projection screen.
[0062] S105: Determine a target scene picture corresponding to a preset target position in each predicted scene picture, compare the target scene picture with the actual scene picture, and determine the operation accuracy test result of the sensor according to the comparison result.
[0063] Among them, the target scene picture is the picture corresponding to the preset target position in each predicted scene picture, representing the virtual scene state that is expected to be presented when the sensor moves to the target position.
[0064] In this step, the picture corresponding to the preset target position is extracted from the predicted multiple scene pictures, and the target scene picture is compared with the actual scene picture at a pixel-by-pixel or feature level using an image processing algorithm or other comparison method. Based on the results of the picture comparison, the test results of the sensor operation accuracy are generated.
[0065] In the above embodiment, since the dependence on the real dynamic environment is reduced, the test no longer requires expensive peripheral equipment, which reduces the hardware cost. The scene generated in the virtual environment is controllable and repeatable, so the repeatability of the test in different scenes is higher, and multiple tests can be performed under the same conditions to ensure the stability and reliability of the results. At the same time, the generation and adjustment of the virtual scene are more flexible and can adapt to different test requirements, so that the test can quickly respond to the needs of different scenes, improving the adaptability of the test. By comparing the predicted target scene picture with the actual scene picture, the operating accuracy of the sensor can be accurately detected.
[0066] In one embodiment, the process of generating a virtual scene includes:
[0067] Get a 3D scene set, and generate a virtual scene based on the 3D scene set through 3D unity.
[0068] Among them, a 3D scene collection refers to a collection of multiple 3D models, objects or scenes. Each scene contains objects in a 3D space and their properties, such as position, material, texture, light source, etc. 3D Unity provides a wealth of tools and libraries for rendering 3D scenes, processing physical effects, managing scripts and implementing user interaction.
[0069] Specifically, load the 3D scene collection from local storage or server, and import each element in the 3D scene collection into the Unity working environment through the Unity engine API. In Unity, build a virtual scene based on the imported 3D scene collection, including placing each 3D model in the appropriate position, applying materials and textures, configuring lighting and shadow effects, setting animation and interaction logic, etc. Once the virtual scene is generated and debugged in Unity, it can be output as an executable file, VR experience package or other format suitable for publishing and deployment.
[0070] In this embodiment, through 3D unity, a three-dimensional scene set can be quickly converted into a complete virtual scene, saving the time and cost of manually constructing a complex scene.
[0071] In one embodiment, the VR movement parameters include an initial position, and gyroscope parameters, geomagnetic parameters, and acceleration for each simulated movement;
[0072] The step of determining a plurality of predicted scene images in a pre-generated virtual scene according to VR movement parameters includes:
[0073] Perform simulated movement in the virtual scene according to VR movement parameters;
[0074] Obtaining a predicted scene image of an initial position in the virtual scene, and using the initial position as the current position;
[0075] According to the gyroscope parameters, geomagnetic parameters and acceleration of the current position, the next position is calculated, and the movement to the next position is simulated to obtain the predicted scene picture of the next position, and the next position is used as the current position to continue to obtain the predicted scene picture.
[0076] Among them, the initial position is the position in the virtual scene when the simulated movement begins. Gyroscope parameters are used to reflect the rotation and angular velocity of the device in three-dimensional space, usually expressed as angular velocity of three axes (X, Y, Z), to help determine the posture change of the device. Geomagnetic parameters use geomagnetic field data to determine the direction of the device. Combined with gyroscope data, these parameters can provide the absolute direction of the device in the virtual environment. Acceleration is used to measure the linear acceleration change of the device. From this data, the movement trajectory of the device in three-dimensional space can be derived.
[0077] Specifically, at the starting point of the simulated movement, that is, the initial position, the perspective content in the virtual scene is rendered, and the position is marked as the current position. Based on the gyroscope parameters, geomagnetic parameters and acceleration of the current position, the next position is calculated. After moving to this new position in the virtual scene, the predicted scene screen of the position is rendered, and this new position becomes the new current position. By continuously updating the current position and obtaining the corresponding predicted scene screen, multiple predicted scene screens are generated to provide a complete virtual environment view along the entire moving path, so as to quickly compare it with the actual scene screen captured by the VR device.
[0078] In one embodiment, the VR device is provided with two cameras at the top and two cameras at the bottom;
[0079] When it is determined that the sensor simulates moving to the preset target position, the step of determining the actual scene image collected by the VR device from the adjusted scene projection screen includes:
[0080] Get the scene split screen captured by each camera of the VR device from the adjusted scene projection screen;
[0081] The individual scene screens are spliced together to obtain the actual scene screen.
[0082] like Figure 2 As shown, there are two sets of upper and lower cameras on the VR device worn by the head model. The head model is propped up while wearing the VR. The head model is separated from the head by a certain distance to form a scene projection screen. The projection screen displays the VR upper and lower cameras, and the computer program control section performs the overall test control.
[0083] The scene split screen is the partial screen captured by each camera from the scene projection screen. Due to the different positions and viewing angles of each camera, the captured screen only covers a part of the scene.
[0084] Specifically, the four cameras controlling the VR device collect the scene split screens from their respective perspectives from the adjusted scene projection screen. Each camera captures a portion of the screen data on the scene projection screen. The scene split screens collected by each camera are preprocessed, and the processing may include image correction, edge alignment, color adjustment, etc. Then, these split screens are spliced according to the spatial arrangement of the cameras to generate a complete actual scene screen.
[0085] In this embodiment, each camera can only capture part of the scene content, so it is necessary to collect multiple scene sub-screens from different angles to cover the entire scene. A continuous and complete scene view can be obtained by splicing, thereby accurately reflecting the visual content of the device at that location.
[0086] In one embodiment, the actual scene picture includes at least one random polygon, and the target scene picture includes a predicted polygon corresponding to the random polygon;
[0087] The step of comparing the target scene image with the actual scene image and determining the operation accuracy test result of the sensor according to the comparison result includes:
[0088] Determine the pixel points of the random polygon in the actual scene image and the pixel points of the predicted polygon in the target scene image;
[0089] According to the pixel points of the random polygon in the actual scene picture and the pixel points of the predicted polygon in the target scene picture, it is determined whether the random polygon in the actual scene picture coincides with the predicted polygon in the target scene picture;
[0090] If the random polygon in the actual scene screen coincides with the predicted polygon in the target scene screen, the operating accuracy test result of the sensor is that the operating accuracy meets the standard, otherwise the operating accuracy test result is that the operating accuracy does not meet the standard.
[0091] Among them, random polygons are polygonal areas randomly selected in the actual scene screen, which are used to test and verify the accuracy of the image. The shapes, sizes and positions of these polygons are randomly generated. Prediction polygons are polygonal areas corresponding to random polygons in the target scene screen. They are generated according to VR movement parameters in the prediction stage and represent the expected image content. Pixels are the smallest units that make up a digital image, and each pixel has a color and brightness value. For a polygon, pixels refer to all pixels that make up the polygonal area.
[0092] Specifically, first analyze the random polygon in the actual scene picture, and obtain all the pixels that constitute the polygon area. Similarly, analyze the predicted polygon in the target scene picture to determine its corresponding pixel set. Then, compare the pixels of the random polygon with the pixels of the predicted polygon one by one. The comparison content includes information such as the coordinate position, color value, and brightness value of each pixel point to determine whether the two overlap. According to the comparison results, determine whether the random polygon in the actual scene picture overlaps with the predicted polygon in the target scene picture. If the pixel points of the two are highly consistent in position and characteristics, they are considered to overlap, otherwise they do not overlap. If polygon overlap is detected, the operating accuracy of the sensor is evaluated as "up to standard". Otherwise, it is evaluated as "not up to standard".
[0093] In one example, if Figure 3As shown, the computer device obtains the position parameters of the polygonal block generated by the VR program in scene A, such as coordinates, shape, size, distance from the focal length of both eyes, etc., and pre-calculates the next scene (scene B). The direction, speed, and angle of the head movement are known from the VR running script, thereby calculating the position of the corresponding pit. After the VR simulation head display moves from scene A to scene B, if the polygon can be completely inserted into the pit, it means that the operation accuracy meets the standard. If it cannot be completely inserted into the pit, it means that there is drift and error exceeding the limit in the VR calculation position.
[0094] In this embodiment, through pixel-level comparison, minute errors in the operation of the sensor can be accurately detected.
[0095] In one embodiment, the method further comprises:
[0096] The frame rates of the actual scene image and the target scene image are detected to obtain the frame rate detection result of the VR device.
[0097] The frame rate refers to the number of image frames generated and displayed per second.
[0098] Specifically, by monitoring the output of the VR device, the frame rate data of the actual scene screen is collected in real time. At the same time, the generation process of the target scene screen is monitored, and its theoretical frame rate value, that is, the predicted generated frame rate, is recorded. The frame rate of the actual scene screen is compared with the frame rate of the target scene screen, and the difference between the two frame rates is calculated to determine whether the VR device can stably output images that match the target frame rate. Based on the comparison results, a frame rate detection result is generated to indicate the gap between the actual frame rate and the target frame rate. If the gap is too large, it indicates that there may be a performance bottleneck or areas that need to be optimized.
[0099] In this embodiment, frame rate detection can be used to identify whether the VR device has achieved the expected performance standards in a specific scenario or task. If the frame rate is found to be low, it indicates that the device may be overloaded in the scenario and needs to be optimized.
[0100] In one embodiment, if the geomagnetic parameter in the VR movement parameter does not include a direction, the geomagnetic parameter is used to simulate rotating the head in place; if the geomagnetic parameter includes a direction, the geomagnetic parameter is used to simulate movement displacement.
[0101] Specifically, when the geomagnetic parameters do not contain direction information, they can only reflect the current change in orientation, but cannot provide direction data of displacement. In this case, the geomagnetic parameters are mainly used to simulate the user's action of rotating their head in place. This operation does not cause the device to move in the virtual scene, but only changes the viewing direction.
[0102] When geomagnetic parameters contain directional information, they not only provide changes in orientation, but can also be combined with data from other sensors, such as accelerometers or gyroscopes, to determine the direction and displacement of the device. In this case, geomagnetic parameters are used to simulate the actual displacement of the user in the virtual environment. For example, if the geomagnetic parameters indicate movement in a certain direction, a corresponding movement path is generated in the virtual scene based on this direction to simulate walking or movement in the virtual world.
[0103] Furthermore, the movement parameter formula corresponding to rotating the head in place is v = r\omega, where r is the movement radius, omege is the angular velocity, and v is the linear velocity. The movement parameter formula corresponding to the movement displacement is v²=2ad, where v is the movement distance, d is the velocity, and a is the acceleration.
[0104] In this embodiment, whether the geomagnetic parameters contain direction information is used as the basis for distinguishing rotation and displacement, which can more accurately simulate the actual actions of the user. In virtual reality, rotating the head in place and actually moving the head are two completely different operations. Through such a setting, these two operations can be accurately captured and simulated.
[0105] The VR simulation sensor testing device provided in the embodiment of the present application is described below. The VR simulation sensor testing device described below and the VR simulation sensor testing method described above can be referred to each other. Figure 4 As shown, the present application provides a VR simulation sensor testing device, the device comprising:
[0106] The predicted scene picture determination module 201 is used to obtain and parse the VR running script, obtain VR movement parameters, and determine multiple predicted scene pictures in a pre-generated virtual scene according to the VR movement parameters;
[0107] The sensor simulation movement module 202 is used to send VR movement parameters to the VR device, project the virtual scene to the scene projection screen, and trigger the sensor in the VR device to interact according to the VR movement parameters to achieve simulated movement;
[0108] The virtual scene adjustment module 203 is used to obtain the simulated movement data corresponding to the sensor, and adjust the virtual scene on the scene projection screen according to the simulated movement data;
[0109] The actual scene picture acquisition module 204 is used to determine the actual scene picture acquired by the VR device from the adjusted scene projection screen when it is determined that the sensor simulation moves to the preset target position;
[0110] The operation accuracy test result determination module 205 is used to determine the target scene picture corresponding to the preset target position in each predicted scene picture, and compare the target scene picture with the actual scene picture, and determine the operation accuracy test result of the sensor according to the comparison result.
[0111] In one embodiment, the predicted scene picture determination module 201 includes:
[0112] The virtual scene construction unit is used to obtain a three-dimensional scene set and generate a virtual scene according to the three-dimensional scene set through 3D unity.
[0113] In one embodiment, the VR movement parameters include an initial position, and gyroscope parameters, geomagnetic parameters, and acceleration for each simulated movement;
[0114] The predicted scene picture determination module 201 includes:
[0115] A simulated movement unit, used for performing simulated movement in a virtual scene according to VR movement parameters;
[0116] A current position updating unit, used to obtain a predicted scene picture of an initial position in a virtual scene, and use the initial position as a current position;
[0117] The predicted scene picture determination unit is used to calculate the next position according to the gyroscope parameters, geomagnetic parameters and acceleration of the current position, and simulate moving to the next position to obtain the predicted scene picture of the next position, and use the next position as the current position to continue to obtain the predicted scene picture.
[0118] In one embodiment, the VR device is provided with two cameras at the top and two cameras at the bottom;
[0119] The actual scene picture acquisition module 204 includes:
[0120] A scene split screen acquisition unit is used to obtain the scene split screen acquired by each camera of the VR device from the adjusted scene projection screen;
[0121] The actual scene picture acquisition unit is used to splice the various scene sub-pictures to obtain the actual scene picture.
[0122] In one embodiment, the actual scene picture includes at least one random polygon, and the target scene picture includes a predicted polygon corresponding to the random polygon;
[0123] The operation accuracy test result determination module 205 includes:
[0124] A pixel point determination unit, used to determine the pixel points of the random polygon in the actual scene picture and the pixel points of the predicted polygon in the target scene picture;
[0125] A pixel comparison unit, used to determine whether the random polygon in the actual scene picture coincides with the predicted polygon in the target scene picture based on the pixel points of the random polygon in the actual scene picture and the pixel points of the predicted polygon in the target scene picture;
[0126] The operation accuracy test result determination unit is used to determine whether the random polygon in the actual scene picture coincides with the predicted polygon in the target scene picture, then the operation accuracy test result of the sensor is that the operation accuracy meets the standard, otherwise the operation accuracy test result is that the operation accuracy does not meet the standard.
[0127] In one embodiment, the apparatus further comprises:
[0128] The frame rate detection module is used to perform frame rate detection on the actual scene image and the target scene image to obtain the frame rate detection result of the VR device.
[0129] In one embodiment, if the geomagnetic parameter in the VR movement parameter does not include a direction, the geomagnetic parameter is used to simulate rotating the head in place; if the geomagnetic parameter includes a direction, the geomagnetic parameter is used to simulate movement displacement.
[0130] In one embodiment, the present application also provides a storage medium, in which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the VR simulation sensor testing method described in any of the above embodiments.
[0131] In one embodiment, the present application also provides a computer device, in which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the VR simulation sensor testing method as described in any of the above embodiments.
[0132] Indicatively, if Figure 4 As shown, Figure 4 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. The computer device 300 may be provided as a server. Figure 4 The computer device 300 includes a processing component 302, which further includes one or more processors, and a memory resource represented by a memory 301 for storing instructions executable by the processing component 302, such as an application. The application stored in the memory 301 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 302 is configured to execute instructions to perform the VR simulation sensor testing method of any of the above embodiments.
[0133] The computer device 300 may further include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 305. The computer device 300 may operate based on an operating system stored in the memory 301, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, Free BSD TM, or the like.
[0134] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0135] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not clearly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements. Herein, "one", "one", "said", "the" and "it" may also include plural forms, unless the context clearly indicates another way. A plurality refers to at least two cases, such as 2, 3, 5 or 8, etc. "And / or" includes any and all combinations of the relevant listed items.
[0136] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.
[0137] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A VR simulation sensor testing method, characterized in that: The method comprises: Acquire and parse the VR running script to obtain VR movement parameters, and determine multiple predicted scene images in a pre-generated virtual scene according to the VR movement parameters; The VR movement parameters are sent to the VR device, and the virtual scene is projected onto a scene projection screen, and the sensors in the VR device are triggered to interact according to the VR movement parameters to achieve simulated movement; Acquire simulated movement data corresponding to the sensor, and adjust the virtual scene on the scene projection screen according to the simulated movement data; When it is determined that the sensor simulates moving to the preset target position, determining the actual scene image captured by the VR device from the adjusted scene projection screen; The target scene picture corresponding to the preset target position is determined in each of the predicted scene pictures, and the target scene picture is compared with the actual scene picture, and the operation accuracy test result of the sensor is determined according to the comparison result.
2. The VR simulation sensor testing method according to claim 1, characterized in that: The process of generating the virtual scene includes: A three-dimensional scene set is obtained, and the virtual scene is generated according to the three-dimensional scene set through 3D unity.
3. The VR simulation sensor testing method according to claim 1, characterized in that: The VR movement parameters include the initial position, and the gyroscope parameters, geomagnetic parameters and acceleration of each simulated movement; The step of determining a plurality of predicted scene images in a pre-generated virtual scene according to the VR movement parameters comprises: Performing simulated movement in the virtual scene according to the VR movement parameters; Acquire a predicted scene picture of an initial position in the virtual scene, and use the initial position as the current position; According to the gyroscope parameters, geomagnetic parameters and acceleration of the current position, the next position is calculated, and the movement to the next position is simulated to obtain the predicted scene picture of the next position, and the next position is used as the current position to continue to obtain the predicted scene picture.
4. The VR simulation sensor testing method according to claim 1, characterized in that: The VR device is provided with two cameras at the top and two cameras at the bottom; The step of determining the actual scene image captured by the VR device from the adjusted scene projection screen when it is determined that the sensor simulates moving to the preset target position includes: Obtaining the scene split screen captured by each camera of the VR device from the adjusted scene projection screen; Each of the scene sub-screens is spliced together to obtain the actual scene screen.
5. The VR simulation sensor testing method according to claim 1, characterized in that: The actual scene picture includes at least one random polygon, and the target scene picture includes a predicted polygon corresponding to the random polygon; The step of comparing the target scene picture with the actual scene picture and determining the operating accuracy test result of the sensor according to the comparison result includes: Determining pixel points of a random polygon in the actual scene picture and pixel points of a predicted polygon in the target scene picture; Determining whether the random polygon in the actual scene picture coincides with the predicted polygon in the target scene picture according to the pixel points of the random polygon in the actual scene picture and the pixel points of the predicted polygon in the target scene picture; If the random polygon in the actual scene picture coincides with the predicted polygon in the target scene picture, the operating accuracy test result of the sensor is that the operating accuracy meets the standard; otherwise, the operating accuracy test result is that the operating accuracy does not meet the standard.
6. The VR simulation sensor testing method according to claim 1, characterized in that: The method further comprises: The actual scene image and the target scene image are subjected to frame rate detection to obtain a frame rate detection result of the VR device.
7. The VR simulation sensor testing method according to any one of claims 1 to 6, characterized in that: If the geomagnetic parameter in the VR movement parameter does not include a direction, the geomagnetic parameter is used to simulate rotating the head in situ; if the geomagnetic parameter includes a direction, the geomagnetic parameter is used to simulate movement displacement.
8. A VR simulation sensor testing device, characterized in that: The device comprises: A predicted scene picture determination module is used to obtain and parse the VR running script, obtain VR movement parameters, and determine multiple predicted scene pictures in a pre-generated virtual scene according to the VR movement parameters; A sensor simulation movement module, used for sending the VR movement parameters to the VR device, projecting the virtual scene to a scene projection screen, and triggering the sensor in the VR device to interact according to the VR movement parameters to achieve simulated movement; A virtual scene adjustment module, used to obtain simulated movement data corresponding to the sensor, and adjust the virtual scene on the scene projection screen according to the simulated movement data; An actual scene picture acquisition module, used to determine the actual scene picture acquired by the VR device from the adjusted scene projection screen when it is determined that the sensor simulates moving to a preset target position; The operation accuracy test result determination module is used to determine the target scene picture corresponding to the preset target position in each of the predicted scene pictures, and compare the target scene picture with the actual scene picture, and determine the operation accuracy test result of the sensor according to the comparison result.
9. A storage medium, characterized in that: The storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the VR simulation sensor testing method as described in any one of claims 1 to 7.
10. A computer device, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the VR simulation sensor testing method according to any one of claims 1 to 7 are performed.
