Device, system, electronic device and storage medium for measuring parameters of glasses

The binocular camera automatically collects two scene images of the mirror-applied object, monitors the pupil and position marking points, and calculates and obtains mirror-applied parameters, solving the problems of low efficiency and large measurement errors in the existing technology, and achieving efficient and accurate measurement of mirror-applied parameters.

CN114119589BActive Publication Date: 2025-03-28BEIJING DAHENG PUXIN MEDICAL TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111461582.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-02
Publication Date
2025-03-28
Estimated Expiration
2041-12-02

AI Technical Summary

Technical Problem

The prior art requires a lot of human interaction during the mirroring process, resulting in inefficiency. Manual image acquisition and monocular system can only calculate in-plane distances, resulting in large measurement errors and low efficiency.

Method used

Through the binocular camera, the pupil and positioning marking points are monitored, and two scene images are automatically collected, and the mirror adaptation parameters are obtained to achieve efficient and accurate measurement of mirror adaptation parameters.

Benefits of technology

It improves the efficiency of lens adaptation, reduces labor costs, reduces measurement errors, and realizes the ability to calculate and obtain all lens adaptation parameters through only one image acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114119589B_ABST
    Figure CN114119589B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a device, system, electronic device and storage medium for measuring glasses fitting parameters. The electronic device executes a program to implement the following glasses fitting parameter measurement method: acquiring a scene within the shooting range of a binocular camera in real time; saving two scene images when confirming that the scene includes a positioning mark point and a pupil, wherein the positioning mark point is set on a frame worn by a glasses fitting object; obtaining the spatial coordinates of the positioning mark point and the pupil based on the positioning mark point and the pupil determined on the two scene images; determining the glasses fitting parameters based on the spatial coordinates of the positioning mark point and the pupil and the size attributes of the frame, so that at least the depth information of the glasses fitting object image can be obtained by automatically collecting the image only once, thereby calculating all the glasses fitting parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of spectacles fitting parameter measurement, and specifically to a device, system, electronic device and storage medium for measuring spectacles fitting parameters. Background Art

[0002] In the related art, during the process of fitting glasses, the glasses-fitting object needs to interact with the relevant service personnel in a large amount, which reduces the efficiency of fitting glasses. In order to solve the above problems, the related art adopts a technology of manually collecting images and calculating the distance between the glasses and the eyes, but manual image collection will not only reduce the efficiency of detection, but also increase the measurement error. In addition, the monocular system used in the related art can only calculate the distance within the plane of the collected image, and it is necessary to collect images multiple times and cooperate with the side face image of the person, resulting in low measurement efficiency and large errors.

[0003] Therefore, how to measure glasses parameters efficiently and accurately becomes an urgent problem to be solved. Summary of the invention

[0004] Embodiments of the present application provide a device, system, electronic device and storage medium for measuring glasses fitting parameters. In some embodiments of the present application, two scene images are automatically collected by monitoring the pupil and the positioning mark point, which can improve the detection efficiency and reduce the labor cost; and the depth information of the image of the glasses fitting object can be obtained through a single image collection, so that all the glasses fitting parameters can be calculated.

[0005] In a first aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory is configured to store a computer program, wherein the processor executes the program to implement the following method for measuring glasses fitting parameters: acquiring a scene within the shooting range of a binocular camera in real time; saving two scene images when confirming that the scene includes a positioning mark point and a pupil, wherein the positioning mark point is set on a frame worn by a person wearing glasses; obtaining the spatial coordinates of the positioning mark point and the pupil based on the positioning mark point and the pupil determined on the two scene images; and determining glasses fitting parameters based on the spatial coordinates of the positioning mark point and the pupil and the size attributes of the frame.

[0006] Therefore, different from the method in the related art that requires manual image acquisition, the embodiment of the present application automatically saves the two scene images when it detects that the scene includes a positioning mark and a pupil mark, thereby obtaining the spatial coordinates of the pupil based on the two scene images, thereby obtaining the depth information of the two scene images, and achieving all the glasses fitting parameters by acquiring the image once, thereby improving the overall glasses fitting efficiency.

[0007] In combination with the first aspect, in one embodiment, before executing the step of saving the two scene images after confirming that the scene includes a positioning mark point and a pupil, the processor further includes: identifying the positioning mark point in the scene and obtaining the image coordinates of the positioning mark point; identifying the pupil in the scene according to the image coordinates of the positioning mark point and obtaining the image coordinates of the pupil. The step of saving the two scene images after confirming that the scene includes a positioning mark point and a pupil includes: saving the two scene images after confirming that the image coordinates of the positioning mark point and the image coordinates of the pupil are obtained.

[0008] Therefore, the embodiment of the present application can automatically take a photo of the current scene (including the positioning marker points and the pupil) by identifying the positioning marker points and the pupil in the scene, thereby obtaining the spatial coordinates of the pupil and obtaining the depth information in the two scene images of the object being fitted.

[0009] In combination with the first aspect, in one embodiment, the binocular camera includes a first lens and a second lens; when the processor executes the identification of the positioning mark points in the scene and obtains the image coordinates of the positioning mark points, it also includes: identifying the positioning mark points in the scene of the first lens and obtaining the image coordinates of the positioning mark points of the first lens; and identifying the positioning mark points in the scene of the second lens and obtaining the image coordinates of the positioning mark points of the second lens.

[0010] Therefore, the embodiment of the present application can perform subsequent pupil recognition based on the positioning mark points obtained by positioning by respectively identifying the positioning mark points in the first lens scene and the positioning mark points in the second lens scene, thereby reducing the probability of false detection and missed detection, improving the overall detection efficiency, and thus achieving accurate detection of the image coordinates of the pupil.

[0011] In combination with the first aspect, in one embodiment, the processor, when executing the step of identifying the pupil in the scene according to the image coordinates of the positioning mark point and obtaining the image coordinates of the pupil, includes: confirming the initial image coordinates of the pupil according to the image coordinates of the positioning mark point; and confirming the image coordinates of the pupil according to the initial image coordinates.

[0012] In combination with the first aspect, in one embodiment, when the processor executes the step of confirming the image coordinates of the pupil based on the initial image coordinates, it also includes: confirming the pupil area based on the image coordinates of the positioning mark point and the initial image coordinates; and confirming the image coordinates of the pupil in the pupil area.

[0013] Therefore, the embodiment of the present application confirms the pupil area and confirms the image coordinates of the pupil within the pupil area. This can confirm the pupil area based on the physiological characteristics of the black area of ​​the human eyeball, prevent recognition errors, and improve detection accuracy.

[0014] In combination with the first aspect, in one embodiment, when the processor executes the step of confirming the image coordinates of the pupil in the pupil area, it also includes: extracting a bright spot that meets preset conditions in the pupil area, wherein the bright spot is obtained by irradiating the pupil with a fill light adjacent to the binocular camera; confirming that the bright spot is the pupil, and obtaining the image coordinates of the pupil.

[0015] Therefore, the embodiment of the present application can detect the precise image coordinates of the pupil through the bright spot formed by the fill light in the center of the pupil, so that the measurement of the glasses fitting parameters reaches an error accuracy of 1%, thereby ensuring the accuracy of glasses fitting.

[0016] In combination with the first aspect, in one implementation, the positioning marking points include checkerboard marking points and disk marking points.

[0017] In a second aspect, an embodiment of the present application provides a device for measuring glasses fitting parameters, the device comprising: a real-time acquisition module, configured to acquire a scene within a shooting range of a binocular camera in real time; an image saving module, configured to save two scene images after confirming that the scene includes a positioning mark point and a pupil, wherein the positioning mark point is set on a frame worn by a glasses fitting object; a coordinate calculation module, configured to obtain the spatial coordinates of the positioning mark point and the pupil based on the positioning mark point and the pupil determined on the two scene images; a parameter calculation module, configured to determine the glasses fitting parameters based on the spatial coordinates of the positioning mark point and the pupil and the size attributes of the frame.

[0018] In combination with the second aspect, in one embodiment, the image saving module is further configured to: identify the positioning mark point in the scene and obtain the image coordinates of the positioning mark point; identify the pupil in the scene based on the image coordinates of the positioning mark point and obtain the image coordinates of the pupil, and save the two scene images after confirming that the image coordinates of the positioning mark point and the image coordinates of the pupil have been obtained.

[0019] In combination with the second aspect, in one embodiment, the image saving module is also configured to: identify the positioning mark points in the scene of the first lens, and obtain the image coordinates of the positioning mark points of the first lens; and identify the positioning mark points in the scene of the second lens, and obtain the image coordinates of the positioning mark points of the second lens.

[0020] In combination with the second aspect, in one embodiment, the coordinate calculation module is further configured to: confirm the initial image coordinates of the pupil based on the image coordinates of the positioning mark point; and confirm the image coordinates of the pupil based on the initial image coordinates.

[0021] In combination with the second aspect, in one embodiment, the coordinate calculation module is further configured to: confirm a pupil area based on the image coordinates of the positioning mark point and the initial image coordinates; and confirm the image coordinates of the pupil in the pupil area.

[0022] In combination with the second aspect, in one embodiment, the coordinate calculation module is further configured to: extract a bright spot that meets preset conditions in the pupil area, wherein the bright spot is obtained by irradiating the pupil with a fill light adjacent to the binocular camera; confirm that the bright spot is the pupil, and obtain the image coordinates of the pupil.

[0023] In combination with the second aspect, in one implementation, the positioning marking points include checkerboard marking points and disk marking points.

[0024] In a third aspect, an embodiment of the present application provides a system for measuring glasses fitting parameters, comprising: a frame, mounted on the glasses frame of a subject wearing glasses, wherein a plurality of positioning marks are arranged on the frame; an image acquisition device, configured to capture scenes within the shooting range of a binocular camera, wherein the image acquisition device comprises at least a binocular camera and a fill light; and an electronic device, executing a method for measuring glasses fitting parameters as described in any one of the first aspect and all embodiments thereof.

[0025] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed, the method for measuring glasses fitting parameters as described in any one of the first aspect and all embodiments thereof is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 A system diagram of glasses fitting parameters shown in an embodiment of the present application;

[0027] Figure 2 A schematic diagram of a framework shown in an embodiment of the present application;

[0028] Figure 3 A structural diagram of an image acquisition device shown in an embodiment of the present application;

[0029] Figure 4 A flowchart of a method for executing glasses fitting parameters shown in an embodiment of the present application;

[0030] Figure 5 A schematic diagram of a scene of the first lens shown in an embodiment of the present application;

[0031] Figure 6 A flowchart of a specific embodiment of a method for fitting glasses parameters shown in an embodiment of the present application;

[0032] Figure 7 A diagram of a device for measuring parameters of glasses shown in an embodiment of the present application;

[0033] Figure 8 A structural diagram of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0035] The method steps in the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0036] The method for measuring the parameters of glasses provided in the embodiments of the present application can be applied to a system for measuring the parameters of glasses. The system for measuring the parameters of glasses includes: Figure 1 The image acquisition device 110 shown is used to acquire two images of a scene and a glasses object within the shooting range of a binocular camera, and the image acquisition device 110 at least includes a binocular camera and a fill light; an electronic device 120 is used to perform a method for measuring glasses parameters; Figure 2 The frame 200 shown is installed on the eyeglass frame of the person wearing the glasses, and a plurality of positioning marks (including chessboard marking points 210 and disk marking points 220) are set on the frame.

[0037] The following is an exemplary description of the problems existing in the method of measuring the parameters of glasses performed by the above-mentioned electronic device in the related art. Specifically, in the related art, a technology of manually collecting images and calculating the distance between the glasses and the eyes is adopted, but manual image collection will not only reduce the efficiency of detection, but also increase the measurement error. In addition, the monocular system used in the related art can only calculate the distance within the plane of the collected image, and it is necessary to collect images multiple times and cooperate with the side face image of the person, resulting in low measurement efficiency and large errors.

[0038] At least to solve the above problems, the present application designs a complete image acquisition device and a method for measuring glasses parameters based on binocular camera measurement technology. Specifically, the scene within the shooting range of the binocular camera is acquired in real time; when it is confirmed that the scene includes positioning mark points and pupils, two scene images are saved, wherein the positioning mark points are set on the frame worn by the glasses object; according to the positioning mark points and pupils determined on the two scene images, the spatial coordinates of the positioning mark points and pupils are obtained; the glasses parameters are determined according to the spatial coordinates of the positioning mark points and pupils and the size attributes of the frame, at least the depth information of the glasses object image can be obtained by automatically acquiring an image only once, so that all the glasses parameters can be calculated. For example: pupil distance (the distance between points), lens eye distance (the distance between a point and a plane), anteversion angle (the angle between a point and a plane), etc.

[0039] The following describes the process of capturing images by the image capture device 110 in the embodiment of the present application.

[0040] like Figure 3 As shown, the image acquisition device 110 includes: a mirror panel 310, a first lens 321 in a binocular camera, a second lens 322 in a binocular camera, a main board 350, a fill light 330, and a bracket 340. The first lens 321 and the second lens 322 are used to photograph the object of the glasses, the main board is used to control the lens shooting and the switch of the fill light, the fill light is used to fill light and determine the pupil position, and the bracket 340 is used to support the mirror panel 310, the first lens 321 in the binocular camera, the second lens 322 in the binocular camera, the main board 350, and the fill light 330.

[0041] That is to say, when the object of glasses is measured, he sits on one side of the mirror panel 310, and the main board 350 controls the fill light 330 to turn on, and the first lens 321 and the second lens 322 acquire the scene within the shooting range of the binocular camera in real time. When the electronic device recognizes that the scene includes both positioning markers and pupils, the images taken by the first lens 321 and the second lens 322 for the object of glasses are saved, and two scene images of the object of glasses are obtained (the two scene images are taken by the first lens 321 and the second lens 322 respectively), and then all the glasses parameters are calculated based on the two scene images of the object of glasses.

[0042] It should be noted that the scene captured by the first lens and the second lens in real time can be captured once every second or once every 0.1 second. Similarly, the electronic device performs synchronous recognition after the first lens and the second lens capture. Figure 3 The arrangement order and types of the various hardware in the image acquisition device 110 shown are only examples, and the embodiments of the present application are not limited thereto.

[0043] An electronic device 120 in an embodiment of the present application will be described below.

[0044] In one embodiment, an electronic device 120 includes a memory and a processor, wherein the memory is configured to store a computer program, wherein the processor implements the following method for measuring glasses fitting parameters by executing the program.

[0045] like Figure 4 As shown, a method for measuring glasses fitting parameters includes: S410, acquiring a scene within a shooting range of a binocular camera in real time; S420, saving two scene images when confirming that the scene includes a positioning mark point and a pupil; S430, obtaining the spatial coordinates of the positioning mark point and the pupil according to the positioning mark point and the pupil determined on the two scene images; S440, determining glasses fitting parameters according to the spatial coordinates of the positioning mark point and the pupil and the size attributes of the frame.

[0046] In one embodiment, S420 includes: identifying a positioning mark point in the scene, obtaining the image coordinates of the positioning mark point, identifying the pupil in the scene according to the image coordinates of the positioning mark point, obtaining the image coordinates of the pupil, and saving the two scene images after confirming that the image coordinates of the positioning mark point and the image coordinates of the pupil are obtained.

[0047] As an embodiment of the present application, S420 also includes identifying the positioning mark points in the scene of the first lens, and obtaining the image coordinates of the positioning mark points of the first lens; and identifying the positioning mark points in the scene of the second lens, and obtaining the image coordinates of the positioning mark points of the second lens.

[0048] like Figure 5 As shown, specifically, taking the first shot as an example, the image coordinates of the positioning mark points are obtained by exemplifying, first, locating the area 501 where the frame appears in the scene, and locating the checkerboard mark points on the area where the frame appears, to obtain the coordinates of the checkerboard mark points.

[0049] That is, the processor locates the area where the frame appears in the preset area with a high probability, performs binarization processing on the area where the frame appears after positioning, and detects the position where the black rectangle 502 appears, wherein the area and aspect ratio of the black rectangle 502 need to meet the first condition. It is determined whether the black rectangles are adjacent, and if it is detected that the area of ​​the black rectangle 502 is twice the number of checkerboard marking points (a checkerboard marking point is composed of two white rectangles and two black rectangles 502), it is determined that the checkerboard marking point is detected, and the center point of the adjacent black rectangle area is used as the center of the checkerboard marking point, thereby obtaining the coordinates of the checkerboard marking point.

[0050] It should be noted that the area of ​​the black rectangle included in the first condition may be greater than 400 pixels and less than 900 pixels, and the aspect ratio may be greater than 0.3 and less than 1.4. The scene image is an image corresponding to a scene in which the positioning marker and the pupil exist simultaneously.

[0051] Secondly, based on the positions of the chessboard marking points detected above, the area 503 where the disk marking points appear below the chessboard marking points is extracted, and the positions where the disk marking points appear in the area 503 where the disk marking points appear are detected to obtain the coordinates of the disk marking points.

[0052] That is, below the checkerboard mark point, a region where the disk mark point appears is preset, the region where the disk mark point appears is binarized, and a black circular region is detected, wherein the area and circularity of the black circular region need to meet the second condition. If the number of black circles detected is consistent with the number of disk mark points, it is confirmed that the disk mark point is detected, and the center of the smallest circumscribed circle of the black circle is used as the center of the disk mark point, thereby obtaining the coordinates of the disk mark point.

[0053] As another embodiment of detecting a black circle, Hough transform may be used to find a black circle whose diameter satisfies a condition.

