Method and device for positioning an engine in a production line

By identifying the pallet type and adjusting the position of the mechanical device accordingly, the problem of high-precision and high-reliability positioning and detection in engine production was solved, avoiding damage to non-metallic pallets and achieving accurate visual inspection.

CN121475013BActive Publication Date: 2026-03-27WEICHAI POWER CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-09
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

During engine production, existing technologies struggle to achieve high-precision, high-reliability position detection, especially in the case of non-metallic pallets, which can easily lead to engine damage.

Method used

After the engine enters the preset area, the transmission is paused, the pallet type is identified, the offset is calculated for non-metallic pallets and the position of the mechanical device is corrected, while the position of the metal pallet is adjusted by the pallet straightening mechanism, and the vision component is used for precise positioning detection.

Benefits of technology

This technology achieves the goal of avoiding non-metallic pallet compression damage while ensuring real-time performance and accuracy, thus improving the accuracy and reliability of visual inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121475013B_ABST
    Figure CN121475013B_ABST
Patent Text Reader

Abstract

The present disclosure provides a positioning method and device for engines in a production line, and relates to the technical field of engine manufacturing. The method is applied to a positioning system, which comprises a visual component and a tray alignment mechanism. The method comprises: in response to an engine entering a preset detection area along a plate chain line, pausing the transmission of the plate chain line; determining the tray type of the tray on which the engine is located; if the tray type is a non-metal tray, determining the tray tilt angle and the offset, determining the position correction data of the mechanical device for visual detection of the engine according to the tray tilt angle and the offset; and for the image collected by a target visual component in the visual component, performing positioning detection on the preset components of the engine in the image. The present disclosure can correct the positional relationship between the mechanical device for subsequent visual detection and the engine, which is helpful to realize accurate visual detection and can avoid the risk of damage caused by extrusion of non-metal trays.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of engine manufacturing, and particularly relates to a positioning method and device for engines in a production line. BACKGROUND

[0002] In the field of modern intelligent manufacturing and automated assembly, as a core power component, the assembly integrity and precision of an engine in a production process are directly related to the performance and reliability of the whole machine. Before the engine is offline or during the assembly process, high-precision and high-robustness position detection becomes a key link of quality control. The positioning of the engine is of great significance to the next step of visual detection.

[0003] Therefore, there is an urgent need for a method to realize high-precision and high-reliability detection of the position of the engine while ensuring real-time, so as to meet the application requirements of harsh industrial sites. SUMMARY

[0004] In view of the above, the purpose of the present disclosure is to provide a positioning method and device for engines in a production line, which can solve the existing problems.

[0005] In order to achieve the above purpose, in a first aspect, the present disclosure provides a positioning method for engines in a production line, applied to a positioning system, the positioning system comprising a visual component and a tray alignment mechanism, the method comprising: in response to an engine entering a preset detection area along a plate chain line, pausing the transmission of the plate chain line; determining the tray type of a tray on which the engine is located; if the tray type is a non-metal tray, determining the offset amount of the tray, and determining the position correction data of a mechanical device for visual detection of the engine according to the offset amount; if the tray type is a metal tray, controlling the tray alignment mechanism to align the tray; for an image collected by a target visual component in the visual component, performing positioning detection on a preset component of the engine in the image, the target visual component being a visual component for image collection of the engine.

[0006] In a second aspect, a positioning device for an engine in a production line is provided, which is applied to a positioning system including a vision assembly and a tray alignment mechanism, and the device includes: a suspension unit configured to suspend transmission of a plate chain line in response to an engine entering a preset detection area along the plate chain line; a type determination unit configured to determine a tray type of a tray on which the engine is located; a correction unit configured to determine a position correction data of a mechanical device for vision detection of the engine according to an offset of the tray if the tray type is a non-metal tray; a control unit configured to control the tray alignment mechanism to align the tray if the tray type is a metal tray; and a detection unit configured to perform positioning detection on a preset component of the engine in an image collected by a target vision assembly in the vision assembly.

[0007] In a third aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the method of the first aspect.

[0008] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the method of any one of the first aspect.

[0009] In a fifth aspect, a computer program product is provided, which includes a computer program, and the computer program is executed by a processor to implement the method of any one of the first aspect.

[0010] In general, the present disclosure has at least the following beneficial effects: the present disclosure can correct the positional relationship between the mechanical device for subsequent vision detection and the engine through different materials of the tray, which helps to achieve accurate vision detection and can avoid the risk of damage caused by extrusion of non-metal trays. BRIEF DESCRIPTION OF DRAWINGS

[0011] In the drawings, like reference numerals refer to like elements throughout the various drawings. The drawings are not necessarily to scale, emphasis instead being placed on illustrating principles of the present disclosure. It should be understood that the drawings are merely depictions of some embodiments disclosed herein and should not be viewed as limiting.

[0012] Figure 1 A flowchart of a positioning method for an engine in a production line according to an embodiment of the present disclosure is shown;

[0013] Figure 2Another flow chart of the positioning method of the engine in the production line according to an embodiment of the present disclosure is shown;

[0014] Figure 3a A positioning system used in the positioning method of the engine in the production line according to an embodiment of the present disclosure is shown;

[0015] Figure 3b A structural top view of the positioning system used in the positioning method of the engine in the production line according to an embodiment of the present disclosure is shown;

[0016] Figure 3c A structural schematic diagram of C2f in the positioning method of the engine in the production line according to an embodiment of the present disclosure is shown;

[0017] Figure 3d A structural schematic diagram of the convolution block in C2f in the positioning method of the engine in the production line according to an embodiment of the present disclosure is shown;

[0018] Figure 3e A process schematic diagram of the tray classification identification in the positioning method of the engine in the production line according to an embodiment of the present disclosure is shown;

[0019] Figure 3f A tilt angle of the tray in the positioning method of the engine in the production line according to an embodiment of the present disclosure is shown;

[0020] Figure 4 A schematic diagram of the positioning device of the engine in the production line according to an embodiment of the present disclosure is shown;

[0021] Figure 5 A structural schematic diagram of an electronic device provided by an embodiment of the present disclosure is shown;

[0022] Figure 6 A schematic diagram of a storage medium provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0023] The present disclosure will be further described below in conjunction with the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the related application, and not to limit the application. In addition, it should be noted that only the parts related to the application are shown in the drawings for ease of description.

[0024] It should be noted that the embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict. The present disclosure will be described in detail below with reference to the drawings and in conjunction with the embodiments.

[0025] Figure 1The positioning method of the engine in the production line of the present disclosure is shown. In the embodiment of the present disclosure, the positioning method applied to the positioning system comprising a vision component and a tray alignment mechanism comprises:

[0026] In step S101, the transmission of the plate chain line is paused in response to the engine entering a preset detection area along the plate chain line.

[0027] In step S102, the tray type of the tray on which the engine is located is determined.

[0028] In step S103, if the tray type is a non-metal tray, the offset of the tray is determined, and the position correction data of the mechanical device for visual detection of the engine is determined according to the offset.

