Position identification method, device, test system and storage medium

By automatically collecting and analyzing the image information when the electronic device falls, calculating the proportion of target pixels and comparing it with the reference data, the automatic identification of the drop direction of the electronic device is achieved, solving the problem of time-consuming and labor-consuming manual identification and improving production efficiency.

CN114494434BActive Publication Date: 2025-02-14HEFEI YUQIANG INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210081316.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-24
Publication Date
2025-02-14
Estimated Expiration
2042-01-24

AI Technical Summary

Technical Problem

In the drop test of electronic devices such as mobile phones, the existing technology requires manual orientation identification and secondary clamping, which causes time-consuming and labor-consuming, high probability of operational errors, and seriously affects the production progress.

Method used

Provide a method of automatically identifying the orientation, by collecting image information falling on the reference surface of the test system, calculating the proportion of target pixels, and comparing it with the pre-acquisitioned reference data to determine the drop direction of the electronic device.

Benefits of technology

It realizes automatic identification of the drop position of electronic equipment, improves production efficiency, reduces the error rate of manual operation, and improves the automation level of the test process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114494434B_ABST
    Figure CN114494434B_ABST
Patent Text Reader

Abstract

The present application relates to the field of testing technology, and provides a method, device, test system and storage medium for orientation recognition. The method includes collecting first image information of an electronic device falling on a reference surface of a test system; calculating the target pixel ratio corresponding to the reference surface in the first image information; comparing the target pixel ratio with reference data to determine the falling orientation of the electronic device, wherein the reference data includes a mapping relationship between the reference orientation corresponding to the electronic device in the pre-falling stage and the reference pixel ratio corresponding to the reference surface. The orientation recognition method of the present application can automatically identify the falling orientation of the electronic device, greatly improving production efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of testing technology, and in particular to a method, device, testing system and storage medium for position recognition. Background Art

[0002] In the reliability assessment of electronic devices such as mobile phones, drop test is a key judgment indicator, among which drop test includes two types: directional cyclic drop and drum random drop.

[0003] Since the posture of electronic equipment cannot be controlled after it falls, the current relevant technology relies on manual orientation identification and secondary clamping. However, manual participation is not only time-consuming and labor-intensive, but also limited by physiological fatigue, which greatly increases the probability of operational errors and seriously affects production progress. Summary of the invention

[0004] Based on this, it is necessary to provide a method, device, test system and storage medium for position recognition in order to address the above defects or shortcomings, which can automatically identify the position and improve production efficiency.

[0005] In a first aspect, an embodiment of the present application provides a method for position recognition, the method comprising:

[0006] Collecting first image information of the electronic device falling on the reference surface of the test system;

[0007] Calculating the target pixel ratio corresponding to the reference surface in the first image information;

[0008] The target pixel ratio is compared with reference data to determine the falling direction of the electronic device, wherein the reference data includes a mapping relationship between a reference direction corresponding to the electronic device in a pre-falling stage and a reference pixel ratio corresponding to the reference surface.

[0009] In one embodiment, the reference data is obtained by:

[0010] Selecting different orientations calibrated on the reference plane as the reference orientations, respectively collecting second image information when the electronic device is in the reference orientations, and extracting the second image information to obtain a pixel matrix;

[0011] The pixel ratio of the reference plane in the pixel matrix is ​​obtained as the reference pixel ratio, and the reference pixel ratio is associated with the reference orientation to obtain the mapping relationship.

[0012] In one embodiment, the obtaining of the pixel ratio of the reference plane in the pixel matrix as the reference pixel ratio includes:

[0013] Obtaining the length and width of the pixel matrix;

[0014] Traversing the pixel matrix to determine the number of first pixel points corresponding to the reference surface in the pixel matrix;

[0015] Based on the length, the width and the first number of pixels, the reference pixel ratio of the pixel matrix is ​​calculated.

[0016] In one embodiment, the method further includes the proportion of the reference pixels when the front side of the electronic device is far away from the reference plane being greater than the proportion of the reference pixels when the front side of the electronic device is close to the reference plane.

[0017] In one embodiment, the obtaining of the pixel ratio of the reference plane in the pixel matrix as the reference pixel ratio includes:

[0018] Obtaining the length and width of the pixel matrix;

[0019] Determining the segmentation conditions of the sub-pixel matrices according to the length and the width, and dividing the pixel matrix to obtain the sub-pixel matrix;

[0020] Traversing the sub-pixel matrix respectively, and determining the number of second pixel points corresponding to the reference plane in the sub-pixel matrix;

[0021] Based on the segmentation condition and the second number of pixels, the reference pixel ratio of each sub-pixel matrix is ​​calculated.

[0022] In one embodiment, the method further includes rotating the electronic device if the reference pixel ratios of the sub-pixel matrices are the same so as to make the reference pixel ratios different.

[0023] In one embodiment, the segmentation condition includes equally dividing the pixel matrix into four sub-pixel matrices.

[0024] In a second aspect, an embodiment of the present application provides a device for position recognition, the device comprising:

[0025] A collection module configured to collect first image information of an electronic device falling on a reference surface of a test system;

[0026] A calculation module configured to calculate a target pixel ratio corresponding to the reference surface in the first image information;

[0027] A comparison module is configured to compare the target pixel ratio with reference data to determine the falling direction of the electronic device, wherein the reference data includes a mapping relationship between a reference direction corresponding to the electronic device in a pre-falling stage and a reference pixel ratio corresponding to the reference surface.

[0028] In a third aspect, an embodiment of the present application provides a test system, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the orientation recognition method provided in any embodiment of the present application are implemented.

[0029] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the orientation recognition method provided in any embodiment of the present application are implemented.

[0030] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0031] The orientation recognition method, device, test system and storage medium provided in the embodiments of the present application can automatically analyze the image information of the electronic device falling on the reference surface of the test system, and because the reference surface is inherent to the test system, that is to say, the reference surface remains unchanged during the test process. Therefore, the embodiments of the present application can quickly determine the falling orientation of the electronic device by comparing the target pixel ratio corresponding to the reference surface in the image information with the reference pixel ratio corresponding to the reference surface in the pre-collected reference data, and then based on the mapping relationship contained in the reference data, which is efficient and convenient, and greatly improves production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0033] Figure 1 A schematic diagram of an application environment provided for an embodiment of the present application;

[0034] Figure 2 A schematic diagram of a working process of a test system provided in an embodiment of the present application;

[0035] Figure 3 A basic flow chart of a method for position recognition provided in an embodiment of the present application;

[0036] Figure 4 A schematic diagram of the appearance of an electronic device provided in an embodiment of the present application;

[0037] Figure 5 A schematic diagram of an orientation calibration provided in an embodiment of the present application;

[0038] Figure 6 A schematic diagram of a calculation process of a reference pixel ratio provided in an embodiment of the present application;

[0039] Figure 7 A schematic diagram of another calculation process of reference pixel ratio provided in an embodiment of the present application;

[0040] Figure 8 A schematic diagram of the structure of a position recognition device provided in an embodiment of the present application;

[0041] Fig. 9 A schematic diagram of the structure of another orientation recognition device provided in an embodiment of the present application;

[0042] Fig.10 A schematic diagram of the structure of another orientation recognition device provided in an embodiment of the present application;

[0043] Fig.11 A structural block diagram of a test system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0045] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the application described can be implemented in an order other than those illustrated or described herein.

[0046] In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not explicitly listed or inherent to these processes, methods, products, or apparatuses.

[0047] The position recognition method provided in this application can be applied to Figure 1In the test environment shown. The orientation recognition method is applied to a test system 100, which may include but is not limited to a camera 101, a computer 102, a floor 103 and a reset mechanism 104, wherein the camera 101 is connected to the computer 102 for information exchange, the reset mechanism 104 is connected to the computer 102 for information exchange, and the reset mechanism 104 is provided with a pressure sensor, which can adjust and reset the position of the electronic device, and the color of the floor 103 is obviously different from the color of the electronic device, and can be used as a fixed reference surface.

