Color ring resistance comparison method, electronic equipment and computer readable storage medium

Through the combination of the CRNN model and the CTC decode algorithm and the color extraction processing, the problem of misidentification of the color ring resistance comparison method in the case of poor clarity or reflection is solved, and the accuracy and efficiency of the color ring resistance comparison are improved.

CN119068067APending Publication Date: 2024-12-03GUANGZHOU LEICHEN INTELLIGENT EQUIP TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202310651247.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-02
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The existing color ring resistance comparison methods can easily lead to misidentification and poor accuracy when the picture is poorly clear or reflective.

Method used

The CRNN model is used to process the picture information of the color ring resistor to obtain the predicted color ring position and color information. Combined with the CTC decode algorithm, the dual comparison of model prediction and color extraction processing can be used to determine whether the resistance value of the color ring resistor is the same. If it is inconsistent, it will be determined. Perform further color ring color comparison to determine the accuracy of the resistance value.

Benefits of technology

Through the dual judgment of CRNN model prediction and color extraction processing, the error judgment rate of color ring resistance comparison is significantly reduced, and the accuracy and efficiency of the comparison method are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119068067A_ABST
    Figure CN119068067A_ABST
Patent Text Reader

Abstract

The invention discloses a color ring resistance comparison method, electronic equipment and a computer readable storage medium. The method comprises the following steps: acquiring first predicted color ring information of a first color ring resistor and second predicted color ring information of a second color ring resistor; based on the predicted color ring position information, performing color extraction processing on corresponding positions of the picture information of the first color ring resistor and the second color ring resistor to obtain first color ring color information of the first color ring resistor and second color ring color information of the second color ring resistor; if the predicted color ring color information of the first color ring resistor is inconsistent with the predicted color ring color information of the second color ring resistor, and the first color ring color information is inconsistent with the second color ring color information, it is judged that the resistance value of the first color ring resistor is different from the resistance value of the second color ring resistor, and the accuracy of the color ring resistance comparison method can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition technology, and in particular to a color ring resistance comparison method, an electronic device, and a computer-readable storage medium. Background Art

[0002] In the prior art, a color ring resistor is a commonly used electronic component in a traditional plug-in circuit. A plurality of color rings are coated on the color ring resistor, and each color of the color ring corresponds to a certain meaning. People can determine the resistance value of the color ring by the color combination of the color rings on the color ring resistor, thereby facilitating the installation and removal of the color ring resistor.

[0003] The defect of the prior art is that, for the current color ring resistor comparison method, when the picture clarity is poor or the reflection phenomenon or other negative effects are serious, it is easy to mistakenly identify two identical color ring resistors as two resistors with different resistance values, and it is also easy to mistakenly identify two color ring resistors with different resistance values ​​as two identical color ring resistors. That is, the accuracy of the existing color ring resistor comparison method is poor. Summary of the invention

[0004] The main technical problem solved by the present application is how to improve the accuracy of the color ring resistance comparison method.

[0005] In order to solve the above technical problems, the first technical solution adopted in the present application is: a color ring resistor comparison method, comprising: obtaining first predicted color ring information of a first color ring resistor and second predicted color ring information of a second color ring resistor, the first predicted color ring information and the second predicted color ring information are both predicted color ring information, and the predicted color ring information includes predicted color ring position information and predicted color ring color information obtained by processing the image information of the corresponding color ring resistor based on a preset CRNN model; based on the predicted color ring position information, color sampling processing is performed on the corresponding positions of the image information of the first color ring resistor and the second color ring resistor respectively to obtain the first color ring color information of the first color ring resistor and the second color ring color information of the second color ring resistor; if the predicted color ring color information of the first color ring resistor is inconsistent with the predicted color ring color information of the second color ring resistor, and the first color ring color information is inconsistent with the second color ring color information, it is determined that the resistance value of the first color ring resistor is different from the resistance value of the second color ring resistor.

[0006] Among them, obtaining the first predicted color ring information of the first color ring resistor and the second predicted color ring information of the second color ring resistor includes: obtaining the first picture information of the first color ring resistor and the second picture information of the second color ring resistor; processing the first picture information and the second picture information based on the CRNN model to obtain output information, and using the CTC decode algorithm to process the output information to obtain the first predicted color ring information of the first color ring resistor and the second predicted color ring information of the second color ring resistor.

[0007] Wherein, if the predicted color ring color information of the first color ring resistor is inconsistent with the predicted color ring color information of the second color ring resistor, and the first color ring color information is inconsistent with the second color ring color information, then it is determined that the resistance value of the first color ring resistor is different from the resistance value of the second color ring resistor, including: if the first target color ring color information of the first color ring resistor is different from the second target color ring color information of the second color ring resistor, and the color information corresponding to the first target color ring color information in the first color ring color information is different from the color information corresponding to the second target color ring color information in the second color ring color information, then it is determined that the resistance value of the first color ring resistor is different from the resistance value of the second color ring resistor; the first target color ring information is information in the first predicted color ring information corresponding to a color ring in the first color ring resistor that has not been color-matched, and the relative position of the color ring corresponding to the first target color ring color information in all color rings of the first color ring resistor is the same as the relative position of the color ring corresponding to the second target color ring color information in all color rings of the second color ring resistor.