[0054] That is to say, in the scene where the positioning mark point is identified, at least the frame worn by the person wearing the glasses can be displayed, and multiple positioning marks are set on the frame. Figure 2 The frame 200 shown is clamped on the glasses, and a plurality of marking points are set on the frame 200. The frame 200 and the plurality of marking points on the frame can be displayed on two scene images of the glasses object. The plurality of marking points on the frame 200 can be 4 circular marking points 220 and 3 chessboard marking points 210. The embodiments of the present application are not limited thereto.

[0055] It should be noted that the second condition includes that the roundness of the black center area should be greater than 0.6, and the area can be greater than 60 pixels and less than 260 pixels.

[0056] In one embodiment, S420 includes: confirming the initial image coordinates of the pupil according to the image coordinates of the positioning mark point. Confirming the pupil area according to the image coordinates of the positioning mark point and the initial image coordinates. Extracting a bright spot that meets a preset condition in the pupil area, wherein the bright spot is obtained by irradiating the pupil with a fill light adjacent to the binocular camera. Confirming that the bright spot is the pupil, and obtaining the image coordinates of the pupil.

[0057] A specific implementation method of obtaining the image coordinates of the pupil according to the image coordinates of the positioning mark point includes:

[0058] First, the initial image coordinates of the pupil are determined according to the coordinates of the chessboard marking points and the disk marking points.

[0059] That is, according to the relative position between the preset pupil region and the coordinates of the checkerboard mark points and the disk mark points, the region of interest 504 including the pupil is obtained. The region of interest 504 including the pupil is binarized to detect the black circular region, wherein the area and circularity of the black circular region need to meet the third condition, and if two black circular regions are detected in the region of interest 504 including the pupil, the coordinates corresponding to the centroid of the black circular region in the region of interest including the pupil are used as the initial image coordinates.

[0060] As another embodiment of a method for detecting a black circular area in a region of interest including a pupil, Hough transform may be used to find a circle. Similarly, the black circular area needs to satisfy the third condition.

[0061] It should be noted that, to detect the black circular area in the region of interest including the pupil, the third condition that needs to be met may be that the black area is greater than 2000 pixels and less than 4000 pixels.

[0062] Secondly, after the initial coordinates of the pupil are determined, a certain area around the initial coordinates is used as the pupil area, and bright spots 505 that meet preset conditions are detected in the pupil area, and the coordinates corresponding to the bright spots that meet the preset conditions are used as the image coordinates of the pupil.

[0063] That is to say, after the initial coordinates of the pupil are determined, a certain area is expanded around the initial coordinates as the pupil area (there are two pupil areas, namely the pupil area of ​​the left eye and the pupil area of ​​the right eye), wherein the expanded certain area does not exceed the above-mentioned area of ​​interest including the pupil. The pupil area is binarized, and a circular bright spot 505 (a white dot in the binary image) is extracted, wherein the brightness, area, diameter and roundness of the circular bright spot 505 need to meet the fourth condition, and the coordinates of the circular bright spot that meets the fourth condition are used as the image coordinates of the pupil (the left eye pupil corresponds to the image coordinates of the left eye pupil, and the right eye pupil corresponds to the image coordinates of the right eye pupil).

[0064] As another implementation of extracting the circular bright spot 505, the Hough transform may be used to find the circular bright spot. Similarly, the brightness, area, diameter and roundness of the circular bright spot need to satisfy the fourth condition.

[0065] It should be noted that the fourth condition may be that the area is greater than 10 pixels and less than 36 pixels, and the roundness is greater than 0.8.

[0066] Therefore, after obtaining the image coordinates of the pupil in the first lens through the above-mentioned execution steps, the same operation is performed on the second lens to obtain the image coordinates of the pupil corresponding to the second lens scene.

[0067] After the above steps are completed, it is confirmed that the scene includes the positioning mark point and the pupil. Then, the scene including both the positioning mark point and the pupil is automatically photographed, and two scene images are saved.

[0068] The specific implementation of S430 in the embodiment of the present application will be described below.

[0069] As an embodiment, the spatial coordinates of the positioning mark point and the pupil are obtained according to the positioning mark point and the pupil determined on the two scene images.

[0070] Specifically, according to the internal parameters (including focal length, principal point, tilt coefficient, distortion coefficient, etc.) and external parameters of the calibrated binocular camera, the image coordinates of the positioning mark point and the pupil are calculated to obtain the spatial coordinates of the positioning mark point and the pupil.

[0071] That is to say, according to the image coordinates of the positioning mark point and the image coordinates of the pupil, the method for calculating the spatial coordinates of the pupil is as follows:

[0072] First, the two scene images are corrected according to the distortion coefficients obtained after calibrating the binocular camera, including: calculating a mapping matrix for the distortion correction of the two scene images, and correcting them using the mapping matrix to obtain the two corrected scene images.

[0073] Second, obtain the distortion coefficient, rotation matrix and intrinsic parameter matrix of the binocular camera, use the above-obtained pupil image coordinates to establish the equation about the pupil's spatial coordinates, and use the least squares method to solve the pupil's spatial coordinates of the two scene images. Similarly, use the same method to obtain the spatial coordinates of the positioning marker.

[0074] The specific implementation of S440 in the embodiment of the present application will be described below.

[0075] In one embodiment, the glasses fitting parameters include: the lens-eye distance; S440 includes: calculating the distance value from the spatial coordinates of the pupil to the plane where the positioning mark point is located; and confirming that the distance value is the lens-eye distance.

[0076] That is to say, after obtaining the spatial coordinates of the pupil, all the parameters of the glasses can be calculated based on the spatial coordinates of the pupil. Taking the lens-eye distance as an example, first confirm the plane where the disk mark point is located; then, according to the distance from the spatial coordinates of the pupil to the plane where the disk mark point is located, obtain the distance value; finally, confirm that the distance value is the lens-eye distance.

[0077] It should be noted that the parameters for fitting glasses include: pupil distance, monopupillary distance, lens-eye distance, forward tilt angle and pupil height.

[0078] Therefore, some embodiments of the present application provide a method for calculating the spatial coordinates of the pupil based on two scene images of the object of fitting glasses, thereby determining the fitting parameters. This method can obtain the depth information of the image of the object of fitting glasses through only one image acquisition, so that all the fitting parameters can be calculated, thereby improving the efficiency and accuracy of fitting glasses.

[0079] Therefore, the embodiment of the present application can obtain the spatial coordinates of the pupil by confirming the image coordinates of the pupil in the two scene images taken by the binocular camera, thereby obtaining the depth information of the two scene images, and realizing that all the glasses fitting parameters can be calculated by acquiring the image once, thereby improving the overall glasses fitting efficiency.

[0080] The above describes an electronic device for performing the method for measuring glasses fitting parameters in an embodiment of the present application. The following describes a specific embodiment of the method for measuring glasses fitting parameters in an embodiment of the present application.

[0081] like Figure 6 As shown, when the electronic device executes the method for measuring the parameters of glasses, the electronic device obtains the scene 610 within the shooting range of the binocular camera in real time.

[0082] First, multiple positioning marks are detected in the scene of the first lens 620. At the same time, if it is determined that the detection of multiple positioning marks in the scene of the first lens is successful, multiple positioning marks are detected in the scene of the second lens 630. If the detection of multiple positioning marks in the scene of the lens is also successful, the pupil area is detected in the scene of the first lens 640. If the detection is confirmed to be completed, the bright spot is detected in the scene of the first lens 650. Next, the pupil area is detected in the scene of the second lens 660. After judging that the detection is successful, the bright spot is detected in the scene of the second lens 670, the spatial coordinates of the pupil and multiple positioning marks are calculated 680, and all the glasses parameters are calculated according to the spatial coordinates 690. In the case that the multiple positioning marks in the first lens are not identified in step 620, the process returns to step 610. In the case that the multiple positioning marks in the second lens are not identified in step 630, the process returns to step 610. In the case that the pupil area of ​​the first lens is not identified in step 640, the process returns to step 610. In the case that the pupil area of ​​the second lens is not identified in step 660, the process returns to step 610.

[0083] It should be noted that the specific processes involved in the above steps are as described above and will not be repeated here.

[0084] Therefore, the method for measuring glasses fitting parameters in the embodiment of the present application starts with detecting the chessboard marking points with higher detection robustness, gradually locates the region of interest of the next detection target according to the detected results, and performs detection and identification only within the region of interest, thereby reducing the probability of false detection and missed detection, and improving the overall detection efficiency, thereby achieving fully automatic detection of the pupil position.

[0085] By using a fill light to form a tiny bright spot in the center of the pupil of the glasses fitting object, the pupil center can be accurately located by detecting the bright spot in two scene images, so that the measurement of glasses fitting parameters reaches an error accuracy of 1%.

[0086] The above describes a specific embodiment of measuring the parameters of glasses fitting in the embodiments of the present application, and the following describes a device for measuring the parameters of glasses fitting.