[0048] During the actual test, the test system 100 is in a dark room environment, the camera 101 is perpendicular to the floor 103, and flash photography can be used to ensure that the image has no oblique shadows. Figure 2 As shown. First, the robot ( Figure 1 102 releases the electronic device so that the electronic device can perform free fall; secondly, the computer 102 starts the orientation recognition signal and sends a reset signal to the reset mechanism 104 after a delay of 0.5 seconds; again, the reset mechanism 104 pushes the electronic device to the target position, such as the center of the floor 103, and sends a reset signal to the computer 102; again, the computer 102 sends a shooting signal to the camera 101, so that the camera 101 collects image information and transmits the image information back to the computer 102, and then the computer 102 determines the manipulator action strategy based on the image information and pre-stored reference data, so that the manipulator can grab the electronic device for subsequent drop test.

[0049] In one embodiment, Figure 3 As shown, a method for position recognition is provided. This embodiment applies the method to Figure 1 Taking the test system 100 in FIG. 1 as an example, the method includes the following steps:

[0050] S101, collecting first image information of an electronic device falling onto a reference surface of a test system.

[0051] For example, Figure 4 The figure shows a schematic diagram of the appearance of an electronic device provided by an embodiment of the present application, which corresponds to the front, top, left, back, bottom and right sides of the electronic device respectively. Among them, the back of the electronic device has a protruding camera, and the left and right sides have protruding buttons, and they are asymmetrically distributed. The reference surface of the test system 100 can be a floor 103, whose color is obviously different from the color of the electronic device and remains unchanged during the test. During the actual test, the center of the electronic device coincides with the center of the floor 103, and the top, bottom, left and right positions of the floor 103 are as shown. Figure 5 The orientation calibration is shown.

[0052] S102, calculating the target pixel ratio corresponding to the reference surface in the first image information.

[0053] S103, comparing the target pixel ratio with reference data to determine the falling direction of the electronic device, wherein the reference data includes a mapping relationship between a reference direction corresponding to the electronic device in a pre-falling stage and a reference pixel ratio corresponding to a reference surface.

[0054] It should be noted that the calculation principle of the target pixel ratio corresponding to the reference surface and the reference pixel ratio corresponding to the reference surface are the same. The following takes the calculation of the reference pixel ratio as an example and introduces the specific process of obtaining the reference data.

[0055] Optionally, in some embodiments of the present application, when determining reference data in the pre-fall stage, first select different orientations calibrated on the reference surface (i.e., floor 103) as reference orientations, and respectively collect second image information of the electronic device when it is in the reference orientation. For example, as shown in Table 1, a total of 8 images are taken, where the front of the electronic device facing inward means that the front of the electronic device is close to the floor 103, and the front of the electronic device facing outward means that the front of the electronic device is away from the floor 103, that is, the floor 103 is used as a distinguishing reference; then extract the second image information to obtain a pixel matrix For example, through Python's OpenCV, we can obtain the pixel RGB matrix, where m, n, i, j, u, v, and w are all integers, m represents the front orientation of the electronic device, m∈[1,2], n represents the top orientation of the electronic device, n∈[1,2,3,4], i represents the number of rows in the pixel matrix, j represents the number of columns in the pixel matrix, and [u, v, w] represents the RGB value of the pixel, that is, the color value of the three channels of red, green, and blue; then, we can obtain the pixel matrix The pixel ratio of the reference plane is used as the reference pixel ratio, and the reference pixel ratio is associated with the reference orientation to obtain a mapping relationship.

[0056] Table 1 Images taken at different orientations

[0057] Front / top superior Down Left right facing inwards <![CDATA[a 11 ]]> <![CDATA[a 12 ]]> <![CDATA[a 13 ]]> <![CDATA[a 14 ]]> outward <![CDATA[a 21 ]]> <![CDATA[a 22 ]]> <![CDATA[a 23 ]]> <![CDATA[a 24 ]]>

[0058] It should be noted that the electronic device includes a front side, a top side, a left side, a back side, a bottom side and a right side, and the falling direction of the electronic device can be quickly determined by determining the orientation of the front side and the top side. The following is an explanation of the calculation process of the reference pixel ratio of the front side and the top side, wherein the RGB value corresponding to each pixel point of the floor 103 is known.

[0059] ① Since the front area of ​​the electronic device is large and easy to identify, the reference pixel ratio can be determined in the following way. Figure 6 As shown, first get the pixel matrix The length length and width width of the pixel matrix are then traversed to determine the number of first pixel points num corresponding to the reference surface in the pixel matrix, that is, the [u, v, w] of the first pixel point is equal to the RGB value of the reference surface at this position, and then based on the length length, width width and the number of first pixel points num, the reference pixel ratio of the pixel matrix is ​​calculated. As shown in formula (1):

[0060]

[0061] It is understandable that when the electronic device is placed on the ground with its back, the screen of the electronic device is tilted due to the protruding camera, wherein the back of the electronic device is placed on the ground with its front side away from the floor 103, and the screen is the front side of the full-screen electronic device. Assuming the tilt angle of the electronic device is θ, the projection area on the floor 103 is s b , the projection area of ​​the electronic device on the floor 103 when it lands on its front is s f , then there exists formula (2):

[0062] s b ≈s f *cosθ (2)

[0063] Among them, 0<θ<π / 36.

[0064] It can be seen from equation (2) that the projection area s of the electronic device on the floor 103 when it lands on the ground with its front side is f Greater than the projection area s of the electronic device on the floor 103 when the back of the electronic device is on the ground b , so the reference pixel ratio of the floor 103 when landing on the front side is Less than the reference pixel ratio of the floor 103 when the back lands As shown in formula (3):

[0065]

[0066] Furthermore, since the orientation of the top surface of the electronic device does not affect the reference pixel ratio of the floor 103, equation (3) can be simplified to equation (4). When the electronic device lands on the ground, the reference pixel ratio of the floor 103 is: When the back lands on the ground, the reference pixel ratio of the floor 103 is Right now:

[0067]

[0068] Therefore, the embodiment of the present application can use formula (4) to determine whether the electronic device is on the ground with its front side or back side, that is, the proportion of reference pixels when the front side of the electronic device is far away from the reference surface is greater than the proportion of reference pixels when the front side of the electronic device is close to the reference surface.

[0069] ② Since the top surface of the electronic device is small and difficult to identify, the reference pixel ratio can be determined in the following way. Figure 7 As shown, first get the pixel matrix The length length and width width of the pixel matrix are determined, and then the segmentation conditions of the sub-pixel matrices are determined according to the length length and the width width, and the pixel matrix is ​​divided to obtain the sub-pixel matrix. For example, the segmentation condition may be to divide the pixel matrix into four sub-pixel matrices, as shown in equations (5) to (8), or it may be to divide the pixel matrix into four sub-pixel matrices unequally. Optionally, in some embodiments of the present application, the segmentation condition may also be to divide the pixel matrix into six sub-pixel matrices or eight sub-pixel matrices, etc., so as to meet diverse usage requirements.

[0070] First sub-pixel matrix: i∈[length / 2,length], j∈[0,width / 2] (5)

[0071] Second sub-pixel matrix: i∈[0, length / 2], j∈[0, width / 2] (6)

[0072] The third sub-pixel matrix: i∈[0, length / 2], j∈[Width / 2, width] (7)

[0073] Fourth sub-pixel matrix: i∈[length / 2, length], j∈[width / 2, width] (8)

[0074] Then, the embodiment of the present application can traverse the sub-pixel matrix respectively to determine the number of second pixel points numq corresponding to the reference surface in the sub-pixel matrix, that is, the [u, v, w] of the second pixel point is equal to the RGB value of the reference surface at this position, where q represents the number of divisions, q∈[1, 2, 3, 4], and then based on the division conditions and the number of second pixel points numq, the reference pixel ratio of each sub-pixel matrix is ​​calculated. As shown in formula (9):

[0075]

[0076] It is understandable that, since the left and right sides of the electronic device have protruding buttons and are asymmetrically distributed, the reference pixel ratios of the floor 103 in the four sub-pixel matrices are not completely equal, that is, the results of equation (9) are not completely equal. If the reference pixel ratios of the sub-pixel matrices are the same, then Figure 5 The center shown rotates the electronic device to increase the degree of asymmetry so that the reference pixel ratios are different.

[0077] It should be noted that in the embodiment of the present application, calculation process ① and calculation process ② can be performed simultaneously, or in the order of ①→② or ②→①, and there is no limitation on this. Similarly, when executing S102, that is, calculating the target pixel ratio corresponding to the reference surface in the first image information, the calculation process ① and calculation process ② can be referred to for determination.

[0078] In the above-mentioned orientation recognition method, the image information of the electronic device falling on the reference surface of the test system can be automatically analyzed, and because the reference surface is inherent to the test system, that is to say, the reference surface remains unchanged during the test. Therefore, the embodiment of the present application can quickly determine the falling orientation of the electronic device by comparing the target pixel ratio corresponding to the reference surface in the image information with the reference pixel ratio corresponding to the reference surface in the pre-collected reference data, and then based on the mapping relationship contained in the reference data, which is efficient and convenient, and greatly improves production efficiency.

[0079] It should be understood that although Figure 3 to Figure 7 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 3 to Figure 7 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0080] In one embodiment, Figure 8 As shown, a device for position identification is provided, which includes a collection module, a calculation module and a comparison module.

