Method and device for detecting sizes of copper pipes B of two devices of air conditioner and air conditioning system
Through image processing technology, pixel data of the copper tube horn mouth and edge plate are extracted, contrast differences are calculated, automatic detection of the B-size of copper tube is realized, and the problems of low detection efficiency and large error in the existing technology are solved, ensuring that the copper tube is quality qualification.
Patent Information
- Application Number
- CN202411287481.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2024-12-13
AI Technical Summary
In the prior art, the detection efficiency of the B-size of copper tube is low and the error is large, resulting in gaps or poor welding at the contact points of the copper tube flare mouth and abnormal welding problems.
By obtaining the target image of the copper tube horn, extracting the pixel data of the outer diameter profile of the horn and the edge plate, calculating its contrast difference, and determining whether the size of the copper tube B is within the standard range, so as to achieve automatic detection.
Automatic detection of the B-size of copper pipe is achieved, avoiding the problems of inconsistent standards, large errors and low efficiency caused by manual inspection, ensuring the quality of copper pipes, and reducing production losses.
Smart Images

Figure CN119124003A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of copper tube detection, and more specifically, to a method, device, computer-readable storage medium, computer program product, and air-conditioning system for detecting the B size of a copper tube of an air conditioner. Background Art
[0002] To ensure the performance quality and weld pass rate of the two air conditioner components during production, the copper tube B-dimension must be inspected after the tube is flared. If the B-dimension of a single copper tube is too short, it can cause gaps at the contact point of the tube flare, leading to poor welding and other quality defects. If the B-dimension of a single copper tube is too long, the overall length of the two components will be too long, making it difficult to assemble the screws, and other abnormalities.
[0003] Existing B-dimension measurements are mainly performed by inspectors using vernier calipers for initial inspection before production or by randomly sampling individual copper tubes during production. For high-speed assembly lines, manual sampling is inefficient and is affected by inconsistent judgment standards among different employees, resulting in unstable sampling results, large detection errors, and even false detections. Summary of the Invention
[0004] The main purpose of this application is to provide a method, device, computer-readable storage medium, computer program product and air-conditioning system for detecting the B size of the copper tube of the two air conditioners, so as to at least solve the problem of low efficiency and large error in manual detection of the B size of the copper tube in the prior art.
[0005] To achieve the objective, according to one aspect of the present application, a method for detecting the B size of a copper tube of an air conditioner is provided, wherein the copper tube passes through a side plate and one end of the copper tube is a bell mouth, the method comprising: acquiring a target image and, based on the target image, determining pixel data of an outer diameter contour of the bell mouth and pixel data of the side plate, the target image being an image of the bell mouth of the copper tube acquired under predetermined conditions, the predetermined conditions comprising that a lens of an image acquisition device faces the bell mouth and a distance between the image acquisition device and the bell mouth or the side plate meets a predetermined distance; determining an evaluation parameter of the copper tube as a target parameter based on the pixel data of the outer diameter contour and the pixel data of the side plate, the evaluation parameter characterizing a contrast difference between the outer diameter contour and the side plate; determining whether the B size of the copper tube is qualified based on the target parameter and a standard parameter range, the standard parameter range being a range value of the evaluation parameter of the standard copper tube determined based on the image of the standard copper tube acquired under the predetermined conditions, the B size of the standard copper tube being qualified, the B size being the distance between the outer edge of the bell mouth and the side plate.
[0006] Optionally, based on the pixel data of the outer diameter contour and the pixel data of the side plate, the evaluation parameter of the copper tube is determined as the target parameter, including: calculating the absolute value of the difference between the pixel data of the side plate and the pixel data of the outer diameter contour; calculating the ratio of the absolute value of the difference to the pixel data of the outer diameter contour, or calculating the ratio of the absolute value of the difference to the pixel data of the side plate to obtain the target parameter.
[0007] Optionally, based on the pixel data of the outer diameter profile and the pixel data of the side plate, the evaluation parameters of the copper tube are determined as target parameters, including: standardizing the pixel data of the outer diameter profile to obtain first standardized data; standardizing the pixel data of the side plate to obtain second standardized data; and performing predetermined operations on the first standardized data and the second standardized data to obtain the target parameters.
[0008] Optionally, based on the target image, the pixel data of the outer diameter contour of the bell mouth and the pixel data of the side plate are determined, including: extracting the outer diameter contour from the target image; calculating the pixel average value of each pixel point constituting the outer diameter contour to obtain the pixel data of the outer diameter contour; based on the target image, determining the pixel average value of multiple pixel points corresponding to the side plate to obtain the pixel data of the side plate.
[0009] Optionally, according to the target image, the pixel average value of multiple pixel points corresponding to the side panel is determined to obtain the pixel data of the side panel, including one of the following: extracting a plurality of pixel value sets of the side panel area from the target image, and calculating the average value of the plurality of pixel value sets to obtain the pixel data of the side panel; inputting the target image into a machine learning model to obtain the pixel data of the side panel, wherein the machine learning model is trained by machine learning using multiple sets of data, and each set of the multiple sets of data includes: a historical target image, and the pixel average value of the side panel pixels corresponding to the historical target image.
[0010] Optionally, extracting the outer diameter contour from the target image includes: performing edge feature extraction on the target image to obtain the inner diameter contour and the initial outer diameter contour of the bell mouth; performing circular detection on the initial outer diameter contour to determine whether the initial outer diameter contour is a circle; if the initial outer diameter contour is a circle, determining the initial outer diameter contour as the outer diameter contour; if the initial outer diameter contour is not a circle, determining the outer diameter contour based on the inner diameter contour and the preset outer diameter of the bell mouth.
[0011] Optionally, the outer diameter contour is determined based on the inner diameter contour and the preset outer diameter of the bell mouth, including: determining the center position of the bell mouth based on the inner diameter contour; determining the outer diameter theoretical contour of the bell mouth based on the center position and the preset outer diameter; when the proportion of the side plate area in the area of the target image surrounded by the outer diameter theoretical contour does not meet the threshold requirement, keeping the center position unchanged, increasing and / or decreasing the radius of the outer diameter theoretical contour in a predetermined step size until the proportion corresponding to the adjusted outer diameter theoretical contour meets the threshold requirement, thereby obtaining the adjusted contour; and determining the adjusted contour as the outer diameter contour.
[0012] Optionally, the radius of the theoretical outer diameter profile is increased and / or decreased in a predetermined step size to obtain an adjusted profile, including: when the ratio corresponding to the theoretical outer diameter profile is greater than a first threshold value, starting from the preset outer diameter, the preset outer diameter is reduced by one predetermined step size in sequence until the ratio corresponding to the adjusted theoretical outer diameter profile is less than or equal to the first threshold value, to obtain the adjusted profile; when the ratio corresponding to the theoretical outer diameter profile is less than a second threshold value, starting from the preset outer diameter, the preset outer diameter is increased by one predetermined step size in sequence until the ratio corresponding to the adjusted theoretical outer diameter profile is greater than or equal to the second threshold value, to obtain the adjusted profile, wherein both the first threshold value and the second threshold value are greater than 0.
[0013] Optionally, obtaining the target image includes: collecting the image of the copper tube under the predetermined conditions to obtain an initial image; performing a first predetermined processing on the initial image to obtain an intermediate image, wherein the first predetermined processing includes at least one of the following: denoising processing; image enhancement processing; performing a second predetermined processing on the intermediate image to obtain the target image, wherein the second predetermined processing includes one of the following: binarization processing, grayscale processing.
[0014] Optionally, determining whether the B size of the copper tube is qualified based on the target parameter and the standard parameter range includes: when the target parameter is within the standard parameter range, determining that the B size of the copper tube corresponding to the target parameter is qualified, the air conditioner includes a plurality of the copper tubes, the plurality of the copper tubes pass through the side plate and one end of each of the copper tubes is the bell mouth, the target image includes images of the plurality of bell mouths, and the method further includes: when the B sizes of all the copper tubes are qualified, determining that the B size of the air conditioner is qualified.
[0015] According to another aspect of the present application, a device for detecting the B size of a copper tube of an air conditioner is provided, wherein the copper tube passes through a side plate and one end of the copper tube is a bell mouth. The device includes: an acquisition unit for acquiring a target image and, based on the target image, determining pixel data of an outer diameter contour of the bell mouth and pixel data of the side plate, wherein the target image is an image of the bell mouth of the copper tube acquired under predetermined conditions, wherein the predetermined conditions include a lens of an image acquisition device facing the bell mouth and a distance between the image acquisition device and the bell mouth or the side plate meeting a predetermined distance; a first determination unit for determining an evaluation parameter of the copper tube as a target parameter based on the pixel data of the outer diameter contour and the pixel data of the side plate, wherein the evaluation parameter represents a contrast difference between the outer diameter contour and the side plate; and a second determination unit for determining whether the B size of the copper tube is qualified based on the target parameter and a standard parameter range, wherein the standard parameter range is a range value of the evaluation parameter of the standard copper tube determined based on the image of the standard copper tube acquired under the predetermined conditions, wherein the B size of the standard copper tube is qualified, and the B size is the distance between the outer edge of the bell mouth and the side plate.
[0016] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods described.
[0017] According to another aspect of the present application, a computer program product is provided, comprising computer instructions, wherein when the computer instructions are executed by a processor, any one of the methods described above is implemented.
[0018] According to another aspect of the present application, an air-conditioning system is also provided, comprising: an air-conditioning device, comprising a side plate and a plurality of copper tubes, wherein the plurality of copper tubes pass through the side plate and one end of each of the copper tubes is the bell mouth; a detection device for the air-conditioning device, comprising one or more processors, a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing any one of the methods described.
[0019] By applying the technical solution of the present application, first, an image of the bell mouth of the copper tube to be tested is obtained under predetermined conditions, and pixel data of the outer diameter profile of the bell mouth and pixel data of the side plate are determined based on the bell mouth image. The predetermined conditions include that the lens of the image acquisition device faces the bell mouth of the copper tube to be tested and the distance between the two meets a predetermined distance; then, based on the pixel data of the outer diameter profile and the pixel data of the side plate, a target parameter is determined, and the target parameter characterizes the contrast difference between the outer diameter profile of the bell mouth of the copper tube to be tested and the side plate; finally, based on the target parameter and the contrast difference range of the standard copper tube obtained from the image of the standard copper tube obtained under the predetermined conditions, it is determined whether the B dimension of the copper tube to be tested is qualified, thereby realizing automatic detection of the B dimension based on image processing technology. Compared with the existing technology of manual detection of B size, which has the problems of inconsistent standards, large errors and low efficiency, the present application obtains a front image of the bell mouth, uses image processing technology to analyze the image, and obtains the contrast difference between the outer diameter contour of the bell mouth and the side plate of the copper tube to be tested. By determining whether the contrast difference is within the contrast difference range corresponding to the copper tube with qualified B size, it is determined whether the B size of the copper tube to be tested is qualified. The B size is characterized by the contrast difference between the outer diameter contour of the bell mouth and the side plate in the image, thereby realizing automatic detection of the B size of the copper tube, avoiding the problems of inconsistent standards, large errors and low efficiency caused by manual detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings that constitute part of this application are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation on this application. In the drawings:
[0021] Figure 1 A hardware structure block diagram of a mobile terminal for performing a method for detecting the size of a copper tube B of an air conditioner provided in an embodiment of the present application is shown;
[0022] Figure 2 A schematic structural diagram of a copper tube provided according to an embodiment of the present application is shown;
[0023] Figure 3 A schematic flow chart of a method for detecting the size of a copper tube B of an air conditioner provided in accordance with an embodiment of the present application is shown;
[0024] Figure 4 A schematic diagram of a black shadow on the outer edge of a bell mouth provided in accordance with an embodiment of the present application is shown;
[0025] Figure 5 A schematic diagram of various regions in a copper tube image provided according to an embodiment of the present application is shown;
[0026] Figure 6A schematic diagram of contour lines in a copper tube image provided according to an embodiment of the present application is shown;
[0027] Figure 7 A schematic diagram of the bell mouth side of two devices of an air conditioner provided according to an embodiment of the present application is shown;
[0028] Figure 8 A schematic flow chart of a method for determining the size eligibility of a copper tube B according to an embodiment of the present application is shown;
[0029] Figure 9 The following is a calculation process for the relationship between the average pixel value of the outer edge contour points of the bell mouth and the average pixel value of the side panel according to an embodiment of the present application;
[0030] Figure 10 The following is a flowchart showing a pixel value calculation process for the outer edge of a flare mouth with a black shadow on the outer edge of the flare mouth according to an embodiment of the present application;
[0031] Figure 11 The figure shows a structural block diagram of a device for detecting the size of copper tube B of an air conditioner provided in an embodiment of the present application.
[0032] The accompanying drawings include the following reference numerals:
[0033] 102. Processor; 104. Memory; 106. Transmission device; 108. Input / output device; 10. Bell mouth; 11. Side panel; 12. Black shadow; 13. Bell mouth inner circle area; 14. Bell mouth outer contour area; 15. Black shadow area; 16. Side panel area. DETAILED DESCRIPTION
[0034] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0035] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0037] As introduced in the background technology, the prior art uses manual detection to monitor the B size of copper tubes, resulting in low detection efficiency and large errors. To solve the above technical problems, the embodiments of the present application provide a method, device, computer-readable storage medium, computer program product and air-conditioning system for detecting the B size of copper tubes of two air conditioners.
[0038] The technical solutions in the embodiments of the present invention will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present invention.
[0039] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for detecting the size of the copper tube B of an air conditioner according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0040] Memory 104 can be used to store computer programs, such as application software programs and modules, such as the computer program corresponding to the method for detecting the B-size of copper tubes in air conditioners in the embodiments of the present invention. Processor 102 executes the computer programs stored in memory 104 to execute various functional applications and data processing, thereby implementing the described method. Memory 104 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory remotely located from processor 102, which can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. Transmission device 106 is used to receive or transmit data via a network. Specific examples of such networks may include a wireless network provided by the mobile terminal's telecommunications provider. In one example, transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0041] In this embodiment, a method for detecting the size of the copper tube B of an air conditioner running on a mobile terminal, a computer terminal, or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0042] Figure 2 The cross-sectional structure and top view of a copper tube are shown as an example. Figure 2 As shown, the copper tube passes through the side plate 11 , and one end of the copper tube is a bell mouth 10 , and the top view outline of the bell mouth 10 is located in the side plate 11 . Figure 3 Flowchart of the method for detecting the size of the copper tube B of the air conditioner according to the embodiment of the present application. Figure 3 As shown, the method includes the following steps:
[0043] Step S201, acquiring a target image, and determining pixel data of the outer diameter contour of the bell mouth and pixel data of the side plate based on the target image, wherein the target image is an image of the bell mouth of the copper pipe captured under predetermined conditions, wherein the predetermined conditions include that a lens of an image capture device faces the bell mouth, and a distance between the image capture device and the bell mouth or the side plate meets a predetermined distance;
[0044] Specifically, the image acquisition device includes a camera and a light source, and the camera and the light source are both located on the side of the bell mouth away from the side plate, and the lens of the camera faces the bell mouth, and the light source emits light facing the bell mouth, that is, the target image is a top-view image of the copper tube obtained from the side of the copper tube away from the side plate. The distances from the camera and the light source to the bell mouth are fixed, or the distances from the camera and the light source to the side plate are fixed, that is, the image of the present application is acquired when the acquisition positions of the camera and the light source relative to the copper tube are fixed. The target image includes an image of the bell mouth and an image of the side plate, and the image of the bell mouth is located in the image of the side plate. The pixel data is data representing the size of pixel values.
[0045] Step S202: determining an evaluation parameter of the copper tube as a target parameter based on the pixel data of the outer diameter profile and the pixel data of the side plate, wherein the evaluation parameter represents a contrast difference between the outer diameter profile and the side plate;
[0046] Specifically, the outer diameter profile is the outer edge profile of the bell mouth. When the distance between the image acquisition device and the side plate meets the predetermined distance, any change in the B dimension (i.e., the distance of the outer edge of the bell mouth relative to the side plate) will cause the bell mouth to be closer or closer to the image acquisition device to change. Consequently, the pixel data of the outer diameter profile in the target image will also change. However, since the distance between the image acquisition device and the side plate is fixed, the pixel data of the side plate in the target image remains unchanged. Therefore, the contrast difference between the outer diameter profile and the side plate can be used to indicate whether the B dimension of the copper tube has changed. Similarly, when the distance between the image acquisition device and the bell mouth satisfies the predetermined distance, when the B dimension changes, the distance between the side plate and the image acquisition device will also change, so the pixel data of the side plate in the target image will also change. However, the distance between the bell mouth and the image acquisition device is fixed, so the pixel data of the outer diameter contour in the target image does not change. Therefore, the pixel data of the outer diameter contour in the target image remains unchanged. Therefore, the contrast difference between the outer diameter contour and the side plate can be used to characterize whether the B dimension of the copper tube has changed.
[0047] Step S203: Determine whether the B dimension of the copper tube is qualified based on the target parameter and the standard parameter range, where the standard parameter range is a range value of the evaluation parameter of the standard copper tube determined based on the image of the standard copper tube collected under the predetermined conditions. The B dimension of the standard copper tube is qualified, and the B dimension is the distance between the outer edge of the bell mouth and the side plate.
[0048] Specifically, if Figure 2 As shown, the B dimension is the vertical length from the outer edge of the bell mouth to the surface of the side plate in contact with the copper tube. The standard copper tube is a copper tube that meets the B dimension requirements. An image of the standard copper tube is acquired under the predetermined conditions, and the evaluation parameters of the standard copper tube are determined based on the image, thereby obtaining the standard parameter range. In other words, the image of the standard copper tube and the image of the copper tube to be tested are acquired under the same acquisition conditions.
[0049] According to the embodiment, first, an image of the bell mouth of the copper tube to be tested is acquired under predetermined conditions, and pixel data of the outer diameter profile of the bell mouth and pixel data of the side plate are determined based on the bell mouth image. The predetermined conditions include that a lens of an image acquisition device faces the bell mouth of the copper tube to be tested and a distance between the lens and the side plate meets a predetermined distance. Then, a target parameter is determined based on the pixel data of the outer diameter profile and the pixel data of the side plate. The target parameter represents a contrast difference between the outer diameter profile of the bell mouth of the copper tube to be tested and the side plate. Finally, based on the target parameter and a contrast difference range of a standard copper tube obtained from an image of the standard copper tube acquired under the predetermined conditions, whether the B dimension of the copper tube to be tested is qualified is determined, thereby realizing automatic B dimension detection based on image processing technology. Compared with the existing technology of manual detection of B size, which has the problems of inconsistent standards, large errors and low efficiency, the present application obtains a front image of the bell mouth, uses image processing technology to analyze the image, and obtains the contrast difference between the outer diameter contour of the bell mouth and the side plate of the copper tube to be tested. By determining whether the contrast difference is within the contrast difference range corresponding to the copper tube with qualified B size, it is determined whether the B size of the copper tube to be tested is qualified. The B size is characterized by the contrast difference between the outer diameter contour of the bell mouth and the side plate in the image, thereby realizing automatic detection of the B size of the copper tube, avoiding the problems of inconsistent standards, large errors and low efficiency caused by manual detection.
[0050] Furthermore, the solution of the present application can achieve full inspection of the copper tube B size, thereby avoiding the problem of missed inspections caused by manual spot checks, and can promptly detect abnormalities and reduce production losses. The use of a non-contact measurement method avoids the problem of long contact measurement time.
[0051] Specifically, acquiring a target image includes: capturing an image of the copper pipe under predetermined conditions to obtain an initial image; performing a first predetermined processing on the initial image to obtain an intermediate image, wherein the first predetermined processing includes at least one of the following: denoising; or image enhancement; and performing a second predetermined processing on the intermediate image to obtain the target image, wherein the second predetermined processing includes one of the following: binarization or grayscale processing. The denoising process can significantly reduce noise in the initial image, making the denoised image clearer and more realistic, thereby improving image quality and clarity; the image enhancement process can increase image contrast; and the binarization and grayscale processes facilitate subsequent accurate extraction of the outer diameter contour of the bell mouth and the side plate area from the image.
[0052] In an exemplary embodiment, after obtaining the initial image, denoising processing is first performed, and then image enhancement processing is performed to obtain the intermediate image; then, the intermediate image is binarized to obtain the target image.
[0053] In the present application, the camera in the image acquisition device is a linear array camera, and the light source is a tunnel light source. After the camera and the light source are fixed in position, a positioning position facing the camera lens and the light source is set, that is, when the copper tube reaches the positioning position, the image acquisition device captures the target image.
[0054] To further ensure a more accurate evaluation parameter for the copper tube under test, an optional solution determines the copper tube evaluation parameter as a target parameter based on the pixel data of the outer diameter profile and the pixel data of the side plate, including: calculating the absolute value of the difference between the pixel data of the side plate and the pixel data of the outer diameter profile; calculating the ratio of the absolute value of the difference to the pixel data of the outer diameter profile, or calculating the ratio of the absolute value of the difference to the pixel data of the side plate to obtain the target parameter. In this embodiment, by calculating the ratio of the absolute value of the difference between the two pixel data to one of the pixel data, the contrast difference between the outer diameter profile and the side plate is characterized, eliminating the impact of overall brightness variations between different images on the measurement results. This can significantly reduce interference from factors such as lighting conditions, camera angle, and camera parameters, achieves standardized processing of the pixel data, and ensures that the evaluation parameter is more accurate and reliable. Furthermore, compared to the complex image processing and 3D reconstruction algorithms required to measure the B dimension using a 3D camera, the method for determining the target parameter in this embodiment is simpler, reduces algorithm complexity, and improves algorithm robustness.
[0055] The method for calculating the evaluation parameters of the copper tube in this application is not limited to the method described above. In addition to the method described above, another optional solution is to determine the evaluation parameters of the copper tube as target parameters based on the pixel data of the outer diameter profile and the pixel data of the side plate, including: normalizing the pixel data of the outer diameter profile to obtain first normalized data; normalizing the pixel data of the side plate to obtain second normalized data; and performing a predetermined operation on the first normalized data and the second normalized data to obtain the target parameter. Normalizing the two pixel data first and then performing the operation on the normalized pixel data can eliminate scale differences between different images, thereby making the obtained evaluation parameters more accurate.
[0056] Specifically, the predetermined operation includes but is not limited to operations such as subtraction and division.
[0057] According to some further optional embodiments of the present application, the pixel data of the outer diameter contour of the bell mouth and the pixel data of the side panels are determined based on the target image, including: extracting the outer diameter contour from the target image; calculating the pixel average value of each pixel constituting the outer diameter contour to obtain the pixel data of the outer diameter contour; and determining the pixel average value of multiple pixel points corresponding to the side panels based on the target image to obtain the pixel data of the side panels. In this embodiment, the average value of the pixel values of each pixel point constituting the outer diameter contour in the target image is calculated to obtain the pixel data of the outer diameter contour, thereby ensuring that the pixel data of the outer diameter contour can more accurately represent the brightness of the outer edge of the bell mouth in the image, and the average value of the pixel values of multiple pixel points corresponding to the side panels in the target image is calculated to obtain the pixel data of the side panels, thereby ensuring that the pixel data of the side panels can more accurately represent the brightness of the side panels in the image, thereby providing more accurate data support for the subsequent determination of the contrast difference between the outer diameter contour and the side panels based on the pixel average value.
[0058] Specifically, the multiple pixel points corresponding to the side panel are multiple pixel points located in the image area of the side panel.
[0059] Further, according to the target image, determining the pixel average value of a plurality of pixel points corresponding to the side panel to obtain pixel data of the side panel includes one of the following:
[0060] Extracting a plurality of pixel value sets of the side panel area from the target image, and calculating an average value of the plurality of pixel value sets to obtain pixel data of the side panel;
[0061] Specifically, a plurality of the side panel regions may be randomly selected from the image region of the side panel, or a plurality of the side panel regions may be uniformly selected from the image region of the side panel at certain intervals.
[0062] The target image is input into a machine learning model to obtain pixel data of the side panel, wherein the machine learning model is trained through machine learning using multiple sets of data, and each set of the multiple sets of data includes: a historical target image, and a pixel average value of the side panel pixels corresponding to the historical target image.
[0063] Specifically, the edge panel pixels can be calculated by selecting the average pixel value of multiple regions from the historical target image, or by calculating the average pixel value of all pixels in the edge panel region. The machine learning model can be a regression model or a neural network model.
[0064] In the embodiment, by selecting multiple side panel areas from the image and calculating the average pixel value of the pixels in these side panel areas, the influence of brightness differences in different side panel areas on the detection results can be further eliminated; or by using a machine learning model to calculate the pixel data of the side panel, the influence of different image conditions on the detection results can be further eliminated.
[0065] In the actual application process, it is affected by the irregular side plate, uneven copper tube or oil stain on the side plate during the production process, such as Figure 4 As shown in FIG. 1 , a black shadow 12 exists on the outer edge of the bell mouth on the target image. Since the pixel average values of the black shadow and the outer diameter contour of the bell mouth are similar, the boundary between the two cannot be distinguished by the pixel value. Specifically, the preset outer diameter is the theoretical outer diameter value of the bell mouth. Figure 5 As shown, the target image is divided into several regions based on pixel values, including the inner circle area 13 of the bell mouth, the outer contour area 14, the black shadow area 15, and the side plate area 16. By statistically analyzing a large number of copper tube images, the distribution of pixel values in each region can be obtained: the pixel value range of the inner circle area of the bell mouth is 10-20, the pixel value range of the outer contour area of the bell mouth is 50-150, the pixel value range of the black shadow area is 50-180, and the pixel value range of the side plate area is 240-255. Based on the distribution of pixel values in each region, it can be seen that the average pixel values of the outer contour area of the bell mouth and the black shadow area are similar, so it is impossible to distinguish and determine the boundary between the two regions based on pixel values.
[0066] Based on the above situation, in some exemplary schemes of the present application, the outer diameter contour is extracted from the target image, including: performing edge feature extraction on the target image to obtain the inner diameter contour and the initial outer diameter contour of the bell mouth; performing circular / quasi-circular detection on the initial outer diameter contour to determine whether the initial outer diameter contour is circular / quasi-circular; if the initial outer diameter contour is circular / quasi-circular, determining the initial outer diameter contour as the outer diameter contour; if the initial outer diameter contour is not circular / quasi-circular, determining the outer diameter contour based on the inner diameter contour and the preset outer diameter of the bell mouth. In this embodiment, circular detection is used to determine whether the obtained initial outer diameter contour contains a black shadow. If the initial outer diameter contour is circular / quasi-circular, it indicates that there is no influence of black shadows. If the initial outer diameter contour is neither circular nor quasi-circular, the outer diameter contour of the bell mouth is determined based on the inner diameter contour and the preset outer diameter of the bell mouth, which can avoid the problem of inaccurate outer diameter contour obtained due to the influence of black shadows.
[0067] Furthermore, the outer diameter contour is determined based on the inner diameter contour and the preset outer diameter of the bell mouth, including: determining the center position of the bell mouth based on the inner diameter contour, which center position is the center position of the inner diameter contour and also the center position of the outer diameter contour; determining the outer diameter theoretical contour of the bell mouth based on the center position and the preset outer diameter; when the proportion of the side plate area in the area of the target image surrounded by the outer diameter theoretical contour does not meet the threshold requirement, keeping the center position unchanged, increasing and / or decreasing the radius of the outer diameter theoretical contour by a predetermined step size until the proportion corresponding to the adjusted outer diameter theoretical contour meets the threshold requirement, thereby obtaining the adjusted contour; and determining the adjusted contour as the outer diameter contour. In the embodiment, the theoretical outer diameter contour of the bell mouth is first determined based on the center position of the circle and the preset outer diameter, and then the radius of the theoretical outer diameter contour is reduced or expanded with a predetermined step size, so that the theoretical outer diameter contour shrinks inward or expands outward, until the pixel ratio of the side plate area in the adjusted theoretical outer diameter contour meets the threshold requirement, and it is considered that the adjusted theoretical outer diameter contour coincides with the actual outer diameter contour.
[0068] The ratio is the ratio of the pixels belonging to the side plate area in the theoretical outer diameter contour to the pixels of the entire theoretical outer diameter contour, that is, the pixel ratio of the side plate area in the theoretical outer diameter contour.
[0069] Those skilled in the art can select any appropriate method to determine the center position of the bell mouth according to the inner diameter profile. In this embodiment, the center position is obtained by performing circle fitting using the least squares method.
[0070] In an optional embodiment, increasing and / or decreasing the radius of the theoretical outer diameter profile by a predetermined step size to obtain an adjusted profile includes: when the ratio corresponding to the theoretical outer diameter profile is greater than a first threshold, starting from the preset outer diameter, successively decreasing the preset outer diameter by one predetermined step size until the ratio corresponding to the adjusted theoretical outer diameter profile is less than or equal to the first threshold, thereby obtaining the adjusted profile; and when the ratio corresponding to the theoretical outer diameter profile is less than a second threshold, successively increasing the preset outer diameter by one predetermined step size, starting from the preset outer diameter, until the ratio corresponding to the adjusted theoretical outer diameter profile is greater than or equal to the second threshold, thereby obtaining the adjusted profile, wherein both the first and second thresholds are greater than 0. Considering that the edge of a real bell mouth has a certain width and may have curvature and fluctuations, i.e., it is not a perfect standard circle, if 0 is selected as the first and / or second thresholds, i.e., the ratio corresponding to the adjusted theoretical outer diameter profile is 0, the resulting outer diameter profile will be slightly smaller than the actual outer diameter profile, and some bell mouth edge pixels will be missing. Therefore, in this embodiment, both the first and second thresholds are set to be greater than 0.
[0071] It should be noted that the relationship between the first threshold and the second threshold is not limited, that is, the first threshold can be greater than the second threshold, or the first threshold can be less than the second threshold. Those skilled in the art can flexibly set the specific value according to actual conditions.
[0072] like Figure 6 As shown, the inner diameter of the bell mouth is O1, the outer diameter is O2, the initial outer diameter is L, and the theoretical outer diameter is O3. If O3's initial position is partially inside L, partially outside L, or entirely outside L, it indicates that the actual outer diameter of the bell mouth is too small, and the search should be conducted inward. If O3's initial position is entirely inside L, it indicates that the actual outer diameter of the bell mouth is too large, and the search should be conducted outward. This is done until O3 is determined to be as close to overlapping as possible with O2.
[0073] When the actual outer diameter contour O2 is too small, that is, O3>O2, the pixel ratio of the side plate area in the area surrounded by the adjusted outer diameter theoretical contour O3 will gradually decrease. When the position of the adjusted outer diameter theoretical contour O3 is infinitely close to the actual outer diameter contour O2, or the position of the adjusted outer diameter theoretical contour O3 enters the actual outer diameter contour O2, the pixel ratio of the side plate area is infinitely close to 0. For example, Figure 6As shown in the figure, when searching inward at a fixed step size, the pixel ratio of the inner edge region of O3 changes in the array [0.3, 0.2, 0.16, 0.13, 0.09, 0.04, 0.02, 0.01, 0.015, 0.01, 0, 0, 0, 0, ...]. The search ends when N (pre-set) ratios are 0. The reason for the values in the array to decrease and then slightly increase is that the edge of the actual bell mouth has a certain width and some curvature and fluctuations, that is, it is not a perfect circle. Based on the changing trend of 0.02, 0.01, 0.015, and 0.01 in the array, the search is close to the outer edge of the actual bell mouth. Therefore, when searching at a fixed step size, the pixel ratio of the inner edge region of O3 tends to be stable, with no obvious downward trend. At this time, the positions of O3 corresponding to the ratios of 0.02, 0.01, 0.015, and 0.01 (a certain threshold is set in this application and can be determined according to actual conditions) can be recorded. The logic for selecting the position of O3 can be that, for the sake of conservatism, if the position of O3 corresponding to the ratio of 0 is selected, it may be smaller than the actual outer diameter contour and lose too much of the bell mouth edge. Therefore, the position of O3 corresponding to the mth value before the value of 0 (for example, the second) is selected, that is, the position of O3 corresponding to 0.015 in this example is selected as the actual bell mouth outer diameter contour O2.
[0074] However, when the actual bell mouth outer diameter profile O2 is too large, searching outward from O3, initially there is no edge plate area in the area surrounded by O3, that is, the ratio is 0. When the position of O3 is infinitely close to that of O2 or the position of O3 exceeds O2, the ratio will suddenly increase, and there is a clear increasing trend. For example, the array showing the changing ratio of pixels in the side panel area is [0, 0, 0, 0, 0, 0.01, 0.015, 0.02, 0.018, 0.03, 0.08, 0.1, 0.12, 0.2, 0.35, 0.55, 0.8, 0.97, 0.99, 0.99]. The reason for this change in the values in the array is that, as described above, the actual characteristics of the bell mouth edge indicate that when searching outward from O3, there are initially no side panel pixels. Then a small number of side panel pixels appear, indicating that O3 is close to the true bell mouth edge. The ratio of side panel pixels steadily increases, indicating that O3 has exceeded O3. Finally, as the radius of O3 increases infinitely, the ratio of side panel background pixels also approaches 1. When N (pre-set) consecutive ratio values exceed 0.1, it is determined that O3 has completely exceeded the true bell mouth edge, and the search can be stopped. According to the changing trends of 0.01, 0.015, 0.02, 0.018, 0.03, and 0.08 in the array (a certain threshold is set in this example, which can be determined according to actual conditions), the search is now close to the true bell mouth edge. Also for the sake of conservatism, the position O3 corresponding to the nth ratio (for example, the third) value when the ratio starts to increase is selected. Therefore, the position O3 corresponding to 0.02 is selected as the true bell mouth outer diameter profile O2.
[0075] Optionally, determining whether the B dimension of the copper tube is qualified based on the target parameter and the standard parameter range includes: if the target parameter is within the standard parameter range, determining that the B dimension of the copper tube corresponding to the target parameter is qualified, and if the target parameter is not within the standard parameter range, determining that the B dimension of the copper tube corresponding to the target parameter is unqualified. In addition, Figure 4 and Figure 7 As shown, the air conditioner comprises a plurality of copper tubes, the plurality of copper tubes passing through the side plate, and one end of each of the copper tubes is a bell mouth. The target image comprises images of the plurality of bell mouths. The method further comprises: determining that the B dimensions of the air conditioner are qualified if all of the copper tubes have qualified B dimensions; and determining that the B dimensions of the air conditioner are unqualified if at least one of the copper tubes is unqualified. The air conditioner comprises an evaporator and a condenser of the air conditioner. This embodiment captures an image of the bell mouth from the front of the image acquisition device, thereby eliminating obstructions between the copper tubes and ensuring that each copper tube can be accurately measured, thereby achieving B dimension compliance testing for each copper tube in the air conditioner.
[0076] The embodiments of the present application provide a low-cost, automated, time-saving, and comprehensive method for determining the B-size eligibility of the copper tubes of two air conditioners. A visual solution is used for B-size eligibility detection, which solves the problems of time-consuming sensor contact measurement, unsuitability for high-speed assembly lines, and two-device scenarios with a large number of copper tubes. A linear array camera is used for image acquisition to capture the image of the bell mouth from the front, solving the problem of multiple cameras being required when shooting from the side with an area array camera, and the problem of mutual occlusion between copper tubes. In addition, linear array cameras are less expensive than existing 3D cameras, and are not affected by the scanning range, resulting in data loss and noise problems, which cause unstable image acquisition effects. A 2D algorithm can be used to complete image processing, reducing algorithm complexity and improving algorithm robustness.
[0077] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the method for detecting the size of the copper tube B of the two air conditioners of the present application will be described in detail below with reference to specific embodiments.
[0078] This embodiment relates to a specific method for detecting the size of the copper tube B of the air conditioner. Figure 8 、 Figure 9 and Figure 10 As shown, the method includes the following steps:
[0079] Step S1: Obtain the bell mouth side image and pre-process it:
[0080] The hardware image acquisition device, which is composed of a linear array camera, a tunnel light source and a servo motor linear module, controls the capture of the bell-mouth side of the two devices after the materials of the two devices are in place and reach the side plate positioning. The image content includes the bell-mouth and side plates of the copper tubes of the two devices. Figure 7 As shown in the figure, image preprocessing is performed using filtering, denoising, and contrast enhancement. If the size of copper tube B changes, that is, the height of the outer edge of the bell mouth changes, the distance from the light source will change, and therefore the pixel value of the outer edge of the bell mouth will also change. The side plates of the two devices are galvanized sheet metal with reflective properties. Since their distance from the light source is fixed, the average pixel value of the side plate area in the image remains unchanged. Therefore, based on the relationship between the average pixel value of the outer edge contour points of the bell mouth and the average pixel value of the side plates, it is possible to determine whether the size of copper tube B has changed, that is, whether the size of B is qualified.
[0081] Step S2: Establish the B dimension qualification criteria:
[0082] First, randomly select a standard copper tube with qualified B size from either device and measure the relationship between the average pixel value of the outer edge contour points of its bell mouth and the average pixel value of the side plate. The specific steps are as follows:
[0083] Step S21: measuring the average pixel value of the outer edge contour points of the bell mouth of the qualified copper tube;
[0084] like Figure 2 As shown, since the outer edge contour of the bell mouth and the side plate features are obviously different, the set of pixel values of its outer edge contour points [Xa1, Xa2, Xa3, ..., Xaj] can be obtained through binarization, edge extraction and other methods, and the average pixel value of the outer edge contour points of the bell mouth is calculated to be Xa = 1 / j (Xa1 + Xa2 + Xa3 + ... + Xaj).
[0085] Step S22: Measure the average pixel value of the edge panel as Xb:
[0086] Take m areas at random on the side panel, each area is n pixels, and calculate the average pixel value of the side panel Xb = 1 / (m*n)*[(X11+X12+…+X1n)+(X21+X22+…+X2n)+…+(Xm1+Xm2+…+Xmn)] based on the m areas.
[0087] Step S23: determining a range of a relationship between the average pixel value of the outer edge contour points of the bell mouth and the average pixel value of the side plate of the copper tube with qualified B dimension.
[0088] Calculate the relationship between the average pixel value Xa of the outer edge of the copper tube's bell mouth and the average pixel value Xb of the side panels. Normalize the measurement results to eliminate the effects of other factors, such as lighting, camera angle, and camera parameters. The relationship between Xa and Xb is (Xb-Xa) / Xb. Assume that the average pixel value (Xb) of the side panels represents the background or reference brightness level in the image. Subtract the average pixel value (Xa) of the outer edge of the copper tube's bell mouth from the average pixel value of the side panels to obtain a value reflecting the contrast difference between the copper tube and the background. This difference is then divided by the average pixel value (Xb) of the side panels to eliminate the influence of overall brightness variations between different images. This method, by calculating relative differences, can significantly reduce the impact of varying lighting conditions on the measurement results. The calculation process is relatively simple and does not require complex models or algorithms. The results are presented as relative differences, making them easy to understand and interpret. If the relationship between the average pixel value Xa of the outer edge of the copper tube's bell mouth and the average pixel value Xb of the side panels satisfies A≤(Xb-Xa) / Xb≤B, the copper tube is considered to meet the B dimension requirement. The specific values of A and B are affected by various factors, including the copper tube material, surface treatment, camera resolution, and lighting conditions. These values must be determined based on actual conditions, requiring measurement and analysis of a large number of samples to identify thresholds that accurately reflect the acceptable dimensions of copper tube B. In this embodiment, A is set to (Xb - Xa) / Xb*0.8, and B is set to (Xb - Xa) / Xb*1.2.
[0089] Step S3: Determine the size eligibility of the copper tube B to be tested:
[0090] Measure the relationship between the average pixel value of the outer edge contour points of the bell mouth and the average pixel value Xb of the side plate of each copper tube to be tested on the two devices. Where Xb is consistent with the value in step S22, it is necessary to measure the average pixel value of each outer edge contour point of the bell mouth.
[0091] Due to the irregularity of the evaporator side plate, uneven fins, or oil stains on the side plate during production, there are black shadows on the outer edges of some bell mouths in the image, such as Figure 4 As shown in , the image is divided into several areas, including the inner circle area of the bell mouth, the outer contour area of the bell mouth, the black shadow area and the side plate area, etc. There are differences in the pixel values in each area. Figure 5 As shown in the figure, a large number of bell-mouth images are statistically analyzed to obtain the distribution of pixel values in each region: the pixel value range of the bell-mouth inner circle is 10-20, the pixel value range of the bell-mouth outer contour is 50-150, the pixel value range of the black shadow region is 50-180, and the pixel value range of the side plate region is 240-255. Based on the distribution of pixel values in each region, it can be seen that the average pixel values of the bell-mouth outer contour region and the black shadow region are similar, and it is impossible to distinguish and determine the boundary between the two regions by pixel values.
[0092] Therefore, the actual outline of the outer edge of the bell mouth (denoted as O2) cannot be extracted by conventional image processing methods. Assume that the outline that can be extracted is denoted as L, such as Figure 6 As shown in the figure, based on a large amount of image data, it is known that the outer edge of the bell mouth will not be completely shadowed, that is, the part in L is the actual outline of the outer edge of the bell mouth.
[0093] Therefore, for a bell mouth with a black shadow on its outer edge, this embodiment considers calculating the theoretical position O3 of the bell mouth outer edge contour by using the standard values of the bell mouth inner circle and the bell mouth outer diameter, and then calculating the actual contour of the bell mouth outer edge based on the characteristics of the contour L. Here, one of the bell mouths is used as an example. Figure 6 As shown:
[0094] Step S31: Determine the inner diameter profile O1 and the center coordinates of the bell mouth:
[0095] Since the copper tube wall is vertical and cannot reflect light, the inner diameter feature appears black on the image, which is significantly different from the bell mouth and side plate features. The inner diameter contour can be obtained through binarization and edge extraction methods, and the circle center position coordinates can be obtained through least squares method for circle fitting.
[0096] Step S32: Search for the true contour position of the bell mouth and calculate the average pixel value of the contour points:
[0097] Based on the standard values of the inner and outer diameters of the bell mouth in step S31, the theoretical position O3 of the bell mouth's outer edge is calculated. Depending on the position of O3, the search radius is narrowed or expanded inward or outward with a specific step size until the position of O3 is as close to overlapping as possible with the position of O2. The pixel value of each point on the contour O3 at this point is used as the pixel value of each point on the actual contour O2, and the average pixel value of the contour O2 is calculated, that is, XO2 = XO3.
[0098] Step S321: Determine the search direction based on the positional relationship between the outer edge contour theoretical position O3 and the actual contour L:
[0099] The following describes the search method based on the position of O3. Based on the characteristics of the copper tube bell mouth in the image, if O3 is initially partially inside L, partially outside L, or entirely outside L, it indicates that the actual bell mouth outer diameter is too small, and the search should be directed inward. If O3 is initially entirely inside L, it indicates that the actual bell mouth outer diameter is too large, and the search should be directed outward. This is done until O3 is determined to be as close to overlapping as possible with O2.
[0100] Step S322: Determine whether O3 and O2 overlap based on the pixel ratio of the side panel background area in the area surrounded by O3:
[0101] The method for determining whether O3 and O2 are nearly aligned is described below. This determination is based on the ratio of the side panel background area within the area enclosed by O3. Observing the characteristics of the extracted actual contour L and the inferred theoretical contour O3, it can be seen that when the actual horn diameter is relatively small, the ratio of the side panel background area within the area enclosed by O3 gradually decreases as the search moves inward from O3. When O3 and O2 are nearly aligned, or when O3 enters O2, the ratio of the side panel background area approaches zero.
[0102] For example, when O3 searches inward at a fixed step size, the array of pixel ratios in the side panel background area changes to [0.3, 0.2, 0.16, 0.13, 0.09, 0.04, 0.02, 0.01, 0.015, 0.01, 0, 0, 0, 0, ...]. The search ends when N (self-defined) ratios are 0. The reason for the values decreasing and then slightly increasing in the data set is that the edge of the actual bell mouth has a certain width and some curvature and fluctuations, that is, it is not a perfect circle. Based on the trend of 0.02, 0.01, 0.015, and 0.01 in the array, the search is close to the actual bell mouth edge. Therefore, when searching at a fixed step size, the value of the pixel ratio of the side panel background area tends to be stable, with no obvious downward trend. At this time, the positions of O3 corresponding to the ratios of 0.02, 0.01, 0.015, and 0.01 (a certain threshold is set in this example and can be determined according to actual conditions) can be recorded. The logic for selecting the position of O3 can be that, for the sake of conservatism, if the position of O3 corresponding to a ratio of 0 is selected, it may be smaller than the actual contour and lose too much of the bell-mouth edge. Therefore, the position of O3 corresponding to the second value before the ratio of 0 is selected, that is, the position of O3 corresponding to 0.015 in this example is selected as the actual bell-mouth edge.
[0103] When the actual outer diameter of the horn is too large, when searching outward from O3, there is no border board background area in the area initially surrounded by O3, that is, the ratio is 0. When the position of O3 is infinitely close to and coincides with the position of O2 or the position of O3 exceeds O2, the ratio will suddenly increase, and there is a clear increasing trend. For example, the array showing the changing ratio of sideboard pixels to background pixels is [0, 0, 0, 0, 0.01, 0.015, 0.02, 0.018, 0.03, 0.08, 0.1, 0.12, 0.2, 0.35, 0.55, 0.8, 0.97, 0.99, 0.99]. The reason for this numerical variation is that, as described above, the actual characteristics of the bell-mouth edge indicate that when searching outward from O3, there are initially no sideboard pixels. Then a small number of sideboard pixels appear, indicating that O3 is close to the true bell-mouth edge. The ratio of sideboard pixels steadily increases, indicating that O3 has exceeded O2. Finally, as O3's radius increases infinitely, the ratio of sideboard pixels to background pixels approaches 1. When N consecutive (self-defined) ratio values exceed 0.1, it is determined that O3 has completely exceeded the true bell-mouth edge, and the search can be stopped. According to the changing trends of 0.01, 0.015, 0.02, 0.018, 0.03, and 0.08 in the array (a certain threshold is set in this example, which can be determined according to actual conditions), the search is now close to the true bell-mouth edge. Also, for the sake of conservatism, the O3 position corresponding to the third proportional value when the proportion begins to increase is selected. In this example, 0.01 is a numerical increase, so the O3 position corresponding to 0.02 is selected as the true bell-mouth edge.
[0104] Therefore, it is possible to determine when the positions of O3 and O2 coincide based on the pixel ratio of the side panel background area in the area surrounded by O3.
[0105] Step S323: When the positions of O3 and O2 coincide, the pixel value of each point on the contour O3 at this time is used as the pixel value of each point on the actual contour O2, and the average pixel value of the contour O2 is calculated:
[0106] When the positions of O3 and O2 coincide, obtain the set of pixel values of each point on O3 at this time [XO31, XO32, XO33, ..., XO3j], and calculate the average value of the contour point pixels as XO = 1 / j (XO31+XO32+XO33+...+XO3j).
[0107] Step S33: Calculate the relationship between the average pixel value XO3 of the outer edge contour points of the copper tube's bell mouth and the average pixel value Xb of the side panels to determine the conformity of dimension B. Normalization is performed to minimize the influence of other factors, such as lighting. The resulting relationship is (Xb - XO3) / Xb. A determination is then made as to whether the relationship A ≤ (Xb - XO3) / Xb ≤ B is satisfied. If so, dimension B of the copper tube is considered conforming.
[0108] Step S4: Calculate and determine the B dimensions of all copper tubes to be tested according to step S3. If all copper tubes have B dimensions that are qualified, the B dimensions of the two devices are determined to be qualified. If one copper tube has B dimensions that are unqualified, the B dimensions of the two devices are determined to be unqualified.
[0109] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0110] The embodiment of the present application also provides a device for detecting the size of the copper tube B of the air conditioner. It should be noted that the device for detecting the size of the copper tube B of the air conditioner in the embodiment of the present application can be used to execute the detection method for the size of the copper tube B of the air conditioner provided in the embodiment of the present application. The device is used to implement the embodiments and preferred implementations, and the details that have been explained will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and conceived.
[0111] The following introduces the detection device for the size of the copper tube B of the air conditioner provided in the embodiment of the present application.
[0112] Figure 2The cross-sectional structure and top view of a copper tube are shown as an example. Figure 2 As shown, the copper tube passes through the side plate 11 , and one end of the copper tube is a bell mouth 10 , and the top view outline of the bell mouth 10 is located in the side plate 11 . Figure 11 Schematic diagram of a device for detecting the size of copper tube B of an air conditioner according to an embodiment of the present application. Figure 11 As shown, the device includes:
[0113] an acquisition unit 20 configured to acquire a target image and determine pixel data of the outer diameter profile of the bell mouth and pixel data of the side plate based on the target image, wherein the target image is an image of the bell mouth of the copper pipe acquired under predetermined conditions, wherein the predetermined conditions include a lens of an image acquisition device facing the bell mouth and a distance between the image acquisition device and the bell mouth or the side plate meeting a predetermined distance;
[0114] Specifically, the image acquisition device includes a camera and a light source, and the camera and the light source are both located on the side of the bell mouth away from the side plate, and the lens of the camera faces the bell mouth, and the light source emits light facing the bell mouth, that is, the target image is a top-view image of the copper tube obtained from the side of the copper tube away from the side plate. The distances from the camera and the light source to the bell mouth are fixed, or the distances from the camera and the light source to the side plate are fixed, that is, the image of the present application is acquired when the acquisition positions of the camera and the light source relative to the copper tube are fixed. The target image includes an image of the bell mouth and an image of the side plate, and the image of the bell mouth is located in the image of the side plate. The pixel data is data representing the size of pixel values.
[0115] A first determining unit 21 is configured to determine, based on the pixel data of the outer diameter profile and the pixel data of the side plate, an evaluation parameter of the copper tube as a target parameter, wherein the evaluation parameter represents a contrast difference between the outer diameter profile and the side plate;
[0116] Specifically, the outer diameter profile is the outer edge profile of the bell mouth. When the distance between the image acquisition device and the side plate meets the predetermined distance, any change in the B dimension (i.e., the distance of the outer edge of the bell mouth relative to the side plate) will cause the bell mouth to be closer or closer to the image acquisition device to change. Consequently, the pixel data of the outer diameter profile in the target image will also change. However, since the distance between the image acquisition device and the side plate is fixed, the pixel data of the side plate in the target image remains unchanged. Therefore, the contrast difference between the outer diameter profile and the side plate can be used to indicate whether the B dimension of the copper tube has changed. Similarly, when the distance between the image acquisition device and the bell mouth satisfies the predetermined distance, when the B dimension changes, the distance between the side plate and the image acquisition device will also change, so the pixel data of the side plate in the target image will also change. However, the distance between the bell mouth and the image acquisition device is fixed, so the pixel data of the outer diameter contour in the target image does not change. Therefore, the pixel data of the outer diameter contour in the target image remains unchanged. Therefore, the contrast difference between the outer diameter contour and the side plate can be used to characterize whether the B dimension of the copper tube has changed.
[0117] The second determination unit 22 is configured to determine whether the B dimension of the copper tube is qualified based on the target parameter and a standard parameter range, where the standard parameter range is a range value of an evaluation parameter of the standard copper tube determined based on an image of the standard copper tube acquired under the predetermined conditions. If the B dimension of the standard copper tube is qualified, the B dimension is the distance between the outer edge of the bell mouth and the side plate.
[0118] Specifically, if Figure 2 As shown, the B dimension is the vertical length from the outer edge of the bell mouth to the surface of the side plate in contact with the copper tube. The standard copper tube is a copper tube that meets the B dimension requirements. An image of the standard copper tube is acquired under the predetermined conditions, and the evaluation parameters of the standard copper tube are determined based on the image, thereby obtaining the standard parameter range. In other words, the image of the standard copper tube and the image of the copper tube to be tested are acquired under the same acquisition conditions.
[0119] According to the embodiment, an acquisition unit acquires an image of the bell mouth of the copper tube to be tested under predetermined conditions, and pixel data of the outer diameter profile of the bell mouth and pixel data of the side plate are determined based on the bell mouth image. The predetermined conditions include that a lens of an image acquisition device faces the bell mouth of the copper tube to be tested and a distance between the two meets a predetermined distance. A first determination unit determines a target parameter based on the pixel data of the outer diameter profile and the pixel data of the side plate, and the target parameter characterizes the contrast difference between the outer diameter profile of the bell mouth of the copper tube to be tested and the side plate. A second determination unit determines whether the B dimension of the copper tube to be tested is qualified based on the target parameter and a contrast difference range of the standard copper tube obtained from an image of the standard copper tube acquired under the predetermined conditions, thereby realizing automatic detection of the B dimension based on image processing technology. Compared with the existing technology of manual detection of B size, which has the problems of inconsistent standards, large errors and low efficiency, the present application obtains a front image of the bell mouth, uses image processing technology to analyze the image, and obtains the contrast difference between the outer diameter contour of the bell mouth and the side plate of the copper tube to be tested. By determining whether the contrast difference is within the contrast difference range corresponding to the copper tube with qualified B size, it is determined whether the B size of the copper tube to be tested is qualified. The B size is characterized by the contrast difference between the outer diameter contour of the bell mouth and the side plate in the image, thereby realizing automatic detection of the B size of the copper tube, avoiding the problems of inconsistent standards, large errors and low efficiency caused by manual detection.
[0120] Furthermore, the solution of the present application can achieve full inspection of the copper tube B size, thereby avoiding the problem of missed inspections caused by manual spot checks, and can promptly detect abnormalities and reduce production losses. The use of a non-contact measurement method avoids the problem of long contact measurement time.
[0121] The device for detecting the size of copper tube B of an air conditioner includes a processor and a memory. The acquisition unit, the first determination unit, and the second determination unit are all stored as program units in the memory. The processor executes the program units stored in the memory to implement corresponding functions. The modules are all located in the same processor; alternatively, the modules can be located in different processors in any combination.
[0122] The processor includes a core that retrieves corresponding program units from memory. One or more cores can be provided, and by adjusting the core parameters, the problem of low efficiency and large error in manual detection of the B dimension of copper tubes in the prior art can be at least solved.
[0123] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0124] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program. When the program is run, the device where the computer-readable storage medium is located is controlled to execute a method for detecting the size of the copper tube B of the air conditioner.
[0125] An embodiment of the present invention provides a processor, which is used to run a program, wherein the program executes a method for detecting the size of the copper tube B of the air conditioner when running.
[0126] An embodiment of the present invention provides a device, comprising a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, at least the following steps are performed:
[0127] Step S201, acquiring a target image, and determining pixel data of the outer diameter contour of the bell mouth and pixel data of the side plate based on the target image, wherein the target image is an image of the bell mouth of the copper pipe captured under predetermined conditions, wherein the predetermined conditions include that a lens of an image capture device faces the bell mouth, and a distance between the image capture device and the bell mouth or the side plate meets a predetermined distance;
[0128] Step S202: determining an evaluation parameter of the copper tube as a target parameter based on the pixel data of the outer diameter profile and the pixel data of the side plate, wherein the evaluation parameter represents a contrast difference between the outer diameter profile and the side plate;
[0129] Step S203: Determine whether the B dimension of the copper tube is qualified based on the target parameter and the standard parameter range, where the standard parameter range is a range value of the evaluation parameter of the standard copper tube determined based on the image of the standard copper tube collected under the predetermined conditions. The B dimension of the standard copper tube is qualified, and the B dimension is the distance between the outer edge of the bell mouth and the side plate.
[0130] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0131] The present application also provides a computer program product, comprising computer instructions, which, when executed by a processor, implement at least the following method steps:
[0132] Step S201, acquiring a target image, and determining pixel data of the outer diameter contour of the bell mouth and pixel data of the side plate based on the target image, wherein the target image is an image of the bell mouth of the copper pipe captured under predetermined conditions, wherein the predetermined conditions include that a lens of an image capture device faces the bell mouth, and a distance between the image capture device and the bell mouth or the side plate meets a predetermined distance;
[0133] Step S202: determining an evaluation parameter of the copper tube as a target parameter based on the pixel data of the outer diameter profile and the pixel data of the side plate, wherein the evaluation parameter represents a contrast difference between the outer diameter profile and the side plate;
[0134] Step S203: Determine whether the B dimension of the copper tube is qualified based on the target parameter and the standard parameter range, where the standard parameter range is a range value of the evaluation parameter of the standard copper tube determined based on the image of the standard copper tube collected under the predetermined conditions. The B dimension of the standard copper tube is qualified, and the B dimension is the distance between the outer edge of the bell mouth and the side plate.
[0135] An embodiment of the present application further provides an air conditioning system, comprising:
[0136] The air conditioner comprises a side plate and a plurality of copper tubes, wherein the plurality of copper tubes pass through the side plate and one end of each copper tube is the bell mouth;
[0137] The detection device for the air conditioner includes one or more processors, a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include methods for executing any one of the methods described.
[0138] Obviously, those skilled in the art will appreciate that the various modules or steps of the present invention described above can be implemented using a general-purpose computing device, can be centralized on a single computing device, or can be distributed across a network of multiple computing devices. They can be implemented using program code executable by the computing device, and thus, can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described herein can be performed in a different order than that shown, or can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0139] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0140] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0141] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0142] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0143] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0144] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0145] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0146] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0147] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.
Claims
1. A method for detecting the size of a copper tube B of an air conditioner, wherein the copper tube passes through a side plate and one end of the copper tube is a bell mouth, characterized in that: The method comprises: Acquire a target image, and determine pixel data of the outer diameter contour of the bell mouth and pixel data of the side plate according to the target image, wherein the target image is an image of the bell mouth of the copper tube acquired under predetermined conditions, and the predetermined conditions include that a lens of an image acquisition device faces the bell mouth, and a distance between the image acquisition device and the bell mouth or the side plate satisfies a predetermined distance; Determining, according to the pixel data of the outer diameter profile and the pixel data of the side plate, an evaluation parameter of the copper tube as a target parameter, wherein the evaluation parameter represents a contrast difference between the outer diameter profile and the side plate; Whether the B dimension of the copper tube is qualified is determined according to the target parameter and the standard parameter range, the standard parameter range is the range value of the evaluation parameter of the standard copper tube determined according to the image of the standard copper tube collected under the predetermined conditions, the B dimension of the standard copper tube is qualified, and the B dimension is the distance between the outer edge of the bell mouth and the side plate.
2. The method according to claim 1, characterized in that Determining the evaluation parameter of the copper tube as a target parameter according to the pixel data of the outer diameter profile and the pixel data of the side plate includes: Calculating the absolute value of the difference between the pixel data of the side plate and the pixel data of the outer diameter profile; The target parameter is obtained by calculating the ratio of the absolute value of the difference to the pixel data of the outer diameter contour, or calculating the ratio of the absolute value of the difference to the pixel data of the side plate.
3. The method according to claim 1, characterized in that: Determining the evaluation parameter of the copper tube as a target parameter according to the pixel data of the outer diameter profile and the pixel data of the side plate includes: Standardizing the pixel data of the outer diameter profile to obtain first standardized data; Standardizing the pixel data of the edge plate to obtain second standardized data; A predetermined operation is performed on the first standardized data and the second standardized data to obtain the target parameter.
4. The method according to any one of claims 1 to 3, characterized in that Determining pixel data of the outer diameter contour of the bell mouth and pixel data of the side plate according to the target image includes: Extracting the outer diameter profile from the target image; Calculating the pixel average value of each pixel point constituting the outer diameter contour to obtain pixel data of the outer diameter contour; According to the target image, a pixel average value of a plurality of pixel points corresponding to the side panel is determined to obtain pixel data of the side panel.
5. The method according to claim 4, characterized in that Determining, according to the target image, a pixel average value of a plurality of pixel points corresponding to the side panel to obtain pixel data of the side panel includes one of the following: Extracting a plurality of pixel value sets of the side panel area from the target image, and calculating an average value of the plurality of pixel value sets to obtain pixel data of the side panel; The target image is input into a machine learning model to obtain pixel data of the side panel, wherein the machine learning model is trained through machine learning using multiple sets of data, and each set of the multiple sets of data includes: a historical target image, and a pixel average value of side panel pixels corresponding to the historical target image.
6. The method according to claim 4, characterized in that Extracting the outer diameter profile from the target image includes: Extracting edge features of the target image to obtain an inner diameter profile and an initial outer diameter profile of the bell mouth; Performing a circular detection on the initial outer diameter profile to determine whether the initial outer diameter profile is a circle; In the case where the initial outer diameter profile is circular, determining the initial outer diameter profile to be the outer diameter profile; In the case where the initial outer diameter profile is not circular, the outer diameter profile is determined according to the inner diameter profile and a preset outer diameter of the bell mouth.
7. The method according to claim 6, characterized in that Determining the outer diameter profile according to the inner diameter profile and the preset outer diameter of the bell mouth includes: Determining the center position of the bell mouth according to the inner diameter profile; Determining a theoretical outer diameter profile of the bell mouth according to the center position of the circle and the preset outer diameter; In the case that the proportion of the side plate area in the area of the target image surrounded by the outer diameter theoretical contour does not meet the threshold requirement, the center position of the circle is kept unchanged, and the radius of the outer diameter theoretical contour is increased and / or decreased by a predetermined step length until the proportion corresponding to the adjusted outer diameter theoretical contour meets the threshold requirement, thereby obtaining the adjusted contour; The adjusted profile is determined to be the outer diameter profile.
8. The method according to claim 7, characterized in that Increasing and / or decreasing the radius of the outer diameter theoretical profile in a predetermined step length to obtain an adjusted profile, comprising: When the ratio corresponding to the outer diameter theoretical profile is greater than a first threshold, starting from the preset outer diameter, the preset outer diameter is successively reduced by a predetermined step length until the ratio corresponding to the adjusted outer diameter theoretical profile is less than or equal to the first threshold, thereby obtaining the adjusted profile; When the ratio corresponding to the theoretical outer diameter profile is less than a second threshold, starting from the preset outer diameter, the preset outer diameter is successively increased by one of the predetermined step sizes until the ratio corresponding to the adjusted theoretical outer diameter profile is greater than or equal to the second threshold, thereby obtaining the adjusted profile, wherein the first threshold and the second threshold are both greater than 0.
9. The method according to any one of claims 1 to 3, characterized in that Get the target image, including: Acquire the image of the copper tube under the predetermined conditions to obtain an initial image; Performing a first predetermined processing on the initial image to obtain an intermediate image, wherein the first predetermined processing includes at least one of the following: denoising processing; image enhancement processing; The intermediate image is subjected to a second predetermined processing to obtain the target image, wherein the second predetermined processing includes one of the following: binarization processing and grayscale processing.
10. The method according to any one of claims 1 to 3, characterized in that Determine whether the B dimension of the copper tube is qualified according to the target parameter and the standard parameter range, including: When the target parameter is within the standard parameter range, it is determined that the B dimension of the copper tube corresponding to the target parameter is qualified. The air conditioner comprises a plurality of copper tubes, the plurality of copper tubes pass through the side plate and one end of each copper tube is a bell mouth, and the target image comprises images of the plurality of bell mouths. The method further includes: when the B dimensions of all the copper tubes are qualified, determining that the B dimensions of the two air conditioners are qualified.
11. A device for detecting the size of a copper tube B of an air conditioner, wherein the copper tube passes through a side plate and one end of the copper tube is a bell mouth, characterized in that: The device comprises: an acquisition unit, used for acquiring a target image, and determining pixel data of the outer diameter contour of the bell mouth and pixel data of the side plate according to the target image, wherein the target image is an image of the bell mouth of the copper tube acquired under predetermined conditions, wherein the predetermined conditions include that a lens of an image acquisition device faces the bell mouth, and a distance between the image acquisition device and the bell mouth or the side plate satisfies a predetermined distance; A first determination unit is used to determine an evaluation parameter of the copper tube as a target parameter according to the pixel data of the outer diameter profile and the pixel data of the side plate, wherein the evaluation parameter represents a contrast difference between the outer diameter profile and the side plate; The second determination unit is used to determine whether the B dimension of the copper tube is qualified according to the target parameter and the standard parameter range, wherein the standard parameter range is the range value of the evaluation parameter of the standard copper tube determined according to the image of the standard copper tube collected under the predetermined conditions, and the B dimension of the standard copper tube is qualified, and the B dimension is the distance between the outer edge of the bell mouth and the side plate.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 10.
13. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the method according to any one of claims 1 to 10 is implemented.
14. An air conditioning system, characterized in that: include: The air conditioner comprises a side plate and a plurality of copper tubes, wherein the plurality of copper tubes pass through the side plate and one end of each of the copper tubes is the bell mouth; The detection device for the air conditioner comprises one or more processors, a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include methods for executing any one of claims 1 to 10.