[0087] like Figure 7 As shown, a device 700 for measuring parameters of glasses fitting according to an embodiment of the present application includes: a real-time acquisition module 710 , an image storage module 720 , a coordinate calculation module 730 and a parameter calculation module 740 .

[0088] In one embodiment, the embodiment of the present application provides a device 700 for measuring glasses fitting parameters, the device comprising: a real-time acquisition module 710, configured to acquire a scene within the shooting range of a binocular camera in real time; an image saving module 720, configured to save two scene images when confirming that the scene includes a positioning mark point and a pupil, wherein the positioning mark point is set on a frame worn by a glasses fitting subject; a coordinate calculation module 730, configured to obtain the spatial coordinates of the positioning mark point and the pupil based on the positioning mark point and the pupil determined on the two scene images; a parameter calculation module 740, configured to determine the glasses fitting parameters based on the spatial coordinates of the positioning mark point and the pupil and the size attributes of the frame.

[0089] In one embodiment, the image saving module 720 is further configured to: identify the positioning mark point in the scene and obtain the image coordinates of the positioning mark point; identify the pupil in the scene based on the image coordinates of the positioning mark point and obtain the image coordinates of the pupil; and save the two scene images after confirming that the image coordinates of the positioning mark point and the image coordinates of the pupil have been obtained.

[0090] In one embodiment, the image saving module 720 is further configured to: identify the positioning mark points in the scene of the first lens, and obtain the image coordinates of the positioning mark points of the first lens; and identify the positioning mark points in the scene of the second lens, and obtain the image coordinates of the positioning mark points of the second lens.

[0091] In one implementation, the coordinate calculation module 730 is further configured to: confirm the initial image coordinates of the pupil according to the image coordinates of the positioning mark point; and confirm the image coordinates of the pupil according to the initial image coordinates.

[0092] In one embodiment, the coordinate calculation module 730 is further configured to: confirm a pupil area according to the image coordinates of the positioning mark point and the initial image coordinates; and confirm the image coordinates of the pupil in the pupil area.

[0093] In one embodiment, the coordinate calculation module 730 is further configured to: extract a bright spot satisfying preset conditions in the pupil area, wherein the bright spot is obtained by irradiating the pupil with a fill light adjacent to the binocular camera; confirm that the bright spot is the pupil, and obtain the image coordinates of the pupil.

[0094] In one embodiment, the positioning marking points include checkerboard marking points and disk marking points.

[0095] In the embodiments of the present application, Figure 7 The modules shown can achieve Figure 4 and Figure 6 Each process in the method embodiment. Figure 7 The operations and / or functions of each module in Figure 4 and Figure 6 For details, please refer to the description in the above method embodiment. To avoid repetition, detailed description is appropriately omitted here.

[0096] like Figure 8 As shown, an embodiment of the present application provides an electronic device 800, including: a processor 810, a memory 820 and a bus 830, wherein the processor is connected to the memory via the bus, and the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, they are used to implement a method as described in any one of the above embodiments. For details, please refer to the description in the above method embodiments. To avoid repetition, the detailed description is appropriately omitted here.

[0097] Among them, the bus is used to realize the direct connection and communication of these components. Among them, the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0098] The memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the method described in the above embodiment may be executed.

[0099] Understandably, Figure 8 The structure shown is for illustration only and may also include Figure 8 More or fewer components as shown, or with Figure 8 Different configurations shown. Figure 8 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0100] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed, any method described in any of the above-mentioned embodiments is implemented. For details, please refer to the description in the above-mentioned method embodiments. To avoid repetition, the detailed description is appropriately omitted here.

[0101] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0102] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. An electronic device, characterized in that: The invention comprises a memory and a processor, wherein the memory is configured to store a computer program, wherein the processor implements the following method for measuring eyeglass parameters by executing the program: Acquire the scene within the shooting range of the binocular camera in real time; In the case of confirming that the scene includes positioning mark points and pupils, two scene images are saved, wherein the positioning mark points are set on the frame worn by the person wearing glasses; the positioning mark points include chessboard mark points and disk mark points; the coordinates of the chessboard mark points are: the center point of the rectangular area that meets the first condition after the region where the positioned frame appears is binarized; the coordinates of the disk mark points are: the center point of the minimum circumscribed circle of the circular area that meets the second condition after the region where the positioned disk mark points appear is binarized; According to the positioning mark point and the pupil determined on the two scene images, obtaining the spatial coordinates of the positioning mark point and the pupil; Determine the glasses fitting parameters according to the spatial coordinates of the positioning mark points and the pupil and the size attributes of the frame; The spatial coordinates of the positioning mark point and the pupil are obtained by the following method: Calculating a mapping matrix for distortion correction of the two scene images, and using the mapping matrix for correction to obtain two corrected scene images; The distortion coefficient, rotation matrix and intrinsic parameter matrix of the binocular camera are obtained, the image coordinates of the positioning mark points and the image coordinates of the pupil are obtained, equations about the spatial coordinates of the positioning mark points and the pupil are established, and the spatial coordinates of the positioning mark points and the pupil in the two scene images are obtained by using the least squares method.

