A method and apparatus for generating a custom security zone

By obtaining a three-dimensional finite point set of the intersection of the handle ray and the ground in the VR all-in-one machine and projecting it onto a two-dimensional plane, and using the circle drawing method to extract edge points for orderly connection, the problem of the VR all-in-one machine's customized safe area being unclosed or segmented is solved, and the generation of the largest and most closed safe area is achieved, improving user safety and experience.

CN115035272BActive Publication Date: 2025-10-17HISENSE VISUAL TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210561005.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-23
Publication Date
2025-10-17
Estimated Expiration
2042-05-23

AI Technical Summary

Technical Problem

When existing all-in-one VR devices generate user-defined safe areas, the safe areas may not be closed or divided into multiple small areas, affecting user safety and experience.

Method used

By obtaining the intersection points of the handle ray and the curve of the ground in three-dimensional space, a three-dimensional finite point set is formed and projected onto a two-dimensional plane. The edge points are extracted using the circle drawing method and connected in an orderly manner to generate a maximum and closed custom safety area.

Benefits of technology

The success rate of drawing lines in custom safe areas has been improved, ensuring the maximum range and closure of safe areas, improving user safety and VR experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115035272B_ABST
    Figure CN115035272B_ABST
Patent Text Reader

Abstract

The application relates to the VR technical field and provides a generation method and equipment of a self-defined safety area, in the process of drawing a contour curve of a self-defined safety area of a VR device by using a handle, the intersection points of the rays of the handle and the curve of the ground in a three-dimensional space are obtained according to a set distance interval, and are projected to a two-dimensional plane, so that a three-dimensional path curve in the drawing process is abstracted into a two-dimensional finite point set, edge points of the self-defined safety area are extracted from the two-dimensional finite point set, the difficulty of creating the self-defined safety area is reduced, the edge points of the self-defined safety area are extracted by adopting a circle drawing method and the features of non-edge points, and the edge points are sequentially connected, so that a complex curve or a maximum closed contour curve of an incomplete closed curve containing a non-single closed area drawn is obtained, the drawing success rate of the self-defined safety area is improved, a self-defined safety area with the maximum range and being closed is further generated, and the personal safety of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of virtual reality (AR) technology, in particular to a method and device for generating a self-defined safety area. BACKGROUND

[0002] When a user uses a VR all-in-one machine, the user's vision is isolated from the real environment, and the user cannot know the situation of the real environment where the user is located, which may cause collisions, entanglements and other dangers. It is necessary to create a safety area for the user to ensure the personal safety of the user.

[0003] Considering the complexity and diversity of the real environment where the user is located, the VR all-in-one machine generally supports the function of customizing a safety area based on the current environment. The user generates a safety area on the ground of the current environment by drawing a line with a handle to ensure the safety of the user during the VR experience.

[0004] Currently, the 6DOF VR all-in-one machine on the market mainly has the following problems when generating a user-defined safety area:

[0005] (1) When drawing a curve of a safety area with a handle, if the drawn curve is not closed, the safety area will not be closed, which may cause the risk of the user walking out of the safety area and endanger the personal safety.

[0006] (2) When drawing a curve of a safety area with a handle, if the curve intersects, multiple small safety areas may be generated, which limits the activity range of the user and affects the AR experience of the user.

[0007] Therefore, it is necessary to provide a method for generating a self-defined safety area for a VR all-in-one machine to solve the above problems. SUMMARY

[0008] The embodiments of the present application provide a method and device for generating a self-defined safety area, which can improve the success rate of drawing a line of a self-defined safety area and improve the personal safety of a user.

[0009] In one aspect, the embodiments of the present application provide a method for generating a self-defined safety area, applied to a VR device, comprising:

[0010] According to a set distance interval, a curve intersection point of a ray of a handle and a curve of a ground in a three-dimensional space is obtained to obtain a three-dimensional finite point set with the same horizontal coordinates, the handle being used to draw an outline curve of a self-defined safety area of the VR device;

[0011] The curve intersection points in the three-dimensional finite point set are projected onto a two-dimensional plane to obtain a two-dimensional finite point set;

[0012] extract edge points of the custom safety area from the two-dimensional finite point set, and sequentially connect each edge point to obtain a contour curve of the custom safety area;

[0013] generate the custom safety area according to the contour curve.

[0014] In another aspect, an embodiment of the present application provides a VR device, comprising a processor, a memory and a communication interface, wherein the communication interface, the memory and the processor are connected through a bus;

[0015] The VR device is connected with a handle through the communication interface, and the handle is used to draw a contour curve of a custom safety area of the VR device.

[0016] The memory comprises a data storage unit and a program storage unit, the program storage unit stores a computer program, and the processor executes the following operations according to the computer program:

[0017] According to a set distance interval, a curve intersection point of a ray of the handle and the ground in a three-dimensional space is obtained to obtain a three-dimensional finite point set with the same horizontal coordinate and store the three-dimensional finite point set to the data storage unit.

[0018] The curve intersection point in the three-dimensional finite point set is projected to a two-dimensional plane to obtain a two-dimensional finite point set.

[0019] extract edge points of the custom safety area from the two-dimensional finite point set, and sequentially connect each edge point to obtain a contour curve of the custom safety area;

[0020] generate the custom safety area according to the contour curve.

[0021] In another aspect, an embodiment of the present application provides a computer readable storage medium, which stores computer executable instructions, and the computer executable instructions are used to make a computer device execute a generation method of a custom safety area provided by an embodiment of the present application.

[0022] In the method and device for generating a self-defined safety area provided by the embodiments of the present application, in the process of drawing a contour curve for the self-defined safety area of a VR device using a handle, the intersection points of the rays of the handle and the curve of the ground in a three-dimensional space are obtained at a set distance interval, and are projected onto a two-dimensional plane, so as to abstract the three-dimensional path curve in the drawing process into a two-dimensional finite point set, facilitate the extraction of edge points of the self-defined safety area from the two-dimensional finite point set, and reduce the difficulty of creating the self-defined safety area. After the edge points of the self-defined safety area are extracted, the edge points are sequentially connected, so as to obtain a maximum closed contour curve of the drawn complex curve or incompletely closed curve containing a non-single closed area, improve the success rate of drawing the self-defined safety area, and further generate a self-defined safety area with the maximum range and being closed, and improve the personal safety of the user. BRIEF DESCRIPTION OF DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative labor.

[0024] Figure 1 The drawing of drawing a line of a self-defined safety area provided by the embodiments of the present application;

[0025] Figure 2A The drawing of a contour of a self-defined safety area provided by the embodiments of the present application is an incompletely closed curve;

[0026] Figure 2B The effect diagram of a safety area generated by an incompletely closed curve provided by the embodiments of the present application;

[0027] Figure 3A The drawing of a contour of a self-defined safety area provided by the embodiments of the present application is an intersecting five-point star curve;

[0028] Figure 3B The effect diagram of a safety area generated by an intersecting five-point star curve provided by the embodiments of the present application;

[0029] Figure 4A The drawing of a contour of a self-defined safety area provided by the embodiments of the present application is a complex curve;

[0030] Figure 4B The effect diagram of a safety area generated by a complex curve provided by the embodiments of the present application;

[0031] Figure 5 The flowchart of a method for generating a self-defined safety area provided by the embodiments of the present application;

[0032] Figure 6A A two-dimensional finite point set provided for an embodiment of the present application;

[0033] Figure 6B A diagram provided for an embodiment of the present application for drawing two circles respectively passing through two points in a two-dimensional finite point set;

[0034] Figure 6C A diagram provided for an embodiment of the present application for drawing two circles respectively passing through two other points in a two-dimensional finite point set;

[0035] Figure 7 An effect diagram provided for an embodiment of the present application for drawing circles for a two-dimensional finite point set with irregular distribution;

[0036] Figure 8A An edge point extraction diagram provided for an embodiment of the present application when the radius is twice the length of the line segment;

[0037] Figure 8B An edge point extraction diagram provided for an embodiment of the present application when the radius is five times the length of the line segment;

[0038] Figure 8C An edge point extraction diagram provided for an embodiment of the present application when the radius is ten times the length of the line segment;

[0039] Figure 9 An edge point extraction method flowchart provided for an embodiment of the present application;

[0040] Figure 10 A method flowchart provided for an embodiment of the present application for counting edge points contained in each circle;

[0041] Figure 11 An edge point connection effect diagram provided for an embodiment of the present application;

[0042] Figure 12A A method flowchart provided for an embodiment of the present application for connecting edge points;

[0043] Figure 12B A method flowchart provided for an embodiment of the present application for connecting edge points counterclockwise;

[0044] Figure 12C A method flowchart provided for an embodiment of the present application for connecting edge points clockwise;

[0045] Figure 13 Another edge point connection effect diagram provided for an embodiment of the present application;

[0046] Figure 14A A profile curve diagram provided for an embodiment of the present application for drawing a custom safety area;

[0047] Figure 14B a generated custom safety area diagram provided for an embodiment of the present application;

[0048] Figure 15A a generated custom safety area diagram provided for an embodiment of the present application;

[0049] Figure 15B a generated custom safety area diagram provided for an embodiment of the present application;

[0050] Figure 16 a structure diagram of a VR device provided for an embodiment of the present application. DETAILED DESCRIPTION

[0051] A VR all-in-one machine is a VR headset (i.e., a head-mounted display device) with an independent processor, and has the functions of independent operation, input, and output. With the development of VR technology, VR all-in-one machines have been applied to various fields such as education, gaming, and medical treatment, greatly improving people's enjoyment in vision and hearing.

[0052] The VR all-in-one machine can be externally connected with a handle, and the user controls the image displayed by the VR headset through the handle. When the user uses the VR all-in-one machine, the vision will be isolated from the real environment, and the user cannot know the situation of the real environment where he is, such as the positions of sofas, tables, and chairs. Thus, there is a risk of collision with objects in the real environment during the VR experience.

[0053] To ensure the personal safety of the user, the safety area function is a basic function of the VR all-in-one machine in the current 6DOF VR all-in-one machine product. The safety area function refers to defining a safety area on the ground of the current environment by drawing a line with the handle. The shape of the safety area finally determined is mostly in the state of an irregular curve. The curve can be used as the contour of the safety area, which is formed by connecting the points of intersection of the handle rays and the plane, as shown in FIG. 1. During the drawing process, the user can operate the handle according to a preset rule. The user can move within the custom safety area to prevent collision with objects in the current environment, entanglement, and other dangers, and ensure his own safety. Figure 1

[0054] Currently, the 6DOF VR all-in-one machine on the market mainly has the following problems when generating a safety area defined by the user:

[0055] (1) When drawing the curve of the safety area with the handle, if the drawn curve is not closed, the safety area will not be closed, which will cause the risk of the user walking out of the safety area and endanger personal safety.

[0056] For example, as shown in FIG. 2, the user draws a curve of the safety area with the handle, but the drawn curve is not closed, which will cause the risk of the user walking out of the safety area and endanger personal safety. Figure 2A ​As shown, the custom safety area drawn by the handle is a non-single closed area, and the profile of the custom safety area is a complex curve. Based on the complex curve, the generated three-dimensional safety area is as shown in FIG. 6B, from which it can be seen that the complex curve is not completely closed, and the user cannot be guaranteed to be safe when the user is in the area outside the opening. Figure 2B As shown, the custom safety area drawn by the handle is a non-single closed area, and the profile of the custom safety area is a complex curve. Based on the complex curve, the generated three-dimensional safety area is as shown in FIG. 6B, from which it can be seen that the complex curve is not completely closed, and the user cannot be guaranteed to be safe when the user is in the area outside the opening. Figure 2B As shown, the custom safety area drawn by the handle is a non-single closed area, and the profile of the custom safety area is a complex curve. Based on the complex curve, the generated three-dimensional safety area is as shown in FIG. 6B, from which it can be seen that the complex curve is not completely closed, and the user cannot be guaranteed to be safe when the user is in the area outside the opening. As shown, the custom safety area drawn by the handle is a non-single closed area, and the profile of the custom safety area is a complex curve. Based on the complex curve, the generated three-dimensional safety area is as shown in FIG. 6B, from which it can be seen that the complex curve is not completely closed, and the user cannot be guaranteed to be safe when the user is in the area outside the opening.