[0029] In this embodiment, the execution subject of the positioning method of the engine in the production line can present the position correction data in various ways, such as the target position of the mechanical device to be moved to for visual detection, or the trajectory data of the mechanical device to be moved to. The mechanical device can be a mechanical arm or a robot, etc.

[0030] In step S104, if the tray type is a metal tray, the tray alignment mechanism is controlled to align the tray.

[0031] In this embodiment, the positional relationship between the mechanical device and the engine during tray alignment is a position suitable for visual detection.

[0032] In step S105, for the image collected by a target vision component in the vision component, the positioning detection is performed on the preset components of the engine in the image, and the target vision component is the vision component for image collection of the engine.

[0033] In this embodiment, at least one target vision component can be provided on each side of the engine for photographing the engine.

[0034] The present disclosure can correct the positional relationship between the mechanical device and the engine for subsequent visual detection according to the different materials of the tray, which can help to realize accurate visual detection while avoiding the risk of damage to non-metal trays caused by extrusion.

[0035] In some optional implementations of any embodiment of the present disclosure, the vision component is a vision component provided on each side of the engine after pausing, the preset component is a fan and a flywheel, the two sides include a fan side and a flywheel side of the engine, and the vision component on each side includes a camera, an optical lens, and a coaxial light source.

[0036] The collection direction of the vision assembly on the flywheel side is along the engine axis and is aligned with the reference position on the flywheel side, and the collection direction of the vision assembly on the fan side is along the engine axis and is aligned with the reference position on the fan side. The vision assembly on the fan side is used to take a picture of the fan of the engine, and the vision assembly on the flywheel side is used to take a picture of the flywheel of the engine.

[0037] The positioning detection of the flywheel and the fan can be started, and the positioning detection result on the flywheel side is preferentially used, or the positioning detection results of the flywheel and the fan can be fused when both are detected, which is beneficial to ensure the speed of generating the positioning detection result.

[0038] These implementations can set symmetrical vision assemblies on both sides of the plate chain line, so as to comprehensively detect and take pictures of the engine.

[0039] In some optional implementations of any of the embodiments of the present disclosure, infrared grating sensors parallel to the plate chain line are arranged on both sides of the plate chain line, and the infrared grating sensors on both sides emit horizontal infrared beams relative to each other; the arrangement direction of each vision assembly on each side is parallel to the plate chain line; the method further comprises: using the infrared grating sensors to perform real-time scanning to determine the coordinate interval of the occlusion area of the engine on the plate chain line; and in the vision assembly, a target vision assembly used to take a picture of the coordinate interval is determined.

[0040] The execution subject in these implementations can accurately determine the vision assembly used to take a picture of the engine for the current position of the engine through real-time scanning of the two columns of infrared grating sensors.

[0041] In some optional implementations of any of the embodiments of the present disclosure, the tray alignment mechanism is a two-side centering clamping mechanism, which is symmetrically arranged on the rack and located at the lower part of the tray on both sides. Each clamping mechanism comprises a guide cylinder and a floating clamping block, and the piston telescopic rod of the guide cylinder is rigidly connected with the floating clamping block. The control of the tray alignment mechanism to align the tray comprises: driving the piston telescopic rod to move the floating clamping blocks on both sides towards each other through the guide cylinder, so as to apply a centering clamping force to the tray, and the axis of the tray subjected to the centering clamping force coincides with the preset reference axis.

[0042] Here, the axis can include a horizontal axis and a vertical axis. The alignment of the axis of the tray with the preset reference axis is alignment.

[0043] In addition, the clamping mechanism can further comprise a position sensor. In response to detecting that the clamping mechanism is returned to the home position through the position sensor, an image collection instruction is sent to the PLC.

[0044] These implementations can accurately realize tray alignment through clamping mechanisms in a coaxial manner.

[0045] In some optional implementations of any of the embodiments of the present disclosure, the determining the tray type of the tray on the board chain line of the engine includes: acquiring an image by using the target vision assembly, the image presenting the engine and the tray; and identifying the image by using a tray classification model to obtain the tray type of the tray on the board chain line of the engine.

[0046] These implementations can accurately and quickly determine the tray type by using a neural network model for image recognition.

[0047] Optionally, the tray classification model includes a feature convolution network, a feature fusion network, a separable convolution network, an attention mechanism network, and a post-processing network; and the identifying the image by using the tray classification model includes: inputting the image into at least two convolution layers cascaded in the feature convolution network, and inputting a convolution result into a third convolution layer and the feature fusion network to obtain a third convolution result and a fusion result, respectively; inputting the third convolution result into a fourth convolution layer to obtain a fourth convolution result, and inputting the third convolution result and the fusion result into the separable convolution network after fusion to obtain a separable convolution result; and inputting the separable convolution result and the fourth convolution result after fusion into the attention mechanism network and the post-processing network in cascade to obtain the type of the tray in the image.

[0048] In these implementations, the separable convolution network can be a depth separable convolution network. The feature fusion network can include various network structures, such as a C2f structure. In addition, the feature fusion network can also include a separable convolution network.

[0049] The post-processing network can further process the processing result of the attention mechanism network to obtain the type of the tray. For example, the post-processing network can include a pooling layer and a fully connected layer.

[0050] These optional implementations can cross-fuse the features obtained by convolution to improve fusion efficiency and allow more comprehensive analysis and processing of image features, which helps to improve the accuracy of tray type identification. The feature fusion mechanism in the model helps to combine shallow and deep features and enhance the discrimination ability of the model.

[0051] In some optional implementations of any of the embodiments of the present disclosure, the tray is a rectangular tray; and the determining the tray tilt angle includes: extracting a maximum circumscribed contour from the image, determining end point coordinates of an effective long side of the maximum circumscribed contour, determining a horizontal projection pixel length of the long side of the tray at a visual angle of each side target visual component according to the end point coordinates, for each side target visual component, obtaining a horizontal projection physical length of the side target visual component according to a pixel equivalent of the side target visual component and the horizontal projection pixel length, and determining a single-side tray tilt angle corresponding to the side target visual component according to an actual physical length of the long side of the tray and the horizontal projection physical length; and fusing the single-side tray tilt angles corresponding to the two side target visual components to generate the tray tilt angle.

[0052] In the present embodiment, the above execution subject can determine the single-side tray tilt angle corresponding to the side target visual component according to the actual physical length of the long side of the tray and the horizontal projection physical length in various ways. For example, the actual physical length of the long side of the tray and the horizontal projection physical length are input into an angle determination model to obtain the single-side tray tilt angle.

[0053] These implementations indirectly calculate a single-side tilt angle by respectively acquiring a horizontal projection length of a long side of a rectangular tray through double-side cameras, combine a pixel equivalent with a real size of the tray, and fuse double-view results to generate a final tray tilt angle. This method avoids dependence on local edges or corner points, and significantly improves measurement robustness and precision in complex industrial scenes such as high reflectivity, occlusion, and oil stains.

[0054] In some optional implementations of any of the embodiments of the present disclosure, the determining the offset includes: determining a horizontal coordinate of a center point of the tray after tilting according to the tray tilt angle and a target horizontal center point of the tray; and determining an offset of a current center point of the tray from the target horizontal center point according to a length average of horizontal projections of the tray captured by the two side target visual components, the horizontal coordinate, and an actual length of the long side of the tray, the offset including a horizontal offset and a vertical offset.

[0055] These optional implementations calculate the tray tilt angle in the offset, thereby improving the calculation accuracy of the offset.

[0056] In some optional implementations of any of the embodiments of the present disclosure, the positioning detection on the preset component of the engine in the image includes: in response to the positioning detection including flywheel detection, performing flywheel bounding positioning detection on the flywheel presented in the image by using a first model to obtain a plurality of bounding positioning results and corresponding confidence levels; performing circle positioning detection on the plurality of bounding positioning results by using a circle detection model to obtain a circle positioning result, the detection accuracy of the circle detection model being higher than the detection accuracy of the first model; determining a center distance between the circle positioning result and the bounding positioning result, and if the center distance is less than a preset threshold, determining the positioning detection result according to the circle positioning result.

[0057] The first model can be various neural network models capable of outputting a detection box, such as a YOLO (You Only Look Once) model. The circle detection model can be various models with a detection result in the form of a circle, such as a Huffman circle detection model.

[0058] These implementations support various engine flywheel morphologies, the algorithm switching response time is ≤50 ms, and are suitable for multi-model mixed production requirements. The coarse positioning model and the accurate detection based thereon form an algorithm combination, which can guarantee safety and meet the high-precision detection requirements.

[0059] In some optional implementations of any of the embodiments of the present disclosure, the positioning detection on the preset component of the engine in the image includes: in response to the positioning detection including fan detection, determining a region where the fan is located in the image as a candidate fan region; determining the contour in the candidate fan region, and strengthening the contour of the fan bolts in the candidate fan region to increase the contrast between the fan bolts and the background; in the contour of the candidate fan region, determining the center points of the fan bolts to obtain a center point set; for each two points in the center point set, taking the two points as the centers and the distance between the two points as the radius, drawing the effective intersection of two circles, taking the pixel where each effective intersection point is located as the center pixel, and constructing a square matrix of pixels, each cell in the square matrix being a pixel; performing position superposition on the square matrix corresponding to each point in the center point set, taking the pixel with the largest superposition value as the candidate center point of the fan, and performing positioning detection according to the candidate center point.

[0060] The pixel grid in the square matrix is an even number, such as a 4x4 square matrix or a nine-square matrix.

[0061] In some optional implementations of any embodiment of this disclosure, the step of taking pictures of preset components in the engine for location detection includes: in response to the location detection including fan detection, cropping the central region of the image to obtain a cropped image; converting the color space of the cropped image from BGR to HSV, enhancing the outline of the fan in the saturation S channel data of the color space to obtain an enhancement result, thereby increasing the contrast between the fan and the background; performing contour detection on the enhancement result, generating convex hulls for each contour, and determining the contours in each contour whose roundness of the convex hull is greater than a roundness threshold and whose circumscribed circle radius is greater than a radius threshold as target contours; and determining the location detection result based on each target contour.

[0062] These implementations enable adaptive center point localization algorithms for different fan appearances, providing millimeter-level positional references for subsequent collaborative robot appearance inspection. Simultaneously, by adding a camera to the fan side and employing a dual-view fault-tolerant process, the localization failure issue caused by flywheel side occlusion is resolved.

[0063] like Figure 2 As shown in the figure, a method for locating an engine in a production line according to an embodiment of this disclosure is illustrated. First, the engine enters the testing area, and then the pallet type is identified using an algorithm, i.e., a pallet classification model. If the identification result is non-metallic, the pallet tilt angle is identified, and the offset is calculated to correct the robot's trajectory. Here, the robot is a mechanical device performing visual inspection. If the identification result is metallic, the cylinder is controlled to clamp the pallet. After correcting or clamping the pallet, flywheel and fan detection can be performed simultaneously on the engine. If the flywheel detection is successful, the positioning is successful, i.e., the positioning detection is successful. If it fails, the result of the fan detection is used as the positioning detection result, and the positioning is also successful. If both the flywheel detection and fan detection fail, the positioning fails, i.e., the positioning detection fails.

[0064] This disclosure also provides a method for locating an engine in a production line according to an embodiment of this disclosure. The method is applied to a positioning system.

[0065] like Figure 3a As shown, the positioning system may include: a frame, two fixed cameras (i.e., vision components 1 and 2) on both sides, and a tray alignment mechanism (i.e., a tray clamping mechanism), with a positioning reference surface adapted to the clamping mechanism on the bottom of the tray. The clamping mechanism is driven by a cylinder. The frame in the system is the basic framework, and all components in the system can be mounted on the frame. The upper part of the figure shows the mechanical device used for visual inspection. The middle position of the figure shows the engine under test, which is placed on the tray, with the flywheel side and the fan side on either side of the engine.

[0066] The pallet straightening mechanism can be not only the clamping mechanism mentioned above, but also other mechanisms such as robotic arms.

[0067] The first visual component is fixedly arranged on the mounting seat corresponding to the engine flywheel side of the rack, and includes an industrial camera, a matching optical lens, and a coaxial light source. The collection direction is aligned with the reference feature (such as a flywheel bearing or a positioning pin hole) at the flywheel end along the engine axis. The second visual component is symmetrically fixed on the mounting seat corresponding to the engine fan side of the rack, coaxially arranged with the first visual component, and the collection direction is aligned with the reference feature (such as a fan flange surface or a positioning groove) at the fan end. The bilateral visual components synchronously trigger image collection to realize synchronous capture of the reference features at both ends of the engine.

[0068] The bilateral centering clamping mechanism is symmetrically arranged on the mounting area at the bottom of the bearing tray corresponding to the rack. Each set of clamping mechanism includes a guide cylinder, a floating clamping block, and a position sensor. The piston rod of the guide cylinder is rigidly connected with the floating clamping block, and the inner side of the clamping block is provided with a wear-resistant liner adapted to the positioning reference surface of the tray. The bilateral cylinders are synchronously driven, specifically by the piston rod extension to drive the clamping block to move towards each other, to apply a centering clamping force to the bearing tray, so that the tray and the loaded engine are positioned along the preset reference axis, the placement deviation of the tray is eliminated, and the reference consistency of the visual collection is ensured.

[0069] The installation height and horizontal position of the bilateral visual collection module are matched with the reference axis of the clamped engine. After the clamping mechanism is actuated, the position sensor sends a signal to indicate that the position is correct, triggering the visual component to start image collection, and realizing the linkage control of “clamping correction-visual positioning”.

[0070] The method can be specifically divided into the following steps:

[0071] I. The image collection process is shown in the figure:

[0072] Pre-trigger: The plate chain line is stopped and the programmable logic controller (PLC) is linked with the grating positioning.