[0008] Wherein, after color sampling is performed on corresponding positions of the image information of the first color ring resistor and the second color ring resistor based on the predicted color ring position information to obtain first color ring color information of the first color ring resistor and second color ring color information of the second color ring resistor, the color ring resistor comparison method further includes: if color information corresponding to the first target color ring color information in the first color ring color information is the same as color information corresponding to the second target color ring color information in the second color ring color information, and there is no color ring in the first color ring resistor that has not been color-ring color-compared, then it is determined that the resistance value of the first color ring resistor is the same as the resistance value of the second color ring resistor.

[0009] The color ring resistor comparison method further includes: determining, in the CIELAB color space, the lightness difference, chroma difference and hue difference between the color information corresponding to the first target color ring color information in the first color ring color information and the color information corresponding to the second target color ring color information in the second color ring color information; substituting the lightness difference, chroma difference and hue difference into the CIELAB color difference formula to obtain the color difference; if the color difference is less than a preset color difference threshold, determining that the color information corresponding to the first target color ring color information in the first color ring color information is the same as the color information corresponding to the second target color ring color information in the second color ring color information, and / or, if the color difference is not less than the preset color difference threshold, determining that the color information corresponding to the first target color ring color information in the first color ring color information is different from the color information corresponding to the second target color ring color information in the second color ring color information.

[0010] Among them, after obtaining the first predicted color ring information of the first color ring resistor and the second predicted color ring information of the second color ring resistor, the color ring resistor comparison method also includes: if the first target color ring color information of the first color ring resistor is the same as the second target color ring color information of the second color ring resistor, and there is no color ring in the first color ring resistor that has not been color-ring color-compared, then it is determined that the resistance value of the first color ring resistor is the same as the resistance value of the second color ring resistor.

[0011] The predicted color ring position information includes relative position information between all color rings of the corresponding color ring resistor; based on the predicted color ring position information, color sampling is performed on the corresponding positions of the image information of the first color ring resistor and the second color ring resistor, including: if the relative position information of the first color ring resistor and the second color ring resistor is consistent, then based on the predicted color ring position information, color sampling is performed on the corresponding positions of the image information of the first color ring resistor and the second color ring resistor.

[0012] Wherein, after color sampling is performed on corresponding positions of the image information of the first color ring resistor and the second color ring resistor based on the predicted color ring position information to obtain first color ring color information of the first color ring resistor and second color ring color information of the second color ring resistor, the color ring resistor comparison method further includes: if the first color ring color information is consistent with the second color ring color information, determining that the resistance value of the first color ring resistor is the same as the resistance value of the second color ring resistor.

[0013] In order to solve the above technical problems, the second technical solution adopted in the present application is: an electronic device, comprising: a memory and a processor; the memory is used to store program instructions, and the processor is used to execute the program instructions to implement the above method.

[0014] In order to solve the above technical problems, the third technical solution adopted in the present application is: a computer-readable storage medium, which stores program instructions, and the above method is implemented when the program instructions are executed by a processor.

[0015] The beneficial effect of the present application is that, different from the prior art, in the technical solution of the present application, first predicted color ring information of a first color ring resistor and second predicted color ring information of a second color ring resistor obtained by processing the CRNN model are obtained, and the first color ring color information of the first color ring resistor and the second color ring color information of the second color ring resistor are obtained based on the predicted color ring position information in all the predicted color ring information, and it is judged whether the predicted color ring color information of the first color ring resistor in all the predicted color ring information is consistent with the predicted color ring color information of the second color ring resistor, and if they are inconsistent, it is further judged whether the first color ring color information is consistent with the second color ring color information. Whether the color information of the two color rings is consistent, if it is still inconsistent, it can be determined that the resistance value of the first color ring resistor is different from the resistance value of the second color ring resistor. Based on the above method, it is possible to first determine whether the resistance values ​​of the two color ring resistors are the same based on the model prediction information obtained through CRNN model processing. If they are not the same, it is further determined whether the resistance values ​​of the two color ring resistors are the same based on the color ring color information obtained through color extraction processing. If they are still not the same, it can be finally determined that the resistance values ​​of the two color ring resistors are different. The error rate of the resistance comparison result obtained by twice judging the model prediction information and the color extraction processing information is low, which improves the accuracy of the color ring resistor comparison method. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0017] Figure 1 This is one of the flow charts of an embodiment of the color ring resistance comparison method of the present application;

[0018] Figure 2 This is the second flow chart of an embodiment of the color ring resistance comparison method of the present application;

[0019] Figure 3 This is one of the flow charts of another embodiment of the color ring resistance comparison method of the present application;

[0020] Figure 4 This is a second flow chart of another embodiment of the color ring resistance comparison method of the present application;

[0021] Figure 5 It is a structural schematic diagram of an embodiment of the electronic device of the present application;

[0022] Figure 6 It is a structural diagram of an embodiment of the computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0023] The present application is further described in detail below in conjunction with the accompanying drawings and examples. It is particularly noted that the following examples are only used to illustrate the present application, but are not intended to limit the scope of the present application. Similarly, the following examples are only some embodiments of the present application rather than all embodiments, and all other embodiments obtained by those of ordinary skill in the art without making creative work are within the scope of protection of the present application.

