Virtual simulation display method for skill training teaching based on virtual reality technology

By performing area segmentation and repetitive analysis of image data in virtual simulation scenarios, high-repetition areas are selected for lossy compression, solving the problem of poor compression effect of a single compression method in virtual simulation scenarios, and achieving more efficient data Compress and storage.

CN118212381BActive Publication Date: 2025-02-07CHINA ENG SCI & TECH INNOVATION CULTURE MEDIA (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410281838.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-12
Publication Date
2025-02-07
Estimated Expiration
2044-03-12

AI Technical Summary

Technical Problem

In virtual simulation scenarios, when image data is compressed using a single lossy or lossless compression method, the compression effect is poor, especially when the scene changes, the amount of information in the transition frame image is large and the image information repeatability is more complicated.

Method used

By obtaining the scene grayscale image in the virtual simulation scene, the local feature area is segmented and the distribution of the number of pixels with the same grayscale value in each local feature area is analyzed, the repetition credibility is calculated, and high repetitions are selected. and lossless compression of other areas.

Benefits of technology

It improves the image data compression efficiency in virtual simulation scenarios, saves storage space and reduces network transmission costs, ensuring good teaching results and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118212381B_ABST
    Figure CN118212381B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of data compression processing, and in particular to a virtual simulation display method for skill training and teaching based on virtual reality technology, comprising: obtaining a scene grayscale image in a virtual simulation scene; segmenting the image to obtain a local feature region; obtaining repeatability credibility according to the distribution of the number of pixels with the same grayscale value in each local feature region; using the repeatability credibility to screen each local feature region to obtain a suspected repeat region; obtaining a compressible index according to the distribution of the number of pixels with the same grayscale value in the suspected repeat region, the shape distribution of the suspected repeat region and the repeatability credibility; using the compressible index to screen the suspected repeat region to obtain a high repeat region; performing lossy compression on the high repeat region, performing lossless compression on other regions, and storing the compression results of the image data in the training and teaching virtual simulation scene. The present invention can obtain a more effective image data compression result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data compression processing, and in particular to a virtual simulation display method for skill training and teaching based on virtual reality technology. Background Art

[0002] In the scene of virtual simulation display of skill training and teaching, a large amount of image data such as animation and texture is usually included, which requires a large amount of storage space and bandwidth to transmit and load. By compressing the data, storage space can be effectively saved and the cost of network transmission can be reduced. Therefore, in the virtual simulation display scene of skill training and teaching based on virtual reality technology, the application of data compression technology is more critical to ensure good teaching effect and user experience. The RLE compression algorithm is commonly used to compress image data in virtual simulation scenes. However, the amount of information in the transition frame image when the scene changes in the virtual simulation scene is large, and the repetitiveness of the image information is relatively complex. The compression effect of using a single lossy or lossless compression method to compress the image data in the virtual simulation scene is poor. Summary of the invention

[0003] In order to solve the technical problem that the compression effect of image data in a virtual simulation scene is poor when a single lossy or lossless compression method is used, the purpose of the present invention is to provide a virtual simulation display method for skill training teaching based on virtual reality technology. The technical solution adopted is as follows:

[0004] Obtain each frame of image data in the virtual simulation scene and record it as a scene grayscale image; perform region segmentation on each scene grayscale image to obtain a local feature region;

[0005] According to the distribution of the number of pixels with the same gray value in each local feature region in each scene grayscale image, the repeatability credibility of each local feature region is obtained; and each local feature region in each scene grayscale image is screened by using the repeatability credibility to obtain suspected repeat regions;

[0006] According to the distribution of the number of pixels with the same gray value in the suspected repetitive region, the shape distribution of the suspected repetitive region and the repeatability credibility, a compressibility index of the suspected repetitive region is obtained; and the suspected repetitive region is screened by using the compressibility index to obtain a high repetitive region;

[0007] The high-repetition area is lossily compressed, and other areas except the high-repetition area in the scene grayscale image are losslessly compressed, and the compression results of the image data in the training and teaching virtual simulation scene are stored.

[0008] Preferably, obtaining the repeatability credibility of each local feature area according to the distribution of the number of pixels with the same gray value in each local feature area in each scene gray image specifically includes:

[0009] For any local feature region in any scene grayscale image, the number of pixels at each grayscale value in the local feature region is obtained and recorded as the feature number of each grayscale value, and all grayscale values ​​are arranged in descending order according to the feature number to obtain the grayscale feature sequence of the local feature region;

[0010] According to the feature quantity of each gray value in the gray feature sequence and the quantity distribution of all gray values ​​in the local feature area, the repeatability credibility of the local feature area is obtained.

[0011] Preferably, the method for obtaining the repeatability credibility of the local feature area is specifically as follows:

[0012]

[0013] in, represents the repeatability credibility of the i-th local feature area in the scene grayscale image, Represents the types of different grayscale values ​​contained in the i-th local feature region, Represents the number of features of the xth grayscale value in the grayscale feature sequence of the i-th local feature area, Represents the total number of pixels contained in the i-th local feature region, represents the feature quantity of the rth grayscale value in the grayscale feature sequence of the i-th local feature area, x represents the order of the grayscale values ​​in the grayscale feature sequence, and Norm() represents the linear normalization function.

[0014] Preferably, the compressibility index of the suspected repetitive region is obtained according to the distribution of the number of pixels with the same gray value in the suspected repetitive region, the shape distribution of the suspected repetitive region and the repeatability credibility, and specifically includes:

[0015] For any suspected repetitive region in any scene grayscale image, any grayscale value is recorded as the target grayscale value, and the subregion composed of pixels with the same grayscale value as the target grayscale value in the suspected repetitive region is recorded as the target subregion;

[0016] For any target sub-region, obtain the center point of the target sub-region, and obtain the length of the line segment from the center point to the edge of the target sub-region at each angle, and record it as the characteristic line segment length of each angle in the target sub-region;

[0017] The compressibility index of the suspected repetitive region is obtained according to the repeatability credibility, the number of sub-regions corresponding to each gray value in the suspected repetitive region, and the length of the characteristic line segment at each angle in the sub-region.

[0018] Preferably, the method for obtaining the compressibility index of the suspected repeated region is specifically as follows:

[0019]

[0020] in, represents the compressibility index of the u-th suspected repeated region in the scene grayscale image, represents the repeatability credibility of the u-th suspected repeated area in the scene grayscale image, Represents the preset weight coefficient, Indicates the number of different grayscale values ​​contained in the u-th suspected duplicate region, represents the total number of sub-regions corresponding to all grayscale values ​​in the u-th suspected repeated region, represents the number of sub-regions corresponding to the t-th grayscale value in the u-th suspected repeated region, represents the number of different angles, It represents the length of the characteristic line segment of the sth angle in the kth sub-region corresponding to the tth gray value in the uth suspected repeated region. represents the length of the characteristic line segment of the s+1th angle in the kth sub-region corresponding to the tth gray value in the uth suspected repeated region, Norm() represents the linear normalization function, and exp() represents the exponential function with the natural constant e as the base.

[0021] Preferably, the method of using the compressible index to screen the suspected repetitive regions to obtain the highly repetitive regions specifically includes:

[0022] A global repetition threshold is obtained according to the compressibility index, and a suspected repetition region corresponding to a suspected repetition region whose repetition credibility is greater than the global repetition threshold is recorded as a high repetition region.

[0023] Preferably, obtaining the global repetition threshold according to the compressibility index specifically includes: performing negative correlation normalization processing on the compressibility index to obtain the global repetition threshold.

[0024] Preferably, the method of using the repeatability credibility to screen each local feature region in each scene grayscale image to obtain suspected repeat regions specifically includes: recording the local feature regions corresponding to the repeatability credibility greater than a preset credibility threshold as suspected repeat regions.

[0025] Preferably, the lossy compression of the high-repetition region and the lossless compression of other regions in the scene grayscale image except the high-repetition region specifically include:

[0026] The RLE compression algorithm is used to compress the grayscale values ​​of the high-repetition area, and the grayscale values ​​of other areas in the scene grayscale image except the high-repetition area are used as compressed data.

[0027] Preferably, the step of performing region segmentation on each scene grayscale image to obtain a local feature region specifically includes:

[0028] The superpixel segmentation algorithm is used to segment each scene grayscale image to obtain local feature areas.

[0029] The embodiments of the present invention have at least the following beneficial effects:

[0030] The present invention first obtains a scene grayscale image in a virtual simulation scene, and performs regional segmentation on the scene grayscale image to obtain a local feature region, providing a data basis for subsequent analysis of the grayscale repetition in each local region of each scene grayscale image. Then, the distribution of the number of pixels of the same grayscale value in each local feature region in each scene grayscale image is analyzed to obtain repeatability credibility. Through the distribution of each identical grayscale value in the local region within the local range, the repetition of each identical grayscale value can be quantified, and the degree of data repetition in the local region can be reflected. The repeatability credibility is then used to screen the local feature region to obtain a suspected repetitive region. The repeatability credibility is used to perform a preliminary screening of the local feature region, and some relatively high repeatability regions can be selected for further repetitive feature analysis. Furthermore, combined with the repeatability credibility of the suspected repeat region, the distribution of the number of pixels with the same grayscale value in the suspected repeat region and the shape distribution of the suspected repeat region are analyzed. On the basis of the preliminary repeatability analysis of the suspected repeat region, the data distribution of the pixels in the region and the shape distribution of the region are further considered. The compressibility index characterizes the compressibility of the suspected repeat region, that is, it reflects the degree to which the suspected repeat region can be compressed from the aspects of the regularity of the local area distribution and the degree of repetition in the suspected repeat region. Then, the compressibility index can be used to more accurately screen out the high repetition area with a high degree of data repetition. Finally, the lossy compression method can be used adaptively for the high repetition area with a high degree of repetition, while the repetition degree of other areas except the high repetition area is small. In order to ensure that the data is not lost after compression, the lossless compression method can be used for processing. The compression effect of this method is better, and the compression efficiency is higher. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 This is a flowchart of a virtual simulation display method for skill training and teaching based on virtual reality technology provided by an embodiment of the present invention;

[0033] Figure 2 It is a schematic diagram of the distribution of target sub-regions corresponding to target grayscale values ​​in a suspected repeated region provided by this embodiment of the present invention. DETAILED DESCRIPTION

[0034] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of a virtual simulation display method for skill training teaching based on virtual reality technology proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0035] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0036] The following is a detailed description of a virtual simulation display method for skill training and teaching based on virtual reality technology provided by the present invention in conjunction with the accompanying drawings.