[0073] Plate chain line positioning stop: After the engine enters the preset detection area along the plate chain line, the plate chain line is immediately stopped to ensure that the engine is in a stationary state, avoid image blur or area deviation during shooting, and provide a stable reference for subsequent positioning.

[0074] The hardware parameters of the infrared grating sensor are a height of 3-4 cm, a length adapted to the internal detection area space of the equipment (consistent with the horizontal span of the equipment), an installation direction parallel to the running direction of the plate chain line, and accurate coverage of the key detection interval from the bottom to the middle of the engine, so as to avoid false triggering of background debris due to the grating being too high or missing detection of the lower part of the engine due to the grating being too low. The grating scans the engine in real time during operation, records the continuous interval of the x-axis of the plate chain line corresponding to the blocked area through long-distance scanning parallel to the plate chain line, and forms the coordinate data of the blocked area without breakpoints. All detection data are synchronized to the PLC control system in real time.

[0075] As shown in Figure 3b , the structure of the positioning system is shown in the figure. The multiple rectangles arranged vertically in the center of the figure are plate chain lines. As shown in 1 in the figure, infrared grating sensors are arranged on both sides of the plate chain line, and a vision assembly is arranged between each infrared grating sensor and the plate chain line. The two vision assemblies are equidistantly arranged along the plate chain line, and the physical parameters of the vision assembly are pre-recorded into the PLC system. The physical parameters include camera number (C1, C2, …, CN), adjacent distance D, single camera shooting field of view width W, height H, and pixel and physical size.

[0076] PLC instruction triggers target camera: PLC combines the blocked area coordinates transmitted by the grating to determine the camera to be started, i.e., the target vision assembly, and sends a PLC instruction to trigger the corresponding camera to take a picture synchronously.

[0077] II. The overall structure of the classification network and related operations are as follows:

[0078] Each convolutional layer performs a convolution operation on the input image. Specifically, the first convolution operation has an input feature channel of 3, an output channel of 8, a convolution kernel size of 3, and a step size of 2. The input image resolution is , where 3 refers to the RGB three channels.

[0079] The second convolution operation has an input feature channel of 8, an output channel of 16, a convolution kernel size of 3, and a step size of 2. The third convolution operation has an input feature channel of 16, an output channel of 32, a convolution kernel size of 3, and a step size of 2. The fourth convolution operation has an input feature channel of 32, an output channel of 64, a convolution kernel size of 3, and a step size of 2.

[0080] The C2f structure is as shown in Figure 3cAs shown, first, the input features are subjected to a convolution operation with a kernel of 3 and a stride of 1, and the feature channels remain unchanged. Then, the feature channels are divided, and each part has only half the number of feature channels. Half of the feature channels are subjected to two convolution block operations, and the convolution block operations are the same. The two groups of features after division, the features output by one convolution block, and the features output by two convolution blocks are combined in the channel. The combined features are subjected to a convolution operation with a kernel of 3 and a stride of 1. The output feature channels remain consistent with the output at the time.

[0081] The convolution block structure in the C2f structure is shown in Figure 3d As shown, it is a combination of a convolution module containing two convolution layers and residual feature addition.

[0082] The deep separable convolution network is used for efficient convolutional neural network operation. First, a deep convolution operation is performed, and a convolution kernel is applied to each input channel. That is, each convolution kernel only acts on one input channel. A stride of 2 is used to reduce the feature dimension. Then, point convolution is performed to increase the number of feature channels.

[0083] The attention mechanism network refers to the application of the CBAM (Convolutional Block Attention Module) attention mechanism structure. During feature extraction, key information is gradually strengthened, and interference signals are suppressed to focus on subtle features in complex scenes. Finally, the classification robustness of the model in challenging scenes such as noise interference, high inter-class similarity, and variable target scale is improved.

[0084] The model applies an adaptive average pooling layer before the fully connected layer structure. Its particularity is that regardless of the input feature resolution, the output feature resolution is a given fixed value. This structure further reduces the parameter quantity of the fully connected input, thereby improving the training speed of the model.

[0085] The learned distributed features can be mapped to the sample label space using the fully connected layer. Specifically, matrix multiplication is used to change the feature space, and a nonlinear activation function is used to achieve nonlinear mapping after each transformation. It should be noted that the final feature output quantity is 2, representing the confidence of metal trays and non-metal trays, respectively. In this way, matrix multiplication is used to change the feature space using the fully connected layer, and a nonlinear activation function is used to achieve nonlinear mapping after each transformation. It should be noted that the final feature output quantity is 2, representing the confidence of metal trays and non-metal trays, respectively.

[0086] Figure 3eThe process of tray classification recognition is shown, which adopts a lightweight classification network and combines multiple advanced network structures and mechanisms. During model running, the original image is subjected to first, second, third, and fourth convolution operations in four cascaded convolution layers (first convolution layer, second convolution layer, third convolution layer, and fourth convolution layer) respectively. The output of the former is the input of the latter. The output of the second convolution layer is input into the first C2f structure for feature extraction. The output of the first C2f structure is input into the first depth separable convolution for feature extraction. The output of the first depth separable convolution is input into the second C2f structure for feature extraction. The features output by the second C2f structure are combined with the features of the third convolution operation in the channel, and are input into the second depth separable convolution. The output features of the second depth separable convolution are combined with the output features of the fourth convolution in the feature channel, and are input into the attention mechanism network. The output of the attention mechanism structure is input into the adaptive average pooling layer. The output of the adaptive average pooling layer is input into the fully connected structure, and finally the metal type feature information or non-metal type feature information and the corresponding type confidence are output.

[0087] The tray classification model of the present application has high efficient feature extraction capability, can effectively extract multi-scale and multi-level feature information through convolution operation and fusion of features before and after, and improve the richness and diversity of feature expression. The feature fusion mechanism in the model helps to combine shallow and deep features and enhance the discrimination ability of the model.

[0088] Moreover, the tray classification model adopts a lightweight design, specifically using C2f structure and residual structure, reducing the parameter quantity and calculation quantity of the network while maintaining the expression ability of the network. This design enables the network to run in a resource-limited environment while maintaining high efficiency.

[0089] The present disclosure also introduces an attention mechanism, which can automatically focus on important feature areas and suppress irrelevant interference information, thereby improving the accuracy and robustness of classification.

[0090] Through adaptive average pooling, the model can flexibly process input images of different sizes, while further reducing the feature dimension and reducing the calculation amount. Moreover, the design of the fully connected layer in the present disclosure is combined with other lightweight mechanisms to further reduce the complexity of the network, making it have high computational efficiency in actual application.

[0091] III. Tray center point offset calculation

[0092] Step 1, joint calibration of dual cameras:

[0093] Before system startup, the calibration of both visual components, i.e., both cameras, must be completed. This involves solving for intrinsic and extrinsic parameters and distortion coefficients, and obtaining the pixel equivalents for each camera. (North side) (South side).

