WO2023019508A1 - Method for detecting glue application area, electronic device and computer-readable storage medium - Google Patents

Method for detecting glue application area, electronic device and computer-readable storage medium Download PDF

Info

Publication number
WO2023019508A1
WO2023019508A1 PCT/CN2021/113513 CN2021113513W WO2023019508A1 WO 2023019508 A1 WO2023019508 A1 WO 2023019508A1 CN 2021113513 W CN2021113513 W CN 2021113513W WO 2023019508 A1 WO2023019508 A1 WO 2023019508A1
Authority
WO
WIPO (PCT)
Prior art keywords
preset
area
image
gluing
target image
Prior art date
Application number
PCT/CN2021/113513
Other languages
French (fr)
Chinese (zh)
Inventor
屠银行
刘兴安
宋世闯
Original Assignee
宁德时代新能源科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 宁德时代新能源科技股份有限公司 filed Critical 宁德时代新能源科技股份有限公司
Priority to PCT/CN2021/113513 priority Critical patent/WO2023019508A1/en
Priority to CN202180085537.0A priority patent/CN116917935A/en
Publication of WO2023019508A1 publication Critical patent/WO2023019508A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis

Definitions

  • the present application relates to the technical field of detection, in particular to a method for detecting a glue-coated area, electronic equipment and a computer-readable storage medium.
  • the battery In the power battery system, the battery generates excess heat, which can be transferred through contact with the surface of the cooling plate, and finally taken away by the cooling fluid passing through the internal flow channel of the device.
  • a layer of glue is applied on the cooling plate, and the glue-coated area is tested to ensure that the glue-coated area meets the preset requirements.
  • the way to detect the glued area of the liquid cold plate is: scan the glued liquid cold plate with a line-scan camera to obtain a scanned image, and then directly detect the glued area based on the scanned image, which may easily lead to detection The data error is large.
  • the present application provides a method for detecting glued area, an electronic device and a computer-readable storage medium, which can reduce the error of detected data.
  • the present application provides a method for detecting a gluing area, comprising: receiving an image of an area where the gluing operation is completed; wherein, the image is an image collected by a camera under a light source; brightness parameter value; adjust the brightness of the light source according to the deviation value between the gray parameter value and the preset reference value; receive the completed gluing collected by the camera based on the adjusted brightness of the light source A target image of the working area; according to the target image, detect the gluing area of the area where the gluing operation is completed; wherein, the target image is an image that meets a preset definition requirement.
  • the image of the area where the gluing operation is completed is collected by the camera under a light source, and the brightness of the light source is adjusted according to the deviation between the grayscale parameter value of the image and the preset reference value.
  • the adjustment is to adjust the current brightness of the light source in combination with the deviation value between the grayscale parameter value of the image collected under the current brightness and the preset reference value.
  • the deviation value can reflect the clarity of the image captured by the camera at the current brightness.
  • the brightness of the light source is adjusted, which is beneficial to enable the camera to capture the target image that meets the preset definition requirements based on the adjusted brightness of the light source.
  • the target image that meets the preset definition requirements can relatively clearly show the gluing area of the area where the gluing operation is completed. Therefore, detecting the gluing area of the area where the gluing operation is completed according to the target image can reduce the detection cost. data error.
  • the grayscale parameter value is the grayscale mean value
  • the preset reference value is the grayscale mean value reference value
  • the grayscale parameter value is the grayscale variance
  • the preset reference value The value is the reference value of gray variance
  • Both grayscale mean and grayscale variance are parameters that can accurately measure clarity.
  • the preset reference value is set as the grayscale mean reference value.
  • the grayscale variance reference value so that the deviation value between the grayscale parameter value and the preset reference value can accurately measure the deviation between the definition of the received image and the preset definition.
  • the detecting the gluing area of the area where the gluing operation is completed according to the target image includes: affine transforming the preset area in the preset template image to the target image The position of the preset area in the preset template image on the target image is obtained, wherein the preset template image corresponds to the area where the gluing operation is completed and the preset template image is pre-set The position of the preset area is located; according to the position of the preset area in the preset template image on the target image, the size parameters of the area where the gluing operation is completed, and the preset adjacent presets The horizontal pitch and/or the vertical pitch between regions and the total number m of preset regions on the region where the gluing operation is completed are preset to obtain the positions of m preset regions on the target image; wherein, m is An integer greater than 1; according to the positions of the m preset areas on the target image, detect the gluing areas of the m preset areas on the area where the gluing operation is completed
  • the position of the preset area in the preset template image on the target image, the size parameters of the area where the gluing operation is completed, the preset horizontal spacing and/or vertical spacing between adjacent preset areas and The total number m of the preset areas on the area where the pre-set gluing operation is completed can obtain the positions of the m preset areas on the target image, that is, it is not necessary to equalize the positions of the m preset areas when making the preset template image.
  • Embodiments of the present application help to reduce the complexity of making preset template images, and m is a preset number, so that the number of preset regions that need to be generated on the target image can be flexibly selected according to actual needs, which is conducive to satisfying practical applications different needs in.
  • one preset area is pre-positioned on the preset template image.
  • the one preset area is located in the initial area of the preset template image, and the initial area corresponds to the area scanned by the camera in the area where the gluing operation is completed.
  • the first glue detection sub-area is located in the initial area of the preset template image, and the initial area corresponds to the area scanned by the camera in the area where the gluing operation is completed.
  • the affine transformation of the preset area in the preset template image to the target image to obtain the position of the preset area in the preset template image on the target image includes: : determine the relative displacement and relative angle between the preset template image and the target image; affine transform the preset region in the preset template image to the target according to the relative displacement and the relative angle On the image, the position of the preset area in the preset template image on the target image is obtained.
  • the preset area in the preset template image is affine transformed On the target image, it is possible to avoid the impact of the offset between the preset template image and the target image on the detection data during the detection process, which is beneficial to improve the accuracy of the detection data.
  • the gluing area of the m preset areas on the area where the gluing operation is completed after detecting the gluing areas of the m preset areas on the area where the gluing operation is completed according to the positions of the m preset areas on the target image, it further includes: Compare the gluing areas of the m preset areas with the preset reference areas respectively, and determine whether the gluing areas of the m preset areas meet the preset gluing requirements; according to the m preset Whether the gluing area of the area satisfies the preset gluing requirements, and determine the detection result of the gluing area of the area where the gluing operation is completed.
  • the detection result of the gluing area of the area where the gluing operation is completed can be more accurately and comprehensively determined, that is, for gluing
  • the detection result of the glued area of the region is more accurate and comprehensive.
  • the present application provides an electronic device, including: at least one processor; and a memory connected in communication with the at least one processor; wherein, the memory stores information that can be executed by the at least one processor. Instructions, the instructions are executed by the at least one processor, so that the at least one processor can execute the above-mentioned glue-coated area detection method.
  • the present application provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the above-mentioned glue-coated area detection method is realized.
  • Fig. 1 is a schematic diagram of a detection scene disclosed in an embodiment of the present application
  • Fig. 2 is a schematic flow chart of a detection method of a glue-coated area disclosed in an embodiment of the present application
  • FIG. 3 is a schematic flowchart of the implementation process of step 205 disclosed in an embodiment of the present application.
  • Fig. 4 is a schematic diagram of the positions of m preset regions on the target image disclosed by an embodiment of the present application.
  • Fig. 5 is a schematic diagram of a preset template image disclosed in an embodiment of the present application.
  • Fig. 6 is a schematic flow chart of another detection method for glue area disclosed in an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of the preprocessing process mentioned in step 612 disclosed in an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of the process of adjusting the brightness of the light source mentioned in step 620 disclosed in an embodiment of the present application;
  • Fig. 9 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application.
  • Power batteries are not only used in energy storage power systems such as hydraulic, thermal, wind and solar power plants, but also widely used in electric vehicles such as electric bicycles, electric motorcycles, electric vehicles, as well as military equipment and aerospace and other fields . With the continuous expansion of power battery application fields, its market demand is also constantly expanding.
  • the cooling system takes advantage of the large heat transfer coefficient of the coolant flow, and relies on the coolant flow to transfer heat. It is one of the effective heat dissipation methods at present, and can dissipate hundreds of watts to thousands of watts of heat.
  • the cooling plate is directly in contact with the bottom plate of the cooled equipment by placing the coolant pipeline, which can reduce the number of heat exchange interfaces between the cooled equipment and the coolant, thereby maintaining the lowest thermal resistance and improving performance.
  • the cooling plate In order to achieve better heat dissipation performance, in addition to the heat dissipation performance of the cooling plate itself, it is also required that the cooling plate is in close contact with the bottom plate of the cooled equipment during the assembly process and has a sufficient contact area.
  • the following method is usually adopted: apply a layer of glue on the cooling plate, and detect the glue-coated area of the cooling plate to ensure that the glue-coated area meets the preset requirements, so that The liquid cold plate can be in close contact with the cooled equipment.
  • the inventors found that the glued cooling plate can be scanned by a 4K line scan camera to obtain a scanned image, and then the glued area can be detected directly based on the scanned image.
  • detection may easily lead to large errors in the detected data. For example, if the scanned image itself is not clear enough, the detection of the glued area based on the insufficiently clear image will easily lead to inaccurate detection data and large errors.
  • the inventor has designed a detection method for the glued area after in-depth research.
  • the image of the area where the gluing operation is completed is collected, and the brightness of the light source is adjusted according to the deviation between the gray parameter value of the image and the preset reference value, that is, combined with the image collected by the camera at the current brightness of the light source.
  • the deviation value between the grayscale parameter value and the preset reference value is used to adaptively adjust the current brightness of the light source.
  • the deviation value can reflect the clarity of the image captured by the camera at the current brightness.
  • the brightness of the light source is adjusted, which is beneficial to enable the camera to capture the target image that meets the preset definition requirements based on the adjusted brightness of the light source.
  • the target image that meets the preset definition requirements can relatively clearly show the gluing area of the area where the gluing operation is completed. Therefore, detecting the gluing area of the area where the gluing operation is completed according to the target image can reduce the detection cost. data error.
  • the detection method of the gluing area disclosed in the embodiment of the present application is applied to electronic equipment, and the electronic equipment can be an industrial computer equipped with a charge coupled device (charge coupled device, referred to as: CCD) software system, and can also be other devices capable of executing the application.
  • CCD charge coupled device
  • the schematic diagram of the detection scene can refer to FIG. Motor 108, second motor 109.
  • the camera 103 and the light source 104 may be respectively arranged on the transverse connecting rod and the longitudinal connecting rod of the T-shaped connecting rod 107 .
  • the camera 103 is parallel to the horizontal plane and perpendicular to the transverse connecting rod of the T-shaped connecting rod 107 .
  • the upper surface area of the cooling plate 106 can be understood as an area where the gluing operation is completed.
  • the cooling plate 106 can be a water-cooled plate.
  • the lifting module 101 can move up and down driven by the first motor 108 to change the distance between the camera 103 and the detection platform 105 to adjust the focal length of the camera.
  • the traverse module 102 can move left and right under the drive of the second motor 109 to change the lateral position of the camera.
  • the camera 103 can scan the cooling plate 106 to obtain an image of the cooling plate 106 . That is to say, the camera 103 scans the cooling plate 106 coated with glue below in real time as the traverse module 102 moves (adjustable at 5-40 m/min). Cooling plate image.
  • the 10 black squares on the cooling plate 106 can be understood as glued areas.
  • the camera 103 may be a line scan camera, such as an 8K line scan camera, and the light source 104 may be a line light source.
  • the cooling plate 106 after gluing is placed on the detection platform 105.
  • the line-scanning camera and the line light source move left and right along with the traverse module 102 to take a line-scan photo of the cooling plate 106.
  • the moving distance of the traverse module 102 can be determined according to The length configuration of the cooling plate 106 achieves the effect of full-frame and full-frame-rate imaging, and realizes the global detection of the cooling plate 106 .
  • the size of the cooling plate 106 is: 500*1100mm
  • the detection accuracy of the camera 103 is: 0.065mm
  • the distance from the camera 103 to the cooling plate 106 is: 680 ⁇ 40mm
  • the distance from the light source 104 to the cooling plate 106 is : 80 ⁇ 30mm
  • the installation angle of the light source 104 is: 65° ⁇ 20°
  • the horizontal distance between the light source 104 and the camera 103 is: 20 ⁇ 5mm.
  • the focal length of the camera 103 can be adjusted by the lifting module 101 .
  • the vertical detection range of the camera 103 is within 530 mm
  • the horizontal detection range can be set by setting the moving distance of the lateral movement module 102 .
  • the schematic flow chart of the detection method of glue coating area can refer to Fig. 2, comprises:
  • Step 201 Receive an image of the area where the gluing operation is completed; wherein, the image is an image collected by a camera under a light source;
  • Step 202 Obtain the grayscale parameter value of the image
  • Step 203 Adjust the brightness of the light source according to the deviation between the gray scale parameter value and the preset reference value
  • Step 204 Receive the target image of the area where the gluing operation is completed collected by the camera based on the adjusted brightness of the light source; wherein, the target image is an image that meets the preset definition requirement;
  • Step 205 According to the target image, detect the gluing area of the area where the gluing operation is completed.
  • the area where the gluing operation is completed can be understood as the area after gluing, for example, after gluing the upper surface of the cooling plate, the upper surface of the cooling plate is the area where the gluing operation is completed; wherein, the cooling plate Can be a water-cooled plate.
  • the camera 103 can collect the image of the cooling plate 106 that has completed the gluing operation under the light source 104, as the image of the area where the gluing operation has been completed, and then the camera 103 can send the image of the area where the gluing operation has been completed to the electronic device , so that the electronic device can receive an image of the area where the gluing job is done.
  • the electronic device may acquire a grayscale parameter value of the received image; wherein, the grayscale parameter value may be a parameter related to image grayscale, and the grayscale parameter value may be used to measure the clarity of the image.
  • a preset reference value may be set according to actual needs, and the preset reference value may be a grayscale parameter value of a clear image acquired in advance.
  • the preset reference value is a grayscale parameter value of a pre-acquired reference image that satisfies the preset reference condition.
  • the pre-acquired reference image that satisfies the preset reference condition may be: the image with the highest resolution among the batch images collected by the pre-acquired camera.
  • the deviation value between the grayscale parameter value and the preset reference value can measure the difference in clarity between the received image and the reference image. The larger the absolute value of the deviation value, it means that the definition of the received image is worse than that of the reference image, and the smaller the absolute value of the deviation value, it means that the definition of the received image is better than that of the reference image.
  • the electronic device can determine the adjustment amount of the brightness of the light source according to the deviation value, and send the determined adjustment amount to the controller of the light source, and the controller of the light source adjusts the brightness of the light source according to the received adjustment amount of the light source.
  • the greater the absolute value of the deviation value the greater the determined adjustment amount.
  • the deviation value is positive, the brightness of the light source will be lowered according to the determined adjustment amount; when the deviation value is negative, the brightness of the light source will be increased according to the determined adjustment amount. .
  • the deviation value includes a positive deviation value and a negative deviation value.
  • the deviation value is a positive deviation value; when the grayscale parameter value is smaller than a preset reference value, the deviation value is Negative bias value.
  • the implementation of step 203 may include: reducing the brightness of the light source when the positive deviation value is greater than the first preset threshold; increasing the brightness of the light source when the negative deviation value is smaller than the second preset threshold.
  • Decreasing the brightness of the light source including: determining the decrement of the brightness according to the deviation represented by the positive deviation value; reducing the brightness of the light source according to the decrement of the brightness; increasing the brightness of the light source, including: according to the deviation represented by the negative deviation value Determine the incremental amount of brightness; according to the incremental amount of brightness, increase the brightness of the light source.
  • the first preset threshold and the second preset threshold may respectively represent the maximum value of the allowed positive deviation value and the minimum value of the negative deviation value, and the specific size of the first preset threshold value and the second preset threshold value may be determined according to actual needs It is set, which is not specifically limited in this embodiment.
  • the decrement can be, for example, 1/5 of the deviation represented by the positive deviation value, and the increment can be 1/5 of the deviation represented by the negative deviation value.
  • the increment can be 1/5 of the deviation represented by the negative deviation value.
  • only 1/5 is taken as an example. It is not limited to this in specific implementation.
  • the electronic device may receive the target image of the area where the gluing operation is completed and collected by the camera based on the adjusted brightness of the light source; wherein, the target image is an image that meets a preset definition requirement.
  • the preset resolution requirement can be set according to actual needs, and the preset resolution requirement is used to measure whether the received image can be regarded as a clear image.
  • the preset definition requirement may include: the deviation value between the grayscale parameter value of the image and the preset reference value is within the preset tolerance range, and the lower limit value of the preset tolerance range may be the above-mentioned first Two preset thresholds, the upper limit of the preset tolerance range may be the above-mentioned first preset threshold.
  • the electronic device can perform definition detection on each received image to determine whether the image meets the preset definition requirements, and if the image does not meet the preset definition requirements, adjust the brightness of the light source and continue The image of the area where the gluing operation is completed is collected by the camera based on the adjusted brightness of the light source, and the adjustment of the brightness of the light source is stopped until a target image that meets the preset definition requirements is received.
  • the electronic device may detect the gluing area of the area where the gluing operation is completed according to the target image. Since the target image meets the preset definition requirements, the target image can clearly reflect the gluing area of the area where the gluing operation is completed, so that the gluing area of the area where the gluing operation is completed in the target image can be accurately detected size.
  • the current brightness of the light source is adjusted in combination with the deviation value between the gray scale parameter value of the image captured by the camera under the current brightness of the light source and a preset reference value.
  • the deviation value can reflect the clarity of the image captured by the camera at the current brightness.
  • the brightness of the light source is adjusted, which is beneficial to enable the camera to capture the target image that meets the preset definition requirements based on the adjusted brightness of the light source.
  • the target image that meets the preset definition requirements can relatively clearly show the gluing area of the area where the gluing operation is completed. Therefore, detecting the gluing area of the area where the gluing operation is completed according to the target image can reduce the detection cost. data error.
  • the grayscale parameter value in step 202 may be a grayscale mean value
  • the corresponding preset reference value mentioned in step 203 is a grayscale mean value reference value
  • the grayscale parameter value in step 202 may be a grayscale variance
  • the corresponding preset reference value mentioned in step 203 is a grayscale variance reference value
  • the mean value of the gray level is: the average value of the gray level of each pixel in the image, reflecting the average level of the gray level of the image.
  • the preset gray-scale average reference value may be: a gray-scale average value of a reference image that satisfies a preset reference condition and is obtained in advance.
  • the pre-acquired reference image that satisfies the preset reference condition may be: the image with the highest resolution among the batch images collected by the pre-acquired camera.
  • the grayscale variance is: the average of the square value of the difference between the grayscale of each pixel in the image and the grayscale mean of the image, which characterizes the average degree of grayscale change in the image. The greater the average degree of grayscale change, the more image clear.
  • the gray variance reflects the size of the high frequency part of the image. Generally speaking, the clearer the image, the more high-frequency components in the image.
  • the preset grayscale variance reference value may be: the grayscale variance of a reference image that satisfies a preset reference condition and is obtained in advance.
  • the pre-acquired reference image that satisfies the preset reference condition may be: the image with the highest resolution among the batch images collected by the pre-acquired camera.
  • the method of determining the reference image that satisfies the preset reference conditions can be as follows: collecting batch images, training the batch images, establishing a grayscale histogram model, and finding the clearest one of the batch images according to the grayscale histogram model as Reference image.
  • the grayscale mean and grayscale variance of each image in a batch of images can be calculated, and a grayscale histogram model can be established according to the grayscale mean and grayscale variance of each image.
  • the grayscale histogram model can display the sharpness results, such as , the image corresponding to the peak in the grayscale histogram model is taken as the clearest image in the batch of images.
  • Both grayscale mean and grayscale variance are parameters that can accurately measure clarity.
  • the preset reference value is set as the grayscale mean reference value.
  • the grayscale variance reference value so that the deviation value between the grayscale parameter value and the preset reference value can accurately measure the deviation between the definition of the received image and the preset definition.
  • step 205 may refer to FIG. 3 , including;
  • Step 301 Affine transform the preset area in the preset template image to the target image to obtain the position of the preset area in the preset template image on the target image.
  • Step 302 According to the position of the preset area in the preset template image on the target image, the size parameters of the area where the gluing operation is completed, the preset horizontal spacing and/or vertical spacing between adjacent preset areas, and the preset The total number m of preset areas on the area where the gluing operation is completed is set to obtain the positions of m preset areas on the target image;
  • Step 303 According to the positions of the m preset areas on the target image, detect the gluing areas of the m preset areas on the area where the gluing operation is completed.
  • the preset template image corresponds to the area where the gluing operation is completed, and the position of the preset area is pre-positioned on the preset template image.
  • the preset template image can be understood as the template image designed by those skilled in the art in advance for the area where the gluing operation is completed.
  • the position of the preset area is pre-positioned on the template image.
  • the region of interest (referred to as: ROI) on the region where the gluing operation is completed can also be understood as: detecting sub-regions.
  • the area where the gluing operation is completed is the upper surface area of the water-cooled plate
  • the preset template image may be a template image corresponding to the model of the water-cooled plate, that is, a template image designed for the model of the water-cooled plate.
  • Different types of water cooling plates can correspond to different preset template images, and different types of water cooling plates can be understood as water cooling plates with different size parameters.
  • Affine transformation also known as affine mapping
  • the affine transformation in this embodiment can be understood as: the preset region in the preset template image undergoes a linear change followed by a translation to transform it into the target image. For example, if the number of preset regions in the preset template image is 1, affine transformation of 1 preset region in the preset template image to the target image is obtained to obtain 1 preset region in the preset template image The location of the region on the target image. If the number of preset regions in the preset template image is 2, then affine transform the 2 preset regions in the preset template image to the target image to obtain the 2 preset regions in the preset template image in location on the target image.
  • m is an integer greater than 1.
  • the size parameters of the area where the gluing operation is completed can be pre-stored in the electronic device, or can be input by the operator during inspection.
  • the size of the area where the gluing operation is completed can be, for example, the length and width of the water-cooled plate.
  • the horizontal spacing between preset adjacent preset areas is a
  • the vertical spacing is b.
  • m can be set according to actual needs, for example, if it is expected to detect the gluing area of 6 preset areas in the area where the gluing operation is completed, then m can be set to 6, and if it is expected to detect 8 in the area where the gluing operation is completed If the gluing area of a preset area can be set, m can be set to 8.
  • the electronic device can determine the area where the gluing operation is completed according to the position of 1 preset area in the preset template image on the target image
  • the size parameter, the preset horizontal spacing and vertical spacing between adjacent preset areas, and the preset total number m of preset areas on the area where the gluing operation is completed obtain the positions of m preset areas on the target image . It can be understood that the position of one preset area on the target image is obtained through affine transformation, and the positions of m-1 preset areas are obtained through the position of one preset area on the target image, and the gluing is completed
  • the size parameters of the working area, the preset horizontal spacing and vertical spacing between adjacent preset areas are automatically generated.
  • the electronic device can recognize the difference between the two preset regions in the preset template image.
  • Horizontal spacing and according to the position of the two preset areas in the preset template image on the target image, the size parameters of the area where the gluing operation is completed, the vertical spacing between the preset adjacent preset areas, and the identified The horizontal spacing and the total number m of preset areas on the preset area where the gluing operation is completed, obtain the positions of m preset areas on the target image.
  • the electronic device can identify the distance between the two preset areas in the preset template image.
  • Vertical spacing and according to the position of the two preset areas in the preset template image on the target image, the size parameters of the area where the gluing operation is completed, the preset horizontal spacing between adjacent preset areas, and the identified.
  • the vertical spacing and the total number m of preset areas on the preset area where the gluing operation is completed obtain the positions of m preset areas on the target image.
  • the electronic device can identify the glued areas in the m preset areas on the target image, determine the size of the glued areas in each preset area, and determine the size of the glued areas in each preset area according to the glued area in each preset area The size of the area determines the glued area in each preset area. For example, when the gluing area is a rectangle, the size of the gluing area can be length and width, then the gluing area in the m preset areas can be calculated according to the length and width of the gluing area in the m preset areas.
  • the electronic device may perform BLOB analysis on m preset regions on the target image to obtain glued areas of the m preset regions.
  • BLOB refers to a connected area composed of similar colors, textures and other features in the image.
  • BLOB analysis is to perform geometric analysis on the connected area to obtain some important geometric features, such as the area of the area, the coordinates of the center point, the coordinates of the centroid, and the smallest circumscribed rectangle.
  • the connected areas in each preset area can be used as the glued areas in each preset area .
  • the electronic device can determine a connected area composed of similar colors, textures and other features in each preset area.
  • the glued area in each preset area can be marked according to the connectivity of the glued area, and each Connected areas in the preset area, and then perform geometric feature analysis on the connected areas in each preset area to obtain the area of the connected area in each preset area, and calculate the connected area in each preset area area as the glued area for each preset area.
  • the glued area of each preset area can be obtained conveniently and accurately.
  • the position of the preset area in the preset template image on the target image, the size parameters of the area where the gluing operation is completed, the preset horizontal spacing and/or vertical spacing between adjacent preset areas and The total number m of the preset areas on the area where the pre-set gluing operation is completed can obtain the positions of the m preset areas on the target image, that is, it is not necessary to equalize the positions of the m preset areas when making the preset template image.
  • Embodiments of the present application help to reduce the complexity of making preset template images, and m is a preset number, so that the number of preset regions that need to be generated on the target image can be flexibly selected according to actual needs, which is conducive to satisfying practical applications
  • the different needs in the system are more adaptable to different needs.
  • a position of a preset area is pre-positioned on the preset template image.
  • the one preset area is located in the initial area of the preset template image, and the initial area corresponds to the first gluing area scanned by the camera in the area where the gluing operation is completed. Glue detects subregions.
  • the schematic diagram of the preset template image can refer to FIG. 5 .
  • one preset area is located at the upper left position of the preset template image, and the upper left position can be understood as the starting area in the preset template image.
  • the camera is a line-scan camera, that is, the starting area corresponds to the first gluing detection sub-area scanned by the line-scan camera in the area where the gluing operation is completed.
  • the obtained target image is the first gluing detection sub-area scanned by the line scan camera in the area where the gluing operation is completed.
  • the number of preset areas on the preset template image is 1, and it is located in the initial area of the preset template image, which facilitates the subsequent combination of the size parameters of the area where the gluing operation is completed and the preset adjacent preset areas.
  • the horizontal spacing and/or vertical spacing between them and the total number of preset preset areas m accurately and quickly generate the positions of m preset areas on the target image.
  • the preset region in the preset template image is affine transformed onto the target image to obtain the position of the preset region in the preset template image on the target image, including : Determine the relative displacement and relative angle between the preset template image and the target image; according to the relative displacement and relative angle, affine transform the preset area in the preset template image to the target image to obtain the The position of the preset area on the target image.
  • the preset area that is, the ROI is set in the preset template image. Therefore, in order to make the ROI in the target image obtained after affine transformation change with the change of angle and displacement, the preset template image and the target image can be determined.
  • the relative displacement and relative angle between, and then according to the relative displacement and relative angle, the preset area in the preset template image is affine transformed to the target image, and the preset area in the preset template image on the target image is obtained. Location.
  • the matching relationship between the preset template image and the target image can be established according to the determined relative displacement and relative angle, and the preset area in the preset template image is affine transformed to the target image according to the matching relationship , to obtain the position of the preset area in the preset template image on the target image, so that the preset area in the preset template image can be accurately shifted to the corresponding area in the target image after affine transformation.
  • the angle and displacement deviation between the target image and the preset template image may be the angle deviation and position deviation caused when the area where the gluing operation is completed is placed on the detection platform.
  • the area where the gluing operation is completed is the upper surface area of the water-cooled plate.
  • the preset area in the preset template image is affine transformed On the target image, it is possible to avoid the impact of the offset between the preset template image and the target image on the detection data during the detection process, which is beneficial to improve the accuracy of the detection data.
  • the method further includes: Compare the gluing areas of the m preset areas with the preset reference areas to determine whether the gluing areas of the m preset areas meet the preset gluing requirements; according to whether the gluing areas of the m preset areas Meet the preset gluing requirements, and determine the detection results of the gluing area in the area where the gluing operation is completed.
  • the preset reference area can be understood as the standard value of the glue application area, and the specific size is set according to actual needs.
  • the preset gluing requirement can also be set according to actual needs, for example, it can be set as: the gluing area is greater than 80% of the reference area. That is to say, if the glued area of one preset area is greater than 80% of the reference area, it can be determined that the glued area of this preset area meets the preset glued requirements. According to the above method, it can be sequentially determined whether the gluing areas of the m preset regions meet the preset gluing requirements.
  • the detection result of the glued area of the area where the glued operation is completed may include: passing the detection and failing the detection.
  • the detection result may be determined according to the number of preset areas meeting the preset glue application requirements among the m preset areas. For example, if the number of preset areas that meet the preset gluing requirements in the m preset areas is greater than or equal to the preset number threshold, it can be determined that the detection result is passed; if the m preset areas meet the preset If the number of preset regions required for glue coating is less than the preset number threshold, it can be determined that the detection result is a failure of the detection.
  • the preset quantity threshold can be set according to actual needs.
  • the preset number threshold may also be set to a number smaller than m, which is not specifically limited in this embodiment.
  • the detection result of the gluing area of the area where the gluing operation is completed can be more accurately and comprehensively determined, that is, for gluing
  • the detection result of the glued area of the region is more accurate and comprehensive.
  • the schematic flow chart of the detection method of the glue-coated area can refer to FIG. 6 , including:
  • Step 600 Place the water-cooled plate that has completed the gluing operation on the detection platform
  • Step 601 Trigger a start command through an external button
  • Step 602 After receiving the start command, the traverse module drives the camera and light source to move to the left, and transmits the moving speed and moving distance to the camera in the form of pulses;
  • Step 603 The traverse module moves to the target distance according to the size parameters of the water-cooled plate; wherein, the target distance can be the length of the water-cooled plate;
  • Step 604 the programmable controller (Programmable Logic Controller, referred to as: PLC) transmits the start command to the CCD software system;
  • PLC Programmable Logic Controller
  • Step 605 Turn on the line light source; for example, the CCD software system sends a command to turn on the light source to the light source controller to provide brightness support for camera scanning;
  • Step 606 The CCD software system starts scanning synchronously, and the camera starts scanning the water cooling plate;
  • Step 607 After the traversing module moves to the target distance, send the signal of completion of the movement to the CCD software system;
  • Step 608 After the CCD software system receives the signal that the movement is completed, it controls the camera to stop scanning and controls the light source to turn off;
  • Step 609 the camera transmits the scanned image to the CCD software system
  • Step 610 The traverse module moves to the right and returns to the initial position; wherein, after the traverse module returns to the initial position, it waits for the next start command;
  • Step 611 judging whether the image is the target image; wherein, the CCD software system can perform sharpness detection on the image, thereby judging whether the image is the target image, and the target image is an image that meets the preset sharpness requirements; if yes, then execute step 612 , otherwise execute step 620;
  • Step 612 Image preprocessing; wherein, image preprocessing refers to preprocessing the target image to obtain a preprocessed image;
  • Step 613 Affine transformation; wherein, affine transformation can be understood as: according to the relative displacement and relative angle between the preset template image and the target image, affine transformation of one ROI in the preset template image to the preprocessed On the image, get the position of a ROI in the preset template image on the preprocessed image;
  • Step 614 Generate the positions of m ROIs; wherein, generating the positions of m ROIs can be understood as: according to the position of one ROI in the preset template image on the preprocessed image, and related configuration parameters, the preprocessed The positions of the m ROIs on the final image; wherein, the relevant configuration parameters include: the size parameters of the water-cooled plate, the preset horizontal and vertical spacing between adjacent ROIs, and the preset total number m of ROIs on the water-cooled plate ;
  • Step 615 Detect the glued areas of m ROIs; for example, BLOB measurement can be performed on m ROIs to obtain the glued areas of m ROIs on the water cooling plate;
  • Step 616 Comparing and calculating the gluing area of m ROIs with the reference area; wherein, ROIs whose gluing area is greater than or equal to 80% of the reference area meet the preset gluing requirements;
  • Step 617 Get the test result; for example, determine the test result of the glue-coated area of the water-cooled plate according to whether the glue-coated areas of the m ROIs meet the preset glue-coating requirements;
  • Step 618 Upload the test results to the PLC and the host computer; wherein, after the CCD software system uploads the test results to the PLC and the host computer, it can be considered that a measurement cycle is completed;
  • Step 619 The upper computer uploads the test results and the model of the water-cooled plate to the manufacturing execution system (manufacturing execution system, MES for short); after uploading to the MES, the water-cooled plate can be removed from the testing platform to complete the glue coating of the water-cooled plate Area detection;
  • the manufacturing execution system manufacturing execution system, MES for short
  • Step 620 Adjust the brightness of the light source until the target image scanned by the camera and meeting the preset definition requirement is received. Enter step 612 after step 620 is executed.
  • the preprocessing process mentioned in step 612 can refer to FIG. 7 , including:
  • Step 701 smoothing and denoising the target image; for example, median filtering can be used to eliminate isolated noise and noise;
  • Step 702 perform morphological transformation on the target image, and remove edge burrs and small noise points; wherein, morphological transformation can use operations such as erosion, expansion, and opening and closing;
  • Step 703 Enhance the contrast of the target image; for example, enhance the edges and details of the target image to make the light and dark changes more obvious;
  • Step 704 Perform a sharpening operation on the edge of the target image; for example, the sharpening operation can be realized by using an impact filter operator;
  • Step 705 Perform threshold segmentation on the target image to extract darker regions
  • Step 706 Perform connected domain segmentation on the target image to separate out unconnected regions
  • Step 707 Perform area selection on the target image to select the feature area of interest.
  • the process of adjusting the brightness of the light source mentioned in step 620 can refer to FIG. 8 , including:
  • Step 801 Input a preset light source intensity to the light source controller to control the light source to emit light with the preset light source intensity;
  • Step 802 Receive the image of the water-cooled plate that has completed the gluing operation collected by the camera;
  • Step 803 Calculate the grayscale parameter value of the image, and calculate the deviation value between the grayscale parameter value and the preset reference value;
  • Step 804 Determine whether the deviation value is within the preset tolerance range; if yes, execute step 805, otherwise execute step 806;
  • Step 805 the adjustment is completed, and the light source controller runs at the current brightness
  • Step 806 Determine whether the deviation value is greater than the upper limit of the preset tolerance range; if yes, execute step 807, otherwise execute step 808;
  • Step 807 sending out an adjustment control signal for lowering the brightness until receiving the target image captured by the camera and meeting the preset definition requirements;
  • Step 808 Determine whether the deviation value is less than the lower limit of the preset tolerance range; if yes, execute step 809, otherwise execute step 805;
  • Step 809 sending an adjustment control signal for increasing the brightness until the target image captured by the camera meeting the preset definition requirement is received.
  • the implementation process of step 807 may be: sending an adjustment control signal to lower the brightness, and the decrement amount of each adjustment is 1/5 of the deviation represented by the deviation value. Then continue to receive the image collected by the camera based on the adjusted brightness of the light source, and calculate the deviation value between the gray parameter value of the image and the preset reference value, until the calculated deviation value is within the preset tolerance range, stop Adjust the brightness of the light source.
  • the implementation process of step 809 may be: sending an adjustment control signal to increase the brightness, and the incremental amount of each adjustment is 1/5 of the deviation represented by the deviation value. Then continue to receive the image collected by the camera based on the adjusted brightness of the light source, and calculate the deviation value between the gray parameter value of the image and the preset reference value, until the calculated deviation value is within the preset tolerance range, stop Adjust the brightness of the light source.
  • the sharpness detection of the image captured by the camera and the adaptive adjustment of the brightness of the light source are added, so as to facilitate the collection of images that meet the preset sharpness requirements, based on meeting the preset sharpness It is helpful to improve the accuracy of the detection results by detecting the glue-coated area on the image with the required precision.
  • the electronic device includes: at least one processor 901; and a memory 902 communicated with the at least one processor 901; An instruction executed by a processor 901, the instruction is executed by the at least one processor 901, so that the at least one processor 901 can execute the glue-applied area detection method in the above method embodiment.
  • the memory 902 and the processor 901 are connected by a bus, and the bus may include any number of interconnected buses and bridges, and the bus connects one or more processors 901 and various circuits of the memory 902 together.
  • the bus may also connect together various other circuits such as peripherals, voltage regulators, and power management circuits, all of which are well known in the art and therefore will not be further described herein.
  • the bus interface provides an interface between the bus and the transceivers.
  • a transceiver may be a single element or multiple elements, such as multiple receivers and transmitters, providing means for communicating with various other devices over a transmission medium.
  • the data processed by the processor 901 is transmitted on the wireless medium through the antenna, and further, the antenna also receives the data and transmits the data to the processor 901 .
  • Processor 901 is responsible for managing the bus and general processing, and may also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. And the memory 902 may be used to store data used by the processor 901 when performing operations.
  • Some embodiments of the present application relate to a computer-readable storage medium storing a computer program.
  • the above method embodiments are implemented when the computer program is executed by the processor.
  • a storage medium includes several instructions to make a device ( It may be a single-chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

Embodiments of the present application provide a method for detecting a glue application area, an electronic device, and a computer-readable storage medium. The method for detecting the glue application area comprises: receiving an image of an region where a glue application operation is completed, the image being an image collected by a camera under a light source; acquiring a grayscale parameter value of the image; adjusting the brightness of the light source according to a deviation value between the grayscale parameter value and a preset reference value; receiving a target image of the region where the glue application operation is completed which is collected by the camera on the basis of the adjusted brightness of the light source; and according to the target image, detecting the glue application area of the region where the glue application operation is completed, wherein the target image is an image that meets a preset definition requirement. Data detection errors may be reduced.

Description

涂胶面积的检测方法、电子设备和计算机可读存储介质Glue-coated area detection method, electronic device, and computer-readable storage medium 技术领域technical field
本申请涉及检测技术领域,特别是涉及一种涂胶面积的检测方法、电子设备和计算机可读存储介质。The present application relates to the technical field of detection, in particular to a method for detecting a glue-coated area, electronic equipment and a computer-readable storage medium.
背景技术Background technique
在动力电池系统中,电池工作产生多余热量,热量可以通过与冷却板表面接触的方式传递,最终被器件内部流道中通过的冷却液带走。为了使冷却板与被冷却设备的底板紧密接触:通常会在冷却板上涂敷一层胶,对涂胶面积进行检测,以确保涂胶面积满足预设要求。In the power battery system, the battery generates excess heat, which can be transferred through contact with the surface of the cooling plate, and finally taken away by the cooling fluid passing through the internal flow channel of the device. In order to make the cooling plate in close contact with the bottom plate of the equipment to be cooled: usually a layer of glue is applied on the cooling plate, and the glue-coated area is tested to ensure that the glue-coated area meets the preset requirements.
目前,对液冷板的涂胶面积进行检测的方式为:通过线扫相机对涂胶后的液冷板进行扫描,得到扫描图像,然后直接基于扫描图像进行涂胶面积的检测,容易导致检测的数据误差较大。At present, the way to detect the glued area of the liquid cold plate is: scan the glued liquid cold plate with a line-scan camera to obtain a scanned image, and then directly detect the glued area based on the scanned image, which may easily lead to detection The data error is large.
发明内容Contents of the invention
鉴于上述问题,本申请提供一种涂胶面积的检测方法、电子设备和计算机可读存储介质,能够减小检测的数据的误差。In view of the above problems, the present application provides a method for detecting glued area, an electronic device and a computer-readable storage medium, which can reduce the error of detected data.
第一方面,本申请提供了一种涂胶面积的检测方法,包括:接收完成涂胶作业的区域的图像;其中,所述图像为相机在一光源下采集的图像;获取所述图像的灰度参数值;根据所述灰度参数值和预设的参考值之间的偏差值,对所述光源的亮度进行调节;接收所述相机基于调 节后的光源的亮度采集的所述完成涂胶作业的区域的目标图像;根据所述目标图像,对所述完成涂胶作业的区域的涂胶面积进行检测;其中,所述目标图像为满足预设清晰度要求的图像。In a first aspect, the present application provides a method for detecting a gluing area, comprising: receiving an image of an area where the gluing operation is completed; wherein, the image is an image collected by a camera under a light source; brightness parameter value; adjust the brightness of the light source according to the deviation value between the gray parameter value and the preset reference value; receive the completed gluing collected by the camera based on the adjusted brightness of the light source A target image of the working area; according to the target image, detect the gluing area of the area where the gluing operation is completed; wherein, the target image is an image that meets a preset definition requirement.
本申请实施例的技术方案中,接收相机在一光源下采集的完成涂胶作业的区域的图像,根据该图像的灰度参数值和预设的参考值之间的偏差值,对光源的亮度进行调节,即结合在当前亮度下采集的图像的灰度参数值和预设的参考值之间的偏差值,对光源的当前亮度进行调节。该偏差值可以反映当前亮度下相机采集的图像的清晰度,结合偏差值,对光源的亮度进行调节,有利于使得相机基于调节后的光源的亮度能够采集到满足预设清晰度要求的目标图像,满足预设清晰度要求的目标图像能够相对清晰的展示完成涂胶作业的区域的涂胶面积,因此,根据目标图像对完成涂胶作业的区域的涂胶面积进行检测,能够减小检测的数据的误差。In the technical solution of the embodiment of the present application, the image of the area where the gluing operation is completed is collected by the camera under a light source, and the brightness of the light source is adjusted according to the deviation between the grayscale parameter value of the image and the preset reference value. The adjustment is to adjust the current brightness of the light source in combination with the deviation value between the grayscale parameter value of the image collected under the current brightness and the preset reference value. The deviation value can reflect the clarity of the image captured by the camera at the current brightness. Combined with the deviation value, the brightness of the light source is adjusted, which is beneficial to enable the camera to capture the target image that meets the preset definition requirements based on the adjusted brightness of the light source. , the target image that meets the preset definition requirements can relatively clearly show the gluing area of the area where the gluing operation is completed. Therefore, detecting the gluing area of the area where the gluing operation is completed according to the target image can reduce the detection cost. data error.
在一些实施例中,所述灰度参数值为灰度均值,所述预设的参考值为灰度均值参考值,或者,所述灰度参数值为灰度方差,所述预设的参考值为灰度方差参考值。In some embodiments, the grayscale parameter value is the grayscale mean value, and the preset reference value is the grayscale mean value reference value, or, the grayscale parameter value is the grayscale variance, and the preset reference value The value is the reference value of gray variance.
灰度均值和灰度方差均为可以准确的衡量清晰度的参数,通过将灰度参数值设置为灰度均值或是灰度方差,对应的将预设的参考值设置为灰度均值参考值或是灰度方差参考值,使得灰度参数值和预设的参考值之间的偏差值可以准确的衡量接收的图像的清晰度与预设的清晰度之间的偏差。Both grayscale mean and grayscale variance are parameters that can accurately measure clarity. By setting the grayscale parameter value as grayscale mean or grayscale variance, the preset reference value is set as the grayscale mean reference value. Or the grayscale variance reference value, so that the deviation value between the grayscale parameter value and the preset reference value can accurately measure the deviation between the definition of the received image and the preset definition.
在一些实施例中,所述根据所述目标图像,对所述完成涂胶作业的区域的涂胶面积进行检测,包括:将预设模板图像中的预设区域仿射变换至所述目标图像上,得到所述预设模板图像中的预设区域在所述 目标图像上的位置,其中,所述预设模板图像与所述完成涂胶作业的区域对应且所述预设模板图像上预先定位有所述预设区域的位置;根据所述预设模板图像中的预设区域在所述目标图像上的位置、所述完成涂胶作业的区域的尺寸参数、预设的相邻预设区域之间的横向间距和/或纵向间距以及预设的所述完成涂胶作业的区域上的预设区域的总数m,得到所述目标图像上m个预设区域的位置;其中,m为大于1的整数;根据所述目标图像上m个预设区域的位置,对所述完成涂胶作业的区域上的m个预设区域的涂胶面积进行检测。In some embodiments, the detecting the gluing area of the area where the gluing operation is completed according to the target image includes: affine transforming the preset area in the preset template image to the target image The position of the preset area in the preset template image on the target image is obtained, wherein the preset template image corresponds to the area where the gluing operation is completed and the preset template image is pre-set The position of the preset area is located; according to the position of the preset area in the preset template image on the target image, the size parameters of the area where the gluing operation is completed, and the preset adjacent presets The horizontal pitch and/or the vertical pitch between regions and the total number m of preset regions on the region where the gluing operation is completed are preset to obtain the positions of m preset regions on the target image; wherein, m is An integer greater than 1; according to the positions of the m preset areas on the target image, detect the gluing areas of the m preset areas on the area where the gluing operation is completed.
由于可以根据预设模板图像中的预设区域在所述目标图像上的位置、完成涂胶作业的区域的尺寸参数、预设的相邻预设区域之间的横向间距和/或纵向间距以及预设的完成涂胶作业的区域上的预设区域的总数m,得到目标图像上m个预设区域的位置,即无需在制作预设模板图像时,就将m个预设区域的位置均定位在预设模板图像上,相比于为了得到目标图像上m个预设区域的位置,在制作预设模板图像时,就将m个预设区域的位置均定位在预设模板图像上,本申请的实施例有利于降低制作预设模板图像的复杂度,而且m为预设的数量,使得可以根据实际需要灵活选择需要在目标图像上生成的预设区域的数量,有利于满足实际应用中的不同需求。Since the position of the preset area in the preset template image on the target image, the size parameters of the area where the gluing operation is completed, the preset horizontal spacing and/or vertical spacing between adjacent preset areas and The total number m of the preset areas on the area where the pre-set gluing operation is completed can obtain the positions of the m preset areas on the target image, that is, it is not necessary to equalize the positions of the m preset areas when making the preset template image. Positioning on the preset template image, compared to obtaining the positions of the m preset regions on the target image, when making the preset template image, the positions of the m preset regions are all positioned on the preset template image, Embodiments of the present application help to reduce the complexity of making preset template images, and m is a preset number, so that the number of preset regions that need to be generated on the target image can be flexibly selected according to actual needs, which is conducive to satisfying practical applications different needs in.
在一些实施例中,所述预设模板图像上预先定位有1个所述预设区域的位置。In some embodiments, one preset area is pre-positioned on the preset template image.
也就是说,预设模板图像中仅需要设置1个预设区域的位置,简化了预设模板图像的设计。That is to say, only one preset area needs to be set in the preset template image, which simplifies the design of the preset template image.
在一些实施例中,所述1个所述预设区域位于所述预设模板图像中的起始区域,所述起始区域对应于所述完成涂胶作业的区域中被所 述相机扫描的第1个涂胶检测子区域。In some embodiments, the one preset area is located in the initial area of the preset template image, and the initial area corresponds to the area scanned by the camera in the area where the gluing operation is completed. The first glue detection sub-area.
将预设模板图像中的1个预设区域设置在预设模板图像中的起始区域,方便了后续可以结合完成涂胶作业的区域的尺寸参数、预设的相邻预设区域之间的横向间距和/或纵向间距以及预设的预设区域的总数m,准确且快速的生成目标图像上m个预设区域的位置。Set one preset area in the preset template image as the starting area in the preset template image, which facilitates the subsequent combination of the size parameters of the area where the gluing operation is completed, and the relationship between the preset adjacent preset areas. The horizontal spacing and/or the vertical spacing and the total number m of the preset preset areas accurately and quickly generate the positions of the m preset areas on the target image.
在一些实施例中,所述将预设模板图像中的预设区域仿射变换至所述目标图像上,得到所述预设模板图像中的预设区域在所述目标图像上的位置,包括:确定所述预设模板图像与所述目标图像之间的相对位移和相对角度;根据所述相对位移和所述相对角度,将预设模板图像中的预设区域仿射变换至所述目标图像上,得到所述预设模板图像中的预设区域在所述目标图像上的位置。In some embodiments, the affine transformation of the preset area in the preset template image to the target image to obtain the position of the preset area in the preset template image on the target image includes: : determine the relative displacement and relative angle between the preset template image and the target image; affine transform the preset region in the preset template image to the target according to the relative displacement and the relative angle On the image, the position of the preset area in the preset template image on the target image is obtained.
考虑到,具体检测过程中预设模板图像与目标图像可能存在偏移,因此根据预设模板图像与目标图像之间的相对位移和相对角度,将预设模板图像中的预设区域仿射变换至目标图像上,使得可以避免检测过程中预设模板图像与目标图像之间存在偏移对检测数据的影响,有利于提高检测数据的准确性。Considering that there may be an offset between the preset template image and the target image in the specific detection process, according to the relative displacement and relative angle between the preset template image and the target image, the preset area in the preset template image is affine transformed On the target image, it is possible to avoid the impact of the offset between the preset template image and the target image on the detection data during the detection process, which is beneficial to improve the accuracy of the detection data.
在一些实施例中,在所述根据所述目标图像上m个预设区域的位置,对所述完成涂胶作业的区域上的m个预设区域的涂胶面积进行检测之后,还包括:将所述m个预设区域的涂胶面积分别与预设的基准面积进行对比,确定所述m个预设区域的涂胶面积是否满足预设的涂胶要求;根据所述m个预设区域的涂胶面积是否满足预设的涂胶要求,确定所述完成涂胶作业的区域的涂胶面积的检测结果。In some embodiments, after detecting the gluing areas of the m preset areas on the area where the gluing operation is completed according to the positions of the m preset areas on the target image, it further includes: Compare the gluing areas of the m preset areas with the preset reference areas respectively, and determine whether the gluing areas of the m preset areas meet the preset gluing requirements; according to the m preset Whether the gluing area of the area satisfies the preset gluing requirements, and determine the detection result of the gluing area of the area where the gluing operation is completed.
综合m个预设区域中每个预设区域的涂胶面积是否满足预设的涂胶要求,能够更准确且全面的确定完成涂胶作业的区域的涂胶面积的 检测结果,即对于涂胶区域的涂胶面积的检测结果更加准确且全面。Integrating whether the gluing area of each preset area in the m preset areas meets the preset gluing requirements, the detection result of the gluing area of the area where the gluing operation is completed can be more accurately and comprehensively determined, that is, for gluing The detection result of the glued area of the region is more accurate and comprehensive.
第二方面,本申请提供了一种电子设备,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述的涂胶面积的检测方法。In a second aspect, the present application provides an electronic device, including: at least one processor; and a memory connected in communication with the at least one processor; wherein, the memory stores information that can be executed by the at least one processor. Instructions, the instructions are executed by the at least one processor, so that the at least one processor can execute the above-mentioned glue-coated area detection method.
第三方面,本申请提供了一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现上述的涂胶面积的检测方法。In a third aspect, the present application provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the above-mentioned glue-coated area detection method is realized.
上述说明仅是本申请技术方案的概述,为了能够更清楚了解本申请的技术手段,而可依照说明书的内容予以实施,并且为了让本申请的上述和其它目的、特征和优点能够更明显易懂,以下特举本申请的具体实施方式。The above description is only an overview of the technical solution of the present application. In order to better understand the technical means of the present application, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present application more obvious and understandable , the following specifically cites the specific implementation manner of the present application.
附图说明Description of drawings
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例中所需要使用的附图作简单地介绍,显而易见地,下面所描述的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the accompanying drawings that need to be used in the embodiments of the present application. Obviously, the accompanying drawings described below are only some embodiments of the present application. Those of ordinary skill in the art can also obtain other drawings based on the accompanying drawings on the premise of not paying creative efforts.
图1是本申请一实施例公开的一种检测场景的示意图;Fig. 1 is a schematic diagram of a detection scene disclosed in an embodiment of the present application;
图2是本申请一实施例公开的一种涂胶面积的检测方法的流程示意图;Fig. 2 is a schematic flow chart of a detection method of a glue-coated area disclosed in an embodiment of the present application;
图3是本申请一实施例公开的步骤205的实现过程的流程示意图;FIG. 3 is a schematic flowchart of the implementation process of step 205 disclosed in an embodiment of the present application;
图4是本申请一实施例公开的目标图像上m个预设区域的位置 的示意图;Fig. 4 is a schematic diagram of the positions of m preset regions on the target image disclosed by an embodiment of the present application;
图5是本申请一实施例公开的预设模板图像的示意图;Fig. 5 is a schematic diagram of a preset template image disclosed in an embodiment of the present application;
图6是本申请一实施例公开的另一种胶面积的检测方法的流程示意图;Fig. 6 is a schematic flow chart of another detection method for glue area disclosed in an embodiment of the present application;
图7是本申请一实施例公开的步骤612所提到的预处理的过程的流程示意图;FIG. 7 is a schematic flowchart of the preprocessing process mentioned in step 612 disclosed in an embodiment of the present application;
图8是本申请一实施例公开的步骤620所提到的调节光源的亮度的过程的流程示意图;FIG. 8 is a schematic flowchart of the process of adjusting the brightness of the light source mentioned in step 620 disclosed in an embodiment of the present application;
图9是本申请一实施例公开的一种电子设备的结构示意图;Fig. 9 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application;
在附图中,附图并未按照实际的比例绘制;In the drawings, the drawings are not drawn to actual scale;
标记说明:升降模组101,横移模组102,相机103,光源104,检测平台105,冷却板106,T形连接杆107,第一电机108,第二电机109。Explanation of symbols: lift module 101 , traverse module 102 , camera 103 , light source 104 , detection platform 105 , cooling plate 106 , T-shaped connecting rod 107 , first motor 108 , second motor 109 .
具体实施方式Detailed ways
下面结合附图和实施例对本申请的实施方式作进一步详细描述。以下实施例的详细描述和附图用于示例性地说明本申请的原理,但不能用来限制本申请的范围,即本申请不限于所描述的实施例。The implementation manner of the present application will be further described in detail below with reference to the drawings and embodiments. The detailed description and drawings of the following embodiments are used to illustrate the principles of the application, but not to limit the scope of the application, that is, the application is not limited to the described embodiments.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同;本文中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请;本申请的说明书和权利要求书及上述附图说明中的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field of the application; the terms used herein are only for the purpose of describing specific embodiments, and are not intended to To limit this application; the terms "comprising" and "having" and any variations thereof in the specification and claims of this application and the description of the above drawings are intended to cover a non-exclusive inclusion.
在本申请的描述中,需要说明的是,除非另有说明,“多个”的含义是两个以上;术语“上”、“下”、“左”、“右”、“内”、“外”等指示的方位或位置关系仅是为了便于描述本申请和简化描述, 而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请的限制。此外,术语“第一”、“第二”、“第三”等仅用于描述目的,而不能理解为指示或暗示相对重要性。“垂直”并不是严格意义上的垂直,而是在误差允许范围之内。“平行”并不是严格意义上的平行,而是在误差允许范围之内。In the description of this application, it should be noted that, unless otherwise specified, the meaning of "plurality" is more than two; the terms "upper", "lower", "left", "right", "inner", " The orientation or positional relationship indicated by "outside", etc. are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a reference to this application. Application Restrictions. In addition, the terms "first", "second", "third", etc. are used for descriptive purposes only and should not be construed as indicating or implying relative importance. "Vertical" is not strictly vertical, but within the allowable range of error. "Parallel" is not strictly parallel, but within the allowable range of error.
下述描述中出现的方位词均为图中示出的方向,并不是对本申请的具体结构进行限定。在本申请的描述中,还需要说明的是,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是直接相连,也可以通过中间媒介间接相连。对于本领域的普通技术人员而言,可视具体情况理解上述术语在本申请中的具体含义。The orientation words appearing in the following description are the directions shown in the figure, and do not limit the specific structure of the application. In the description of this application, it should also be noted that, unless otherwise clearly specified and limited, the terms "installation", "connection", and "connection" should be interpreted in a broad sense, for example, it can be a fixed connection or a flexible connection. Disassembled connection, or integral connection; it can be directly connected or indirectly connected through an intermediary. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific situations.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.
在本申请实施例的描述中,术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。In the description of the embodiment of the present application, the term "and/or" is only a kind of association relationship describing associated objects, which means that there may be three kinds of relationships, such as A and/or B, which may mean: A exists alone, and A exists at the same time and B, there are three cases of B alone. In addition, the character "/" in this article generally indicates that the contextual objects are an "or" relationship.
目前,从市场形势的发展来看,动力电池的应用越加广泛。动力电池不仅被应用于水力、火力、风力和太阳能电站等储能电源系统,而且还被广泛应用于电动自行车、电动摩托车、电动汽车等电动交通工具,以及军事装备和航空航天等多个领域。随着动力电池应用领域的不断扩大,其市场的需求量也在不断地扩增。At present, judging from the development of the market situation, the application of power batteries is becoming more and more extensive. Power batteries are not only used in energy storage power systems such as hydraulic, thermal, wind and solar power plants, but also widely used in electric vehicles such as electric bicycles, electric motorcycles, electric vehicles, as well as military equipment and aerospace and other fields . With the continuous expansion of power battery application fields, its market demand is also constantly expanding.
本发明人注意到,在动力电池系统中,电池工作产生多余热量,热量可以通过与冷却板表面接触的方式传递,最终被器件内部流道中通过的冷却液带走。冷却系统利用冷却液流动换热系数较大的特性, 依靠冷却液流动从而转移热量,是目前有效的散热方式之一,可消散几百瓦到上千瓦的热量。冷却板通过放置冷却液管路,直接与被冷却设备的底板接触,可以在被冷却设备和冷却液之间减少热交换介面的数量,从而维持最低热阻,提高性能。为了达到较好的散热性能,除了对冷却板本身的散热性能有要求外,还要求冷却板在装配过程中与被冷却设备的底板接触紧密,且有充分的接触面积。为了实现冷却板与被冷却设备的底板紧密接触,通常采用如下方式:在冷却板上涂敷一层胶,对冷却板的涂胶面积进行检测,以确保涂胶面积满足预设要求,从而使得液冷板可以和被冷却设备接触紧密。The inventor noticed that in the power battery system, the battery generates excess heat, which can be transferred through contact with the surface of the cooling plate, and finally taken away by the cooling liquid passing through the internal flow channel of the device. The cooling system takes advantage of the large heat transfer coefficient of the coolant flow, and relies on the coolant flow to transfer heat. It is one of the effective heat dissipation methods at present, and can dissipate hundreds of watts to thousands of watts of heat. The cooling plate is directly in contact with the bottom plate of the cooled equipment by placing the coolant pipeline, which can reduce the number of heat exchange interfaces between the cooled equipment and the coolant, thereby maintaining the lowest thermal resistance and improving performance. In order to achieve better heat dissipation performance, in addition to the heat dissipation performance of the cooling plate itself, it is also required that the cooling plate is in close contact with the bottom plate of the cooled equipment during the assembly process and has a sufficient contact area. In order to realize the close contact between the cooling plate and the bottom plate of the cooled equipment, the following method is usually adopted: apply a layer of glue on the cooling plate, and detect the glue-coated area of the cooling plate to ensure that the glue-coated area meets the preset requirements, so that The liquid cold plate can be in close contact with the cooled equipment.
为了实现冷却板与被冷却设备的底板紧密接触,发明人研究发现,可以通过4K线扫相机对涂胶后的冷却板进行扫描,得到扫描图像,然后直接基于扫描图像进行涂胶面积的检测,但这样检测容易导致检测的数据误差较大。例如,如果扫描图像本身不够清晰,那么基于不够清晰的图像进行涂胶面积的检测,容易导致检测的数据不准确,误差较大。In order to realize the close contact between the cooling plate and the bottom plate of the equipment to be cooled, the inventors found that the glued cooling plate can be scanned by a 4K line scan camera to obtain a scanned image, and then the glued area can be detected directly based on the scanned image. However, such detection may easily lead to large errors in the detected data. For example, if the scanned image itself is not clear enough, the detection of the glued area based on the insufficiently clear image will easily lead to inaccurate detection data and large errors.
基于以上考虑,为了解决涂胶面积的检测数据不准确、误差较大的问题,发明人经过深入研究,设计了一种涂胶面积的检测方法,该检测方法中,先接收相机在一光源下采集的完成涂胶作业的区域的图像,根据该图像的灰度参数值和预设的参考值之间的偏差值,对光源的亮度进行调节,即结合相机在光源的当前亮度下采集的图像的灰度参数值和预设的参考值之间的偏差值,对光源的当前亮度进行自适应调节。该偏差值可以反映当前亮度下相机采集的图像的清晰度,结合偏差值,对光源的亮度进行调节,有利于使得相机基于调节后的光源的亮度能够采集到满足预设清晰度要求的目标图像,满足预设清晰度要求的目标图像能够相对清晰的展示完成涂胶作业的区域的涂胶面积,因此,根据目标图像对完成涂胶作业的区域的涂胶面积进行检测,能够减小检测的数据的误差。Based on the above considerations, in order to solve the problem of inaccurate and large errors in the detection data of the glued area, the inventor has designed a detection method for the glued area after in-depth research. The image of the area where the gluing operation is completed is collected, and the brightness of the light source is adjusted according to the deviation between the gray parameter value of the image and the preset reference value, that is, combined with the image collected by the camera at the current brightness of the light source The deviation value between the grayscale parameter value and the preset reference value is used to adaptively adjust the current brightness of the light source. The deviation value can reflect the clarity of the image captured by the camera at the current brightness. Combined with the deviation value, the brightness of the light source is adjusted, which is beneficial to enable the camera to capture the target image that meets the preset definition requirements based on the adjusted brightness of the light source. , the target image that meets the preset definition requirements can relatively clearly show the gluing area of the area where the gluing operation is completed. Therefore, detecting the gluing area of the area where the gluing operation is completed according to the target image can reduce the detection cost. data error.
本申请实施例公开的涂胶面积的检测方法,应用于电子设备,电子设备可以为装有电荷耦合器件(charge coupled device,简称: CCD)软件系统的工控机,还可以为其他能够执行本申请实施例中的涂胶面积的检测方法的设备。The detection method of the gluing area disclosed in the embodiment of the present application is applied to electronic equipment, and the electronic equipment can be an industrial computer equipped with a charge coupled device (charge coupled device, referred to as: CCD) software system, and can also be other devices capable of executing the application. The equipment of the detection method of glue-coated area in the embodiment.
在一些实施例中,检测场景的示意图可以参考图1,包括:升降模组101、横移模组102、相机103、光源104、检测平台105、冷却板106、T形连接杆107,第一电机108,第二电机109。相机103和光源104可以分别设置在T形连接杆107的横向连接杆和纵向连接杆上。相机103与水平面平行且与T形连接杆107的横向连接杆垂直。冷却板106的上表面区域可以理解为一种完成涂胶作业的区域,在具体实现中,冷却板106可以为水冷板。升降模组101可以在第一电机108的驱动下上下移动,以改变相机103到检测平台105之间的距离,从而调节相机焦距。横移模组102可以在第二电机109的驱动下左右移动以改变相机的横向位置,横移模组102移动的过程中,相机103可以对冷却板106进行扫描,得到冷却板106的图像。也就是说,相机103随着横移模组102的移动(5~40m/min可调),实时扫描下方涂胶后的冷却板106,扫描完成,相机103获得一张完整的涂胶后的冷却板图像。冷却板106上的10个黑色方块可以理解为涂胶的区域。In some embodiments, the schematic diagram of the detection scene can refer to FIG. Motor 108, second motor 109. The camera 103 and the light source 104 may be respectively arranged on the transverse connecting rod and the longitudinal connecting rod of the T-shaped connecting rod 107 . The camera 103 is parallel to the horizontal plane and perpendicular to the transverse connecting rod of the T-shaped connecting rod 107 . The upper surface area of the cooling plate 106 can be understood as an area where the gluing operation is completed. In a specific implementation, the cooling plate 106 can be a water-cooled plate. The lifting module 101 can move up and down driven by the first motor 108 to change the distance between the camera 103 and the detection platform 105 to adjust the focal length of the camera. The traverse module 102 can move left and right under the drive of the second motor 109 to change the lateral position of the camera. During the movement of the traverse module 102 , the camera 103 can scan the cooling plate 106 to obtain an image of the cooling plate 106 . That is to say, the camera 103 scans the cooling plate 106 coated with glue below in real time as the traverse module 102 moves (adjustable at 5-40 m/min). Cooling plate image. The 10 black squares on the cooling plate 106 can be understood as glued areas.
在一些实施例中,相机103可以为线扫相机,比如为8K线扫相机,光源104可以为线光源。涂胶后的冷却板106放置在检测平台105,线扫相机和线光源随着横移模组102左右移动,对冷却板106进行线扫拍照取像,横移模组102移动的距离可以根据冷却板106的长度配置,达到全幅面全帧率取像的效果,实现对冷却板106的全局检测。In some embodiments, the camera 103 may be a line scan camera, such as an 8K line scan camera, and the light source 104 may be a line light source. The cooling plate 106 after gluing is placed on the detection platform 105. The line-scanning camera and the line light source move left and right along with the traverse module 102 to take a line-scan photo of the cooling plate 106. The moving distance of the traverse module 102 can be determined according to The length configuration of the cooling plate 106 achieves the effect of full-frame and full-frame-rate imaging, and realizes the global detection of the cooling plate 106 .
在一些实施例中,冷却板106的尺寸为:500*1100mm,相机103的检测精度为:0.065mm,相机103到冷却板106的距离为:680±40mm,光源104到冷却板106的距离为:80±30mm,光源104的安装角度为:65°±20°,光源104与相机103之间的水平间距为:20±5mm。相机103焦距可通过升降模组101调节,相机103的纵向检测范围530mm内,横向检测范围可通过设定横移模组102的移动距离来设定。In some embodiments, the size of the cooling plate 106 is: 500*1100mm, the detection accuracy of the camera 103 is: 0.065mm, the distance from the camera 103 to the cooling plate 106 is: 680±40mm, and the distance from the light source 104 to the cooling plate 106 is : 80±30mm, the installation angle of the light source 104 is: 65°±20°, and the horizontal distance between the light source 104 and the camera 103 is: 20±5mm. The focal length of the camera 103 can be adjusted by the lifting module 101 . The vertical detection range of the camera 103 is within 530 mm, and the horizontal detection range can be set by setting the moving distance of the lateral movement module 102 .
根据本申请的一些实施例,涂胶面积的检测方法的流程示意图 可以参考图2,包括:According to some embodiments of the present application, the schematic flow chart of the detection method of glue coating area can refer to Fig. 2, comprises:
步骤201:接收完成涂胶作业的区域的图像;其中,图像为相机在一光源下采集的图像;Step 201: Receive an image of the area where the gluing operation is completed; wherein, the image is an image collected by a camera under a light source;
步骤202:获取所述图像的灰度参数值;Step 202: Obtain the grayscale parameter value of the image;
步骤203:根据灰度参数值和预设的参考值之间的偏差值,对光源的亮度进行调节;Step 203: Adjust the brightness of the light source according to the deviation between the gray scale parameter value and the preset reference value;
步骤204:接收相机基于调节后的光源的亮度采集的完成涂胶作业的区域的目标图像;其中,目标图像为满足预设清晰度要求的图像;Step 204: Receive the target image of the area where the gluing operation is completed collected by the camera based on the adjusted brightness of the light source; wherein, the target image is an image that meets the preset definition requirement;
步骤205:根据目标图像,对完成涂胶作业的区域的涂胶面积进行检测。Step 205: According to the target image, detect the gluing area of the area where the gluing operation is completed.
在步骤201中,完成涂胶作业的区域可以理解为涂胶后的区域,比如,对冷却板的上表面涂胶后,冷却板的上表面即为完成涂胶作业的区域;其中,冷却板可以为水冷板。参考图1,相机103可以在光源104下采集完成涂胶作业的冷却板106的图像,作为完成涂胶作业的区域的图像,然后相机103可以将完成涂胶作业的区域的图像发送给电子设备,从而电子设备可以接收到完成涂胶作业的区域的图像。In step 201, the area where the gluing operation is completed can be understood as the area after gluing, for example, after gluing the upper surface of the cooling plate, the upper surface of the cooling plate is the area where the gluing operation is completed; wherein, the cooling plate Can be a water-cooled plate. With reference to Fig. 1, the camera 103 can collect the image of the cooling plate 106 that has completed the gluing operation under the light source 104, as the image of the area where the gluing operation has been completed, and then the camera 103 can send the image of the area where the gluing operation has been completed to the electronic device , so that the electronic device can receive an image of the area where the gluing job is done.
在步骤202中,电子设备可以获取接收到的图像的灰度参数值;其中,灰度参数值可以为和图像灰度相关的参数,灰度参数值可以用于衡量图像的清晰度。In step 202, the electronic device may acquire a grayscale parameter value of the received image; wherein, the grayscale parameter value may be a parameter related to image grayscale, and the grayscale parameter value may be used to measure the clarity of the image.
在步骤203中,预设的参考值可以根据实际需要进行设置,预设的参考值可以为预先获取的清晰的图像的灰度参数值。比如,预设的参考值为预先获取的满足预设参考条件的参考图像的灰度参数值。可选的,预先获取的满足预设参考条件的参考图像可以为:预先获取的相机采集的批量图像中清晰度最高的图像。灰度参数值和预设的参考值之间的偏差值,可以衡量接收的图像与参考图像的清晰度的差异。偏差值的绝对值越大,说明接收的图像的清晰度相比参考图像的清晰度越差,偏差值的绝对值越小,说明接收的图像的清晰度相比参考图像的清晰度越好。In step 203, a preset reference value may be set according to actual needs, and the preset reference value may be a grayscale parameter value of a clear image acquired in advance. For example, the preset reference value is a grayscale parameter value of a pre-acquired reference image that satisfies the preset reference condition. Optionally, the pre-acquired reference image that satisfies the preset reference condition may be: the image with the highest resolution among the batch images collected by the pre-acquired camera. The deviation value between the grayscale parameter value and the preset reference value can measure the difference in clarity between the received image and the reference image. The larger the absolute value of the deviation value, it means that the definition of the received image is worse than that of the reference image, and the smaller the absolute value of the deviation value, it means that the definition of the received image is better than that of the reference image.
其中,电子设备可以根据偏差值,确定光源的亮度的调节量,将确定的调节量发送至光源的控制器,由光源的控制器根据接收到的光源的调节量对光源的亮度进行调节。偏差值的绝对值越大,确定的调节量越大,当偏差值为正时,根据确定的调节量调低光源的亮度;当偏差值为负时,根据确定的调节量调高光源的亮度。Wherein, the electronic device can determine the adjustment amount of the brightness of the light source according to the deviation value, and send the determined adjustment amount to the controller of the light source, and the controller of the light source adjusts the brightness of the light source according to the received adjustment amount of the light source. The greater the absolute value of the deviation value, the greater the determined adjustment amount. When the deviation value is positive, the brightness of the light source will be lowered according to the determined adjustment amount; when the deviation value is negative, the brightness of the light source will be increased according to the determined adjustment amount. .
在一个例子中,偏差值包括正偏差值和负偏差值,当灰度参数值大于预设的参考值,偏差值为正偏差值,当灰度参数值小于预设的参考值,偏差值为负偏差值。步骤203的实现方式可以,包括:当正偏差值大于第一预设阈值,则降低光源的亮度;当负偏差值小于第二预设阈值,则升高光源的亮度。降低光源的亮度,包括:根据正偏差值所表征的偏差量,确定亮度的递减量;根据亮度的递减量,降低光源的亮度;升高光源的亮度,包括:根据负偏差值所表征的偏差量,确定亮度的递增量;根据亮度的递增量,升高光源的亮度。其中,第一预设阈值和第二预设阈值可以分别表示允许的正偏差值的最大值和负偏差值的最小值,第一预设阈值和第二预设阈值的具体大小可以根据实际需要进行设置,本实施例对此不做具体限定。In one example, the deviation value includes a positive deviation value and a negative deviation value. When the grayscale parameter value is greater than a preset reference value, the deviation value is a positive deviation value; when the grayscale parameter value is smaller than a preset reference value, the deviation value is Negative bias value. The implementation of step 203 may include: reducing the brightness of the light source when the positive deviation value is greater than the first preset threshold; increasing the brightness of the light source when the negative deviation value is smaller than the second preset threshold. Decreasing the brightness of the light source, including: determining the decrement of the brightness according to the deviation represented by the positive deviation value; reducing the brightness of the light source according to the decrement of the brightness; increasing the brightness of the light source, including: according to the deviation represented by the negative deviation value Determine the incremental amount of brightness; according to the incremental amount of brightness, increase the brightness of the light source. Wherein, the first preset threshold and the second preset threshold may respectively represent the maximum value of the allowed positive deviation value and the minimum value of the negative deviation value, and the specific size of the first preset threshold value and the second preset threshold value may be determined according to actual needs It is set, which is not specifically limited in this embodiment.
其中,递减量比如可以为正偏差值所表征的偏差量的1/5,递增量可以为负偏差值所表征的偏差量的1/5,然而本实施例中只是以1/5为例,在具体实现中并不以此为限。Wherein, the decrement can be, for example, 1/5 of the deviation represented by the positive deviation value, and the increment can be 1/5 of the deviation represented by the negative deviation value. However, in this embodiment, only 1/5 is taken as an example. It is not limited to this in specific implementation.
在步骤204中:电子设备可以接收相机基于调节后的光源的亮度采集的完成涂胶作业的区域的目标图像;其中,目标图像为满足预设清晰度要求的图像。预设清晰度要求可以根据实际需要进行设置,预设清晰度要求用于衡量接收到的图像是否可以被认为是一张清晰的图像。比如,预设的清晰度要求可以包括:图像的灰度参数值和预设的参考值之间的偏差值处于预设的公差范围之内,预设的公差范围的下限值可以上述的第二预设阈值,预设的公差范围的上限值可以为上述的第一预设阈值。In step 204: the electronic device may receive the target image of the area where the gluing operation is completed and collected by the camera based on the adjusted brightness of the light source; wherein, the target image is an image that meets a preset definition requirement. The preset resolution requirement can be set according to actual needs, and the preset resolution requirement is used to measure whether the received image can be regarded as a clear image. For example, the preset definition requirement may include: the deviation value between the grayscale parameter value of the image and the preset reference value is within the preset tolerance range, and the lower limit value of the preset tolerance range may be the above-mentioned first Two preset thresholds, the upper limit of the preset tolerance range may be the above-mentioned first preset threshold.
在具体实现中,电子设备可以对每次接收的图像均进行清晰度检测,确定图像是否满足预设清晰度要求,若图像不满足预设清晰度要 求,则对光源的亮度进行调节,并继续接收相机基于调节后的光源的亮度采集的完成涂胶作业的区域的图像,直到接收到满足预设清晰度要求的目标图像,停止对光源的亮度调节。In a specific implementation, the electronic device can perform definition detection on each received image to determine whether the image meets the preset definition requirements, and if the image does not meet the preset definition requirements, adjust the brightness of the light source and continue The image of the area where the gluing operation is completed is collected by the camera based on the adjusted brightness of the light source, and the adjustment of the brightness of the light source is stopped until a target image that meets the preset definition requirements is received.
在步骤205中,电子设备可以根据目标图像,对完成涂胶作业的区域的涂胶面积进行检测。由于目标图像满足预设清晰度要求,因此,目标图像中可以清楚的体现出完成涂胶作业的区域的涂胶面积,从而可以准确检测出目标图像中完成涂胶作业的区域的涂胶面积的大小。In step 205, the electronic device may detect the gluing area of the area where the gluing operation is completed according to the target image. Since the target image meets the preset definition requirements, the target image can clearly reflect the gluing area of the area where the gluing operation is completed, so that the gluing area of the area where the gluing operation is completed in the target image can be accurately detected size.
本实施例中,结合相机在光源的当前亮度下采集的图像的灰度参数值和预设的参考值之间的偏差值,对光源的当前亮度进行调节。该偏差值可以反映当前亮度下相机采集的图像的清晰度,结合偏差值,对光源的亮度进行调节,有利于使得相机基于调节后的光源的亮度能够采集到满足预设清晰度要求的目标图像,满足预设清晰度要求的目标图像能够相对清晰的展示完成涂胶作业的区域的涂胶面积,因此,根据目标图像对完成涂胶作业的区域的涂胶面积进行检测,能够减小检测的数据的误差。In this embodiment, the current brightness of the light source is adjusted in combination with the deviation value between the gray scale parameter value of the image captured by the camera under the current brightness of the light source and a preset reference value. The deviation value can reflect the clarity of the image captured by the camera at the current brightness. Combined with the deviation value, the brightness of the light source is adjusted, which is beneficial to enable the camera to capture the target image that meets the preset definition requirements based on the adjusted brightness of the light source. , the target image that meets the preset definition requirements can relatively clearly show the gluing area of the area where the gluing operation is completed. Therefore, detecting the gluing area of the area where the gluing operation is completed according to the target image can reduce the detection cost. data error.
根据本申请的一些实施例,可选地,步骤202中的灰度参数值可以为灰度均值,对应的步骤203中提到的预设的参考值为灰度均值参考值。According to some embodiments of the present application, optionally, the grayscale parameter value in step 202 may be a grayscale mean value, and the corresponding preset reference value mentioned in step 203 is a grayscale mean value reference value.
根据本申请的一些实施例,可选地,步骤202中的灰度参数值可以为灰度方差,对应的步骤203中提到的预设的参考值为灰度方差参考值。According to some embodiments of the present application, optionally, the grayscale parameter value in step 202 may be a grayscale variance, and the corresponding preset reference value mentioned in step 203 is a grayscale variance reference value.
灰度均值为:图像中各个像素点的灰度的平均值,反映图像灰度的平均水平。预设的灰度均值参考值可以为:预先获取的满足预设参考条件的参考图像的灰度均值。可选的,预先获取的满足预设参考条件的参考图像可以为:预先获取的相机采集的批量图像中清晰度最高的图像。The mean value of the gray level is: the average value of the gray level of each pixel in the image, reflecting the average level of the gray level of the image. The preset gray-scale average reference value may be: a gray-scale average value of a reference image that satisfies a preset reference condition and is obtained in advance. Optionally, the pre-acquired reference image that satisfies the preset reference condition may be: the image with the highest resolution among the batch images collected by the pre-acquired camera.
灰度方差为:图像中各像素点的灰度与图像的灰度均值之差的平方值的平均数,它表征了图像灰度变化的平均程度,灰度变化的平均程度越大,图像越清晰。灰度方差反映的是图像高频部分的大小。一般 来说,图像越清晰,图像中的高频分量越多。预设的灰度方差参考值可以为:预先获取的满足预设参考条件的参考图像的灰度方差。可选的,预先获取的满足预设参考条件的参考图像可以为:预先获取的相机采集的批量图像中清晰度最高的图像。The grayscale variance is: the average of the square value of the difference between the grayscale of each pixel in the image and the grayscale mean of the image, which characterizes the average degree of grayscale change in the image. The greater the average degree of grayscale change, the more image clear. The gray variance reflects the size of the high frequency part of the image. Generally speaking, the clearer the image, the more high-frequency components in the image. The preset grayscale variance reference value may be: the grayscale variance of a reference image that satisfies a preset reference condition and is obtained in advance. Optionally, the pre-acquired reference image that satisfies the preset reference condition may be: the image with the highest resolution among the batch images collected by the pre-acquired camera.
其中,满足预设参考条件的参考图像的确定方式可以为:采集批量图像,对批量图像进行训练,建立灰度直方图模型,根据灰度直方图模型找出批量图像中最清晰的一张作为参考图像。比如,可以计算批量图像中每张图像的灰度均值和灰度方差,根据每张图像的灰度均值和灰度方差建立灰度直方图模型,灰度直方图模型能够显示清晰度结果,比如,将灰度直方图模型中峰值对应的图像作为批量图像中最清晰的图像。Among them, the method of determining the reference image that satisfies the preset reference conditions can be as follows: collecting batch images, training the batch images, establishing a grayscale histogram model, and finding the clearest one of the batch images according to the grayscale histogram model as Reference image. For example, the grayscale mean and grayscale variance of each image in a batch of images can be calculated, and a grayscale histogram model can be established according to the grayscale mean and grayscale variance of each image. The grayscale histogram model can display the sharpness results, such as , the image corresponding to the peak in the grayscale histogram model is taken as the clearest image in the batch of images.
灰度均值和灰度方差均为可以准确的衡量清晰度的参数,通过将灰度参数值设置为灰度均值或是灰度方差,对应的将预设的参考值设置为灰度均值参考值或是灰度方差参考值,使得灰度参数值和预设的参考值之间的偏差值可以准确的衡量接收的图像的清晰度与预设的清晰度之间的偏差。Both grayscale mean and grayscale variance are parameters that can accurately measure clarity. By setting the grayscale parameter value as grayscale mean or grayscale variance, the preset reference value is set as the grayscale mean reference value. Or the grayscale variance reference value, so that the deviation value between the grayscale parameter value and the preset reference value can accurately measure the deviation between the definition of the received image and the preset definition.
根据本申请的一些实施例,可选地,步骤205的实现过程可以参考图3,包括;According to some embodiments of the present application, optionally, the implementation process of step 205 may refer to FIG. 3 , including;
步骤301:将预设模板图像中的预设区域仿射变换至目标图像上,得到预设模板图像中的预设区域在目标图像上的位置。Step 301: Affine transform the preset area in the preset template image to the target image to obtain the position of the preset area in the preset template image on the target image.
步骤302:根据预设模板图像中的预设区域在目标图像上的位置、完成涂胶作业的区域的尺寸参数、预设的相邻预设区域之间的横向间距和/或纵向间距以及预设的完成涂胶作业的区域上的预设区域的总数m,得到目标图像上m个预设区域的位置;Step 302: According to the position of the preset area in the preset template image on the target image, the size parameters of the area where the gluing operation is completed, the preset horizontal spacing and/or vertical spacing between adjacent preset areas, and the preset The total number m of preset areas on the area where the gluing operation is completed is set to obtain the positions of m preset areas on the target image;
步骤303:根据目标图像上m个预设区域的位置,对完成涂胶作业的区域上的m个预设区域的涂胶面积进行检测。Step 303: According to the positions of the m preset areas on the target image, detect the gluing areas of the m preset areas on the area where the gluing operation is completed.
在步骤301中,预设模板图像与完成涂胶作业的区域对应且预设模板图像上预先定位有预设区域的位置。预设模板图像可以理解为本领域技术人员预先针对完成涂胶作业的区域设计的模板图像上,该模板 图像上预先定位有预设区域的位置,预设区域可以理解为在进行涂胶面积检测时完成涂胶作业的区域上的感兴趣区域(region of interest,简称:ROI),还可以理解为:检测子区域。In step 301, the preset template image corresponds to the area where the gluing operation is completed, and the position of the preset area is pre-positioned on the preset template image. The preset template image can be understood as the template image designed by those skilled in the art in advance for the area where the gluing operation is completed. The position of the preset area is pre-positioned on the template image. The region of interest (referred to as: ROI) on the region where the gluing operation is completed can also be understood as: detecting sub-regions.
在一个例子中,完成涂胶作业的区域为水冷板的上表面区域,预设模板图像可以为与该水冷板的型号对应的模板图像,即针对该水冷板的型号设计的模板图像。不同型号的水冷板可以对应不同的预设模板图像,不同型号的水冷板可以理解为具有不同尺寸参数的水冷板。In an example, the area where the gluing operation is completed is the upper surface area of the water-cooled plate, and the preset template image may be a template image corresponding to the model of the water-cooled plate, that is, a template image designed for the model of the water-cooled plate. Different types of water cooling plates can correspond to different preset template images, and different types of water cooling plates can be understood as water cooling plates with different size parameters.
仿射变换,又称仿射映射,是指在几何中,一个向量空间进行一次线性变换并接上一个平移,变换为另一个向量空间。对应的,本实施例中的仿射变换可以理解为:预设模板图像中的预设区域进行线性变化并接上一个平移,变换到目标图像上。比如,如果预设模板图像中的预设区域的数量为1个,则将预设模板图像中的1个预设区域仿射变换至目标图像上,得到预设模板图像中的1个预设区域在目标图像上的位置。如果预设模板图像中的预设区域的数量为2个,则将预设模板图像中的2个预设区域仿射变换至目标图像上,得到预设模板图像中的2个预设区域在目标图像上的位置。Affine transformation, also known as affine mapping, means that in geometry, a vector space is transformed into another vector space by performing a linear transformation followed by a translation. Correspondingly, the affine transformation in this embodiment can be understood as: the preset region in the preset template image undergoes a linear change followed by a translation to transform it into the target image. For example, if the number of preset regions in the preset template image is 1, affine transformation of 1 preset region in the preset template image to the target image is obtained to obtain 1 preset region in the preset template image The location of the region on the target image. If the number of preset regions in the preset template image is 2, then affine transform the 2 preset regions in the preset template image to the target image to obtain the 2 preset regions in the preset template image in location on the target image.
在步骤302中,m为大于1的整数。目标图像上m个预设区域的位置的示意图可以参考图4,1个小方块表示一个预设区域,可以看出m=8。完成涂胶作业的区域的尺寸参数可以预先存储在电子设备中,或者在检测时由操作人员输入。完成涂胶作业的区域的尺寸比如可以为水冷板的长和宽。In step 302, m is an integer greater than 1. For a schematic diagram of the positions of m preset areas on the target image, reference may be made to FIG. 4 . One small square represents a preset area, and it can be seen that m=8. The size parameters of the area where the gluing operation is completed can be pre-stored in the electronic device, or can be input by the operator during inspection. The size of the area where the gluing operation is completed can be, for example, the length and width of the water-cooled plate.
参考图5,预设的相邻预设区域之间的横向间距为a,纵向间距为b。m可以根据实际需要设置,比如,如果期望检测完成涂胶作业的区域中的6个预设区域的涂胶面积,则可以将m设置为6,如果期望检测完成涂胶作业的区域中的8个预设区域的涂胶面积,则可以将m设置为8。Referring to FIG. 5 , the horizontal spacing between preset adjacent preset areas is a, and the vertical spacing is b. m can be set according to actual needs, for example, if it is expected to detect the gluing area of 6 preset areas in the area where the gluing operation is completed, then m can be set to 6, and if it is expected to detect 8 in the area where the gluing operation is completed If the gluing area of a preset area can be set, m can be set to 8.
在一个例子中,如果预设模板图像中的预设区域的数量为1个,则电子设备可以根据预设模板图像中的1个预设区域在目标图像上的位置、完成涂胶作业的区域的尺寸参数、预设的相邻预设区域之间的 横向间距和纵向间距以及预设的完成涂胶作业的区域上的预设区域的总数m,得到目标图像上m个预设区域的位置。可以理解的是,目标图像上的1个预设区域的位置是通过仿射变换得到的,m-1个预设区域的位置是通过目标图像上的1个预设区域的位置、完成涂胶作业的区域的尺寸参数、预设的相邻预设区域之间的横向间距和纵向间距自动生成的。In one example, if the number of preset areas in the preset template image is 1, the electronic device can determine the area where the gluing operation is completed according to the position of 1 preset area in the preset template image on the target image The size parameter, the preset horizontal spacing and vertical spacing between adjacent preset areas, and the preset total number m of preset areas on the area where the gluing operation is completed, obtain the positions of m preset areas on the target image . It can be understood that the position of one preset area on the target image is obtained through affine transformation, and the positions of m-1 preset areas are obtained through the position of one preset area on the target image, and the gluing is completed The size parameters of the working area, the preset horizontal spacing and vertical spacing between adjacent preset areas are automatically generated.
在一个例子中,如果预设模板图像中的预设区域的数量为2个,且2个预设区域横向相邻,则电子设备可以识别出预设模板图像中2个预设区域之间的横向间距,并根据预设模板图像中的2个预设区域在目标图像上的位置、完成涂胶作业的区域的尺寸参数、预设的相邻预设区域之间的纵向间距、识别出的横向间距以及预设的完成涂胶作业的区域上的预设区域的总数m,得到目标图像上m个预设区域的位置。In an example, if the number of preset regions in the preset template image is 2, and the two preset regions are horizontally adjacent, the electronic device can recognize the difference between the two preset regions in the preset template image. Horizontal spacing, and according to the position of the two preset areas in the preset template image on the target image, the size parameters of the area where the gluing operation is completed, the vertical spacing between the preset adjacent preset areas, and the identified The horizontal spacing and the total number m of preset areas on the preset area where the gluing operation is completed, obtain the positions of m preset areas on the target image.
在一个例子中,如果预设模板图像中的预设区域的数量为2个,且2个预设区域纵向相邻,则电子设备可以识别出预设模板图像中2个预设区域之间的纵向间距,并根据预设模板图像中的2个预设区域在目标图像上的位置、完成涂胶作业的区域的尺寸参数、预设的相邻预设区域之间的横向间距、识别出的纵向间距以及预设的完成涂胶作业的区域上的预设区域的总数m,得到目标图像上m个预设区域的位置。In one example, if the number of preset areas in the preset template image is 2, and the two preset areas are vertically adjacent, the electronic device can identify the distance between the two preset areas in the preset template image. Vertical spacing, and according to the position of the two preset areas in the preset template image on the target image, the size parameters of the area where the gluing operation is completed, the preset horizontal spacing between adjacent preset areas, and the identified The vertical spacing and the total number m of preset areas on the preset area where the gluing operation is completed obtain the positions of m preset areas on the target image.
在步骤303中,电子设备可以识别出目标图像上的m个预设区域中的涂胶区域,确定每个预设区域中的涂胶区域的尺寸大小,根据每个预设区域中的涂胶区域的尺寸大小,确定每个预设区域中的涂胶面积。比如涂胶区域为矩形时,涂胶区域的尺寸大小可以为长和宽,则可以根据m个预设区域中涂胶区域的长和宽,计算m个预设区域中的涂胶面积。In step 303, the electronic device can identify the glued areas in the m preset areas on the target image, determine the size of the glued areas in each preset area, and determine the size of the glued areas in each preset area according to the glued area in each preset area The size of the area determines the glued area in each preset area. For example, when the gluing area is a rectangle, the size of the gluing area can be length and width, then the gluing area in the m preset areas can be calculated according to the length and width of the gluing area in the m preset areas.
在一些实施例中,电子设备可以对目标图像上m个预设区域进行BLOB分析,获得m个预设区域的涂胶面积。BLOB在机器视觉中是指图像中的具有相似颜色、纹理等特征所组成的一块连通区域。BLOB分析就是对连通区域进行几何分析得到一些重要的几何特征,这些几何特征比如可以包括:区域的面积、中心点坐标、质心坐标、最小外接矩形等。本实施例中,考虑到预设区域中的涂胶区域通常为具有相似颜色、 纹理等特征的区域,因此每个预设区域中的连通区域即可以作为每个预设区域中的涂胶区域。电子设备可以确定每个预设区域中具有相似颜色、纹理等特征所组成的一块连通区域,比如可以根据涂胶区域的连通性对每个预设区域中的涂胶区域进行标记,得到每个预设区域中的连通区域,然后,对每个预设区域中的连通区域进行几何特征分析,得到每个预设区域中的连通区域的面积,并将每个预设区域中的连通区域的面积作为每个预设区域的涂胶面积。通过BLOB分析,可以方便且准确的得到每个预设区域的涂胶面积。In some embodiments, the electronic device may perform BLOB analysis on m preset regions on the target image to obtain glued areas of the m preset regions. In machine vision, BLOB refers to a connected area composed of similar colors, textures and other features in the image. BLOB analysis is to perform geometric analysis on the connected area to obtain some important geometric features, such as the area of the area, the coordinates of the center point, the coordinates of the centroid, and the smallest circumscribed rectangle. In this embodiment, considering that the glued areas in the preset areas are usually areas with similar colors, textures, etc., the connected areas in each preset area can be used as the glued areas in each preset area . The electronic device can determine a connected area composed of similar colors, textures and other features in each preset area. For example, the glued area in each preset area can be marked according to the connectivity of the glued area, and each Connected areas in the preset area, and then perform geometric feature analysis on the connected areas in each preset area to obtain the area of the connected area in each preset area, and calculate the connected area in each preset area area as the glued area for each preset area. Through BLOB analysis, the glued area of each preset area can be obtained conveniently and accurately.
由于可以根据预设模板图像中的预设区域在所述目标图像上的位置、完成涂胶作业的区域的尺寸参数、预设的相邻预设区域之间的横向间距和/或纵向间距以及预设的完成涂胶作业的区域上的预设区域的总数m,得到目标图像上m个预设区域的位置,即无需在制作预设模板图像时,就将m个预设区域的位置均定位在预设模板图像上,相比于为了得到目标图像上m个预设区域的位置,在制作预设模板图像时,就将m个预设区域的位置均定位在预设模板图像上,本申请的实施例有利于降低制作预设模板图像的复杂度,而且m为预设的数量,使得可以根据实际需要灵活选择需要在目标图像上生成的预设区域的数量,有利于满足实际应用中的不同需求,对不同需求的适应性更强。Since the position of the preset area in the preset template image on the target image, the size parameters of the area where the gluing operation is completed, the preset horizontal spacing and/or vertical spacing between adjacent preset areas and The total number m of the preset areas on the area where the pre-set gluing operation is completed can obtain the positions of the m preset areas on the target image, that is, it is not necessary to equalize the positions of the m preset areas when making the preset template image. Positioning on the preset template image, compared to obtaining the positions of the m preset regions on the target image, when making the preset template image, the positions of the m preset regions are all positioned on the preset template image, Embodiments of the present application help to reduce the complexity of making preset template images, and m is a preset number, so that the number of preset regions that need to be generated on the target image can be flexibly selected according to actual needs, which is conducive to satisfying practical applications The different needs in the system are more adaptable to different needs.
根据本申请的一些实施例,可选地,预设模板图像上预先定位有1个预设区域的位置。According to some embodiments of the present application, optionally, a position of a preset area is pre-positioned on the preset template image.
也就是说,预设模板图像上只需预先设置1个预设区域的位置,或者说,预设模板图像上只需预先设置1个ROI。That is to say, only one preset region needs to be preset on the preset template image, or in other words, only one ROI needs to be preset on the preset template image.
预设模板图像中仅需要设置1个预设区域的位置,无需根据实际的检测需要在预设模板图像上就设置m个预设区域的位置,简化了预设模板图像的设计。Only one preset region needs to be set in the preset template image, and there is no need to set m preset region locations on the preset template image according to actual detection requirements, which simplifies the design of the preset template image.
根据本申请的一些实施例,可选地,所述1个预设区域位于预设模板图像中的起始区域,起始区域对应于完成涂胶作业的区域中被相 机扫描的第1个涂胶检测子区域。According to some embodiments of the present application, optionally, the one preset area is located in the initial area of the preset template image, and the initial area corresponds to the first gluing area scanned by the camera in the area where the gluing operation is completed. Glue detects subregions.
其中,预设模板图像的示意图可以参考图5,图5中,1个预设区域位于预设模板图像的左上方的位置,左上方的位置可以理解为预设模板图像中的起始区域。相机为线扫相机,即起始区域对应于完成涂胶作业的区域中被线扫相机扫描的第1个涂胶检测子区域。本实施例中,1个预设区域位于预设模板图像中的起始区域时,当将预设模板图像中的1个预设区域仿射变换至目标图像上时,得到的目标图像上的1个预设区域为完成涂胶作业的区域中被线扫相机扫描的第1个涂胶检测子区域。Wherein, the schematic diagram of the preset template image can refer to FIG. 5 . In FIG. 5 , one preset area is located at the upper left position of the preset template image, and the upper left position can be understood as the starting area in the preset template image. The camera is a line-scan camera, that is, the starting area corresponds to the first gluing detection sub-area scanned by the line-scan camera in the area where the gluing operation is completed. In this embodiment, when one preset area is located in the initial area of the preset template image, when one preset area in the preset template image is affine transformed to the target image, the obtained target image One preset area is the first gluing detection sub-area scanned by the line scan camera in the area where the gluing operation is completed.
预设模板图像上的预设区域的数量为1个,且位于预设模板图像的起始区域,方便了后续可以结合完成涂胶作业的区域的尺寸参数、预设的相邻预设区域之间的横向间距和/或纵向间距以及预设的预设区域的总数m,准确且快速的生成目标图像上m个预设区域的位置。The number of preset areas on the preset template image is 1, and it is located in the initial area of the preset template image, which facilitates the subsequent combination of the size parameters of the area where the gluing operation is completed and the preset adjacent preset areas. The horizontal spacing and/or vertical spacing between them and the total number of preset preset areas m, accurately and quickly generate the positions of m preset areas on the target image.
根据本申请的一些实施例,可选地,将预设模板图像中的预设区域仿射变换至所述目标图像上,得到预设模板图像中的预设区域在目标图像上的位置,包括:确定预设模板图像与目标图像之间的相对位移和相对角度;根据相对位移和相对角度,将预设模板图像中的预设区域仿射变换至目标图像上,得到预设模板图像中的预设区域在目标图像上的位置。According to some embodiments of the present application, optionally, the preset region in the preset template image is affine transformed onto the target image to obtain the position of the preset region in the preset template image on the target image, including : Determine the relative displacement and relative angle between the preset template image and the target image; according to the relative displacement and relative angle, affine transform the preset area in the preset template image to the target image to obtain the The position of the preset area on the target image.
在实际检测过程中,目标图像和预设模板图像之间存在着角度和位移的偏差。而预设区域即ROI是设定在预设模板图像中,因此,为了使仿射变换后得到的目标图像中的ROI随着角度和位移变化而跟随变化,可以确定预设模板图像与目标图像之间的相对位移和相对角度,再根据相对位移和相对角度,将预设模板图像中的预设区域仿射变换至目标图像上,得到预设模板图像中的预设区域在目标图像上的位置。在具体实现中,可以根据确定的相对位移和相对角度,建立预设模板图像和目标图像之间的匹配关系,根据该匹配关系将预设模板图像中的预设区域仿射变换至目标图像上,得到预设模板图像中的预设区域在目标图像上的位置,使得预设模板图像中的预设区域经过仿射变换后就能准确的偏移到目标图像中的对应区域。In the actual detection process, there are angle and displacement deviations between the target image and the preset template image. The preset area, that is, the ROI is set in the preset template image. Therefore, in order to make the ROI in the target image obtained after affine transformation change with the change of angle and displacement, the preset template image and the target image can be determined The relative displacement and relative angle between, and then according to the relative displacement and relative angle, the preset area in the preset template image is affine transformed to the target image, and the preset area in the preset template image on the target image is obtained. Location. In a specific implementation, the matching relationship between the preset template image and the target image can be established according to the determined relative displacement and relative angle, and the preset area in the preset template image is affine transformed to the target image according to the matching relationship , to obtain the position of the preset area in the preset template image on the target image, so that the preset area in the preset template image can be accurately shifted to the corresponding area in the target image after affine transformation.
其中,目标图像和预设模板图像之间存在的角度和位移的偏差可能为将完成涂胶作业的区域放置在检测平台上时造成的角度偏移和位置偏移。比如,完成涂胶作业的区域为水冷板的上表面区域,水冷板在放置在检测平台时,允许有角度偏移和位置偏移。Wherein, the angle and displacement deviation between the target image and the preset template image may be the angle deviation and position deviation caused when the area where the gluing operation is completed is placed on the detection platform. For example, the area where the gluing operation is completed is the upper surface area of the water-cooled plate. When the water-cooled plate is placed on the detection platform, angular offset and position offset are allowed.
考虑到,具体检测过程中预设模板图像与目标图像可能存在偏移,因此根据预设模板图像与目标图像之间的相对位移和相对角度,将预设模板图像中的预设区域仿射变换至目标图像上,使得可以避免检测过程中预设模板图像与目标图像之间存在偏移对检测数据的影响,有利于提高检测数据的准确性。Considering that there may be an offset between the preset template image and the target image in the specific detection process, according to the relative displacement and relative angle between the preset template image and the target image, the preset area in the preset template image is affine transformed On the target image, it is possible to avoid the impact of the offset between the preset template image and the target image on the detection data during the detection process, which is beneficial to improve the accuracy of the detection data.
根据本申请的一些实施例,可选地,在根据目标图像上m个预设区域的位置,对完成涂胶作业的区域上的m个预设区域的涂胶面积进行检测之后,还包括:将m个预设区域的涂胶面积分别与预设的基准面积进行对比,确定m个预设区域的涂胶面积是否满足预设的涂胶要求;根据m个预设区域的涂胶面积是否满足预设的涂胶要求,确定完成涂胶作业的区域的涂胶面积的检测结果。According to some embodiments of the present application, optionally, after detecting the gluing areas of the m preset areas on the area where the gluing operation is completed according to the positions of the m preset areas on the target image, the method further includes: Compare the gluing areas of the m preset areas with the preset reference areas to determine whether the gluing areas of the m preset areas meet the preset gluing requirements; according to whether the gluing areas of the m preset areas Meet the preset gluing requirements, and determine the detection results of the gluing area in the area where the gluing operation is completed.
其中,预设的基准面积可以理解为涂胶面积的标准值,具体大小根据实际需要进行设置。预设的涂胶要求也可以根据实际需要进行设置,比如可以设置为:涂胶面积大于基准面积的80%。也就是说,如果1个预设区域的涂胶面积大于基准面积的80%,则可以确定这一个预设区域的涂胶面积满足预设的涂胶要求。按照上述方式,可以依次确定m个预设区域的涂胶面积是否满足预设的涂胶要求。Wherein, the preset reference area can be understood as the standard value of the glue application area, and the specific size is set according to actual needs. The preset gluing requirement can also be set according to actual needs, for example, it can be set as: the gluing area is greater than 80% of the reference area. That is to say, if the glued area of one preset area is greater than 80% of the reference area, it can be determined that the glued area of this preset area meets the preset glued requirements. According to the above method, it can be sequentially determined whether the gluing areas of the m preset regions meet the preset gluing requirements.
完成涂胶作业的区域的涂胶面积的检测结果可以包括:检测通过和检测不通过。其中,检测结果可以根据m个预设区域中满足预设的涂胶要求的预设区域的数量确定。比如,如果m个预设区域中满足预设的涂胶要求的预设区域的数量大于或等于预设的数量阈值,可以确定检测结果为检测通过;如果m个预设区域中满足预设的涂胶要求的预设区域的数量小于预设的数量阈值,可以确定检测结果为检测不通过。预设的数量阈值可以根据实际需要进行设置,比如可以设置为m,即只有m个预设区域的涂胶面积都满足预设的涂胶要求,才会确定检测结果为检 测通过。然而在具体实现中,预设的数量阈值也可以设置为小于m的数,本实施例对此不作具体限定。The detection result of the glued area of the area where the glued operation is completed may include: passing the detection and failing the detection. Wherein, the detection result may be determined according to the number of preset areas meeting the preset glue application requirements among the m preset areas. For example, if the number of preset areas that meet the preset gluing requirements in the m preset areas is greater than or equal to the preset number threshold, it can be determined that the detection result is passed; if the m preset areas meet the preset If the number of preset regions required for glue coating is less than the preset number threshold, it can be determined that the detection result is a failure of the detection. The preset quantity threshold can be set according to actual needs. For example, it can be set to m, that is, only when the gluing areas of m preset areas meet the preset gluing requirements, the detection result will be determined as a pass. However, in a specific implementation, the preset number threshold may also be set to a number smaller than m, which is not specifically limited in this embodiment.
综合m个预设区域中每个预设区域的涂胶面积是否满足预设的涂胶要求,能够更准确且全面的确定完成涂胶作业的区域的涂胶面积的检测结果,即对于涂胶区域的涂胶面积的检测结果更加准确且全面。Integrating whether the gluing area of each preset area in the m preset areas meets the preset gluing requirements, the detection result of the gluing area of the area where the gluing operation is completed can be more accurately and comprehensively determined, that is, for gluing The detection result of the glued area of the region is more accurate and comprehensive.
根据本申请的一些实施例,结合图1中检测场景的示意图,涂胶面积的检测方法的流程示意图可以参考图6,包括:According to some embodiments of the present application, in combination with the schematic diagram of the detection scene in FIG. 1 , the schematic flow chart of the detection method of the glue-coated area can refer to FIG. 6 , including:
步骤600:将完成涂胶作业的水冷板放置在检测平台;Step 600: Place the water-cooled plate that has completed the gluing operation on the detection platform;
步骤601:通过外部按钮触发启动命令;Step 601: Trigger a start command through an external button;
步骤602:横移模组接收到启动命令后,带动相机和光源向左移动,并将移动速度和移动距离以脉冲的形式传给相机;Step 602: After receiving the start command, the traverse module drives the camera and light source to move to the left, and transmits the moving speed and moving distance to the camera in the form of pulses;
步骤603:横移模组根据水冷板的尺寸参数向目标距离移动;其中,目标距离可以为水冷板的长度;Step 603: The traverse module moves to the target distance according to the size parameters of the water-cooled plate; wherein, the target distance can be the length of the water-cooled plate;
步骤604:可编程控制器(Programmable Logic Controller,简称:PLC)把启动命令传给CCD软件系统;Step 604: the programmable controller (Programmable Logic Controller, referred to as: PLC) transmits the start command to the CCD software system;
步骤605:开启线光源;比如,CCD软件系统发送开启光源命令给光源控制器,为相机扫描提供亮度支持;Step 605: Turn on the line light source; for example, the CCD software system sends a command to turn on the light source to the light source controller to provide brightness support for camera scanning;
步骤606:CCD软件系统同步启动扫描,相机开始扫描水冷板;Step 606: The CCD software system starts scanning synchronously, and the camera starts scanning the water cooling plate;
步骤607:横移模组移动到目标距离后,把移动完成的信号传给CCD软件系统;Step 607: After the traversing module moves to the target distance, send the signal of completion of the movement to the CCD software system;
步骤608:CCD软件系统收到移动完成的信号后,控制相机停止扫描,并控制光源关闭;Step 608: After the CCD software system receives the signal that the movement is completed, it controls the camera to stop scanning and controls the light source to turn off;
步骤609:相机将扫描的图像传给CCD软件系统;Step 609: the camera transmits the scanned image to the CCD software system;
步骤610:横移模组向右移动,回到初始位;其中,横移模组回到初始位后,等待下一个启动命令;Step 610: The traverse module moves to the right and returns to the initial position; wherein, after the traverse module returns to the initial position, it waits for the next start command;
步骤611:判断图像是否为目标图像;其中,CCD软件系统可以对图像进行清晰度检测,从而判断图像是否为目标图像,目标图像为满足预设清晰度要求的图像;如果是,则执行步骤612,否则执行步骤 620;Step 611: judging whether the image is the target image; wherein, the CCD software system can perform sharpness detection on the image, thereby judging whether the image is the target image, and the target image is an image that meets the preset sharpness requirements; if yes, then execute step 612 , otherwise execute step 620;
步骤612:图像预处理;其中,图像预处理是指对目标图像进行预处理,得到预处理后的图像;Step 612: Image preprocessing; wherein, image preprocessing refers to preprocessing the target image to obtain a preprocessed image;
步骤613:仿射变换;其中,仿射变换可以理解为:根据预设模板图像与目标图像之间的相对位移和相对角度,将预设模板图像中的1个ROI仿射变换至预处理后的图像上,得到预设模板图像中的1个ROI在预处理后的图像上的位置;Step 613: Affine transformation; wherein, affine transformation can be understood as: according to the relative displacement and relative angle between the preset template image and the target image, affine transformation of one ROI in the preset template image to the preprocessed On the image, get the position of a ROI in the preset template image on the preprocessed image;
步骤614:生成m个ROI的位置;其中,生成m个ROI的位置可以理解为:根据预设模板图像中的1个ROI在预处理后的图像上的位置,以及相关配置参数,得到预处理后的图像上的m个ROI的位置;其中,相关配置参数包括:水冷板的尺寸参数、预设的相邻ROI之间的横向间距和纵向间距以及预设的水冷板上的ROI的总数m;Step 614: Generate the positions of m ROIs; wherein, generating the positions of m ROIs can be understood as: according to the position of one ROI in the preset template image on the preprocessed image, and related configuration parameters, the preprocessed The positions of the m ROIs on the final image; wherein, the relevant configuration parameters include: the size parameters of the water-cooled plate, the preset horizontal and vertical spacing between adjacent ROIs, and the preset total number m of ROIs on the water-cooled plate ;
步骤615:检测m个ROI的涂胶面积;比如,可以对m个ROI进行BLOB测量,获得水冷板上m个ROI的涂胶面积;Step 615: Detect the glued areas of m ROIs; for example, BLOB measurement can be performed on m ROIs to obtain the glued areas of m ROIs on the water cooling plate;
步骤616:对m个ROI的涂胶面积与基准面积进行比较计算;其中,涂胶面积大于或等于基准面积的80%的ROI满足预设的涂胶要求;Step 616: Comparing and calculating the gluing area of m ROIs with the reference area; wherein, ROIs whose gluing area is greater than or equal to 80% of the reference area meet the preset gluing requirements;
步骤617:得到检测结果;比如,可以根据m个ROI的涂胶面积是否满足预设的涂胶要求,确定水冷板的涂胶面积的检测结果;Step 617: Get the test result; for example, determine the test result of the glue-coated area of the water-cooled plate according to whether the glue-coated areas of the m ROIs meet the preset glue-coating requirements;
步骤618:将检测结果上传给PLC和上位机;其中,CCD软件系统将检测结果上传给PLC和上位机后可以认为完成一个测量周期循环;Step 618: Upload the test results to the PLC and the host computer; wherein, after the CCD software system uploads the test results to the PLC and the host computer, it can be considered that a measurement cycle is completed;
步骤619:上位机将检测结果和水冷板的型号上传给制造执行系统(manufacturing execution system,简称:MES);上传给MES后,可以将水冷板从检测平台上取下来,完成水冷板的涂胶面积的检测;Step 619: The upper computer uploads the test results and the model of the water-cooled plate to the manufacturing execution system (manufacturing execution system, MES for short); after uploading to the MES, the water-cooled plate can be removed from the testing platform to complete the glue coating of the water-cooled plate Area detection;
步骤620:调节光源的亮度,直到接收到相机扫描的满足预设清晰度要求的目标图像。步骤620执行完之后进入步骤612。Step 620: Adjust the brightness of the light source until the target image scanned by the camera and meeting the preset definition requirement is received. Enter step 612 after step 620 is executed.
在一些实施例中,步骤612所提到的预处理的过程可以参考图7,包括:In some embodiments, the preprocessing process mentioned in step 612 can refer to FIG. 7 , including:
步骤701:对目标图像平滑与去噪;比如,可以用中值滤波消除孤立的杂点和噪声;Step 701: smoothing and denoising the target image; for example, median filtering can be used to eliminate isolated noise and noise;
步骤702:对目标图像进行形态变换,剔除边缘毛刺和小杂点;其中,形态变换可以采用腐蚀、膨胀和开闭等操作;Step 702: perform morphological transformation on the target image, and remove edge burrs and small noise points; wherein, morphological transformation can use operations such as erosion, expansion, and opening and closing;
步骤703:增强目标图像的对比度;比如,对目标图像的边缘和细节进行增强,使其明暗变化更加明显;Step 703: Enhance the contrast of the target image; for example, enhance the edges and details of the target image to make the light and dark changes more obvious;
步骤704:对目标图像的边缘进行锐化操作;比如,可以使用冲击滤波器算子实现该锐化操作;Step 704: Perform a sharpening operation on the edge of the target image; for example, the sharpening operation can be realized by using an impact filter operator;
步骤705:对目标图像进行阈值分割,提取出较暗区域;Step 705: Perform threshold segmentation on the target image to extract darker regions;
步骤706:对目标图像进行连通域分割,分离出不相连的区域;Step 706: Perform connected domain segmentation on the target image to separate out unconnected regions;
步骤707:对目标图像进行区域选择,选择出感兴趣的特征区域。Step 707: Perform area selection on the target image to select the feature area of interest.
在一些实施例中,步骤620所提到的调节光源的亮度的过程可以参考图8,包括:In some embodiments, the process of adjusting the brightness of the light source mentioned in step 620 can refer to FIG. 8 , including:
步骤801:输入预设的光源强度给光源控制器,以控制光源发出预设的光源强度的光;Step 801: Input a preset light source intensity to the light source controller to control the light source to emit light with the preset light source intensity;
步骤802:接收相机采集的完成涂胶作业的水冷板的图像;Step 802: Receive the image of the water-cooled plate that has completed the gluing operation collected by the camera;
步骤803:计算图像的灰度参数值,并计算灰度参数值与预设的参考值之间的偏差值;Step 803: Calculate the grayscale parameter value of the image, and calculate the deviation value between the grayscale parameter value and the preset reference value;
步骤804:判断偏差值是否位于预设的公差范围内;如果是,则执行步骤805,否则执行步骤806;Step 804: Determine whether the deviation value is within the preset tolerance range; if yes, execute step 805, otherwise execute step 806;
步骤805:调节结束,光源控制器以当前亮度运行;Step 805: the adjustment is completed, and the light source controller runs at the current brightness;
步骤806:判断偏差值是否大于预设的公差范围的上限值;如果是,则执行步骤807,否则执行步骤808;Step 806: Determine whether the deviation value is greater than the upper limit of the preset tolerance range; if yes, execute step 807, otherwise execute step 808;
步骤807:发出调低亮度的调节控制信号,直到接收到相机采集的满足预设清晰度要求的目标图像;Step 807: sending out an adjustment control signal for lowering the brightness until receiving the target image captured by the camera and meeting the preset definition requirements;
步骤808:判断偏差值是否小于预设的公差范围的下限值;如果是,则执行步骤809,否则执行步骤805;Step 808: Determine whether the deviation value is less than the lower limit of the preset tolerance range; if yes, execute step 809, otherwise execute step 805;
步骤809:发出调高亮度的调节控制信号,直到接收到相机采集的满足预设清晰度要求的目标图像。Step 809: sending an adjustment control signal for increasing the brightness until the target image captured by the camera meeting the preset definition requirement is received.
在一些实施例中,步骤807的实现过程可以为:发出调低亮度的调节控制信号,每次调节的递减量为偏差值所表征的偏差量的1/5。然后继续接收相机基于调节后的光源的亮度采集的图像,并计算图像的灰度参数值与预设的参考值之间的偏差值,直到计算的偏差值处于预设的公差范围之内,停止调节光源的亮度。In some embodiments, the implementation process of step 807 may be: sending an adjustment control signal to lower the brightness, and the decrement amount of each adjustment is 1/5 of the deviation represented by the deviation value. Then continue to receive the image collected by the camera based on the adjusted brightness of the light source, and calculate the deviation value between the gray parameter value of the image and the preset reference value, until the calculated deviation value is within the preset tolerance range, stop Adjust the brightness of the light source.
在一些实施例中,步骤809的实现过程可以为:发出调高亮度的调节控制信号,每次调节的递增量为偏差值所表征的偏差量的1/5。然后继续接收相机基于调节后的光源的亮度采集的图像,并计算图像的灰度参数值与预设的参考值之间的偏差值,直到计算的偏差值处于预设的公差范围之内,停止调节光源的亮度。In some embodiments, the implementation process of step 809 may be: sending an adjustment control signal to increase the brightness, and the incremental amount of each adjustment is 1/5 of the deviation represented by the deviation value. Then continue to receive the image collected by the camera based on the adjusted brightness of the light source, and calculate the deviation value between the gray parameter value of the image and the preset reference value, until the calculated deviation value is within the preset tolerance range, stop Adjust the brightness of the light source.
在一些实施例中,考虑到由于环境光的不确定性,相机采集的图像质量前后偏差较大,同时随着使用时间的延长,光源的亮度也会有所衰减,从而会影响采集的图像的质量,而图像清晰度是衡量图像质量的一个重要指标,将会影响涂胶面积的检测结果的误差。因此,本申请的一些实施例中,增加了对相机采集的图像的清晰度检测,以及对光源亮度的自适应调节,从而有利于采集到满足预设清晰度要求的图像,基于满足预设清晰度要求的图像进行涂胶面积的检测,有利于提高检测结果的准确性。In some embodiments, considering that due to the uncertainty of ambient light, the quality of the image captured by the camera has a large deviation before and after, and at the same time, with the prolongation of the use time, the brightness of the light source will also attenuate, which will affect the quality of the captured image. Quality, and image clarity is an important index to measure image quality, which will affect the error of the detection result of the glued area. Therefore, in some embodiments of the present application, the sharpness detection of the image captured by the camera and the adaptive adjustment of the brightness of the light source are added, so as to facilitate the collection of images that meet the preset sharpness requirements, based on meeting the preset sharpness It is helpful to improve the accuracy of the detection results by detecting the glue-coated area on the image with the required precision.
根据本申请的一些实施例,请参考图9,电子设备,包括:至少一个处理器901;以及,与所述至少一个处理器901通信连接的存储器902;其中存储器902存储有可被所述至少一个处理器901执行的指令,所述指令被所述至少一个处理器901执行,以使所述至少一个处理器901能够执行上述方法实施例中的涂胶面积的检测方法。According to some embodiments of the present application, please refer to FIG. 9 , the electronic device includes: at least one processor 901; and a memory 902 communicated with the at least one processor 901; An instruction executed by a processor 901, the instruction is executed by the at least one processor 901, so that the at least one processor 901 can execute the glue-applied area detection method in the above method embodiment.
其中,存储器902和处理器901采用总线方式连接,总线可以包括任意数量的互联的总线和桥,总线将一个或多个处理器901和存储器902的各种电路连接在一起。总线还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路连接在一起,这些都是本领域所公 知的,因此,本文不再对其进行进一步描述。总线接口在总线和收发机之间提供接口。收发机可以是一个元件,也可以是多个元件,比如多个接收器和发送器,提供用于在传输介质上与各种其他装置通信的单元。经处理器901处理的数据通过天线在无线介质上进行传输,进一步,天线还接收数据并将数据传送给处理器901。Wherein, the memory 902 and the processor 901 are connected by a bus, and the bus may include any number of interconnected buses and bridges, and the bus connects one or more processors 901 and various circuits of the memory 902 together. The bus may also connect together various other circuits such as peripherals, voltage regulators, and power management circuits, all of which are well known in the art and therefore will not be further described herein. The bus interface provides an interface between the bus and the transceivers. A transceiver may be a single element or multiple elements, such as multiple receivers and transmitters, providing means for communicating with various other devices over a transmission medium. The data processed by the processor 901 is transmitted on the wireless medium through the antenna, and further, the antenna also receives the data and transmits the data to the processor 901 .
处理器901负责管理总线和通常的处理,还可以提供各种功能,包括定时,外围接口,电压调节、电源管理以及其他控制功能。而存储器902可以被用于存储处理器901在执行操作时所使用的数据。 Processor 901 is responsible for managing the bus and general processing, and may also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. And the memory 902 may be used to store data used by the processor 901 when performing operations.
本申请的一些实施例涉及一种计算机可读存储介质,存储有计算机程序。计算机程序被处理器执行时实现上述方法实施例。Some embodiments of the present application relate to a computer-readable storage medium storing a computer program. The above method embodiments are implemented when the computer program is executed by the processor.
即,本领域技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。That is, those skilled in the art can understand that all or part of the steps in the method of the above-mentioned embodiments can be completed by instructing related hardware through a program, the program is stored in a storage medium, and includes several instructions to make a device ( It may be a single-chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围,其均应涵盖在本申请的权利要求和说明书的范围当中。尤其是,只要不存在结构冲突,各个实施例中所提到的各项技术特征均可以任意方式组合起来。本申请并不局限于文中公开的特定实施例,而是包括落入权利要求的范围内的所有技术方案。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit it; although the application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present application. All of them should be covered by the scope of the claims and description of the present application. In particular, as long as there is no structural conflict, the technical features mentioned in the various embodiments can be combined in any manner. The present application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.

Claims (9)

  1. 一种涂胶面积的检测方法,包括:A method for detecting a glued area, comprising:
    接收完成涂胶作业的区域的图像;其中,所述图像为相机在一光源下采集的图像;Receive the image of the region where the gluing operation is completed; wherein, the image is an image collected by a camera under a light source;
    获取所述图像的灰度参数值;Acquiring the grayscale parameter value of the image;
    根据所述灰度参数值和预设的参考值之间的偏差值,对所述光源的亮度进行调节;adjusting the brightness of the light source according to the deviation between the grayscale parameter value and a preset reference value;
    接收所述相机基于调节后的光源的亮度采集的所述完成涂胶作业的区域的目标图像;receiving the target image of the area where the gluing operation is completed and collected by the camera based on the adjusted brightness of the light source;
    根据所述目标图像,对所述完成涂胶作业的区域的涂胶面积进行检测;Detecting the gluing area of the region where the gluing operation has been completed according to the target image;
    其中,所述目标图像为满足预设清晰度要求的图像。Wherein, the target image is an image meeting a preset definition requirement.
  2. 根据权利要求1所述的涂胶面积的检测方法,其中,所述灰度参数值为灰度均值,所述预设的参考值为灰度均值参考值,或者,所述灰度参数值为灰度方差,所述预设的参考值为灰度方差参考值。The detection method of the gluing area according to claim 1, wherein the grayscale parameter value is a grayscale mean value, and the preset reference value is a grayscale mean value reference value, or, the grayscale parameter value is Grayscale variance, the preset reference value is a grayscale variance reference value.
  3. 根据权利要求1或2所述的涂胶面积的检测方法,其中,所述根据所述目标图像,对所述完成涂胶作业的区域的涂胶面积进行检测,包括:The detection method of the gluing area according to claim 1 or 2, wherein, according to the target image, detecting the gluing area of the area where the gluing operation is completed comprises:
    将预设模板图像中的预设区域仿射变换至所述目标图像上,得到所述预设模板图像中的预设区域在所述目标图像上的位置,Affine transforming the preset area in the preset template image onto the target image to obtain the position of the preset area in the preset template image on the target image,
    其中,所述预设模板图像与所述完成涂胶作业的区域对应且所述预设模板图像上预先定位有所述预设区域的位置;Wherein, the preset template image corresponds to the area where the gluing operation is completed and the position of the preset area is pre-positioned on the preset template image;
    根据所述预设模板图像中的预设区域在所述目标图像上的位置、所述完成涂胶作业的区域的尺寸参数、预设的相邻预设区域之间的横向间距和/或纵向间距以及预设的所述完成涂胶作业的区域上的预设区域的总数m, 得到所述目标图像上m个预设区域的位置;其中,m为大于1的整数;According to the position of the preset area in the preset template image on the target image, the size parameter of the area where the gluing operation is completed, the preset horizontal distance and/or vertical distance between adjacent preset areas The spacing and the preset total number m of preset areas on the area where the gluing operation is completed, obtain the positions of m preset areas on the target image; wherein, m is an integer greater than 1;
    根据所述目标图像上m个预设区域的位置,对所述完成涂胶作业的区域上的m个预设区域的涂胶面积进行检测。According to the positions of the m preset areas on the target image, the gluing areas of the m preset areas on the area where the gluing operation is completed are detected.
  4. 根据权利要求3所述的涂胶面积的检测方法,其中,所述预设模板图像上预先定位有1个所述预设区域的位置。The method for detecting glue-coated areas according to claim 3, wherein one position of the preset area is pre-positioned on the preset template image.
  5. 根据权利要求4所述的涂胶面积的检测方法,其中,所述1个所述预设区域位于所述预设模板图像中的起始区域,所述起始区域对应于所述完成涂胶作业的区域中被所述相机扫描的第1个涂胶检测子区域。The detection method of the gluing area according to claim 4, wherein said one preset area is located in the starting area in the preset template image, and the starting area corresponds to the completed gluing The first gluing detection sub-area scanned by the camera in the working area.
  6. 根据权利要求3至5任一项所述的涂胶面积的检测方法,其中,所述将预设模板图像中的预设区域仿射变换至所述目标图像上,得到所述预设模板图像中的预设区域在所述目标图像上的位置,包括:The detection method of the glue-coated area according to any one of claims 3 to 5, wherein the affine transformation of the preset area in the preset template image to the target image obtains the preset template image The position of the preset area in the target image includes:
    确定所述预设模板图像与所述目标图像之间的相对位移和相对角度;determining a relative displacement and a relative angle between the preset template image and the target image;
    根据所述相对位移和所述相对角度,将预设模板图像中的预设区域仿射变换至所述目标图像上,得到所述预设模板图像中的预设区域在所述目标图像上的位置。According to the relative displacement and the relative angle, the preset area in the preset template image is affine transformed onto the target image to obtain the preset area in the preset template image on the target image. Location.
  7. 根据权利要求3至6任一项所述的涂胶面积的检测方法,其中,在所述根据所述目标图像上m个预设区域的位置,对所述完成涂胶作业的区域上的m个预设区域的涂胶面积进行检测之后,还包括:According to the detection method of the gluing area described in any one of claims 3 to 6, wherein, in the position according to the m preset areas on the target image, m on the area where the gluing operation is completed After testing the glued area of a preset area, it also includes:
    将所述m个预设区域的涂胶面积分别与预设的基准面积进行对比,确定所述m个预设区域的涂胶面积是否满足预设的涂胶要求;Comparing the gluing areas of the m preset areas with the preset reference areas respectively, and determining whether the gluing areas of the m preset areas meet the preset gluing requirements;
    根据所述m个预设区域的涂胶面积是否满足预设的涂胶要求,确定所述完成涂胶作业的区域的涂胶面积的检测结果。According to whether the gluing areas of the m preset areas meet the preset gluing requirements, the detection result of the gluing area of the area where the gluing operation is completed is determined.
  8. 一种电子设备,包括:An electronic device comprising:
    至少一个处理器;以及,at least one processor; and,
    与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1至7中任一所述的涂胶面积的检测方法。The memory is stored with instructions executable by the at least one processor, the instructions are executed by the at least one processor, so that the at least one processor can perform any one of claims 1 to 7 The detection method of the gluing area.
  9. 一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1至7中任一项所述的涂胶面积的检测方法。A computer-readable storage medium, storing a computer program, which implements the glue-applied area detection method according to any one of claims 1 to 7 when the computer program is executed by a processor.
PCT/CN2021/113513 2021-08-19 2021-08-19 Method for detecting glue application area, electronic device and computer-readable storage medium WO2023019508A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2021/113513 WO2023019508A1 (en) 2021-08-19 2021-08-19 Method for detecting glue application area, electronic device and computer-readable storage medium
CN202180085537.0A CN116917935A (en) 2021-08-19 2021-08-19 Method for detecting glue spreading area, electronic device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/113513 WO2023019508A1 (en) 2021-08-19 2021-08-19 Method for detecting glue application area, electronic device and computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2023019508A1 true WO2023019508A1 (en) 2023-02-23

Family

ID=85239404

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/113513 WO2023019508A1 (en) 2021-08-19 2021-08-19 Method for detecting glue application area, electronic device and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN116917935A (en)
WO (1) WO2023019508A1 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116429790A (en) * 2023-06-14 2023-07-14 山东力乐新材料研究院有限公司 Wooden packing box production line intelligent management and control system based on data analysis
CN116609344A (en) * 2023-07-17 2023-08-18 苏州思谋智能科技有限公司 Defect detection method, device and equipment for camera socket and storage medium
CN116777888A (en) * 2023-06-30 2023-09-19 广州高迪机电工程有限公司 Self-adaptive compensation correction method for adhesive width by visual detection system during angular adhesive coating
CN116912249A (en) * 2023-09-13 2023-10-20 常州星宇车灯股份有限公司 Sealant sealing quality detection method, device, equipment and medium thereof
CN117073534A (en) * 2023-10-16 2023-11-17 宁德时代新能源科技股份有限公司 Glue spreading detection method and pole piece glue spreading system
CN117593550A (en) * 2024-01-18 2024-02-23 宁德时代新能源科技股份有限公司 Coating system and spot inspection method of coating system
CN117670864A (en) * 2023-12-28 2024-03-08 北汽利戴工业技术服务(北京)有限公司 Image recognition system based on industrial camera
CN117696406A (en) * 2024-02-01 2024-03-15 宁德时代新能源科技股份有限公司 Water-cooling plate gluing method, system and storage medium
CN117593550B (en) * 2024-01-18 2024-05-31 宁德时代新能源科技股份有限公司 Coating system and spot inspection method of coating system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010135946A (en) * 2008-12-02 2010-06-17 Canon Inc Imaging apparatus, method for controlling the same and program
CN102370452A (en) * 2011-10-13 2012-03-14 深圳市理邦精密仪器股份有限公司 Method and device for automatically adjusting brightness of light source of electronic colposcope
CN105868755A (en) * 2015-11-24 2016-08-17 乐视致新电子科技(天津)有限公司 Number separation method and apparatus
CN107707826A (en) * 2017-09-29 2018-02-16 深圳怡化电脑股份有限公司 The brightness adjusting method and device of light compensating lamp
CN110781890A (en) * 2019-10-25 2020-02-11 上海德启信息科技有限公司 Identification card identification method and device, electronic equipment and readable storage medium
CN112288732A (en) * 2020-11-05 2021-01-29 昆山丘钛光电科技有限公司 Dispensing detection method, device, equipment and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010135946A (en) * 2008-12-02 2010-06-17 Canon Inc Imaging apparatus, method for controlling the same and program
CN102370452A (en) * 2011-10-13 2012-03-14 深圳市理邦精密仪器股份有限公司 Method and device for automatically adjusting brightness of light source of electronic colposcope
CN105868755A (en) * 2015-11-24 2016-08-17 乐视致新电子科技(天津)有限公司 Number separation method and apparatus
CN107707826A (en) * 2017-09-29 2018-02-16 深圳怡化电脑股份有限公司 The brightness adjusting method and device of light compensating lamp
CN110781890A (en) * 2019-10-25 2020-02-11 上海德启信息科技有限公司 Identification card identification method and device, electronic equipment and readable storage medium
CN112288732A (en) * 2020-11-05 2021-01-29 昆山丘钛光电科技有限公司 Dispensing detection method, device, equipment and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
YU BAOJUN, LIU MIN: "Research on Vision Detection System Applied to the Circuit Board Gluing Quality of Automobile Sensor", MECHANICAL ENGINEER, no. 12, 10 December 2014 (2014-12-10), pages 39 - 42, XP093036305, ISSN: 1002-2333 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116429790B (en) * 2023-06-14 2023-08-15 山东力乐新材料研究院有限公司 Wooden packing box production line intelligent management and control system based on data analysis
CN116429790A (en) * 2023-06-14 2023-07-14 山东力乐新材料研究院有限公司 Wooden packing box production line intelligent management and control system based on data analysis
CN116777888B (en) * 2023-06-30 2024-02-06 广州高迪机电工程有限公司 Self-adaptive compensation correction method for adhesive width by visual detection system during angular adhesive coating
CN116777888A (en) * 2023-06-30 2023-09-19 广州高迪机电工程有限公司 Self-adaptive compensation correction method for adhesive width by visual detection system during angular adhesive coating
CN116609344A (en) * 2023-07-17 2023-08-18 苏州思谋智能科技有限公司 Defect detection method, device and equipment for camera socket and storage medium
CN116609344B (en) * 2023-07-17 2023-11-03 苏州思谋智能科技有限公司 Defect detection method, device and equipment for camera socket and storage medium
CN116912249A (en) * 2023-09-13 2023-10-20 常州星宇车灯股份有限公司 Sealant sealing quality detection method, device, equipment and medium thereof
CN116912249B (en) * 2023-09-13 2023-12-01 常州星宇车灯股份有限公司 Sealant sealing quality detection method, device, equipment and medium thereof
CN117073534A (en) * 2023-10-16 2023-11-17 宁德时代新能源科技股份有限公司 Glue spreading detection method and pole piece glue spreading system
CN117073534B (en) * 2023-10-16 2024-04-02 宁德时代新能源科技股份有限公司 Glue spreading detection method and pole piece glue spreading system
CN117670864A (en) * 2023-12-28 2024-03-08 北汽利戴工业技术服务(北京)有限公司 Image recognition system based on industrial camera
CN117593550A (en) * 2024-01-18 2024-02-23 宁德时代新能源科技股份有限公司 Coating system and spot inspection method of coating system
CN117593550B (en) * 2024-01-18 2024-05-31 宁德时代新能源科技股份有限公司 Coating system and spot inspection method of coating system
CN117696406A (en) * 2024-02-01 2024-03-15 宁德时代新能源科技股份有限公司 Water-cooling plate gluing method, system and storage medium

Also Published As

Publication number Publication date
CN116917935A (en) 2023-10-20

Similar Documents

Publication Publication Date Title
WO2023019508A1 (en) Method for detecting glue application area, electronic device and computer-readable storage medium
CN108921865B (en) Anti-interference sub-pixel straight line fitting method
CN107403454B (en) System and method for measuring vehicle position parameters and size parameters of three-dimensional parking lot
CN109085113B (en) Automatic focusing method and device for cervical exfoliated cell detection device
WO2022193848A1 (en) Intelligent unloading monitoring method and system for concrete batching station
CN114821114B (en) Groove cutting robot image processing method based on vision system
WO2022078074A1 (en) Method and system for detecting position relation between vehicle and lane line, and storage medium
US20230370577A1 (en) Calibration method and apparatus for binocular camera, image correction method and apparatus for binocular camera, storage medium, terminal and intelligent device
CN105608671A (en) Image connection method based on SURF algorithm
CN110084842B (en) Servo secondary alignment method and device for robot holder
CN111811784A (en) Laser spot center coordinate determination method, device and equipment
CN109215071A (en) The intelligent harvester for both rice and wheat swath measurement method of view-based access control model
CN108344693B (en) Automatic welding-oriented visual measurement method for misalignment of sheet welding seam
CN110991360A (en) Robot inspection point location intelligent configuration method based on visual algorithm
CN112305557B (en) Panoramic camera and multi-line laser radar external parameter calibration system
CN113688817A (en) Instrument identification method and system for automatic inspection
CN110322462B (en) Unmanned aerial vehicle visual landing method and system based on 5G network
CN113510412A (en) Detection system and detection method for identifying welding seam state and storage medium
CN109118529A (en) A kind of screw hole Image Quick Orientation method of view-based access control model
CN114241438B (en) Traffic signal lamp rapid and accurate identification method based on priori information
Han et al. Target positioning method in binocular vision manipulator control based on improved canny operator
CN112634362A (en) Indoor wall plastering robot vision accurate positioning method based on line laser assistance
CN206583440U (en) A kind of projected image sighting distance detecting system
CN112839168B (en) Method for automatically adjusting camera imaging resolution in AOI detection system
CN114292021A (en) System and method for adjusting preform rod in real time in quartz optical fiber drawing process

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21953754

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202180085537.0

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE