Lens size measurement method, system, storage medium and intelligent terminal

By using an array grid disk and edge detection algorithm to calculate lens size, the problem of inaccurate lens size measurement is solved, and higher measurement accuracy is achieved.

CN115423768BActive Publication Date: 2026-01-16NINGBO MING SING OPTICAL R & D
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211051791.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2026-01-16
Estimated Expiration
2042-08-31

AI Technical Summary

Technical Problem

In existing technologies, image distortion when a camera captures a lens can lead to inaccurate lens size measurements, affecting subsequent processing.

Method used

By employing an array grid disk and edge detection algorithm, the lens size is calculated by determining the pixel coordinates and physical coordinates of the lens contour points, thereby reducing the impact of image distortion.

Benefits of technology

This improves the accuracy of lens size measurement data, ensuring the precision of subsequent processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115423768B_ABST
    Figure CN115423768B_ABST
Patent Text Reader

Abstract

The application relates to a lens size measurement method, a lens size measurement system, a storage medium and an intelligent terminal, relates to the field of glasses processing measurement technology, and comprises the following steps: acquiring shooting image information; determining lens contour information according to the shooting image information, and determining contour pixel coordinate information of each contour point; defining a square on an array square disc, in which the contour point is located, as a similar square, determining a fixed edge in the similar square, and defining two end points of the fixed edge as a first end point and a second end point respectively; acquiring first pixel coordinate information, second pixel coordinate information and angle information between the fixed edge and a horizontal coordinate axis, and calculating physical coordinates and pixel coordinates to determine contour physical coordinate information of the contour point; and determining lens size information according to the contour physical coordinate information of each contour point. The application has the effect of improving the accuracy of lens size measurement data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of eyeglass processing measurement technology, and particularly to a lens size measurement method, system, storage medium and intelligent terminal. BACKGROUND

[0002] In the daily processing of eyeglass lenses, a full-automatic edging machine is often used for processing. In the processing, the shape and size of the eyeglass lens need to be obtained first so as to facilitate subsequent processing.

[0003] In the related art, the size of the eyeglass lens is generally obtained by shooting the lens with a camera-equipped device.

[0004] In view of the related art, the inventors believe that when the camera shoots the lens, the obtained image will be distorted, resulting in a certain deviation between the lens size on the image and the actual size, so that the lens size measurement is not accurate enough, which is inconvenient for subsequent processing of the lens, and there is still room for improvement. SUMMARY

[0005] In order to improve the accuracy of lens size measurement data, the present application provides a lens size measurement method, system, storage medium and intelligent terminal.

[0006] In a first aspect, the present application provides a lens size measurement method, which adopts the following technical solution:

[0007] A lens size measurement method, comprising:

[0008] obtaining shooting image information;

[0009] determining lens contour information of a preset lens on a preset array square grid disc according to a preset edge detection method;

[0010] determining contour pixel coordinate information of each contour point on a contour corresponding to the lens contour information;

[0011] defining a square grid where the contour point is located on the array square grid disc as a similar square grid, and determining a preset fixed edge in the similar square grid, and defining two end points of the fixed edge as a first end point and a second end point, respectively;

[0012] obtaining first pixel coordinate information of the first end point, second pixel coordinate information of the second end point, and angle information between the fixed edge and a preset horizontal coordinate axis;

[0013] calculating to determine contour physical coordinate information of the contour point according to preset first physical coordinate information of the first end point, preset second physical coordinate information of the second end point, the first pixel coordinate information, the second pixel coordinate information, the angle information and a preset fixed value;

[0014] The lens size information is determined based on the physical coordinates of each contour point.

[0015] By adopting the above technical solution, the image information captured by the camera is first obtained, and the contour of the lens on the array grid is determined by the corresponding edge detection algorithm. The positional correspondence between the contour points and the fixed edge endpoints in the corresponding grid is determined based on the pixel coordinates of the contour points and the pixel coordinates of the fixed edge endpoints. Then, the physical coordinates of the contour points in the corresponding physical coordinate system are calculated by the physical coordinates of the fixed edge endpoints. Thus, the size of the lens can be calculated based on the physical coordinates of each contour point on the lens, thereby reducing the influence of image distortion on lens size measurement and improving the accuracy of lens size measurement data.

