Test method, test equipment and storage medium

Through image processing and segmentation technology, the terminal equipment is divided into sub-areas and tested on the test equipment, which solves the problem in the existing technology of being unable to accurately test equipment beyond the test area, and achieves an accurate assessment of the SAR value of the terminal equipment.

CN118427033BActive Publication Date: 2024-10-29HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410892962.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-10-29
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

Existing test equipment cannot accurately test terminal equipment that exceeds the size of the test area, especially for electromagnetic wave absorption ratio (SAR) values, resulting in inaccurate test results and affecting equipment performance evaluation.

Method used

The area of ​​the terminal device is determined through image processing technology and divided into sub-areas. The mobile device places each sub-area in the test area for testing, and the test values ​​of the sub-areas are combined to obtain the overall SAR value of the terminal device.

Benefits of technology

It achieves accurate SAR value testing of terminal equipment that exceeds the size of the test area, improves testing efficiency and accuracy, and ensures the effectiveness of equipment performance evaluation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118427033B_ABST
    Figure CN118427033B_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to a test method, a test device, and a storage medium. The method is applied to a test device, and the test device determines the area of ​​the terminal device in the image based on the image of the terminal device, and divides the area to obtain at least one sub-area. Based on the at least one sub-area, the test device moves the position of the terminal device on the test device so that the parts corresponding to each sub-area are sequentially in the test area of ​​the test device, and the parts corresponding to each sub-area are tested to obtain a first test value. The test device moves the terminal device so that the frame part of the terminal device is in the test area, tests the frame part of the terminal device to obtain a second test value, and obtains the SAR value test value of the terminal device based on the first and second test values. The present application can avoid the technical problem that the size of the terminal device is larger than the size of the test area, resulting in the inability of the test device to accurately test the SAR value of the terminal device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a testing method, testing equipment and storage medium. Background Art

[0002] After the terminal device is manufactured, it needs to be tested by testing equipment for various aspects of its performance. Testing equipment usually has a fixed test area. If the size of the terminal device exceeds the range of the test area, it will affect the accuracy of the test results. For example, taking the device for testing the electromagnetic absorption rate (Specific Absorption Rate, SAR) of a terminal device (such as a tablet or mobile phone, etc.), if the size of the terminal device such as a tablet or mobile phone exceeds the size range of the test area of ​​the testing equipment, the testing equipment cannot accurately test the SAR value of the terminal device. If the test results are not accurate enough, it will affect the effective and accurate evaluation of the performance of the terminal device. Summary of the invention

[0003] In view of the above, it is necessary to provide a testing method, a testing device and a storage medium to solve the problem that the SAR value of the terminal device cannot be accurately tested.

[0004] In a first aspect, an embodiment of the present application provides a testing method, which is applied to a testing device, and the method includes: based on an image of the terminal device, determining an area of ​​the terminal device in the image; dividing the area into at least one sub-area, each sub-area corresponding to a part of the terminal device; based on the at least one sub-area, moving the terminal device on the testing device so that the part corresponding to each sub-area is in turn in the testing area of ​​the testing device, and testing the part corresponding to each sub-area to obtain a first test value; moving the terminal device so that a border part of the terminal device is in the testing area, and testing the border part of the terminal device to obtain a second test value; and obtaining a test value of the terminal device based on the first test value and the second test value.

[0005] In the above technical solution, the test device divides the area of ​​the mobile phone in the image into at least one sub-area, and moves the position of the terminal device on the test device so that the part corresponding to each sub-area is in the test area of ​​the test device in turn, and the part corresponding to each sub-area is tested to obtain a first test value, thereby avoiding the technical problem that the size of the terminal device is larger than the size of the test area, resulting in the test device being unable to accurately test the SAR value of the terminal device.

[0006] In one embodiment of the present application, segmenting the region to obtain at least one sub-region includes: segmenting the region to obtain at least one sub-region based on the size of the test region of the test device. In the above technical solution, the test device segments the region of the mobile phone in the image into at least one sub-region based on the size of the test region, so that the test device can obtain an accurate SAR value when testing the part of each sub-region, thereby improving the test efficiency.

[0007] In one embodiment of the present application, based on at least one sub-area, moving the terminal device so that a portion of each sub-area is located in the test area of ​​the test device includes: taking the center point of the test area as the coordinate origin and establishing a coordinate system; controlling the mechanical arm of the test device to place the terminal device horizontally in the test area, and determining the coordinates of the center point of each sub-area of ​​the terminal device in the image in the coordinate system; and moving the terminal device according to the coordinates of the center point of each sub-area and the coordinates of the center point of the test area so that a portion of each sub-area is located in the test area of ​​the test device. The above technical solution can accurately control the movement of the terminal device by establishing a coordinate system and moving the terminal device according to the coordinates of the center point of each sub-area and the coordinates of the center point of the test area so that a portion of each sub-area is located in the test area of ​​the test device.

[0008] In one embodiment of the present application, according to the coordinates of the center point of each sub-area and the coordinates of the center point of the test area, the mobile terminal device includes: determining a movement parameter according to the coordinates of the center point of each sub-area and the coordinates of the center point of the test area, and controlling the mechanical arm to move the terminal device according to the movement parameter. The above technical solution controls the mechanical arm to move the terminal device according to the movement parameter determined according to the coordinates of the center point of each sub-area and the coordinates of the center point of the test area, and can further accurately control the terminal device to move.

[0009] In one embodiment of the present application, the terminal device includes a front part and a back part, and testing the part corresponding to each sub-area to obtain a first test value includes: testing the front part corresponding to each sub-area to obtain a front test value corresponding to each sub-area, and testing the back part corresponding to each sub-area to obtain a back test value corresponding to each sub-area; determining the test value of the front part of the terminal device according to the front test value of each sub-area; determining the test value of the back part of the terminal device according to the back test value of each sub-area. In the above technical solution, multiple areas of the front part and the back part of the terminal device can be tested to obtain test values, and the test values ​​of the front part and the back part are obtained by comprehensively considering the test values ​​of multiple areas, so that the SAR value of the terminal device can be accurately tested.

