Distortion detection method and system, electronic device and storage medium
By determining the position of the marking points and the field of view coefficient in the image and calculating the degree of distortion of different fields of view, the problem of inability to detect different field of view distortions in traditional methods is solved, and the detection efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202311846706.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2043-12-28
AI Technical Summary
The prior art cannot detect distortions under different fields of view at one time, resulting in insufficiency of detection.
The test image displayed by the equipment to be tested is collected, and by determining the position of multiple marking points in the reference coordinate system, selecting the target marking point corresponding to the target field of view, and calculating the degree of distortion of the target field of view.
It realizes the detection of multiple fields of view distortion in a single acquisition image, which improves detection efficiency and accuracy.
Smart Images

Figure CN120232618A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of imaging quality detection, and particularly to a distortion detection method, system, electronic device, and storage medium. Background Art
[0002] The existence of display distortion in XR glasses will cause picture distortion and discomfort in visual perception, affecting the immersion of using XR glasses. Therefore, it is necessary to detect the display distortion of XR glasses. As a product of high coupling of optics and software, the optical scheme of the glasses brings imaging distortion, and the software cancels the distortion brought by the optical scheme by performing anti-distortion processing on the displayed image. Generally speaking, the closer to the edge of the field of view, the greater the distortion, and the distortion sizes of different fields of view are different. Therefore, a solution is needed to detect the picture distortion of different field-of-view sizes and different positions.
[0003] Traditional distortion detection methods usually use a white-field chart or a nine-point chart as a calibration image. The detection principles of these two calibration images are similar, both by extracting the position information of the white-field edge and corner points or the nine-point center to calculate the distortion of a single field-of-view size. However, the limitation of this method is that it can only detect the distortion of one field of view at a time. If you want to calculate the distortion of other field-of-view sizes, you need to adjust the size of the white-field image or the position of the points in the nine-point chart, resulting in an increase in the number of measurements and cuttings, and reducing the detection efficiency.
[0004] Regarding the problem in the related art that the distortion under different fields of view cannot be detected at one time, no effective solution has been proposed yet. Summary of the Invention
[0005] In this embodiment, a distortion detection method, system, electronic device, and storage medium are provided to solve the problem in the related art that the distortion under different fields of view cannot be detected at one time.
[0006] In the first aspect, in this embodiment, a distortion detection method is provided, including:
[0007] Collect a test image obtained by a device under test displaying a reference device, where the test image includes an array composed of a plurality of identification points;
[0008] Determine the positions of the plurality of identification points in a reference coordinate system;
[0009] According to the positions of the plurality of identification points in the reference coordinate system, determine target identification points corresponding to a target field of view, and calculate the distortion degree of the target field of view based on the target identification points.
[0010] In some of these embodiments, determining the positions of the plurality of identification points in a reference coordinate system includes:
[0011] Determine a reference point among the multiple identification points and number the reference point;
[0012] Starting from the reference point and based on the adjacent relationship between the multiple identification points, sequentially number the multiple identification points.
[0013] In some embodiments, starting from the reference point and based on the adjacent relationship between the multiple identification points, sequentially numbering the multiple identification points includes:
[0014] Obtain the current first identification point and the number of the current first identification point, where the current first identification point is in the same row or the same column as the reference point;
[0015] Determine the directly adjacent and / or indirectly adjacent neighbor points of the current first identification point in the first arrangement direction of the array, and number the neighbor points according to the adjacent relationship between the neighbor points and the current first identification point;
[0016] Determine the identification points directly adjacent to the current first identification point in the second arrangement direction of the array, number the identification points directly adjacent to the current first identification point, and use it as the next first identification point.
[0017] In some embodiments, determining a reference point among the multiple identification points includes:
[0018] Determine three reference points among the multiple identification points, where the reference points have different attributes from the remaining identification points;
[0019] Determine the common neighbor point that is directly adjacent to all three reference points, and use the common neighbor point as the reference point.
[0020] In some embodiments, after determining three reference points among the multiple identification points, the method further includes:
[0021] Calculate the inclination degree of the test image according to the three reference points;
[0022] Perform inclination correction on the test image according to the inclination degree.
[0023] In some embodiments, after collecting the test image obtained by the device under test displaying the reference device, the method further includes:
[0024] Screen out the identification points whose sizes exceed the preset range among the multiple identification points.
[0025] In some embodiments, determining the target identification points corresponding to the target field of view according to the positions of the multiple identification points in the reference coordinate system includes:
[0026] Determine the field of view coefficient corresponding to the target field of view size;
[0027] According to the field of view coefficient, determine the target identification points, where the target identification points include points directly above and directly below the target field of view, points directly to the left and directly to the right, and vertices on the diagonal.
[0028] In some embodiments thereof, calculating the distortion degree of the target field of view based on the target identification points includes:
[0029] Based on the target identification points, calculate the vertical distortion degree and / or the horizontal distortion degree of the target field of view.
[0030] In some embodiments thereof, the method includes: determining a first boundary length and a second boundary length on the left and right sides in the target field of view according to the vertices on the diagonal of the target field of view;
[0031] Determine the vertical diameter length inside the target field of view according to the points directly above and directly below the target field of view;
[0032] According to the first boundary length, the second boundary length and the vertical diameter length, calculate the vertical distortion degree of the target field of view; and / or,
[0033] Determine a third boundary length and a fourth boundary length on the upper and lower sides in the target field of view according to the vertices on the diagonal of the target field of view;
[0034] Determine the horizontal diameter length inside the target field of view according to the points directly to the left and directly to the right of the target field of view;
[0035] According to the third boundary length, the fourth boundary length and the horizontal diameter length, calculate the horizontal distortion degree of the target field of view.
[0036] In a second aspect, in this embodiment, a distortion detection system is provided, including: a detection device, a device to be measured, and a reference device displayed by the device to be measured; wherein,
[0037] The reference device is used for the device to be measured to take pictures to obtain a test image, and the reference device is provided with an array composed of a plurality of identification points;
[0038] The detection device is used to execute the distortion detection method described in the first aspect above.
[0039] In some embodiments thereof, the plurality of identification points include three reference points, and the reference points have different attributes from the remaining identification points.
[0040] In some of these embodiments, the field of view angle of the detection device is greater than the field of view angle of the device under test.
[0041] In some of these embodiments, the distortion detection system further includes: a motion mechanism, connected to the detection device and / or the device under test, for adjusting the position of the detection device and / or the device under test.
[0042] In a third aspect, an electronic device is provided in this embodiment, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the distortion detection method described in the first aspect above.
[0043] In a fourth aspect, a computer-readable storage medium is provided in this embodiment, on which a computer program is stored. When the computer program is executed by a processor, the steps of the distortion detection method described in the first aspect above are implemented.
[0044] For the above-mentioned distortion detection method, system, electronic device and storage medium, only one test image obtained by the device under test displaying the reference device needs to be collected, and then target identification points corresponding to one or more fields of view can be selected in the dot matrix of the test image, so as to detect the distortion under one or more fields of view, solving the problem that the distortion under different fields of view cannot be detected at one time. Compared with the traditional method of collecting and detecting images of different fields of view one by one, the detection efficiency and accuracy are greatly improved.
[0045] Details of one or more embodiments of the present application are set forth in the following drawings and description, so that other features, objects, and advantages of the present application will become more clearly understood. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments and descriptions thereof of the present application are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:
[0047] Figure 1 It is a hardware structure block diagram of a terminal for the distortion detection method in an embodiment;
[0048] Figure 2 It is a flowchart of the distortion detection method in an embodiment;
[0049] Figure 3 It is a schematic diagram of a reference device in an embodiment;
[0050] Figure 4 It is a schematic diagram of target identification points corresponding to a field of view in an embodiment;
[0051] Figure 5Flow chart of the vertical distortion calculation method in an embodiment;
[0052] Figure 6 Flow chart of the horizontal distortion calculation method in an embodiment;
[0053] Figure 7 Flow chart of the point sorting in an embodiment;
[0054] Figure 8 Flow chart of the point sorting in another embodiment;
[0055] Figure 9 Structural schematic diagram of the distortion detection system in an embodiment;
[0056] Figure 10 Structural schematic diagram of the distortion detection system in another embodiment;
[0057] Figure 11 Working flow chart of the distortion detection system in an embodiment;
[0058] Figure 12 Working flow chart of the distortion detection system in another embodiment;
[0059] Figure 13 Internal structure diagram of the computer device in an embodiment. Detailed implementation manners
[0060] To understand the purpose, technical solution and advantages of the present application more clearly, the present application is described and illustrated below with reference to the accompanying drawings and embodiments.
[0061] Unless otherwise defined, technical terms or scientific terms involved in this application shall have the ordinary meanings understood by those with ordinary skills in the technical field to which this application belongs. In this application, words such as "a", "an", "one kind", "the", "these", etc. do not indicate a limitation in quantity, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent in these processes, methods, products or devices. The terms "connect", "be connected", "couple" and other similar words involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly connected or indirectly connected. The "plurality" involved in this application means two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, and B exists alone. Usually, the character " / " indicates that the objects associated before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific order for the objects.
[0062] The method embodiment provided in this embodiment can be executed on a terminal, a computer or a similar computing device. For example, when running on a terminal, Figure 1 is a hardware structure block diagram of a terminal for a distortion detection method according to an embodiment of this application. As Figure 1 shown, the terminal may include one or more ( Figure 1 only one is shown in the figure) processors 102 and a memory 104 for storing data. Among them, the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above terminal. For example, the terminal may further include more or fewer components than those Figure 1 shown in the figure, or have a different configuration from that Figure 1 shown.
[0063] The memory 104 can be used to store computer programs, such as software programs and modules of application software, such as the computer program corresponding to the distortion detection method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, that is, implements the above method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories can be connected to the terminal through a network. Examples of the above network include but are not limited to the Internet, intranet, local area network, mobile communication network, and combinations thereof.
[0064] The transmission device 106 is used to receive or send data via a network. The above network includes the wireless network provided by the communication provider of the terminal. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0065] In one embodiment, as Figure 2 shown, a distortion detection method is provided. Taking the method applied to the Figure 1 terminal as an example, the method includes the following steps:
[0066] Step S101, collect a test image obtained by the device under test displaying a reference device. The test image includes an array composed of a plurality of identification points.
[0067] The device under test can be an XR (Extended Reality), camera, or other device with an optical imaging function. "Collect a test image obtained by the device under test displaying a reference device" means that by displaying the screen of the reference device on the device under test, the terminal captures the screen displayed by the device under test, and then obtains the test image. The reference device is provided with an array composed of a plurality of identification points, that is, the test image belongs to a dot matrix image. The identification points can be understood as points with specific positions and features in the image. For example, they can include certain special shapes (such as circles, rectangles, triangles), colors, or texture regions in the image. These identification points are arranged in rows and columns to form an array. The reference coordinate system is a standard reference system used to measure and compare the positions of the identification points, and it can be a two-dimensional plane coordinate system.
[0068] In some embodiments, three reference points are included among the multiple identification points. The reference points and the remaining identification points have different attributes (such as size, shape, color, or texture). The function of the three reference points is to locate the center point of the test image and identify the orientation of the test image. Among them, the center point of the test image is the common neighbor point that is directly adjacent to all three reference points. By "directly adjacent", it means that there are no other identification points between two identification points. Correspondingly, by "indirectly adjacent", it means that there are other identification points between two identification points. The descriptions of "directly adjacent" and "indirectly adjacent" that appear below can be understood with reference to this definition.
[0069] As an example, Figure 3 is a schematic diagram of an optional example of the reference device. As Figure 3 shown, the reference device can be a reticle. An image composed of small dots distributed from the 0 field of view to the 1.0 field of view is set on the reticle, which is called the reticle image. The small dots are the identification points. Among them, the radii of the adjacent dots above, below, and to the right of the central dot are twice the radii of the remaining dots. These three large dots serve as reference points, and their function is to locate the central dot and identify the orientation of the reticle image. It should be noted that when the test image, the reticle image, and the dot matrix image are mentioned in the embodiments, they can all refer to the images displayed by the device under test and can be replaced with each other.
[0070] Step S102, determine the positions of the multiple identification points in the reference coordinate system.
[0071] By collecting the dot matrix image and determining the positions of the identification points in the reference coordinate system, an accurate image position model can be established. Then, by selecting the target identification points corresponding to the target field of view, the distortion degree of the target field of view can be calculated to reflect the imaging quality of the device under test in the target field of view.
[0072] Step S103, according to the positions of the multiple identification points in the reference coordinate system, determine the target identification points corresponding to the target field of view, and calculate the distortion degree of the target field of view based on the target identification points.
[0073] The field of view refers to the angular range corresponding to the display area or the visible area. Distortion refers to the phenomena such as squeezing, stretching, offsetting, and twisting of the geometric positions of the image pixels during the imaging process relative to the reference system, which causes changes in the geometric position, size, shape, orientation, etc. of the image. The target field of view can be one or more. When it is necessary to detect the distortion degrees of at least two fields of view, the target identification points corresponding to different fields of view can be selected, and the distortion degrees of each field of view can be calculated respectively to reflect the imaging quality of the device under test in different fields of view. Among them, different fields of view can be understood as the image scenes seen from different observation angles or distances.
[0074] When extracting the target identification points, the field of view coefficient corresponding to the target field of view size can be determined first; based on the field of view coefficient, the target identification points are determined, and the target identification points include the points directly above and below the corresponding field of view, the points directly to the left and right, and the vertices on the diagonal. Figure 4 It is a schematic diagram of the target identification points corresponding to a field of view, as Figure 4 shown. The target identification points corresponding to this field of view are respectively: the point P5(-k, 0) directly above the field of view and the point P7(k, 0) directly below it, the point P8(0, -k) directly to the left of the field of view and the point P6(0, k) directly to the right of it, and the vertices on the two diagonal lines, including the upper left vertex P1(-k, -k), the upper right vertex P2(k, -k), the lower right vertex P3(k, k), and the lower left vertex P4(-k, k), where k represents the coefficient corresponding to the field of view size, such as 0.1F corresponding to k = 1. After obtaining the target identification points, the distortion degree of the target field of view can be calculated based on the target identification points. The vertical distortion degree and / or horizontal distortion degree of the target field of view can be calculated based on the target identification points. The calculation methods of the vertical distortion degree and the horizontal distortion degree will be introduced separately below.
[0075] Figure 5 The flowchart of the vertical distortion calculation method is given, as Figure 5 shown. The vertical distortion calculation method is as follows:
[0076] Step S201, according to the vertices P1, P2, P3, and P4 on the diagonal of the target field of view, determine the first boundary length L14 and the second boundary length L23 on the left and right sides of the target field of view; where L14 is the distance between the vertices P1 and P4, and L23 is the distance between the vertices P2 and P3.
[0077] Step S202, according to the point P5 directly above the target field of view and the point P7 directly below it, determine the vertical diameter length L57 inside the target field of view.
[0078] Step S203, according to the first boundary length L14, the second boundary length L23, and the vertical diameter length L57, calculate the vertical distortion degree of the target field of view. The calculation formula is as follows:
[0079]
[0080] Figure 6 The flowchart of the horizontal distortion calculation method is given, as Figure 6 shown. The horizontal distortion calculation method is as follows:
[0081] Step S301, determining the third boundary length L12 and the fourth boundary length L43 on the upper and lower sides of the target field of view according to the vertices P1, P2, P3, and P4 located on the diagonal line of the target field of view; wherein L12 is the distance between vertices P1 and P2, and L43 is the distance between vertices P3 and P4.
[0082] Step S302, determining the horizontal path length L86 inside the target field of view based on the point P8 located to the left and the point P6 located to the right of the target field of view.
[0083] Step S303, calculating the horizontal distortion degree of the target field of view according to the third boundary length L12, the fourth boundary length L43 and the horizontal path length L86, the calculation formula is as follows:
[0084]
[0085] It should be noted that the steps shown in the above process or the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the present application provides method operation steps as shown in the above embodiments or the accompanying drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided in the embodiment of the present application. For example, step S201 and step S202 can be swapped in order or executed synchronously, and step S301 and step S302 can be swapped in order or executed synchronously, which is not limited in this embodiment.
[0086] In the above steps S101 to S103, it is only necessary to collect the test image obtained by the display reference device of the device under test once, and then select the target identification points corresponding to one or more fields of view in the dot matrix of the test image, so as to detect the distortion under one or more fields of view, which solves the problem that the distortion under different fields of view cannot be detected at one time. Compared with the traditional method of collecting images of different fields of view one by one for detection, the detection efficiency and accuracy are greatly improved.
[0087] In one embodiment, step S102 can be implemented as follows: determine a reference point among multiple identification points and number the reference points; and sequentially number the multiple identification points starting from the reference point and based on the adjacent relationship between the multiple identification points and the reference points.
[0088] The reference point can be the center point of the test image, the origin of the reference coordinate system, or other identification points. The reference point can be determined based on several reference points, that is, three reference points are determined from multiple identification points, and the reference points and the other identification points have different attributes; the common neighbor points directly adjacent to the three reference points are determined, and the common neighbor points are used as reference points. As an example, refer toFigure 3 , the reference point is the center point of the test image, that is, the central dot. In the test image, the radii of the adjacent dots above, below, and to the right of the central dot are twice the radii of the remaining dots. These three large dots are used as reference points, and the common neighbor points that are directly adjacent to all three reference points are determined. The common neighbor points are used as the reference point.
[0089] Among them, when sequentially numbering multiple identification points starting from the reference point and based on the adjacent relationship between multiple identification points, it can be achieved by Figure 7 the method shown. Figure 7 is the flowchart of the point position sorting of this embodiment. As Figure 7 shown, this process includes the following steps:
[0090] Step S401, obtain the current first identification point and the number of the current first identification point. The current first identification point is in the same row or the same column as the reference point. This step is used to locate the row or column that needs to be numbered currently. The first identification point refers to the starting point of the numbering in the row or column that needs to be numbered currently. It should be noted that when performing the first round (executing steps S401 to S403 once is called a round) of point position sorting, the current first identification point is the reference point. However, when performing subsequent rounds of point position sorting, this first identification point may not necessarily be the reference point and may be a point in a certain row or a certain column in the array.
[0091] Step S402, determine the neighbor points that are directly adjacent and / or indirectly adjacent to the current first identification point in the first arrangement direction of the array, and number the neighbor points according to the adjacent relationship between the neighbor points and the current first identification point. This step can be used to number the points in the located row or column.
[0092] Step S403, determine the identification points that are directly adjacent to the current first identification point in the second arrangement direction of the array, number the identification points that are directly adjacent to the current first identification point, and use them as the next first identification point. This step can be used to locate the next row or column that needs to be numbered.
[0093] Among them, the first arrangement direction can be the horizontal arrangement direction of the array, that is, the row direction, and the second arrangement direction can be the column arrangement direction of the array, that is, the column direction. Of course, the first arrangement direction can also be the vertical arrangement direction of the array, that is, the column direction, and the second arrangement direction can be the horizontal arrangement direction of the array, that is, the row direction.
[0094] In this embodiment, the point sorting can be performed row by row or column by column. Whenever a row or a column is sorted, the next row or column will be found nearby for sorting, and so on. It can be understood that the above steps S401 to S403 can be executed in a loop. The more times the loop is executed, the more points will be sorted and numbered. Optionally, if only the distortion degree of one or a few fields of view needs to be detected, only some of the identification points need to be sorted and numbered, that is, the loop only needs to be executed several times. Optionally, if multiple fields of view or even the entire field of view need to be detected, all the identification points need to be sorted and numbered, that is, the loop continues until all the identification points in the test image are numbered.
[0095] Considering that in actual acquisition of test images, there are unfavorable situations such as incomplete display of the picture (the round dots at the edges and corners cannot be fully captured due to the display limitation of the device under test), occlusion of the round dots (part of the round dots are occluded by dirty lenses), and tilting of the picture (due to structural interference, the measurement position cannot be guaranteed to be at the eye point position or causes the picture to rotate). To cope with these unfavorable situations, in some embodiments, the reference point is selected as an identification point that is not at the image edge or corner. In other embodiments, to achieve the best point sorting effect, the reference point is selected as the center point of the test image. With such settings, it is possible to detect and sort the captured identification points as much as possible, thereby improving the robustness of the algorithm and also having a high tolerance for the display performance of the device under test and the test scenario.
[0096] As an example, Figure 8 a flowchart for sorting all the identification points starting from the center point of the test image is given. As Figure 8 shown, starting from the center point of the test image, neighboring points are searched simultaneously to the left and right. The j value decreases to the left and increases to the right for numbering; after the current row is sorted, starting from the center point of the current row, neighboring points are searched upward, that is, the row above the current row is taken as the current row, and the center point of the current row is (i - k, 0); starting from the center point of the current row, neighboring points are searched simultaneously to the left and right, and the found neighboring points are marked with row and column numbers (i, j); similarly, the center points of each row are continuously searched upward, and neighboring points are searched to the left and right from the center point of each row until all the identification points in the upper half are marked; similarly, starting from the center point (0, 0) again, downward according to the neighboring relationship, the row and column numbers (i, j) of all the numbered points are marked.
[0097] Figure 8 The given solution is to number each row of the upper half of the picture first, and then number each row of the lower half of the picture. In some of these embodiments, it can be imitated Figure 8For the process, first number each row of the lower half of the figure, and then number each row of the upper half of the figure. Or, first number each column of the left half of the figure, and then number each column of the right half of the figure. Or, first number each column of the right half of the figure, and then number each column of the left half of the figure. It should be understood that all of these belong to the technical solutions covered by the point position sorting method provided in this application. Without departing from the concept of this application, several deformations and improvements can be made, and all of these belong to the protection scope of this application.
[0098] In some embodiments, in order to make the distortion detection result more accurate, before the above-mentioned step S102, the test image can be corrected for distortion according to the distortion parameters calibrated by the device under test.
[0099] Further, before determining the positions of multiple identification points in the reference coordinate system, filter out the identification points whose sizes exceed the preset range among the multiple identification points, that is, filter out the too large or too small identification points. Taking circular identification points as an example, the test image can be first binarized; then, morphological operations are performed on the image to remove the interference of other discrete information in the environment; spot detection is performed to detect all the circular dots in the picture, and the centers and radii of the circular dots are recorded; based on the size information of all the detected circular dots, filter out the too large and too small circular dots.
[0100] After determining three reference points among the multiple identification points, the inclination degree of the test image can also be calculated according to the three reference points; according to the inclination degree, the test image is corrected for inclination.
[0101] In one embodiment, a distortion detection system is also provided. Figure 9 is a schematic structural diagram of the distortion detection system of this embodiment, as Figure 9 shown, the distortion detection system includes: a detection device 1, a device under test, and a reference device 3 displayed by the device under test. Among them, the reference device 3 is used for the device under test 2 to display to obtain a picture, and the reference device 3 is provided with an array composed of multiple identification points; the detection device 1 is used to collect the picture displayed by the device under test 2 to obtain a test image, and perform the distortion detection method of any of the above embodiments based on the test image. Among them, the multiple identification points include three reference points, and the reference points and the remaining identification points have different attributes (such as size, shape, color or texture). The function of the three reference points is to locate the center point of the test image and identify the direction of the test image. Among them, the center point of the test image is the common neighbor point directly adjacent to all three reference points. If full-field distortion is to be detected, the field of view angle of the detection device can be greater than the field of view angle of the device under test.
[0102] Those of ordinary skill in the art can understand that Figure 9 the structure shown is only schematic, and it does not limit the structure of the above terminal. For example, the distortion detection system may further include moreFigure 9 more or fewer components shown, or having a different configuration from that Figure 9 shown.
[0103] In one embodiment, another distortion detection system is provided. Figure 10 As shown in the structural schematic diagram of the distortion detection system of this embodiment, Figure 10 as shown, the distortion detection system includes: a detection device 1, a device under test 2, a reference device 3, and a motion mechanism 4. Among them, the motion mechanism 4 is connected to the detection device 1 and / or the device under test 2 and is used to adjust the positions of the detection device 1 and / or the device under test 2.
[0104] In some embodiments, the device under test 2 can be an XR (Extended Reality) glasses, a camera, or other devices with optical imaging functions. XR glasses are devices that integrate VR (Virtual Reality), AR (Augmented Reality), and MR (Mixed Reality) technologies. The distortion problem of XR glasses will cause image distortion and uncomfortable viewing experience, affecting the immersion of users, so it is necessary to detect the distortion of XR glasses.
[0105] An XR detection device is a point-scanning detection device based on a high-pixel angular resolution and small field-of-view lens. The scheme for detecting distortion of such devices is similar to traditional distortion detection methods. The calibration plate image is also a white-field image. The motion robotic arm is aligned with the edges and corner points of the white field, and the distortion is calculated according to the angle of the robotic arm movement. This method has the same limitation, that is, it can only detect the distortion under one field-of-view size at a time, and since the detection needs to be carried out through the movement of the robotic arm, the detection efficiency is lower than that of traditional distortion detection methods.
[0106] The following will introduce an example of detecting the distortion of XR glasses through the distortion detection system provided by this application.
[0107] The distortion detection system of this embodiment can refer to Figure 10 . The detection device 1 is adapted to the device under test 2. If it is necessary to detect the full-field distortion, the field-of-view angle of the detection device 1 can be set to be greater than the field-of-view angle of the device under test 2. As an example, the field-of-view angle of the detection device 1 adopted in this embodiment is 144° diagonally.
[0108] Regarding the reference device 3, reference can be made to Figure 3 , and the full-field distortion detection calibration plate image is composed of small dots distributed from 0 field-of-view to 1.0 field-of-view. The radii of the adjacent dots above, below, and to the right of the central dot are twice the radii of the other dots. These three large dots are used as reference points to locate the central dot and identify the direction of the calibration plate image.
[0109] The device under test 2 photographs the reference device 3 and displays the reticle image. Either the detection device 1 or the device under test 2 can be fixed on the motion mechanism 4, and the detection position is adjusted through the motion mechanism 4 so that the center 11 of the front end of the probe of the detection device 1 coincides with the eye point position 21 of the device under test 2. After the center 11 of the front end of the probe of the detection device 1 coincides with the eye point position 21 of the device under test 2, the detection device 1 collects the reticle image displayed by the device under test 2, invokes the distortion detection method provided by this application, performs the detection of the full-field distortion, and outputs the detection results of different field sizes.
[0110] Figure 11 is the flowchart of the operation of the distortion detection system of this embodiment, as Figure 11 shown, this process includes the following steps:
[0111] Step S501, adjust the relative positions of the detection device and the device under test;
[0112] Step S502, the device under test displays the reticle image;
[0113] Step S503, the detection device collects the reticle image;
[0114] Step S504, detect the degree of full-field distortion based on the reticle image;
[0115] Step S505, output the result.
[0116] To further understand the operation flow of the above distortion detection system, specifically, Figure 12 is another flowchart of the operation of the distortion detection system of this embodiment, as Figure 12 shown, this process includes the following steps:
[0117] Step S61, obtain the reticle image photographed by the detection device.
[0118] Step S62, perform distortion correction on the reticle image based on the calibrated camera distortion parameters.
[0119] Step S63, extract all the dots. It includes the following steps:
[0120] Step S631, perform binarization operation on the reticle image;
[0121] Step S632, perform morphological operation on the reticle image to remove the interference of other discrete information in the environment;
[0122] Step S633, perform spot detection on the reticle image, detect all the circles in the picture, and record the center and radius of the circles;
[0123] Step S634: Based on the size information of all the detected circles, filter out the circles that are too large and too small.
[0124] Step S64: Sort all the detected dot points. The serial number of each dot point is identified by two numbers (i, j), where i represents the row number and j represents the column number. It includes the following steps:
[0125] Step S641: According to the size of the dot points, find three reference dot points with larger radii;
[0126] Step S642: Based on the relative position relationship among the three reference dot points, locate the three reference dot points and distinguish the dot points located above, below, and to the right of the center point;
[0127] Step S643: Based on the position information of the three detected reference dot points, calculate the inclination of the entire picture. If the picture is inclined, perform inclination correction;
[0128] Step S644: Establish an adjacent relationship for all dot points;
[0129] Step S645: According to the adjacent relationship, find the common adjacent points of the three reference dot points, which are the center point (0, 0);
[0130] Step S646: Starting from the center point of the template image, search for adjacent points to the left and right simultaneously. The j value decreases when moving left and increases when moving right; after sorting the current row, starting from the center point of the current row, search for adjacent points upward, that is, take the row above the current row as the current row, and the center point of the current row is (i - k, 0); starting from the center point of the current row, search for adjacent points to the left and right simultaneously, and mark the row and column numbers (i, j) of the found adjacent points; similarly, continuously search for the center points of each row upward, and search for adjacent points to the left and right from the center point of each row until all the identification points in the upper half are marked; similarly, starting from the center point (0, 0) again, mark the row and column numbers (i, j) of all the numbered points downward according to the adjacent relationship.
[0131] Step S65: Based on the sorting result, extract the points that need to participate in the distortion operation according to the row and column numbers of each point. Refer to Figure 4 , the target identification points corresponding to a certain field of view are: the point P5(-k, 0) directly above the field of view and the point P7(k, 0) directly below, the point P8(0, -k) directly to the left of the field of view and the point P6(0, k) directly to the right, and the vertices on the two diagonal lines, including the upper left vertex P1(-k, -k), the upper right vertex P2(k, -k), the lower right vertex P3(k, k), and the lower left vertex P4(-k, k), where k represents the coefficient corresponding to the field of view size, such as k = 1 for 0.1F.
[0132] Step S66: Calculate the distortion of different fields of view based on the distortion calculation formula.
[0133]
[0134]
[0135] This step can refer to Figure 5 、 Figure 6 the embodiments shown, where Dv is the vertical distortion and Dh is the horizontal distortion.
[0136] Step S67: Output the distortion results of different field of view sizes and positions.
[0137] In this embodiment, based on the large field of view camera and the dot matrix target image, the one-time detection of the distortion of different fields of view of the XR glasses is realized. Among them, the dot matrix target image can realize the extraction of the center point and the detection and correction of the image direction through one picture. Compared with the traditional distortion detection method based on a full-white picture or a nine-point picture, all fields of view are detected with only one picture, resulting in a significant improvement in detection efficiency. Based on the distortion detection method of this embodiment, in adverse situations such as incomplete display of the picture (the dots at the edges and corners cannot be fully captured due to the display limitation of the device under test), dot occlusion (the lens is dirty and blocks some dots), and picture tilt (due to structural interference, the measurement position cannot be guaranteed at the eye point position or causes the picture to rotate), it is also possible to detect and sort all the captured dots. The algorithm has strong robustness and a high tolerance for the display performance of the device under test and the test scenario. The position positioning accuracy of the dot extraction scheme is often higher than that of the white field edge extraction scheme. After testing and verification, the distortion detection error of each field of view in this embodiment is less than 0.1%.
[0138] In this embodiment, an electronic device is also provided, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0139] Optionally, the above electronic device may further include a transmission device and an input / output device, where the transmission device is connected to the above processor, and the input / output device is connected to the above processor.
[0140] Optionally, in this embodiment, the above processor may be configured to execute the following steps through a computer program:
[0141] S1: Obtain a test image captured by the device under test for a reference device, where the test image includes an array composed of multiple identification points;
[0142] S2: Determine the positions of the multiple identification points in the reference coordinate system;
[0143] S3. Based on the positions of multiple identification points in the reference coordinate system, determine the target identification points corresponding to at least two different fields of view, and calculate the distortion degrees of at least two different fields of view based on the target identification points.
[0144] It should be noted that for the specific examples in this embodiment, reference can be made to the examples described in the above embodiments and optional implementation manners, and details will not be repeated in this embodiment.
[0145] In addition, in combination with the distortion detection method provided in the above embodiments, a storage medium can also be provided in this embodiment to implement it. A computer program is stored on the storage medium; when the computer program is executed by a processor, any one of the distortion detection methods in the above embodiments is implemented.
[0146] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 13 shown. The computer device includes a processor, a memory, a communication interface, a display unit, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, a distortion detection method is implemented. The display unit of the computer device can be a liquid crystal display unit or an electronic ink display unit, and the input device of the computer device can be a touch layer covering the display unit, or a button, a trackball, or a touchpad provided on the shell of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0147] Those skilled in the art can understand that Figure 13 the structure shown in
[0148] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0149] Obviously, the accompanying drawings are only some examples or embodiments of the present application. For those of ordinary skill in the art, the present application can also be applied to other similar situations based on these drawings without creative efforts. Additionally, it can be understood that although the work done during this development process may be complex and time-consuming, for those of ordinary skill in the art, certain design, manufacturing, or production changes based on the technical content disclosed in the present application are only routine technical means and should not be regarded as insufficient disclosure of the present application.
[0150] The term "embodiment" in the present application means that the specific features, structures, or characteristics described in connection with the embodiment can be included in at least one embodiment of the present application. The phrase appears in various positions in the specification and does not necessarily mean the same embodiment, nor does it mean independence or alternative to other embodiments that are mutually exclusive. Those of ordinary skill in the art can clearly or implicitly understand that the embodiments described in the present application can be combined with other embodiments without conflict.
[0151] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or fully authorized by all parties. The acquisition, storage, use, processing, etc. of data in the embodiments of the present application all comply with the relevant provisions of national laws and regulations.
[0152] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include Read-Only Memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0153] The above embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of patent protection. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A distortion detection method, characterized in that, Comprising: Collecting a test image obtained by a device under test displaying a reference device, the test image including an array composed of a plurality of identification points; Determining the positions of the plurality of identification points in a reference coordinate system; According to the positions of the plurality of identification points in the reference coordinate system, determining target identification points corresponding to a target field of view, and calculating a distortion degree of the target field of view based on the target identification points.
2. The distortion detection method according to claim 1, wherein Determining the positions of the plurality of identification points in the reference coordinate system includes: Determining a reference point among the plurality of identification points and numbering the reference point; Starting from the reference point and based on the adjacent relationships between the plurality of identification points, sequentially numbering the plurality of identification points.
3. The distortion detection method according to claim 2, wherein Starting from the reference point and based on the adjacent relationships between the plurality of identification points, sequentially numbering the plurality of identification points includes: Obtaining a current first identification point and the number of the current first identification point, the current first identification point being in the same row or the same column as the reference point; Determining, in a first arrangement direction of the array, directly adjacent and / or indirectly adjacent neighbor points of the current first identification point, and numbering the neighbor points according to the adjacent relationships between the neighbor points and the current first identification point; Determining, in a second arrangement direction of the array, identification points directly adjacent to the current first identification point, numbering the identification points directly adjacent to the current first identification point and using them as the next first identification point.
4. The distortion detection method according to claim 2, characterized in that, Determining a reference point among the plurality of identification points includes: Determining three reference points among the plurality of identification points, the reference points having different attributes from the remaining identification points; Determining a common neighbor point directly adjacent to all three reference points, and using the common neighbor point as the reference point.
5. The distortion detection method according to claim 4, characterized in that After determining the three reference points among the plurality of identification points, the method further includes: Calculating an inclination degree of the test image according to the three reference points; Performing inclination correction on the test image according to the inclination degree.
6. The distortion detection method according to claim 1, wherein After collecting the test image obtained by the device under test displaying the reference device, the method further includes: Filtering out identification points with sizes exceeding a preset range among the plurality of identification points.
7. The distortion detection method according to claim 1, wherein According to the positions of the plurality of identification points in the reference coordinate system, determining target identification points corresponding to a target field of view includes: Determining a field of view coefficient corresponding to the size of the target field of view; According to the field of view coefficient, determining the target identification points, the target identification points including points directly above and directly below the target field of view, points directly to the left and directly to the right, and vertices on the diagonal.
8. The distortion detection method according to claim 7, characterized in that Calculating the distortion degree of the target field of view based on the target identification points includes: Calculating a vertical distortion degree and / or a horizontal distortion degree of the target field of view based on the target identification points.
9. The distortion detection method according to claim 8, characterized in that, Comprising: Determining a first boundary length and a second boundary length on the left and right sides in the target field of view according to the vertices on the diagonal of the target field of view; Determining a vertical diameter length inside the target field of view according to the points directly above and directly below the target field of view; Calculate the vertical distortion degree of the target field of view according to the first boundary length, the second boundary length, and the vertical diameter length; and / or, Determine the third boundary length and the fourth boundary length on the upper and lower sides in the target field of view according to the vertices located on the diagonal line of the target field of view; Determine the horizontal diameter length inside the target field of view according to the points located directly to the left and directly to the right of the target field of view; Calculate the horizontal distortion degree of the target field of view according to the third boundary length, the fourth boundary length, and the horizontal diameter length.
10. A distortion detection system, characterized in that, Comprising: A detection device, a device under test, and a reference device displayed by the device under test; wherein, the reference device is provided with an array composed of a plurality of identification points; The detection device is used to execute the distortion detection method according to any one of claims 1 to 9.
11. The distortion detection system according to claim 10, characterized in that The plurality of identification points include three reference points, and the reference points have different attributes from the remaining identification points.
12. The distortion detection system according to claim 10, wherein The field of view angle of the detection device is greater than the field of view angle of the device under test.
13. The distortion detection system according to claim 10, characterized in that The distortion detection system further includes: a motion mechanism, connected to the detection device and / or the device under test, for adjusting the positions of the detection device and / or the device under test.
14. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is configured to run the computer program to execute the distortion detection method according to any one of claims 1 to 9.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the distortion detection method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
High-precision large-aperture optical lens distortion calibration device and calibration method
CN106017871A
Camera distortion measurement method and test device
CN108924544A
Method and device for acquiring camera view field distortion amount and electronic device
CN110139093A
Image presentation method and device of VR equipment, equipment and computer storage medium
CN111199518A
External distortion detection method, external distortion detection system, external distortion detection platform and electronic equipment
CN113138066A