[0016] Optional methods for determining the fixed side include:

[0017] Calculate the distance between the contour point and the four sides of the corresponding adjacent square to determine the interval distance information;

[0018] According to the preset sorting rules, the interval distance information with the smallest corresponding value among the four interval distance information is determined, and the side of the square corresponding to the interval distance information is defined as a fixed side.

[0019] By adopting the above technical solution, the side closest to the contour point in the grid can be determined, thereby further reducing the impact of image distortion on lens size measurement.

[0020] Optional methods for determining the physical coordinate information of the contour include:

[0021] definition:

[0022] The coordinates corresponding to the first pixel coordinate information are ;

[0023] The coordinates corresponding to the first physical coordinate information are ;

[0024] The coordinates corresponding to the second pixel coordinate information are: ;

[0025] The coordinates corresponding to the second physical coordinate information are: ;

[0026] The coordinates corresponding to the contour pixel coordinates of the contour points are ;

[0027] The physical coordinates of the contour points correspond to the following coordinates: ;

[0028] The angle value corresponding to the included angle information is ;

[0029] The fixed value is ;

[0030] .

[0031] By adopting the technical scheme, the corresponding formula can be used to determine the physical coordinates of the contour points, and subsequent size calculation is facilitated.

[0032] Optionally, the method for determining the physical coordinates of the end points of each grid on the array grid plate comprises:

[0033] acquiring calibration image information of a preset circular array calibration plate;

[0034] determining the contours of each circle on the circular array calibration plate according to a preset edge detection method, and determining the center pixel coordinate information of the circle centers;

[0035] establishing a physical coordinate system with any circle center in the calibration image information as the origin, and acquiring the origin pixel coordinate information of the circle center;

[0036] determining the pixel straight line information according to the center pixel coordinate information and the origin pixel coordinate information of each circle center, and determining the offset angle information between the straight line corresponding to the pixel straight line information and the horizontal coordinate axis;

[0037] calculating the center physical coordinate information of the circle center according to the center pixel coordinate information, the origin pixel coordinate information, the offset angle information and a fixed value, and connecting the lines between adjacent circle centers to form an array grid plate.

[0038] By adopting the technical scheme, the physical coordinates of the circle centers on the calibration plate can be calculated by combining the pixel coordinate information with the distorted pattern of the circular array calibration plate under the camera, so as to facilitate the establishment of the array grid plate and the determination of the physical coordinates of the end points of each grid on the array grid plate.

[0039] Optionally, the method for calculating the physical coordinates of all circle centers comprises:

[0040] calculating the distance between adjacent circle centers according to the center pixel coordinate information to determine the center distance information, and performing mean value calculation according to each center distance information to determine the mean distance information;

[0041] calculating the normal range information according to the mean distance information and a preset allowable error value;

[0042] placing the origin in a preset fixed set, and determining a circle adjacent to the point in the fixed set and having a distance corresponding to the center distance information within a range corresponding to the normal range information, and defining the circle as a to-be-solved circle;

[0043] After the physical coordinate information of the center of the circle to be solved is determined, the fixed set is emptied and the center of the circle to be solved is placed in the fixed set, and the center of the circle to be solved is updated according to the newly added circle center in the fixed set, and the circle to be solved is repeatedly updated until the number of the circle to be solved is zero.

[0044] By adopting the above technical solution, the physical coordinate of the center of each circle can be calculated in a point-to-surface radiation manner, which not only improves the accuracy of the calculation of the center of the circle, but also reduces the omission of the calculation of the center of the circle.

[0045] Optionally, the method for correcting the physical coordinate information of the center of the circle comprises:

[0046] According to the point in the fixed set and the corresponding circle to be solved, the information of the connected straight line is determined, and the correction angle information between the straight line corresponding to the connected straight line information and the horizontal coordinate axis is determined.