[0010] In one embodiment of the present application, the test value of the front part of the terminal device is determined according to the front test value of each sub-area, including: taking the maximum value of the front test value of each sub-area as the test value of the front part of the terminal device, and the test value of the back part of the terminal device is determined according to the back test value of each sub-area, including: taking the maximum value of the back test value of each sub-area as the test value of the back part of the terminal device. In the above technical scheme, the test values ​​can be obtained by testing multiple areas of the front part and the back part of the terminal device, and the maximum value of the test values ​​of the multiple areas of the front part is taken as the test value of the front part of the terminal device, and the maximum value of the test values ​​of the multiple areas of the back part is taken as the test value of the back part of the terminal device, so that the SAR value of the terminal device can be further accurately tested.

[0011] In one embodiment of the present application, the test value of the front part of the terminal device is determined according to the front test value of each sub-area, including: taking the average of the front test values ​​of each sub-area as the test value of the front part of the terminal device; the test value of the back part of the terminal device is determined according to the back test value of each sub-area, including: taking the average of the back test values ​​of each sub-area as the test value of the back part of the terminal device. In the above technical solution, the average of the front test values ​​of multiple sub-areas is taken as the test value of the front part of the terminal device, and the average of the back test values ​​of multiple sub-areas is taken as the test value of the back part of the terminal device, so that the SAR value of the terminal device can be accurately tested.

[0012] In one embodiment of the present application, a mobile terminal device is arranged so that the frame part of the terminal device is in a test area, and testing the frame part of the terminal device to obtain a second test value includes: determining multiple frame parts of the terminal device according to the area; controlling the mechanical arm of the test device to place the terminal device in a posture perpendicular to the test area, placing each frame part of the terminal device in the test area, and testing each frame part to obtain a test value of each frame part; and determining a second test value based on the test value of each frame part. The above technical solution can test each frame part of the terminal device to obtain a test value of each frame part, so that the SAR value of the terminal device can be accurately and comprehensively measured.

[0013] In one embodiment of the present application, testing each frame part to obtain a test value of each frame includes: testing each frame part once to obtain a test value of each frame. The above technical solution tests each frame part once to obtain a test value of each frame, which can improve the SAR value test efficiency of the terminal device.

[0014] In one embodiment of the present application, testing each frame part to obtain a test value of each frame part includes: dividing each frame part according to a second preset length to obtain at least one sub-frame of the corresponding frame part; moving the terminal device so that each sub-frame of the corresponding frame part is in the test area of ​​the test device, testing each sub-frame of the corresponding frame part to obtain a test value of each sub-frame of the corresponding frame part; determining the test value of the corresponding frame part according to the test value of each sub-frame of the corresponding frame part. The above technical scheme tests each sub-frame of the corresponding frame part to obtain a test value of each sub-frame of the corresponding frame part; and determines the test value of the corresponding frame part according to the test value of each sub-frame of the corresponding frame part, which can accurately measure the SAR value of each frame part of the terminal device and improve the test accuracy.

[0015] In one embodiment of the present application, determining the test value of the corresponding frame portion according to the test value of each sub-frame of the corresponding frame portion includes: taking the maximum value of the test values ​​of each sub-frame of the corresponding frame portion as the test value of the corresponding frame portion. In the above technical solution, taking the maximum value of the test values ​​of each sub-frame of the corresponding frame portion as the test value of the corresponding frame portion can further accurately test the SAR value of the frame portion of the terminal device.

[0016] In one embodiment of the present application, based on the image of the terminal device, determining the area of ​​the terminal device in the image includes: obtaining a blue-green-red (BGR) image obtained after the camera device of the test device shoots the terminal device, and converting the BGR image into a binary image; determining the contour area of ​​the terminal device according to the binary image; preprocessing the contour area; calculating the number of border pixels of the contour area after preprocessing; determining the length of the border of the terminal device according to the number of border pixels and the distance between the camera and the terminal device when the camera shoots the terminal device; and determining the area of ​​the terminal device according to the length of the border of the terminal device. The above technical solution determines the length of the border of the terminal device according to the number of border pixels and the distance between the camera and the terminal device when the camera shoots the terminal device; and determines the area of ​​the terminal device according to the length of the border of the terminal device, and can accurately extract the area range of the terminal device from the image.

[0017] In one embodiment of the present application, determining a contour area of ​​a terminal device according to a binary image includes: determining a contour area based on an area composed of pixels having a preset grayscale value in the binary image.

[0018] In one embodiment of the present application, preprocessing the contour region includes: corroding and dilating the contour region. The above technical solution corrodes and dilates the contour region of the image, which can filter out image noise such as depressions and burrs in the image.

[0019] In one embodiment of the present application, the length of the frame of the terminal device is determined according to the number of frame pixels and the distance between the camera and the terminal device when the camera shoots the terminal device, including: determining a proportional constant according to the distance search distance relationship table, the distance relationship table includes multiple proportional constants and multiple distances, and each proportional constant corresponds to a distance; determining the length of the frame according to the number of frame pixels and the proportional constant. The above technical solution determines the proportional constant according to the distance search distance relationship table, and determines the length of the frame according to the number of frame pixels and the proportional constant, which can accurately determine the actual length of the frame of the mobile phone.

[0020] In the second aspect, an embodiment of the present application provides a testing device, including a camera, a memory, a processor, a driving device and a device body, and a testing area is set on the device body: the memory is used to store program instructions; the processor is used to read and execute the program instructions stored in the memory, and when the program instructions are executed by the processor, the testing device executes the above-mentioned testing method.

[0021] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores program instructions. When the program instructions are executed on a test device, the test device executes the above-mentioned test method.

[0022] In addition, the technical effects brought about by the second to third aspects can be found in the descriptions related to the methods of each design in the above method part, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0024] Figure 1 This is an application scenario diagram of the testing method provided in one embodiment of the present application.

[0025] Figure 2 A schematic diagram of the structure of a testing device provided in one embodiment of the present application.

[0026] Figure 3 A flowchart of a testing method provided in one embodiment of the present application.

[0027] Figure 4 A flow chart of a method for determining an area of ​​a mobile phone in an image provided by an embodiment of the present application.

[0028] Figure 5 A schematic diagram of the outline area of ​​a mobile phone provided in one embodiment of the present application.

[0029] Figure 6 A schematic diagram of dividing the area of ​​a mobile phone provided in an embodiment of the present application.

[0030] Figure 7 A schematic diagram of dividing the area of ​​a mobile phone provided in another embodiment of the present application.

[0031] Figure 8 A schematic diagram of dividing the area of ​​a mobile phone provided in another embodiment of the present application.

[0032] Fig. 9 A schematic diagram of a test area provided in an embodiment of the present application.

