Methods for measuring material width, electronic devices, and computer-readable storage media

By moving the camera on the measurement platform and using the color mark sensor and pixel spacing to perform trigonometric function correction calculations, the problem of narrow applicable range in the existing technology is solved, accurate measurement of the width of a variety of materials is achieved, the applicable range is expanded and improved Improve measurement accuracy and efficiency.

CN118463818BActive Publication Date: 2024-10-29TIMACO (JIANGSU) IND TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing width measurement technology has a narrow scope of application and is difficult to apply to many different types of materials.

Method used

By moving the camera on the measurement platform, using the color mark sensor to collect color marks, taking photos of both ends of the material, and performing trigonometric function correction calculations based on pixel intervals and tilt angles, accurate measurement of the width of a variety of materials is achieved.

Benefits of technology

It achieves accurate measurement of the width of materials of various textures and colors, expands the scope of application, improves measurement accuracy and efficiency, and reduces the impact of light and material surface conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118463818B_ABST
    Figure CN118463818B_ABST
Patent Text Reader

Abstract

The present invention provides a method for measuring the width of a material, an electronic device and a computer-readable storage medium. The material is located on a measuring platform, a camera is located above the measuring platform and can move from one end of the measuring platform to the other end, and the camera is integrated with a color mark sensor. The method comprises the following steps: obtaining a color mark collected by the color mark sensor during the movement of the camera from one end of the measuring platform to the other end; triggering the camera to take photos when the color mark collected by the color mark sensor changes to obtain a first photo and a second photo, and recording the position of the camera when taking the first photo and the second photo; the first photo contains a first end edge of the width of the material, and the second photo contains a second end edge of the width of the material; obtaining a first position of the first end edge of the material according to the position where the camera takes the first photo and the first photo; obtaining a second position of the second end edge of the material according to the position where the camera takes the second photo and the second photo; and determining the material width of the material according to the first position and the second position.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of dimension measurement, and in particular to a method for measuring material width, an electronic device and a computer-readable storage medium. Background Art

[0002] In today's industrial production and manufacturing process, accurate measurement of material size has always been crucial. Whether in automobile manufacturing, construction or other industries, accurate control of material width is directly related to product quality and production efficiency.

[0003] However, the existing width measurement technology has a series of problems in some aspects. Specifically, for example, the types of materials that can be measured by the existing width measurement technology are relatively single, that is, the same width measurement technology is difficult to be applied to a variety of different types of materials, and the scope of application is relatively narrow. Summary of the invention

[0004] The present invention provides a method for measuring the width of a material, an electronic device and a computer-readable storage medium, which are used to solve the technical problem that the application scope of the width measurement technology in the prior art is relatively narrow.

[0005] In one aspect, the present invention provides a method for measuring the width of a material, wherein the material is located on a measuring platform, the material and the measuring platform have different colors, a camera is located above the measuring platform and can move from one end of the measuring platform to the other end, and the camera is integrated with a color mark sensor, the method comprising:

[0006] Acquiring a color mark collected by the color mark sensor during movement of the camera from one end to the other end of the measuring platform;

[0007] When the color mark collected by the color mark sensor changes, the camera is triggered to take photos, a first photo and a second photo are obtained, and the position of the camera when taking the first photo and the second photo is recorded; wherein the first photo includes the first end edge of the material, and the second photo includes the second end edge of the material;

[0008] Obtaining a first position of a first end edge of the material according to a position of the camera when taking the first photo and the first photo;

[0009] Obtaining a second position of a second end edge of the material according to the position of the camera when taking the second photo and the second photo;

[0010] A material width of the material is determined based on the first position and the second position.

[0011] According to a method for measuring material width provided by the present invention, after determining the material width of the material according to the first position and the second position, the method further includes:

[0012] determining an inclination angle of a first end edge in the first photo or a second end edge in the second photo;