[0037] See also Figure 1 , which shows a flowchart of a method for virtual simulation display of skill training teaching based on virtual reality technology provided by an embodiment of the present invention, the method comprising the following steps:

[0038] Step 1: Obtain each frame of image data in the virtual simulation scene and record it as a scene grayscale image; perform region segmentation on each scene grayscale image to obtain a local feature region.

[0039] The main purpose of the embodiment of the present invention is to compress and store each frame of image data in a virtual simulation scene of skill training and teaching, so that the stored data can be obtained from the cloud in a timely manner when performing virtual simulation demonstration. First, it is necessary to obtain each frame of image data in the virtual simulation scene, that is, in this embodiment, the collected original image data in the virtual simulation scene is grayed to obtain each frame of the scene gray image, and the gray value of each pixel in the scene gray image is the object that needs to be compressed.

[0040] In the virtual simulation scene, most of the background parts have small changes, such as the blue sky and white clouds in the scene, and the grayscale values ​​in this area have high repetitiveness. In addition, the grayscale values ​​of the same object in the scene are also highly repetitive. Therefore, each scene image can be segmented first, and the grayscale value repetition in each area can be further analyzed to obtain a compression environment with high compression requirements, and the corresponding data compression efficiency is higher. In this embodiment, each scene grayscale image is segmented by a superpixel segmentation algorithm to obtain a local feature area.

