Image processing method, refractive information acquisition method and system

By performing binary processing of the image and statistics on the pixel distribution of highlights, the effective area is determined, and the problem of heavy burden on traditional optometry processors is solved, efficient acquisition of refractive information is achieved, and the equipment price is reduced.

CN114067104BActive Publication Date: 2024-12-03CHONGQING YEASN SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111423038.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-26
Publication Date
2024-12-03
Estimated Expiration
2041-11-26

AI Technical Summary

Technical Problem

Traditional objective optometry requires high real-time image processing capabilities of the processor, resulting in high equipment price and difficulty in effectively reducing the complexity of image processing.

Method used

By binarizing the measured image pixel values, counting the number of highlight pixels along the first and second axis of the binary image, determining the effective area, and then obtaining refractive information, reducing the processing capability requirements for the processor .

Benefits of technology

When acquiring refractive information, the complexity of image processing is reduced, the processing capability requirements for the processor are reduced, the equipment price is reduced, and the performance and efficiency of the optometer are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114067104B_ABST
    Figure CN114067104B_ABST
Patent Text Reader

Abstract

The present invention discloses an image processing method for obtaining refractive information. First, the pixel values ​​of the measured image are binarized to obtain a binary image, and the distribution of the number of bright spot pixels along the first axis of the binary image and the distribution of the number of bright spot pixels along the second axis of the binary image are obtained; further, according to the area in the binary image where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero, the effective area of ​​the image is determined to obtain refractive information according to the effective area of ​​the image. By binarizing the measured image, the effective area of ​​the image is screened out according to the distribution of bright spot pixels in the binary image, and then the refractive information is obtained according to the effective area of ​​the image. Compared with the prior art, the complexity of image processing when obtaining refractive information is reduced, and the processing capability requirements of the processor are reduced. The present invention also discloses a method and system for obtaining refractive information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of refractive measurement technology, and in particular to an image processing method for obtaining refractive information. The present invention also relates to a refractive information obtaining method and system. Background Art

[0002] With the popularity of electronic products, people are flooded with various electronic display screens in their daily lives. People are becoming more and more dependent on screens. As people watch electronic display screens for a long time, eye diseases are increasing, and the demand for eye examinations is also increasing. At present, eye examinations include optometry or slit lamp observation, where optometry is divided into subjective optometry and objective optometry.

[0003] Traditional objective ophthalmometers project a light beam to the subject's eyes through an optical system, and the reflected light beam forms an image on the image sensor. The processor obtains refractive information by processing the image. This method requires a very high real-time image processing capability of the processor, which makes it difficult for ordinary processors to cope with it, resulting in a relatively high price for the ophthalmometer. Summary of the invention

[0004] The purpose of the present invention is to provide an image processing method for obtaining refractive information, so that the complexity of image processing is reduced when obtaining refractive information, and the processing capability requirement of the processor is reduced. The present invention also provides a refractive information obtaining method and system.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] An image processing method for obtaining refractive information, comprising:

[0007] Binarizing the pixel values ​​of the measured image to obtain a binary image;

[0008] Counting the number of bright spot pixels in the binary image along a first axis and a second axis of the binary image respectively, to obtain a distribution of the number of bright spot pixels along the first axis of the binary image and a distribution of the number of bright spot pixels along the second axis of the binary image, wherein the first axis is perpendicular to the second axis;

[0009] Determine an effective area of ​​the image to obtain refractive information based on the effective area of ​​the image, wherein the effective area of ​​the image is determined based on an area in the binary image where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero.

[0010] Preferably, binarizing the pixel values ​​of the measured image to obtain a binary image includes: for any pixel of the image, averaging the three primary color component values ​​of the pixel, and binarizing the pixel according to the average value corresponding to the pixel.

[0011] Preferably, finding a region in which the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero from the binary image comprises:

[0012] According to the distribution of the number of bright spot pixels of the binary image along the first axis, a first segment along the first axis is obtained, wherein the number of bright spot pixels included in each pixel position of the first segment is greater than zero;

[0013] According to the distribution of the number of bright spot pixels of the binary image along the second axis, a second segment along the second axis is obtained, wherein the number of bright spot pixels included in each pixel position of the second segment is greater than zero;

[0014] The first segment and the second segment are projected into the binary image, and a region where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero is found from the binary image.

[0015] Preferably, projecting the first segment and the second segment into the binary image, and finding a region in the binary image where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero comprises:

[0016] Divide the binary image into an area where the coordinate values ​​of pixels on the first axis are located in the first segment, and divide the area where the coordinate values ​​of pixels on the second axis are located in the second segment, and find out the area where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero from the overlapping area of ​​the area divided according to the first segment and the area divided according to the second segment.

[0017] Preferably, determining the valid area of ​​the image based on the area in the binary image where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero includes: for the area found from the binary image where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero, excluding the area that does not contain bright spot pixels or the area whose coverage range is smaller than a preset range, and determining the valid area of ​​the image based on the remaining area.

[0018] Preferably, after determining the valid area of ​​the image, the method further includes:

[0019] In the effective area of ​​the binary image, traverse each pixel row by row, and if the number of pixels included in a group of continuous bright spot pixels is greater than or equal to a preset value, then the group of continuous bright spot pixels is regarded as a line segment;

[0020] If the current row is the first row, any line segment of the current row is assigned to a light spot;

[0021] If the current row is not the first row, for any line segment of the current row, if there is a target line segment in the previous row whose pixel column position is the same as the pixel column position of the current line segment, then the current line segment and the target line segment in the previous row are attributed to the same light spot; if there is no target line segment in the previous row whose pixel column position is the same as the pixel column position of the current line segment, then the current line segment is attributed to one light spot, wherein the rows of the binary image represent the rows of the binary image along the first axis or the rows along the second axis, and the corresponding columns of the binary image represent the columns of the binary image along the second axis or the columns along the first axis.

[0022] Preferably, obtaining the refractive information according to the effective area of ​​the image includes: fitting the light spot in the effective area of ​​the binary image, and obtaining the refractive information according to a curve obtained by fitting.

[0023] A method for obtaining refractive information, comprising:

[0024] Binarizing the pixel values ​​of the measured image to obtain a binary image;

[0025] The effective area of ​​the binary image is obtained, and refractive information is obtained according to the light spot in the effective area of ​​the binary image, wherein the effective area of ​​the binary image is obtained by using the above-mentioned image processing method for obtaining refractive information.

[0026] Preferably, specifically including:

[0027] Perform multiple measurements until the major axis length or the minor axis length obtained from the measured image is consistent with the corresponding threshold value, and each measurement process includes: obtaining a binary image of the image obtained by this measurement, fitting the light spot in the effective area of ​​the binary image, and obtaining the major axis length or the minor axis length of the fitted ellipse; if the obtained major axis length or the minor axis length is inconsistent with the corresponding threshold value, adjusting the distance from the image sensor of the measurement system to the measured object according to the obtained major axis length or the minor axis length, and recording the distance adjustment amount each time;

[0028] According to the distance adjustment amount recorded in each measurement, a quadratic curve function relationship between the diopter and the distance adjustment amount is obtained, and the diopter of the measured object is obtained by calculation.

[0029] A refractive information acquisition system is used to execute the refractive information acquisition method described above.

[0030] It can be seen from the above technical scheme that the image processing method provided by the present invention is used for obtaining refractive information. First, the pixel values ​​of the measured image are binarized to obtain a binary image, and the number of bright spot pixels in the binary image is counted along the first axis and the second axis of the binary image respectively to obtain the distribution of the number of bright spot pixels along the first axis of the binary image and the distribution of the number of bright spot pixels along the second axis of the binary image, wherein the first axis and the second axis are perpendicular; further, based on the area in the binary image where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero, the effective area of ​​the image is determined to obtain the refractive information based on the effective area of ​​the image.

[0031] The present invention performs binarization processing on the measured image, screens out the effective area of ​​the image according to the distribution of bright spot pixels in the binary image, and then obtains refractive information according to the effective area of ​​the image. Compared with the prior art, the complexity of image processing when obtaining refractive information is reduced, and the processing capability requirement of the processor is reduced.

[0032] The present invention provides a method and system for obtaining refractive information, which can achieve the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0034] Figure 1 A flowchart of an image processing method for obtaining refractive information provided by an embodiment of the present invention;

[0035] Figure 2 Flow chart of a method for binarizing pixel values ​​of an image in an embodiment of the present invention;