[0081] A collection module configured to collect first image information of an electronic device falling on a reference surface of a test system;

[0082] A calculation module configured to calculate a target pixel ratio corresponding to a reference surface in the first image information;

[0083] The comparison module is configured to compare the target pixel ratio with reference data to determine the falling direction of the electronic device, wherein the reference data includes a mapping relationship between a reference direction corresponding to the electronic device in a pre-falling stage and a reference pixel ratio corresponding to a reference surface.

[0084] Optionally, in some embodiments of the present application, the acquisition module is further configured to select different orientations calibrated on the reference plane as reference orientations, and respectively acquire second image information when the electronic device is in the reference orientations;

[0085] The calculation module is also configured to extract the second image information to obtain a pixel matrix, and obtain the pixel ratio of the reference plane in the pixel matrix as the reference pixel ratio, and associate the reference pixel ratio with the reference orientation to obtain a mapping relationship.

[0086] Optionally, in some embodiments of the present application, Fig. 9 As shown, the calculation module also includes:

[0087] A first acquisition unit, configured to acquire the length and width of the pixel matrix;

[0088] A first determining unit is configured to traverse the pixel matrix and determine the number of first pixel points corresponding to the reference surface in the pixel matrix;

[0089] The first calculation unit is configured to calculate the reference pixel ratio of the pixel matrix based on the length, the width and the first pixel number.