[0041] Step 2: According to the distribution of the number of pixels with the same gray value in each local feature area in each scene grayscale image, the repeatability credibility of each local feature area is obtained; and each local feature area in each scene grayscale image is screened using the repeatability credibility to obtain suspected repeated areas.

[0042] Different compression methods can be used to process different compression areas in the scene grayscale image. Lossy compression can be used for compression areas with high repeatability, and lossless compression can be used for compression areas with low repeatability. This ensures data compression efficiency while also avoiding the loss of important data. In order to avoid the problem of poor data compression effect caused by improper selection, the distribution of the number of pixels with the same grayscale value in each local feature area in each scene grayscale image can be analyzed to quantify the data repeatability distribution of each local feature area.

[0043] Specifically, for any local feature region in any scene grayscale image, the number of pixels at each grayscale value in the local feature region is obtained and recorded as the feature number of each grayscale value, and all grayscale values ​​are arranged in order from large to small in terms of feature number to obtain the grayscale feature sequence of the local feature region. For example, in a local feature region, the total number of pixels with a grayscale value of 55 is 90, and the feature number of the grayscale value of 55 in the local feature region is 90, and the total number of pixels with a grayscale value of 50 is 100, and the feature number of the grayscale value of 50 in the local feature region is 100.

[0044] Further, according to the number of features of each gray value in the gray feature sequence and the number distribution of all gray values ​​in the local feature region, the repeatability credibility of the local feature region is obtained. In this embodiment, taking any local feature region in any scene gray image as an example for explanation, the calculation formula of the repeatability credibility of the local feature region can be expressed as:

[0045]

[0046] in, represents the repeatability credibility of the i-th local feature area in the scene grayscale image, represents the types of different grayscale values ​​contained in the i-th local feature region, that is, the number of grayscale values ​​contained in the grayscale feature sequence of the i-th local feature region, Represents the number of features of the xth grayscale value in the grayscale feature sequence of the i-th local feature area, Represents the total number of pixels contained in the i-th local feature region, represents the feature quantity of the rth grayscale value in the grayscale feature sequence of the i-th local feature area, x represents the order of the grayscale values ​​in the grayscale feature sequence, and Norm() represents the linear normalization function.

[0047] Expanding the product part of the formula can be expressed as

[0048]

[0049] in, The ratio between the number of features of the first grayscale value in the grayscale feature sequence of the local feature area and the number of all pixels in the local feature area reflects the proportion of the maximum number of pixels corresponding to the grayscale value in the local feature area. The closer the ratio is to 1, the higher the repeatability of the grayscale value in the local feature area.

[0050] Similarly, It represents the ratio between the number of features of the second grayscale value in the grayscale feature sequence of the local feature area and the number of all pixels in the local feature area except the number of features of the first grayscale value, that is, the proportion of the number of pixels corresponding to the grayscale value with the second largest number of features among all the remaining pixels, excluding the pixels corresponding to the grayscale value with the largest number of features. It reflects the proportion of the number of pixels under this grayscale value in the local feature area. The larger the ratio, the higher the repeatability of this grayscale value in the local feature area, and thus the greater the overall repeatability in the local feature area.

[0051] When the value of each ratio in the formula is closer to 1, it indicates the proportion of the number of repetitions of each gray value, indicating that the local range gray repeatability in the local feature area is greater, and then the overall repeatability in the local feature area is higher, and the corresponding repeatability credibility value is greater. It should be noted that when r=0, it means that this part is 0.

