Automatic plate positioning method and system based on visual inspection

By setting circular engraved marks at both ends of the fixture's diagonal line and using improved binarization processing technology to calculate the rotation and translation of the fixture to achieve plate positioning, the positioning error and direct operation damage problems caused by light and texture interference in traditional methods are solved, significantly improving the positioning accuracy and stability of the automated dispensing process.

CN120298497BActive Publication Date: 2025-09-19MICA TECHSUZHOUCO
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510470875.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-09-19
Estimated Expiration
2045-04-15

AI Technical Summary

Technical Problem

Traditional visual inspection methods are easily affected by light and texture interference during plate positioning, resulting in large positioning errors, and direct manipulation of the plate may damage it.

Method used

Circular engraved marks are set at both ends of the diagonal of the rectangular fixture. Through image processing technology and improved binarization processing technology, the plate positioning is achieved by calculating the rotation and translation of the fixture through image comparison, avoiding direct operation of the plate.

Benefits of technology

It has solved technical problems, improved positioning accuracy and stability in the automated dispensing process, and significantly improved positioning accuracy and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120298497B_ABST
    Figure CN120298497B_ABST
Patent Text Reader

Abstract

The present application relates to the field of visual inspection technology, and in particular to a method and system for automatic plate positioning based on visual inspection, comprising placing a target plate on a preset rectangular jig, with circular engraved marks set at both ends of the diagonal of the jig; obtaining an image of the target plate including the jig, binarizing the target plate image to convert it into a grayscale image; performing image comparison based on the converted grayscale image and a preset standard grayscale image to determine the rotational deviation between the current image and the standard state, and calculating the angle required for rotation; physically rotating the jig according to the required rotation angle to restore the target plate to the standard reference direction, and moving the jig according to the center point position of the target plate image to complete positioning. The present application solves the problems in traditional methods of inaccurate recognition due to the lack of clear visual features of the plate, and the problem of possible damage to the plate caused by direct operation, and significantly improves the positioning accuracy and stability in the automated dispensing process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of visual inspection technology, and in particular to a method and system for automatic plate positioning based on visual inspection. Background Art

[0002] In the sheet dispensing process, ensuring that each sheet is in a uniform and accurate position before dispensing is key to achieving high-quality product manufacturing. Traditional manual loading methods, due to varying operator skills and operating environments, result in large positioning errors. This method no longer meets the high-precision and high-stability requirements of modern automated production and is therefore gradually being phased out. Currently, existing technologies utilize automatic correction methods based on visual inspection. These methods capture images of the sheets and apply image processing techniques (such as binarization) to analyze positional deviations, enabling automatic position adjustment.

[0003] However, existing visual inspection methods that rely solely on the inherent characteristics of the sheet material have significant shortcomings. First, the sheet material itself typically lacks clear and reliable reference points. This makes the binarization process and subsequent feature extraction susceptible to interference from factors such as lighting, texture, and edge blur, resulting in large errors in the calculated displacement deviation. Second, for correction, existing methods require translation and rotation of the sheet material, but direct manipulation of the sheet material carries the risk of damage.

[0004] In summary, the existing visual inspection method is prone to causing damage to the plate during the plate positioning process. At the same time, due to the lack of clear markings on the plate surface, the positioning accuracy during the correction process is difficult to guarantee. Summary of the Invention

[0005] This application provides a method and system for automatic plate positioning based on visual inspection, which effectively solves the problems of inaccurate recognition caused by the lack of clear visual features of the plate in traditional methods, as well as the potential damage caused by direct manipulation of the plate, and significantly improves the positioning accuracy and stability in the automated dispensing process. This application provides the following technical solutions:

[0006] In a first aspect, the present application provides a method for automatic plate positioning based on visual detection, the method comprising:

[0007] The target plate is placed on a preset rectangular jig with circular engraved marks set on both diagonal ends of the jig;

[0008] Acquire a target plate image containing a jig, and perform binarization processing on the target plate image to convert it into a grayscale image;

[0009] Based on the grayscale image obtained by conversion and the preset standard grayscale image, the image is compared to determine the rotation deviation between the current image and the standard state, and the angle required for rotation is calculated;