[0013] The material width of the material is corrected and calculated based on the inclination angle to obtain a corrected width of the material.

[0014] According to a method for measuring material width provided by the present invention, the material width of the material is corrected and calculated based on the inclination angle to obtain the corrected width of the material, including:

[0015] determining a trigonometric relationship between the tilt angle, the material width of the material, and a modified width of the material;

[0016] The material width of the material is corrected and calculated based on the trigonometric function relationship to obtain a corrected width of the material.

[0017] According to a method for measuring material width provided by the present invention, after performing correction calculation on the material width of the material based on the inclination angle, the method further comprises:

[0018] Displaying the corrected width of the material; and / or

[0019] Displays the material width of the material in question.

[0020] According to a method for measuring the width of a material provided by the present invention, obtaining a first position of a first end edge of the material according to a position of the camera when taking the first photo and the first photo, comprises:

[0021] Determining a first number of pixels spaced between a first edge and a relative position of the camera in the first photograph;

[0022] Determine a first distance between a first end edge of the material and the camera according to the first number and a length represented by a single pixel;

[0023] Obtaining a first position of a first end edge of the material according to the first spacing and a position of the camera when taking the first photo;

[0024] The step of obtaining the second position of the second end edge of the material according to the position of the camera when taking the second photo and the second photo comprises:

[0025] determining a second number of pixels spaced between a second end edge and a relative position of the camera in the second photo;

[0026] Determine a second distance between a second end edge of the material and the camera according to the second number and a length represented by a single pixel;

[0027] The second position of the second end edge of the material is obtained according to the second spacing and the position of the camera when taking the second photo.

[0028] According to a method for measuring material width provided by the present invention, determining the inclination angle of the first end edge in the first photo or the second end edge in the second photo includes:

[0029] Determine an angle between a first end edge in the first photo or a second end edge in the second photo and a width direction of the measuring platform;

[0030] The absolute value of the difference between the included angle and 90 degrees is taken as the tilt angle.

[0031] According to a method for measuring material width provided by the present invention, after triggering the camera to take photos and obtaining the first photo and the second photo, the method further includes:

[0032] A straight line fitting is performed on a first end edge of the material included in the first photo, and a straight line fitting is performed on a second end edge of the material included in the second photo.

[0033] According to a method for measuring material width provided by the present invention, when the material and the measuring platform have the same color, the brightness of the environment where the measuring platform is located is adjusted so that the color scales of the material and the measuring platform are different.

[0034] On the other hand, the present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for measuring the width of a material as described above is implemented.

[0035] On the other hand, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above methods for measuring the width of a material.

[0036] The method, electronic device and computer-readable storage medium for measuring material width provided by the present invention obtain the color mark collected by the color mark sensor during the process of the camera moving from one end to the other end of the measuring platform, and when the color mark includes the color mark of the material and the color mark of the measuring platform, the camera is triggered to take pictures to obtain the first photo and the second photo, and the position of the camera when taking the first photo and the second photo is recorded, and the first position of the first end edge of the material is obtained according to the position of the camera when taking the first photo and the first photo, and the second position of the second end edge of the material is obtained according to the position of the camera when taking the second photo and the second photo, and the material width of the material is determined according to the first position and the second position. The measuring platform of the present invention can be placed with a variety of materials of different textures (such as metal, plastic, wood or cloth, etc.) and different colors, so it can identify the material width of materials of various colors or textures, rather than being limited to a specific material, and has a wide range of applications. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0038] Figure 1 is a schematic flow chart of a method for measuring material width provided by an embodiment of the present invention;

[0039] Figure 2 is a schematic diagram of a material located on a measuring platform in a method for measuring material width provided by an embodiment of the present invention;