[0024] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0025] In the description of this application, it is necessary to explain that, unless otherwise clearly specified and limited, the terms "install", "set", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or connected through an intermediate medium. For ordinary technicians in this field, the above-mentioned specific meanings belonging to this application can be connected according to specific circumstances.

[0026] This application first proposes a color ring resistor comparison method, see Figure 1 , Figure 1 FIG. 1 is a flow chart of an embodiment of the color ring resistance comparison method of the present application. Figure 1 As shown, the color ring resistor comparison method includes:

[0027] Step S11: obtaining first predicted color ring information of a first color ring resistor and second predicted color ring information of a second color ring resistor.

[0028] The predicted color ring information includes predicted color ring position information and predicted color ring color information obtained by processing the image information of the corresponding color ring resistor based on a preset CRNN model.

[0029] The first predicted color ring information and the second predicted color ring information are both output data of a CRNN (Convolutional Recurrent Neural Network) model. The CRNN model can be trained based on a preset training sample before step S11 so that the CRNN model has the ability to recognize the color and position information of the color ring of the color ring resistor in the input data.

[0030] Data with image information of the first color ring resistor can be input into the trained CRNN model to obtain predicted color ring position information and predicted color ring color information of the first color ring resistor output by the CRNN model, that is, first predicted color ring information of the first color ring resistor.

[0031] Similarly, data with image information of the second color ring resistor can be input into the trained CRNN model to obtain the predicted color ring position information and predicted color ring color information of the second color ring resistor output by the CRNN model, that is, to obtain the second predicted color ring information of the second color ring resistor.

[0032] The predicted color wheel position information may include relative position information between all color wheels in the corresponding color wheel resistor, and the predicted color wheel color information may include color information of each color wheel in the corresponding color wheel resistor.

[0033] Step S12: based on the predicted color wheel position information, color sampling is performed on corresponding positions of the image information of the first color wheel resistor and the second color wheel resistor to obtain first color wheel color information of the first color wheel resistor and second color wheel color information of the second color wheel resistor.

[0034] Among them, the position of each color ring in the first color ring resistor can be determined based on the predicted color ring position information of the first color ring resistor, and the position of each color ring in the image information of the first color ring resistor is subjected to color extraction processing to extract the color information of each color ring of the first color ring resistor, which is recorded as the first color ring color information.

[0035] Similarly, based on the predicted color ring position information of the second color ring resistor, the position of each color ring in the second color ring resistor can be determined, and the position of each color ring in the image information of the second color ring resistor can be subjected to color extraction processing to extract the color information of each color ring of the second color ring resistor, which is recorded as the second color ring color information.

[0036] Step S13: if the predicted color ring color information of the first color ring resistor is inconsistent with the predicted color ring color information of the second color ring resistor, and the first color ring color information is inconsistent with the second color ring color information, then determine that the resistance value of the first color ring resistor is different from the resistance value of the second color ring resistor.

[0037] Specifically, see Figure 2 , Figure 2 This application, if Figure 2 As shown, step S13 may specifically include the following steps:

[0038] Step S131: determining whether the predicted color ring color information of the first color ring resistor is consistent with the predicted color ring color information of the second color ring resistor.

[0039] It may be determined whether the color of at least one color ring in the predicted color ring color information of the first color ring resistor is consistent with the color of the corresponding color ring in the predicted color ring color information of the second color ring resistor.

[0040] If they are inconsistent, the resistance of the first color ring resistor is more likely to be different from the resistance of the second color ring resistor, that is, the first color ring resistor and the second color ring resistor are more likely to be two different resistors. Therefore, if the predicted color ring color information of the first color ring resistor is inconsistent with the predicted color ring color information of the second color ring resistor, step S132 is executed to perform further color ring color comparison.

[0041] Step S132: Determine whether the color information of the first color wheel is consistent with the color information of the second color wheel.

[0042] It can be determined whether the color of at least one color ring in the first color ring color information of the first color ring resistor is consistent with the color of the corresponding color ring in the second color ring color information of the second color ring resistor.

[0043] If they are inconsistent, the resistance value of the first color ring resistor is highly likely to be different from the resistance value of the second color ring resistor, that is, the first color ring resistor and the second color ring resistor are highly likely to be two different resistors.

[0044] It should be noted that step S131 is to compare the color of the color ring based on the model prediction data obtained by the CRNN model processing, and step S132 is to compare the color of the color ring based on the color extraction processing data obtained by the color extraction processing. After two comparisons of step S131 and step S132, if it is still determined that there is a difference in the color ring colors of the first color ring resistor and the second color ring resistor, the possibility that the first color ring resistor and the second color ring resistor are different resistors will be very high. Therefore, if the color information of the first color ring is inconsistent with the color information of the second color ring, step S133 is executed to make a final judgment.

[0045] Step S133: determining whether the resistance value of the first color ring resistor is different from the resistance value of the second color ring resistor.

[0046] Among them, after double comparison of the model prediction data and the color extraction processing data, it is concluded that at least one color ring in the first color ring resistor is different from the corresponding color ring in the second color ring resistor, and it can be finally determined that the resistance value of the first color ring resistor is different from the resistance value of the second color ring resistor.

[0047] In practice, the first color ring resistor may be a resistor with a resistance value to be detected, and the second color ring resistor may be a template resistor, that is, a resistor with a known resistance value.