[0033] Fig.10 A schematic diagram of testing a portion corresponding to a first sub-area of ​​a mobile phone provided in an embodiment of the present application.

[0034] Fig.11 A schematic diagram of testing a portion corresponding to the second sub-area of ​​a mobile phone provided in an embodiment of the present application.

[0035] Fig.12 A schematic diagram of testing a portion corresponding to a third sub-area of ​​a mobile phone provided in accordance with an embodiment of the present application.

[0036] Fig.13 A schematic diagram of testing a portion corresponding to the fourth sub-area of ​​a mobile phone provided in an embodiment of the present application.

[0037] Fig.14 A schematic diagram of testing a portion corresponding to the fifth sub-area of ​​a mobile phone provided in an embodiment of the present application.

[0038] Fig.15 A schematic diagram of testing a portion corresponding to a sixth sub-region of a mobile phone provided in accordance with an embodiment of the present application.

[0039] Fig.16 A schematic diagram of testing an area of ​​a mobile phone provided in accordance with an embodiment of the present application.

[0040] Fig.17 A schematic diagram of dividing the frame area of ​​a mobile phone provided in one embodiment of the present application.

[0041] Fig.18 A schematic diagram of testing a portion corresponding to a first sub-frame of a mobile phone provided in accordance with an embodiment of the present application.

[0042] Fig.19 A schematic diagram of testing a portion corresponding to a second sub-frame of a mobile phone provided in accordance with an embodiment of the present application.

[0043] Fig. 20 A schematic diagram of testing a portion corresponding to a third sub-frame of a mobile phone provided in accordance with an embodiment of the present application.

[0044] Fig.21 A schematic diagram of the structure of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0045] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way.