[0040] Figure 3 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0042] Combine the following Figure 1 The method of measuring the width of a material according to the present invention is described. Figure 11 is a flow chart of a method for measuring material width provided by an embodiment of the present invention. The material to be measured is located on a measuring platform, and the material and the measuring platform have different colors, that is, the color of the measuring platform is equivalent to the background color of the material. A camera is located above the measuring platform and can move from one end of the measuring platform to the other end, and the camera is integrated with a color mark sensor.

[0043] like Figure 1 As shown, the method for measuring the width of a material provided in an embodiment of the present invention can be performed by a computer, a mobile phone, a smart wearable device, etc. The method can mainly include the following steps:

[0044] 101. When the camera moves from one end to the other end of the measuring platform, a color mark collected by the color mark sensor is obtained.

[0045] In this step, the camera can be driven by a motor to move back and forth from one end to the other end of the measuring platform, and the moving distance range can be pre-set according to the size of the measuring platform. After the motor is started, it can indicate that the camera moves from one end to the other end of the measuring platform. A highly sensitive color mark sensor can be used to accurately identify the color mark of the material and the color mark of the measuring platform, which is beneficial to improve the accuracy of the measured width. For example, the sensitivity range of the color mark sensor can be 0-9999 nanometers. A high-resolution camera can also be used to obtain a clearer photo image, which is beneficial to improve the accuracy of the measured width. For example, the minimum recording unit of the camera can reach 8 microns. A signal connection can be established with the color mark sensor to obtain the color mark collected by the color mark sensor.

[0046] 102. When the color mark collected by the color mark sensor changes, the camera is triggered to take photos, a first photo and a second photo are obtained, and the position of the camera when taking the first photo and the second photo is recorded; wherein the first photo includes a first end edge of the material, and the second photo includes a second end edge of the material.

[0047] In this step, it can be understood that the color mark sensor initially collects the color mark of the measuring platform. When the color mark collected by the color mark sensor changes (it can also be understood as changing from one color mark to two color marks), it means that the color mark sensor has collected the color mark of the material, and it can also mean that the camera has moved to one end of the width direction of the material, and the first photo is taken. When the color mark changes again (it can also be understood as changing from two color marks to one color mark), it means that the color mark sensor has collected the color mark of the measuring platform, and it can also mean that the camera has moved to the other end of the width direction of the material, and the second photo is taken. It can be understood that the first end edge and the second end edge represent the edges at both ends of the material in the width direction, that is, the two edges arranged horizontally (also called left and right arrangement), and the material can generally be a metal material, such as copper foil or aluminum foil. The material can also be a wood material, a plastic material or other material, and the present invention does not make specific limitations on this. The above-mentioned materials can generally be materials used for industrial production. The materials in this embodiment only need to be placed on the measuring platform, and this embodiment can be applicable to materials of various different types of materials.

[0048] 103. Obtain a first position of a first end edge of the material according to a position of the camera when taking the first photo and the first photo.

[0049] In this step, a first distance between the first end edge and the camera can be determined according to the first photo, and then the first position of the first end edge can be obtained according to the first distance and the position of the camera when taking the first photo.

[0050] 104. Obtain a second position of a second end edge of the material according to the position of the camera when taking the second photo and the second photo.

[0051] In this step, the second distance between the second end edge and the camera can be determined according to the second photo, and then the second position of the second end edge can be obtained according to the second distance and the position of the camera when taking the second photo.

[0052] 105. Determine a material width of the material according to the first position and the second position.

[0053] This step can generally calculate the difference between the first position and the second position, so as to obtain the material width of the material. Those skilled in the art can understand that by adjusting the placement direction of the material on the measuring platform, the length of the material can be measured. In other words, this embodiment can measure both the width and the length of the material, depending on the placement direction of the material on the measuring platform. Assuming that the width of the material is currently being measured, the length of the material can be measured by rotating the material 90 degrees.