[0048] Through the color ring resistor comparison method, the resistance value of the resistor to be detected can be determined by determining whether the resistor to be detected is the same as each template resistor.

[0049] Different from the prior art, in the technical solution of the present application, the first predicted color ring information of the first color ring resistor and the second predicted color ring information of the second color ring resistor obtained by the CRNN model processing are obtained, and the first color ring color information of the first color ring resistor and the second color ring color information of the second color ring resistor are obtained based on the predicted color ring position information in all the predicted color ring information, and it is judged whether the predicted color ring color information of the first color ring resistor in all the predicted color ring information is consistent with the predicted color ring color information of the second color ring resistor. If they are inconsistent, it is further judged whether the first color ring color information is consistent with the second color ring color information. If they are still inconsistent, it can be determined that the resistance value of the first color ring resistor is different from the resistance value of the second color ring resistor. Based on the above method, it is possible to first judge whether the resistance values ​​of the two color ring resistors are the same based on the model prediction information obtained by the CRNN model processing. If they are not the same, it is further judged whether the resistance values ​​of the two color ring resistors are the same based on the color ring color information obtained by the color extraction processing. If they are still different, it can be finally determined that the resistance values ​​of the two color ring resistors are different. The error rate of the resistance comparison result obtained by the two judgments of the model prediction information and the color extraction processing information is low, thereby improving the accuracy of the color ring resistor comparison method.

[0050] When only using model prediction information to determine whether the color information of the first color ring resistor and the second color ring resistor is the same, it is easy to make prediction errors and cause the final result to be incorrect, and the accuracy is low. When only using color extraction processing information to determine whether the color information of the first color ring resistor and the second color ring resistor is the same, it is also necessary to use the corresponding model processing to obtain the position of each color ring, and it is necessary to perform color extraction processing on each color ring separately. Although the accuracy is high, the amount of calculation and time consumed are longer.

[0051] The color ring resistor comparison method provided by the present application first uses model prediction information for comparison, and only when there is a difference in the model prediction information corresponding to the two resistors, does it further use color extraction processing information to determine whether the color information of the corresponding color rings is indeed different. Finally, only when the two types of information are used to determine that the color information of the color rings is different, it is finally determined that the resistance value of the first color ring resistor is different from the resistance value of the second color ring resistor. That is, if the color information can be determined to be consistent through the model prediction information, there is no need for subsequent processing, thereby improving the processing speed. However, if it is determined through the model prediction information that the color information of the corresponding color rings of the two resistors is inconsistent, it is still necessary to further determine whether the color information of the corresponding color rings of the two resistors is consistent through the color extraction processing information, and at this time, the final judgment is made based on the result obtained by the determination through the color extraction processing information. Based on the above method, the processing speed of the color ring resistor comparison method can be improved as much as possible while improving its accuracy.

[0052] In one embodiment, after step S12, the color ring resistance comparison method may further include:

[0053] If the predicted color ring color information of the first color ring resistor is inconsistent with the predicted color ring color information of the second color ring resistor, and the first color ring color information is consistent with the second color ring color information, it is determined that the resistance value of the first color ring resistor is the same as the resistance value of the second color ring resistor.

[0054] Specifically, if the color of each color ring in the first color ring resistor is the same as the color of the corresponding color ring in the second color ring resistor, it can be determined that the resistance value of the first color ring resistor is the same as the resistance value of the second color ring resistor.

[0055] Based on the above method, when the predicted color ring color information obtained by the CRNN model determines that the first color ring resistor is different from the second color ring resistor, the color ring color information obtained by the color extraction process can be further compared to reduce the misrecognition rate of the color ring resistance comparison method, avoid the misjudgment of the same resistor being different due to CRNN model prediction errors, and improve the accuracy of the color ring resistance comparison method.

[0056] In one embodiment, step S11 may specifically include:

[0057] First image information of a first color ring resistor and second image information of a second color ring resistor are obtained.

[0058] The first picture information and the second picture information are processed based on the CRNN model to obtain output information, and the output information is processed using a CTC decode algorithm to obtain first predicted color ring information of the first color ring resistor and second predicted color ring information of the second color ring resistor.

[0059] Specifically, the CTC decode (Connectionist Temporal Classification decode, temporal classification decoding based on neural network) algorithm is a post-processing algorithm of the CRNN model. Through the processing of the CTC decode algorithm, the predicted color ring position information in the output data of the CRNN model can be retained, thereby combining the predicted color ring color information output by the CRNN model to output the predicted color ring information of the first color ring resistor and / or the predicted color ring information of the second color ring resistor.

[0060] Based on the above manner, the accuracy of the predicted color wheel position information in each predicted color wheel information obtained can be improved through a post-processing algorithm, thereby improving the accuracy of the color wheel resistance comparison method.

[0061] This application also proposes a color ring resistance comparison method, see Figure 3 , Figure 3 FIG. 1 is a flow chart of another embodiment of the color ring resistor comparison method of the present application. Figure 3 As shown, the color ring resistor comparison method includes:

[0062] Step S21: obtaining first predicted color ring information of a first color ring resistor and second predicted color ring information of a second color ring resistor.

[0063] Step S22: based on the predicted color wheel position information, color sampling is performed on corresponding positions of the image information of the first color wheel resistor and the second color wheel resistor to obtain first color wheel color information of the first color wheel resistor and second color wheel color information of the second color wheel resistor.