[0052] use As a weight coefficient, the more types of gray values ​​contained in the pixels in the local feature area, the more complex the change of gray values ​​in the local feature area, which reduces the repeatability of the gray value distribution in the local feature area to a certain extent, that is, the smaller the value of the corresponding repeatability credibility. The repeatability credibility of the local feature area characterizes the repeatability of the gray value distribution inside the local feature area.

[0053] Furthermore, when the value of the repetitive credibility of the local feature region is larger, it means that the grayscale distribution repetitiveness of the local range in the local feature region is higher, and the overall repetitiveness of the local feature region is also higher. When the value of the repetitive credibility of the local feature region is smaller, it means that there are more types of grayscale values ​​in the local feature region, and the range of repetitive distribution is smaller, which means that the repetitiveness of the local feature region is lower.

[0054] Based on this, the repeatability credibility is used to screen each local feature region in each scene grayscale image to obtain suspected repeat regions. Specifically, the local feature region corresponding to the repeatability credibility greater than a preset credibility threshold is recorded as a suspected repeat region.

[0055] In this embodiment, the value of the credible threshold is 0.6. Since the value of the repeatability credibility is a normalized value, the value range of the credible threshold is (0, 1). The closer the value of the credible threshold is to 0, the looser the judgment standard for the degree of repetition of the local feature area is. The closer the value of the credible threshold is to 1, the stricter the judgment standard for the degree of repetition of the local feature area is.

[0056] When the repetitive credibility of the local feature region is greater than the credible threshold, it means that the grayscale repetition of the local feature region is large, and the local feature region is recorded as a suspected repetitive region to complete the preliminary judgment of repetitiveness so as to conduct further feature analysis on the suspected repetitive region. When the repetitive credibility of the local feature region is less than or equal to the credible threshold, it means that the grayscale repetition of the local feature region is small, so the grayscale features of this part of the region should be retained. When the RLE algorithm is used for compression, due to the small repetitiveness, the original data needs to be directly used as the compressed data.

[0057] Step three, according to the distribution of the number of pixels with the same gray value in the suspected repeated area, the shape distribution of the suspected repeated area and the repeatability credibility, a compressibility index of the suspected repeated area is obtained; and the compressibility index is used to screen the suspected repeated area to obtain a high-repetition area.

[0058] The higher the grayscale repetition degree of the suspected repetitive region, the higher the compressibility of the suspected repetitive region according to the principle of the RLE algorithm. Considering that the use of the preset credible threshold is a preliminary screening operation for the degree of repetition of all local feature regions, there may be a certain inaccuracy. Combined with the repeatability credibility of the suspected repetitive region, the grayscale distribution in the suspected repetitive region is further analyzed, and the compressibility of the suspected repetitive region is quantified by analyzing the distribution of the area occupied by each grayscale value. That is, according to the distribution of the number of pixels with the same grayscale value in the suspected repetitive region and the shape distribution of the suspected repetitive region, combined with the repeatability credibility, the compressibility index of the suspected repetitive region is obtained.

[0059] Specifically, for any suspected repetitive region in any scene grayscale image, any grayscale value is recorded as the target grayscale value, and the subregion composed of pixels with the same grayscale value as the target grayscale value in the suspected repetitive region is recorded as the target subregion, such as Figure 2 This is a schematic diagram of the target sub-region distribution corresponding to the target grayscale value in a suspected repeated region in this embodiment. Figure 2 The shaded part in is the sub-region composed of the pixels corresponding to the target gray value.

[0060] For any target sub-region, obtain the center point of the target sub-region, obtain the length of the line segment from the center point to the edge of the target sub-region at each angle, and record it as the characteristic line segment length of each angle in the target sub-region. In this embodiment, the set geometric center of the target sub-region is used as the center point of the target sub-region, and the difference between two adjacent angles is set to 15°, that is, there are 24 different angles in total, and rays at 24 angles are obtained with the center point of the target sub-region as the vertex, and the line segments obtained by intersecting with the edge of the target sub-region are recorded as characteristic line segments, and the length of the characteristic line segment is the characteristic line segment length of each angle in the target sub-region.