[0094] Coordinate system one is established. The 3D calibration target is placed at the reference position on the tray, and calibration target images are acquired from both cameras. Using a feature point matching algorithm (such as the point cloud matching module of ORB-SLAM2), the transformation matrices TN→S (north to south) and TN→W (north to world coordinate system) of the coordinate systems of both cameras are solved, thus unifying the coordinate systems of both cameras with the world coordinate system.

[0095] Perform baseline consistency calibration. Calculate the deviation values ​​of the pixel equivalents of the two cameras. =∣ |, if If the value is greater than 0.001 mm / pixel, compensation and calibration will be performed separately based on the pixel equivalent on both sides to ensure that the size measurement benchmarks on both sides are consistent.

[0096] Step 2, Measurement of angle and length on one side:

[0097] The images captured by the camera are preprocessed using grayscale equalization, Gaussian filtering (kernel size 3×3), and Canny edge detection (adaptive thresholding) to reduce the interference of lighting variations and noise on edges. After extracting contours using a contour detection algorithm (such as findContours), contour filtering conditions are added: ① The contour area is within a preset range (actual tray area ±5%). ② The contour aspect ratio conforms to the tray design specifications (e.g., long side: short side = 8:1 ± 0.2). ③ The contour integrity score is ≥0.8 (calculated by the proportion of missing pixels in the contour). False contours such as debris and local edges are removed, and the largest circumscribed contour of the tray is retained.

[0098] The Hough linear transform is used to fit the long side (the angle between the fitted result and the direction of the theoretical long side of the tray is calculated; if the deviation is >5°, it is judged as a pseudo-line and refitted), to obtain the coordinates of the endpoints of the effective long side (north side). , South side , After that, calculate the horizontal projection pixel length of the long side of the tray from a single-side view. , .in, This represents the horizontal projection pixel length of the long side of the tray from the north view. S represents the horizontal projection pixel length of the long side of the tray from the south view.

[0099] Convert the length of the horizontal projection pixel to the world coordinate system according to the pixel equivalent of each pixel, and get the single-side horizontal projection physical length 、 , substitute the formula to calculate the single-side inclination angle 、 . Wherein L is the actual physical length of the long side of the tray, which needs to be measured in advance by high-precision caliper at 3 different positions to avoid the influence of manufacturing error. Wherein l n is the north side horizontal projection physical length, and l s is the south side horizontal projection physical length. is the single-side inclination angle of the north side, is the single-side inclination angle of the south side.

[0100] As shown in Figure 3f , the inclination angle of the tray is shown in the figure . The direction indicated by the lowermost arrow is the direction of the plate chain line, that is, the direction of the plate chain.

[0101] Step 3, dual-view data fusion output:

[0102] The angle fusion process adopts weighted average method to calculate the final inclination angle, and the formula is:

[0103] , wherein, 、 are the weights of the dual-side cameras, and the default is 0.5. If the single-side image quality is lower than the threshold, the corresponding weight is reduced to 0.2.

[0104] In the process of abnormal filtering, if the deviation of the dual-side angles > 0.3, it is determined that the single-side detection is abnormal, the system automatically eliminates the angle value with larger deviation, uses the single-side effective angle as the final output, and triggers the single-side camera self-checking instruction.

[0105] Step 4, center point offset calculation:

[0106] Define the horizontal center point of the tray as , according to the final inclination angle , the inclined tray center point can be calculated as , wherein L is the standard length of the tray, is the average of the horizontal projection of the north and south sides of the tray, that is, , and finally the center point offset can be obtained as:

[0107]

[0108]

[0109] Step 5, mechanical device track offset adaptation:

[0110] Composite data transmission: The industrial computer synchronously transmits the final inclination angle θ, the XY direction offset and the offset direction to the mechanical device controller through the Modbus TCP protocol.

[0111] Trajectory composite adjustment: The mechanical device controller integrates the angle offset and the vector offset parameters to perform "rotation + translation" composite correction on the preset trajectory of the mechanical device, ensuring that the detection probe adapts to the tray inclination and XY offset at the same time, and finally completes the trajectory correction.

[0112] Step 6, exception handling mechanism:

[0113] Single camera failure: If the single-sided camera fails to detect the tray profile for 3 consecutive times, the system automatically switches to single-sided camera mode and sends a camera failure warning.

[0114] Angle deviation exceeds limit: After the correction of the bilateral mechanical device, the angle deviation and , trigger re-measurement (up to 2 times), if the angle deviation , pause the detection process and trigger manual review.

[0115] Offset exceeds limit: If the X offset or Y offset is > 20mm, it is determined that the tray station positioning is invalid, and the human is notified to reset the tray. The 20mm is the preset maximum allowed offset.

[0116] Four, positioning detection

[0117] (1) Flywheel positioning optimization:

[0118] Step 1, image preprocessing

[0119] ① Normalize the original image size captured by the camera to 640x640 pixels (YOLOv10 standard input size), keeping the aspect ratio unchanged. YOLOv10 is the 10th version of the YOLO model.

[0120] ② Convert to HSV color space, separate the brightness channel (V channel), and perform CLAHE algorithm on the V channel to eliminate brightness unevenness caused by metal reflection and oil stains.

[0121] ③ Use Gaussian filtering to remove image noise and provide clear input for feature extraction.

[0122] Step 2, YOLOv10 model for rough positioning

[0123] ① Data set construction: Collect 1000 engine images covering multiple types and conditions of flywheels, and label the smallest rectangle of the flywheel shell edge for each image. Use data enhancement methods such as random scaling and color jitter to improve model adaptability.

[0124] ② Reasoning output: The model outputs the two-dimensional pixel coordinates of the flywheel rough bounding box (x1, y1, x2, y2) and the confidence, and removes duplicate detection boxes by non-maximum suppression. Increase the "aspect ratio filter": the aspect ratio of the flywheel region circumscribed rectangle ≈ 1:1, filter out candidate boxes with aspect ratio > 1.5 or < 0.5. If the confidence of the candidate box is lower than the threshold, it is considered that the positioning fails and the fan side space positioning is adopted.

[0125] Step 3: Accurate positioning of the Hough circle

[0126] ① According to the bounding box (i.e. ROI) result output by YOLOv10, the original image is cropped, and only the ROI region is retained as the effective input for Hough circle detection, and the full image detection mode is abandoned.

[0127] ② Calculate the estimated radius of the positioning circle , avoid traversing the invalid radius interval, and improve the detection efficiency.

[0128] ③ In the Hough circle accumulator voting stage, set the voting threshold V_th=0.7, only when the weighted vote number of a candidate circle center in the accumulator ≥ V_th×max(accumulator vote number), it is considered as an effective candidate circle center, and the invalid vote of low weight interference pixel is removed.

[0129] ④ Calculate the center of the YOLOv10 rough positioning bounding box and the Euclidean distance between the Hough circle detection candidate circle center O_Hough(xc, yc): .

