A paper chart deformation error detection method and system based on machine vision

Through the paper chart deformation error detection method based on machine vision, the deformation error of paper chart is automatically measured, which solves the problem of low manual measurement efficiency in the prior art, improves correction efficiency and accuracy, and enhances navigation safety.

CN119205936BActive Publication Date: 2025-02-28CHINA STATE SHIPBUILDING CORP NO 707 RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411700049.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-02-28
Estimated Expiration
2044-11-26

AI Technical Summary

Technical Problem

In the prior art, the paper chart correction process requires manual assistance for deformation measurement, resulting in low calibration efficiency and difficult to ensure the continuity of chart operations in complex environments, affecting navigation safety.

Method used

Using the paper sea chart deformation error detection method based on machine vision, by obtaining the image of the paper sea chart, Zhang Zhengyou calibration method and paper sea chart profile distortion correction are performed, rectangles are identified and screened, and the deformation error of the paper sea chart is calculated to realize automated measurement.

Benefits of technology

It improves the efficiency and accuracy of paper chart correction, reduces the steps of manual alignment, enhances the continuity of chart operations, and reduces navigation safety risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The present invention relates to the field of paper chart navigation operations and correction technology, and specifically discloses a paper chart deformation error detection method and system based on machine vision, the method comprising: acquiring an image of a paper chart; adopting Zhang Zhengyou calibration method and paper chart outline distortion correction to obtain a corrected image; reading binding parameters of the paper chart to obtain a theoretical long side length and a theoretical short side length of a theoretical outline of the paper chart; identifying all rectangles in the corrected image, screening rectangles that meet outline requirements, and obtaining an outline set; taking the smallest rectangle from the outline set as the measured paper chart inner outline size, obtaining a measured long side length and a measured short side length; and calculating the paper chart deformation error amount. The present invention realizes the automation of deformation measurement during paper chart correction, and improves the efficiency of paper chart correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of nautical chart navigation operation and correction, and in particular to a method and system for detecting deformation errors of paper nautical charts based on machine vision. Background Art

[0002] The paper chart drawing device is an important part of the navigation operation equipment, and it mainly undertakes the paper chart operation function. When using the paper chart drawing device for paper chart operation, it is necessary to bind and calibrate the paper chart to ensure that the coordinate system of the paper chart is completely matched with the coordinate system of the paper chart drawing device. Since the paper chart has a certain degree of deformation after long-term use, it is necessary to first measure the deformation of the paper chart in the x-axis direction and the y-axis direction before calibrating the paper chart. If the deformation measurement is not performed or the deformation measurement is inaccurate, the target indication accuracy of the chart drawing device will be affected. At present, the deformation measurement is mainly carried out by calibrating the specific longitude and latitude points on the paper chart using a digitizer or a laser galvanometer photoelectric indication method. This method requires manual alignment of specific longitude and latitude points on the paper chart. There are two problems in its use: first, due to the low accuracy of manual alignment, the deformation measurement accuracy of the paper chart is low; second, the manual alignment process leads to low efficiency of paper chart correction and a long time consumption. When sailing in complex environments such as islands and reefs, it is difficult to ensure the continuity of chart operations, which brings great risks to navigation safety. Summary of the invention

[0003] The present invention aims to solve the problem that the paper chart correction process requires manual assistance for deformation measurement and the correction efficiency is low. To this end, the present invention provides a paper chart deformation error detection method and system based on machine vision, which realizes the automation of deformation measurement during the paper chart correction process and improves the efficiency of paper chart correction.

[0004] The present invention provides a method for detecting deformation errors of paper charts based on machine vision, and the technical scheme adopted is as follows: comprising the following steps:

[0005] Step 1: Get an image of a paper chart;

[0006] Step 2: Using the Zhang Zhengyou calibration method, a preliminary correction image is obtained based on the image to eliminate the barrel and pincushion distortions of the camera;

[0007] Step 3: Perform paper chart outline distortion correction on the preliminary corrected image to obtain a corrected image;

[0008] Step 4: Read the binding parameters of the paper chart to obtain the theoretical long side length and the theoretical short side length of the theoretical outline of the paper chart;