[0057] As shown, the custom safety area drawn by the handle is a non-single closed area, and the profile of the custom safety area is a complex curve. Based on the complex curve, the generated three-dimensional safety area is as shown in FIG. 6B, from which it can be seen that the complex curve is not completely closed, and the user cannot be guaranteed to be safe when the user is in the area outside the opening. As shown, the custom safety area drawn by the handle is a non-single closed area, and the profile of the custom safety area is a complex curve. Based on the complex curve, the generated three-dimensional safety area is as shown in FIG. 6B, from which it can be seen that the complex curve is not completely closed, and the user cannot be guaranteed to be safe when the user is in the area outside the opening.

[0058] As shown, the custom safety area drawn by the handle is a non-single closed area, and the profile of the custom safety area is a complex curve. Based on the complex curve, the generated three-dimensional safety area is as shown in FIG. 6B, from which it can be seen that the complex curve is not completely closed, and the user cannot be guaranteed to be safe when the user is in the area outside the opening. Figure 3A As shown, the custom safety area drawn by the handle is a non-single closed area, and the profile of the custom safety area is a complex curve. Based on the complex curve, the generated three-dimensional safety area is as shown in FIG. 6B, from which it can be seen that the complex curve is not completely closed, and the user cannot be guaranteed to be safe when the user is in the area outside the opening. Figure 3B As shown, the custom safety area drawn by the handle is a non-single closed area, and the profile of the custom safety area is a complex curve. Based on the complex curve, the generated three-dimensional safety area is as shown in FIG. 6B, from which it can be seen that the complex curve is not completely closed, and the user cannot be guaranteed to be safe when the user is in the area outside the opening. Figure 3B As shown, the custom safety area drawn by the handle is a non-single closed area, and the profile of the custom safety area is a complex curve. Based on the complex curve, the generated three-dimensional safety area is as shown in FIG. 6B, from which it can be seen that the complex curve is not completely closed, and the user cannot be guaranteed to be safe when the user is in the area outside the opening. As shown, the custom safety area drawn by the handle is a non-single closed area, and the profile of the custom safety area is a complex curve. Based on the complex curve, the generated three-dimensional safety area is as shown in FIG. 6B, from which it can be seen that the complex curve is not completely closed, and the user cannot be guaranteed to be safe when the user is in the area outside the opening.

[0059] As shown, the custom safety area drawn by the handle is a non-single closed area, and the profile of the custom safety area is a complex curve. Based on the complex curve, the generated three-dimensional safety area is as shown in FIG. 6B, from which it can be seen that the complex curve is not completely closed, and the user cannot be guaranteed to be safe when the user is in the area outside the opening. Figure 4A As shown, the custom safety area drawn by the handle is a non-single closed area, and the profile of the custom safety area is a complex curve. Based on the complex curve, the generated three-dimensional safety area is as shown in FIG. 6B, from which it can be seen that the complex curve is not completely closed, and the user cannot be guaranteed to be safe when the user is in the area outside the opening. Figure 4B As shown, the custom safety area drawn by the handle is a non-single closed area, and the profile of the custom safety area is a complex curve. Based on the complex curve, the generated three-dimensional safety area is as shown in FIG. 6B, from which it can be seen that the complex curve is not completely closed, and the user cannot be guaranteed to be safe when the user is in the area outside the opening. Figure 4B As shown, the custom safety area drawn by the handle is a non-single closed area, and the profile of the custom safety area is a complex curve. Based on the complex curve, the generated three-dimensional safety area is as shown in FIG. 6B, from which it can be seen that the complex curve is not completely closed, and the user cannot be guaranteed to be safe when the user is in the area outside the opening. As shown, the custom safety area drawn by the handle is a non-single closed area, and the profile of the custom safety area is a complex curve. Based on the complex curve, the generated three-dimensional safety area is as shown in FIG. 6B, from which it can be seen that the complex curve is not completely closed, and the user cannot be guaranteed to be safe when the user is in the area outside the opening.

[0060] In view of this, the embodiments of the present application provide a generation method and device of a custom safety area, based on a 6DOF VR all-in-one machine. When a handle is used to draw a profile curve of a custom safety area of the VR all-in-one machine, the profile curve is stored as a set of three-dimensional finite point sets (i.e. a set of intersection points of the handle rays and the plane) according to a specific rule, and is projected onto a two-dimensional plane to obtain a two-dimensional finite point set. Two circles passing through two points in the two-dimensional finite point set are drawn by using a circle drawing method, non-edge points are removed, and thus edge points of the custom safety area are obtained. Special processing is performed on each edge point to extract a maximum closed profile curve of a complex curve or a non-completely closed curve drawn, and thus a custom safety area with the maximum range and being closed is generated. The method can efficiently filter the finite point set of the profile curve drawn to represent the custom safety area within the range allowed by the calculation power of the VR helmet, accurately extract the edge points of the custom safety area with the maximum range and being closed, improve the success rate of drawing the custom safety area, reduce the difficulty of creating the custom safety area, effectively guarantee the personal safety of the user, and improve the VR experience of the user.

[0061] Referring to Figure 5 A flowchart of a method for generating a custom safety area is provided for embodiments of the present application, which is executed by a VR device, and mainly includes the following steps:

[0062] S501: Obtain the intersection points of the rays emitted by the handle and the ground in the three-dimensional space at a set distance interval to obtain a three-dimensional finite point set with the same horizontal coordinates.

[0063] In embodiments of the present application, a VR device is connected with a handle, and a wearer of the VR device can determine a custom safety area for the VR device by drawing a line with the handle, and the wearer of the VR device can move within the custom safety area. The line drawn by the handle can be used as the contour curve of the custom safety area of the VR device.

[0064] When drawing the contour curve of the custom safety area for the VR device with the handle, first, a range of the custom safety area is selected according to the current environment of the wearer of the VR device, and a line is drawn in the range, then the height of the horizontal plane of the line drawing is determined, generally, the horizontal plane of the line drawing is set as the ground. Further, the handle is moved by pointing at the ground, and the rays emitted by the handle at the current movement position intersect with the ground, and these intersection points constitute the line drawing path of the handle in the three-dimensional space.

[0065] During the line drawing process, the handle records the intersection points of the rays and the ground at a set distance interval, and the handle stops moving, and the recording of the intersection points is stopped. Since the ground is parallel to the horizontal plane of the line drawing, the horizontal coordinates of the intersection points are the same. The handle sends the three-dimensional coordinates of the intersection points recorded at the set distance interval to the VR device, so that the VR device obtains a three-dimensional finite point set with the same horizontal coordinates.

[0066] S502: Project the intersection points in the three-dimensional finite point set to a two-dimensional plane to obtain a two-dimensional finite point set.

[0067] Since the horizontal coordinates of the intersection points in the three-dimensional finite point set are the same, the intersection points in the three-dimensional finite point set can be projected to a two-dimensional plane, so that the three-dimensional path curve in the line drawing process can be abstracted into a two-dimensional finite point set, which facilitates the extraction of edge points of the custom safety area from the two-dimensional finite point set and reduces the difficulty of creating the custom safety area.

[0068] S503: Extract the edge points of the custom safety area from the two-dimensional finite point set.

[0069] In embodiments of the present application, the edge points of the custom safety area can be extracted from the two-dimensional finite point set by using the circle drawing method. The design idea of extracting the edge points is as follows:

[0070] Referring to Figure 6A, gives a two-dimensional finite point set containing 9 points, the 9 points are distributed regularly, the purpose of the circle drawing method is to extract the remaining 8 edge points A, B, C, D, F, G, H, I except E point.

[0071] In Figure 6A , take A and D points as an example, draw two circles with fixed diameter and passing through A and D points, the radii of the two circles are the same, and greater than half the length between A and D points, as shown in Figure 6B . It can be known from Figure 6B that the circle with center J only contains A and D points, and the circle with center K contains 8 points A, B, C, D, E, F, H, and I.

[0072] Similarly, take B and E points in Figure 6A as an example, draw two circles with fixed diameter and passing through B and E points, as shown in Figure 6C , the circle with center L contains 5 points A, B, D, E, and G, and the circle with center N contains 5 points B, C, E, F, and I.

[0073] Comparing Figure 6B and Figure 6C , it can be known that the non-edge feature is that the two circles passing through the non-edge point E contain three or more points in the two-dimensional finite point set.

[0074] It should be noted that the above features are not only applicable to the two-dimensional finite point set with regular distribution, but also applicable to the two-dimensional finite point set with irregular distribution, see Figure 7 , for the edge points extracted from the two-dimensional finite point set with irregular distribution by using the circle drawing method.

[0075] In actual operation, the distance between two points on the curve can be controlled, such as Figure 6B , the length of AD can be controlled. Take the line segment formed by the two end points AD in Figure 6B as an example, assuming that the length of the line segment is d, it is experimentally measured that the radius R of the two circles must be greater than d / 2 to effectively extract the edge points.

[0076] Among them, the larger the radius R is, the more non-edge points (i.e. internal points of the curve) are filtered out, the fewer the number of discrete points in the two-dimensional finite point set is, and the sparser the edge points of the outline of the self-defined safety area formed, therefore, the setting of R is very important.

[0077] The edge point extraction results corresponding to different radii R in the same outline curve are given below.

[0078] Suppose the length of the line segment passing through the two circles is L, when the radius R of the two circles is 2d, the edge point extraction result from the drawn outline curve is as shown in Figure 8Aas shown; when the radius R of the two circles is 5d, the result of the edge points extracted from the drawn contour curve is as shown in Figure 8B as shown; when the radius R of the two circles is 10d, the result of the edge points extracted from the drawn contour curve is as shown in Figure 8C .

[0079] It is found through experiments that when the radius R of the two circles is closer to d / 2, the number of discrete edge points extracted from the two-dimensional finite point set will be more, and the finally extracted edge points will be more dense.

[0080] Using the above non-edge features and the set radius circle, the edge points of the self-defined safety area can be extracted from the two-dimensional finite point set, and the specific extraction process is described in Figure 9 , which mainly includes the following steps:

[0081] S5031: Determine a plurality of line segments according to the number of points contained in the two-dimensional finite point set.

[0082] For example, assuming that the number of points contained in the two-dimensional finite point set is N, the number of line segments determined by the N points is N(N-1) / 2.

[0083] S5032: For each line segment, determine two circles passing through the two endpoints of the line segment and having the same radius, and the number of points contained in the two-dimensional finite point set.

[0084] When the center and radius of a circle are determined, the circle is also determined, so the process of determining two circles passing through the two endpoints of the line segment and having the same radius can be understood as the process of determining the center. After the center is determined, the number of points contained in each circle can be determined according to the comparison result of the distance between the points in the two-dimensional finite point set and the center and the radius. The specific process is described in Figure 10 , which mainly includes the following steps:

[0085] S5032_1: Determine the perpendicular bisector of the line segment for any one of the two circles, and the perpendicular bisector passes through the center of the circle.

[0086] Assuming that the length of the line segment is d, and the radius R of the two circles is set to 5d, taking the center of a circle as an example, referring to Figure 6B , P is the midpoint of the line segment AD. If the line segment AD is regarded as a directional vector, according to the perpendicular relationship operation rule of the vector, the vector KP passing through the point P and perpendicular to the vector AD can be obtained, that is, KP is the perpendicular bisector of the line segment AD, and the unit vector of KP is obtained by normalizing the vector KP. The line segment AD is the chord of the circle, so the perpendicular bisector passes through the center of the circle.