[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by technicians in the technical field in this application. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. It should be understood that, unless otherwise specified in this application, " / " means or. For example, A / B can represent A or B. "And / or" in this application is only a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. "At least one" means one or more. "Multiple" means two or more than two. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, a, b and c seven situations.

[0047] After the existing terminal equipment is manufactured, it is necessary to use test equipment to test the performance of the terminal equipment in various aspects. The test equipment usually has a fixed test area. If the size of the terminal equipment exceeds the range of the test area, it will affect the accuracy of the test results. For example, refer to Figure 1 Taking a device for testing the Specific Absorption Rate (SAR) of a terminal device 10 (such as a tablet or a mobile phone) as an example, the size of the mobile phone exceeds the size range of the test area of ​​the test device 20, resulting in the test device being unable to accurately test the SAR value of the part of the mobile phone that exceeds the test area, thereby affecting the effective and accurate evaluation of the performance of the terminal device.

[0048] In order to solve the above technical problems, the present application provides a testing method, which is applied to a testing device for testing the SAR value of a terminal device. The testing device determines the area and frame of the terminal device in the image from the image of the terminal device, and divides the terminal device into multiple sub-areas according to the frame. The testing device moves the corresponding part of each sub-area of ​​the terminal device to the test area of ​​the testing device for SAR value testing. Since the size of each sub-area of ​​the terminal device does not exceed the size range of the test area, the testing device can accurately test the SAR value of each area of ​​the terminal device, and determine the SAR value of the terminal device based on the SAR value of each area, thus solving the technical problem that the testing device cannot accurately test the SAR value of the terminal device when the size of the terminal device exceeds the size range of the test area of ​​the testing device.

[0049] refer to Figure 2 , which is a schematic diagram of the structure of a test device provided by an embodiment of the present application. The test device 20 includes a memory 201, a processor 202, a camera 203, a drive device 204, and a device body 205. The device body 205 is provided with a test area 206 (refer to Figure 1 ). The processor 202 is connected to the memory 201, the camera 203, the driving device 204, and the device body 205 respectively.

[0050] The memory 201 is used to store instructions and data. In an embodiment of the present application, the memory may be an internal memory, and the memory may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

[0051] Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.; non-volatile memory may include disk storage devices and flash memory.

[0052] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle. It can be divided into single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential level. It can be divided into universal flash storage (UFS), embedded multimedia storage card, etc. according to the storage specification.

[0053] The random access memory can be directly read and written by the processor 202, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.

[0054] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 202 .

[0055] In another embodiment of the present application, the memory 201 may also be an external memory interface, which may be used to connect an external non-volatile memory to expand the storage capacity of the test device 20. The external non-volatile memory communicates with the processor 202 via the external memory interface to implement a data storage function.

[0056] The processor 202 may include one or more processing units, for example, the processor 110 may include a microcontroller, an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, a processor chip, etc. Among them, different processing units may be independent devices or integrated into one or more processors. The processor 202 may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.

[0057] The camera 203 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the test device 20 may include 1 or N cameras, where N is a positive integer greater than 1.

[0058] The driving device 204 is used to drive the terminal device 10 to move, for example, to drive the terminal device 10 to move to the test area 206 of the test body 205, and to drive the terminal device 10 to move in the test area. In one embodiment of the present application, the driving device 204 includes a mechanical arm and a driving cylinder.

[0059] The device body 205 is used to test the terminal device 10 placed in the test area to obtain test data, and the test data includes SAR value and defect detection result.

[0060] In one embodiment of the present application, the test equipment may be a SAR value test equipment or a defect detection equipment. The SAR value test equipment may be a comprehensive Specific Absorption Rate measurement system in three dimensions (cSAR3D) device or a sixth generation dose assessment system (DASY6) device that complies with the standards. The cSAR3D device can implement SAR value testing of 300MHz~10GHz. The embodiment of the present application does not impose any special restrictions on the form of the above-mentioned test equipment. The defect detection equipment may be an image measuring instrument, a laser scanner or a defect detector.

[0061] In some embodiments, the terminal device may be a mobile phone, a tablet computer, an e-reader, a personal computer (PC), a laptop computer, a personal digital assistant (PDA), a smart watch, a smart bracelet, or other smart display wearable products.

[0062] For the sake of clarity, the following describes the method flow of the testing method provided in the embodiment of the present application by taking the testing device as a SAR value testing device and the terminal device as a mobile phone as an example.

[0063] refer to Figure 3 , shown is a flow chart of a testing method provided in one embodiment of the present application. Figure 3 The method of the example includes one or more steps, but does not constitute a limitation of the present application. In addition, the order of the steps of the method is only an example, and the order of the steps can be changed. Additional steps can be added or steps can be reduced without departing from the content disclosed in the present application. The method is performed by a SAR value test device and includes the following steps.

[0064] Step S301, based on the image of the mobile phone, determine the area of ​​the mobile phone in the image.

[0065] In one embodiment of the present application, the SAR value test device obtains an image of a mobile phone through a camera, and the image of the mobile phone can be a blue-green-red (Blue-Green-Red, BGR) image or a red-green-blue (Red-Green-Blue, RGB) image. For example, the SAR value test device places the mobile phone on a lighted glass plate through a mechanical arm, and obtains an image by photographing the mobile phone through a camera. The glass plate is illuminated by an LED lamp, and the glass plate is arranged on the device body. In one embodiment of the present application, the SAR value test device identifies the image of the terminal device and determines the area of ​​the mobile phone, and divides the area of ​​the mobile phone to obtain a sub-area to be tested. In other embodiments of the present application, the image of the mobile phone can be captured by an external camera device (for example, a camera, a camera or a camera of a terminal device, etc.), and the terminal device performs regional recognition and regional segmentation on the mobile phone image. In actual applications, the acquisition, recognition and segmentation of the mobile phone image are not limited to specific execution objects, and can be completed by different devices alone or in collaboration.

[0066] refer to Figure 4 FIG. 1 is a flow chart of a method for determining a region of a mobile phone in an image provided by an embodiment of the present application, which specifically includes the following steps.

[0067] Step S401, obtaining a BGR image obtained by shooting a mobile phone with a camera of a SAR value testing device, and converting the BGR image into a binary image.

[0068] In one embodiment of the present application, the SAR value test device converts the BGR image into a grayscale image, and performs binarization processing on the grayscale image to obtain a binarized image. In one embodiment of the present application, binarization processing on the grayscale image to obtain a binarized image includes: comparing the grayscale value of each pixel in the grayscale image with a preset grayscale threshold; setting the pixels in the grayscale image whose grayscale value is greater than or equal to the preset grayscale threshold to white (for example, the grayscale value is 255); setting the pixels in the grayscale image whose grayscale value is less than the preset grayscale threshold to black (for example, the grayscale value is 0). In one embodiment of the present application, the preset grayscale threshold can be set according to user needs, for example, set to 100.

[0069] In one embodiment of the present application, the SAR value testing device can perform binarization processing on the grayscale image using a binarization conversion function. For example, the cv2.threshold() function of the OpenCV (Open Source Computer Vision Library) library can be called to perform binarization processing on the grayscale image to obtain a binary image. The OpenCV library can provide a wealth of image processing and computer vision algorithms, and is used in real-time and embedded applications. The cv2.threshold() function can be used for binarization processing of grayscale images. In an embodiment of the present application, converting a BGR image into a binary image can reduce the amount of image data and help highlight the main features of the image, thereby facilitating the determination of the area and border of the mobile phone in the image.

[0070] Step S402: determining the outline area of ​​the mobile phone according to the binary image.

[0071] In one embodiment of the present application, the SAR value testing device can use a contour extraction function to extract the contour area of ​​the mobile phone in the image. For example, the findContours() function of the OpenCV library can be called to find the contour area of ​​the mobile phone in the binary image. The findContours() function can be used to find and extract the contour of the object in the binary image. In one embodiment of the present application, the SAR value testing device uses an image drawing function to determine the contour area of ​​the mobile phone in the image. For example, the drawContours() function of the OpenCV library is called to determine the shape of the contour area and calculate the contour area. The drawContours() function is a function in OpenCV for drawing contours, which can be used in conjunction with the findContours() function to draw the detected object contour on the image. In this embodiment, the contour area of ​​the mobile phone determined by the SAR value testing device is a rectangle. Reference Figure 5, which is a schematic diagram of the contour area of ​​a mobile phone provided in one embodiment of the present application. In one embodiment of the present application, the SAR value testing device uses the area composed of pixels with a gray value of 0 in the binary image as the contour area of ​​the mobile phone. The binary image includes a first contour area 51, a white area 52, and a second contour area 53, wherein the first contour area 51 is the contour area of ​​the glass plate, the second contour area 53 is the contour area of ​​the mobile phone, and the white area 52 is the illuminated area of ​​the glass plate.

[0072] In one embodiment of the present application, the outline area of ​​the mobile phone is generally rectangular, and there are four frames corresponding to the rectangular outline area, namely, two long frames and two wide frames.

[0073] Step S403: pre-process the contour area.

[0074] refer to Figure 5 As shown, in the acquired mobile phone image, due to the existence of image noise and other reasons, burrs 531 or depressions 532 may appear at the edge of the contour area of ​​the mobile phone, so that the contour area of ​​the mobile phone is relatively blurred at this time. The embodiment of the present application performs preprocessing on the contour area to filter out the burrs 531 at the edge of the contour area and fill the depressions 532 at the edge of the contour area, so that the contour area becomes smooth. In one embodiment of the present application, the preprocessing includes corrosion processing and expansion processing. In the embodiment of the present application, the SAR value test device implements corrosion processing by calling the erode() function of the OpenCV library to filter out the burrs 531 at the edge of the contour area, and implements expansion processing by calling the dilate() function to fill the depressions 532 at the edge of the contour area. The erode() function is a function used to implement corrosion operation in image processing, which processes the morphology of the image. The corrosion operation can eliminate pixels near the boundary in the image, make the object area smaller, or separate two adjacent objects. The dilate() function is used to implement the dilation operation in image processing. The dilation operation can increase the pixels near the boundary of the image to make the object area larger, or connect two adjacent objects. The dilation operation is often used in combination with other morphological operations such as erosion, opening and closing operations in image processing to process noise in the image, connect scattered image areas, improve the shape of objects, etc.

[0075] Step S404, calculating the number of pixels of the border of the preprocessed contour area.

[0076] In one embodiment of the present application, the SAR value test device can calculate the number of pixels of the long border and the number of pixels of the wide border of the contour area. In one embodiment of the present application, the SAR value test device calls the contourArea() function to calculate the number of pixels of the long border and the number of pixels of the wide border of the contour area. The contourArea() function is used to calculate the contour area, which can help quantify the size of the contour and is usually used in tasks such as image analysis, object detection and recognition.

[0077] Step S405, determining the length of the frame of the mobile phone according to the number of pixels of the frame and the distance between the camera and the terminal device obtained when the camera shoots the mobile phone.

[0078] In one embodiment of the present application, the length of the frame is determined according to the number of pixels of the frame and the distance between the camera and the terminal device obtained when the camera shoots the mobile phone, including: according to the distance between the camera and the terminal device, a distance relationship table is searched to determine a proportional constant, wherein the distance relationship table includes multiple proportional constants and multiple distances, and each proportional constant corresponds to a distance; according to the number of pixels of the frame and the proportional constant, the length of the frame can be determined. In one embodiment of the present application, the proportional constant is the ratio of the length of the frame to the number of pixels of the frame. In one embodiment of the present application, when the mobile phone and the camera are at different distances, the image obtained by the camera shooting the mobile phone is obtained, and the length of the frame of the mobile phone and the number of pixels of the frame in the image at different distances are recorded. According to the length of the frame of the mobile phone in the image at different distances and the number of pixels of the frame, the proportional constant at different distances is determined to obtain a distance relationship table. For example, when the distance between the mobile phone and the camera is 40cm, 45cm, and 50cm, the image taken by the camera of the mobile phone at each distance is obtained, and the length of the mobile phone's border and the number of pixels of the border in the image at each distance are recorded. According to the length of the mobile phone's border and the number of pixels of the border in the image at each distance, the proportional constants corresponding to different distances can be determined to obtain a distance relationship table.

[0079] In one embodiment of the present application, obtaining the length of the frame according to the number of pixels of the frame and the proportional constant includes: obtaining the length of the frame according to the product of the number of pixels of the frame and the proportional constant. For example, the SAR value testing device can determine the length of the long frame according to the product of the number of pixels of the long frame and the proportional constant, and determine the length of the wide frame according to the product of the number of pixels of the wide frame and the proportional constant.

[0080] Step S406, determining the area of ​​the mobile phone according to the length of the frame of the mobile phone.

[0081] In one embodiment of the present application, the SAR value testing device determines the size of the actual area of ​​the mobile phone according to the length of each frame of the mobile phone.

[0082] In one embodiment of the present application, each step of determining the area and frame of the mobile phone in the image can be executed by a processor of the SAR value testing device, or processed by a camera of the SAR value testing device. In addition, as described above, it can also be executed by a terminal device with a camera. The embodiments of the present application perform Figure 4 Process and Figure 3 The device form of the hardware device of some steps (eg, steps S301 - S302 ) of the process is not limited.

[0083] Step S302, segmenting the area of ​​the mobile phone in the image into at least one sub-area, each sub-area corresponding to a part of the mobile phone.

[0084] In one embodiment of the present application, the SAR value testing device divides the mobile phone area in the image according to the size of the test area to obtain the at least one sub-area. In one embodiment, the SAR value testing device divides the area of ​​the mobile phone along each border of the mobile phone according to a first preset length to obtain the sub-area of ​​the mobile phone, wherein the first preset length is less than the size of the test area. For example, the SAR value testing device divides the area of ​​the mobile phone along the long border and the wide border of the mobile phone according to the first preset length to obtain the sub-area of ​​the mobile phone. The first preset length can be set according to the needs of the user, for example, set to 10cm.

[0085] For example, refer to Figure 6 , the length range of the long frame of the mobile phone is (0cm, 10cm], the length range of the wide frame is (0cm, 10cm], and the SAR value test equipment divides the area of ​​the mobile phone along the long frame and the wide frame of the mobile phone at intervals of 10cm, and the number of sub-areas of the mobile phone is 1. Reference Figure 7 , the length range of the long frame of the mobile phone is (10cm, 20cm], the length range of the wide frame is (10cm, 20cm], and the SAR value test equipment divides the area of ​​the mobile phone along the long frame and the wide frame of the mobile phone at intervals of 10cm, and the number of sub-areas of the mobile phone is 4. Reference Figure 8 The length of the long frame of the mobile phone is in the range of (20cm, 30cm], and the length of the wide frame is in the range of (10cm, 20cm]. The SAR value test equipment divides the area of ​​the mobile phone along the long frame and the wide frame of the mobile phone at intervals of 10cm, and the number of sub-areas of the mobile phone is 6.

[0086] In another embodiment, the SAR value testing device determines the area of ​​the area to be segmented based on the size of the test area, and segments the mobile phone area in the image according to the area of ​​the area to be segmented to obtain the at least one sub-area, wherein the area of ​​the area to be segmented is smaller than the area of ​​the test area.

[0087] Step S303, based on at least one sub-area, the position of the mobile phone on the SAR value testing device is moved so that the part corresponding to each sub-area is in the test area of ​​the mobile phone in turn, and the part corresponding to each sub-area is tested to obtain a first test value.

[0088] refer to Fig. 9 In one embodiment of the present application, the SAR value testing device uses the center point of the test area as the coordinate origin, uses the axis parallel to one side of the test area as the X-axis, and uses the axis perpendicular to the side of the test area as the Y-axis to establish a coordinate system (such as a Cartesian coordinate system). In one embodiment of the present application, the test area includes a core test area 61 and an effective test area 62. For example, the area range of the core test area 61 is 10.5cm*10.5cm, and the area range of the effective test area 62 is 24cm*12cm. The accuracy of the SAR value tested by the mobile phone in the core test area 61 is higher than the accuracy of the SAR value tested in the effective test area 62. The following will take the core test area 61 as an example of the test area of ​​the SAR value testing device to illustrate the measurement method of this embodiment. Before measuring, the SAR value testing device determines the coordinates of the center point of each sub-area of ​​the mobile phone in the image in the coordinate system based on the established coordinate system. The SAR value testing device controls the robotic arm to place the mobile phone horizontally in the test area, and controls the robotic arm to move the mobile phone according to the coordinates of the center point of each sub-area and the coordinates of the center point of the test area, so that the part of each sub-area is in the test area of ​​the SAR value testing device, and the part corresponding to each sub-area is tested to obtain the first test value. Through multiple sequential movements, it is possible to test all sub-areas and obtain the first test value corresponding to each sub-area. When the robotic arm moves the mobile phone, the coordinates of the center point of the sub-area tested each time may coincide with the coordinates of the center point of the test area, or they may not coincide. It is only necessary to ensure that each sub-area is located in the test area. The range of each sub-area may be less than or equal to the test area, and there is no limitation in practical applications.

[0089] In one embodiment of the present application, the SAR value test device obtains the pixel coordinates of the center point of each sub-area from the image, and performs coordinate conversion on the pixel coordinates of the center point of each sub-area in the image through the intrinsic parameter matrix and the extrinsic parameter matrix of the camera to obtain the coordinates of the center point of each sub-area in the image in the Cartesian coordinate system. Converting the pixel coordinates in the image coordinate system to the coordinates of the Cartesian coordinate system through the intrinsic parameter matrix and the extrinsic parameter matrix of the camera is a conventional technology in the art, and this application will not be described in detail.

[0090] In one embodiment of the present application, the mobile phone includes a front portion and a back portion. Figure 6 The SAR value test equipment tests the front part of the mobile phone placed horizontally in the test area, and after obtaining the test value of the front part of the mobile phone, the mechanical arm is controlled to flip the mobile phone 180 degrees so that the back part of the mobile phone faces the test area, and the back part of the mobile phone is tested to obtain the test value of the back part of the mobile phone. The test value of the front part of the mobile phone and the test value of the back part of the mobile phone are used as the first test value.

[0091] If the area of ​​the mobile phone in the image includes Figure 8 The SAR value test equipment tests the front part corresponding to each sub-area in turn, and obtains the front test value corresponding to each sub-area (for example, 6 front test values). Then, the robot arm is controlled to flip the mobile phone 180 degrees, and the back part corresponding to each sub-area is tested to obtain the back test value corresponding to each sub-area (for example, 6 back test values); the test value of the front part of the mobile phone is determined according to the front test value of each sub-area; the test value of the back part of the mobile phone is determined according to the back test value of each sub-area.

[0092] For the convenience of description, Figure 8 The six sub-areas shown are divided into a first sub-area, a second sub-area, a third sub-area, a fourth sub-area, a fifth sub-area and a sixth sub-area in order from right to left. Fig.10 The SAR value test device determines the first movement parameter according to the coordinates of the center point of the first sub-area and the center point of the test area, and controls the movement of the mobile phone according to the first movement parameter, so that the part corresponding to the first sub-area on the mobile phone moves to the test area, and tests the front part corresponding to the first sub-area to obtain the front test value corresponding to the first sub-area. The movement parameters may include but are not limited to: displacement, angle on the horizontal plane, flip angle, etc. Reference Fig.11The SAR value test device determines the second movement parameter according to the coordinates of the center point of the second sub-area and the coordinates of the center point of the test area, and controls the movement of the mobile phone according to the second movement parameter, so that the part corresponding to the second sub-area on the mobile phone moves to the test area, and tests the front part corresponding to the second sub-area to obtain the front test value corresponding to the second sub-area. Fig.12 The SAR value test equipment determines the third movement parameter according to the coordinates of the center point of the third sub-area and the coordinates of the center point of the test area, and controls the movement of the mobile phone according to the third movement parameter, so that the part corresponding to the third sub-area on the mobile phone moves to the test area, and tests the front part corresponding to the third sub-area to obtain the front test value corresponding to the third sub-area. Fig.13 The SAR value test device determines the fourth movement parameter according to the coordinates of the center point of the fourth sub-area and the coordinates of the center point of the test area, and controls the movement of the mobile phone according to the fourth movement parameter, so that the part corresponding to the fourth sub-area on the mobile phone moves to the test area, and tests the front part corresponding to the fourth sub-area to obtain the front test value corresponding to the fourth sub-area. Fig.14 The SAR value test equipment determines the fifth movement parameter according to the coordinates of the center point of the fifth sub-area and the coordinates of the center point of the test area, and controls the movement of the mobile phone according to the fifth movement parameter, so that the part corresponding to the fifth sub-area on the mobile phone moves to the test area, and tests the front part corresponding to the fifth sub-area to obtain the front test value corresponding to the fifth sub-area. Fig.15 , the SAR value testing device determines the sixth movement parameter according to the coordinates of the center point of the sixth sub-area and the coordinates of the center point of the test area, and controls the movement of the mobile phone according to the sixth movement parameter, so that the part corresponding to the sixth sub-area on the mobile phone moves to the test area, and tests the front part corresponding to the sixth sub-area to obtain the front test value corresponding to the sixth sub-area. In one embodiment, the SAR value testing device uses the maximum value of the front test values ​​of each sub-area as the test value of the front part of the mobile phone, for example, the maximum value of the front test values ​​of the first sub-area, the second sub-area, the third sub-area, the fourth sub-area, the fifth sub-area, and the sixth sub-area as the test value of the front part of the mobile phone. In another embodiment, the SAR value testing device uses the average of the front test values ​​of all sub-areas as the test value of the front part of the mobile phone.

[0093] In one embodiment of the present application, the SAR value test device controls the mechanical arm to move the mobile phone so that the part corresponding to the center point of the area of ​​the mobile phone is at the center point of the test area; the mobile phone is moved based on the size of the test area so that the part of each sub-area is at the test area of ​​the SAR value test device. Fig.16The size of the test area is 10 cm. When the SAR value testing equipment controls the mechanical arm to move the part corresponding to the center point of the area of ​​the mobile phone to the center point of the test area, the moving coordinates of the first sub-area of ​​the mobile phone to the test area are determined to be (x-5, y-5) according to the size of the test area and the established coordinate system. The moving coordinates of the second sub-area of ​​the mobile phone to the test area are determined to be (x+0, y-5), the moving coordinates of the third sub-area of ​​the mobile phone to the test area are determined to be (x+5, y-5), the moving coordinates of the fourth sub-area of ​​the mobile phone to the test area are determined to be (x-5, y+5), the moving coordinates of the fifth sub-area of ​​the mobile phone to the test area are determined to be (x+0, y+5), and the moving coordinates of the sixth sub-area of ​​the mobile phone to the test area are determined to be (x+5, y+5).

[0094] After completing the test of the front part of the mobile phone, the SAR value testing device controls the mechanical arm to flip the mobile phone 180 degrees so that the back part of the mobile phone faces the test area, and moves the mobile phone so that the back parts corresponding to the first sub-area, the second sub-area, the third sub-area, the fourth sub-area, the fifth sub-area, and the sixth sub-area are moved to the test area respectively, and when the first sub-area, the second sub-area, the third sub-area, the fourth sub-area, the fifth sub-area, and the sixth sub-area are moved to the test area, the back parts of the corresponding sub-areas are tested to obtain the back test value corresponding to the first sub-area, the back test value corresponding to the second sub-area, the back test value corresponding to the third sub-area, the back test value corresponding to the fourth sub-area, the back test value corresponding to the fifth sub-area, and the back test value corresponding to the sixth sub-area. The SAR value testing device uses the maximum value of the back test values ​​of each sub-area as the test value of the back part of the mobile phone, for example, the maximum value of the back test values ​​of the first sub-area, the second sub-area, the third sub-area, the fourth sub-area, the fifth sub-area, and the sixth sub-area as the test value of the back part of the mobile phone. In another embodiment, the SAR value testing device uses the average of the back test values ​​of all sub-areas as the test value of the back part of the mobile phone. Step S304, move the mobile phone so that the frame of the mobile phone is in the test area, and test the frame of the mobile phone to obtain a second test value.

[0095] In one embodiment of the present application, the SAR value testing device determines multiple frame parts of the mobile phone according to the rectangular area of ​​the mobile phone; controls the mechanical arm to place the mobile phone in a posture perpendicular to the test area, places each frame part of the mobile phone in the test area, and tests each frame part to obtain the test value of each frame part; determines the second test value based on the test value of each frame part. For example, the SAR value testing device determines that the frame parts of the mobile phone include two long frame parts and two wide frame parts according to the rectangular area and frame of the mobile phone; the SAR value testing device controls the mechanical arm to place the mobile phone in a posture perpendicular to the test area, places each long frame part and wide frame part of the mobile phone in the test area in turn, and tests each long frame part and wide frame part once to obtain the test values ​​of the two long frame parts and the test values ​​of the two wide frame parts; the test values ​​of the two long frame parts and the test values ​​of the two wide frame parts are used as the second test value.

[0096] In another embodiment of the present application, the SAR value testing device determines that the frame part of the mobile phone includes two long frame parts and two wide frame parts according to the rectangular area and frame of the mobile phone; the SAR value testing device controls the mechanical arm to place the mobile phone in a posture perpendicular to the test area, and places each long frame part and wide frame part of the mobile phone in the test area in turn, and divides each long frame part and wide frame part according to a second preset length to obtain at least one sub-frame of the corresponding frame part; the mobile phone is moved so that each sub-frame of the corresponding frame part is in the test area of ​​the SAR value testing device, and each sub-frame of the corresponding frame part is tested to obtain a test value of each sub-frame of the corresponding frame part; the maximum value of the test values ​​of each sub-frame of the corresponding frame part is determined as the test value of the corresponding frame part, that is, the maximum value of the test values ​​of each sub-frame of each long frame part is determined as the test value of the long frame part, and the maximum value of the test values ​​of each sub-frame of each wide frame part is determined as the test value of the wide frame part; the test value of each long frame part and the test value of each wide frame part are used as the second test value. In other embodiments, the average of the test values ​​of each sub-frame of each long frame portion may be determined as the test value of the long frame portion, and the average of the test values ​​of each sub-frame of each wide frame portion may be determined as the test value of the wide frame portion.

[0097] For example, refer to Fig.17 The SAR value test device divides the long frame of the mobile phone into a first sub-frame, a second sub-frame and a third sub-frame according to a second preset length, wherein the second preset length is smaller than the size of the test area; Fig.18 , move the mobile phone so that the first sub-frame of the long frame is in the test area of ​​the SAR value testing device, and test the first sub-frame of the long frame to obtain a test value of the first sub-frame; refer to Fig.19 , move the mobile phone so that the second sub-frame at the long frame is in the test area of ​​the SAR value test device, and test the second sub-frame to obtain a test value of the second sub-frame; refer to Fig. 20 , move the mobile phone so that the third sub-frame of the long frame is in the test area of ​​the SAR value test device, test the third sub-frame to obtain the test value of the third sub-frame; and use the maximum value of the test value of the first sub-frame, the test value of the second sub-frame, and the test value of the third sub-frame as the test value of the long frame. In the embodiment of the present application, the specific implementation content of testing the wide frame to obtain the test value of the wide frame can refer to the implementation content of testing the long frame to obtain the test value of the long frame, and the present application will not repeat the description.

[0098] Step S305, obtaining a test value of the mobile phone based on the first test value and the second test value.

[0099] In one embodiment of the present application, the SAR value testing device uses the first test value and the second test value as the test value of the mobile phone. In one embodiment of the present application, the SAR value testing device uses the test value of the front part of the mobile phone, the test value of the back part of the mobile phone, the test value of the two long frame parts of the mobile phone, and the test value of the two wide frame parts of the mobile phone as the SAR value of the mobile phone.

[0100] In an embodiment of the present application, the test device divides the area of ​​the mobile phone in the image into at least one sub-area based on the size of the test area, and moves the position of the terminal device on the test device so that the part corresponding to each sub-area is in the test area of ​​the test device in turn, and the part corresponding to each sub-area is tested to obtain a first test value, thereby avoiding the problem that the size of the terminal device is larger than the size of the test area, resulting in the test device being unable to accurately test the SAR value of the part of the mobile phone that exceeds the test area.

[0101] In the above embodiments, the terminal device is described by taking a mobile phone as an example.

[0102] refer to Fig.21In this embodiment, the terminal device 10 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0103] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 10. In other embodiments of the present application, the terminal device 10 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0104] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0105] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the terminal device 10. In other embodiments of the present application, the terminal device 10 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0106] The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger. The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0107] The wireless communication function of the terminal device 10 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0108] The terminal device 10 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0109] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal device 10 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0110] The terminal device 10 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0111] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