[0036] Figure 3 A flow chart of a method for finding a region in which the number of bright spot pixels along a first axis is greater than zero and the number of bright spot pixels along a second axis is greater than zero from a binary image in an embodiment of the present invention;

[0037] Figure 4 A binary image of a specific example and a schematic diagram of the distribution of the number of bright spot pixels along the first axis and along the second axis;

[0038] Figure 5 Based on Figure 4A schematic diagram showing a region where the number of bright spot pixels along a first axis is greater than zero and the number of bright spot pixels along a second axis is greater than zero;

[0039] Figure 6 A flow chart of a method for identifying a light spot in a valid area of ​​a binary image according to an embodiment of the present invention;

[0040] Figure 7 Schematic diagram of six positions of a line segment in a current row and a line segment in a previous row according to an embodiment of the present invention;

[0041] Figure 8 Schematic diagram of the structure of the measurement system used in the embodiment of the present invention. DETAILED DESCRIPTION

[0042] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0043] Please refer to Figure 1 , Figure 1 A flowchart of an image processing method for obtaining refractive information provided in this embodiment is shown in the figure. The image processing method includes the following steps:

[0044] S11: Binarizing the pixel values ​​of the measured image to obtain a binary image.

[0045] The image obtained by measuring the object to be measured is binarized to obtain a binary image.

[0046] S12: Count the number of bright spot pixels in the binary image along the first axis and the second axis of the binary image respectively to obtain the distribution of the number of bright spot pixels along the first axis of the binary image and the distribution of the number of bright spot pixels along the second axis of the binary image, wherein the first axis is perpendicular to the second axis.

[0047] The number of bright spot pixels included in each pixel position on the first axis of the binary image is counted along the first axis to obtain the distribution of the number of brightness pixels along the first axis of the binary image, which describes the number of bright spot pixels included in each pixel position along the first axis in the binary image. The number of bright spot pixels included in each pixel position on the second axis of the binary image is counted along the second axis to obtain the distribution of the number of brightness pixels along the second axis of the binary image, which describes the number of bright spot pixels included in each pixel position along the second axis in the binary image.

[0048] The first axis and the second axis of the binary image are also the first axis and the second axis of the original image. Optionally, the first axis and the second axis may be the X axis and the Y axis of the binary image, respectively.

[0049] S13: Determine a valid area of ​​the image to obtain refractive information based on the valid area of ​​the image, wherein the valid area of ​​the image is determined based on an area in the binary image where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero.

[0050] According to the distribution of the number of brightness pixels of the binary image along the first axis and the distribution of the number of brightness pixels of the binary image along the second axis, find the area in the binary image where the number of bright spot pixels corresponding to each pixel position along the first axis is greater than zero and the number of bright spot pixels corresponding to each pixel position along the second axis is greater than zero, thereby determining the valid area of ​​the image, and the bright spot pixels are included in the valid area in the binary image.

[0051] The image processing method for obtaining refractive information in this embodiment performs binarization processing on the measured image, screens out the effective area of ​​the image according to the distribution of bright spot pixels in the binary image, and then obtains the refractive information based on the effective area of ​​the image. Compared with the prior art of directly processing the measured image to obtain the refractive information, the complexity of image processing when obtaining the refractive information is reduced, and the processing capability requirement for the processor is reduced.

[0052] Optionally, the pixel values ​​of the measured image may be binarized by the following method, which includes: for any pixel of the image, averaging the three primary color component values ​​of the pixel, and binarizing the pixel according to the corresponding average value.

[0053] For any pixel of an image, binarization can be performed through the following process. Please refer to Figure 2 , Figure 2 The flowchart of the method for binarizing the pixel values ​​of an image in this embodiment includes the following steps:

[0054] S110: Calculate the average value of the three primary color components of the image pixels.

[0055] For any pixel in the image, the three primary color component values ​​of the pixel are averaged and the resulting image is converted into a grayscale image. For example, the red component value, green component value and blue component value of the pixel are averaged, which can be expressed as (R+G+B) / 3, where R, G, and B represent the red component value, green component value and blue component value respectively.

[0056] S111: Determine whether the average value of the three primary color component values ​​of the image pixels is greater than a preset threshold, if so, proceed to step S112; if not, proceed to step S113.

[0057] S112: Set the pixel value of the image pixel to 1.