[0009] Step 5: Identify all rectangles in the corrected image, select rectangles that meet the contour requirements, and obtain a contour set;

[0010] Step 6: Take the smallest rectangle from the contour set as the inner contour size of the measured paper chart to obtain the measured long side length and the measured short side length;

[0011] Step 7: Calculate the paper chart deformation error according to the measured long side length, the measured short side length, the theoretical long side length and the theoretical short side length.

[0012] Furthermore, the process of paper chart outline distortion correction is as follows:

[0013] Step 3.1: Construct the matrix , , Representation Matrix No. elements, , Indicates the number of camera pixels;

[0014] Step 3.2: Calculate each The value corresponds to The value of

[0015] (1)

[0016] (2)

[0017] (3)

[0018] (4)

[0019] in, express The corresponding intermediate variable, represents the camera field of view, represents the radius of the plano-convex cylindrical reflector, Indicates the distance between the central axis of the plano-convex cylindrical reflector and the glass surface, represents the distance from the camera focus A to point C on the plano-convex cylindrical reflector, It represents the distance from the camera focus A to the center H of the plano-convex cylindrical reflector. Indicates the distance from the camera focus A to the center point B of the plano-convex cylindrical reflector, It represents the angle swept by plane HC and plane HE in the counterclockwise direction. Plane HC is the plane passing through point C and the central axis H of the plano-convex cylindrical reflector. Plane HE is the plane passing through the central axis H of the plano-convex cylindrical reflector and perpendicular to the glass surface. The plano-convex cylindrical reflector is placed directly in front of the camera, and the camera and the plano-convex cylindrical reflector are located below the glass surface.

[0020] Step 3.3: Record the calculation result of step 3.2 as a one-dimensional matrix , , ;

[0021] Step 3.4: Substitute the matrix calculated in step 3.3 Each element in Substituting into formula (5), the calculation result is recorded as matrix , ,

[0022]

[0023] in, Representation Matrix No. elements, Indicates the pixel size of the camera imaging chip. Indicates the focal length of the camera;

[0024] Step 3.5: Convert the matrix Each element of is rounded up to get the matrix , , where , Indicates rounding up the decimal. Representation Matrix No. elements;

[0025] Step 3.6: Construct a matrix based on the pixel values ​​of the preliminary corrected image ,

[0026] (6)

[0027] in, Represents the first Line The pixel value of the pixel point in the column, Representation Matrix No. A one-dimensional matrix consisting of all elements in a row;

[0028] Step 3.7: Initialize an initial image with the same resolution as the preliminary correction image and pixel values ​​are all 0, and use the matrix express,

[0029] (7)

[0030] in, The initial image Line The pixel value of the pixel point in the column, Representation Matrix A one-dimensional matrix consisting of all elements in the i-th row;

[0031] Step 3.8: Traverse the matrix , and the matrix The matrix , , After summing and averaging, we get the matrix , and use the matrix Replacement Matrix The matrix ; After the traversal is completed, the matrix The image represented is the rectified image.

[0032] Furthermore, the findcountour function in opencv is used to identify all rectangles in the corrected image.

[0033] Furthermore, the profile requirement is ,and ,

[0034] Among them, x' represents the length of the long side of the rectangle, y' represents the length of the short side of the rectangle, represents the theoretical long side length, represents the theoretical short side length, and z represents the error threshold.

[0035] Furthermore, the calculation formula of the paper chart deformation error is:

[0036]

[0037]

[0038] in, represents the error of the long side, represents the short side error, Indicates measuring the length of the long side. Indicates measuring the length of the short side.

[0039] The present invention also provides a paper chart deformation error detection system based on machine vision, and the technical scheme adopted is as follows: comprising: a chart outline recognition optical path, a computer and a light source controller, the chart outline recognition optical path comprises a glass surface, an infrared light source, a camera and a plano-convex cylindrical reflector, an infrared light source, a camera and a plano-convex cylindrical reflector are placed below the glass surface, two infrared light sources are respectively located on both sides of the camera, a plano-convex cylindrical reflector is placed in front of the camera, the computer is respectively connected to the light source controller and the camera, and the light source controller is connected to the two infrared light sources;

