Disclosure of Invention
The application mainly aims to provide a resistance test method, a device, a storage medium and a program product, which aim to solve the technical problem of lower resistance test accuracy in the related art.
In order to achieve the above object, the present application provides a resistance testing method, including:
Acquiring a resistance image of a resistance to be tested and a pinhole image of a test needle seat, wherein the test needle seat is provided with a pinhole for placing a test probe for resistance test;
determining resistance position information of the resistance to be tested based on the resistance image;
determining pinhole position information based on the pinhole image;
based on the resistance position information and the pinhole position information, the position of the test needle seat is adjusted so that the test probe aims at the resistance to be tested to perform resistance puncture test.
In one embodiment, the step of determining resistance position information of the resistance to be tested based on the resistance image includes:
Gray level matching is carried out on the resistance image based on the resistance standard image, and a resistance area image in the resistance image to be tested is determined;
Extracting the edge contour of the resistance area image;
and determining resistor position information based on the edge profile, wherein the resistor position information comprises the placement angle information of the resistor to be tested.
In an embodiment, the step of determining the resistance location information further comprises, based on the edge profile:
performing binarization processing on the resistance region image to obtain a resistance region binary image;
extracting the outline of an electrode region in the binary image of the resistance region;
performing matrix fitting on the outline of the electrode area to obtain an electrode fitting model;
Determining electrode geometric parameters of the resistor to be tested based on an electrode fitting model, wherein the electrode geometric parameters comprise electrode length and electrode width;
the resistance position information is modified based on the electrode geometry parameters.
In one embodiment, the resistor to be tested is arranged on the carrying disc, the test needle seat comprises a first test needle seat arranged on one side of the carrying disc and a second test needle seat arranged on the other side of the carrying disc, and the pinhole image comprises a first pinhole image of the first test needle seat and a second pinhole image of the second test needle seat;
the step of determining pinhole location information based on the pinhole image includes:
Gray level matching is carried out on the first pinhole image based on the first pinhole standard image, and position information of the first pinhole is determined;
and carrying out gray level matching on the second pinhole image based on the second pinhole standard image, and determining the position information of the second pinhole.
In one embodiment, the step of adjusting the position of the test hub based on the resistance position information and the pinhole position information comprises:
Determining pinhole difference information between the first pinhole and the second pinhole based on the position information of the first pinhole and the position information of the second pinhole;
based on the pinhole difference information and the resistance position information, the position of the test needle stand is adjusted.
In an embodiment, the pinhole difference information comprises angle information between the first pinhole and the second pinhole;
based on the pinhole difference information and the resistance position information, the step of adjusting the position of the test needle holder includes:
based on the difference between the angle information and the placement angle information of the resistor to be tested, the position of the test needle seat or the position of the object carrying disc is adjusted so that the resistor to be tested, the first pinhole and the second pinhole are positioned on the same vertical plane.
In one embodiment, the pinhole difference information includes distance information between the first pinhole and the second pinhole;
Based on the pinhole difference information and the resistance position information, the step of adjusting the position of the test needle holder further includes:
based on the distance information and the electrode distance information, the position of the test needle stand is adjusted.
In addition, in order to achieve the above object, the application also proposes a resistance testing device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the resistance testing method as described above.
In addition, in order to achieve the above object, the present application also provides a storage medium, which is a computer readable storage medium, and a computer program is stored on the storage medium, and the computer program when executed by a processor implements the steps of the resistance testing method as described above.
Furthermore, to achieve the above object, the present application also proposes a computer program product comprising a computer program which, when executed by a processor, implements the steps of the resistance testing method as described above.
One or more technical schemes provided by the application have at least the following technical effects:
According to the resistance testing method, a resistance image of a resistance to be tested and a pinhole image of a test needle seat can be obtained, a pinhole is arranged on the test needle seat and used for placing a test probe for resistance testing, resistance position information of the resistance to be tested can be determined based on the resistance image, pinhole position information can be determined based on the pinhole image, and therefore the position of the test needle seat can be adjusted based on the resistance position information and the pinhole position information, so that the test probe aims at the resistance to be tested to conduct resistance puncture testing.
According to the application, more accurate resistance position information and pinhole position information can be determined through the resistance image and pinhole image during testing, so that the position of the test needle seat can be automatically adjusted according to the information, the test probe can be ensured to be correctly contacted with the resistance test point, the alignment error possibly caused by manual positioning is reduced, and the accuracy of resistance testing can be effectively improved.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the technical solution of the present application and are not intended to limit the present application.
For a better understanding of the technical solution of the present application, the following detailed description will be given with reference to the drawings and the specific embodiments.
The main solution of the embodiment of the application is that a resistance image of a resistance to be tested and a pinhole image of a test needle seat are obtained, a pinhole is arranged on the test needle seat and used for placing a test probe for resistance test, resistance position information of the resistance to be tested is determined based on the resistance image, pinhole position information is determined based on the pinhole image, and the position of the test needle seat is adjusted based on the resistance position information and the pinhole position information so that the test probe aims at the resistance to be tested to perform resistance puncture test.
In the related art, when the temperature coefficient of the resistor is measured, the puncture test is performed on the resistor to be tested by controlling the test probe after determining the puncture position through human eyes. However, the accuracy of the needle insertion position is difficult to be ensured by the manual positioning mode, and the accuracy of the temperature coefficient measurement result of the resistor to be tested can be influenced.
The application provides a solution, which can determine more accurate resistance position information and pinhole position information through the resistance image and pinhole image during testing, thereby automatically adjusting the position of the test needle seat according to the information so as to ensure that the test probe can accurately contact the resistance test point, reduce alignment errors possibly caused by manual positioning and effectively improve the accuracy of resistance testing.
It should be noted that, the execution body of the present embodiment may be a computing service device having functions of data processing, network communication, and program running, such as a tablet computer, a personal computer, or an electronic device capable of implementing the above functions. The present embodiment and the following embodiments will be described below with reference to a resistance test apparatus.
Based on this, an embodiment of the present application provides a resistance testing method, and referring to fig. 1, fig. 1 is a schematic flow chart of a first embodiment of the resistance testing method of the present application.
In this embodiment, the resistance testing method includes steps S100 to S400:
step S100, a resistance image of the resistance to be tested and a pinhole image of the test needle seat are obtained.
The needle seat is provided with a needle hole for placing a test probe for resistance test.
Step S200, determining resistance position information of the resistance to be tested based on the resistance image.
Step S300, determining pinhole position information based on the pinhole image.
Step S400, based on the resistance position information and the pinhole position information, the position of the test needle seat is adjusted so that the test probe is aligned to the resistance to be tested for resistance puncture test.
Specifically, when performing a resistance test, the resistance to be tested is generally placed on a carrying tray, at least one test needle seat is disposed at a peripheral position of the carrying tray, and a needle hole is disposed on the test needle seat, and the needle hole is used for placing a test probe for performing the resistance test. In practical applications, an image acquisition device (such as a high-resolution camera, an industrial camera, etc.) may be used to acquire a resistance image of the resistance to be tested and a pinhole image of the test socket. For easy understanding, fig. 2 shows a schematic structure diagram of an exemplary resistance testing environment, as shown in fig. 2, a resistance to be tested may be placed on the carrying tray 1, a first test needle seat 2a is provided on one side of the carrying tray 1, a second test needle seat 2b is provided on the other side of the carrying tray, and an image acquisition device 3 may be disposed directly above the carrying tray 1, and before the resistance test is performed, a resistance image of the resistance to be tested placed on the carrying tray 1 and a pinhole image of the first test needle seat 2a and the second test needle seat 2b may be acquired by the image acquisition device 3.
After the resistance image is acquired, an image processing algorithm can be adopted to analyze and process the resistance image so as to determine the resistance position information of the resistance to be tested. In a possible implementation manner, the step S200 may specifically include steps S210 to S230:
step S210, gray level matching is carried out on the resistance image based on the resistance standard image, and a resistance area image in the resistance image to be tested is determined.
Step S220, extracting an edge contour of the resistive area image.
Step S230, determining resistance position information based on the edge profile.
The resistor position information comprises placement angle information of a resistor to be tested.
Specifically, the acquired resistance image of the resistance to be tested may include other redundant elements (such as shooting background) except the resistance, in order to avoid the influence of the redundant elements on the accuracy of the resistance position determined later, an image of a standard resistance corresponding to the resistance to be tested (namely, a resistance standard image) may be prepared in advance as a resistance matching template, the acquired resistance image of the resistance to be tested is compared with the resistance matching template (namely, the resistance standard image) by using a gray matching algorithm, the area with the highest matching degree determined in the resistance image is the resistance area image, after the resistance area image is acquired, an edge contour of the resistance area image may be extracted by using an edge detection algorithm (such as Canny edge detection, sobel filtering, etc.), after the edge contour of the resistance is extracted, resistance position information may be determined according to the edge contour, wherein the resistance position information may include placement angle information and boundary position information of the resistance to be tested, for example, the resistance to be tested may be determined approximately as a rectangle according to the extracted edge contour, and the top point of the rectangle may be calculated by analyzing the peak of the rectangle, and the placement angle of the rectangle may be determined according to the major axis and the horizontal axis of the resistance to be placed.
It should be noted that, since the electrode of the resistor is generally made of a thin metal material, the electrode may be deformed by mechanical pressure during resistor processing or test loading, and thus, in actual testing, the electrode shape of each resistor to be tested may be irregular. In order to ensure that more accurate position information of the resistor to be tested is determined, the method further comprises steps S240-S280 after the step S230, so as to adjust and correct the position information of the resistor:
Step S240, binarizing the resistance area image to obtain a resistance area binary image.
Step S250, extracting the electrode region outline in the resistor region binary image.
And step S260, performing matrix fitting on the electrode area outline to obtain an electrode fitting model.
Step S270, determining the geometrical parameters of the electrode of the resistor to be tested based on the electrode fitting model.
Wherein the electrode geometry parameters include electrode length and electrode width.
Step S280, correcting the resistance position information based on the electrode geometric parameters.
The binarization processing can convert the resistance region image into black and white two colors, and a clearer image basis can be provided for subsequent contour extraction, feature analysis, geometric parameter calculation and the like. Likewise, edge detection or contour extraction algorithms (e.g., canny edge detection, sobel operator, or contour tracking algorithms, etc.) may be used to extract the electrode region contours from the resistive region binary image, which may identify the edges of the electrodes and generate electrode contour data. The electrode fitting model can be obtained by performing matrix fitting on the extracted electrode area outline, for example, a coordinate matrix formed by electrode outline data can be fitted into a standard geometric model (namely, an electrode fitting model) capable of describing the shape of an electrode by adopting a least square method, electrode geometric parameters such as electrode length, electrode width and the like can be determined according to the specific electrode fitting model, and the electrode geometric parameters can help to provide more accurate resistance position reference, so that the position information of the resistance to be tested can be further corrected by utilizing the electrode geometric parameters, and the corrected resistance position information is closer to the actual situation.
Similarly, after the pinhole image of the test needle seat is obtained, pinhole position information can be determined based on the pinhole image, in one possible implementation, the resistor to be tested is placed on the carrying tray, the test needle seat comprises a first test needle seat arranged on one side of the carrying tray and a second test needle seat arranged on the other side of the carrying tray, the pinhole image comprises a first pinhole image of the first test needle seat and a second pinhole image of the second test needle seat, the step S300 can specifically comprise gray level matching of the first pinhole image based on the first pinhole standard image, determining the position information of the first pinhole, gray level matching of the second pinhole image based on the second pinhole standard image, and determining the position information of the second pinhole.
Specifically, similar to the processing of the aforementioned resistance image, a standard image of the pinhole of the first test needle seat (i.e., a first pinhole standard image) may be prepared as a pinhole matching template before the test, and then the collected first pinhole image is compared with the pinhole matching template by using a gray level matching algorithm to determine the position information of the first pinhole, and the position information of the second pinhole is obtained in the same processing manner, so that the description thereof will not be repeated.
After the resistor position information and the pinhole position information are determined, the position of the test needle seat can be adjusted based on the resistor position information and the pinhole position information, so that the test probe can be aligned to the resistor to be tested for resistor puncture test. In a possible implementation manner, the step S400 may specifically include steps S410 to S420:
Step S410, determining pinhole difference information between the first pinhole and the second pinhole based on the position information of the first pinhole and the position information of the second pinhole.
Step S420, the position of the test needle seat is adjusted based on the pinhole difference information and the resistance position information.
The specific distance and direction of the needle stand to be moved can be calculated according to the needle hole difference information and the resistance position information obtained in the previous step, so that the needle holes of the first needle stand and the second needle stand can be accurately aligned with the contact point of the resistance to be tested.
It should be noted that, for temperature coefficient measurement of the resistor, it is generally required to perform the puncture test under a three-temperature environment, that is, under a high-temperature environment, a normal-temperature environment and a low-temperature environment, respectively. The resistor to be tested is generally placed in a material hole formed in the carrying tray, but in practical application, the carrying tray for placing the resistor may deform due to the impact of cold and hot temperatures of the testing environment, and in order to cope with the deformation problem, the material hole in the carrying tray usually needs to be enlarged by a certain gap to normally take the resistor. However, the amplifying gap may cause an angle and a position deviation between the resistor and an ideal state when the resistor is placed on the carrying disc, so that the position accuracy of the resistor to be tested during needle insertion is difficult to ensure, the accuracy of a resistor test result is affected, and in addition, the test needle hole and the test needle seat may deform at high temperature and low temperature, so that a part of deviation exists between the position of the test probe on the needle hole and the ideal state. In one possible embodiment, the pinhole difference information may include angle information between the first pinhole and the second pinhole, and in this embodiment, step S420 may include adjusting the position of the test needle holder or the position of the carrier tray based on the difference between the angle information and the placement angle information of the resistor to be tested, so that the resistor to be tested, the first pinhole, and the second pinhole are on the same vertical plane.
It should be understood that the position information of the pinholes may include position coordinates, etc., and according to the position coordinates of the first pinhole and the second pinhole, an angle value (angle information) between a connecting line of two points of the first pinhole and the second pinhole relative to a horizontal reference line may be determined, where the horizontal reference line for determining the angle information between the first pinhole and the second pinhole is consistent with the horizontal reference line for determining the placement angle information of the resistor to be tested. And comparing the angle information between the first pinhole and the second pinhole with the placement angle information of the resistor to be tested, and determining an angle difference value between the first pinhole and the second pinhole, so that the object carrying tray can be adjusted according to the angle difference value, for example, the object carrying tray can be adjusted in a rotating way according to the angle difference value, so that the placement angle of the adjusted resistor is consistent with the angle information between the first pinhole and the second pinhole, and the test probe can be ensured to accurately fall to a test position of the resistor to be tested. Or the positions of the first test needle seat and the second test needle seat can be adjusted according to the angle difference value, so that the adjusted first needle hole, the adjusted second needle hole and the resistor to be tested can be positioned on the same vertical plane, and thus, the test probes on the first needle hole and the second needle hole can accurately and vertically drop on the resistor to be tested. For ease of understanding, referring to fig. 3 to 4, fig. 3 shows an example schematic diagram of the resistor to be tested and the position of the pin holder before adjustment, and fig. 4 shows a schematic diagram of the resistor to be tested and the position of the pin holder after adjustment. As can be seen from fig. 3, there is an angular deviation α between the positions of the resistor a to be tested and the two needle holders (the first test needle holder 2a and the second test needle holder 2 b), at this time, the angular deviation α corresponding to the rotation of the carrier disc can be controlled, so as to obtain an adjusted schematic diagram as shown in fig. 4, and the two test needle holders (needle holes) and the resistor a to be tested are located in the same vertical plane, so that the resistor a to be tested can be stably contacted when the test probe is dropped.
In one possible embodiment, the pinhole difference information further includes distance information between the first pinhole and the second pinhole, the resistance position information includes electrode distance information, and in this embodiment, step S420 may include adjusting the position of the test needle holder based on the distance information and the electrode distance information. The distance information of the electrodes, namely the distance between two endpoints of the resistor, can be used for adjusting the positions of the needle bases according to the distance information of the electrodes, so that the distance information between pinholes on the two needle bases can be consistent with the distance information of the electrodes, and the electrodes at two ends of the resistor can be accurately contacted when the test probe falls down to complete the resistance test. In the present embodiment, the adjustment of the test needle holder according to the distance value is required to convert the pixel distance value into a corresponding actual physical distance value before the adjustment. Before the resistance image of the resistor to be tested and the pinhole image of the test needle seat are collected, camera calibration can be carried out to determine the conversion relation between the pixel distance and the physical distance of the image collected by the image collecting device, so that the electrode distance value or the pinhole distance value of the pixel layer can be converted into the physical distance value in actual operation according to the conversion relation, the distance between the test needle seats is adjusted accordingly, and the accuracy of the needle insertion test is ensured.
It is easy to understand that according to the resistance testing method provided by the embodiment, relatively accurate resistance position information and pinhole position information can be determined through the resistance image and pinhole image during testing, so that the position of the testing needle seat can be automatically adjusted according to the information, the testing probe can be ensured to be correctly contacted with the resistance testing point, the alignment error possibly caused by manual positioning is reduced, and the accuracy of the resistance testing can be effectively improved.
The application provides a resistance testing device which comprises at least one processor and a memory in communication connection with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the resistance testing method in the first embodiment.
Referring now to FIG. 5, a schematic diagram of a resistance testing apparatus suitable for use in implementing embodiments of the present application is shown. The resistance test device in the embodiment of the present application may include, but is not limited to, a mobile terminal such as a notebook computer, a PDA (Personal DIGITAL ASSISTANT: personal digital assistant), a PAD (Portable Application Description: tablet computer), etc., and a fixed terminal such as a desktop computer, etc. The resistance test apparatus shown in fig. 5 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present application.
As shown in fig. 5, the resistance test apparatus may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access Memory (RAM: random Access Memory) 1004. In the RAM1004, various programs and data required for the operation of the resistance test apparatus are also stored. The processing device 1001, the ROM1002, and the RAM1004 are connected to each other by a bus 1005. An input/output (I/O) interface 1006 is also connected to the bus. In general, a system including an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, etc., an output device 1008 including, for example, a Liquid crystal display (LCD: liquid CRYSTAL DISPLAY), a speaker, a vibrator, etc., a storage device 1003 including, for example, a magnetic tape, a hard disk, etc., and a communication device 1009 may be connected to the I/O interface 1006. The communication means 1009 may allow the resistance testing device to communicate wirelessly or by wire with other devices to exchange data. While resistance testing devices having various systems are shown in the figures, it should be understood that not all of the illustrated systems are required to be implemented or provided. More or fewer systems may alternatively be implemented or provided.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through a communication device, or installed from the storage device 1003, or installed from the ROM 1002. The above-described functions defined in the method of the disclosed embodiment of the application are performed when the computer program is executed by the processing device 1001.
The resistance test equipment provided by the application can solve the technical problem of lower resistance test accuracy in the related technology by adopting the resistance test method in the embodiment. Compared with the related art, the beneficial effects of the resistance testing device provided by the application are the same as those of the resistance testing method provided by the embodiment, and other technical features of the resistance testing device are the same as those disclosed by the method of the previous embodiment, and are not repeated here.
It is to be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the description of the above embodiments, particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon for performing the resistance testing method in the above-described embodiments.
The computer readable storage medium provided by the present application may be, for example, a USB flash disk, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system or device, or a combination of any of the foregoing. More specific examples of a computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access Memory (RAM: random Access Memory), a Read-Only Memory (ROM), an erasable programmable Read-Only Memory (EPROM: erasable Programmable Read Only Memory or flash Memory), an optical fiber, a portable compact disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this embodiment, the computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to electrical wiring, fiber optic cable, RF (Radio Frequency) and the like, or any suitable combination of the foregoing.
The computer readable storage medium may be included in the resistance test apparatus or may exist alone without being assembled into the resistance test apparatus.
The computer readable storage medium carries one or more programs, and when the one or more programs are executed by the resistance test equipment, the resistance test equipment acquires a resistance image of a resistance to be tested and a pinhole image of a test needle seat, a pinhole is arranged on the test needle seat and used for placing a test probe for resistance test, resistance position information of the resistance to be tested is determined based on the resistance image, pinhole position information is determined based on the pinhole image, and the position of the test needle seat is adjusted based on the resistance position information and the pinhole position information so that the test probe aims at the resistance to be tested to conduct resistance puncture test.
Computer program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of remote computers, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN: local Area Network) or a wide area network (WAN: wide Area Network), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present application may be implemented in software or in hardware. Wherein the name of the module does not constitute a limitation of the unit itself in some cases.
The readable storage medium provided by the application is a computer readable storage medium, and the computer readable storage medium stores computer readable program instructions (namely computer program) for executing the resistance test method, so that the technical problem of lower resistance test accuracy in the related technology can be solved. Compared with the related art, the beneficial effects of the computer readable storage medium provided by the application are the same as those of the resistance testing method provided by the above embodiment, and are not described herein.
The application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of a resistance testing method as described above.
The computer program product provided by the application can solve the technical problem of lower accuracy of resistance test in the related technology. Compared with the related art, the beneficial effects of the computer program product provided by the present application are the same as those of the resistance testing method provided by the above embodiment, and will not be described herein.
The foregoing description is only a partial embodiment of the present application, and is not intended to limit the scope of the present application, and all the equivalent structural changes made by the description and the accompanying drawings under the technical concept of the present application, or the direct/indirect application in other related technical fields are included in the scope of the present application.