[0061] Further, according to the repeatability credibility, the number of sub-regions corresponding to each grayscale value in the suspected repeated region, and the length of the characteristic line segment at each angle in the sub-region, the compressibility index of the suspected repeated region is obtained. In this embodiment, taking any suspected repeated region in any scene grayscale image as an example, the calculation formula of the compressibility index of the suspected repeated region can be expressed as:

[0062]

[0063] in, represents the compressibility index of the u-th suspected repeated region in the scene grayscale image, represents the repeatability credibility of the u-th suspected repeated area in the scene grayscale image, represents the preset weight coefficient, which is 0.4 in this embodiment. Indicates the number of different grayscale values ​​contained in the u-th suspected duplicate region, represents the total number of sub-regions corresponding to all grayscale values ​​in the u-th suspected repeated region, represents the number of sub-regions corresponding to the t-th grayscale value in the u-th suspected repeated region, represents the number of different angles, It represents the length of the characteristic line segment of the sth angle in the kth sub-region corresponding to the tth gray value in the uth suspected repeated region. represents the length of the characteristic line segment of the s+1th angle in the kth sub-region corresponding to the tth gray value in the uth suspected repeated region, Norm() represents the linear normalization function, and exp() represents the exponential function with the natural constant e as the base.

[0064] In the grayscale image of the scene, the pixels corresponding to a specific grayscale value are distributed in different local ranges in the suspected repeated area and are irregular. At this time, the compressibility of the suspected repeated area is low, that is, the higher the distribution chaos in the suspected repeated area, the more unfavorable it is for data compression processing.

[0065] The total number of sub-regions formed by different gray values ​​in the suspected repeated region It reflects the complexity of the grayscale distribution in the suspected repeated area. That is, the larger the total number, the more complex the grayscale distribution in the suspected repeated area, the lower the corresponding data repetition situation may be, and the smaller the value of the compressible index is, which means that the suspected repeated area is less conducive to compression processing.

[0066] The tth grayscale value in the suspected feature area is the target grayscale value. It reflects the distribution regularity of the sub-region corresponding to the target gray value. It represents the difference between the lengths of the characteristic line segments corresponding to two adjacent angles, reflecting the distribution lengths of the sub-regions at two different angles. The smaller the difference between the two, the closer the distribution lengths are, the more regular the corresponding sub-region shape distribution is, and the higher the compression efficiency of the corresponding sub-region is. The larger the value of the compressibility index is, the more conducive the suspected repeated region is to compression processing.

[0067] Confidence of repeatability of suspected repeat regions The higher the value, the higher the degree of data repetition in the suspected repetitive region, the higher the compressibility of the suspected repetitive region, and the larger the value of the corresponding compressibility index. The compressibility index characterizes the compressibility of the suspected repetitive region, that is, it reflects the degree to which the suspected repetitive region can be compressed from the aspects of the regularity of the local area distribution and the degree of repetition in the suspected repetitive region.

[0068] Furthermore, the compressible index can be used to screen the suspected repetitive regions to obtain high repetitive regions, that is, the repetitive judgment conditions of each suspected repetitive region can be adaptively obtained through the compressible index of the suspected repetitive region, and then the repetitive conditions of the suspected repetitive regions can be further distinguished on the basis of the suspected repetitive regions, and finally the regions with large repetitive conditions can be obtained, and the efficiency of repetitive compression of these regions is high and the effect is good. Specifically, a global repetitive threshold is obtained according to the compressible index, that is, the compressible index is negatively correlated to obtain the global repetitive threshold, and the suspected repetitive regions whose repetitive credibility is greater than the global repetitive threshold are recorded as high repetitive regions.