[0112] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the terminal device 10. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.

[0113] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The terminal device 10 may receive key input and generate key signal input related to user settings and function control of the terminal device 10.

[0114] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0115] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0116] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the terminal device 10 by inserting the SIM card interface 195 or pulling it out from the SIM card interface 195. The terminal device 10 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The terminal device 10 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the terminal device 10 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal device 10 and cannot be separated from the terminal device 10.

[0117] This embodiment further provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on the test device 20, the test device 20 executes the above-mentioned related method steps to implement the test method in the above-mentioned embodiment.

[0118] This embodiment also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the testing method in the above-mentioned embodiment.

[0119] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer execution instructions, and when the device is running, the processor can execute the computer execution instructions stored in the memory so that the chip executes the test methods in the above-mentioned method embodiments.

[0120] Among them, the test equipment 20, terminal equipment 10, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0121] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0122] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0123] The unit described as a separate component may or may not be physically separated, and the component shown as a unit may be one physical unit or multiple physical units, that is, it may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.

[0124] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0125] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.

[0126] The above implementation modes are only used to illustrate the technical solutions of the present application and are not intended to limit the present application. Although the present application has been described in detail with reference to the above preferred implementation modes, a person skilled in the art should understand that the technical solutions of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present application.

Claims

1. A testing method, applied to a testing device, characterized in that: The method comprises: Based on the image of the terminal device, determining a region of the terminal device in the image; Dividing the area into at least one sub-area, each sub-area corresponding to a part of the terminal device; Based on the at least one sub-area, the position of the terminal device on the test device is moved so that the part corresponding to each sub-area is in the test area of ​​the test device in turn, and the part corresponding to each sub-area is tested to obtain a first test value, including: testing the front part of the terminal device corresponding to each sub-area to obtain the front test value corresponding to each sub-area, and testing the back part of the terminal device corresponding to each sub-area to obtain the back test value corresponding to each sub-area; determining the test value of the front part of the terminal device according to the front test value of each sub-area; determining the test value of the back part of the terminal device according to the back test value of each sub-area; Moving the terminal device so that a frame portion of the terminal device is in the test area, and testing the frame portion of the terminal device to obtain a second test value; A test value of the terminal device is obtained based on the first test value and the second test value.