[0047] Definition:

[0048] The coordinate corresponding to the physical coordinate information of the center of the circle of the point in the fixed set is ;

[0049] The coordinate corresponding to the physical coordinate information of the center of the circle of the center of the circle to be solved is ;

[0050] The angle corresponding to the correction angle information is ;

[0051] .

[0052] By adopting the above technical solution, the center coordinate of the new circle to be solved can be calculated according to the solved point coordinate in the fixed set, and the correction of the calculation method makes the physical coordinate calculation of the center of the circle more accurate.

[0053] In a second aspect, the application provides a lens size measurement system, which adopts the following technical solution:

[0054] A lens size measurement system comprises:

[0055] An acquisition module is configured to acquire image information;

[0056] A processing module is connected to the acquisition module and is configured to store and process information;

[0057] The processing module determines the lens contour information of the preset lens on the preset array square disc in the image information according to a preset edge detection method;

[0058] The processing module determines the contour pixel coordinate information of each contour point on the contour corresponding to the lens contour information;

[0059] The processing module defines the square in which the profile point on the array square plate is located as a similar square, and determines a preset fixed edge in the similar square, and defines two end points of the fixed edge as a first end point and a second end point respectively;

[0060] The acquisition module acquires first pixel coordinate information of the first end point, second pixel coordinate information of the second end point, and angle information between the fixed edge and a preset horizontal coordinate axis;

[0061] The processing module calculates and determines the profile physical coordinate information of the profile point according to the preset first physical coordinate information of the first end point, the preset second physical coordinate information of the second end point, the first pixel coordinate information, the second pixel coordinate information, the angle information, and a preset fixed value;

[0062] The processing module determines the lens size information according to the profile physical coordinate information of each profile point.

[0063] By adopting the above technical solution, the acquisition module first acquires the shooting image information obtained by the camera shooting, the processing module determines the profile of the lens on the array square plate by using the corresponding edge detection algorithm, the processing module determines the position correspondence between the pixel coordinates of the profile point and the pixel coordinates of the end point of the fixed edge in the corresponding square, and the processing module then calculates and determines the physical coordinates of the profile point in the corresponding physical coordinate system by using the physical coordinates of the end point on the fixed edge. Therefore, the processing module can calculate the size of the lens according to the physical coordinates of each profile point on the lens, thereby reducing the influence of image distortion on the lens size measurement and improving the accuracy of the lens size measurement data.

[0064] In a third aspect, the present application provides an intelligent terminal, which adopts the following technical solution:

[0065] An intelligent terminal includes a memory and a processor, and the memory stores a computer program capable of being loaded and executed by the processor to perform any of the above lens size measurement methods.

[0066] By adopting the above technical solution, by using the intelligent terminal, the shooting image information obtained by the camera shooting is first acquired, the profile of the lens on the array square plate is determined by using the corresponding edge detection algorithm, the position correspondence between the pixel coordinates of the profile point and the pixel coordinates of the end point of the fixed edge in the corresponding square is determined, and the physical coordinates of the profile point in the corresponding physical coordinate system are calculated and determined by using the physical coordinates of the end point on the fixed edge. Therefore, the size of the lens can be calculated according to the physical coordinates of each profile point on the lens, thereby reducing the influence of image distortion on the lens size measurement and improving the accuracy of the lens size measurement data.

[0067] In a fourth aspect, the present application provides a computer storage medium capable of storing a corresponding program, having the characteristics of improving the accuracy of lens size measurement data, and adopting the following technical solution:

[0068] A computer readable storage medium stores a computer program capable of being loaded by a processor and executing any of the above lens size measurement methods.

[0069] By adopting the above technical solution, the computer program of the lens size measurement method is stored in the storage medium, the shooting image information obtained by the camera shooting is first acquired, the corresponding edge detection algorithm is used to determine the outline of the lens on the array grid plate, the position correspondence relationship between the outline point and the pixel coordinates of the fixed edge end point in the corresponding grid is determined according to the pixel coordinates of the outline point and the pixel coordinates of the fixed edge end point in the corresponding grid, and the physical coordinates of the outline point in the corresponding physical coordinate system are calculated and determined through the physical coordinates of the fixed edge end point, so that the size of the lens can be calculated according to the physical coordinates of each outline point on the lens, thereby reducing the influence of image distortion on lens size measurement and improving the accuracy of lens size measurement data.

[0070] In summary, the present application includes at least one of the following beneficial technical effects:

[0071] 1. The coordinates of the outline points of each lens can be determined by using the array grid plate and the coordinates of the outline points, so as to reduce the influence of image distortion on lens size measurement;

[0072] 2. The side of the array grid plate closest to the outline point is determined to further reduce the influence of image distortion on lens size measurement;

[0073] 3. Determining the coordinates of the circle centers by point-to-surface can not only use the adjacent circle centers to calculate more accurate circle centers, but also is not easy to miss the physical coordinates of the circle centers. BRIEF DESCRIPTION OF DRAWINGS

[0074] Figure 1 is a flowchart of the array grid plate determination method.

[0075] Figure 2 is a schematic diagram of a circular array calibration plate.

[0076] Figure 3 is a flowchart of the to-be-solved circle determination method.

[0077] Figure 4 is a flowchart of the lens size measurement method.

[0078] Figure 5 is a schematic diagram of the lens on the array grid plate.

[0079] Figure 6 is a module flowchart of the lens size measurement method. DETAILED DESCRIPTION

[0080] For the purposes of the present application, the technical solutions and advantages thereof will be more apparent from the following detailed description of the application, taken in conjunction with the accompanying drawings and examples. Figures 1-6 It should be understood that the specific examples described herein are intended to be illustrative only and are not intended to limit the scope of the present application.

[0081] The embodiments of the present application will be described in further detail below with reference to the accompanying drawings.

[0082] The embodiments of the present application disclose a lens size measurement method, which can establish an array grid plate by using the image of a circular array calibration plate in a camera, and calculate the physical coordinates of each contour point on the lens through the array grid plate, so as to realize correct processing of the lens size and improve the accuracy of lens size measurement.

[0083] Referring to Figure 1 , the method flow of the lens size measurement method comprises the following steps:

[0084] Step S100: Obtain calibration image information of a preset circular array calibration plate.

[0085] The circular array calibration plate is a template with circles and arrayed thereon. Referring to Figure 2 , the diameter of the circles is a fixed value set by a staff, the distance between the centers of adjacent circles is a fixed value, the circles are black as a whole, and the rest of the calibration plate is white; the image corresponding to the calibration image information is an image in which the circular array calibration plate is placed to cover the camera shooting range and is shot by the camera.

[0086] Step S101: Determine the contour of each circle on the circular array calibration plate according to a preset edge detection method, and determine the center pixel coordinate information of the circle center.

[0087] The edge detection method is a method capable of determining the outer contour of each circle on the circular array calibration plate, which comprises converting the image into a grayscale image, performing filtering and denoising processing, and finally applying a canny edge detection algorithm. The coordinate position corresponding to the center pixel coordinate information is the pixel coordinate of the center of each circle in the shot calibration plate image, which can be determined by the image resolution size and the position of the center in the image.

[0088] Step S102: Establish a physical coordinate system with any circle center in the calibration image information as the origin, and obtain the origin pixel coordinate information of the circle center.

[0089] Wherein, any circle center is generally closer to the image center in the image, the closest circle center can be determined by comparing the pixel coordinates of the circle center with the image center point pixel coordinates, if there are multiple circle centers with the same distance, the circle center with smaller x-axis in the pixel coordinates is used to establish the physical coordinate system, if the two circle centers have the same distance and consistent x-axis coordinates, the circle center with smaller y-axis in the pixel coordinates is used to establish the physical coordinate system; the coordinate corresponding to the origin pixel coordinate information is the pixel coordinate of the circle center as the origin.