[0058] S113: Setting the pixel value of the image pixel to 0.

[0059] For any pixel of the image, the average value of the three primary color components corresponding to the pixel is compared with the preset threshold. If the average value of the three primary color components of the pixel is greater than the preset threshold, the pixel value of the pixel is set to "1"; if it is less than or equal to the preset threshold, the pixel value of the pixel is set to "0". In this way, the image is converted into a binary image. Among them, the pixels with a pixel value of "1" in the binary image are bright pixels.

[0060] Optionally, in step S13, finding a region in the binary image where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero can be performed by the following method, please refer to Figure 3 , Figure 3 This is a flow chart of a method for finding an area in a binary image where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero, which specifically includes the following steps:

[0061] S130: Obtaining a first segment along the first axis according to the distribution of the number of bright spot pixels of the binary image along the first axis, wherein the number of bright spot pixels included in each pixel position of the first segment is greater than zero.

[0062] According to the distribution of the number of brightness pixels of the binary image along the first axis, the first segment on the first axis is found, and the number of bright spot pixels included in each pixel position in the first segment is greater than zero. In practical applications, multiple first segments may be found along the first axis. In addition, it may be required that at least two consecutive pixel positions along the first axis include a number of bright spot pixels greater than zero to determine a first segment; if only one independent pixel position along the first axis includes a number of bright spot pixels greater than zero, then the pixel position on the first axis is ignored.

[0063] S131: obtaining a second segment along the second axis according to the distribution of the number of bright spot pixels of the binary image along the second axis, wherein the number of bright spot pixels included in each pixel position of the second segment is greater than zero.

[0064] According to the distribution of the number of brightness pixels of the binary image along the second axis, the second segment on the second axis is found, and the number of bright spot pixels included in each pixel position in the second segment is greater than zero. In practical applications, multiple second segments may be found along the second axis. In addition, it may be required that at least two consecutive pixel positions along the second axis include a number of bright spot pixels greater than zero to determine a second segment; if only one independent pixel position along the second axis includes a number of bright spot pixels greater than zero, then the pixel position on the second axis is ignored.

[0065] S132: Project the first segment and the second segment into the binary image, and find a region in the binary image where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero.

[0066] Specifically, an area in which the coordinate values ​​of pixels on the first axis are located in the first segment, and an area in which the coordinate values ​​of pixels on the second axis are located in the second segment can be divided from the binary image, and an area in which the number of bright spot pixels along the first axis and the number of bright spot pixels along the second axis are greater than zero can be found from the overlapping area of ​​the area divided according to the first segment and the area divided according to the second segment.

[0067] For example, please refer to Figure 4 As shown, Figure 4 The following is a schematic diagram of a binary image of a specific example and the distribution of the number of bright spot pixels along the first axis and along the second axis, wherein the X axis is the first axis and the Y axis is the second axis. The first segment found according to the distribution of the number of bright spot pixels along the X axis is [a1, a2] and [a3, a4], and the second segment found according to the distribution of the number of bright spot pixels along the Y axis is [b1, b2] and [b3, b4]. The segments [a1, a2] and [a3, a4] are projected onto the X axis of the binary image, and the segments [b1, b2] and [b3, b4] are projected onto the Y axis of the binary image. According to the area defined by the first segment [a1, a2] and [a3, a4] and the second segment [b1, b2] and [b3, b4], specifically according to the intersection area of ​​the area defined by the first segment [a1, a2] and [a3, a4] and the area defined by the second segment [a1, a2] and [a3, a4], find the area in the binary image where the number of bright spot pixels included in each pixel position along the first axis is greater than zero and the number of bright spot pixels included in each pixel position along the second axis is greater than zero.

[0068] For reference Figure 5 As shown, Figure 5 Based on Figure 4 The schematic diagram of dividing the area where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero is shown. The overlapping area corresponding to the first segment [a1, a2] and the second segment [b1, b2] is area 1, the overlapping area corresponding to the first segment [a3, a4] and the second segment [b1, b2] is area 2, the overlapping area corresponding to the first segment [a1, a2] and the second segment [b3, b4] is area 3, and the overlapping area corresponding to the first segment [a3, a4] and the second segment [b3, b4] is area 4. The valid area is determined from area 1, area 2, area 3 and area 4.