[0087] S5032_2: According to the radius of the circle and the length of the line segment, the center of the circle is determined by using the Pythagorean theorem.

[0088] Still taking the example Figure 6B , according to the Pythagorean theorem, KP 2 = DP 2 + KD 2 , where DP = d / 2 and KD = R = 5d, the length of KP can be solved, and the position of the center K of the circle can be determined by combining the unit vector of the normalized KP.

[0089] S5032_3: Determine the number of points in the two-dimensional finite point set contained in the circle according to the distance of the remaining points in the two-dimensional finite point set to the center of the circle and the radius of the circle.

[0090] For each of the remaining points in the two-dimensional finite point set, determine the distance of the point to the center of the circle, and if the distance is less than the radius of the circle, determine that the point is inside the circle. After traversing each of the remaining points, the number of points in the two-dimensional finite point set contained in the circle can be determined.

[0091] S5033: Determine whether the number of points contained in the two circles is greater than or equal to 3, if yes, execute S5034, otherwise execute S5035.

[0092] In S5033, according to the feature that the two circles containing three or more points in the two-dimensional finite point set through the non-edge points, it can be determined whether the two endpoints of the line segment are edge points.

[0093] S5034: Remove the two endpoints of the line segment from the two-dimensional finite point set.

[0094] If the number of points contained in the two circles is greater than or equal to 3, it indicates that the two endpoints of the line segment are non-edge points, and the two endpoints of the line segment should be removed from the two-dimensional finite point set, otherwise it indicates that the two endpoints of the line segment are edge points and should be retained.

[0095] S5035: Get the next line segment and return to S5032.

[0096] S5036: Take the remaining points in the two-dimensional finite point set after removal as the edge points of the custom safety area.

[0097] Through the above operations, after traversing the multiple line segments formed by the points in the two-dimensional finite point set, the edge points of the custom safety area can be extracted.

[0098] In some embodiments, to improve edge point extraction efficiency, before determining the number of points in the two-dimensional finite point set contained in two circles of the same radius passing through the two endpoints of the line segment, the length of the line segment formed by the two endpoints can be determined before drawing the circles. Specifically, the length of the line segment is determined to be greater than twice the radius of the circle. If so, it indicates that the two endpoints are far apart, and the line segment can be discarded without further center determination. That is, no circles are drawn for the two endpoints contained in the line segment, which can significantly improve computational efficiency. If less than this, the center determination is performed.

[0099] S504: Connect the edge points in an orderly manner to obtain a contour curve of the custom safety area.

[0100] After successfully extracting the edge points of the custom safety area contour from a two-dimensional finite point set, the order of the edge points will lose the order relationship when the curve is drawn. Even if the order relationship is not lost, the actual contour curve may not be drawn in order.

[0101] For example, Figure 11 As shown in the figure, the connection order of A to B to C is the desired final result. However, in the actual contour curve drawing, point C may not be drawn immediately after point B, but may be drawn after point E. In this way, the desired result may not be obtained. Therefore, it is necessary to connect the edge points in an orderly manner.

[0102] See also Figure 12A , is the orderly connection process of each edge point, which mainly includes the following steps:

[0103] S5041: Sort the ordinates of the edge points, and select the edge point with the smallest ordinate as the reference point. The reference point is the starting point and the end point of the contour curve.

[0104] Still Figure 11 For example, AK represents the extracted edge points. Each edge point is the projection of the intersection of the curves in 3D space onto a 2D plane. Therefore, the 2D coordinates of each edge point can be obtained. By sorting the ordinates of points AK, we can find that the edge point with the smallest ordinate is point A, and point A is used as the reference point.

[0105] Since a maximum and closed contour curve needs to be drawn, the reference points are used as the starting point and end point of the contour curve of the custom safe area.

[0106] S5042: Divide each edge point into a left and a right part according to the horizontal coordinate of each edge point, and the reference point and the edge point with the same horizontal coordinate as the reference point belong to the right part.

[0107] In S5042, a left and right split line is drawn through reference point A, and the horizontal coordinates of each edge point are compared with the horizontal coordinate of the reference point, and each edge point is divided into the left and right parts of the split line according to the comparison result. Specifically, the edge points with horizontal coordinates greater than or equal to the reference point are placed in the right part of the split line, and the edge points with horizontal coordinates less than the reference point are placed in the left part of the split line. After such a split, the reference point and the edge points with the same horizontal coordinate as the reference point belong to the right part of the split line.

[0108] For example, in Figure 11 , edge points A, K, J, I, H, G, and F are edge points of the right part (denoted as first edge points), and edge points B, C, D, and E are edge points of the left part (denoted as second edge points).

[0109] S5043: According to the set connection type, sequentially connect the edge points contained in the left and right parts.

[0110] The connection type includes clockwise connection and counterclockwise connection.

[0111] When the connection type is counterclockwise connection, the sequential connection process of each edge point is described in Figure 12B , which mainly includes the following steps:

[0112] S5043_11: For each first edge point of the right part, sequentially connect each first edge point in the order of the vertical coordinates of each first edge point from small to large.

[0113] For example, still taking Figure 11 as an example, in the right part of the split line, the order of the vertical coordinates of each first edge point from small to large is A < K < J < I < H < G < F, and then the first edge point A is connected to the first edge point K, the first edge point K is connected to the first edge point J, the first edge point J is connected to the first edge point I, the first edge point I is connected to the first edge point H, the first edge point H is connected to the first edge point G, and the first edge point G is connected to the first edge point F in this order.

[0114] S5043_12: For each second edge point of the left part, sequentially connect each second edge point in the order of the vertical coordinates of each second edge point from large to small.

[0115] For example, still taking Figure 11 as an example, in the left part of the split line, the order of the vertical coordinates of each second edge point from large to small is E > D > C > B, and then the second edge point E is connected to the second edge point D, the second edge point D is connected to the second edge point C, and the second edge point C is connected to the second edge point B in this order.