[0054] In this embodiment, when the camera moves from one end to the other end of the measuring platform, the color mark collected by the color mark sensor is obtained. When the color mark includes the color mark of the material and the color mark of the measuring platform, the camera is triggered to take pictures, and the first and second pictures are obtained. The position of the camera when taking the first and second pictures is recorded. The first position of the first end edge of the material is obtained according to the position of the camera when taking the first picture and the first picture. The second position of the second end edge of the material is obtained according to the position of the camera when taking the second picture and the second picture. The material width of the material is determined according to the first and second positions. The measuring platform of this embodiment can be placed with a variety of materials of different textures (such as metal, plastic, wood or cloth, etc.) and different colors, so it can identify the material width of materials of various colors or textures, rather than being limited to a specific material, and has a wide range of applications.

[0055] Moreover, compared to some solutions that use a camera to photograph the entire width of the material, that is, the solution that includes the two wide sides of the material and the area between the two wide sides in the photograph to calculate the width, the photograph obtained in this embodiment is smaller, thereby improving the image processing speed and improving the calculation efficiency. Compared to the solution that uses a camera to photograph the entire width of the material, because the photograph taken in this embodiment is smaller, an equally clear image can be obtained using a camera with relatively low pixels, which also reduces the cost of the camera. In addition, in the solution that includes the two wide sides of the material and the area between the two wide sides in the photograph to calculate the width, the calculation result of the width is easily affected by factors such as lighting or the surface state of the material, and is not reliable enough. However, this embodiment only photographs the area of ​​the wide side of the material, which can reduce or avoid the influence of the above factors, and the result obtained is more reliable and accurate.

[0056] In one embodiment of the present specification, after determining the material width of the material according to the first position and the second position, the method may further include:

[0057] determining a tilt angle of a first end edge in the first photo or a second end edge in the second photo;

[0058] The material width of the material is corrected and calculated based on the inclination angle to obtain the corrected width of the material.

[0059] In this embodiment, when the material to be measured is placed on the measuring platform, it may be tilted, that is, there are diversity in the placement angle of the material, which easily leads to the inaccurate calculation of the material width. In order to avoid the above problems, the tilt angle of the first end edge in the first photo or the second end edge in the second photo is determined, and the material width of the material is corrected and calculated based on the tilt angle to obtain the corrected width of the material, so that the accurate width of the material can be obtained. In this embodiment, there is no need to adjust the placement angle of the material on the measuring platform, and the tilt angle of the material can be obtained according to the first end edge in the first photo or the second end edge in the second photo, which is very efficient and simple. Because the placement position of the measuring platform is known, that is, the position and direction of the length edge of the measuring platform can be determined, so that the angle between the first end edge in the first photo or the second end edge in the second photo and the length edge of the measuring platform can be determined, and based on the angle, the tilt angle of the material can be determined.

[0060] In one embodiment of the present specification, performing a correction calculation on the material width of the material based on the tilt angle to obtain the corrected width of the material may include:

[0061] determining a trigonometric relationship between the tilt angle, the material width of the material, and the corrected width of the material;

[0062] The material width of the material is corrected and calculated based on the trigonometric function relationship to obtain the corrected width of the material.

[0063] In this embodiment, the trigonometric relationship between the tilt angle, the material width of the material and the corrected width of the material is determined, and the material width of the material is corrected and calculated based on the trigonometric relationship to obtain the corrected width of the material, and the corrected width is used as the actual width of the material to more accurately reflect the actual width of the material. The trigonometric relationship between the tilt angle, the material width of the material and the corrected width of the material can generally be that the corrected width of the material multiplied by the cosine of the tilt angle is equal to the material width of the material.

[0064] In one embodiment of the present specification, after the material width of the material is corrected and calculated based on the inclination angle, the following steps may also be included:

[0065] Display the corrected width of the material; and / or

[0066] Displays the material width of the material.

[0067] In this embodiment, after the material width of the material is corrected and calculated based on the tilt angle, the corrected width of the material and / or the material width of the material can be displayed on the display screen, or the corrected width and / or the material width can be recorded in text form and sent to a designated terminal device (such as a mobile phone or a wearable device) for display, so that relevant personnel can understand the width value of the material. Of course, the above measurement results can also be stored in a designated location in the form of a file for relevant personnel to copy.