[0069] Preferably, for the region found from the binary image where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero, the region that does not contain bright spot pixels or the region that covers a range smaller than a preset range is excluded, and the valid region of the image is determined based on the remaining region. For the region found from the binary image where the number of bright spot pixels included in each pixel position along the first axis is greater than zero and the number of bright spot pixels included in each pixel position along the second axis is greater than zero, some of the regions may not contain bright spot pixels, which are not valid regions and should be excluded. In addition, the region where the coverage range is too small is also excluded and is not considered as a valid region. Reference Figure 5 As shown in the figure, area 1 and area 4 do not actually contain bright pixels and are excluded. The area of ​​area 2 is too small and far smaller than the calibration range, so it is also excluded. Area 1 is taken as the valid area.

[0070] Furthermore, after determining the effective area of ​​the image, the method further includes: identifying a light spot according to bright spot pixels in the effective area of ​​the binary image. Figure 6 , Figure 6 This is a flow chart of a method for identifying a light spot in a valid area of ​​a binary image in this embodiment, which specifically includes the following steps:

[0071] S21: In the effective area of ​​the binary image, traverse each pixel row by row, and if the number of pixels included in a group of continuous bright spot pixels is greater than or equal to a preset value, treat the group of continuous bright spot pixels as a line segment.

[0072] In the effective area of ​​the binary image, each pixel is traversed row by row, and continuous bright spot pixels are found in each row. If the number of pixels included in a group of continuous bright spot pixels is greater than or equal to the preset value, the group of continuous bright spot pixels is regarded as a line segment; if the number of pixels included in a group of continuous bright spot pixels is less than the preset value, the group of continuous bright spot pixels is not regarded as a line segment. Multiple line segments may be found in a row of the binary image. An exemplary preset value may be 5, that is, if there are more than or equal to 5 continuous bright spot pixels in a row, the group of bright spot pixels is regarded as a line segment.

[0073] S22: If the current row is the first row, any line segment of the current row is assigned to a light spot.

[0074] S23: If the current row is not the first row, for any line segment of the current row, if there is a target line segment in the previous row whose pixel column position is the same as the pixel column position of the current line segment, then the current line segment and the target line segment in the previous row are attributed to the same light spot; if there is no target line segment in the previous row whose pixel column position is the same as the pixel column position of the current line segment, then the current line segment is attributed to one light spot.

[0075] If the current row is the first row of the binary image, each line segment found in the current row is attributed to an independent light spot.

[0076] If the current row is not the first row of the binary image, for any line segment in the current row, compare the line segment in the current row with the line segment in the previous row. If the target line segment is found from the previous row, and the target line segment in the previous row satisfies the condition that the target line segment has a pixel whose column position is the same as the pixel of the line segment in the current row, then the line segment in the current row and the target line segment in the previous row are classified as the same light spot. Figure 7 As shown, Figure 7 Schematic diagrams of six positions of the line segment of the current row and the line segment of the previous row in this embodiment, wherein in Figures b, c, d and e, the upward line segment and the downward line segment have pixels in the same column position, and the upward line segment and the downward line segment can be attributed to the same light spot. However, in Figures a and f, the upward line segment and the downward line segment do not have pixels in the same column position, and the upward line segment and the downward line segment cannot be attributed to the same light spot.

[0077] Wherein, the rows of the binary image represent the rows of the binary image along the first axis or the rows along the second axis, and the corresponding columns of the binary image represent the columns of the binary image along the second axis or the columns along the first axis. That is, the rows of the binary image can be the rows of the binary image along the first axis, and the columns of the binary image can be the columns along the second axis of the binary image. Or the rows of the binary image can be the rows of the binary image along the second axis, and the columns of the binary image can be the columns along the first axis of the binary image.

[0078] The image processing method for obtaining refractive information of this embodiment performs binarization processing on the measured image, and screens out the effective area of ​​the image according to the distribution of bright spot pixels in the binary image. In addition, the continuous bright spot pixels of each row are first found in the effective area of ​​the binary image, and then the light spot is determined according to the positional relationship of the continuous bright spot pixels of the upper and lower rows, thereby improving the accuracy of identifying the light spot according to the image. The method of this embodiment can reduce the complexity of image processing when obtaining refractive information, and reduce the processing capability requirements of the processor.