[0116] S5043_13: connecting the first edge point with the largest vertical coordinate in the right part of the split line with the second edge point with the largest vertical coordinate in the left part of the split line, and connecting the second edge point with the smallest vertical coordinate in the left part of the split line with the first edge point with the smallest vertical coordinate in the right part of the split line, to obtain a contour curve of the custom safety area.

[0117] For example, still taking Figure 11 as an example, the first edge point F with the largest vertical coordinate in the right part of the split line is connected with the second edge point E with the largest vertical coordinate in the left part of the split line, and the first edge point A with the smallest vertical coordinate in the right part of the split line is connected with the second edge point B with the smallest vertical coordinate in the left part of the split line, to obtain a contour curve A-K-J-I-H-G-F-E-D-C-B-A of the custom safety area. Figure 11 It can be known that the contour curve of the custom safety area is completely closed and has no intersection.

[0118] When the connection type is the clockwise connection, the ordered connection process of the edge points is described below with reference to Figure 12C , and mainly includes the following steps:

[0119] S5043_21: for each first edge point in the right part, the first edge points are sequentially connected in the order of the vertical coordinates of the first edge points from large to small.

[0120] For example, Figure 13 as an example, in the right part of the split line, the order of the vertical coordinates of the first edge points from small to large is G>H>I>J>K>L>A, and the first edge point G is connected to the first edge point H, the first edge point H is connected to the first edge point I, the first edge point I is connected to the first edge point J, the first edge point J is connected to the first edge point K, the first edge point K is connected to the first edge point L, and the first edge point L is connected to the first edge point A.

[0121] S5043_22: for each second edge point in the left part, the second edge points are sequentially connected in the order of the vertical coordinates of the second edge points from small to large.

[0122] For example, still taking Figure 13 as an example, in the left part of the split line, the order of the vertical coordinates of the second edge points from small to large is B

[0123] S5043_23: connecting the first edge point with the minimum vertical coordinate in the right part with the second edge point with the minimum vertical coordinate in the left part, and connecting the second edge point with the maximum vertical coordinate in the left part with the first edge point with the maximum vertical coordinate in the right part, to obtain the contour curve of the self-defined safety area.

[0124] For example, still taking the example of Figure 13 connecting the first edge point A with the minimum vertical coordinate in the right part of the split line with the second edge point B with the minimum vertical coordinate in the left part, and connecting the second edge point F with the maximum vertical coordinate in the left part with the first edge point G with the maximum vertical coordinate in the right part, to obtain the contour curve A-B-C-D-E-F-G-H-I-J-K-L-A of the self-defined safety area, Figure 13 It can be known that the contour curve of the self-defined safety area is completely closed and has no intersection.

[0125] The embodiment of the present application draws two circles passing through two points respectively by using the circle drawing method, extracts the edge points of the self-defined safety area according to the feature that the two circles passing through the non-edge points contain three or more points, sorts the vertical coordinates of the edge points, selects the reference point in the two-dimensional finite point set, and divides the edge points into left and right parts according to the horizontal coordinates of the reference point, and sequentially connects the edge points in the left and right parts. Through the special processing of the edge points, the maximum closed contour curve of the drawn complex curve or incompletely closed curve containing the non-single closed area is obtained. This method realizes efficient filtering of the drawn contour curve of the self-defined safety area in the range of the VR helmet computing power, accurately extracts the edge points of the maximum and closed self-defined safety area, improves the success rate of drawing the self-defined safety area, and reduces the difficulty of creating the self-defined safety area.

[0126] It should be noted that, Figures 12A to 12C This is only an example, and optionally, the reference point and the edge point with the same horizontal coordinate as the reference point can belong to the left part of the split line.

[0127] Meanwhile, the horizontal coordinates of the edge points can also be sorted, the edge points can be divided into upper and lower parts, and the edge points in the upper and lower parts can be sequentially connected.

[0128] S505: generating the self-defined safety area according to the contour curve.

[0129] When S505 is performed, the self-defined safety area is generated based on the contour curve and with a preset length as the height. The height can be set according to the actual scene.

[0130] Referring to Figure 14A the completely closed contour curve is obtained by connecting the extracted edge points, Figure 14BAn effect diagram of the custom safety area generated according to the profile curve is shown in Figure 14A It can be known that, by using the method for connecting the extracted edge points provided in the embodiment of the application, the profile curve of the custom safety area can be accurately obtained, so that the closed custom safety area is obtained, and the personal safety of the user is improved. Figure 14B

[0131] Referring to Figure 15A , the internal interference curve is removed by connecting the extracted edge points, the maximum completely closed profile curve is obtained, Figure 15B An effect diagram of the custom safety area generated according to the profile curve is shown in Figure 15A It can be known that, by using the method for connecting the extracted edge points provided in the embodiment of the application, the interference of the internal curve can be removed, a closed and maximum custom safety area is obtained, and the activity range of the user is expanded, so that the VR experience of the user is improved in the case of ensuring the personal safety of the user. Figure 15B

[0132] In the method for generating a custom safety area provided in the embodiment of the application, in the process of drawing a profile curve for the custom safety area of the VR device by using a handle, the intersection points of the rays of the handle and the curve of the ground in the three-dimensional space are obtained according to the set distance interval, and are projected to a two-dimensional plane, so that the three-dimensional path curve in the drawing process is abstracted into a two-dimensional finite point set, the edge points of the custom safety area are extracted from the two-dimensional finite point set, the difficulty of creating the custom safety area is reduced, the number of points of the two-dimensional finite point set included by each circle with the same radius passing through any two points is counted by using the circle drawing method, the edge points of the custom safety area are extracted in combination with the features of the non-edge points (that is, the two circles passing through the non-edge points include three or more points in the two-dimensional finite point set), the edge points of the custom safety area are sequentially connected after the edge points are extracted, so that the maximum closed profile curve of the drawn complex curve or the not completely closed curve including the non-single closed area is obtained, the drawing success rate of the custom safety area is improved, and then the custom safety area with the maximum range and closed is generated, and the personal safety of the user is improved.