[0010] The fixture is physically rotated according to the required rotation angle to restore the target plate to the standard reference direction, and the fixture is moved according to the center point position of the target plate image to complete the positioning.

[0011] In a specific embodiment, the step of placing the target plate on a preset rectangular jig and providing circular engraved marks at both ends of the diagonal of the jig includes:

[0012] A rectangular jig for carrying the target plate is preset on the working platform of the dispensing device. The target plate is placed in the rectangular jig. The top surface of the rectangular jig is provided with a groove whose size matches the size of the plate, and the plate is placed in the groove.

[0013] In a specific embodiment, the binarization processing of the target plate image to convert it into a grayscale image includes:

[0014] The original color target plate image is converted into a grayscale image I(x,y) and filtered to obtain a smooth grayscale image

[0015] Calculate the local threshold T local (x, y), then calculate the position weight, set the centers of the two circular engraving marks to C1(x1, y1) and C2(x2, y2), and define the distances to the mark centers as follows:

[0016] d i (x,y)=‖(x,y)-C i ‖(i=1,2)

[0017] The vertical distances from the centers of the two circular engraving marks to the diagonal line of the fixture are as follows:

[0018]

[0019] The calculation of the final threshold is shown below:

[0020]

[0021] Among them, β and γ are weight coefficients, σ ​​is used to control the weight decay speed of the distance from the pixel to the mark center, and σ=D / 4, D is the distance between the centers of the two circular engraved marks, σ d Used to control the vertical distance weight decay speed from pixel to diagonal, take σ d =D / 2;

[0022] Smooth grayscale image Compare pixel by pixel with the final threshold T(x,y):

[0023]

[0024] In the output grayscale image B(x,y), the foreground pixel value is 1, corresponding to the engraved mark area, and the background pixel value is 0, corresponding to other areas.

[0025] In a specific embodiment, converting the acquired original color target plate image into a grayscale image includes:

[0026] Convert to grayscale image according to ITU-R BT.601 formula:

[0027] I(x,y)=0.299R(x,y)+0.587G(x,y)+0.114B(x,y)

[0028] Among them, R, G, and B are three-channel pixel values, reflecting the human eye's perception sensitivity to different colors.

[0029] In a specific embodiment, the calculation of the local threshold T local (x,y) includes:

[0030] Centered on pixel (x, y), we select an m×m window to calculate the grayscale mean μ(x, y) and standard deviation σ(x, y), and use the Sauvola method to obtain:

[0031]

[0032] Where k is the coefficient for adjusting the local contrast, and R is the dynamic range of the grayscale standard deviation within the local window, which is set to 128.

[0033] In a specific embodiment, the image comparison based on the converted grayscale image and the preset standard grayscale image is performed to determine the rotation deviation between the current image and the standard state, and the calculation of the required rotation angle includes:

[0034] The current grayscale image I cur (x,y) and standard grayscale image I std (x, y) are cropped to the same region of interest ROI, and a small range of angle intervals and step sizes are set to generate a series of candidate rotation angles {θ i};

[0035] For each candidate angle θ i , the current grayscale image I cur (x,y) rotation θ i Degrees, get Then calculate the sum of the absolute values ​​of the pixel-level grayscale differences between it and the standard image as follows:

[0036]

[0037] After the calculation is completed, at all θ i In the example, select D(θ i )The minimum angle θ is the rotation deviation of the current image relative to the standard state, that is, the angle that the fixture needs to rotate.

[0038] In a specific implementation scheme, the moving and positioning of the fixture according to the center point position of the target plate image includes:

[0039] Determine the center positions of the two circular marks in the target plate image through image recognition, and compare their average center point with the preset reference center point in the standard image;

[0040] Based on the deviation between the current center point and the reference center point, the amount of translation the fixture needs to make on the X and Y axes is calculated, and the fixture is controlled to move the corresponding distance in the X and Y directions respectively.

[0041] In a second aspect, the present application provides a plate automatic positioning system based on visual inspection, which adopts the following technical solutions:

[0042] A plate automatic positioning system based on visual detection, comprising:

[0043] A fixture placement module is used to place the target plate on a preset rectangular fixture with circular engraved marks set at both ends of the diagonal line of the fixture;

[0044] A binarization processing module is used to obtain a target plate image containing a fixture, and perform binarization processing on the target plate image to convert it into a grayscale image;

[0045] The rotation angle calculation module is used to compare the grayscale image obtained by conversion with the preset standard grayscale image to determine the rotation deviation between the current image and the standard state, and calculate the angle required for rotation;

[0046] The positioning module is used to physically rotate the fixture according to the required rotation angle to restore the target plate to the standard reference direction, and move the fixture according to the center point position of the target plate image to complete the positioning.

[0047] In a third aspect, the present application provides an electronic device comprising a processor and a memory; the memory stores a program, which is loaded and executed by the processor to implement an automatic plate positioning method based on visual inspection as described in the first aspect.

[0048] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the storage medium stores a program, and when the program is executed by a processor, it is used to implement a method for automatic plate positioning based on visual inspection as described in the first aspect.

[0049] In summary, the beneficial effects of this application include at least:

[0050] (1) In traditional visual recognition, image binarization often uses global threshold or simple local threshold algorithm, but these methods are easily affected by factors such as plate surface texture, illumination changes, stray reflections, etc., resulting in blurred or even lost imprinted mark areas in the binary image, thus affecting subsequent image contrast and rotation calculations. Using the known spatial positions of the two circular imprinted marks at both ends of the fixture diagonal, the distance from each pixel to the mark center and the vertical distance to the diagonal are calculated respectively, and a spatial attenuation model is established to guide the dynamic adjustment of the threshold. Based on the traditional Sauvola local threshold, the distance attenuation term is introduced as an additional correction factor, making it easier for pixels close to the mark area to be judged as foreground, thereby improving the ability to extract imprinted marks in complex backgrounds. In the grayscale image preprocessing stage, median filtering or Gaussian filtering is used to suppress fine lines and local noise on the plate surface, further enhancing the image quality and the clarity of the mark edge. In this way, even under conditions of uneven illumination, complex plate surface texture, and slightly worn fixture surface, the system can still stably and accurately extract the two circular imprinted marks, providing clear input for subsequent image registration.

[0051] (2) The system presets a standard grayscale image containing the ideal fixture and marker image features, which serves as the basis for all subsequent image alignment and deviation detection. A small step angle iteration is used to match the pixel-level difference between the current image and the standard image, thereby accurately calculating the optimal rotation angle. Adjustments are made by rotating the fixture that supports the sheet, without operating the sheet itself, effectively avoiding direct interference with the sheet and potential damage.

[0052] By placing easily recognizable circular engraved marks on both diagonal ends of the fixture, the visual system captures the image and uses an improved local adaptive binarization method to generate a clear grayscale image. This is then compared with a preset standard grayscale image to calculate the rotational deviation angle of the current image. The fixture is then controlled to physically rotate and translate, automatically restoring the target plate to its standard orientation and completing precise positioning. This application effectively solves the problems of inaccurate recognition caused by the lack of clear visual features in the plate, as well as the potential damage caused by direct manipulation of the plate, in traditional methods. It significantly improves the positioning accuracy and stability of the automated dispensing process.

[0053] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application and to implement it in accordance with the contents of the specification, the following is a detailed description of the preferred embodiments of the present application in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1It is a flow chart of the automatic plate positioning method based on visual detection in an embodiment of the present application.

[0055] Figure 2 It is a schematic diagram of the overall process of the automatic plate positioning method based on visual detection in the embodiment of the present application.

[0056] Figure 3 This is a structural block diagram of the automatic plate positioning system based on visual detection in an embodiment of the present application.

[0057] Figure 4 This is a block diagram of an electronic device for automatic plate positioning based on visual detection in an embodiment of the present application. DETAILED DESCRIPTION

[0058] The following embodiments are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0059] Optionally, the present application uses the automatic plate positioning method based on visual detection provided in each embodiment as an example for description in an electronic device, where the electronic device is a terminal or a server. The terminal can be a mobile phone, a computer, a tablet computer, etc. This embodiment does not limit the type of electronic device.