2. The testing method according to claim 1, characterized in that: The segmenting the region to obtain at least one sub-region comprises: According to the size of the test area of ​​the test device, the area is divided to obtain the at least one sub-area.

3. The testing method according to claim 1, characterized in that: The step of moving the position of the terminal device on the test device based on the at least one sub-area so that the position corresponding to each sub-area is sequentially located in the test area of ​​the test device comprises: Taking the center point of the test area as the coordinate origin, establishing a coordinate system; Controlling a mechanical arm of the test device to place the terminal device horizontally in the test area, and determining the coordinates of a center point of each sub-area of ​​the terminal device in the image in the coordinate system; According to the coordinates of the center point of each sub-area and the coordinates of the center point of the test area, the terminal device is moved so that a portion of each sub-area is located in the test area of ​​the test device.

4. The testing method according to claim 3, characterized in that: The moving the terminal device according to the coordinates of the center point of each sub-area and the coordinates of the center point of the test area comprises: The movement parameters are determined according to the coordinates of the center point of each sub-area and the coordinates of the center point of the test area, and the mechanical arm is controlled to move the terminal device according to the movement parameters.

5. The testing method according to claim 1, characterized in that: Determining the test value of the front part of the terminal device according to the front test value of each sub-area includes: taking the maximum value of the front test value of each sub-area as the test value of the front part of the terminal device, Determining the test value of the back side of the terminal device according to the back side test value of each sub-area includes: taking the maximum value of the back side test values ​​of each sub-area as the test value of the back side of the terminal device.