[0090] Step S103: determining the pixel straight line information according to the circle center pixel coordinate information and the origin pixel coordinate information, and determining the offset angle information between the straight line corresponding to the pixel straight line information and the horizontal coordinate axis.

[0091] The straight line corresponding to the pixel straight line information is the connecting straight line between the circle center and the origin of the physical coordinate system, the horizontal coordinate axis is the x-axis on the physical coordinate system, and the angle corresponding to the offset angle information is the acute angle between the straight line corresponding to the pixel straight line information and the horizontal coordinate axis.

[0092] Step S104: calculating the circle center physical coordinate information of the circle center according to the circle center pixel coordinate information, the origin pixel coordinate information, the offset angle information and a fixed value, and connecting the adjacent circle centers to form an array square board.

[0093] According to the comparison of the circle center pixel coordinate information and the origin pixel coordinate information, it can be determined that the circle center is separated from the origin by how many circles, and the actual physical distance between the circle center and the origin can be determined by using the fixed value, at this time the origin physical coordinate is (0, 0), the physical coordinates of each circle center on the established physical coordinate system can be calculated by using the trigonometric function calculation formula, the offset angle information and the physical distance between the circle center and the origin, and the information of the physical coordinates, i.e. the circle center physical coordinate information, is recorded; at the same time, connecting the adjacent circle centers can form an array square board similar to a chessboard, and each point on the array square board is a circle center.

[0094] Referring to Figure 3 , in order to calculate the physical coordinates of all circle centers and have high accuracy, the calculation method comprises:

[0095] Step S200: calculating the distance between adjacent circle centers according to the circle center pixel coordinate information to determine the circle center distance information, and calculating the mean distance information according to each circle center distance information.

[0096] The distance corresponding to the circle center distance information is the pixel distance between the circle centers of adjacent circles in the image, which can be determined by the pixel coordinates, and the distance corresponding to the mean distance information is the mean of the distances corresponding to all circle center distance information.

[0097] Step S201: Calculate according to the mean distance information and the preset allowable error value to determine the normal range information.

[0098] The allowable error value is a fixed value set by the staff, and the range corresponding to the normal range information is a distance range set by the staff to identify the circle as an adjacent circle. The lower limit value of the range corresponding to the normal range information is determined by subtracting the allowable error value from the distance corresponding to the mean distance information, and the upper limit value of the range corresponding to the normal range information is determined by adding the allowable error value to the distance corresponding to the mean distance information.

[0099] Step S202: Place the origin in the preset fixed set, and determine the circle adjacent to the point in the fixed set and the distance corresponding to the center distance information in the normal range information, and define the circle as a to-be-solved circle.

[0100] The fixed set is an empty set that can place coordinates, and the origin is placed in the fixed set. At this time, the point in the fixed set is the origin. According to the origin, the adjacent circles are determined, and these circles are defined as to-be-solved circles to mark different circles for subsequent calculation and processing of the circle center.

[0101] Step S203: Determine the connected straight line information according to the to-be-solved circle and the corresponding point in the fixed set, and determine the correction angle information between the straight line corresponding to the connected straight line information and the horizontal coordinate axis.

[0102] The straight line corresponding to the adjacent straight line information is the connecting straight line between the point in the fixed set and the center of the corresponding to-be-solved circle. Referring to Figure 2 , the angle value corresponding to the correction angle information is the acute angle included angle between the straight line corresponding to the connected straight line information and the horizontal coordinate axis. According to the angle corresponding to the correction angle information, the more accurate physical coordinates of the center of the to-be-solved circle can be calculated. The calculation method is as follows:

[0103] The coordinate corresponding to the center physical coordinate information of the point in the fixed set is defined as ; the coordinate corresponding to the center physical coordinate information of the center of the to-be-solved circle is ; the angle corresponding to the correction angle information is ; the fixed value is ; then When the point in the fixed set is the origin, the physical coordinates of the centers of the remaining to-be-solved circles can be calculated.

[0104] Step S204: after the physical coordinate information of the center of all the circles to be solved is determined, the fixed set is emptied and the center of the circle to be solved is placed in the fixed set, and the center of the newly added circle in the fixed set is used to update the circle to be solved. The circle to be solved is repeatedly updated until the number of circles to be solved is zero.

[0105] When the physical coordinate information of the center of all the circles to be solved is determined, the fixed set is emptied and the center of the circle to be solved is placed in the fixed set, so as to realize the iteration of the point positions in the fixed set, so that the physical coordinates of the new circle to be solved can be solved by the physical coordinates of the original circle to be solved. The circle to be solved is repeatedly updated to realize the solution of all the circle centers from the original point to the outside, until the number of circles to be solved is zero, so as to solve all the circles to be solved and reduce the situation that part of the circle center calculation is omitted.

[0106] Referring to Figure 4 In order to measure the lens size and obtain more accurate measurement results, the lens size measurement method comprises the following steps:

[0107] Step S300: acquiring image information.

[0108] The image corresponding to the image information is an image captured by a camera when the lens to be measured is placed on a circular array calibration plate. The image contains the lens as a whole and part of the calibration plate. The specific image size can be controlled by intersection focusing.

[0109] Step S301: determining the lens contour information of the preset lens on the preset array square plate in the image information according to a preset edge detection method.

[0110] The edge detection method is the same as described above, and will not be repeated here. The contour corresponding to the lens contour information is the contour of the lens on the array square plate.

[0111] Step S302: determining the contour pixel coordinate information of each contour point on the contour corresponding to the lens contour information.

[0112] The coordinates corresponding to the contour pixel coordinate information are the pixel coordinates of each contour point on the lens contour, which can be determined by the pixel position of the contour point in the image.

[0113] Step S303: defining the square in which the contour point on the array square plate is located as a similar square, determining a preset fixed edge in the similar square, and defining the two end points of the fixed edge as a first end point and a second end point.

[0114] Referring to Figure 5The square containing the contour point is defined as a nearby square for identification, thus distinguishing different squares on the array grid. A fixed edge is one of the edges in the nearby squares; this edge can be either the edge closest to the contour point or the edge furthest from it, determined by the operator. To reduce the impact of image distortion on the detection results, in this application, the fixed edge is the closest edge. The endpoint with the smaller pixel coordinate x-value on the fixed edge is defined as the first endpoint, and the other endpoint as the second endpoint, to distinguish different endpoints and facilitate subsequent processing. The method for determining the fixed edge includes: Step ①, calculating the contour point and its corresponding... Step 1: The distance between the four sides of adjacent squares is used to determine the interval distance information; Step 2: According to the preset sorting rules, the interval distance information with the smallest corresponding value among the four interval distance information is determined, and the side of the square corresponding to the interval distance information is defined as a fixed edge; The distance corresponding to the interval distance information in Step 1 is the pixel distance value between the contour point and the four sides of the adjacent squares. The sorting rules in Step 2 are methods that can sort the large and small values, such as the bubble sort method. The interval distance information with the smallest corresponding value among the four interval distance information can be determined by the sorting rules, which means that the side of the adjacent square corresponding to the interval distance information is a fixed edge.

[0115] Step S304: Obtain the first pixel coordinate information of the first endpoint, the second pixel coordinate information of the second endpoint, and the angle information between the fixed side and the preset horizontal coordinate axis.

[0116] The coordinates corresponding to the first pixel coordinate information are the pixel coordinates of the first endpoint in the image, the coordinates corresponding to the second pixel coordinate information are the pixel coordinates of the second endpoint in the image, and the angle information corresponds to the acute angle between the fixed side and the horizontal coordinate axis.

[0117] Step S305: Calculate and determine the contour physical coordinate information of the contour point based on the preset first physical coordinate information of the first endpoint, the preset second physical coordinate information of the second endpoint, the first pixel coordinate information, the second pixel coordinate information, the included angle information, and the preset fixed value.