[0133] Based on the same technical concept, the embodiment of the application provides a VR device, which can implement the method for generating a custom safety area in the above-mentioned embodiments, and can achieve the same technical effects.

[0134] Referring to Figure 16 The VR device includes a processor 1601, a memory 1602 and a communication interface 1603, the communication interface 1603, the memory 1602 and the processor 1601 are connected through a bus 1604;

[0135] ​​The VR device is connected with a handle through the communication interface 1603, and the handle is used to draw a contour curve of a custom safety area of the VR device.

[0136] The memory 1602 includes a data storage unit and a program storage unit, and the program storage unit stores a computer program, and the processor 1601 performs the following operations according to the computer program:

[0137] According to a set distance interval, the intersection points of the rays of the handle and the curve of the ground in the three-dimensional space are obtained, and a three-dimensional finite point set with the same horizontal coordinates is obtained and stored in the data storage unit.

[0138] The intersection points of the curve in the three-dimensional finite point set are projected onto a two-dimensional plane to obtain a two-dimensional finite point set.

[0139] From the two-dimensional finite point set, the edge points of the custom safety area are extracted, and each edge point is sequentially connected to obtain a contour curve of the custom safety area.

[0140] According to the contour curve, a custom safety area is generated.

[0141] Optionally, the processor 1601 extracts the edge points of the custom safety area from the two-dimensional finite point set, and the specific operation is as follows:

[0142] According to the number of points contained in the two-dimensional finite point set, a plurality of line segments are determined.

[0143] For each line segment, two circles with the same radius passing through the two end points of the line segment are determined, and the number of points contained in the two-dimensional finite point set is respectively determined, and the radius is greater than half of the length of the line segment.

[0144] If the number of points contained in the two circles is greater than or equal to 3, the two end points of the line segment are removed from the two-dimensional finite point set.

[0145] The remaining points in the two-dimensional finite point set after the removal are used as the edge points of the custom safety area.

[0146] Optionally, the processor 1601 determines the number of points contained in the two-dimensional finite point set in the two circles with the same radius passing through the two end points of the line segment, and the specific operation is as follows:

[0147] For any one of the two circles, a perpendicular bisector of the line segment is determined, and the perpendicular bisector passes through the center of the circle.

[0148] According to the radius and the length of the line segment, the center of the circle is determined by using the Pythagorean theorem.

[0149] According to distances from the rest of the points in the two-dimensional finite point set to the center of the circle and the radius, the number of points in the two-dimensional finite point set contained by the circle is determined.

[0150] Optionally, before the processor 1601 determines the number of points in the two-dimensional finite point set contained by two circles with the same radius and passing through the two end points of the line segment, the processor 1601 further performs the following operations:

[0151] determining whether the length of the line segment is greater than 2 times the radius;

[0152] if yes, discarding the line segment.

[0153] Optionally, the processor 1601 sequentially connects the edge points to obtain the contour curve of the self-defined safety area, and the specific operation is as follows:

[0154] sorting the ordinate of the edge points, selecting the edge point with the smallest ordinate as a reference point, and the reference point is the starting point and the ending point of the contour curve;

[0155] dividing the edge points into left and right parts according to the abscissa of the edge points, and the reference point and the edge point with the same abscissa as the reference point belong to the right part;

[0156] sequentially connecting the edge points contained by the left and right parts according to the set connection type.

[0157] Optionally, when the connection type is counterclockwise connection, the processor 1601 sequentially connects the edge points contained by the left and right parts according to the set connection type, and the specific operation is as follows:

[0158] for each first edge point in the right part, sequentially connecting the first edge points in the order of the ordinate of the first edge points from small to large;

[0159] for each second edge point in the left part, sequentially connecting the second edge points in the order of the ordinate of the second edge points from large to small;

[0160] connecting the first edge point with the largest ordinate in the right part with the second edge point with the largest ordinate in the left part, and connecting the second edge point with the smallest ordinate in the left part with the first edge point with the smallest ordinate in the right part, to obtain the contour curve of the self-defined safety area.

[0161] Optionally, when the connection type is clockwise connection, the processor 1601 sequentially connects the edge points contained by the left and right parts according to the set connection type, and the specific operation is as follows:

[0162] For each first edge point in the right part, the first edge points are sequentially connected in descending order of the longitudinal coordinates of the first edge points;

[0163] For each second edge point in the left part, the second edge points are sequentially connected in ascending order of the longitudinal coordinates of the second edge points;

[0164] The first edge point with the smallest longitudinal coordinate in the right part is connected with the second edge point with the smallest longitudinal coordinate in the left part, and the second edge point with the largest longitudinal coordinate in the left part is connected with the first edge point with the largest longitudinal coordinate in the right part, to obtain the contour curve of the self-defined safety area.

[0165] It should be noted that, Figure 16 This is only an example, and the VR device necessary for executing the steps of the method for generating the self-defined safety area provided by the embodiments of the present application is not shown. The VR device also includes common hardware of display devices, such as left and right lenses, a display screen, a speaker, a microphone, and the like.