[0064] Step S23: If the first target color ring color information of the first color ring resistor is different from the second target color ring color information of the second color ring resistor, and the color information corresponding to the first target color ring color information in the first color ring color information is different from the color information corresponding to the second target color ring color information in the second color ring color information, then it is determined that the resistance value of the first color ring resistor is different from the resistance value of the second color ring resistor.

[0065] Among them, the first target color ring information is information in the predicted color ring information corresponding to a color ring in the first color ring resistor that has not been subjected to color ring color comparison and judgment, and the relative position of the color ring corresponding to the first target color ring color information in all color rings of the first color ring resistor is the same as the relative position of the color ring corresponding to the second target color ring color information in all color rings of the second color ring resistor.

[0066] Specifically, see Figure 4 , Figure 4 FIG. 2 is a flow chart of another embodiment of the color ring resistor comparison method of the present application. Figure 4As shown, step S23 may specifically include the following steps:

[0067] Step S231: determining whether the first target color ring color information of the first color ring resistor is the same as the second target color ring color information of the second color ring resistor.

[0068] The color ring that has not been subjected to color comparison and judgment refers to the color ring that has not been subjected to corresponding judgment processing in step S231 and / or S232.

[0069] If the first target color ring color information of the first color ring resistor is different from the second target color ring color information of the second color ring resistor, step S232 is executed.

[0070] Step S232: determining whether the color information corresponding to the first target color wheel color information in the first color wheel color information is the same as the color information corresponding to the second target color wheel color information in the second color wheel color information.

[0071] The position of the color ring corresponding to the first target color ring color information is recorded as the target position, and step S232 may specifically determine whether the color information of the color ring at the target position in the first color ring color information is the same as the color information of the color ring at the target position in the second color ring color information.

[0072] If the color information corresponding to the first target color ring color information in the first color ring color information is different from the color information corresponding to the second target color ring color information in the second color ring color information, step S233 is executed.

[0073] Step S233: determining that the resistance value of the first color ring resistor is different from the resistance value of the second color ring resistor.

[0074] Specifically, steps S21 and S22 correspond to steps S11 and S12 in the previous embodiment, and are not described in detail here.

[0075] In step S231, if it is determined that the color of a color ring in the first color ring resistor is different from the color of a color ring corresponding to the position of the color ring in the second color ring resistor, step S232 can be continued. In step S232, if it is still determined that the color of a color ring corresponding to the position of the color ring in the first color ring color information is different from the color of a color ring corresponding to the position of the color ring in the second color ring color information, it can be finally determined that the resistance value of the first color ring resistor is different from the resistance value of the second color ring resistor.

[0076] Based on the above method, after the color comparison of a color ring located at the same position in different resistors is performed respectively based on the predicted color ring information obtained by the CRNN model prediction and the color ring color information obtained based on the color extraction process, if it is determined that there is a color difference in the color of a color ring, it can be determined that the color of at least one color ring in the first color ring resistor is different from the color of the color ring at the corresponding position in the second color ring resistor, that is, it can be finally determined that the resistance value of the first color ring resistor must be different from the resistance value of the second color ring resistor, thereby improving the accuracy of the color ring resistor comparison method.

[0077] In one embodiment, if Figure 3 As shown, after step S22, the color ring resistance comparison method further includes:

[0078] Step S24: If the color information corresponding to the first target color ring color information in the first color ring color information is the same as the color information corresponding to the second target color ring color information in the second color ring color information, and there is no color ring in the first color ring resistor that has not been color-matched, then it is determined that the resistance value of the first color ring resistor is the same as the resistance value of the second color ring resistor.

[0079] Specifically, see Figure 4 , Figure 4 FIG. 2 is a flow chart of another embodiment of the color ring resistor comparison method of the present application. Figure 4 As shown, if the color information corresponding to the first target color ring color information in the first color ring color information is the same as the color information corresponding to the second target color ring color information in the second color ring color information, then return to step S231 until there is no color ring in the first color ring resistor that has not been subjected to color ring color comparison judgment, then step S234 can be executed.

[0080] like Figure 4 As shown, the color ring resistance comparison method may further include the following steps:

[0081] Step S234: determining whether the resistance value of the first color ring resistor is the same as the resistance value of the second color ring resistor.

[0082] After executing step S231, if the first target color ring color information of the first color ring resistor is the same as the second target color ring color information of the second color ring resistor, return to executing step S231 until there is no color ring in the first color ring resistor that has not been color ring color comparison and judgment, then step S234 can be executed.

[0083] When it is determined through step S231 or step S232 that the colors of the color rings at a position in the first color ring resistor and the second color ring resistor are different, it is determined that the color of the color ring at the position in the first color ring resistor is different from the color of the color ring at the corresponding position in the second color ring resistor, and when it is determined through dual judgments of step S231 and step S232 that the colors of the color rings at a position in the first color ring resistor and the second color ring resistor are the same, it is determined that the color of the color ring at the position in the first color ring resistor is the same as the color of the color ring at the corresponding position in the second color ring resistor, and corresponding color comparison is performed on the remaining color rings that have not been color-compared based on step S231 or step S232.