[0060] Reference Figure 1 , is a flow chart of a method for automatic plate positioning based on visual detection provided by an embodiment of the present application, which method includes at least the following steps:

[0061] Step S101: Place the target plate on a preset rectangular jig, and set circular engraved marks on both ends of the diagonal line of the jig.

[0062] In step S101, first, a rectangular jig for carrying the target plate is preset on the working platform of the dispensing device, and the target plate is placed in the rectangular jig. Specifically, the top surface of the rectangular jig is provided with a groove whose size matches the size of the plate, and the plate is placed in the groove, thereby fixing the plate and the jig together and maintaining the same position.

[0063] Furthermore, engraved marks are placed at each diagonal end of the top surface of the rectangular jig. These marks can be cross-shaped, circular, or other geometric patterns that facilitate image recognition. This application uses circular marks as an example. These two marking points have clear positional attributes and good recognition characteristics in the visual image. Subsequent image processing will use these as a reference to calculate the actual position offset of the jig and plate, and guide correction operations accordingly.

[0064] Step S102: Acquire a target plate image including the fixture, and perform binarization processing on the target plate image to convert it into a grayscale image.

[0065] In step S102, a digital camera mounted on the dispensing device captures an image of the target plate containing the jig. After obtaining the original color image, the image is binarized and converted into a grayscale image. The purpose of binarization is to clearly distinguish different areas in the grayscale image (particularly the circular markings at both ends of the diagonal on the jig and the surrounding background), thereby making subsequent mark extraction and positioning calculations more accurate.

[0066] Specifically, the traditional binarization method only converts the image based on grayscale statistical information, failing to utilize the known shape of the engraved mark (circle) on the fixture and its prior information that it is fixed at both ends of the diagonal. It is easily affected by factors such as the surface texture of the plate and uneven lighting, resulting in unclear distinction between the marked area and the background. Therefore, in the implementation of this application, the original color target plate image captured by the camera is first converted into a grayscale image according to the ITU-R BT.601 formula:

[0067] I(x,y)=0.299R(x,y)+0.587G(x,y)+0.114B(x,y)

[0068] Among them, R, G, and B are three-channel pixel values, and the coefficients reflect the sensitivity of the human eye to different colors. Apply median filtering or Gaussian filtering to the grayscale image I (x, y) to remove small noise and interference from the surface texture of the plate to obtain a smooth grayscale image.

[0069] Then calculate the local threshold T local (x, y), with pixel (x, y) as the center, select an m×m window to calculate the grayscale mean μ(x, y) and standard deviation σ(x, y), which is 21×21 in this application, and use the Sauvola method to obtain:

[0070]

[0071] Among them, k is the coefficient for adjusting the local contrast, which is generally between 0.3 and 0.5, and R is the dynamic range of the grayscale standard deviation in the local window, which is usually 128.

[0072] Then calculate the position weights, set the centers of the two circular engraving marks to C1(x1,y1) and C2(x2,y2), and define the distances to the mark centers as follows:

[0073] d i (x,y)=‖(x,y)-C i ‖(i=1,2)

[0074] The vertical distances from the centers of the two circular engraving marks to the diagonal line of the fixture are as follows:

[0075]

[0076] The calculation of the final threshold is shown below:

[0077]

[0078] Among them, β and γ are weight coefficients, σ ​​is used to control the weight decay speed of the distance from the pixel to the mark center, and σ=D / 4, D is the distance between the centers of the two circular engraved marks, σ d Used to control the vertical distance weight decay speed from pixel to diagonal, take σ d =D / 2. It should be noted that the two parameters can be fine-tuned through experiments according to the specific fixture size and imaging resolution.

[0079] Finally, smooth the grayscale image Compare pixel by pixel with the final threshold T(x,y):

[0080]

[0081] In the output grayscale image B(x,y), foreground pixels (value 1) correspond to the engraved mark area, and background pixels (value 0) correspond to other areas, providing clear and reliable input for subsequent mark center detection and position correction.