[0166] The embodiments of the present application Figure 16 The processor involved in the embodiments of the present application can be a central processing unit (CPU), a general-purpose processor, a graphics processing unit (GPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof.

[0167] The embodiments of the present application also provide a computer-readable storage medium for storing some instructions, which can complete the method of the foregoing embodiments when executed.

[0168] The embodiments of the present application also provide a computer program product for storing a computer program, which is used to execute the method of the foregoing embodiments.

[0169] Those skilled in the art will appreciate that embodiments of the present application can be devised for a variety of other systems which are currently developed or later developed. Therefore, the present application is intended to cover all such modifications and variations of this application that are within the scope of the appended claims and their equivalents. It is intended that each element of claim 1 and 2 is independent of one another. No element of claim 1 and 2, or any other claim, is implied to depend on any other element or limitation of claim 1 and 2 or any other claim except where expressly recited in that claim.

[0170] The present application is described in reference to the flowchart and / or block diagrams of the method, apparatus (system) and computer program product according to this application. It will be understood that each block of the flowchart and / or block diagrams, and combinations of blocks in the flowchart and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.

[0171] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.

[0172] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.

[0173] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.

Claims

1. A method for generating a custom security zone, characterized in that: Applied to VR devices, including: Obtaining the intersection of the handle's ray and the curve of the ground in three-dimensional space at set distance intervals to obtain a three-dimensional finite set of points with the same horizontal coordinates. The handle is used to draw the contour curve of the custom safety zone of the VR device; Projecting the intersection points of the curves in the three-dimensional finite point set onto a two-dimensional plane to obtain a two-dimensional finite point set; Extracting edge points of the user-defined safety zone from the two-dimensional finite point set, and sequentially connecting the edge points to obtain a contour curve of the user-defined safety zone; generating a customized safety area according to the contour curve; The step of extracting edge points of the custom safety area from the two-dimensional finite point set includes: determining a plurality of line segments according to the number of points included in the two-dimensional finite point set; For each line segment, determine the number of points in the two-dimensional finite point set contained in two circles that pass through the two endpoints of the line segment and have the same radius, wherein the radius is greater than half the length of the line segment; If the number of points contained in both circles is greater than or equal to 3, then the two endpoints of the line segment are removed from the two-dimensional finite point set; The remaining points in the two-dimensional finite point set after elimination are used as edge points of the custom safety area.

2. The method according to claim 1, wherein The determining of the number of points in the two-dimensional finite point set contained in two circles passing through the two endpoints of the line segment and having the same radius includes: For any one of the two circles, determining a perpendicular bisector of the line segment, wherein the perpendicular bisector passes through the center of the circle; Determine the center of the circle using the Pythagorean theorem based on the radius and the length of the line segment; The number of points in the two-dimensional finite point set contained in the circle is determined according to the distances from the remaining points in the two-dimensional finite point set to the center of the circle and the radius.

3. The method according to claim 2, wherein Before determining the number of points in the two-dimensional finite point set respectively contained in two circles passing through the two endpoints of the line segment and having the same radius, the method further includes: Determining whether the length of the line segment is greater than twice the radius; If so, the line segment is discarded.

4. The method according to claim 1, wherein The step of sequentially connecting the edge points to obtain the contour curve of the custom safety area includes: Sort the ordinates of the edge points, and select the edge point with the smallest ordinate as a reference point, where the reference point is the starting point and the end point of the contour curve; Divide each edge point into a left and a right part according to the horizontal coordinate of each edge point, and the reference point and the edge point with the same horizontal coordinate as the reference point belong to the right part; According to the set connection type, the edge points included in the left and right parts are connected in order.

5. The method according to claim 4, wherein When the connection type is counterclockwise connection, the edge points included in the left and right parts are connected according to the set connection type, including: For each first edge point in the right part, connect the first edge points in order from the smallest to the largest vertical coordinates; For each second edge point in the left portion, connect the second edge points in order of their ordinates from largest to smallest. The first edge point with the largest vertical coordinate in the right part is connected to the second edge point with the largest vertical coordinate in the left part, and the second edge point with the smallest vertical coordinate in the left part is connected to the first edge point with the smallest vertical coordinate in the right part to obtain the contour curve of the custom safety area.

6. The method according to claim 4, wherein When the connection type is a clockwise connection, the edge points included in the left and right parts are connected according to the set connection type, including: For each first edge point in the right part, connect the first edge points in order from largest to smallest according to their ordinates; For each second edge point in the left part, connect the second edge points in order from the smallest to the largest vertical coordinates; The first edge point with the smallest vertical coordinate in the right part is connected to the second edge point with the smallest vertical coordinate in the left part, and the second edge point with the largest vertical coordinate in the left part is connected to the first edge point with the largest vertical coordinate in the right part to obtain the contour curve of the custom safety area.

7. A VR device, characterized in that: comprising a processor, a memory and a communication interface, wherein the communication interface, the memory and the processor are connected via a bus; The VR device is connected to the handle via the communication interface, and the handle is used to draw a contour curve of a custom safety zone of the VR device; The memory includes a data storage unit and a program storage unit, the program storage unit stores a computer program, and the processor performs the following operations according to the computer program: Obtaining the intersection of the handle's ray and the curve of the ground in three-dimensional space at set distance intervals, obtaining a three-dimensional finite point set with the same horizontal coordinates and storing it in the data storage unit; Projecting the intersection points of the curves in the three-dimensional finite point set onto a two-dimensional plane to obtain a two-dimensional finite point set; Extracting edge points of the user-defined safety zone from the two-dimensional finite point set, and sequentially connecting the edge points to obtain a contour curve of the user-defined safety zone; generating a customized safety area according to the contour curve; The processor extracts edge points of the custom safety area from the two-dimensional finite point set, specifically by performing the following operations: determining a plurality of line segments according to the number of points included in the two-dimensional finite point set; For each line segment, determine the number of points in the two-dimensional finite point set contained in two circles that pass through the two endpoints of the line segment and have the same radius, wherein the radius is greater than half the length of the line segment; If the number of points contained in both circles is greater than or equal to 3, then the two endpoints of the line segment are removed from the two-dimensional finite point set; The remaining points in the two-dimensional finite point set after elimination are used as edge points of the custom safety area.

8. The VR device according to claim 7, wherein: The processor sequentially connects the edge points to obtain the contour curve of the custom safety area. The specific operation is: Sort the ordinates of the edge points, and select the edge point with the smallest ordinate as a reference point, where the reference point is the starting point and the end point of the contour curve; Divide each edge point into a left and a right part according to the horizontal coordinate of each edge point, and the reference point and the edge point with the same horizontal coordinate as the reference point belong to the right part; According to the set connection type, the edge points included in the left and right parts are connected in order.

Citation Information

Patent Citations

  • Method for calculating SRF, SRA and SRV based on micro-seismic monitoring three-dimensional point set

    CN105223611A

  • method for simplifying three-dimensional CAD geometric model

    CN109522635A

  • Sole glue spraying equipment based on monocular vision

    CN209281477U