[0130] If D≤2 pixels, it is considered as an effective positioning result; otherwise, it is considered as an invalid positioning result, and the above detection steps are re-executed based on the suboptimal ROI output by YOLOv10. If all are invalid, it is considered that the flywheel positioning fails.

[0131] (2) Fan positioning

[0132] For the two different forms on the fan side, an adaptive algorithm is developed by Open CV to obtain the fan center point, as follows:

[0133] The first algorithm for accurate positioning of the fan:

[0134] ① Image loading and accurate extraction of engine region

[0135] ​Directional receiving of captured images: the system preferentially receives the captured images of the main target camera (such as Ck); if multiple cameras are triggered, the system directly acquires the synchronous captured images of all associated cameras without the need for prior splicing of redundant images. Matching and intercepting of engine image regions: the PLC maps the engine x-axis occlusion interval identified by the grating (as the grating is parallel to the plate chain line and the length covers the device space, the interval can accurately reflect the complete occupation range of the engine in the direction of the plate chain line) to the captured images of the corresponding camera. According to the pre-stored pixel-physical size conversion relationship of the camera, the pixel range in the image that completely corresponds to the actual occupied area of the engine is locked, and the image is intercepted based on this, obtaining an exclusive image region (denoted as Engine_Area) containing only the current engine, completely eliminating irrelevant regions such as plate chain line supports and backgrounds.

[0136] ②Secondary interception: locking the approximate area of the fan

[0137] The system pre-stores the fan installation parameters of each engine model, including the relative position of the fan on the engine body (such as the x-axis offset from the front end of the engine, the y-axis height proportion, etc.). The system calls the corresponding preset parameters according to the current engine model, and accurately intercepts the approximate area of the fan in the intercepted Engine_Area as the initial ROI. For example, for model M2, intercept the area of x-axis 2 / 5 - 3 / 5, y-axis 1 / 4-3 / 5 in Engine_Area, quickly focus on the core range of the fan, and greatly reduce the calculation amount and background interference of subsequent algorithms.

[0138] ③Image preprocessing: strengthening the features of the fan area

[0139] Color space conversion and channel extraction: convert the intercepted image region ROI from BGR color space to HSV space and extract the H channel image. The H channel has stronger anti-interference ability to workshop light fluctuations and slight surface oil stains, and can effectively preserve the contour features of the fan bolts.

[0140] Noise reduction and binarization processing: perform Gaussian filtering on the H channel image to remove small noise caused by dust, and use the mean value binarization algorithm to convert the image to a black and white binary image with the H channel pixel mean value as the threshold, highlighting the contour difference between the bolts and the background.

[0141] ④Bolt center point extraction: providing auxiliary reference for fan positioning

[0142] Contour selection and noise reduction optimization: perform grayscale conversion on the initial ROI after binarization, and execute high threshold binarization to further strengthen the bolt contour. Then, sequentially remove small noise points through morphological opening operation and fill the gaps in the bolt contour through morphological closing operation. Subsequently, all contours in the image are searched, and the effective contour corresponding to the bolt is selected by filtering according to rules such as area and aspect ratio.

[0143] Center point calculation and calibration: Calculate the minimum circumscribed rectangle of each valid contour, and take the center of the rectangle as the initial center point of the bolt. Combine Engine_Area with the coordinate mapping relationship of the original drawing to convert the initial center point coordinates of the bolt into coordinates in the original coordinate system, forming a complete list of bolt center points. If there are only 3 or fewer valid contours, the existing center points are still retained for the next step, and the deviation is corrected by subsequent algorithm fault tolerance.

[0144] ⑤ Fan center candidate point locking: accurate calculation based on bolt center point

[0145] Intersection of two circles: traverse any two points (denoted as A and B) in the bolt center point list, draw two circles with A and B as centers and the distance between A and B as radius, and solve the intersection points by combining the standard equations of the circles. At most 2 valid intersection points are obtained, and invalid intersection points outside the initial ROI boundary are immediately removed.

[0146] Nine-grid pixel superposition: create a blank accumulation image consistent with the size of the initial ROI, and for each valid intersection point, construct a nine-grid centered on the intersection point. Each grid is a pixel point. Perform a position superposition operation on the pixels in each nine-grid, and superimpose the pixel value once for each covered pixel.

[0147] Core candidate point determination: after completing the superposition of the nine-grid corresponding to the intersection points of all bolt point pairs, the position with the maximum pixel value in the accumulation image is the core candidate point of the fan center. If there are multiple peak pixels, take the geometric center point of these pixels as the final core candidate point.

[0148] ⑥ Fine positioning: obtain the final coordinates of the fan

[0149] Fine area focusing: take a 400x400 fine area centered on the core candidate point in the original drawing, focus on the fan core structure, and reduce the interference of the surrounding irrelevant areas.

[0150] Contour optimization and centroid calculation: extract the S channel of the fine area in the HSV color space, find the maximum contour after Otsu binaryzation processing; perform convex hull processing on the contour to eliminate recesses and burrs, and obtain the contour centroid by calculating the contour moment.

[0151] Coordinate restoration: combine the offset coordinates of the fine area in the original drawing to convert the centroid coordinates into coordinates in the original coordinate system. The coordinates are the final spatial positioning point of the fan.

[0152] Second algorithm for accurate positioning of the fan:

[0153] ① Secondary interception: lock the fan circular core area

[0154] Based on the structural characteristics of the fan with a clear circular area, the approximate area of the fan in the Engine_Area is precisely intercepted as the ROI to be adopted: the interception range is from hImg / 4 (1 / 4 of the height of Engine_Area) to 3×hImg / 5 (3 / 5 of the height of Engine_Area) in the Y-axis direction, and covers the core horizontal interval of Engine_Area (such as 1 / 5 to 4 / 5 of the width of Engine_Area) in the X-axis direction. This interception range focuses on the middle-lower area where the fan circular structure is most likely to exist, and maximally reduces the background interference of other engine components (such as supports, pipelines).

[0155] ② Special image preprocessing: S channel extraction and binarization (adapted to the characteristics of the circular fan)

[0156] HSV conversion and S channel extraction: Convert the intercepted ROI to be adopted from BGR color space to HSV color space, and only keep the S channel (saturation channel) data, while releasing the memory resources of H channel (hue channel) and V channel (brightness channel) at the same time, to reduce the computational load. The S channel has higher distinguishing degree between the target and the background, which can enhance the profile difference between the fan circular area and the surrounding components.

[0157] S channel mean value binarization: Calculate the mean value of all pixels in the S channel image, and use this mean value as the binarization threshold to perform Binary binarization on the S channel image: the area with pixel value greater than the mean value is set to 255 (white, target area), and the area with pixel value less than or equal to the mean value is set to 0 (black, background area), to highlight the fan circular profile through black and white contrast.

[0158] ③ Contour detection and circular feature screening (precise locking of the fan area)

[0159] Full contour detection: Use a contour detection algorithm (such as findContours in OpenCV) to extract all contours in the binarized image, without establishing a hierarchical relationship between the contours, to ensure that potential targets are captured without omission.