[0069] In this embodiment, taking any suspected repetitive region in any scene grayscale image as an example, the calculation formula of the global repetitive threshold of the suspected repetitive region can be expressed as:

[0070]

[0071] in, represents the global repetition threshold of the u-th suspected repetitive region in the scene grayscale image, represents the compressibility index of the u-th suspected repeated region in the scene grayscale image, and Norm( ) represents the linear normalization function.

[0072] The larger the compressibility index of the suspected repeated area, the more regular the distribution of different grayscale values ​​inside the suspected repeated area, the better the compression effect, and thus the higher the compression efficiency. The smaller the threshold required for judging the repeated area of ​​the suspected repeated area, the smaller the value of the corresponding global repetition threshold.

[0073] The global repetition threshold adaptively characterizes the criteria for selecting suspected repetitive regions through the compressibility of suspected repetitive regions. That is, each suspected repetitive region has a corresponding adaptively obtained global repetition threshold. By using the global repetition threshold to screen suspected repetitive regions, more accurate high-repetition regions can be obtained.

[0074] Step 4: Lossy compression is performed on the high-repetition area, and lossless compression is performed on other areas in the scene grayscale image except the high-repetition area, and the compression results of the image data in the training and teaching virtual simulation scene are stored.

[0075] The high repetitive area represents the area with high repetitiveness and regular distribution in the scene grayscale image. The repetitiveness of this part of the area is high, and the effect of lossy compression of the repetitive area using compression algorithm is better, thereby improving the efficiency of image data compression. For the part of the scene grayscale image other than the high repetitive area, the repetitiveness is low and the distribution is irregular. This part of the area is suitable for lossless compression, ensuring that important data will not be lost during the compression process.

[0076] Specifically, the grayscale values ​​of the high-repetition area are compressed using the RLE compression algorithm, and the grayscale values ​​of other areas in the scene grayscale image except the high-repetition area are used as compressed data. Based on this, the embodiment of the present invention can obtain the RLE adaptive compression result, store the compression result, and the relevant staff can obtain the stored data to facilitate the virtual simulation display of skill training and teaching.