[0118] The coordinates corresponding to the first physical coordinate information are the physical coordinates of the first endpoint in the physical coordinate system, and the coordinates corresponding to the second physical coordinate information are the physical coordinates of the second endpoint in the physical coordinate system. Both are the center coordinates of the circles on the circular array calibration plate. The coordinates corresponding to the contour physical coordinate learning are the physical coordinates of the contour points in the established physical coordinate system. The calculation method includes: defining the coordinates corresponding to the first pixel coordinate information as... The coordinates corresponding to the first physical coordinate information are: The coordinates corresponding to the second pixel coordinate information are: The coordinates corresponding to the second physical coordinate information are: ; the coordinate corresponding to the profile pixel coordinate information of the profile point is ; the coordinate corresponding to the profile physical coordinate information of the profile point is ; the angle value corresponding to the included angle angle information is ; and .

[0119] Step S306: determining the lens size information according to the profile physical coordinate information of each profile point.

[0120] The size corresponding to the lens size information is the distance between two profile points on the lens, which can be solved by the physical coordinates of the two profile points, and the calculation method is known to those skilled in the art and will not be described here.

[0121] Referring to Figure 6 , based on the same inventive concept, the embodiment of the present application provides a lens size measurement system, comprising:

[0122] An acquisition module is configured to acquire the shooting image information.

[0123] A processing module is connected with the acquisition module and is configured to store and process information.

[0124] The processing module determines the lens profile information of the preset lens on the preset array square disc in the shooting image information according to a preset edge detection method.

[0125] The processing module determines the profile pixel coordinate information of each profile point on the profile corresponding to the lens profile information.

[0126] The processing module defines the square on which the profile point is located on the array square disc as a similar square, and determines a preset fixed edge in the similar square, and defines the two end points of the fixed edge as a first end point and a second end point, respectively.

[0127] The acquisition module acquires the first pixel coordinate information of the first end point, the second pixel coordinate information of the second end point, and the included angle angle information between the fixed edge and the preset horizontal coordinate axis.

[0128] The processing module calculates and determines the profile physical coordinate information of the profile point according to the preset first physical coordinate information of the first end point, the preset second physical coordinate information of the second end point, the first pixel coordinate information, the second pixel coordinate information, the included angle angle information, and a preset fixed value.

[0129] The processing module determines the lens size information according to the profile physical coordinate information of each profile point.

[0130] A fixed edge determination module is configured to determine the side edge closest to the profile point in the similar square.

[0131] A profile physical coordinate calculation module is configured to calculate the physical coordinates of the lens profile point.

[0132] Array square plate determination module, according to the preset circular array calibration plate to calculate and determine the physical coordinates of each circle center, and through each circle center to establish an array square plate;

[0133] To be solved circle determination module, for determining the circle center whose physical coordinates have not been determined, and solving the circle center to reduce the omission of circle center solving;

[0134] The center physical coordinate calculation module calculates the physical coordinates of the adjacent circle center according to the known circle center physical coordinates, and improves the accuracy of the circle center physical coordinate calculation.

[0135] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional module is exemplified, and in actual application, the above-mentioned functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

[0136] The embodiment of the application provides a computer readable storage medium, which stores a computer program capable of being loaded by a processor and executing a lens size measurement method.

[0137] The computer storage medium includes, for example, a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and various storage program codes.

[0138] Based on the same inventive concept, the embodiment of the application provides an intelligent terminal, which comprises a memory and a processor, and the memory stores a computer program capable of being loaded by the processor and executing a lens size measurement method.

[0139] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional module is exemplified, and in actual application, the above-mentioned functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

[0140] The above are only preferred embodiments of the present application, not intended to limit the protection scope of the present application, any one feature disclosed in the specification (including the abstract and the drawings) can be replaced by other equivalent or similar features, unless specifically stated otherwise. That is, unless specifically stated, each feature is only an example of a series of equivalent or similar features.

Claims