[0090] Optionally, in some embodiments of the present application, the proportion of reference pixels when the front side of the electronic device is far away from the reference plane is greater than the proportion of reference pixels when the front side of the electronic device is close to the reference plane.

[0091] Optionally, in some embodiments of the present application, Fig.10 As shown, the calculation module also includes:

[0092] A second acquisition unit is configured to acquire the length and width of the pixel matrix;

[0093] A division unit, configured to determine the division conditions of each sub-pixel matrix according to the length and the width, and divide the pixel matrix to obtain a sub-pixel matrix;

[0094] A second determining unit is configured to traverse the sub-pixel matrix respectively to determine the number of second pixel points corresponding to the reference surface in the sub-pixel matrix;

[0095] The second calculation unit is configured to calculate the reference pixel ratio of each sub-pixel matrix based on the segmentation condition and the second pixel number.

[0096] Optionally, in some embodiments of the present application, the second calculation unit is further configured to rotate the electronic device if the reference pixel ratios of each sub-pixel matrix are the same so as to make the reference pixel ratios different.

[0097] Optionally, in some embodiments of the present application, the segmentation condition includes dividing the pixel matrix into four sub-pixel matrices.

[0098] In the above-mentioned orientation recognition device, the acquisition module is configured to acquire the first image information of the electronic device falling on the reference surface of the test system; the calculation module is configured to calculate the target pixel ratio corresponding to the reference surface in the first image information; the comparison module is configured to compare the target pixel ratio with the reference data to determine the falling orientation of the electronic device, wherein the reference data includes a mapping relationship between the reference orientation corresponding to the electronic device in the pre-falling stage and the reference pixel ratio corresponding to the reference surface. The embodiment of the present application can automatically analyze the image information of the electronic device falling on the reference surface of the test system, and since the reference surface is inherent in the test system, that is to say, the reference surface remains unchanged during the test process. Therefore, the embodiment of the present application can quickly determine the falling orientation of the electronic device by comparing the target pixel ratio corresponding to the reference surface in the image information with the reference pixel ratio corresponding to the reference surface in the pre-collected reference data, and then according to the mapping relationship contained in the reference data, which is efficient and convenient, and greatly improves production efficiency.