[0068] In one embodiment of the present specification, obtaining the first position of the first end edge of the material according to the position of the camera when taking the first photo and the first photo may include:

[0069] Determining a first number of pixels spaced between a first end edge and a relative position of the camera in the first photograph;

[0070] Determine a first distance between a first end edge of the material and the camera based on the first number and the length represented by a single pixel;

[0071] Obtaining a first position of a first end edge of the material according to the first spacing and the position of the camera when taking the first photo;

[0072] Obtaining the second position of the second end edge of the material according to the position of the camera when taking the second photo and the second photo may include:

[0073] determining a second number of pixels spaced between a second end edge and a relative position of the camera in the second photograph;

[0074] determining a second distance between a second end edge of the material and the camera based on the second number and the length represented by a single pixel;

[0075] The second position of the second end edge of the material is obtained according to the second spacing and the position of the camera when taking the second photo.

[0076] In this embodiment, it can be understood that the first number of pixels spaced between the first end edge and the relative position of the camera in the first photo refers to the number of pixels in the same row, rather than the sum of the number of pixels in each row. Similarly, the second number is also the number of pixels in the same row. This embodiment obtains the first position of the first end edge of the material according to the first spacing and the position of the camera when taking the first photo, and obtains the second position of the second end edge of the material according to the second spacing and the position of the camera when taking the second photo. Compared with directly taking the position of the camera when taking the first photo as the first position of the first end edge and directly taking the position of the camera when taking the second photo as the second position of the second end edge, this embodiment can more accurately reflect the true positions of the first end edge and the second end edge, so that the width of the obtained material can be more accurate.

[0077] In one embodiment of the present specification, determining the inclination angle of the first end edge in the first photo or the second end edge in the second photo may include:

[0078] Determine the angle between the first end edge in the first photo or the second end edge in the second photo and the width direction of the measuring platform;

[0079] The absolute value of the difference between the included angle and 90 degrees is taken as the tilt angle.

[0080] In this embodiment, for example, the angle between the first end edge in the first photo and the width direction of the measuring platform is determined. For details, see Figure 2 , Figure 2 It is a schematic diagram of a material located on a measuring platform in a method for measuring material width provided by an embodiment of the present invention. Figure 2 The angle a in the figure represents the angle between the first end side and the width direction of the measuring platform. To determine the angle between the second end side in the second photo and the width direction of the measuring platform, please refer to Figure 2 , Figure 2 The angle b in the figure represents the angle between the second end side and the width direction of the measuring platform. The method for determining the tilt angle in this embodiment is very simple and accurate. The angle between the first end side in the first photo or the second end side in the second photo and the width direction of the measuring platform can be obtained by an angle detection algorithm.

[0081] In one embodiment of the present specification, after triggering the camera to take a photo and obtaining the first photo and the second photo, the following steps may also be included:

[0082] A straight line is fitted to a first end edge of the material included in the first photo, and a straight line is fitted to a second end edge of the material included in the second photo.

[0083] In this embodiment, sometimes the wide side of the material is not a straight line, but may be curved. Therefore, performing a straight line fitting on the first end side of the material contained in the first photo and performing a straight line fitting on the second end side of the material contained in the second photo is beneficial to improving the accuracy of the calculated width.

[0084] In one embodiment of the present specification, when the color of the material is the same as that of the measuring platform, the brightness of the environment where the measuring platform is located is adjusted so that the color scales of the material and the measuring platform are different.

[0085] In this embodiment, the material to be measured is often different from the material of the measuring platform. When the material to be measured is different from the material of the measuring platform, color difference may occur under different brightness (also understood as lighting conditions), thereby ensuring that the color mark sensor can detect different color marks. Of course, it is also possible to consider using a measuring platform with a color changing function to ensure that the color of the measuring platform is different from that of the material by changing the color of the measuring platform.