[0082] In traditional visual recognition, image binarization often uses global thresholding or simple local thresholding algorithms. However, these methods are susceptible to interference from factors such as the plate surface texture, lighting variations, and stray reflections, resulting in blurred or even lost image regions within the binary image, thus affecting subsequent image contrast and rotation calculations. Since this application subsequently employs an improved local binarization algorithm, this algorithm relies on the local mean and standard deviation of the image. Extensive noise or dramatic texture variations in the image can interfere with the calculation of local statistics, leading to threshold drift or segmentation errors. Using the known spatial positions of two circular engraved marks at opposite ends of the fixture's diagonal, the distance from each pixel to the mark center and its perpendicular distance to the diagonal are calculated, establishing a spatial attenuation model to guide dynamic threshold adjustment. Building on the traditional Sauvola local thresholding, a distance attenuation term is introduced as an additional correction factor, making pixels near the marked area more likely to be identified as foreground, improving the ability to extract the engraved mark against complex backgrounds. Median filtering or Gaussian filtering is used in the grayscale image preprocessing stage to suppress fine lines and local noise on the plate surface, further enhancing image quality and the clarity of the mark edges. Even under conditions of uneven lighting, complex plate surface texture, and slight wear on the fixture surface, the system can still stably and accurately extract the two circular engraved marks, providing clear input for subsequent image registration.

[0083] Optionally, step S102 may also use an existing binarization processing method.

[0084] Step S103 : performing image comparison based on the converted grayscale image and a preset standard grayscale image to determine the rotation deviation between the current image and the standard state, and calculating the angle required for rotation.

[0085] In step 103, during the equipment debugging phase, a standard grayscale image of the fixture in an ideal calibration state is obtained in advance, which is called a standard image. In this image, the circular engraved marks at both ends of the diagonal line on the fixture are in the expected positions, and its grayscale distribution has obvious characteristics. The standard image undergoes the same preprocessing and binarization steps to ensure consistency in processing methods and grayscale range with subsequent images. The current grayscale image I obtained in step S102 is then used as the standard image. cur (x,y) and standard grayscale image I std (x,y) is rotated by a finite rotation search and a difference metric to determine the required rotation angle.

[0086] Specifically, first, the current grayscale image I cur (x,y) and standard grayscale image I std (x,y) are cropped to the same region of interest (ROI) to ensure that only the parts where the fixture and the engraving mark are located are compared. At the same time, a small range of angle intervals and step sizes are set to generate a series of candidate rotation angles {θ i The angle interval in this application is plus or minus 5 degrees, with a step size of 0.5 degrees. i , the current grayscale image I cur (x,y) rotation θ i Degrees, get Then calculate the sum of the absolute values ​​of the pixel-level grayscale differences between it and the standard image as follows:

[0087]

[0088] After the calculation is completed, at all θ i In the example, select D(θ i )The minimum angle θ is the rotation deviation of the current image relative to the standard state, which is also the angle that the fixture needs to rotate.

[0089] Step S104: physically rotate the jig according to the required rotation angle to restore the target plate to the standard reference direction, and move the jig according to the center point position of the target plate image to complete the positioning.

[0090] In step S104, after calculating the rotation angle of the current image relative to the standard image, the clamping fixture is directly controlled to physically rotate the fixture to restore it to the standard reference orientation. After the rotation is completed, the center positions of the two circular marks in the target plate image are determined by image recognition, and their average center points are compared with the reference center points preset in the standard image. Based on the deviation between the current center point and the reference center point, the amount of translation that the fixture needs to perform on the X-axis and Y-axis is calculated, and the fixture is controlled to move the corresponding distances in the X and Y directions respectively. Through the above-mentioned rotation and translation operations, the automatic positioning of the target plate is completed, providing a precise spatial reference for the subsequent dispensing process, and the positioning process ends here.

[0091] In summary, combined with Figure 2 This application sets easily recognizable circular engraved marks on both ends of the diagonal line of the fixture, uses a visual system to capture images and adopts an improved local adaptive binarization method to generate a clear grayscale image, and then compares it with a preset standard grayscale image to calculate the rotation deviation angle of the current image. The fixture is then controlled to perform physical rotation and translation, so that the target plate automatically returns to the standard direction and completes precise positioning. This application effectively solves the problems in traditional methods such as inaccurate recognition due to the lack of clear visual features of the plate, and the potential damage caused by direct operation of the plate, and significantly improves the positioning accuracy and stability in the automated dispensing process.

[0092] Figure 3 This is a block diagram of a plate automatic positioning system based on visual inspection provided by an embodiment of the present application. The system includes at least the following modules:

[0093] The fixture placement module is used to place the target plate on a preset rectangular fixture with circular engraved marks on both diagonal ends of the fixture;

[0094] A binarization processing module is used to obtain a target plate image containing a fixture, and perform binarization processing on the target plate image to convert it into a grayscale image;

[0095] The rotation angle calculation module is used to compare the grayscale image obtained by conversion with the preset standard grayscale image to determine the rotation deviation between the current image and the standard state, and calculate the angle required for rotation;

[0096] The positioning module is used to physically rotate the fixture according to the required rotation angle to restore the target plate to the standard reference direction, and move the fixture according to the center point position of the target plate image to complete the positioning.

[0097] For relevant details, please refer to the above method embodiment.

[0098] Figure 44 is a block diagram of an electronic device provided in one embodiment of the present application. The device includes at least a processor 401 and a memory 402.

[0099] The processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 401 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 401 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 401 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0100] Memory 402 may include one or more computer-readable storage media, which may be non-transitory. Memory 402 may also include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices or flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in memory 402 is used to store at least one instruction, which is executed by processor 401 to implement the automatic plate positioning method based on visual inspection provided in the method embodiments of this application.