[0084] If it is determined through the above color comparison that the color of each color ring in the first color ring resistor is the same as the color of the corresponding color ring in the second color ring resistor, that is, after executing step S231 and / or step S232 multiple times, the condition for executing step S233 is not met but there are no color rings that have not been color-compared, then it can be determined that the resistance value of the first color ring resistor is the same as the resistance value of the second color ring resistor.

[0085] Based on the above method, the misidentification of the color ring resistance comparison method can be effectively avoided, thereby improving the accuracy of the color ring resistance comparison method.

[0086] In one embodiment, the color ring resistance comparison method may further include:

[0087] Based on the CIELAB color difference algorithm, it is determined whether the color information corresponding to the first target color ring color information in the first color ring color information is the same as the color information corresponding to the second target color ring color information in the second color ring color information.

[0088] Specifically, when comparing the colors of the color wheels, two pieces of color information that need to be compared may be compared based on a preset color comparison algorithm to determine whether the two pieces of color information are the same or sufficiently similar.

[0089] Based on the CIELAB color difference algorithm, determining whether the color information corresponding to the first target color ring color information in the first color ring color information is the same as the color information corresponding to the second target color ring color information in the second color ring color information may specifically include:

[0090] Determine, in a CIELAB color space, a brightness difference, a chroma difference, and a hue difference between color information in the first color wheel color information corresponding to the first target color wheel color information and color information in the second color wheel color information corresponding to the second target color wheel color information.

[0091] Substituting the lightness difference, the chroma difference and the hue difference into the CIELAB color difference formula, the color difference is obtained.

[0092] If the color difference is less than a preset color difference threshold, it is determined that the color information corresponding to the first target color ring color information in the first color ring color information is the same as the color information corresponding to the second target color ring color information in the second color ring color information, and / or, if the color difference is not less than a preset color difference threshold, it is determined that the color information corresponding to the first target color ring color information in the first color ring color information is different from the color information corresponding to the second target color ring color information in the second color ring color information.

[0093] The preset color comparison algorithm may specifically be a CIELAB color difference algorithm, such as a CIE2000 color difference algorithm, or may be other types of color comparison algorithms, which are not limited here.

[0094] Based on the above manner, it is possible to process and analyze whether the color information is the same based on a color difference algorithm or other types of color comparison algorithms, thereby improving the reliability of the color ring resistor comparison method.

[0095] In one embodiment, the predicted color wheel position information includes relative position information between all color wheels of the corresponding color wheel resistor.

[0096] Before step S22, the color ring resistance comparison method further includes:

[0097] Determine whether the relative position information of the first color ring resistor and the second color ring resistor are consistent.

[0098] Step S22 may specifically include:

[0099] If the relative position information of the first color ring resistor and the second color ring resistor are consistent, then based on the predicted color ring position information, color extraction processing is performed on corresponding positions of the image information of the first color ring resistor and the second color ring resistor respectively.

[0100] Specifically, based on the above method, step S22 and subsequent steps can be executed to perform color ring color comparison only when it is ensured that the first color ring resistor and the second color ring resistor have multiple color rings with the same total number and the same relative position relationship. If the first color ring resistor and the second color ring resistor do not have multiple color rings with the same total number and the same relative position relationship, it can be directly determined that the first color ring resistor and the second color ring resistor are different resistors, which can avoid the waste of computing resources and improve the efficiency of the color ring comparison method.

[0101] In one embodiment, before step S22, the color ring resistance comparison method may further include:

[0102] Obtain the resistor body color of the first color ring resistor and the resistor body color of the second color ring resistor.

[0103] Step S22 may specifically include:

[0104] If the resistor body color of the first color ring resistor is consistent with the resistor body color of the second color ring resistor, based on the predicted color ring position information, color sampling is performed on corresponding positions of the image information of the first color ring resistor and the second color ring resistor respectively to obtain the first color ring color information of the first color ring resistor and the second color ring color information of the second color ring resistor.

[0105] Specifically, the color ring body color refers to the color of the non-color ring part of the corresponding color ring resistor, which can usually be blue or yellow, or other colors, which are not limited here. Generally speaking, the proportion of the body color part in a color ring resistor is much greater than the proportion of the color ring color part.

[0106] If the resistor body color of the first color ring resistor is consistent with the resistor body color of the second color ring resistor, a subsequent color ring comparison operation is required, that is, a step of performing color extraction processing on the corresponding positions of the image information of the first color ring resistor and the second color ring resistor based on the predicted color ring position information to obtain the first color ring color information of the first color ring resistor and the second color ring color information of the second color ring resistor and subsequent steps to determine whether the resistance values ​​of the two resistors are the same.

[0107] If the resistor body color of the first color ring resistor is inconsistent with the resistor body color of the second color ring resistor, it can be directly determined that the resistance values ​​of the first color ring resistor and the second color ring resistor are different without the need for subsequent color ring comparison, thereby improving the efficiency and accuracy of color ring resistor comparison.