6. The testing method according to claim 1, characterized in that: Determining the test value of the front part of the terminal device according to the front test value of each sub-area includes: taking the average of the front test values ​​of each sub-area as the test value of the front part of the terminal device; Determining the test value of the back side of the terminal device according to the back side test value of each sub-area includes: taking the average of the back side test values ​​of each sub-area as the test value of the back side of the terminal device.

7. The testing method according to claim 1, characterized in that: The moving the terminal device so that the frame portion of the terminal device is in the test area, and testing the frame portion of the terminal device to obtain a second test value includes: Determining a plurality of frame parts of the terminal device according to the area; Controlling the mechanical arm of the test device to place the terminal device in a posture perpendicular to the test area, placing each frame part of the terminal device in the test area, and testing each frame part to obtain a test value of each frame part; The second test value is determined based on the test value of each frame portion.

8. The testing method according to claim 7, characterized in that: The step of testing each frame portion to obtain a test value of each frame portion includes: Each frame portion is tested once to obtain a test value of each frame.

9. The testing method according to claim 7, characterized in that: The step of testing each frame portion to obtain a test value of each frame portion includes: Dividing each frame portion according to a second preset length to obtain at least one sub-frame of the corresponding frame portion; Move the terminal device so that each sub-frame of the corresponding frame portion is in the test area of ​​the test device, and test each sub-frame of the corresponding frame portion to obtain a test value of each sub-frame of the corresponding frame portion; The test value of the corresponding frame portion is determined according to the test value of each sub-frame of the corresponding frame portion.