[0040] The computer is used to adopt the Zhang Zhengyou calibration method to obtain a preliminary corrected image that eliminates the barrel and pincushion distortions of the camera based on the image; perform paper chart outline distortion correction on the preliminary corrected image to obtain a corrected image; read the binding parameters of the paper chart to obtain the theoretical long side length and the theoretical short side length of the theoretical outline of the paper chart; identify all rectangles in the corrected image, screen out rectangles that meet the outline requirements, and obtain an outline set; take the smallest rectangle from the outline set as the measured paper chart inner outline size to obtain the measured long side length and the measured short side length; calculate the paper chart deformation error amount based on the measured long side length, the measured short side length, the theoretical long side length, and the theoretical short side length.

[0041] Furthermore, the nautical chart is laid flat on the glass surface in reverse, and the infrared light source emits infrared light, which is irradiated onto the nautical chart. After reflection, it is re-emitted by the plano-convex cylindrical reflector and then enters the camera. The camera transmits the captured image to the computer.

[0042] Furthermore, the infrared light emitted by the infrared light source cannot directly enter the lens after being reflected by the glass mirror.

[0043] Furthermore, the infrared light source radiates 850nm infrared light, and an 850nm filter is installed inside the lens of the camera.

[0044] Furthermore, the number of the outline recognition optical paths is four, and the computer stitches the images taken by the four cameras to form an image of the paper chart.

[0045] The above one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects:

[0046] 1. The present invention corrects the image of the paper chart by using the Zhang Zhengyou calibration method and paper chart outline distortion correction, then identifies a rectangle from the corrected image, and calculates the paper chart deformation error based on the measured paper chart inner outline size. Paper chart deformation measurement is the only step in the paper chart correction process that requires manual participation. The present invention does not have a manual alignment process, realizes the automated measurement of paper chart deformation, and improves the efficiency of paper chart correction.

[0047] 2. The present invention overcomes the problem of low manual alignment accuracy during the implementation of the digitizing board or laser galvanometer photoelectric indication method, thereby improving the correction accuracy of paper charts.

[0048] 3. The present invention adopts a plano-convex cylindrical reflector to increase the camera image acquisition field of view and reduce the number of cameras required for the whole machine. The present invention designs a paper chart outline distortion correction method to correct the image reflected by the plano-convex cylindrical reflector.

[0049] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0051] Figure 1 It is a flow chart of the method provided by the present invention.

[0052] Figure 2 It is a structural block diagram of the system provided by the present invention.

[0053] Figure 3 It is a structural schematic diagram of the image outline recognition optical path provided by the present invention.

[0054] Figure 4 It is a schematic diagram of equivalent camera imaging provided by the present invention.

[0055] Reference numerals:

[0056] 1. Computer; 2. Light source controller; 3. Glass surface; 4. Infrared light source; 5. Camera; 6. Plano-convex cylindrical reflector; 7. Paper chart. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present invention. The following embodiments are used to illustrate the present invention, but cannot be used to limit the scope of the present invention.

[0058] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0059] Combine the following Figures 1 to 4 The present invention is further described in detail, and a method and system for detecting paper chart deformation errors based on machine vision are described as follows:

[0060] In this embodiment, Figure 1 As shown, a method for detecting deformation errors of paper charts based on machine vision is provided, comprising the following steps:

[0061] Step 1: Get an image of a paper chart.

[0062] Step 2: Using the Zhang Zhengyou calibration method, a preliminary correction image is obtained based on the image to eliminate the barrel and pincushion distortions of the camera.

[0063] The Zhang Zhengyou calibration method belongs to the existing technology. The Zhang Zhengyou calibration method is used to complete the camera calibration, which can eliminate the barrel and pincushion distortion of the camera.

[0064] Step 3: Perform paper chart outline distortion correction on the preliminary corrected image to obtain a corrected image.

[0065] refer to Figure 3 and Figure 4 , the process of paper chart outline distortion correction is:

[0066] Step 3.1: Construct the matrix , , Representation Matrix No. elements, , Indicates the number of camera pixels. Generally, the number of camera pixels is an even number, such as 640, 1024, 1600, so is an integer.