[0079] In the image processing method for obtaining refractive information of this embodiment, obtaining refractive information according to the effective area of ​​the image includes: fitting the light spot in the effective area of ​​the binary image, and obtaining refractive information according to the curve obtained by fitting.

[0080] According to the light spot identified in the effective area of ​​the binary image, the light spot in the effective area of ​​the binary image is fitted, and the refractive information is obtained according to the curve obtained by fitting. Exemplarily, the light spot in the effective area of ​​the image can be fitted with a least squares ellipse, and the axis position of the astigmatism of the object under test and the major axis and minor axis of the ellipse can be obtained according to the fitted ellipse. However, it is not limited to this. In other embodiments, the light spot in the effective area of ​​the image can be fitted in other ways to obtain the refractive information, which is also within the protection scope of the present invention.

[0081] Accordingly, this embodiment also provides a method for obtaining refractive information, comprising the following steps:

[0082] S30: Binarizing the pixel values ​​of the measured image to obtain a binary image.

[0083] The object to be measured is measured using a measuring system to obtain a measured image. A binary image of the image is obtained. The implementation method of the image binarization process can refer to the corresponding description content in the above embodiment, which will not be repeated here. Among them, the measuring system is used to emit light to the object to be measured, receive light reflected by the object to be measured, and perform imaging based on the received light.

[0084] S31: Acquire the effective area of ​​the binary image, and obtain refractive information according to the light spot in the effective area of ​​the binary image, wherein the effective area of ​​the binary image is obtained by using the above-mentioned image processing method for obtaining refractive information.

[0085] The refractive information acquisition method of this embodiment, through binarization processing of the measured image, screens out the effective area of ​​the image according to the distribution of bright spot pixels in the binary image, and then obtains the refractive information according to the light spot in the effective area of ​​the image. Compared with the prior art, the complexity of image processing when acquiring refractive information is reduced, and the processing power requirements of the processor are reduced.

[0086] Further preferably, the refractive information acquisition method of this embodiment specifically includes the following steps:

[0087] S41: Perform multiple measurements until the major axis length or the minor axis length obtained according to the measured image is consistent with the corresponding threshold value, and each measurement process includes: obtaining a binary image of the image obtained in this measurement, fitting the light spot in the effective area of ​​the binary image, and obtaining the major axis length or the minor axis length of the fitted ellipse; if the obtained major axis length or the minor axis length is inconsistent with the corresponding threshold value, adjusting the distance from the image sensor of the measurement system to the object to be measured according to the obtained major axis length or the minor axis length, and recording the distance adjustment amount each time.

[0088] Perform multiple measurements, each time using the measurement system to measure the object to be measured, and obtain the image measured this time. Binarize the pixel values ​​of the image obtained by this measurement to obtain a binary image, and obtain the effective area of ​​the binary image. Fit the light spot in the effective area of ​​the binary image to obtain the major axis length or the minor axis length of the fitted ellipse. Preferably, the method for identifying the light spot in the effective area of ​​the binary image described in the above embodiment can be used to determine the light spot in the effective area of ​​the binary image, which will not be repeated here.

[0089] If the obtained major axis length is inconsistent with the first threshold, the distance from the image sensor of the measurement system to the measured object is adjusted according to the obtained major axis length, and the distance adjustment amount L1 is recorded. Multiple measurements are performed, and the distance adjustment amount L1 adjusted after each measurement is recorded until the major axis length obtained according to the measured image is consistent with the first threshold. The first threshold is a threshold calibrated for the major axis length of the ellipse.

[0090] If the obtained minor axis length is inconsistent with the second threshold, the distance from the image sensor of the measurement system to the measured object is adjusted according to the obtained minor axis length, and the distance adjustment amount L2 adjusted after each measurement is recorded. Multiple measurements are performed until the minor axis length obtained according to the measured image is consistent with the second threshold. The second threshold is a threshold calibrated for the minor axis length of the ellipse.

[0091] Preferably, the distance from the image sensor of the measurement system to the object to be measured can be adjusted first according to the major axis of the fitted ellipse. When the major axis length of the fitted ellipse is consistent with the first threshold, the measurement is continued and the distance from the image sensor of the measurement system to the object to be measured is adjusted so that the minor axis length of the fitted ellipse is consistent with the second threshold.