[0086] In some other embodiments of the present specification, the first photo includes a first end edge of the material, which may include:

[0087] The first photograph includes a portion of a first end edge of the material;

[0088] The second photograph includes a second end edge of the material and may include:

[0089] The second photograph includes a portion of a second end edge of the material.

[0090] In this embodiment, the first photo includes a portion of the first end edge of the material, for example, 20% of the first end edge of the material, and the second photo includes a portion of the second end edge of the material, for example, 20% of the second end edge of the material, that is, the shooting area of ​​the camera is not the entire width area of ​​the material, but a portion of the width area of ​​the material. The above method can reduce the shooting area of ​​the camera, make the first end edge in the first photo and the second end edge in the second photo clearer, and facilitate improving the accuracy of the calculation result. This embodiment uses the sampling concept, that is, using a portion of the wide side of the material to participate in the calculation to obtain the width of the material, which helps to reduce the processing pressure of the image data.

[0091] The width measurement scheme of the above embodiment repeatedly measures the width of the same material for multiple times, and the error of each width measurement result is within 0.03 mm, for example, it can be 0.02 mm, 0.01 mm or less. The above embodiments can be applied to materials of different sizes, shapes, colors and materials, and have high versatility in industrial production lines.

[0092] Based on the same general inventive concept, the present invention also protects a device for measuring the width of a material. The device for measuring the width of a material provided by the present invention is described below. The device for measuring the width of a material described below and the method for measuring the width of a material described above can be referred to each other. The device includes a color mark acquisition module, a camera module, a first position determination module, a second position determination module, and a width determination module.

[0093] The color mark acquisition module is used to acquire the color mark collected by the color mark sensor when the camera moves from one end to the other end of the measurement platform.

[0094] The photographing module is used to trigger the camera to take photos when the color mark includes the color mark of the material and the color mark of the measuring platform, obtain the first photo and the second photo, and record the position of the camera when taking the first photo and the second photo; wherein the first photo includes the first end edge of the material, and the second photo includes the second end edge of the material.

[0095] The first position determination module is used to obtain the first position of the first end edge of the material according to the position of the camera when taking the first photo and the first photo.

[0096] The second position determination module is used to obtain the second position of the second end edge of the material according to the position of the camera when taking the second photo and the second photo.

[0097] The width determination module is used to determine a material width of the material according to the first position and the second position.

[0098] Figure 3 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.

[0099] like Figure 3 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630, a communication bus 640, and a computer program stored in the memory 630 and executable on the processor 610, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other via the communication bus 640. The processor 610 may call the logic instructions (computer program) in the memory 630 to execute the method for measuring the width of the material.

[0100] The method comprises acquiring the color mark collected by the color mark sensor during the process of the camera moving from one end to the other end of the measuring platform.

[0101] When the color mark includes the color mark of the material and the color mark of the measuring platform, the camera is triggered to take pictures to obtain a first picture and a second picture, and the position of the camera when taking the first picture and the second picture is recorded; wherein the first picture includes the first end edge of the material, and the second picture includes the second end edge of the material.

[0102] The first position of the first end edge of the material is obtained according to the position of the camera when taking the first photo and the first photo.

[0103] The second position of the second end edge of the material is obtained according to the position of the camera when taking the second photo and the second photo.

[0104] A material width of the material is determined based on the first position and the second position.

[0105] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0106] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the method for measuring the width of a material provided by the above methods. The method includes: while the camera moves from one end to the other end of the measuring platform, acquiring a color mark collected by the color mark sensor.

[0107] When the color mark includes the color mark of the material and the color mark of the measuring platform, the camera is triggered to take pictures to obtain a first picture and a second picture, and the position of the camera when taking the first picture and the second picture is recorded; wherein the first picture includes the first end edge of the material, and the second picture includes the second end edge of the material.