[0160] Contour feature calculation and screening: Traverse each detected contour and perform the following operations:

[0161] Convex hull calculation: Generate a convex hull (convexHull) for the current contour to eliminate interference such as concave and burr in the contour, so that the contour is closer to the true shape of the fan circle.

[0162] Key parameter extraction: Calculate the contour area, minimum circumscribed circle (including the center coordinates of the circumscribed circle and the radius), and contour perimeter of the convex hull.

[0163] Circular feature screening: Through the circularity formula The roundness of the quantized outline is determined, retaining only outlines that meet the criteria of "roundness > 0.99 (very close to a perfect circle) and circumscribed circle radius > 100 pixels", while excluding non-circular (such as bolts and pipelines) or excessively small (such as dust noise) interfering targets.

[0164] Valid center point collection: Record the center coordinates of the smallest circumcircle of all circular contours that meet the filtering criteria, forming a list of valid center points.

[0165] ④ Determining the center point of the fan and restoring its coordinates

[0166] Center point filtering: If the list of valid center points is not empty, the center of the first valid circular outline is selected first (because this outline is usually the main circular area of ​​the fan, with the least interference).

[0167] Original Image Coordinate Restoration: Since the initial ROI is cropped from the Y-axis at hImg / 4 of the Engine_Area, the Y-coordinate of the selected center needs to be increased by hImg / 4 to restore it to the Engine_Area coordinate system. Then, combining the coordinate mapping relationship between the Engine_Area and the original camera image, the final coordinates are converted to those in the original camera image coordinate system. These coordinates represent the final center point of the fan.

[0168] This disclosure provides a positioning device for an engine in a production line, which is used to perform the engine positioning method in a production line described in the above embodiments, such as... Figure 4 As shown, the device includes: an application to a positioning system, the positioning system including a vision component and a pallet straightening mechanism; the device includes: a pause unit 401 configured to pause the transmission of the conveyor belt in response to the engine entering a preset detection area along the conveyor belt; a type determination unit 402 configured to determine the pallet type of the pallet of the engine on the conveyor belt; a correction unit 403 configured to determine the offset of the pallet if the pallet type is a non-metallic pallet, and determine the position correction data of the mechanical device to perform visual inspection of the engine based on the offset; a control unit 404 configured to control the pallet straightening mechanism to straighten the pallet if the pallet type is a metallic pallet; and a detection unit 405 configured to perform positioning detection on a preset component of the engine in an image acquired using a target vision component of the vision component, the target vision component being the vision component that acquires the image of the engine.

[0169] The engine positioning device in the production line provided in the above embodiments of this disclosure and the engine positioning method in the production line provided in the embodiments of this disclosure are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.

[0170] The embodiments of the present disclosure further provide an electronic device corresponding to the engine positioning method in a production line provided by the foregoing embodiments, to execute the engine positioning method in a production line. The embodiments of the present disclosure are not limited in this regard.

[0171] Reference is made to Figure 5 , which shows a schematic diagram of an electronic device provided by some embodiments of the present disclosure. As Figure 5 shown, the electronic device 50 includes a processor 500, a memory 501, a bus 502 and a communication interface 503, the processor 500, the communication interface 503 and the memory 501 are connected through the bus 502; the memory 501 stores a computer program executable on the processor 500, and the processor 500 executes the computer program to execute the method provided by any one of the foregoing embodiments of the present disclosure.

[0172] The memory 501 can include a high-speed random access memory (RAM) and can also include a non-volatile memory such as at least one disk memory. The communication between the system network element and at least one other network element is realized through at least one communication interface 503 (which can be wired or wireless), and the Internet, a wide area network, a local network, a metropolitan area network, etc. can be used.

[0173] The bus 502 can be an ISA bus, a PCI bus, an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. The memory 501 is used to store programs, and the processor 500 executes the programs after receiving execution instructions. The engine positioning method in a production line disclosed in any one of the foregoing embodiments of the present disclosure can be applied to the processor 500 or realized by the processor 500.

[0174] The processor 500 can be an integrated circuit chip with signal processing capability. In implementation, each step of the above method can be completed by integrated logic circuits or instructions in the form of software in the processor 500. The processor 500 described above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a ready programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. Each method, step and logic block disclosed in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present disclosure can be directly embodied as a hardware coding processor for execution, or a combination of hardware and software modules in the coding processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, or other mature storage medium in the art. The storage medium is located in the memory 501, and the processor 500 reads the information in the memory 501 and combines the hardware to complete the steps of the above method.

[0175] The electronic device provided by the embodiments of the present disclosure and the engine positioning method in the production line provided by the embodiments of the present disclosure have the same inventive concept and the same beneficial effects as the method they adopt, operate or implement.

[0176] The embodiments of the present disclosure also provide a computer readable storage medium corresponding to the engine positioning method in the production line provided by the preceding embodiments. Please refer to Figure 6 The computer readable storage medium shown in the figure is an optical disc 60, and a computer program (i.e. program product) is stored on the optical disc 60. When the computer program is run by a processor, the engine positioning method in the production line provided by any of the preceding embodiments will be executed.

[0177] It should be noted that examples of the computer readable storage medium can also include, but are not limited to, a phase change memory (PRAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), other types of random access memory (RAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory or other optical, magnetic storage medium, which will not be described one by one here.

[0178] The computer readable storage medium provided by the above-mentioned embodiments of the present disclosure has the same inventive concept as the engine positioning method in the production line provided by the embodiments of the present disclosure, and has the same beneficial effects as the method adopted, run or implemented by the application stored therein.

[0179] It should be noted that:

[0180] It should be noted that:

[0181] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and a necessary general hardware platform, of course, it can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present disclosure can be embodied in the form of a software product in essence or in the form of a contribution to the prior art. The computer software product is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk), and includes a plurality of instructions for causing a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the method described in each embodiment of the present disclosure.

[0182] The embodiments of the present disclosure are described above in conjunction with the accompanying drawings, which are merely specific embodiments of the present disclosure, but the present disclosure is not limited to the above-mentioned specific embodiments. The above-mentioned specific embodiments are merely illustrative and not restrictive, and those skilled in the art can make many forms under the inspiration of the present disclosure without departing from the scope of the present disclosure and the scope of protection of the claims.

Claims

1. A method of positioning an engine in a production line, characterized by, The application is applied to a positioning system comprising a vision component and a tray alignment mechanism, and the method comprises: suspending transmission of the plate chain line in response to the engine entering a preset detection area along the plate chain line; determining a tray type of a tray of the engine on the plate chain line; if the tray type is a non-metal tray, determining a tray inclination angle and an offset, and determining position correction data of a mechanical device for vision detection of the engine according to the tray inclination angle and the offset; if the tray type is a metal tray, controlling the tray alignment mechanism to align the tray; for an image captured by a target vision component in the vision component, performing positioning detection on preset components of the engine in the image, the target vision component being a vision component for image capture of the engine; the vision component is a vision component arranged on each side of the engine after suspension, the preset components are a fan and a flywheel, and the two sides include a fan side and a flywheel side of the engine, and the vision component on each side comprises a camera, an optical lens and a coaxial light source; the positioning detection on the preset components of the engine in the image comprises: in response to the positioning detection including flywheel detection, using a first model to perform frame positioning detection on the flywheel presented in the image to obtain multiple frame positioning results and corresponding confidence levels; using a circle detection model to detect the multiple frame positioning results to obtain circle positioning results, and the detection accuracy of the circle detection model is higher than that of the first model; determining a center distance between the circle positioning results and the frame positioning results, and if the center distance is less than a preset threshold, determining a positioning detection result according to the circle positioning results.