[0099] It should be noted that the specific definition of the position recognition device can be found in the definition of the position recognition method above, which will not be repeated here. Each module in the above-mentioned position recognition device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor of the test system in the form of hardware, or can be stored in the memory of the test system in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0100] In one embodiment, a test system is provided, whose structural block diagram can be shown as follows: Fig.11 The test system includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus.

[0101] Among them, the processor of the test system is used to provide computing and control capabilities. The memory of the test system includes a non-volatile storage medium and an internal memory, and the non-volatile storage medium stores an operating system and a computer program, and 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 test system is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized by WIFI, an operator network (such as 3G, 4G or 5G, etc.), near field communication (NFC) or other technologies. When the computer program is executed by the processor, a method for orientation recognition is implemented. The display screen of the test system can be a liquid crystal display screen or an electronic ink display screen, and the input device of the test system can be a touch layer covered on the display screen, or a button, a trackball or a touchpad provided on the shell of the test system, or an external keyboard, a touchpad or a mouse, etc.

[0102] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the test system to which the scheme of the present application is applied. The specific test system may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0103] In one embodiment, the position recognition device provided by the present application can be implemented in the form of a computer program. The computer program can be Fig.11 The memory of the test system can store various program modules constituting the position recognition device, for example, Figure 8 The collection module, calculation module and comparison module shown in the figure. The computer program composed of various program modules enables the processor to execute the steps of the position recognition method in various embodiments of the present application described in this specification.

[0104] For example, Fig.11 The test system shown can be Figure 8 The acquisition module in the position recognition device shown is used to acquire the first image information of the electronic device falling on the reference surface of the test system. The test system can calculate the target pixel ratio corresponding to the reference surface in the first image information through the calculation module. The test system can compare the target pixel ratio with the reference data through the comparison module to determine the falling position of the electronic device, wherein the reference data includes the mapping relationship between the reference position corresponding to the electronic device in the pre-falling stage and the reference pixel ratio corresponding to the reference surface.

[0105] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0106] S101, collecting first image information of an electronic device falling onto a reference surface of a test system.

[0107] S102, calculating the target pixel ratio corresponding to the reference surface in the first image information.

[0108] S103, comparing the target pixel ratio with reference data to determine the falling direction of the electronic device, wherein the reference data includes a mapping relationship between a reference direction corresponding to the electronic device in a pre-falling stage and a reference pixel ratio corresponding to a reference surface.

[0109] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0110] Selecting different orientations marked on the reference plane as reference orientations, respectively collecting second image information when the electronic device is in the reference orientation on the reference plane, and extracting the second image information to obtain a first pixel matrix;

[0111] The pixel ratio of the reference surface in the pixel matrix is ​​obtained as the reference pixel ratio, and the reference pixel ratio is associated with the reference orientation to obtain a mapping relationship.

[0112] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0113] Get the length and width of the pixel matrix;

[0114] Traversing the pixel matrix, determining the number of first pixel points corresponding to the reference surface in the pixel matrix;

[0115] Based on the length, the width and the number of first pixels, the reference pixel ratio of the pixel matrix is ​​calculated.

[0116] In one embodiment, the proportion of reference pixels when the front side of the electronic device is far away from the reference plane is greater than the proportion of reference pixels when the front side of the electronic device is close to the reference plane.

[0117] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0118] Get the length and width of the pixel matrix;

[0119] Determine the segmentation conditions of each sub-pixel matrix according to the length and the width, and divide the pixel matrix to obtain a sub-pixel matrix;

[0120] Traversing the sub-pixel matrix respectively, and determining the number of second pixel points corresponding to the reference surface in the sub-pixel matrix;

[0121] Based on the segmentation condition and the number of second pixel points, the reference pixel ratio of each sub-pixel matrix is ​​calculated.

[0122] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0123] If the reference pixel ratios of each sub-pixel matrix are the same, the electronic device is rotated to make the reference pixel ratios different.