[0101] In some embodiments, the electronic device may optionally include a peripheral device interface and at least one peripheral device. The processor 401, memory 402, and peripheral device interface may be connected via a bus or signal lines. Each peripheral device may be connected to the peripheral device interface via a bus, signal lines, or circuit boards. Illustratively, the peripheral devices include, but are not limited to, a radio frequency circuit, a touchscreen display, an audio circuit, and a power supply.

[0102] Of course, the electronic device may also include fewer or more components, which is not limited in this embodiment.

[0103] Optionally, the present application also provides a computer-readable storage medium, in which a program is stored. The program is loaded and executed by a processor to implement the automatic plate positioning method based on visual inspection of the above method embodiment.

[0104] Optionally, the present application also provides a computer product, which includes a computer-readable storage medium, in which a program is stored. The program is loaded and executed by a processor to implement the automatic plate positioning method based on visual inspection of the above method embodiment.

[0105] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0106] The above embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A plate automatic positioning method based on visual detection, characterized in that: The method comprises: The target plate is placed on a preset rectangular jig with circular engraved marks set on both diagonal ends of the jig; Acquire a target plate image containing a fixture, and perform binarization processing on the target plate image to convert it into a grayscale image, including: Convert the acquired original color target plate image into a grayscale image And perform filtering to obtain a smooth grayscale image ; Calculate local threshold , then calculate the position weight and set the centers of the two circular engraving marks to 、 , define the distance to the marker center as follows: The vertical distances from the centers of the two circular engraving marks to the diagonal line of the fixture are as follows: The calculation of the final threshold is shown below: in, and are weight coefficients, Used to control the weight decay speed of the distance from pixel to marker center. , is the distance between the centers of two circular engraved marks, Used to control the vertical distance weight decay speed from pixel to diagonal line, take ; Smooth grayscale image With the final threshold Perform a pixel-by-pixel comparison: Output grayscale image In the middle, the foreground pixel value is 1, corresponding to the engraved mark area, and the background pixel value is 0, corresponding to other areas; Based on the grayscale image obtained by conversion and the preset standard grayscale image, the image is compared to determine the rotation deviation between the current image and the standard state, and the angle required for rotation is calculated; The fixture is physically rotated according to the required rotation angle to restore the target plate to the standard reference direction, and the fixture is moved according to the center point position of the target plate image to complete the positioning.

2. The automatic plate positioning method based on visual detection according to claim 1 is characterized in that: The target plate is placed on a preset rectangular jig, and circular engraved marks are set at both ends of the diagonal of the jig, including: A rectangular jig for carrying the target plate is preset on the working platform of the dispensing device. The target plate is placed in the rectangular jig. The top surface of the rectangular jig is provided with a groove whose size matches the size of the plate, and the plate is placed in the groove.

3. The automatic plate positioning method based on visual detection according to claim 1 is characterized in that: The step of converting the collected original color target plate image into a grayscale image comprises: Convert to grayscale image according to ITU R BT.601 formula: Among them, R, G, and B are three-channel pixel values, reflecting the human eye's perception sensitivity to different colors.

4. The automatic plate positioning method based on visual detection according to claim 1 is characterized in that: The calculation of the local threshold include: In pixels As the center, select Window grayscale mean calculation and standard deviation , using the Sauvola method we can get: in, To adjust the local contrast coefficient, It is the dynamic range of the grayscale standard deviation within the local window, and its value is 128.

5. The automatic plate positioning method based on visual detection according to claim 1 is characterized in that: The image comparison based on the converted grayscale image and the preset standard grayscale image is performed to determine the rotation deviation between the current image and the standard state, and calculate the angle required for rotation includes: The current grayscale image With standard grayscale image Crop to the same region of interest (ROI), set a small range of angle intervals and step sizes, and generate a series of candidate rotation angles. ; For each candidate angle , the current grayscale image Rotation Degrees, get , and then calculate the sum of the absolute values ​​of the pixel-level grayscale differences between it and the standard image as follows: After the calculation is completed, all In the Minimum angle This is the rotational deviation of the current image relative to the standard state, that is, the angle the fixture needs to rotate.

6. The automatic plate positioning method based on visual detection according to claim 1 is characterized in that: The moving and positioning of the fixture according to the center point position of the target plate image includes: Determine the center positions of the two circular marks in the target plate image through image recognition, and compare their average center point with the preset reference center point in the standard image; Based on the deviation between the current center point and the reference center point, the amount of translation the fixture needs to make on the X and Y axes is calculated, and the fixture is controlled to move the corresponding distance in the X and Y directions respectively.

7. A plate automatic positioning system based on visual detection, characterized in that: include: A fixture placement module is used to place the target plate on a preset rectangular fixture with circular engraved marks set at both ends of the diagonal line of the fixture; The binarization processing module is used to obtain a target plate image containing a fixture, and perform binarization processing on the target plate image to convert it into a grayscale image, including: Convert the acquired original color target plate image into a grayscale image And perform filtering to obtain a smooth grayscale image ; Calculate local threshold , then calculate the position weight and set the centers of the two circular engraving marks to 、 , define the distance to the marker center as follows: The vertical distances from the centers of the two circular engraving marks to the diagonal line of the fixture are as follows: The calculation of the final threshold is shown below: in, and are weight coefficients, Used to control the weight decay speed of the distance from pixel to marker center. , is the distance between the centers of two circular engraved marks, Used to control the vertical distance weight decay speed from pixel to diagonal line, take ; Smooth grayscale image With the final threshold Perform a pixel-by-pixel comparison: Output grayscale image In the middle, the foreground pixel value is 1, corresponding to the engraved mark area, and the background pixel value is 0, corresponding to other areas; The rotation angle calculation module is used to compare the grayscale image obtained by conversion with the preset standard grayscale image to determine the rotation deviation between the current image and the standard state, and calculate the angle required for rotation; The positioning module is used to physically rotate the fixture according to the required rotation angle to restore the target plate to the standard reference direction, and move the fixture according to the center point position of the target plate image to complete the positioning.

8. An electronic device, characterized in that: The device includes a processor and a memory; a program is stored in the memory, and the program is loaded and executed by the processor to implement the automatic plate positioning method based on visual inspection as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The storage medium stores a program, which, when executed by a processor, is used to implement the automatic plate positioning method based on visual inspection as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Danger prompting method and equipment

    CN118072469A

  • Paper folding control method and system based on machine vision

    CN118859685A