Local area-based engine cylinder block and cylinder cover machining surface profile quick positioning method

By adopting a local area-based contour fast positioning method in automotive industry detection, the problem of high-resolution image processing is solved, and efficient feature positioning is achieved, suitable for complex image analysis tasks.

CN118967790AActive Publication Date: 2024-11-15HARBIN SHIMADA BIG BIRD IND +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411004448.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-11-15
Estimated Expiration
2044-07-25

AI Technical Summary

Technical Problem

In the field of automotive industry detection, high-resolution image processing has a high computational burden, perspective transformation and contour positioning are time-consuming and have high requirements for computing resources, resulting in low detection efficiency.

Method used

The rapid positioning method of surface contour processing of engine cylinder head based on local areas is adopted, and the calculation amount and processing speed are reduced and processing speed is improved by selecting high-resolution reference images, scaling processing, Gaussian blur processing, contour feature extraction and optimization of contour matching algorithms.

Benefits of technology

It significantly reduces the amount of calculation, improves processing speed, and achieves fast and accurate feature positioning in high-resolution images, suitable for complex and fine automotive industry inspection tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118967790A_ABST
    Figure CN118967790A_ABST
Patent Text Reader

Abstract

The invention relates to an engine cylinder body and cylinder cover machining surface profile rapid positioning method based on a local area. The invention relates to the technical field of visual inspection in the automobile industry, and the method comprises the steps: selecting a high-resolution reference image, adjusting the size of the reference image, carrying out Gaussian blur processing, extracting contour features, presetting a search range of transformation parameters, carrying out size adjustment and feature extraction of a new image, carrying out contour matching and standard deviation calculation, and determining an optimal transformation parameter. And adjusting the 2D homogeneous transformation matrix, and accurately positioning the reference image. According to the method, scaling and Gaussian blur preprocessing are introduced in the image processing process, the calculation amount is remarkably reduced, the processing speed is increased, and meanwhile the matching accuracy is kept.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of visual inspection in the automobile industry, and is a method for quickly positioning the contour of a machining surface of a cylinder block and cylinder head of an engine in a local area. Background Art

[0002] In the manufacturing process of automotive parts, product appearance defects are often an important factor affecting product quality and reliability. However, traditional manual inspection methods are not only inefficient, but also easily affected by subjective factors, making it difficult to ensure the accuracy and consistency of inspection.

[0003] With the rapid development of artificial intelligence, machine vision inspection technology has emerged. Using high-precision industrial cameras to imitate human vision to capture product image information, through image processing algorithms, it can quickly and accurately detect scratches, deformation, dirt, oxidation, cracks, dents and other defects on the surface of automotive parts, realize automated inspection, improve work efficiency and reduce production costs.

[0004] The visual inspection equipment automatically loads materials to the inspection platform through a vibration plate. The industrial camera then takes high-speed photos of the moving products. The machine vision inspection software system then performs real-time inspection, analysis, and calculation on the photographs with high speed, high precision, and high stability to determine whether the samples are qualified. Finally, the results are output, counted, and defective products are automatically eliminated.

[0005] Visual inspection equipment is widely used in various industries in the manufacturing industry, such as electronics, machinery, automobiles, medical and other fields. It can detect the appearance defects of various parts, such as dimensional scratches, cracks, missing materials, breaks, foreign matter, burrs, internal blockages, inner and outer diameters, different colors, mixed materials, etc. Visual inspection equipment can be automatically linked with other production equipment to detect the real material, wrong or missing loading, mixed materials, etc. In practical applications, the entire production process is automatically controlled. In addition, visual inspection equipment can also realize automated packaging, thus providing strong support for the quality of products in the production process.

[0006] In the field of automotive industry inspection, image processing is a key link in ensuring product quality. Due to the complexity and fineness of automotive parts, the images involved are usually high-resolution, with pixel sizes ranging from 5 million pixels to 20 million pixels. These high-resolution images provide rich detail information for inspection, but they also bring some challenges.

[0007] First, high-pixel images mean more data to be processed. When performing image analysis, especially when it comes to computationally intensive tasks such as perspective transformation and contour positioning, a large amount of pixel data will significantly increase the computational burden. Perspective transformation is a geometric transformation that simulates the projection process from three-dimensional space to a two-dimensional plane, which usually requires complex mathematical calculations, including matrix operations and inverse transformations. For high-resolution images, the complexity and time required for these calculations will increase exponentially.

[0008] Secondly, contour localization is another critical step in image processing, especially in defect detection and feature recognition. In high-resolution images, contours may be very small or complex, requiring accurate edge detection algorithms to identify them. These algorithms need to evaluate each pixel, calculate the gradient magnitude and direction, and then further refine them in non-maximum suppression and hysteresis thresholding. Performing these operations on high-pixel images will result in significant computational delays.

[0009] In addition, memory usage is also an issue when processing images of such large size. High-resolution images take up a large amount of storage space, which may lead to increased memory consumption and even exceed the system limit in some cases. This requires efficient memory management and image processing algorithms to ensure that image processing tasks can be completed even with limited hardware resources. Summary of the invention

[0010] Aiming at the deficiencies of the prior art, the challenges faced by the prior art in processing high-resolution images are solved, especially in the field of automotive industry inspection, where the image pixel size is large (usually between 5 million pixels and 20 million pixels). In this field, the calculation of perspective transformation and contour positioning is not only time-consuming, but also requires high computing resources. In order to overcome these deficiencies, the present invention proposes a method for quickly locating the contour of the machining surface of the engine cylinder block and cylinder head based on the local area.

[0011] The present invention provides a method for quickly positioning the contour of the machining surface of a cylinder block and cylinder head of an engine based on a local area, and the present invention provides the following technical solutions:

[0012] A method for quickly locating the contour of a machining surface of a cylinder block and cylinder head of an engine based on a local area comprises the following steps:

[0013] Step 1: Select a high-resolution reference image. Select a high-resolution image as the reference image. The image covers the features to be detected and is taken using a high-pixel industrial camera to ensure image quality.

[0014] Step 2: Adjust the size of the reference image and determine a scaling factor for reducing the size of the reference image;

[0015] Step 3: Gaussian blur processing: apply Gaussian blur to the scaled reference image to reduce image noise and enhance edge features;

[0016] Step 4: Contour feature extraction: extract the contour of the image based on Gaussian blur;

[0017] Step 5: Preset search range for transformation parameters, defining the search range for rotation angle, perspective transformation parameters and offset;

[0018] Step 6: Resize and extract features of the new image. Repeat steps 2 and 3 for the new image to obtain the new image and its contour features after resizing and Gaussian blur processing;

[0019] Step 7: Contour matching and standard deviation calculation: within the preset search range, the contour features of the reference image and the new image are matched and the standard deviation is calculated;

[0020] Step 8: Determine the optimal transformation parameters, traverse all parameter combinations defined in step 5, execute step 7 for each set of parameters, record the matching score of each parameter combination, and select the parameter combination with the highest score as the optimal solution;

[0021] Step 9: Adjust the 2D homogeneous transformation matrix, output the 2D homogeneous transformation matrix according to the optimal transformation parameters, and divide the offset therein by the scaling factor to adapt to the original image size;

[0022] Step 10: Accurately locate the reference image and use the adjusted 2D homogeneous transformation matrix to transform the reference image to achieve accurate positioning in the new image.

[0023] Preferably, the step 2 is specifically:

[0024] The reference image is scaled using a linear interpolation method, and a scaling factor k is calculated as: target size x original size / original size x target size. When the target size is half of the original size, k = 0.5. This scaling factor is applied to scale the image using a nearest neighbor, bilinear, or cubic interpolation method.

[0025] Preferably, the step 3 is specifically:

[0026] Define the exact size and standard deviation of the Gaussian kernel, and choose a kernel size of 5×5 or 7×7.

[0027] Preferably, the step 4 is specifically:

[0028] In the Canny algorithm, two thresholds, a high threshold and a low threshold, are set: the high threshold is 50 and the low threshold is 20 to determine strong edges and weak edges.

[0029] Preferably, step 5 is specifically:

[0030] Define the search range of rotation angles, perspective transformation parameters, and offsets for image matching;

[0031] Determine the search range for the rotation angle θ (-30°, 30°), the search range for the perspective transformation parameters, the translation and scaling factors, and the search range for the offset (dx, dy) (-50 pixels, 50 pixels).

[0032] Preferably, step 7 is specifically:

[0033] Use the Hough transform or other contour feature matching algorithm to identify and match contour features between the reference image and the new image, and then calculate the standard deviation.

[0034] Preferably, the standard deviation operation in step 7 is specifically:

[0035] The standard deviation is normalized to the range of 0-1 to obtain the matching score.

[0036] A rapid positioning system for machining surface contour of a local area engine cylinder block and cylinder head, the system comprising:

[0037] A high-resolution reference image selection module selects a high-resolution image as a reference image. The image covers the features to be detected and is photographed using a high-pixel industrial camera to ensure image quality.

[0038] a reference image resizing module, the reference image resizing module determining a scaling factor for reducing the size of the reference image;

[0039] Gaussian blur processing module, the Gaussian blur processing module applies Gaussian blur to the scaled reference image to reduce image noise and enhance edge features;

[0040] Contour feature extraction module, which extracts the contour of the image based on Gaussian blur;

[0041] A preset search module for transformation parameters, which defines a search range for rotation angles, perspective transformation parameters, and offsets;

[0042] A new image resizing and feature extraction module, which repeats the operation on the new image to obtain a new image and its contour features after resizing and Gaussian blur processing;

[0043] The contour matching and standard deviation calculation module matches the contour features of the reference image and the new image within a preset search range and calculates the standard deviation;

[0044] The optimal transformation parameter determination module traverses all parameter combinations, records the matching score of each parameter combination, and selects the parameter combination with the highest score as the optimal solution;

[0045] 2D homogeneous transformation matrix adjustment module, the 2D homogeneous transformation matrix adjustment module outputs a 2D homogeneous transformation matrix according to the optimal transformation parameters, and divides the offset therein by the scaling factor to adapt to the original image size;

[0046] The module for accurately positioning the reference image uses the adjusted 2D homogeneous transformation matrix to transform the reference image to achieve accurate positioning in the new image.

[0047] A computer-readable storage medium stores a computer program, which is executed by a processor to implement a method for quickly locating the contour of a machining surface of a cylinder block or cylinder head of an engine based on a local area.

[0048] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, a method for quickly locating the contour of a machining surface of a cylinder block and cylinder head of an engine based on a local area is implemented.

[0049] The present invention has the following beneficial effects:

[0050] Compared with the prior art, the present invention has the following advantages:

[0051] The method of the present invention significantly reduces the amount of calculation and improves the processing speed by introducing scaling and Gaussian blur preprocessing in the image processing process, while maintaining the accuracy of matching. In addition, through the optimized contour matching algorithm, the present invention can achieve fast and accurate feature positioning in high-resolution images, which is particularly suitable for complex and delicate image analysis tasks in the field of automotive industry inspection. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0053] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0054] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0056] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0057] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0058] The present invention is described in detail below in conjunction with specific embodiments. Specific embodiment one:

[0060] according to Figure 1 As shown, the specific optimization technical solution adopted by the present invention to solve the above technical problems is: the present invention relates to a rapid positioning method based on the machining surface contour of the engine cylinder block and cylinder head in a local area.

[0061] A method for quickly locating the contour of a machining surface of a cylinder block and cylinder head of an engine based on a local area comprises the following steps:

[0062] The following steps are involved:

[0063] Step 1: Select a high-resolution reference image. Select a high-resolution image as the reference image. The image covers the features to be detected and is taken using a high-pixel industrial camera to ensure image quality.

[0064] Step 2: Adjust the size of the reference image and determine a scaling factor for reducing the size of the reference image;

[0065] Step 3: Gaussian blur processing: apply Gaussian blur to the scaled reference image to reduce image noise and enhance edge features;

[0066] Step 4: Contour feature extraction: extract the contour of the image based on Gaussian blur;

[0067] Step 5: Preset search range for transformation parameters, defining the search range for rotation angle, perspective transformation parameters and offset;

[0068] Step 6: Resize and extract features of the new image. Repeat steps 2 and 3 for the new image to obtain the new image and its contour features after resizing and Gaussian blur processing;

[0069] Step 7: Contour matching and standard deviation calculation: within the preset search range, the contour features of the reference image and the new image are matched and the standard deviation is calculated;

[0070] Step 8: Determine the optimal transformation parameters, traverse all parameter combinations defined in step 5, execute step 7 for each set of parameters, record the matching score of each parameter combination, and select the parameter combination with the highest score as the optimal solution;

[0071] Step 9: Adjust the 2D homogeneous transformation matrix, output the 2D homogeneous transformation matrix according to the optimal transformation parameters, and divide the offset therein by the scaling factor to adapt to the original image size;

[0072] Step 10: Accurately locate the reference image and use the adjusted 2D homogeneous transformation matrix to transform the reference image to achieve accurate positioning in the new image.

[0073] The present invention significantly reduces the amount of calculation and improves the processing speed by introducing scaling and Gaussian blur preprocessing in the image processing process, while maintaining the accuracy of matching. In addition, through the optimized contour matching algorithm, the present invention can achieve fast and accurate feature positioning in high-resolution images, which is particularly suitable for complex and delicate image analysis tasks in the field of automotive industry inspection. Specific embodiment 2:

[0075] The difference between the second embodiment of the present invention and the first embodiment is that:

[0076] The step 2 is specifically as follows:

[0077] The reference image is scaled using a linear interpolation method, and a scaling factor k is calculated as: target size x original size / original size x target size. When the target size is half of the original size, k = 0.5. This scaling factor is applied to scale the image using a nearest neighbor, bilinear, or cubic interpolation method. Specific embodiment three:

[0079] The difference between the third embodiment of the present invention and the second embodiment is that:

[0080] The step 3 is specifically as follows:

[0081] Define the exact size and standard deviation of the Gaussian kernel, and choose a kernel size of 5×5 or 7×7. Specific embodiment four:

[0083] The difference between the fourth embodiment of the present invention and the third embodiment is that:

[0084] The step 4 is specifically as follows:

[0085] In the Canny algorithm, two thresholds, a high threshold and a low threshold, are set: the high threshold is 50 and the low threshold is 20 to determine strong edges and weak edges. Specific embodiment five:

[0087] The difference between the fifth embodiment of the present invention and the fourth embodiment is that:

[0088] Step 5 is as follows:

[0089] Define the search range of rotation angles, perspective transformation parameters, and offsets for image matching;

[0090] Determine the search range for the rotation angle θ (-30°, 30°), the search range for the perspective transformation parameters, the translation and scaling factors, and the search range for the offset (dx, dy) (-50 pixels, 50 pixels). Specific embodiment six:

[0092] The difference between the sixth embodiment of the present invention and the fifth embodiment is that:

[0093] Step 7 is as follows:

[0094] Use the Hough transform or other contour feature matching algorithm to identify and match contour features between the reference image and the new image, and then calculate the standard deviation. Specific embodiment seven:

[0096] The difference between the seventh embodiment of the present invention and the sixth embodiment is that:

[0097] The specific standard deviation operation in step 7 is:

[0098] The standard deviation is normalized to the range of 0-1 to obtain the matching score. Specific embodiment eight:

[0100] The difference between the eighth embodiment of the present invention and the seventh embodiment is that:

[0101] The present invention provides a rapid positioning system based on the machining surface profile of a local area engine cylinder block and cylinder head, the system comprising:

[0102] A high-resolution reference image selection module selects a high-resolution image as a reference image. The image covers the features to be detected and is photographed using a high-pixel industrial camera to ensure image quality.

[0103] a reference image resizing module, the reference image resizing module determining a scaling factor for reducing the size of the reference image;

[0104] Gaussian blur processing module, the Gaussian blur processing module applies Gaussian blur to the scaled reference image to reduce image noise and enhance edge features;

[0105] Contour feature extraction module, which extracts the contour of the image based on Gaussian blur;

[0106] A preset search module for transformation parameters, which defines a search range for rotation angles, perspective transformation parameters, and offsets;

[0107] A new image resizing and feature extraction module, which repeats the operation on the new image to obtain a new image and its contour features after resizing and Gaussian blur processing;

[0108] The contour matching and standard deviation calculation module matches the contour features of the reference image and the new image within a preset search range and calculates the standard deviation;

[0109] The optimal transformation parameter determination module traverses all parameter combinations, records the matching score of each parameter combination, and selects the parameter combination with the highest score as the optimal solution;

[0110] 2D homogeneous transformation matrix adjustment module, the 2D homogeneous transformation matrix adjustment module outputs a 2D homogeneous transformation matrix according to the optimal transformation parameters, and divides the offset therein by the scaling factor to adapt to the original image size;

[0111] The module for accurately positioning the reference image uses the adjusted 2D homogeneous transformation matrix to transform the reference image to achieve accurate positioning in the new image. Specific embodiment nine:

[0113] The difference between the ninth embodiment of the present invention and the eighth embodiment is that:

[0114] The present invention provides a computer-readable storage medium on which a computer program is stored. The program is executed by a processor to implement a method for quickly positioning a machining surface contour of a cylinder block and cylinder head of an engine based on a local area.

[0115] The technical solution of the present invention comprises the following steps:

[0116] Step 1: Selection of high-resolution reference images

[0117] Select a high-resolution image with sufficient details as the reference image. The image should cover the features to be detected and be taken using a high-pixel industrial camera to ensure image quality.

[0118] Step 2: Resizing the Baseline Image

[0119] Determine a scaling factor to reduce the size of the reference image, thereby reducing the computational burden. Use linear interpolation to scale the reference image by . Calculate scaling factor k = target size original size / original size target size. For example, if the target size is half the original size, then k = 0.5. Apply this scaling factor and scale the image using nearest neighbor, bilinear, or cubic interpolation.

[0120] Step 3: Gaussian Blur

[0121] Gaussian blur is applied to the scaled reference image to reduce image noise and enhance edge features in preparation for subsequent contour extraction.

[0122] Step 4: Contour feature extraction

[0123] Based on Gaussian blur, use the Canny edge detection algorithm or other similar algorithms to extract the image contour. Set a suitable threshold to determine the edge strength to distinguish between real edges and noise.

[0124] Step 5: Change the preset search range of the parameter

[0125] Define the search range for rotation angles, perspective transformation parameters, and offsets, which will be used for image matching in subsequent steps. Determine the search range for the rotation angle θ (e.g., -30° to 30°), the search range for perspective transformation parameters (e.g., translation and scaling factors), and the search range for offsets (dx, dy) (e.g., -50 pixels to 50 pixels)

[0126] Step 6: Resizing and extracting features from new images

[0127] Repeat steps 2 and 3 for the new image to obtain a new image and its contour features after resizing and Gaussian blur processing.

[0128] Step 7: Contour matching and standard deviation calculation

[0129] Within the preset search range, the contour features of the reference image and the new image are matched and the standard deviation between them is calculated. The standard deviation is normalized to the range of 0-1 to obtain the matching score.

[0130] Step 8: Determination of optimal transformation parameters

[0131] Traverse all parameter combinations defined in step 5, execute step 7 for each set of parameters, record the matching score of each parameter combination, and select the parameter combination with the highest score as the optimal solution.

[0132] Step 9: Adjustment of 2D homogeneous transformation matrix

[0133] Based on the optimal transformation parameters, a 2D homogeneous transformation matrix is ​​output, and the offset is divided by the scaling factor to adapt to the original image size.

[0134] Step 10: Accurate positioning of reference images

[0135] The adjusted 2D homogeneous transformation matrix is ​​used to transform the reference image to achieve accurate positioning in the new image.

[0136] Preferably, the step 3 is specifically:

[0137] Define the specific size and standard deviation of the Gaussian kernel. For example, you can choose a kernel size of 5×5 or 7×7, depending on the specific situation of the image.

[0138] The step 4 is specifically as follows: in the Canny algorithm, two thresholds are set, a high threshold and a low threshold, for example, the high threshold is 50 and the low threshold is 20, to determine strong edges and weak edges.

[0139] The step 7 specifically includes: using Hough transform or other contour feature matching algorithms to identify and match contour features between the reference image and the new image, and then calculating the standard deviation between them.

[0140] Through these detailed steps, the present invention provides a method for fast and accurate perspective transformation and contour positioning of high-resolution images in automobile industry inspection.

[0141] The method of the present invention significantly reduces the amount of calculation and improves the processing speed by introducing scaling and Gaussian blur preprocessing in the image processing process, while maintaining the accuracy of matching. In addition, through the optimized contour matching algorithm, the present invention can achieve fast and accurate feature positioning in high-resolution images, which is particularly suitable for complex and delicate image analysis tasks in the field of automotive industry inspection. Specific embodiment ten:

[0143] The difference between the tenth embodiment of the present invention and the ninth embodiment is that:

[0144] The present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, a method for quickly locating the contour of a machining surface of a cylinder block and cylinder head of an engine based on a local area is implemented.

[0145] The method comprises the following steps:

[0146] Step 1: Select a high-resolution reference image. Select a high-resolution image as the reference image. The image covers the features to be detected and is taken using a high-pixel industrial camera to ensure image quality.

[0147] Step 2: Adjust the size of the reference image and determine a scaling factor for reducing the size of the reference image;

[0148] Step 3: Gaussian blur processing: apply Gaussian blur to the scaled reference image to reduce image noise and enhance edge features;

[0149] Step 4: Contour feature extraction: extract the contour of the image based on Gaussian blur;

[0150] Step 5: Preset search range for transformation parameters, defining the search range for rotation angle, perspective transformation parameters and offset;

[0151] Step 6: Resize and extract features of the new image. Repeat steps 2 and 3 for the new image to obtain the new image and its contour features after resizing and Gaussian blur processing;

[0152] Step 7: Contour matching and standard deviation calculation: within the preset search range, the contour features of the reference image and the new image are matched and the standard deviation is calculated;

[0153] Step 8: Determine the optimal transformation parameters, traverse all parameter combinations defined in step 5, execute step 7 for each set of parameters, record the matching score of each parameter combination, and select the parameter combination with the highest score as the optimal solution;

[0154] Step 9: Adjust the 2D homogeneous transformation matrix, output the 2D homogeneous transformation matrix according to the optimal transformation parameters, and divide the offset therein by the scaling factor to adapt to the original image size;

[0155] Step 10: Accurately locate the reference image and use the adjusted 2D homogeneous transformation matrix to transform the reference image to achieve accurate positioning in the new image.

[0156] The present invention significantly reduces the amount of calculation and improves the processing speed by introducing scaling and Gaussian blur preprocessing in the image processing process, while maintaining the accuracy of matching. In addition, through the optimized contour matching algorithm, the present invention can achieve fast and accurate feature positioning in high-resolution images, which is particularly suitable for complex and delicate image analysis tasks in the field of automotive industry inspection. Specific embodiment eleven:

[0158] The difference between the eleventh embodiment of the present invention and the tenth embodiment is that:

[0159] Step 1: Selection of high-resolution reference images

[0160] -Select a high-resolution image with sufficient details as the reference image, ensuring that the image covers all the feature areas to be detected.

[0161] -Use high-pixel industrial cameras to shoot to ensure image quality.

[0162] Step 2: Resizing the Baseline Image

[0163] -Determine a scaling factor to reduce the size of the reference image, thereby reducing the computational burden.

[0164] -The base image is scaled using linear interpolation.

[0165] - Calculate the scaling factor k = target size / original size.

[0166] Step 3: Gaussian Blur

[0167] -Apply Gaussian blur to the scaled reference image to reduce image noise and enhance edge features in preparation for subsequent contour extraction.

[0168] - Define a specific size and standard deviation of the Gaussian kernel (e.g., choose a kernel size of 5×5 or 7×7).

[0169] Step 4: Contour feature extraction

[0170] -Based on Gaussian blur, the Canny edge detection algorithm is used to extract the image contour.

[0171] - Set appropriate high and low thresholds to determine edge strength (e.g., high threshold is 50, low threshold is 20).

[0172] Step 5: Change the preset search range of the parameter

[0173] - Define the search range for rotation angles, perspective transformation parameters, and offsets.

[0174] - Determine the search range for the rotation angle θ (e.g., -30° to 30°), the search range for the perspective transformation parameters (translation and scaling factors), and the search range for the offset (dx, dy) (e.g., -50 pixels to 50 pixels).

[0175] Step 6: Resizing and extracting features from new images

[0176] - Repeat steps 2 and 3 for the new image to obtain a new image and its contour features after resizing and Gaussian blur processing.

[0177] Step 7: Contour matching and standard deviation calculation

[0178] -Within the preset search range, the contour features of the reference image and the new image are matched and the standard deviation between them is calculated.

[0179] -Use the Hough transform or other contour feature matching algorithm to identify and match contour features between the reference image and the new image, and then calculate the standard deviation between them.

[0180] Step 8: Determination of optimal transformation parameters

[0181] - Traverse all parameter combinations defined in step 5 and execute step 7 for each set of parameters.

[0182] -Record the matching score of each parameter combination and select the parameter combination with the highest score as the optimal solution.

[0183] Step 9: Adjustment of 2D homogeneous transformation matrix

[0184] -Output a 2D homogeneous transformation matrix based on the optimal transformation parameters.

[0185] - Divide the offset by the scaling factor to fit the original image size.

[0186] Step 10: Accurate positioning of reference images

[0187] -Use the adjusted 2D homogeneous transformation matrix to transform the reference image to achieve accurate positioning in the new image.

[0188] Through these detailed steps, fast and accurate perspective transformation and contour positioning of high-resolution images can be achieved, which is particularly suitable for image processing tasks in automotive industry inspection. Each step has been optimized to ensure processing speed and accuracy, ensuring feasibility and effectiveness in practical applications.

[0189] The method of the present invention significantly reduces the amount of calculation and improves the processing speed by introducing scaling and Gaussian blur preprocessing in the image processing process, while maintaining the accuracy of matching. In addition, through the optimized contour matching algorithm, the present invention can achieve fast and accurate feature positioning in high-resolution images, which is particularly suitable for complex and delicate image analysis tasks in the field of automotive industry inspection.

[0190] In the description of this specification, the description of reference terms such as "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction. In addition, the terms "first" and "second" are used only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" can explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "N" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. Any process or method description in the flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code including one or more executable instructions for implementing the steps of a custom logic function or process, and the scope of the preferred embodiment of the present invention includes other implementations, in which the functions may not be performed in the order shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved, which should be understood by a person skilled in the art of the art to which the embodiments of the present invention belong. The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as a sequenced list of executable instructions for implementing the logic function, and may be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection having one or N wirings (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM).In addition, the computer readable medium can even be paper or other suitable medium on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, then editing, interpreting or processing in other suitable ways as necessary, and then storing it in a computer memory. It should be understood that the various parts of the present invention can be implemented with hardware, software, firmware, or a combination thereof. In the above-mentioned embodiment, N steps or methods can be implemented with software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented with hardware, as in another embodiment, any one of the following technologies known in the art or their combination can be used to implement: a discrete logic circuit with a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit with a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0191] The above is only a preferred embodiment of a method for rapid positioning of the surface contour of a local engine cylinder block and cylinder head. The protection scope of the method for rapid positioning of the surface contour of a local engine cylinder block and cylinder head is not limited to the above embodiment. All technical solutions under this idea belong to the protection scope of the present invention. It should be pointed out that for those skilled in the art, several improvements and changes without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A method for rapid positioning of the surface contour of the engine cylinder block and cylinder head based on the local area, Its characteristics are: The following steps are involved: Step 1: Select a high-resolution reference image. Select a high-resolution image as the reference image. The image covers the features to be detected and is taken using a high-pixel industrial camera to ensure image quality. Step 2: Adjust the size of the reference image and determine a scaling factor for reducing the size of the reference image; Step 3: Gaussian blur processing: apply Gaussian blur to the scaled reference image to reduce image noise and enhance edge features; Step 4: Contour feature extraction: extract the contour of the image based on Gaussian blur; Step 5: Preset search range for transformation parameters, defining the search range for rotation angle, perspective transformation parameters and offset; Step 6: Resize and extract features of the new image. Repeat steps 2 and 3 for the new image to obtain the new image and its contour features after resizing and Gaussian blur processing. Step 7: Contour matching and standard deviation calculation: within the preset search range, the contour features of the reference image and the new image are matched and the standard deviation is calculated; Step 8: Determine the optimal transformation parameters, traverse all parameter combinations defined in step 5, execute step 7 for each set of parameters, record the matching score of each parameter combination, and select the parameter combination with the highest score as the optimal solution; Step 9: Adjust the 2D homogeneous transformation matrix, output the 2D homogeneous transformation matrix according to the optimal transformation parameters, and divide the offset therein by the scaling factor to adapt to the original image size; Step 10: Accurately locate the reference image and use the adjusted 2D homogeneous transformation matrix to transform the reference image to achieve accurate positioning in the new image.

2. The method according to claim 1, Its characteristics are: The step 2 is specifically as follows: The reference image is scaled using a linear interpolation method, and a scaling factor k is calculated as: target size x original size / original size x target size. When the target size is half of the original size, k = 0.

5. This scaling factor is applied to scale the image using a nearest neighbor, bilinear, or cubic interpolation method.

3. The method according to claim 2, Its characteristics are: The step 3 is specifically as follows: Define the exact size and standard deviation of the Gaussian kernel, and choose a kernel size of 5×5 or 7×7.

4. The method according to claim 3, Its characteristics are: The step 4 is specifically as follows: In the Canny algorithm, two thresholds, a high threshold and a low threshold, are set: the high threshold is 50 and the low threshold is 20 to determine strong edges and weak edges.

5. The method according to claim 4, Its characteristics are: Step 5 is as follows: Define the search range of rotation angles, perspective transformation parameters, and offsets for image matching; Determine the search range for the rotation angle θ (-30°, 30°), the search range for the perspective transformation parameters, the translation and scaling factors, and the search range for the offset (dx, dy) (-50 pixels, 50 pixels).

6. The method according to claim 5, Its characteristics are: Step 7 is as follows: Use the Hough transform or other contour feature matching algorithm to identify and match contour features between the reference image and the new image, and then calculate the standard deviation.

7. The method according to claim 6, Its characteristics are: The specific standard deviation operation in step 7 is: The standard deviation is normalized to the range of 0-1 to obtain the matching score.

8. A rapid positioning system based on the surface contour of the engine cylinder block and cylinder head machining in a local area, Its characteristics are: The system comprises: A high-resolution reference image selection module selects a high-resolution image as a reference image. The image covers the features to be detected and is photographed using a high-pixel industrial camera to ensure image quality. a reference image resizing module, the reference image resizing module determining a scaling factor for reducing the size of the reference image; Gaussian blur processing module, the Gaussian blur processing module applies Gaussian blur to the scaled reference image to reduce image noise and enhance edge features; Contour feature extraction module, which extracts the contour of the image based on Gaussian blur; A preset search module for transformation parameters, which defines a search range for rotation angles, perspective transformation parameters, and offsets; A new image resizing and feature extraction module, which repeats the operation on the new image to obtain a new image and its contour features after resizing and Gaussian blur processing; The contour matching and standard deviation calculation module matches the contour features of the reference image and the new image within a preset search range and calculates the standard deviation; The optimal transformation parameter determination module traverses all parameter combinations, records the matching score of each parameter combination, and selects the parameter combination with the highest score as the optimal solution; 2D homogeneous transformation matrix adjustment module, the 2D homogeneous transformation matrix adjustment module outputs a 2D homogeneous transformation matrix according to the optimal transformation parameters, and divides the offset therein by the scaling factor to adapt to the original image size; The module for accurately positioning the reference image uses the adjusted 2D homogeneous transformation matrix to transform the reference image to achieve accurate positioning in the new image.

9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that The program is executed by a processor to implement the method according to claims 1-7.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program. Its characteristics are: When the processor executes the computer program, the method of claims 1-7 is implemented.

Citation Information

Patent Citations

  • Image processor, image processing method, program and recording medium

    JP2011192066A