[0067] Step 3.2: Calculate each The value corresponds to The value of

[0068] (1)

[0069] (2)

[0070] (3)

[0071] (4)

[0072] in, express The corresponding intermediate variable, represents the camera field of view, represents the radius of the plano-convex cylindrical reflector, Indicates the distance between the central axis of the plano-convex cylindrical reflector and the glass surface, represents the distance from the camera focus A to point C on the plano-convex cylindrical reflector, It represents the distance from the camera focus A to the center H of the plano-convex cylindrical reflector. Indicates the distance from the camera focus A to the center point B of the plano-convex cylindrical reflector, It represents the angle swept by plane HC and plane HE in the counterclockwise direction. Plane HC is the plane passing through point C and the central axis H of the plano-convex cylindrical reflector. Plane HE is the plane passing through the central axis H of the plano-convex cylindrical reflector and perpendicular to the glass surface. The plano-convex cylindrical reflector is placed directly in front of the camera, and the camera and the plano-convex cylindrical reflector are located below the glass surface. Figure 4 The O in represents the optical center of the camera lens.

[0073] Step 3.3: Record the calculation result of step 3.2 as a one-dimensional matrix , , .

[0074] Step 3.4: Substitute the matrix calculated in step 3.3 Each element in Substituting into formula (5), the calculation result is recorded as matrix , ,

[0075]

[0076] in, Representation Matrix No. elements, Indicates the pixel size of the camera imaging chip. Indicates the focal length of the camera.

[0077] Step 3.5: Convert the matrix Each element of is rounded up to get the matrix , , where , Indicates rounding up the decimal. Representation Matrix No. elements.

[0078] Step 3.6: Construct a matrix based on the pixel values ​​of the preliminary corrected image ,

[0079] (6)

[0080] in, Represents the first Line The pixel value of the pixel point in the column, Representation Matrix No. A one-dimensional matrix consisting of all elements in a row.

[0081] Step 3.7: Initialize an initial image with the same resolution as the preliminary correction image and pixel values ​​are all 0, and use the matrix express,

[0082] (7)

[0083] in, The initial image Line The pixel value of the pixel point in the column, Representation Matrix A one-dimensional matrix consisting of all elements in the i-th row of .

[0084] Step 3.8: Traverse the matrix , and the matrix The matrix , , After summing and averaging, we get the matrix , and use the matrix Replacement Matrix The matrix ; After the traversal is completed, the matrix The image represented is the rectified image.

[0085] Step 4: Read the binding parameters of the paper chart to obtain the theoretical long side length of the theoretical outline of the paper chart and the theoretical short side length .

[0086] Step 5: Identify all rectangles in the corrected image, filter out rectangles that meet the contour requirements, and obtain a contour set.

[0087] The findcountour function in OpenCV is used to identify all rectangles in the corrected image.

[0088] Each identified rectangle is screened. The outline requirement is ,and , where x′ represents the length of the long side of the rectangle and y′ represents the length of the short side of the rectangle. represents the theoretical long side length, represents the theoretical short side length, and z represents the error threshold. Usually, z is 8mm.

[0089] Step 6: Take the smallest rectangle from the contour set as the inner contour size of the measured paper chart to get the measured long side length and measure the short side length .

[0090] Step 7: Calculate the paper chart deformation error according to the measured long side length, the measured short side length, the theoretical long side length and the theoretical short side length.

[0091] The calculation formula of paper chart deformation error is:

[0092]

[0093]

[0094] in, represents the error of the long side, Indicates the short side error amount.

[0095] In this embodiment, Figure 2 As shown, a paper chart deformation error detection system based on machine vision is also provided, and the technical scheme adopted is as follows: it includes: a chart outline recognition optical path, a computer 1 and a light source controller 2, the chart outline recognition optical path includes a glass surface 3, an infrared light source 4, a camera 5 and a plano-convex cylindrical reflector 6, an infrared light source 4, a camera 5 and a plano-convex cylindrical reflector 6 are placed below the glass surface 3, two infrared light sources 4 are respectively located on both sides of the camera 5, and a plano-convex cylindrical reflector 6 is placed directly in front of the camera 5, the computer 1 is connected to the light source controller 2 and the camera 5 respectively, and the light source controller 2 is connected to the two infrared light sources 4.