1. A method of measuring the size of a lens, characterized in that, The method comprises the following steps: acquiring image information; determining lens profile information of a preset lens on a preset array grid disc according to a preset edge detection method; determining profile pixel coordinate information of each profile point on the profile corresponding to the lens profile information; defining a grid where the profile point is located on the array grid disc as a similar grid, and determining a preset fixed edge in the similar grid, and defining two end points of the fixed edge as a first end point and a second end point respectively; acquiring first pixel coordinate information of the first end point, second pixel coordinate information of the second end point, and angle information between the fixed edge and a preset horizontal coordinate axis; calculating and determining profile physical coordinate information of the profile point according to preset first physical coordinate information of the first end point, preset second physical coordinate information of the second end point, the first pixel coordinate information, the second pixel coordinate information, the angle information, and a preset fixed value; determining lens size information according to the profile physical coordinate information of each profile point; the method for determining the fixed edge comprises: calculating distances between the profile point and four side edges of the corresponding similar grid to determine interval distance information; determining interval distance information with the smallest corresponding value among the four interval distance information according to a preset sorting rule, and defining the grid side edge corresponding to the interval distance information as the fixed edge; the method for determining the profile physical coordinate information comprises: defining: the coordinate corresponding to the first pixel coordinate information as (x1, y1); the coordinate corresponding to the first physical coordinate information as (X1, Y1); the coordinate corresponding to the second pixel coordinate information as (x2, y2); the coordinate corresponding to the second physical coordinate information as (X2, Y2); the coordinate corresponding to the profile pixel coordinate information of the profile point as (x3, y3); the coordinate corresponding to the profile physical coordinate information of the profile point as (X3, Y3); the angle value corresponding to the angle information as a; the fixed value as L; the method for determining the physical coordinates of the end points of each grid on the array grid disc comprises: acquiring calibration image information of a preset circular array calibration board; determining the profiles of each circle on the circular array calibration board according to a preset edge detection method, and determining the center pixel coordinate information of the circle center; establishing a physical coordinate system with any circle center in the calibration image information as the origin, and acquiring the origin pixel coordinate information of the circle center; determining pixel straight line information according to the center pixel coordinate information of each circle center and the origin pixel coordinate information, and determining the offset angle information between the straight line corresponding to the pixel straight line information and the horizontal coordinate axis; calculating the center physical coordinate information of the circle center according to the center pixel coordinate information, the origin pixel coordinate information, the offset angle information, and a fixed value, and connecting the adjacent circle centers to form an array grid disc; the method for calculating the physical coordinates of all circle centers comprises: calculating the distance between adjacent circle centers according to the center pixel coordinate information to determine center distance information, and performing mean value calculation according to each center distance information to determine mean distance information; calculating the normal range information according to the mean distance information and a preset allowable error value; The origin is placed in a preset fixed set, and a circle adjacent to a point in the fixed set and having a distance corresponding to the distance information of the center of the circle within a range corresponding to the normal range information is determined according to the point, and the circle is defined as a to-be-solved circle; After the center physical coordinate information of all the to-be-solved circles is determined, the fixed set is emptied, the center of the to-be-solved circle is placed in the fixed set, and the to-be-solved circle is updated according to the newly added circle center in the fixed set, and the to-be-solved circle is repeatedly updated until the number of to-be-solved circles is zero.

2. The lens sizing method of claim 1, wherein The method for correcting the center physical coordinate information of the circle includes: The relative straight line information is determined according to the to-be-solved circle and the point in the corresponding fixed set, and the correction angle information between the straight line corresponding to the relative straight line information and the horizontal coordinate axis is determined; It is defined that: The coordinate corresponding to the center physical coordinate information of the point in the fixed set is (X4, Y4); The coordinate corresponding to the center physical coordinate information of the center of the to-be-solved circle is (X5, Y5); The angle corresponding to the correction angle information is β; 3. A smart terminal, characterized by The computer program capable of being loaded and executed by the processor to execute the method of any one of claims 1 to 2 is stored on the memory.

4. A computer-readable storage medium, characterized in that, The computer program capable of being loaded and executed by the processor to execute the method of any one of claims 1 to 2 is stored.

Citation Information

Patent Citations

  • Workpiece size measuring method and system based on machine vision

    CN104296665A

  • Method for measuring outline size of inner edge of mirror frame

    CN114792335A