[0108] Different from the prior art, in the technical solution of the present application, the first predicted color ring information of the first color ring resistor and the second predicted color ring information of the second color ring resistor obtained by the CRNN model are obtained, and the first color ring color information of the first color ring resistor and the second color ring color information of the second color ring resistor are obtained based on the predicted color ring position information in all the predicted color ring information, and it is judged whether the predicted color ring color information of the first color ring resistor in all the predicted color ring information is consistent with the predicted color ring color information of the second color ring resistor. If they are inconsistent, it is further judged whether the first color ring color information and the second color ring color information are consistent. Whether the information is consistent, if it is still inconsistent, it can be determined that the resistance value of the first color ring resistor is different from the resistance value of the second color ring resistor. Based on the above method, it is possible to first determine whether the resistance values ​​of the two color ring resistors are the same based on the model prediction information obtained through CRNN model processing. If they are not the same, then further determine whether the resistance values ​​of the two color ring resistors are the same based on the color ring color information obtained through color extraction processing. If they are still not the same, it can be finally determined that the resistance values ​​of the two color ring resistors are different. The error rate of the resistance comparison result obtained by twice judging the model prediction information and the color extraction processing information is low, which improves the accuracy of the color ring resistor comparison method.

[0109] This application also proposes an electronic device, see Figure 5 , Figure 5 is a schematic diagram of the structure of an embodiment of the electronic device of the present application, such as Figure 5 As shown, the electronic device 30 includes a processor 31 , a memory 32 and a bus 33 .

[0110] The processor 31 and the memory 32 are connected to the bus 33 respectively. The memory 32 stores program instructions. The processor 31 is used to execute the program instructions to implement the color ring resistance comparison method in the above embodiment.

[0111] In this embodiment, the processor 31 may also be referred to as a CPU (Central Processing Unit). The processor 31 may be an integrated circuit chip having signal processing capabilities. The processor 31 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor or the processor 31 may also be any conventional processor, etc.

[0112] Different from the prior art, in the technical solution of the present application, the first predicted color ring information of the first color ring resistor and the second predicted color ring information of the second color ring resistor obtained by the CRNN model are obtained, and the first color ring color information of the first color ring resistor and the second color ring color information of the second color ring resistor are obtained based on the predicted color ring position information in all the predicted color ring information, and it is judged whether the predicted color ring color information of the first color ring resistor in all the predicted color ring information is consistent with the predicted color ring color information of the second color ring resistor. If they are inconsistent, it is further judged whether the first color ring color information and the second color ring color information are consistent. Whether the information is consistent, if it is still inconsistent, it can be determined that the resistance value of the first color ring resistor is different from the resistance value of the second color ring resistor. Based on the above method, it is possible to first determine whether the resistance values ​​of the two color ring resistors are the same based on the model prediction information obtained through CRNN model processing. If they are not the same, then further determine whether the resistance values ​​of the two color ring resistors are the same based on the color ring color information obtained through color extraction processing. If they are still not the same, it can be finally determined that the resistance values ​​of the two color ring resistors are different. The error rate of the resistance comparison result obtained by twice judging the model prediction information and the color extraction processing information is low, which improves the accuracy of the color ring resistor comparison method.

[0113] The present application also proposes a computer-readable storage medium, such as Figure 6 As shown, Figure 6 is a schematic diagram of the structure of an embodiment of the computer-readable storage medium of the present application. Figure 6As shown, the computer-readable storage medium 40 stores program instructions 41 thereon, and when the program instructions 41 are executed by a processor (not shown), the color ring resistance comparison method in the above embodiment is implemented.

[0114] The computer-readable storage medium 40 of this embodiment can be, but is not limited to, a USB flash drive, an SD card, a PD optical drive, a mobile hard disk, a large-capacity floppy drive, a flash memory, a multimedia memory card, a server, a storage unit in an FPGA or an ASIC, etc.

[0115] Different from the prior art, in the technical solution of the present application, the first predicted color ring information of the first color ring resistor and the second predicted color ring information of the second color ring resistor obtained by the CRNN model are obtained, and the first color ring color information of the first color ring resistor and the second color ring color information of the second color ring resistor are obtained based on the predicted color ring position information in all the predicted color ring information, and it is judged whether the predicted color ring color information of the first color ring resistor in all the predicted color ring information is consistent with the predicted color ring color information of the second color ring resistor. If they are inconsistent, it is further judged whether the first color ring color information and the second color ring color information are consistent. Whether the information is consistent, if it is still inconsistent, it can be determined that the resistance value of the first color ring resistor is different from the resistance value of the second color ring resistor. Based on the above method, it is possible to first determine whether the resistance values ​​of the two color ring resistors are the same based on the model prediction information obtained through CRNN model processing. If they are not the same, then further determine whether the resistance values ​​of the two color ring resistors are the same based on the color ring color information obtained through color extraction processing. If they are still not the same, it can be finally determined that the resistance values ​​of the two color ring resistors are different. The error rate of the resistance comparison result obtained by twice judging the model prediction information and the color extraction processing information is low, which improves the accuracy of the color ring resistor comparison method.

[0116] In the description of the present application, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradicting each other.

[0117] In addition, 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 the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0118] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0119] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (which can be a personal computer, server, network device or other system that can fetch instructions from the instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0120] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A color ring resistor comparison method, characterized in that: include: Obtaining first predicted color ring information of a first color ring resistor and second predicted color ring information of a second color ring resistor, wherein the first predicted color ring information and the second predicted color ring information are both predicted color ring information, and the predicted color ring information includes predicted color ring position information and predicted color ring color information obtained by processing image information of corresponding color ring resistors based on a preset CRNN model; Based on the predicted color ring position information, color sampling is performed on corresponding positions of the image information of the first color ring resistor and the second color ring resistor to obtain first color ring color information of the first color ring resistor and second color ring color information of the second color ring resistor; If the predicted color ring color information of the first color ring resistor is inconsistent with the predicted color ring color information of the second color ring resistor, and the first color ring color information is inconsistent with the second color ring color information, it is determined that the resistance value of the first color ring resistor is different from the resistance value of the second color ring resistor.