[0096] The computer 1 is used to adopt the Zhang Zhengyou calibration method to obtain a preliminary corrected image that eliminates the barrel and pincushion distortions of the camera based on the image; perform paper chart outline distortion correction on the preliminary corrected image to obtain a corrected image; read the binding parameters of the paper chart 7 to obtain the theoretical long side length and the theoretical short side length of the theoretical outline of the paper chart; identify all rectangles in the corrected image, filter out rectangles that meet the outline requirements, and obtain a contour set; take the smallest rectangle from the contour set as the measured paper chart inner outline size to obtain the measured long side length and the measured short side length; calculate the paper chart deformation error amount based on the measured long side length, the measured short side length, the theoretical long side length, and the theoretical short side length.

[0097] The infrared light source 4 radiates 850nm infrared light, and an 850nm filter is installed inside the lens of the camera 5.

[0098] like Figure 2 As shown, there are four sets of outline recognition optical paths, which are respectively installed at the upper left corner, lower left corner, upper right corner and lower right corner of the paper map drawing device.

[0099] The structural diagram of a single set of image recognition optical path is as follows: Figure 3 As shown, adjust the installation position and installation angle of the infrared light source 4 so that the infrared light emitted by the infrared light source 4 cannot directly enter the lens after being reflected by the glass mirror, thereby avoiding overexposure of the camera 5. The infrared light source 4 uses an infrared light source with a wavelength of 850nm that is invisible to the human eye to avoid affecting user operations. An 850nm filter is installed inside the lens of the camera 5 to filter out external environmental interference light and reduce the difficulty of later image processing. A plano-convex cylindrical reflector 6 is placed directly in front of the camera 5 to expand the field of view of the camera 5. The installation elements such as the relative position relationship between the camera 5 and the plano-convex cylindrical reflector 6 are shown in Figure 2 The following parameters are reasonably designed so that after the four cameras 5 are spliced ​​together, the field of view covers the entire glass plane on the top of the paper chart drawing device.

[0100] represents the camera field of view, represents the radius of the plano-convex cylindrical reflector, such as Figure 3 HC in Indicates the distance between the central axis of the plano-convex cylindrical reflector and the glass surface, represents the distance from the camera focus A to point C on the plano-convex cylindrical reflector, It represents the distance from the camera focus A to the center H of the plano-convex cylindrical reflector. Indicates the distance from the camera focus A to the center point B of the plano-convex cylindrical reflector, It represents the angle swept by plane HC and plane HE in the counterclockwise direction. Plane HC is the plane passing through point C and the central axis H of the plano-convex cylindrical reflector. Plane HE is the plane passing through the central axis H of the plano-convex cylindrical reflector and perpendicular to the glass surface. Plano-convex cylindrical reflector 6 is placed directly in front of camera 5. Camera 5 and plano-convex cylindrical reflector 6 are located below glass surface 3.

[0101] The process of using this system is:

[0102] The nautical paper is laid flat on the glass surface 3 in reverse, and the computer 1 controls the infrared light source 4 to emit infrared light through the light source controller 2, which is irradiated onto the nautical paper. After reflection, it is re-emitted by the plano-convex cylindrical reflector 6 and then enters the camera 5, which transmits the captured image to the computer 1. The computer 1 splices the images captured by the four cameras 5 to form an image of the paper chart 7, and then uses the above-mentioned paper chart deformation error detection method based on machine vision to calculate the paper chart deformation error amount.

