Target slot identification method and device, equipment, medium and product
Through the target slot recognition method, parallel line cluster analysis and rotation transformation technology are used to solve the problem of achieving high-precision memory stick slot positioning in scenarios without relative position constraints, and the assembly efficiency is improved.
Patent Information
- Application Number
- CN202510221248.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2045-02-27
AI Technical Summary
In the field of servers, it is difficult for the prior art to realize high-precision memory slot positioning in scenarios without relative position constraints, resulting in low assembly efficiency.
Through the target slot recognition method, the image of the server motherboard is obtained, the parallel line cluster analysis is performed, the angle of the target slot is calculated, and the corrected image is obtained through rotation transformation, and the position of the target slot is determined based on the similarity between the template image and the corrected image.
Compatibility with arbitrary inclination is achieved, ensuring accurate determination of the rotation angle under different motherboard postures, reducing the number of times the corrected image and template image matches, and improving assembly efficiency.
Smart Images

Figure CN119722804A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of server motherboard installation, and in particular to a target slot identification method, device, equipment, medium and product. Background Art
[0002] In the server field, memory module assembly is an important and complex task. Currently, it mainly relies on manual assembly or manual assembly, which results in low overall installation efficiency.
[0003] In the related art, the assembly of memory sticks uses a robotic arm and an external fixed-angle industrial camera to achieve positioning detection. When the industrial camera detects the memory card slot and aligns the hole position, the relative positions of the server motherboard, the external industrial camera, the memory stick loading device and the robot are required to remain fixed and must be placed in a pre-set position. However, when the product model of the server motherboard changes, the corresponding number of memory slots and the position of the memory slots will also change. This pre-set position condition is no longer applicable, and manpower needs to be re-invested to measure the memory slot position of the corresponding product model. When the product model changes frequently, the corresponding industrial assembly line position needs to be adjusted multiple times, which reduces the flexibility and compatibility of the assembly process.
[0004] Therefore, in a scenario without relative position constraints, how to achieve high-precision positioning of memory stick slots is an issue that needs to be solved urgently. Summary of the invention
[0005] The present application provides a target slot identification method, device, equipment, medium and product to at least solve the problem in the related art that high-precision memory slot positioning cannot be achieved in a scenario without relative position constraints.
[0006] The present application provides a target slot identification method, which is applied to a target slot identification system. The system includes a server mainboard, and the server mainboard includes at least one target slot. The method includes: In response to a target slot identification instruction input by a user, a first image is acquired; the first image is an image of a candidate area including the target slot; Based on the first image, obtaining a target slot texture map; Performing parallel line cluster analysis on the target slot texture image to calculate a first angle; the first angle is the angle between the target parallel line cluster and the vertical direction of the first image; the target parallel line cluster is a parallel line cluster corresponding to the outline of the target slot; Rotating the first image according to a first angle and a complementary angle of the first angle to obtain a corrected image; Based on the local area similarity between the plurality of template images and the corrected image, the position of the at least one target slot is determined.
[0007] The present application also provides a target slot identification device, which is applied to a target slot identification system. The system includes a server mainboard, and the server mainboard includes at least one target slot. The device includes: A response module, configured to acquire a first image in response to a target slot identification instruction input by a user; the first image is an image of a candidate area including the target slot; An acquisition module, used for acquiring a target slot texture map based on the first image; A detection module, configured to perform parallel line cluster analysis on the target slot texture image and calculate a first angle; the first angle is an angle between the target parallel line cluster and a direction perpendicular to the first image; the target parallel line cluster is a parallel line cluster corresponding to the contour of the target slot; A rotation module, used for rotating the first image according to a first angle and a complementary angle of the first angle to obtain a corrected image; A determination module is used to determine the position of the at least one target slot based on the local area similarity between multiple template images and the corrected image.
[0008] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned target slot identification methods when executing the computer program.
[0009] The present application also provides a computer-readable storage medium, in which a computer program is stored, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned target slot identification methods are implemented.
[0010] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned target slot identification methods when executed by a processor.
[0011] Through the present application, since the target slot identification system has no restrictions on the initial placement position of the server motherboard and the regional position of the memory bar on the server motherboard, it is compatible with the forms of different operation pipelines and various product models, avoiding the system redesign and debugging caused by the adjustment of the server motherboard or pipeline, and improving the flexibility of the system. By obtaining the target slot texture map corresponding to the first image, a parallel line cluster detection method is designed based on the appearance characteristics of the memory bar slot, and the target slot texture map is subjected to parallel line cluster detection to obtain the angle (i.e., the first angle) between the target parallel line cluster and the vertical direction of the first image. Since the target slot texture map includes the texture characteristics of the target slot, the computational complexity of the straight line fitting is effectively reduced. At the same time, since the first angle is the angle between the target parallel line cluster (i.e., the parallel line cluster corresponding to the outline of the target slot) in the first image and the vertical direction of the image, the first image is rotated and transformed according to the first angle and the complementary angle of the first angle respectively, and a corrected image can be obtained. Based on the local area similarity between multiple template images and the corrected image, the position of at least one target slot is determined. That is, by utilizing the parallel line characteristics of the memory slots, the rotation angle of the server motherboard is calculated through mathematical analysis, thereby achieving compatibility with arbitrary inclination angles and ensuring that the rotation angle of the motherboard can be accurately determined under different motherboard postures. Since the rotation angle of the motherboard is determined, the number of matches between the corrected image and the template image is reduced, further improving the assembly efficiency. Therefore, the technical problem of achieving high-precision positioning of the memory slot in a scenario without relative position constraints can be solved, thereby achieving the technical effect of improving assembly efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0013] Figure 1 A schematic diagram of the structure of a target slot identification system provided in an embodiment of the present application; Figure 2 One of the flow charts of a target slot identification method provided in an embodiment of the present application; Figure 3 A second flow chart of a target slot identification method provided in an embodiment of the present application; Figure 4 A schematic diagram of the structure of a target slot identification device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0014] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0015] It should be noted that, in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence.
[0016] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0017] With the rapid development of automation technology, composite robots, as advanced equipment integrating multiple functions, are gradually becoming the focus of the industrial field. Composite robots are usually composed of multiple components such as mobile chassis, robotic arms, visual systems, and end effectors. They can autonomously navigate and perform diverse tasks in complex industrial scenarios. In the field of high-precision assembly, the application of composite robots has made certain progress. They can complete some assembly tasks with high precision requirements with precise motion control and flexible operation methods. For example, in the server field, when using composite robots to install server memory bars, multiple high-precision positioning processes are involved, including the coordinate system positioning of the composite robot body, as well as the precise positioning of external workpieces and installation spaces. When using composite robots to assemble memory bars, since the robotic arms are installed on a movable base, the installation scheme using fixed relative positions in traditional industrial scenarios cannot be adopted. Therefore, in this case where strong position constraints cannot be imposed, how to achieve high-precision memory bar slot positioning is an urgent problem to be solved.
[0018] In conjunction with the specific application environment architecture or the specific hardware architecture on which the execution of the target slot identification method depends, the specific application environment architecture or the specific hardware architecture is described herein.
[0019] The embodiment of the present application provides a target slot identification system, referring to Figure 1As shown, the system includes: a target robot 101, a camera 102, a workbench 103 and a server motherboard 104, wherein the camera 102 is installed at the end of the mechanical arm of the target robot 101, the server motherboard 104 is placed on the plane of the workbench 103, and the server motherboard 104 includes at least one target slot. Among them, the target robot 101 may include but is not limited to a composite robot. A composite robot is a multifunctional robot system formed by integrating different types of robot technologies and functional modules, and usually has multiple capabilities such as movement, operation, perception and intelligent decision-making. A common form of a composite robot is to integrate a mobile robot (such as AGV: Automated Guided Vehicle, automatic guided transport vehicle) with an industrial robot (such as a robotic arm) to form a robot with integrated comprehensive capabilities of "hand-foot-eye-brain". The camera 102 may include but is not limited to a hand-eye camera. A hand-eye camera is a technology that combines a robot (robotic arm) with a visual system (camera) to achieve precise visual positioning and operational control. It calibrates the coordinate relationship between the camera and the robotic arm so that the robotic arm can accurately perform tasks based on the visual information provided by the camera. The system structure has no restrictions on the initial placement of the server motherboard 104 and the regional location of the memory stick on the server motherboard 104, so it is compatible with different operation pipeline forms and various product models. At the same time, it facilitates flexible layout and equipment upgrades in industrial applications, avoids system redesign and debugging due to adjustments to the server motherboard or pipeline, and improves the flexibility of the system.
[0020] An embodiment of the present application provides a target slot identification method, which is applied to a target slot identification system. The method is described in detail in conjunction with the execution flow of the target slot identification method.
[0021] In the embodiment of the present application, a controller is installed inside the target robot, and a robot scheduling application is installed on the controller. The robot scheduling application includes multiple tasks, one of which is memory bar assembly. The memory bar assembly task can be divided into multiple subtasks, for example, subtask 1: grabbing the memory bar; subtask 2: detecting the posture of the memory bar; subtask 3: identifying the memory slot position; subtask 4: installing the memory bar. The embodiment of the present application takes subtask 3 (identifying the memory slot position) as an example for detailed description.
[0022] Reference Figure 2 As shown, the target slot identification method provided by the embodiment of the present invention includes the following steps: S21 . Acquire a first image in response to a target slot identification instruction input by a user.
[0023] The first image is an image of a candidate area including a target slot. It should be noted that, although the embodiment of the present application takes the target slot as a memory stick slot as an example for explanation, in actual applications, the target slot includes but is not limited to a memory stick slot, and may also be a PCIe (Peripheral Component Interconnect Express) slot, or other types of slots on a server motherboard.
[0024] Specifically, the controller of the target robot acquires a first image of the candidate area including the target slot in response to a target slot recognition instruction input by a user.
[0025] Optionally, refer to Figure 3 As shown, the above step S21 (acquiring the first image in response to the target slot identification instruction input by the user) can be implemented by the following steps: S31 . In response to a target slot identification instruction input by a user, an initial image is acquired.
[0026] The initial image includes the entire workbench plane. The initial image may have a large scale factor in the vertical direction of the workbench, that is, the vertical distance between the camera and the workbench plane is large, resulting in a small proportion of the server motherboard on the workbench plane in the initial image. Therefore, further target detection is required to determine the position of the server motherboard.
[0027] S32: Perform target detection on the initial image to determine the position of the server mainboard.
[0028] Object detection, i.e., taking the initial image as input, outputs the bounding box of the server motherboard.
[0029] S33. Acquire a server mainboard image according to the position of the server mainboard.
[0030] It is understandable that the controller of the target robot adjusts the position of the end of the robot arm according to the position of the server mainboard, and obtains the image of the server mainboard on the workbench plane.
[0031] S34: Perform target detection on the server mainboard image to determine the position of the target slot.
[0032] Furthermore, target detection is performed on the server motherboard image to obtain a bounding box of the target slot to determine the position of the target slot.
[0033] S35. At the position of the target slot in the server mainboard image, determine a candidate area of the target slot according to a preset rule to obtain the first image.
[0034] The preset rule may be to magnify the position of the target slot by a preset multiple and select a candidate area, wherein the preset multiple may be 1.2, or 1.5, or other reasonable values.
[0035] Specifically, the target robot responds to the target slot recognition command input by the user, moves to the vicinity of the workbench, ensures that the server motherboard is within the working space of the robot arm, adjusts the posture of the end of the robot arm, and makes the camera shoot perpendicular to the plane of the workbench to obtain the initial image. Perform target detection on the initial image to determine the position of the server motherboard, and then adjust the position of the end of the robot arm according to the position of the server motherboard, so that the camera is close to the motherboard to shoot, obtain the server motherboard image, perform target detection on the server motherboard image, and determine the position of the target slot. At the position of the target slot in the server motherboard image, determine the candidate area of the target slot according to the preset rules to obtain the first image.
[0036] Since the position of the target slot obtained by the target detection algorithm is presented in the form of a bounding box, the orientation and position of the target slot cannot be accurately obtained and cannot be directly applied to high-precision assembly. In scenarios without relative position constraints, it is necessary to determine the rotation angle of the motherboard in the plane of the workbench and the scale factor in the vertical direction of the workbench to achieve high-precision assembly.
[0037] Among them, the scale scaling factor in the vertical direction of the workbench is usually used to describe the size change or proportional relationship of the server motherboard in the image taken in the vertical direction of the workbench. In robot operation, assuming that the camera is shooting perpendicular to the plane of the workbench, if the height of the workbench changes, the proportion of the server motherboard to the plane of the workbench in the image captured by the camera will change. For example, the greater the distance between the camera and the workbench, the smaller the proportion of the server motherboard to the plane of the workbench in the captured image; the smaller the distance between the camera and the workbench, the larger the proportion of the server motherboard to the plane of the workbench in the captured image.
[0038] S22. Based on the first image, obtain a target slot texture map.
[0039] In some embodiments, the above step S22 (obtaining a target slot texture map based on the first image) can be implemented by the following steps: A. By establishing a probability distribution model, the first image is back-projected to obtain a target slot probability map corresponding to the first image.
[0040] In image processing, backprojection is a method that uses a probability distribution model to identify specific features in an image. Backprojection enhances the areas in the image that match the model by applying the probability distribution model of the model image to the source image.
[0041] The steps of backprojection include: first, calculating the probability distribution model of the model image (i.e., the image containing the target object), which is usually achieved by calculating the histogram of the image. The histogram describes the distribution of pixel values in the model image and is used to represent the color or grayscale distribution of the image. Then, the calculated probability distribution model of the model image is applied to the source image, that is, the area matching the histogram of the model image is found in the source image, and the degree of matching is used as the pixel value of the new image (backprojection image). In the backprojection image, the areas with a high degree of matching with the model image will be enhanced, making these areas more prominent in the image, which is convenient for subsequent processing and analysis.
[0042] In some embodiments, the above step A (by establishing a probability distribution model, performing back-projection on the first image, and obtaining a target slot probability map corresponding to the first image) can be implemented by the following steps: (1) Obtain a preset template image of a pre-stored target slot.
[0043] Specifically, the motherboard model of the server to be installed and the appearance characteristics of multiple components used by the server are stored in advance in the memory of the target robot. It should be noted that the memory slots may have different colors, and the standard template image of the memory slot can be obtained by matching the fields, names, and serial numbers. That is, first obtain the template list through the model of the server motherboard; then find the standard template image of the memory slot in the template list through the name of the target slot.
[0044] (2) Establishing a probability distribution model based on the preset template image to obtain the probability distribution of the appearance features of the preset template image.
[0045] Specifically, a standard template image of a memory slot is pre-stored, a probability distribution model is established based on the template image, and the probability distribution of the appearance features of the preset template image is obtained. Assume that the pixel points of the preset template image , whose domain is ,in and Represent the height and width of the image respectively, then the probability distribution model of the preset template image is as follows: .
[0046] in, Represents the probability distribution of the appearance features of the standard template image, where the appearance features include but are not limited to color, texture, etc.; is the Kronecker function, is the normalization coefficient. The independent variables of the Kronecker function are generally two integers. When the two input values are equal, the function output value is 1, otherwise it is 0. In image recognition tasks, by using the Kronecker function, a model can be built to describe the correlation between different regions or pixels in the image, thereby helping to identify and classify image content.
[0047] For example, For the pixel intervals divided, for example 0-19, 20-39, 40-59..., 240-255, that is, Indicates when belong When , the delta function outputs 1. Representation Statistics The pixel value in the range is The normalized number of pixels in the interval.
[0048] (3) Apply the probability distribution of the appearance features of the preset template image to the first image for back projection to obtain a target slot probability map.
[0049] Specifically, the above probability distribution model is applied to the first image for back projection to obtain the target slot probability map. Assume that the pixel points of the first image are , whose domain is ,in, and Represent the height and width of the image respectively, and define the mapping function , For the probability defined on the gray value set, we have: .
[0050] in, is the Gaussian kernel function, representing a probability distribution of appearance features of the first image; is the standard deviation of the Gaussian distribution, which controls the smoothness of the kernel function; represents the pixel coordinates of the center point of the first image; Represents the probability that any pixel in the first image belongs to a memory slot.
[0051] Specifically, by establishing a probability distribution model of a preset template image, the calculated probability distribution model of the preset template image is applied to the first image, and reverse projection is performed to obtain the probability that each pixel in the first image belongs to a memory slot, that is, to obtain a target slot probability map.
[0052] B. Preprocess the target slot probability map and the first image to obtain a target slot texture map.
[0053] In some embodiments, the above step B (preprocessing the target slot probability map and the first image to obtain the target slot texture map) can be implemented by the following steps: 1) Binarizing the target slot probability map to obtain a target slot probability binary map.
[0054] Among them, binarization processing is the process of converting the elements in an image or data into only two values according to certain threshold conditions. Usually, these two values are 0 and 1, or black and white. That is, the image or data originally with multiple gray levels or color values is simplified into a binary image or binary data with only two states.
[0055] 2) Grayscale the first image to obtain a grayscale image of the target slot.
[0056] Grayscale refers to the process of converting a color image (usually in RGB format) into a grayscale image. Each pixel of a color image consists of three color channels (red, green, and blue), while each pixel of a grayscale image has only one intensity value (grayscale value), usually ranging from 0 to 255. The core of grayscale is to map the color pixel value to a single grayscale value.
[0057] Specifically, the first image is grayed to obtain a grayscale image of the target slot, so as to reduce noise in the image and highlight line features in the image.
[0058] 3) Based on the target slot probability binary map and the target slot grayscale map, a target slot texture map is obtained.
[0059] Wherein, based on the target slot probability binary map and the target slot grayscale map, obtaining the target slot texture map can be achieved through the following steps ab: a. Perform edge detection on the target slot grayscale image to obtain a target slot texture feature image.
[0060] Among them, the core of edge detection is to identify edges by calculating the gradient of the image (that is, the rate of change of pixel values).
[0061] Specifically, edge lines in the grayscale image of the target slot are identified by an edge detection algorithm. Edge detection is a key step in parallel line detection, which facilitates the identification of possible straight lines in the image.
[0062] b. Performing point-wise multiplication on the target slot texture feature map and the target slot probability binary map to obtain a target slot texture map.
[0063] Point multiplication is to multiply the values of two different types of feature maps at the same position element by element.
[0064] Specifically, by performing point multiplication of the memory slot texture map with the memory slot probability binary map, the area related to the memory slot texture in the image can be enhanced, while the area unrelated to the memory slot texture can be suppressed, thereby obtaining a memory slot texture map that combines color appearance and texture features.
[0065] S23, performing parallel line cluster analysis on the target slot texture map to calculate a first angle.
[0066] The first angle is the angle between the target parallel line cluster in the first image and the vertical direction of the image. The target parallel line cluster is the parallel line cluster with the largest number of straight lines in the target straight line set, that is, the parallel line cluster corresponding to the outline of the target slot.
[0067] In some embodiments, the above step S23 (performing parallel line cluster analysis on the target slot texture map to calculate the first angle) can be implemented by the following steps: Perform Hough transform straight line detection on the target slot texture map to obtain a target straight line set.
[0068] The target straight line set includes straight lines whose length is greater than a preset length. It is understandable that the shape of the memory slot is different from the shape of other components (such as capacitors, resistors, etc.) on the server motherboard, and the length of other components is generally smaller than the length of the memory slot. Therefore, the preset length can be set according to the shape of the memory slot.
[0069] Hough transform line detection maps points in the image space to parameter space to detect straight lines in the image. Hough transform line detection can identify straight lines in the image, including parallel lines. Features such as the direction, length, and position of the detected straight lines are extracted to facilitate the subsequent identification of parallel line clusters in the image.
[0070] Specifically, Hough transform straight line detection is performed on the target slot texture map to obtain a target straight line set whose straight line length is greater than a preset length.
[0071] Perform parallel line cluster detection on the target straight line set to obtain the sequence number of the target parallel line cluster.
[0072] The target parallel line cluster is a parallel line cluster with the largest number of straight lines in the target straight line set.
[0073] Parallel line cluster detection,The extracted features can be clustered using a clustering algorithm to identify,parallel line clusters in the image.
[0074] Specifically, all straight lines are detected through Hough transform Parameters, according to The detected straight lines are clustered by Straight lines with similar values are grouped together as a parallel line cluster. In order to determine whether two straight lines are parallel, an angle threshold can be set. When the difference between the values is less than this threshold, they are considered parallel.
[0075] A first angle is obtained based on the sequence number of the target parallel line cluster.
[0076] Specifically, Hough transform line detection is performed in the memory slot texture map to detect all lines whose length is greater than a preset length, and a set of lines expressed in polar coordinates is obtained. , is obtained by Hough transform A collection of which , is the number of straight lines.
[0077] In straight line collection In order to facilitate calculation, the polar coordinate form is converted to Coordinate system. It should be noted that the polar coordinate system uses an angle and a distance to represent the position of a point on a plane. The rectangular coordinate system consists of a set of mutually perpendicular coordinate axes, the x-axis (horizontal direction) and the y-axis (vertical direction).
[0078] Suppose there is a point on the line ,make , , along its straight line direction is Take two other points , we can obtain the following relationship: .
[0079] Express the line as a vector: .
[0080] in, The vector form representing each line in the line set.
[0081] Will After normalizing each row of ,definition: .
[0082] in, Represents the absolute value matrix of the cosine of the angle between two straight line vectors represents the absolute value, Indicates The root straight line and The absolute value of the cosine of the angle between the two straight lines.
[0083] .
[0084] in, Represents the matrix The intermediate process matrix after column summation; It represents the sum of the cosines of the angles between the first straight line and all other straight lines.
[0085] Then the main conductor number of the parallel line cluster is Serial number , represents the infinite norm of a vector, then .
[0086] in, express No. row vectors, Represents along the image coordinate system Unit vector in the direction of the axis. Represents the target parallel line cluster and the first image The target parallel line cluster refers to the parallel line cluster with the largest number of straight lines obtained by performing parallel line cluster detection on the straight line set in the first image. It should be noted that the embodiment of the present disclosure is described by taking a server motherboard including a target slot as an example. If the server motherboard includes multiple target slots, then multiple target parallel line clusters are detected.
[0087] S24. Rotate the first image according to a first angle and a complementary angle of the first angle to obtain a corrected image.
[0088] The sum of the first angle and the complementary angle of the first angle is 180°.
[0089] In some embodiments, the above step S24 (rotating the first image according to the first angle and the complementary angle of the first angle to obtain a corrected image) can be implemented by the following steps: Taking the center point of the first image as the rotation origin, performing a rotation transformation on the first image according to a first angle to obtain a corrected second image; Taking the center point of the first image as the rotation origin, the first image is rotated according to a complementary angle of the first angle to obtain a corrected third image.
[0090] Specifically, the center point of the first image is the rotation origin, respectively and angle The first image is subjected to the following rotation transformation to obtain the corrected second image and third image.
[0091] .
[0092] in, Represents the number of pixels around the center point in the first image. Perform a rotation transformation, Indicates that the image is rotated counterclockwise according to this rotation angle.
[0093] In some embodiments, before executing step S25 (determining the position of the at least one target slot based on the local area similarities between the multiple template images and the corrected image), the following steps are further executed: An image pyramid is established for the preset template image within the target scale scaling length range with a preset length as the step length.
[0094] The image pyramid includes template images corresponding to multiple different scale scaling factors. The preset length can be selected according to the actual application scenario. For example, the preset length can be selected as 0.01, 0.02, 0.05, etc., or other reasonable values. The target scale scaling length range can be selected according to the actual application scenario. For example, the target scale scaling length range can be selected as 0.90-1.10, or other reasonable values.
[0095] Specifically, is the step length, An image pyramid is established for a pre-stored memory slot standard template image within the target scale scaling length range. The image pyramid is a multi-resolution representation method used to analyze and process images at different scales. By generating a series of gradually reduced (or enlarged) images, the algorithm is helped to capture the features of the image at different scales, thereby improving the robustness and efficiency of the algorithm. In an embodiment of the present application, the image pyramid includes upsampling or downsampling the memory slot standard template image to generate a series of gradually reduced (or enlarged) images.
[0096] All template images in the image pyramid are traversed, and similarities between each template image and local areas of the second image and the third image are respectively calculated.
[0097] Optionally, the above step (respectively calculating the similarity between each template image and the local area of the second image and the third image) can be implemented as follows: Slide all the template images in the image pyramid on the second image pixel by pixel, and calculate the similarity between the template image and the local area of the second image at each position; All template images in the image pyramid are slid pixel by pixel on the third image respectively, and the similarity between the template image and the local area of the third image is calculated at each position.
[0098] Specifically, all the template images in the image pyramid are slid pixel by pixel on the second image, and the similarity between each template image and the local area of the second image is calculated at each position; all the template images in the image pyramid are slid pixel by pixel on the third image, and the similarity between each template image and the local area of the third image is calculated at each position.
[0099] S25. Determine the position of the at least one target slot based on local area similarities between the multiple template images and the corrected image.
[0100] In some embodiments, the above step S25 (determining the position of the at least one target slot based on the local area similarity between the multiple template images and the corrected image) can be implemented as follows: The local area similarities between the plurality of template images and the corrected image are sorted to determine the target similarity.
[0101] The target similarity is the maximum local region similarity among multiple local region similarities between the multiple template images and the corrected image.
[0102] Determine the scale scaling factor corresponding to the target similarity as the target scale scaling factor in the vertical direction of the workbench; Determining a predicted target slot position according to the target scale scaling factor; The predicted target slot position is subjected to an inverse transformation of the rotation transformation to obtain a target slot position.
[0103] Specifically, all template images in the image pyramid are traversed, and a sliding window strategy is used to perform correlation template matching. The scale corresponding to the maximum response value is used as the scale scaling factor s in the vertical direction of the workbench. The position with the maximum correlation response under the scale scaling factor s is the position of the predicted target slot. The correlation template matching method used in this embodiment may include but is not limited to normalized cross correlation (NCC), and other similar template matching methods may also be used. Since the predicted target slot position in this step is obtained based on the second image or the third image, it is necessary to perform an inverse transformation of the rotation transformation on the predicted target slot position to obtain the target slot position of the first image.
[0104] In the related art, a fixed step size is usually used to generate N scaling factors and M (M is generally 360, that is, each angle must be matched) rotation angles, and then N×M templates are generated for matching one by one. The present application utilizes the parallel line characteristics of the memory slots and obtains the rotation angle of the server motherboard through mathematical analysis and calculation, thereby reducing the number of required templates and the number of matches by one dimension. This optimization greatly accelerates the matching process while maintaining positioning accuracy, which can be accelerated hundreds of times compared to traditional solutions, significantly improving the efficiency and speed of assembly.
[0105] The target slot identification method provided by the embodiment of the present disclosure has no restrictions on the initial placement position of the server motherboard and the regional position of the memory bar on the server motherboard, so it is compatible with different operation pipeline forms and various product models, avoiding system redesign and debugging caused by the adjustment of the server motherboard or pipeline, and improving the flexibility of the system. By obtaining the target slot texture map corresponding to the first image, a parallel line cluster detection method is designed based on the appearance characteristics of the memory bar slot, and the target slot texture map is detected. The angle (i.e., the first angle) between the target parallel line cluster and the vertical direction of the first image is obtained. Since the target slot texture map includes the texture characteristics of the target slot, the computational complexity of the straight line fitting is effectively reduced. At the same time, since the first angle is the angle between the target parallel line cluster (i.e., the parallel line cluster corresponding to the outline of the target slot) in the first image and the vertical direction of the image, the first image is rotated and transformed according to the first angle and the complementary angle of the first angle respectively, and a corrected image can be obtained. Based on the local area similarity between multiple template images and the corrected image, the position of at least one target slot is determined. That is, by utilizing the parallel line characteristics of the memory slots, the rotation angle of the server motherboard is calculated through mathematical analysis, thereby achieving compatibility with arbitrary inclination angles and ensuring that the rotation angle of the motherboard can be accurately determined under different motherboard postures. Since the rotation angle of the motherboard is determined, the number of matches between the corrected image and the template image is reduced, further improving the assembly efficiency. Therefore, the technical problem of achieving high-precision positioning of the memory slot in a scenario without relative position constraints can be solved, thereby achieving the technical effect of improving assembly efficiency.
[0106] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.
[0107] The embodiment of the present application also provides a target slot identification device, and the omitted virtual device claim content should be described in detail in the specification, corresponding one-to-one with the method claim.
[0108] Figure 4 A schematic diagram of the structure of a target slot identification device 400 provided by the present disclosure is shown in FIG. Figure 4 As shown, the device of this embodiment includes: a response module 410, an acquisition module 420, a detection module 430, a rotation module 440 and a determination module 450, wherein: The response module 410 is used to obtain a first image in response to a target slot identification instruction input by a user; the first image is an image of a candidate area including the target slot; An acquisition module 420, configured to acquire a target slot texture map based on the first image; The detection module 430 is used to perform parallel line cluster analysis on the target slot texture image and calculate a first angle; the first angle is the angle between the target parallel line cluster and the vertical direction of the first image; the target parallel line cluster is a parallel line cluster corresponding to the contour of the target slot; A rotation module 440, configured to perform rotation transformation on the first image according to a first angle and a complementary angle of the first angle to obtain a corrected image; The determination module 450 is configured to determine the position of the at least one target slot based on the local area similarity between the plurality of template images and the corrected image.
[0109] As an optional implementation of the embodiment of the present disclosure, the response module 410 is specifically used to: In response to a target slot identification instruction input by a user, acquiring an initial image; Performing target detection on the initial image to determine the position of the server mainboard; Acquire a server mainboard image according to the position of the server mainboard; Performing target detection on the server mainboard image to determine the position of the target slot; At the position of the target slot in the server mainboard image, a candidate area of the target slot is determined by a preset rule to obtain the first image.
[0110] As an optional implementation of the embodiment of the present disclosure, the acquisition module 420 includes: A projection unit, configured to perform reverse projection on the first image by establishing a probability distribution model, so as to obtain a target slot probability map corresponding to the first image; A binarization processing unit, used for performing binarization processing on the target slot probability map to obtain a target slot probability binary map; A grayscale processing unit, used for performing grayscale processing on the first image to obtain a grayscale image of a target slot; An acquisition unit is used to acquire a target slot texture map based on the target slot probability binary map and the target slot grayscale map.
[0111] As an optional implementation of the embodiment of the present disclosure, the projection unit is specifically used for: Obtain a preset template image of a pre-stored target slot; Establishing a probability distribution model based on the preset template image to obtain a probability distribution of appearance features of the preset template image; The probability distribution of the appearance features of the preset template image is applied to the first image for back projection to obtain a target slot probability map.
[0112] As an optional implementation of the embodiment of the present disclosure, the acquisition unit is specifically used to: Performing edge detection on the target slot grayscale image to obtain a target slot texture feature image; The target slot texture feature map is point-wise multiplied with the target slot probability binary map to obtain a target slot texture map.
[0113] As an optional implementation of the embodiment of the present disclosure, the detection module 430 includes: A line detection unit, used for performing Hough transform line detection on the target slot texture map to obtain a target line set, wherein the target line set includes lines whose line lengths are greater than a preset length; A parallel line cluster detection unit, configured to perform parallel line cluster detection on the target straight line set to obtain a sequence number of the target parallel line cluster; the target parallel line cluster is a parallel line cluster having the largest number of straight lines in the target straight line set; The angle acquisition unit is used to acquire a first angle based on the sequence number of the target parallel line cluster.
[0114] As an optional implementation of the embodiment of the present disclosure, the rotation module 440 is specifically used for: Taking the center point of the first image as the rotation origin, performing a rotation transformation on the first image according to a first angle to obtain a corrected second image; Taking the center point of the first image as the rotation origin, the first image is rotated according to a complementary angle of the first angle to obtain a corrected third image.
[0115] As an optional implementation of the embodiment of the present disclosure, the device further includes a calculation module, and the calculation module includes: An establishing unit, used to establish an image pyramid for a preset template image within a target scale scaling length range with a preset length as a step length; the image pyramid includes a plurality of template images corresponding to different scale scaling coefficients; The calculation unit is used to traverse all the template images in the image pyramid and respectively calculate the similarity between each template image and the local area of the second image and the third image.
[0116] As an optional implementation of the embodiment of the present disclosure, the computing unit is specifically configured to: Slide all the template images in the image pyramid on the second image pixel by pixel, and calculate the similarity between the template image and the local area of the second image at each position; and; All template images in the image pyramid are slid pixel by pixel on the third image respectively, and the similarity between the template image and the local area of the third image is calculated at each position.
[0117] As an optional implementation of the embodiment of the present disclosure, the determining module 450 is specifically configured to: Determine that the scale scaling factor corresponding to the highest similarity is the target scale scaling factor in the vertical direction of the workbench; Determining a predicted target slot position according to the target scale scaling factor; The predicted target slot position is subjected to an inverse transformation of the rotation transformation to obtain a target slot position.
[0118] The description of the features in the embodiment corresponding to the target slot identification device 400 can refer to the relevant description of the embodiment corresponding to the target slot identification method, which will not be repeated here.
[0119] The target slot identification device provided by the embodiment of the present disclosure has no restrictions on the initial placement position of the server motherboard and the regional position of the memory bar on the server motherboard, so it is compatible with different operation pipeline forms and various product models, avoiding system redesign and debugging caused by the adjustment of the server motherboard or pipeline, and improving the flexibility of the system. By obtaining the target slot texture map corresponding to the first image, a parallel line cluster detection method is designed based on the appearance characteristics of the memory bar slot, and the target slot texture map is detected. The angle (i.e., the first angle) between the target parallel line cluster and the vertical direction of the first image is obtained. Since the target slot texture map includes the texture characteristics of the target slot, the calculation complexity of the straight line fitting is effectively reduced. At the same time, since the first angle is the angle between the target parallel line cluster (i.e., the parallel line cluster corresponding to the outline of the target slot) in the first image and the vertical direction of the image, the first image is rotated and transformed according to the first angle and the complementary angle of the first angle respectively, and a corrected image can be obtained. Based on the local area similarity between multiple template images and the corrected image, the position of at least one target slot is determined. That is, by utilizing the parallel line characteristics of the memory slots, the rotation angle of the server motherboard is calculated through mathematical analysis, thereby achieving compatibility with arbitrary inclination angles and ensuring that the rotation angle of the motherboard can be accurately determined under different motherboard postures. Since the rotation angle of the motherboard is determined, the number of matches between the corrected image and the template image is reduced, further improving the assembly efficiency. Therefore, the technical problem of achieving high-precision positioning of the memory slot in a scenario without relative position constraints can be solved, thereby achieving the technical effect of improving assembly efficiency.
[0120] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned target slot identification method embodiments.
[0121] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned target slot identification method embodiments when running.
[0122] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0123] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above target slot identification method embodiments are implemented.
[0124] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned target slot identification method embodiments are implemented.
[0125] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0126] The above is a detailed introduction to a target slot identification method provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A target slot identification method, characterized in that: Applied to a target slot identification system, the system includes a server mainboard, the server mainboard includes at least one target slot; the method includes: In response to a target slot identification instruction input by a user, a first image is acquired; the first image is an image of a candidate area including the target slot; Based on the first image, obtaining a target slot texture map; Performing parallel line cluster analysis on the target slot texture image to calculate a first angle; the first angle is the angle between the target parallel line cluster and the vertical direction of the first image; the target parallel line cluster is a parallel line cluster corresponding to the outline of the target slot; Rotating the first image according to a first angle and a complementary angle of the first angle to obtain a corrected image; Based on the local area similarity between the plurality of template images and the corrected image, the position of the at least one target slot is determined.
2. The target slot identification method according to claim 1, characterized in that: The step of acquiring a first image in response to a target slot identification instruction input by a user comprises: In response to a target slot identification instruction input by a user, acquiring an initial image; Performing target detection on the initial image to determine the position of the server mainboard; Acquire a server mainboard image according to the position of the server mainboard; Performing target detection on the server mainboard image to determine the position of the target slot; At the position of the target slot in the server mainboard image, a candidate area of the target slot is determined by a preset rule to obtain the first image.
3. The target slot identification method according to claim 1, characterized in that: The step of acquiring a target slot texture map based on the first image includes: By establishing a probability distribution model, the first image is back-projected to obtain a target slot probability map corresponding to the first image; The target slot probability map and the first image are preprocessed to obtain a target slot texture map.
4. The target slot identification method according to claim 3, characterized in that: The method of establishing a probability distribution model and performing reverse projection on the first image to obtain a target slot probability map corresponding to the first image includes: Obtain a preset template image of a pre-stored target slot; Establishing a probability distribution model based on the preset template image to obtain a probability distribution of appearance features of the preset template image; The probability distribution of the appearance features of the preset template image is applied to the first image for back projection to obtain a target slot probability map.
5. The target slot identification method according to claim 3, characterized in that: The preprocessing of the target slot probability map and the first image to obtain a target slot texture map includes: Binarizing the target slot probability map to obtain a target slot probability binary map; grayscale the first image to obtain a grayscale image of the target slot; A target slot texture map is acquired based on the target slot probability binary map and the target slot grayscale map.
6. The target slot identification method according to claim 5, characterized in that: The step of acquiring a target slot texture map based on the target slot probability binary map and the target slot grayscale map comprises: Performing edge detection on the target slot grayscale image to obtain a target slot texture feature image; The target slot texture feature map is point-wise multiplied with the target slot probability binary map to obtain a target slot texture map.
7. The target slot identification method according to claim 1, characterized in that: The performing parallel line cluster analysis on the target slot texture map to calculate the first angle includes: Performing Hough transform straight line detection on the target slot texture map to obtain a target straight line set, wherein the target straight line set includes straight lines whose straight line lengths are greater than a preset length; Performing parallel line cluster detection on the target straight line set to obtain the serial number of the target parallel line cluster; the target parallel line cluster is the parallel line cluster with the largest number of straight lines in the target straight line set; A first angle is obtained based on the sequence number of the target parallel line cluster.
8. The target slot identification method according to claim 1, characterized in that: The step of rotating the first image according to a first angle and a complementary angle of the first angle to obtain a corrected image comprises: Taking the center point of the first image as the rotation origin, performing a rotation transformation on the first image according to a first angle to obtain a corrected second image; Taking the center point of the first image as the rotation origin, the first image is rotated according to a complementary angle of the first angle to obtain a corrected third image.
9. The target slot identification method according to claim 8, characterized in that: Before determining the position of the at least one target slot based on local area similarities between the plurality of template images and the corrected image, the method further comprises: An image pyramid is established for a preset template image within a target scale scaling length range with a preset length as a step length; the image pyramid includes template images corresponding to a plurality of different scale scaling coefficients; All template images in the image pyramid are traversed, and similarities between each template image and local areas of the second image and the third image are respectively calculated.
10. The target slot identification method according to claim 9, characterized in that: The respectively calculating the similarity between each template image and the local area of the second image and the third image comprises: Slide all the template images in the image pyramid on the second image pixel by pixel, and calculate the similarity between the template image and the local area of the second image at each position; All template images in the image pyramid are slid pixel by pixel on the third image respectively, and the similarity between the template image and the local area of the third image is calculated at each position.
11. The target slot identification method according to claim 10, characterized in that: The determining the position of the at least one target slot based on the local area similarity between the plurality of template images and the corrected image comprises: Sorting the local area similarities between the multiple template images and the corrected image to determine a target similarity; the target similarity is the maximum local area similarity among the multiple local area similarities between the multiple template images and the corrected image; Determine the scale scaling factor corresponding to the target similarity as the target scale scaling factor in the vertical direction of the workbench; Determining a predicted target slot position according to the target scale scaling factor; The predicted target slot position is subjected to an inverse transformation of the rotation transformation to obtain a target slot position.
12. A target slot identification device, characterized in that: Applied to a target slot identification system, the system comprises a server mainboard, the server mainboard comprises at least one target slot; The device comprises: A response module, configured to acquire a first image in response to a target slot identification instruction input by a user; the first image is an image of a candidate area including the target slot; An acquisition module, used for acquiring a target slot texture map based on the first image; A detection module, configured to perform parallel line cluster analysis on the target slot texture image and calculate a first angle; the first angle is an angle between the target parallel line cluster and a direction perpendicular to the first image; the target parallel line cluster is a parallel line cluster corresponding to the contour of the target slot; A rotation module, used for rotating the first image according to a first angle and a complementary angle of the first angle to obtain a corrected image; A determination module is used to determine the position of the at least one target slot based on the local area similarity between multiple template images and the corrected image.
13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the target slot identification method according to any one of claims 1 to 11 when executing the computer program.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the target slot identification method according to any one of claims 1 to 11.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the target slot identification method according to any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Image-based tray alignment and tube slot localization in a vision system
CN107431788A
Accurate burn area calculation method based on three-dimensional human body reconstruction
CN110310285A
Image depth recognition method, electronic equipment and storage medium
CN117409059A
Numerical calculation-based gong groove type curved plate manufacturing process optimization method and equipment
CN118709458A
An apparatus, a method and a computer program for volumetric video
WO2020254719A1