[0092] Adjust the distance between the image sensor of the measurement system and the object to be measured, that is, adjust the focus of the measurement system. Figure 8 , Figure 8This is a schematic diagram of the structure of the measurement system used in this embodiment. As shown in the figure, the measurement system includes a first optical component 31 and a second optical component. The first optical component 31 is used to generate a light beam and project the light beam onto the object to be measured 30, and the second optical component is used to converge the light beam reflected by the object to be measured 30 and perform imaging.

[0093] The second optical component includes a first lens component 32 and an image sensor module 33. The first lens component 32 is used to converge the light beam reflected by the object 30 to make the light beam incident on the image sensor module 33. By adjusting the distance from the image sensor module 33 to the first lens component 32, the distance from the image sensor of the measurement system to the object can be adjusted.

[0094] Preferably, reference Figure 8 As shown, the image sensor module 33 may include a second lens assembly 34, and the second lens assembly 34 is used to collimate the light beam emitted by the first lens assembly 32. The image sensor module 33 may also include a converging element 36, and the second lens assembly 34 collimates the light beam emitted by the first lens assembly 32, and the collimated light beam is incident on the converging element 36, and the converging element 36 converges the light beam to the image sensor 35.

[0095] Optional, for reference Figure 8 As shown, the measuring system may further include a beam splitter element 37, which is used to transmit the light beam emitted by the first optical component 31 and reflect the light beam reflected by the measured object 30 to the second optical component. The beam splitter element 37 may be, but is not limited to, a beam splitter lens.

[0096] Optionally, the image sensor module 33 can be connected to a stepper motor, and the image sensor module 33 can be controlled to move and the moving distance of the image sensor module 33 can be obtained by the stepper motor. The moving distance of the stepper motor is controlled by the host, for example: the motor shaft diameter D = 7.96mm, then the distance C = π * D = 24.99mm for the motor to move one circle, the step value of the motor is 1.8°, then the distance d = C * 1.8 / 360 = 0.125mm for the motor to move one step, to make the focus motor move 5mm, only need to move about S / d = 40 steps; similarly, when the focus is clear, the number of steps taken by the motor can be converted into distance.

[0097] S42: According to the distance adjustment amount recorded in each measurement, a quadratic curve function relationship between the diopter and the distance adjustment amount is obtained, and the diopter of the measured object is obtained by calculation.

[0098] For the major axis of the fitted ellipse, the distance adjustment amount L1 corresponding to each measurement is interpolated to obtain the quadratic curve function S1=F(L1); the distance adjustment amount L1′ recorded when the major axis length is consistent with the first threshold is substituted into the function S1=F(L1) to obtain the refractive power S1 of the object being measured.

[0099] For the minor axis of the fitted ellipse, the distance adjustment amount L2 corresponding to each measurement is interpolated to obtain the quadratic curve function S2=F(L2); the distance adjustment amount L2′ recorded when the minor axis length is consistent with the second threshold is substituted into the function S2=F(L2) to obtain the refractive power S2 of the object being measured.

[0100] Optionally, C = S1 - S2. C represents the final measured cylindrical power of the object being measured, the axis position of the ellipse is the final cylindrical axis position of the object being measured, and S1 represents the final spherical power of the object being measured.

[0101] Optionally, F(x) = ax 2 +bx+c, where the parameters a, b, and c are constants obtained through calibration.

[0102] Correspondingly, this embodiment also provides a refractive information acquisition system, which is used to execute the above-mentioned refractive information acquisition method.

[0103] The refractive information acquisition system of this embodiment binarizes the measured image, screens out the effective area of ​​the image according to the distribution of bright spot pixels in the binary image, and then obtains the refractive information based on the light spot in the effective area of ​​the binary image. Compared with the prior art, the complexity of image processing when acquiring refractive information is reduced, and the processing capability requirements of the processor are reduced.