10. The testing method according to claim 9, characterized in that: Determining the test value of the corresponding frame portion according to the test value of each sub-frame of the corresponding frame portion includes: The maximum value among the test values ​​of each sub-frame of the corresponding frame portion is used as the test value of the corresponding frame portion.

11. The testing method according to claim 1, characterized in that: The determining, based on the image of the terminal device, the area of ​​the terminal device in the image comprises: Obtain a blue-green-red (BGR) image obtained after the camera of the test device shoots the terminal device, and convert the BGR image into a binary image; Determine a contour area of ​​the terminal device according to the binary image; Preprocessing the contour area; Calculate the number of border pixels of the preprocessed contour area; Determine the length of the frame of the terminal device according to the number of pixels of the frame and the distance between the camera and the terminal device when the camera photographs the terminal device; The area of ​​the terminal device is determined according to the length of the frame of the terminal device.

12. The testing method according to claim 11, characterized in that: Determining the contour area of ​​the terminal device according to the binary image comprises: The contour area is determined based on an area composed of pixels having a preset grayscale value in the binary image.

13. The testing method according to claim 11, characterized in that: The preprocessing of the contour area comprises: The contour region is eroded and expanded.

14. The testing method according to claim 11, characterized in that: The determining the length of the frame of the terminal device according to the number of pixels of the frame and the distance between the camera and the terminal device when the camera photographs the terminal device comprises: According to the distance, a distance relationship table is searched to determine a proportional constant, wherein the distance relationship table includes a plurality of proportional constants and a plurality of distances, and each proportional constant corresponds to a distance; The length of the border is determined according to the number of the border pixels and the proportional constant.

15. A testing device, characterized in that: The test device includes a camera, a memory, a processor, a drive device and a device body, and a test area is set on the device body: the memory is used to store program instructions; the processor is used to read and execute the program instructions stored in the memory, and when the program instructions are executed by the processor, the test device executes the test method described in any one of claims 1 to 14.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions, and when the program instructions are executed on a test device, the test device is caused to perform the test method according to any one of claims 1 to 14.

Citation Information

Patent Citations

  • Image processing device and method and storage medium

    CN111784631A

  • Steel member dimension detection method

    CN117589058A