2. The color ring resistance comparison method according to claim 1, characterized in that: The obtaining of first predicted color ring information of the first color ring resistor and second predicted color ring information of the second color ring resistor includes: Acquire first picture information of the first color ring resistor and second picture information of the second color ring resistor; Based on the CRNN model, the first picture information and the second picture information are respectively processed to obtain output information, and a CTC decode algorithm is used to process the output information to obtain the first predicted color ring information of the first color ring resistor and the second predicted color ring information of the second color ring resistor.

3. The color ring resistance comparison method according to claim 1 or 2, characterized in that: If the predicted color ring color information of the first color ring resistor is inconsistent with the predicted color ring color information of the second color ring resistor, and the first color ring color information is inconsistent with the second color ring color information, determining that the resistance value of the first color ring resistor is different from the resistance value of the second color ring resistor includes: If the first target color ring color information of the first color ring resistor is different from the second target color ring color information of the second color ring resistor, and the color information corresponding to the first target color ring color information in the first color ring color information is different from the color information corresponding to the second target color ring color information in the second color ring color information, then it is determined that the resistance value of the first color ring resistor is different from the resistance value of the second color ring resistor; The first target color ring information is information in the first predicted color ring information corresponding to a color ring in the first color ring resistor that has not undergone color ring color comparison, and the relative position of the color ring corresponding to the first target color ring color information in all color rings of the first color ring resistor is the same as the relative position of the color ring corresponding to the second target color ring color information in all color rings of the second color ring resistor.

4. The color ring resistance comparison method according to claim 3, characterized in that: After performing color sampling processing on corresponding positions of the picture information of the first color ring resistor and the second color ring resistor based on the predicted color ring position information to obtain first color ring color information of the first color ring resistor and second color ring color information of the second color ring resistor, the color ring resistor comparison method further includes: If the color information corresponding to the first target color ring color information in the first color ring color information is the same as the color information corresponding to the second target color ring color information in the second color ring color information, and there is no color ring in the first color ring resistor that has not been color-matched, then it is determined that the resistance value of the first color ring resistor is the same as the resistance value of the second color ring resistor.

5. The color ring resistance comparison method according to claim 3, characterized in that: The color ring resistance comparison method also includes: Determine, in a CIELAB color space, a brightness difference, a chroma difference, and a hue difference between color information in the first color wheel color information corresponding to the first target color wheel color information and color information in the second color wheel color information corresponding to the second target color wheel color information; Substituting the lightness difference, the chroma difference and the hue difference into the CIELAB color difference formula to obtain the color difference; If the color difference is less than a preset color difference threshold, it is determined that the color information corresponding to the first target color ring color information in the first color ring color information is the same as the color information corresponding to the second target color ring color information in the second color ring color information, and / or, if the color difference is not less than a preset color difference threshold, it is determined that the color information corresponding to the first target color ring color information in the first color ring color information is different from the color information corresponding to the second target color ring color information in the second color ring color information.

6. The color ring resistance comparison method according to claim 3, characterized in that: After obtaining the first predicted color ring information of the first color ring resistor and the second predicted color ring information of the second color ring resistor, the color ring resistor comparison method further includes: If the first target color ring color information of the first color ring resistor is the same as the second target color ring color information of the second color ring resistor, and there is no color ring in the first color ring resistor that has not been color-matched, it is determined that the resistance value of the first color ring resistor is the same as the resistance value of the second color ring resistor.

7. The color ring resistance comparison method according to claim 1, characterized in that: The predicted color ring position information includes relative position information between all color rings of the corresponding color ring resistor; The step of performing color extraction processing on corresponding positions of the image information of the first color ring resistor and the second color ring resistor based on the predicted color ring position information comprises: If the relative position information of the first color ring resistor and the second color ring resistor are consistent, then based on the predicted color ring position information, color extraction is performed on corresponding positions of the image information of the first color ring resistor and the second color ring resistor respectively.

8. The color ring resistance comparison method according to claim 1 or 2, characterized in that: After performing color sampling processing on corresponding positions of the picture information of the first color ring resistor and the second color ring resistor based on the predicted color ring position information to obtain first color ring color information of the first color ring resistor and second color ring color information of the second color ring resistor, the color ring resistor comparison method further includes: If the first color ring color information is consistent with the second color ring color information, it is determined that the resistance value of the first color ring resistor is the same as the resistance value of the second color ring resistor.

9. An electronic device, characterized in that: include: Memory and processor; The memory is used to store program instructions, and the processor is used to execute the program instructions to implement the method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions, and when the program instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Color ring resistor detection method and device and automatic optical detection system

    CN106529572A

  • Test paper recognition method and device, storage medium and equipment

    CN113537203A

  • Face living body detection method and device, equipment and storage medium

    CN113869219A

  • Verification code identification method and device, electronic equipment and storage medium

    CN115601761A

  • Device for reading resistor value with computer vision and method thereof

    US20170221200A1