[0077] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A virtual simulation display method for skill training and teaching based on virtual reality technology, characterized in that: The method comprises the following steps: Obtain each frame of image data in the virtual simulation scene and record it as a scene grayscale image; perform region segmentation on each scene grayscale image to obtain a local feature region; According to the distribution of the number of pixels with the same gray value in each local feature region in each scene grayscale image, the repeatability credibility of each local feature region is obtained; and each local feature region in each scene grayscale image is screened by using the repeatability credibility to obtain suspected repeat regions; According to the distribution of the number of pixels with the same gray value in the suspected repetitive region, the shape distribution of the suspected repetitive region and the repeatability credibility, a compressibility index of the suspected repetitive region is obtained; and the suspected repetitive region is screened by using the compressibility index to obtain a high repetitive region; Perform lossy compression on the high-repetition area, perform lossless compression on other areas in the scene grayscale image except the high-repetition area, and store the compression results of the image data in the training and teaching virtual simulation scene; The repeatability credibility of each local feature region is obtained according to the distribution of the number of pixels with the same gray value in each local feature region in each scene gray image, specifically including: For any local feature region in any scene grayscale image, the number of pixels at each grayscale value in the local feature region is obtained and recorded as the feature number of each grayscale value, and all grayscale values ​​are arranged in order from large to small according to the feature number to obtain the grayscale feature sequence of the local feature region; According to the characteristic quantity of each gray value in the gray feature sequence and the quantity distribution of all gray values ​​in the local feature area, the repeatability credibility of the local feature area is obtained; The method for obtaining the repeatability credibility of the local feature area is specifically as follows: in, represents the repeatability credibility of the i-th local feature area in the scene grayscale image, Represents the types of different grayscale values ​​contained in the i-th local feature region, Represents the number of features of the xth grayscale value in the grayscale feature sequence of the i-th local feature area, Represents the total number of pixels contained in the i-th local feature region, represents the feature quantity of the rth grayscale value in the grayscale feature sequence of the i-th local feature region, x represents the order of the grayscale values ​​in the grayscale feature sequence, and Norm() represents the linear normalization function; The compressibility index of the suspected repetitive region is obtained according to the distribution of the number of pixels with the same gray value in the suspected repetitive region, the shape distribution of the suspected repetitive region and the repeatability credibility, specifically including: For any suspected repeated region in any scene grayscale image, any grayscale value is recorded as the target grayscale value, and the subregion composed of pixels with the same grayscale value as the target grayscale value in the suspected repeated region is recorded as the target subregion; For any target sub-region, obtain the center point of the target sub-region, and obtain the length of the line segment from the center point to the edge of the target sub-region at each angle, and record it as the characteristic line segment length of each angle in the target sub-region; Obtaining a compressibility index of the suspected repetitive region according to the repeatability credibility, the number of sub-regions corresponding to each grayscale value in the suspected repetitive region, and the length of a characteristic line segment at each angle in the sub-region; The method for obtaining the compressibility index of the suspected repeated region is specifically as follows: in, represents the compressibility index of the u-th suspected repeated region in the scene grayscale image, represents the repeatability credibility of the u-th suspected repeated area in the scene grayscale image, Represents the preset weight coefficient, Indicates the number of different grayscale values ​​contained in the u-th suspected duplicate region, represents the total number of sub-regions corresponding to all grayscale values ​​in the u-th suspected repeated region, represents the number of sub-regions corresponding to the t-th grayscale value in the u-th suspected repeated region, represents the number of different angles, It represents the length of the characteristic line segment of the sth angle in the kth sub-region corresponding to the tth gray value in the uth suspected repeated region. represents the length of the characteristic line segment of the s+1th angle in the kth sub-region corresponding to the tth gray value in the uth suspected repeated region, Norm() represents the linear normalization function, and exp() represents the exponential function with the natural constant e as the base.

2. A virtual simulation demonstration method for skill training and teaching based on virtual reality technology according to claim 1, characterized in that: The method of using the compressible index to screen the suspected repetitive regions to obtain the high repetitive regions specifically includes: A global repetition threshold is obtained according to the compressibility index, and a suspected repetition region corresponding to a suspected repetition region whose repetition credibility is greater than the global repetition threshold is recorded as a high repetition region.

3. A virtual simulation demonstration method for skill training and teaching based on virtual reality technology according to claim 2, characterized in that: The obtaining of the global repetition threshold according to the compressibility index specifically includes: performing negative correlation normalization processing on the compressibility index to obtain the global repetition threshold.

4. The virtual simulation display method for skill training and teaching based on virtual reality technology according to claim 1 is characterized in that: The method of using the repeatability credibility to screen each local feature region in each scene grayscale image to obtain suspected repeat regions specifically includes: recording the local feature regions corresponding to repeatability credibility greater than a preset credibility threshold as suspected repeat regions.

5. The virtual simulation display method for skill training and teaching based on virtual reality technology according to claim 1 is characterized in that: The lossy compression of the high-repetition region and the lossless compression of other regions in the scene grayscale image except the high-repetition region specifically include: The RLE compression algorithm is used to compress the grayscale values ​​of the high-repetition area, and the grayscale values ​​of other areas in the scene grayscale image except the high-repetition area are used as compressed data.

6. The virtual simulation display method for skill training and teaching based on virtual reality technology according to claim 1 is characterized in that: The region segmentation of each scene grayscale image to obtain the local feature region specifically includes: The superpixel segmentation algorithm is used to segment each scene grayscale image to obtain local feature areas.

Citation Information

Patent Citations

  • Three-dimensional gesture recognition algorithm for virtual reality learning classroom

    CN114708651A

  • Coal mine safety simulation interaction method based on virtual reality

    CN117251087A