[0104] The above is a detailed introduction to the image processing method, refractive information acquisition method and system provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. An image processing method for obtaining refractive information, characterized in that: include: Binarizing the pixel values ​​of the measured image to obtain a binary image; Counting the number of bright spot pixels in the binary image along a first axis and a second axis of the binary image respectively, to obtain a distribution of the number of bright spot pixels along the first axis of the binary image and a distribution of the number of bright spot pixels along the second axis of the binary image, wherein the first axis is perpendicular to the second axis; Determine an effective area of ​​the image to obtain refractive information according to the effective area of ​​the image, wherein the effective area of ​​the image is determined according to an area in the binary image where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero; Finding an area in the binary image where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero includes: obtaining a first segment along the first axis according to the distribution of the number of bright spot pixels along the first axis of the binary image, wherein the number of bright spot pixels at each pixel position in the first segment is greater than zero; obtaining a second segment along the second axis according to the distribution of the number of bright spot pixels along the second axis of the binary image, wherein the number of bright spot pixels at each pixel position in the second segment is greater than zero; projecting the first segment and the second segment into the binary image, and finding an area in the binary image where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero.

2. The image processing method for obtaining refractive information according to claim 1, characterized in that: Binarizing the pixel values ​​of the measured image to obtain a binary image includes: for any pixel of the image, averaging the three primary color component values ​​of the pixel, and binarizing the pixel according to the average value corresponding to the pixel.

3. The image processing method for obtaining refractive information according to claim 1, characterized in that: Projecting the first segment and the second segment into the binary image, and finding a region in the binary image where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero comprises: Divide the binary image into an area where the coordinate values ​​of pixels on the first axis are located in the first segment, and divide the area where the coordinate values ​​of pixels on the second axis are located in the second segment, and find out the area where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero from the overlapping area of ​​the area divided according to the first segment and the area divided according to the second segment.

4. The image processing method for obtaining refractive information according to claim 1, characterized in that: Determining the valid area of ​​the image based on an area in the binary image where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero includes: for an area found from the binary image where the number of bright spot pixels along the first axis is greater than zero and the number of bright spot pixels along the second axis is greater than zero, excluding areas that do not contain bright spot pixels or areas that cover a range smaller than a preset range, and determining the valid area of ​​the image based on the remaining areas.

5. The image processing method for obtaining refractive information according to claim 1, characterized in that: After determining the valid area of ​​the image, the method further includes: In the effective area of ​​the binary image, traverse each pixel row by row, and if the number of pixels included in a group of continuous bright spot pixels is greater than or equal to a preset value, then the group of continuous bright spot pixels is regarded as a line segment; If the current row is the first row, any line segment of the current row is assigned to a light spot; If the current row is not the first row, for any line segment of the current row, if there is a target line segment in the previous row whose pixel column position is the same as the pixel column position of the current line segment, then the current line segment and the target line segment in the previous row are attributed to the same light spot; if there is no target line segment in the previous row whose pixel column position is the same as the pixel column position of the current line segment, then the current line segment is attributed to one light spot, wherein the rows of the binary image represent the rows of the binary image along the first axis or the rows along the second axis, and the corresponding columns of the binary image represent the columns of the binary image along the second axis or the columns along the first axis.

6. The image processing method for obtaining refractive information according to claim 1, characterized in that: Obtaining refractive information according to the effective area of ​​the image includes: fitting the light spot in the effective area of ​​the binary image to obtain refractive information according to a curve obtained by fitting.

7. A method for obtaining refractive information, characterized in that: include: Binarizing the pixel values ​​of the measured image to obtain a binary image; The effective area of ​​the binary image is obtained, and refractive information is obtained according to the light spot in the effective area of ​​the binary image, wherein the effective area of ​​the binary image is obtained by using the image processing method for obtaining refractive information described in any one of claims 1 to 6.

8. The method for obtaining refractive information according to claim 7, characterized in that: Specifically include: Perform multiple measurements until the major axis length or the minor axis length obtained from the measured image is consistent with the corresponding threshold value, and each measurement process includes: obtaining a binary image of the image obtained by this measurement, fitting the light spot in the effective area of ​​the binary image, and obtaining the major axis length or the minor axis length of the fitted ellipse; if the obtained major axis length or the minor axis length is inconsistent with the corresponding threshold value, adjusting the distance from the image sensor of the measurement system to the measured object according to the obtained major axis length or the minor axis length, and recording the distance adjustment amount each time; According to the distance adjustment amount recorded in each measurement, a quadratic curve function relationship between the diopter and the distance adjustment amount is obtained, and the diopter of the measured object is obtained by calculation.

9. A refractive information acquisition system, characterized in that: Used to execute the refractive information acquisition method described in any one of claims 7-8.