[0124] In one embodiment, the segmentation condition includes equally dividing the pixel matrix into four sub-pixel matrices.

[0125] In the above-mentioned computer-readable storage medium, the computer program can automatically analyze the image information of the electronic device falling on the reference surface of the test system, and because the reference surface is inherent to the test system, that is to say, the reference surface remains unchanged during the test process. Therefore, the embodiment of the present application can quickly determine the falling direction of the electronic device by comparing the target pixel ratio corresponding to the reference surface in the image information with the reference pixel ratio corresponding to the reference surface in the pre-collected reference data, and then according to the mapping relationship contained in the reference data, which is efficient and convenient, and greatly improves production efficiency.

[0126] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and 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-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static random access memory (SRAM) and dynamic random access memory (DRAM).

[0127] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0128] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for position recognition, characterized in that: The method comprises: Collecting first image information of the electronic device falling on the reference surface of the test system; Calculating the target pixel ratio corresponding to the reference surface in the first image information; Comparing the target pixel ratio with reference data to determine the falling direction of the electronic device, wherein the reference data includes a mapping relationship between a reference direction corresponding to the electronic device in a pre-falling stage and a reference pixel ratio corresponding to the reference surface; The reference data is obtained in the following manner: Selecting different orientations calibrated on the reference plane as the reference orientations, respectively collecting second image information when the electronic device is in the reference orientations, and extracting the second image information to obtain a pixel matrix; The pixel ratio of the reference plane in the pixel matrix is ​​obtained as the reference pixel ratio, and the reference pixel ratio is associated with the reference orientation to obtain the mapping relationship.

2. The method for position recognition according to claim 1, characterized in that: The obtaining the pixel ratio of the reference plane in the pixel matrix as the reference pixel ratio includes: Obtaining the length and width of the pixel matrix; Traversing the pixel matrix to determine the number of first pixel points corresponding to the reference surface in the pixel matrix; Based on the length, the width and the first number of pixels, the reference pixel ratio of the pixel matrix is ​​calculated.

3. The method for position recognition according to claim 2, characterized in that: The method also includes the proportion of the reference pixels when the front side of the electronic device is far away from the reference plane being greater than the proportion of the reference pixels when the front side of the electronic device is close to the reference plane.

4. The method for position recognition according to claim 1, characterized in that: The obtaining the pixel ratio of the reference plane in the pixel matrix as the reference pixel ratio includes: Obtaining the length and width of the pixel matrix; Determining the segmentation conditions of the sub-pixel matrices according to the length and the width, and dividing the pixel matrix to obtain the sub-pixel matrix; Traversing the sub-pixel matrix respectively, and determining the number of second pixel points corresponding to the reference plane in the sub-pixel matrix; Based on the segmentation condition and the second number of pixels, the reference pixel ratio of each sub-pixel matrix is ​​calculated.

5. The method for position recognition according to claim 4, characterized in that: The method also includes rotating the electronic device if the reference pixel ratios of each of the sub-pixel matrices are the same so that the reference pixel ratios are different.

6. The method for position recognition according to claim 4 or 5, characterized in that: The segmentation condition includes equally dividing the pixel matrix into four sub-pixel matrices.

7. A position recognition device, characterized in that: The device comprises: A collection module configured to collect first image information of an electronic device falling on a reference surface of a test system; A calculation module configured to calculate a target pixel ratio corresponding to the reference surface in the first image information; a comparison module configured to compare the target pixel ratio with reference data to determine the falling direction of the electronic device, wherein the reference data includes a mapping relationship between a reference direction corresponding to the electronic device in a pre-falling stage and a reference pixel ratio corresponding to the reference surface; The comparison module is further configured to select different orientations calibrated on the reference plane as the reference orientations, respectively collect second image information of the electronic device when it is in the reference orientations, and extract the second image information to obtain a pixel matrix; obtain the pixel ratio of the reference plane in the pixel matrix as the reference pixel ratio, and associate the reference pixel ratio with the reference orientation to obtain the mapping relationship.

8. A test system comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the position recognition method described in any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the position recognition method described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Histogram methods and systems for object recognition

    CN102460475A

  • Object positioning method and device, electronic equipment and storage medium

    CN111046762A