2. The method of claim 1, wherein, Infrared grating sensors parallel to the plate chain line are arranged on both sides of the plate chain line, and the infrared grating sensors on both sides emit infrared beams in a horizontal direction relative to each other; and the arrangement direction of each vision component on each side is parallel to the plate chain line; the method further comprises: using the infrared grating sensors to perform real-time scanning to determine a coordinate interval of an occlusion area of the engine on the plate chain line; in the vision component, determining a target vision component for shooting the coordinate interval.

3. The method of claim 1, wherein: the tray alignment mechanism is a clamping mechanism with two sides centered, and is symmetrically arranged on a rack and located at both sides of a lower part of a tray, each clamping mechanism comprising a guide cylinder and a floating clamping block, and a piston telescopic rod of the guide cylinder is rigidly connected with the floating clamping block; the control of the tray alignment mechanism to align the tray comprises: driving the piston telescopic rod to drive the floating clamping blocks on both sides to move towards each other by the guide cylinder to apply a centering clamping force to the tray, and an axis of the tray subjected to the centering clamping force coincides with a preset reference axis.

4. The method of claim 2, wherein, the determination of the tray type of the tray of the engine on the plate chain line comprises: capturing an image by using the target vision component, the image presenting the engine and the tray; identifying the image by using a tray classification model to obtain the tray type of the tray of the engine on the plate chain line.

5. The method of claim 4, wherein, The tray classification model comprises a feature convolution network, a feature fusion network, a separable convolution network, an attention mechanism network and a post-processing network; The image is identified by the tray classification model, comprising: The image is input into at least two convolution layers cascaded in the feature convolution network, and the convolution result is input into a third convolution layer and a feature fusion network cascaded, to obtain a third convolution result and a fusion result respectively; The third convolution result is input into a fourth convolution layer to obtain a fourth convolution result, and the third convolution result and the fusion result are input into the separable convolution network after fusion to obtain a separable convolution result; The separable convolution result and the fourth convolution result are fused and input into the attention mechanism network and the post-processing network cascaded to obtain the type of the tray in the image.

6. The method of claim 1, wherein, The tray is a rectangular tray; the determination of the tray inclination angle comprises: The maximum circumscribed contour is extracted from the image, the end point coordinates of the effective long side of the maximum circumscribed contour are determined, and the horizontal projection pixel length of the long side of the tray under the visual angle of each side target visual component is determined according to the end point coordinates; For each side target visual component, the horizontal projection physical length of the side target visual component is obtained according to the pixel equivalent and the horizontal projection pixel length of the side target visual component, and the single-side tray inclination angle corresponding to the side target visual component is determined according to the actual physical length of the tray long side and the horizontal projection physical length. The single-side tray inclination angles corresponding to the two side target visual components are fused to generate the tray inclination angle.

7. The method of claim 6, wherein, The determination of the offset comprises: The horizontal coordinate of the center point of the inclined tray is determined according to the tray inclination angle and the target horizontal center point of the tray; The average length of the horizontal projection of the tray photographed by the two side target visual components, the horizontal coordinate and the actual length of the tray long side are used to determine the offset of the current tray center point from the target horizontal center point, and the offset comprises a horizontal offset and a vertical offset.

8. The method of claim 1, wherein, The positioning detection of the preset component of the engine in the image comprises: In response to the positioning detection comprising fan detection, the area where the fan is located in the image is determined as a candidate fan area; The outline in the candidate fan area is determined, and the outline of the fan bolt in the candidate fan area is strengthened to increase the contrast between the fan bolt and the background; The center points of the fan bolts are determined in the outline of the candidate fan area to obtain a center point set; For each two points in the center point set, two effective intersection points of two circles are drawn with the two points as the centers and the distance between the two points as the radius, and a square matrix of pixels is constructed with each pixel in the square matrix as a center pixel; The pixel point with the largest value obtained by position superposition of the square matrix corresponding to each point in the center point set is taken as a candidate center point of the fan, and positioning detection is performed according to the candidate center point.

9. The method of claim 1, wherein, The photographing of the preset component of the engine for positioning detection comprises: In response to the positioning detection including the fan detection, a middle region in the image is intercepted to obtain an intercepted image; Color space of the intercepted image is converted from BGR to HSV, and a contour of the fan in data of a saturation S channel in the color space is enhanced to obtain an enhanced result, so as to increase contrast between the fan and the background; Contour detection is performed on the enhanced result, and a convex hull is generated for each contour, and in each contour, a contour with a roundness greater than a roundness threshold and a circumscribed circle radius greater than a radius threshold is determined as a target contour; A positioning detection result is determined according to each target contour.

10. An engine positioning device in a production line, characterized by The application is applied to a positioning system, and the positioning system comprises a visual component, a tray alignment mechanism, and the device comprises: A pause unit configured to pause transmission of the plate chain line in response to the engine entering a preset detection area along the plate chain line; A type determination unit configured to determine a tray type of a tray of the engine on the plate chain line; A correction unit configured to, if the tray type is a non-metal tray, determine a deviation amount of the tray, and determine position correction data of a mechanical device for visual detection of the engine according to the deviation amount; A control unit configured to, if the tray type is a metal tray, control the tray alignment mechanism to align the tray; A detection unit configured to, for an image collected by a target visual component in the visual component, perform positioning detection on a preset component of the engine in the image, the target visual component being a visual component for image collection of the engine; The visual component is a visual component arranged on each side of the engine after the pause, the preset component is a fan and a flywheel, and the two sides include a fan side and a flywheel side of the engine, and the visual component on each side comprises a camera, an optical lens, and a coaxial light source; The detection unit is further configured to perform the positioning detection on the preset component of the engine in the image in the following manner: In response to the positioning detection including flywheel detection, first model-based frame positioning detection is performed on a flywheel presented in the image to obtain a plurality of frame positioning results and corresponding confidence levels; A circle detection model with a detection accuracy greater than that of the first model is used to detect the plurality of frame positioning results to obtain circle positioning results; A center distance between the circle positioning results and the frame positioning results is determined, and if the center distance is less than a preset threshold, a positioning detection result is determined according to the circle positioning results.

Citation Information

Patent Citations

  • Rectangular workpiece automatic positioning clamping device

    CN106808270A

  • Tray pose estimation method and system and storage medium

    CN117893613A