[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A paper chart deformation error detection method based on machine vision, characterized in that: The following steps are involved: Step 1: Get an image of a paper chart; Step 2: Using the Zhang Zhengyou calibration method, a preliminary correction image is obtained based on the image to eliminate the barrel and pincushion distortions of the camera; Step 3: Perform paper chart outline distortion correction on the preliminary corrected image to obtain a corrected image; The process of paper chart outline distortion correction is as follows: Step 3.1: Construct the matrix , , Representation Matrix No. elements, , Indicates the number of camera pixels; Step 3.2: Calculate each The value corresponds to The value of (1) (2) (3) (4) in, express The corresponding intermediate variable, represents the camera field of view, represents the radius of the plano-convex cylindrical reflector, Indicates the distance between the central axis of the plano-convex cylindrical reflector and the glass surface, represents the distance from the camera focus A to point C on the plano-convex cylindrical reflector, It represents the distance from the camera focus A to the center H of the plano-convex cylindrical reflector. Indicates the distance from the camera focus A to the center point B of the plano-convex cylindrical reflector, It represents the angle swept by plane HC and plane HE in the counterclockwise direction. Plane HC is the plane passing through point C and the central axis H of the plano-convex cylindrical reflector. Plane HE is the plane passing through the central axis H of the plano-convex cylindrical reflector and perpendicular to the glass surface. The plano-convex cylindrical reflector is placed directly in front of the camera, and the camera and the plano-convex cylindrical reflector are located below the glass surface. Step 3.3: Record the calculation result of step 3.2 as a one-dimensional matrix , , ; Step 3.4: Substitute the matrix calculated in step 3.3 Each element in Substituting into formula (5), the calculation result is recorded as matrix , , in, Representation Matrix No. elements, Indicates the pixel size of the camera imaging chip. Indicates the focal length of the camera; Step 3.5: Convert the matrix Each element of is rounded up to get the matrix , , where , Indicates rounding up the decimal. Representation Matrix No. elements; Step 3.6: Construct a matrix based on the pixel values ​​of the preliminary corrected image , (6) in, Represents the first Line The pixel value of the pixel point in the column, Representation Matrix No. A one-dimensional matrix consisting of all elements in a row; Step 3.7: Initialize an initial image with the same resolution as the preliminary correction image and pixel values ​​are all 0, and use the matrix express, (7) in, The initial image Line The pixel value of the pixel point in the column, Representation Matrix A one-dimensional matrix consisting of all elements in the i-th row; Step 3.8: Traverse the matrix , and the matrix The matrix , , After summing and averaging, we get the matrix , and use the matrix Replacement Matrix The matrix ; After the traversal is completed, the matrix The image represented is the rectified image; Step 4: Read the binding parameters of the paper chart to obtain the theoretical long side length and the theoretical short side length of the theoretical outline of the paper chart; Step 5: Identify all rectangles in the corrected image, select rectangles that meet the contour requirements, and obtain a contour set; Step 6: Take the smallest rectangle from the contour set as the inner contour size of the measured paper chart to obtain the measured long side length and the measured short side length; Step 7: Calculate the paper chart deformation error according to the measured long side length, the measured short side length, the theoretical long side length and the theoretical short side length.

2. A method for detecting paper chart deformation errors based on machine vision as claimed in claim 1, characterized in that: The findcountour function in OpenCV is used to identify all rectangles in the corrected image.

3. The method for detecting paper chart deformation errors based on machine vision according to claim 1, characterized in that: The profile requirement is ,and , Among them, x' represents the length of the long side of the rectangle, y' represents the length of the short side of the rectangle, represents the theoretical long side length, represents the theoretical short side length, and z represents the error threshold.

4. A method for detecting paper chart deformation errors based on machine vision as claimed in claim 3, characterized in that: The calculation formula of paper chart deformation error is: in, represents the error of the long side, represents the short side error, Indicates measuring the length of the long side. Indicates measuring the length of the short side.

5. A paper chart deformation error detection system based on machine vision, characterized in that: Used to execute a paper chart deformation error detection method based on machine vision as claimed in any one of claims 1 to 4, comprising: a chart outline recognition optical path, a computer and a light source controller, the chart outline recognition optical path comprises a glass surface, an infrared light source, a camera and a plano-convex cylindrical reflector, an infrared light source, a camera and a plano-convex cylindrical reflector are placed below the glass surface, two infrared light sources are respectively located on both sides of the camera, a plano-convex cylindrical reflector is placed in front of the camera, the computer is respectively connected to the light source controller and the camera, and the light source controller is connected to the two infrared light sources; The computer is used to obtain a preliminary corrected image that eliminates the barrel and pincushion distortions of the camera according to the image by using the Zhang Zhengyou calibration method; perform paper chart outline distortion correction on the preliminary corrected image to obtain a corrected image; read the binding parameters of the paper chart to obtain the theoretical long side length and the theoretical short side length of the theoretical outline of the paper chart; identify all rectangles in the corrected image, screen out rectangles that meet the outline requirements, and obtain an outline set; take the smallest rectangle from the outline set as the measured paper chart inner outline size to obtain the measured long side length and the measured short side length; calculate the paper chart deformation error amount according to the measured long side length, the measured short side length, the theoretical long side length, and the theoretical short side length; The process of paper chart outline distortion correction is as follows: Step 3.1: Construct the matrix , , Representation Matrix No. elements, , Indicates the number of camera pixels; Step 3.2: Calculate each The value corresponds to The value of (1) (2) (3) (4) in, express The corresponding intermediate variable, represents the camera field of view, represents the radius of the plano-convex cylindrical reflector, Indicates the distance between the central axis of the plano-convex cylindrical reflector and the glass surface, represents the distance from the camera focus A to point C on the plano-convex cylindrical reflector, It represents the distance from the camera focus A to the center H of the plano-convex cylindrical reflector. Indicates the distance from the camera focus A to the center point B of the plano-convex cylindrical reflector, It represents the angle swept by plane HC and plane HE in the counterclockwise direction. Plane HC is the plane passing through point C and the central axis H of the plano-convex cylindrical reflector. Plane HE is the plane passing through the central axis H of the plano-convex cylindrical reflector and perpendicular to the glass surface. The plano-convex cylindrical reflector is placed directly in front of the camera, and the camera and the plano-convex cylindrical reflector are located below the glass surface. Step 3.3: Record the calculation result of step 3.2 as a one-dimensional matrix , , ; Step 3.4: Substitute the matrix calculated in step 3.3 Each element in Substituting into formula (5), the calculation result is recorded as matrix , , in, Representation Matrix No. elements, Indicates the pixel size of the camera imaging chip. Indicates the focal length of the camera; Step 3.5: Convert the matrix Each element of is rounded up to get the matrix , , where , Indicates rounding up the decimal. Representation Matrix No. elements; Step 3.6: Construct a matrix based on the pixel values ​​of the preliminary corrected image , (6) in, Represents the first Line The pixel value of the pixel point in the column, Representation Matrix No. A one-dimensional matrix consisting of all elements in a row; Step 3.7: Initialize an initial image with the same resolution as the preliminary correction image and pixel values ​​are all 0, and use the matrix express, (7) in, The initial image Line The pixel value of the pixel point in the column, Representation Matrix A one-dimensional matrix consisting of all elements in the i-th row; Step 3.8: Traverse the matrix , and the matrix The matrix , , After summing and averaging, we get the matrix , and use the matrix Replacement Matrix The matrix ; After the traversal is completed, the matrix The image represented is the rectified image.

6. A paper chart deformation error detection system based on machine vision as claimed in claim 5, characterized in that: The chart is laid flat on the glass surface in reverse, and the infrared light source emits infrared light, which is irradiated onto the chart. After reflection, it is re-emitted by the plano-convex cylindrical reflector and then enters the camera. The camera transmits the captured image to the computer.

7. The paper chart deformation error detection system based on machine vision according to claim 5, characterized in that: The infrared light emitted by the infrared light source cannot directly enter the lens after being reflected by the glass mirror.

8. The machine vision-based paper chart deformation error detection system according to claim 5, characterized in that: The infrared light source radiates 850nm infrared light, and an 850nm filter is installed inside the lens of the camera.

9. The machine vision-based paper chart deformation error detection system according to claim 5, characterized in that: The number of the outline recognition optical paths is four, and the computer splices the images taken by the four cameras to form an image of the paper chart.

Citation Information

Patent Citations

  • Stumpage diameter at breast height measuring method based on machine vision and deep learning

    CN113888641A

  • Galvanometer laser processing distortion correction method and system

    CN114022370A