[0108] The first position of the first end edge of the material is obtained according to the position of the camera when taking the first photo and the first photo.

[0109] The second position of the second end edge of the material is obtained according to the position of the camera when taking the second photo and the second photo.

[0110] A material width of the material is determined based on the first position and the second position.

[0111] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0112] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for measuring the width of a material, It is characterized in that The material is located on a measuring platform, the material and the measuring platform have different colors, a camera is located above the measuring platform and can move from one end of the measuring platform to the other end, the camera is integrated with a color mark sensor, and the method includes: Acquiring a color mark collected by the color mark sensor during movement of the camera from one end to the other end of the measuring platform; When the color mark collected by the color mark sensor changes, the camera is triggered to take photos, a first photo and a second photo are obtained, and the position of the camera when taking the first photo and the second photo is recorded; wherein the first photo includes a first end edge of the width of the material, and the second photo includes a second end edge of the width of the material; Obtaining a first position of a first end edge of the material according to a position of the camera when taking the first photo and the first photo; Obtaining a second position of a second end edge of the material according to the position of the camera when taking the second photo and the second photo; determining a material width of the material based on the first position and the second position; Wherein, after determining the material width of the material according to the first position and the second position, the method further includes: determining an inclination angle of a first end edge in the first photo or a second end edge in the second photo; Performing correction calculation on the material width of the material based on the inclination angle to obtain a corrected width of the material; The correcting and calculating the material width of the material based on the inclination angle to obtain the corrected width of the material includes: determining a trigonometric relationship between the tilt angle, the material width of the material, and a modified width of the material; The material width of the material is corrected and calculated based on the trigonometric function relationship to obtain a corrected width of the material.

2. The method for measuring the width of a material according to claim 1, It is characterized in that After the correction calculation of the material width of the material based on the inclination angle is performed, the method further includes: displaying the corrected width of the material; and / or Displays the material width of the material in question.

3. The method for measuring material width according to claim 1, It is characterized in that The step of obtaining a first position of a first end edge of the material according to a position of the camera when taking the first photo and the first photo comprises: Determining a first number of pixels spaced between a first edge and a relative position of the camera in the first photograph; Determine a first distance between a first end edge of the material and the camera according to the first number and a length represented by a single pixel; Obtaining a first position of a first end edge of the material according to the first spacing and a position of the camera when taking the first photo; The step of obtaining the second position of the second end edge of the material according to the position of the camera when taking the second photo and the second photo comprises: determining a second number of pixels spaced between a second end edge and a relative position of the camera in the second photo; Determine a second distance between a second end edge of the material and the camera according to the second number and a length represented by a single pixel; The second position of the second end edge of the material is obtained according to the second spacing and the position of the camera when taking the second photo.

4. The method for measuring the width of a material according to claim 1, It is characterized in that The determining the inclination angle of the first end edge in the first photo or the second end edge in the second photo includes: Determine an angle between a first end edge in the first photo or a second end edge in the second photo and a width direction of the measuring platform; The absolute value of the difference between the included angle and 90 degrees is taken as the tilt angle.

5. The method for measuring the width of a material according to claim 1, It is characterized in that After triggering the camera to take photos and obtaining the first photo and the second photo, the method further includes: A straight line fitting is performed on a first end edge of the material included in the first photo, and a straight line fitting is performed on a second end edge of the material included in the second photo.

6. The method for measuring the width of a material according to claim 1, It is characterized in that When the color of the material is the same as that of the measuring platform, the brightness of the environment where the measuring platform is located is adjusted so that the color scales of the material and the measuring platform are different.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the method for measuring the width of a material as claimed in any one of claims 1 to 6 is implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method for measuring the width of a material according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Pole piece slot positioning distance measuring method

    CN114777654A

  • Coating size measurement method and system, computer equipment and storage medium

    CN118129604A