2. The electronic device according to claim 1, characterized in that: Before the processor executes the step of saving the two scene images when confirming that the scene includes the positioning mark point and the pupil, the processor further includes: Identify the positioning mark points in the scene and obtain the image coordinates of the positioning mark points; According to the image coordinates of the positioning mark point, the pupil in the scene is identified to obtain the image coordinates of the pupil; When confirming that the scene includes the positioning mark point and the pupil, saving the two scene images includes: When it is confirmed that the image coordinates of the positioning mark point and the image coordinates of the pupil are obtained, the two scene images are saved.

3. The electronic device according to claim 2, characterized in that: The binocular camera includes a first lens and a second lens; When the processor executes the step of identifying the positioning mark point in the scene and obtaining the image coordinates of the positioning mark point, the processor further includes: Identifying a positioning mark point in the scene of the first lens, and obtaining the image coordinates of the positioning mark point of the first lens; and, Identify a positioning mark point in the scene of the second lens, and obtain image coordinates of the positioning mark point of the second lens.

4. The electronic device according to claim 3, characterized in that: The processor, when executing the step of identifying the pupil in the scene according to the image coordinates of the positioning mark point and obtaining the image coordinates of the pupil, includes: According to the image coordinates of the positioning mark point, confirming the initial image coordinates of the pupil; The image coordinates of the pupil are confirmed based on the initial image coordinates.

5. The electronic device according to claim 4, characterized in that: When the processor executes the step of confirming the image coordinates of the pupil according to the initial image coordinates, the processor further includes: Confirming the pupil area according to the image coordinates of the positioning mark point and the initial image coordinates; The image coordinates of the pupil are identified in the pupil region.

6. The electronic device according to claim 5, characterized in that: When the processor executes the step of confirming the image coordinates of the pupil in the pupil area, the processor further includes: Extracting a bright spot satisfying a preset condition in the pupil region, wherein the bright spot is obtained by irradiating the pupil with a fill light adjacent to the binocular camera; The bright spot is confirmed to be the pupil, and the image coordinates of the pupil are obtained.

7. A device for measuring parameters of eyeglasses, characterized in that: include: A real-time acquisition module is configured to acquire the scene within the shooting range of the binocular camera in real time; The image saving module is configured to save two scene images when confirming that the scene includes a positioning mark point and a pupil, wherein the positioning mark point is set on the frame worn by the subject of the glasses; the positioning mark point includes a chessboard mark point and a disk mark point; the coordinates of the chessboard mark point are: the center point of the rectangular area that meets the first condition after the region where the frame appears is binarized; the coordinates of the disk mark point are: the center point of the minimum circumscribed circle of the circular area that meets the second condition after the region where the disk mark point appears is binarized; A coordinate calculation module, configured to obtain the spatial coordinates of the positioning mark point and the pupil according to the positioning mark point and the pupil determined on the two scene images; A parameter calculation module is configured to determine the glasses fitting parameters according to the spatial coordinates of the positioning mark points and the pupil and the size attributes of the frame; The coordinate calculation module is configured to calculate a mapping matrix for distortion correction of the two scene images, and use the mapping matrix for correction to obtain two corrected scene images; The distortion coefficient, rotation matrix and intrinsic parameter matrix of the binocular camera are obtained, the image coordinates of the positioning mark points and the image coordinates of the pupil are obtained, equations about the spatial coordinates of the positioning mark points and the pupil are established, and the spatial coordinates of the positioning mark points and the pupil in the two scene images are obtained by using the least squares method.

8. A system for measuring parameters of eyeglasses, characterized in that: include: A frame is mounted on the eyeglass frame of the subject, wherein a plurality of positioning marks are provided on the frame; An image acquisition device is configured to acquire scenes within the shooting range of the binocular camera, wherein the image acquisition device at least includes a binocular camera and a fill light; An electronic device, configured to execute the method for measuring glasses fitting parameters as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the method for measuring the parameters of glasses according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Intelligent pupil distance measuring device and measuring method

    CN111248852A