DOT read-write table contrast detection method, system and device and medium

By acquiring the contrast detection image of the reader/writer and calculating the brightness values ​​of bright and non-bright areas, the lack of contrast detection in DOT reader/writers is solved, enabling rapid and effective detection and accurate evaluation of contrast.

CN121660970APending Publication Date: 2026-03-13HEFEI NAIDEJIA OPTOELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-21
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing DOT reader/writers lack effective contrast detection and control, making it impossible to accurately assess image quality.

Method used

By acquiring the contrast detection image of the optical inspection fixture by the reader/writer, the sampling points of bright spot areas and non-bright spot areas are determined, the brightness value is calculated, and the contrast detection index, including relative contrast and contrast attenuation value, is determined based on the brightness value to judge the passability of the detection result.

Benefits of technology

It enables rapid and effective contrast detection, improves the accuracy and scientific rigor of the detection, provides more detailed judgment criteria, and helps to more accurately assess image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121660970A_ABST
    Figure CN121660970A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of optical detection, in particular to a DOT read-write table contrast detection method, system and device and a medium. The method comprises the following steps: acquiring an imaging image of a contrast detection image arranged on an optical detection jig by a read-write table, wherein the contrast detection image comprises a first color image and a second color image; determining a plurality of sampling points in the imaged image, and obtaining brightness values of the sampling points; the contrast detection index of the read-write table is determined according to the contrast of the hot spot area and the contrast of the non-hot spot area, the contrast of the hot spot area is determined based on the brightness value of the first sampling point and the brightness value of the second sampling point, and the contrast of the non-hot spot area is determined based on the brightness value of the third sampling point and the brightness value of the fourth sampling point. According to the invention, the problem of lack of contrast detection management and control of the read-write table in the prior art is solved. And meanwhile, rapid and effective detection of the contrast ratio can be realized through the detection mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of optical inspection technology, specifically to a contrast detection method, system, device, and medium for a DOT reader / writer. Background Technology

[0002] The myopia contrast theory is an important theory in the field of myopia prevention and control. This theory suggests that environmental contrast may affect the occurrence and development of myopia. The natural environment provides a naturally low-contrast visual experience, with mild bipolar cell activity that does not interfere with normal eye growth. However, in indoor environments, prolonged close-range eye use and insufficient outdoor activities can expose the eyes to high-contrast visual stimulation for extended periods, potentially overstimulating bipolar cells, leading to excessive axial elongation and increasing the risk of myopia.

[0003] To address this issue, various myopia control products based on Diffusion Optics Technology (DOT) have emerged on the market, such as DOT reading stations and DOT glasses. DOT reading stations integrate DOT optical elements, superimposing a DOT bright spot array onto the normal image. This DOT bright spot array alters the local contrast of the normal image, creating a peripheral contrast-reducing imaging effect similar to DOT glasses. This softens the light and reduces the contrast of the image entering the retina without affecting image clarity. Therefore, effectively detecting and controlling the contrast reduction value of the DOT bright spot array is crucial. Summary of the Invention

[0004] In view of this, the present invention provides a method, system, device and medium for contrast detection of DOT reader / writer, so as to solve the problem of how to perform contrast detection on DOT reader / writer.

[0005] In a first aspect, the present invention provides a contrast detection method for a DOT reader / writer, the method comprising: acquiring an image of a contrast detection image of a contrast detection image set on an optical detection fixture by the reader / writer, the contrast detection image comprising a first color image and a second color image, the image comprising an image corresponding to the first color image and the second color image and having a plurality of bright spot regions superimposed thereon; Multiple sampling points are determined in the image, and the brightness values ​​of the sampling points are obtained. The sampling points include a first sampling point and a second sampling point located in the same bright spot area, namely: a first sampling point where the bright spot area overlaps with the first color image, and a second sampling point where the bright spot area overlaps with the second color image; the sampling points also include a third sampling point and a fourth sampling point located in the same non-bright spot area, namely: a third sampling point where the non-bright spot area overlaps with the first color image, and a fourth sampling point where the non-bright spot area overlaps with the second color image; the contrast detection index of the reader / writer is determined based on the contrast of the bright spot area and the contrast of the non-bright spot area, wherein the contrast of the bright spot area is determined based on the brightness values ​​of the first and second sampling points, and the contrast of the non-bright spot area is determined based on the brightness values ​​of the third and fourth sampling points.

[0006] In this invention, an image of the contrast detection image of a reader / writer placed on an optical inspection fixture is acquired, and brightness values ​​of the corresponding two colors in the bright and non-bright areas of the image are sampled. The contrast control of the reader / writer is then analyzed based on the sampled brightness values. This overcomes the lack of contrast detection and control in related technologies. Furthermore, this detection method enables rapid and effective contrast detection.

[0007] In one optional implementation, determining a contrast detection index based on the contrast of bright spot areas and non-bright spot areas includes: determining the contrast of bright spot areas based on the ratio of the difference between the brightness values ​​of the first sampling point and the brightness values ​​of the second sampling point to the sum of the values; determining the contrast of non-bright spot areas based on the ratio of the difference between the brightness values ​​of the third sampling point and the brightness values ​​of the fourth sampling point to the sum of the values; and determining the relative contrast based on the ratio of the contrast of bright spot areas and the contrast of non-bright spot areas.

[0008] In one optional implementation, determining the contrast detection index based on the contrast of the bright spot area and the contrast of the non-bright spot area further includes: determining a contrast attenuation value based on the relative contrast, wherein the relative contrast and the contrast attenuation value are used as contrast detection indices to determine the contrast detection result.

[0009] In one optional implementation, the contrast detection result is determined as follows: it is determined whether the relative contrast is within a first preset range and whether the contrast attenuation value is within a second preset range; when the relative contrast is within the first preset range and the contrast attenuation value is within the second preset range, the contrast detection result is determined to be qualified; otherwise, it is determined to be unqualified.

[0010] In this invention, the contrast is calculated by dividing the region (bright spot and non-bright spot region), and then the relative contrast and contrast attenuation value are further determined. This can accurately and comprehensively quantify the contrast of the image, provide a more detailed and reliable basis for the contrast detection results, effectively improve the accuracy and scientific nature of contrast detection, and help to more accurately evaluate the contrast performance in imaging quality and other related scenarios.

[0011] In one optional implementation, the first color image and the second color image are regular images with adjacent edges. The coordinates of the foot points of the adjacent edges are pre-stored. Determining multiple sampling points in the imaging image includes: obtaining the coordinates of the foot points of the adjacent edges in the imaging image; randomly offsetting the foot point coordinates in a first direction and a second direction, and using bilinear sampling interpolation to obtain multiple sampling points; performing brightness detection on the multiple sampling points to classify the multiple sampling points and obtain a preset number of first sampling points, a preset number of second sampling points, a preset number of third sampling points, and a preset number of fourth sampling points.

[0012] In this invention, by pre-saving the foot point coordinates and obtaining multiple sampling points through offsetting the foot point coordinates and bilinear interpolation sampling, the automatic acquisition of sampling points is realized, thereby improving the degree of automation of the method.

[0013] In one optional implementation, before acquiring the image of the contrast detection image of the optical inspection fixture set by the reader / writer, the method further includes: storing the image of the optical inspection fixture set by the reader / writer and the coordinates of the foot points in the image as indexes using a sequence code; formatting each index; and generating an image file path and a coordinate file path based on the formatted indexes.

[0014] In this invention, data is stored using an index, and a storage path is generated by formatting the index, providing a way to retrieve subsequent data.

[0015] In one optional implementation, after performing brightness detection on the plurality of sampling points to classify the plurality of sampling points, the method further includes: determining whether the sampling points in different regions meet the brightness requirements; and when the brightness requirements are not met, regenerating the plurality of sampling points.

[0016] In one optional implementation, a plurality of sampling points are determined in the imaging image, including: clicking a preset number of first sampling points, a preset number of second sampling points, a preset number of third sampling points, and a preset number of fourth sampling points in the imaging image.

[0017] In this invention, multiple sampling points are acquired by clicking, which can collect information from different regions of the image more comprehensively and in detail. This provides a richer and more representative data foundation for subsequent image analysis and processing based on these sampling points, and helps to improve the accuracy and reliability of related algorithms or operations in analyzing the imaging image.

[0018] Secondly, the present invention provides a DOT reader / writer contrast detection device, the device comprising: The image acquisition module is used to acquire the image of the contrast detection image set on the optical detection fixture by the reading and writing station. The contrast detection image includes a first color image and a second color image. The image includes an image corresponding to the first color image and the second color image and multiple bright spot areas superimposed on it. A sampling module is used to determine sampling points in the imaging image and obtain the brightness values ​​of the sampling points. The sampling points include a first sampling point and a second sampling point located in the same bright spot region, namely: a first sampling point where the bright spot region overlaps with the first color image, and a second sampling point where the bright spot region overlaps with the second color image; the sampling points also include a third sampling point and a fourth sampling point located in the same non-bright spot region, namely: a third sampling point where the non-bright spot region overlaps with the first color image, and a fourth sampling point where the non-bright spot region overlaps with the second color image; The contrast detection module is used to determine the contrast detection index of the reader / writer based on the contrast of the bright spot area and the contrast of the non-bright spot area. The contrast of the bright spot area is determined based on the brightness value of the first sampling point and the brightness value of the second sampling point, and the contrast of the non-bright spot area is determined based on the brightness value of the third sampling point and the brightness value of the fourth sampling point.

[0019] Thirdly, the present invention provides a DOT reader / writer contrast detection system, the system comprising: an optical detection fixture, an image acquisition device, and a controller; The DOT reader / writer under test is set on an optical inspection fixture and is used to image the contrast detection image set on the optical inspection fixture. The contrast detection image includes a first color image and a second color image. The image acquisition device is used to acquire the imaging image of the DOT reader and send it to the controller; the imaging image includes an image corresponding to the first color image and the second color image, and multiple bright spot areas are superimposed on it; The controller is used to determine sampling points in the imaging image and acquire the brightness values ​​of the sampling points. The sampling points include a first sampling point and a second sampling point located in the same bright spot area, namely, the first sampling point where the bright spot area overlaps with the first color image, and the second sampling point where the bright spot area overlaps with the second color image, respectively. The sampling points also include a third sampling point and a fourth sampling point located in a non-bright spot area, namely, the third sampling point where the non-bright spot area overlaps with the first color image, and the fourth sampling point where the non-bright spot area overlaps with the second color image, respectively. Furthermore, the controller determines the contrast detection index of the reader / writer station based on the contrast of the bright spot area and the contrast of the non-bright spot area. The contrast of the bright spot area is determined based on the brightness values ​​of the first and second sampling points, and the contrast of the non-bright spot area is determined based on the brightness values ​​of the third and fourth sampling points.

[0020] Fourthly, the present invention provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the DOT reader / writer contrast detection method of the first aspect or any corresponding embodiment described above.

[0021] Fifthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the DOT reader contrast detection method of the first aspect or any corresponding embodiment thereof.

[0022] In a sixth aspect, the present invention provides a computer program product, including computer instructions for causing a computer to execute the DOT reader / writer contrast detection method of the first aspect or any corresponding embodiment thereof. Attached Figure Description

[0023] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0024] Figure 1 This is a flowchart illustrating the contrast detection method for a DOT reader / writer according to an embodiment of the present invention. Figure 2 This is a schematic diagram of a chessboard pattern according to an embodiment of the present invention; Figure 3 This is a schematic diagram of another chessboard pattern according to an embodiment of the present invention; Figure 4 This is a structural block diagram of the DOT reader / writer contrast detection system according to an embodiment of the present invention; Figure 5 This is a flowchart illustrating another DOT reader / writer contrast detection method according to an embodiment of the present invention; Figure 6 This is a schematic diagram of sampling points according to an embodiment of the present invention; Figure 7 This is a structural block diagram of the DOT reader / writer contrast detection device according to an embodiment of the present invention; Figure 8 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] According to an embodiment of the present invention, a method for detecting contrast of a DOT reader / writer is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0027] This embodiment provides a contrast detection method for a DOT reader / writer, which can be used in electronic devices such as computers, mobile phones, and tablets. Figure 1 This is a flowchart of a DOT reader / writer contrast detection method according to an embodiment of the present invention, as follows: Figure 1 As shown, the process includes the following steps: Step S101: Obtain the imaging image of the contrast detection image set on the optical detection fixture by the reading and writing station. The contrast detection image includes a first color image and a second color image. The imaging image includes an image corresponding to the first color image and the second color image and multiple bright spot areas (DOT bright spot array) superimposed on it.

[0028] Specifically, the contrast detection method in this embodiment is designed for a DOT reader / writer, which has a planar beam splitter, a concave mirror, and DOT optical elements. The planar beam splitter and the concave mirror form the far-image optical path, used to form a magnified far-image of an object (book, notebook, display image) placed on the table. During testing, this image is used to image the contrast test image set on the optical testing fixture. The DOT optical elements, as contrast control components, are used to form multiple bright spot areas superimposed on the magnified far-image, changing the contrast of different areas during far-image imaging. The implementation of the DOT optical elements is not limited to installing light-emitting elements or micromirror arrays in the backlight panel, and forming light with a brightness different from the reflected light in other areas of the backlight panel through the emission of light from the light-emitting elements or the reflection and scattering of the micromirror array, thereby achieving contrast control. Regarding the distribution of the light-emitting elements and micromirror arrays, to avoid the bright spot array appearing in the central part of the field of view and affecting the actual experience, the light-emitting elements or micromirror arrays are placed at the edge of the backlight panel, so that the bright spot array in the image also appears in the edge area of ​​the image.

[0029] For the contrast detection image, the first color image and the second color image can be two color images with a large difference in brightness. For example, the first color image is a white image, and the second color image is a black image. To facilitate subsequent sampling and contrast analysis, the contrast detection image contains multiple first color images and second color images. Therefore, a black and white checkerboard target can be set in the optical detection fixture, and the reading / writing station images the checkerboard. This embodiment does not specifically limit the form of the black and white checkerboard. For example, it can use... Figure 2 or Figure 3 The structure shown.

[0030] In addition, the black and white checkerboard image can be a physical image of the calibration board or a digital image generated by software. For example, the number of squares, the size of each square, the arrangement of the squares, the color of the squares, the grayscale of the squares, the density of the stripes in the center of the squares, etc. can be customized, making it suitable for various scenarios and flexible.

[0031] Step S102: Determine multiple sampling points in the image and obtain the brightness values ​​of the sampling points. The sampling points include a first sampling point and a second sampling point located in the same bright spot area, namely: a first sampling point where the bright spot area overlaps with the first color image, and a second sampling point where the bright spot area overlaps with the second color image; the sampling points also include a third sampling point and a fourth sampling point located in the same non-bright spot area, namely: a third sampling point where the non-bright spot area overlaps with the first color image, and a fourth sampling point where the non-bright spot area overlaps with the second color image.

[0032] Specifically, based on the DOT optical element on the reader / writer, multiple bright spots are distributed in the edge region of the image, thus the image includes bright spot areas and non-bright spot areas (i.e., outside the bright spot areas). Simultaneously, to analyze the contrast between the bright spot areas and non-bright spot areas, this embodiment determines sampling points for both areas. Furthermore, the bright spot areas and non-bright spot areas of the image, which include two color images in the same region, are selected as the sampling areas. Therefore, for bright spot areas, a first sampling point and a second sampling point are determined in both color images, namely, the first sampling point where the bright spot area overlaps with the first color image, and the second sampling point where the bright spot area overlaps with the second color image; similarly, for non-bright spot areas, a third sampling point and a fourth sampling point are determined in both color images, namely, the third sampling point where the non-bright spot area overlaps with the first color image, and the fourth sampling point where the non-bright spot area overlaps with the second color image.

[0033] The requirements specify that, to avoid the impact of a single sampling point on the accuracy of the results, multiple sampling points can be determined within the corresponding area for each of the four types of sampling points. Furthermore, since the bright spot area is located at the edge of the image, the non-bright spot area can be determined within a range close to the bright spot area; that is, the non-bright spot area is also almost at the edge of the image, while being close to the bright spot area.

[0034] Step S103: Determine the contrast detection index of the reader / writer based on the contrast of the bright spot area and the contrast of the non-bright spot area. The contrast of the bright spot area is determined based on the brightness value of the first sampling point and the brightness value of the second sampling point. The contrast of the non-bright spot area is determined based on the brightness value of the third sampling point and the brightness value of the fourth sampling point.

[0035] Specifically, the contrast ratio of bright and non-bright areas can be calculated based on the brightness values ​​of the sampling points. Then, the contrast ratios of the bright and non-bright areas are compared to determine the contrast ratio detection index. This index is then used to analyze the contrast control of the reader / writer, yielding the contrast ratio detection results.

[0036] The contrast detection method for a DOT reader / writer provided in this invention acquires an image of the contrast detection image set on an optical testing fixture by the reader / writer, and samples the brightness values ​​of the corresponding two colors in the bright and non-bright areas of the image. The contrast control of the reader / writer is then analyzed based on the sampled brightness values. This overcomes the lack of contrast detection and control in related technologies. Furthermore, this detection method enables rapid and effective contrast detection.

[0037] This embodiment provides a contrast detection method for a DOT reader / writer, the process of which includes the following steps: Step S201: Obtain the imaging image of the contrast detection image set on the optical detection fixture by the reading and writing station. The contrast detection image includes a first color image and a second color image. The imaging image includes an image corresponding to the first color image and the second color image and has multiple bright spot areas superimposed on it.

[0038] Step S202: Determine multiple sampling points in the image and obtain the brightness values ​​of the sampling points. The sampling points include a first sampling point and a second sampling point located in the same bright spot area, namely: a first sampling point where the bright spot area overlaps with the first color image, and a second sampling point where the bright spot area overlaps with the second color image; the sampling points also include a third sampling point and a fourth sampling point located in the same non-bright spot area, namely: a third sampling point where the non-bright spot area overlaps with the first color image, and a fourth sampling point where the non-bright spot area overlaps with the second color image.

[0039] Specifically, step S202 includes: Step S2021: Click a preset number of first sampling points, a preset number of second sampling points, a preset number of third sampling points, and a preset number of fourth sampling points in the image. The preset number can be determined based on actual conditions; for example, it could be four, or other numbers such as three or five. The preset number of first and second sampling points should be located within the same bright spot area, and the preset number of third and fourth sampling points should be located within the surrounding area of ​​the aforementioned bright spot area.

[0040] Specifically, to achieve contrast detection, software with optical vision inspection capabilities and mathematical software supporting matrix calculations can be configured. The optical vision inspection software controls and adjusts the image acquisition device, such as a camera, to capture the image. The captured image can be stored in a custom folder after imaging. When acquiring the image, the mathematical software supporting matrix calculations is opened to read the image information and run the specified code. A dialog box appears, allowing selection of the image information to be tested for contrast. After selecting the image, a dialog box will appear with the title displaying: "Please click on 16 points. Points 1-4 are the first sampling points located where the bright spot area overlaps with the first color image; points 5-8 are the second sampling points located where the bright spot area overlaps with the second color image; points 9-12 are the third sampling points located where the non-bright spot area overlaps with the first color image; points 13-16 are the fourth sampling points located where the non-bright spot area overlaps with the second color image. Press Enter to confirm." Then, click on the corresponding sampling points according to the prompts and obtain the brightness value of each sampling point.

[0041] Step S203: Determine the contrast detection index of the reader / writer based on the contrast of the bright spot area and the contrast of the non-bright spot area. The contrast of the bright spot area is determined based on the brightness value of the first sampling point and the brightness value of the second sampling point, and the contrast of the non-bright spot area is determined based on the brightness value of the third sampling point and the brightness value of the fourth sampling point.

[0042] Specifically, step S203 includes: Step S2031: Determine the contrast of the bright spot region based on the ratio of the difference between the brightness values ​​of the first sampling point and the brightness values ​​of the second sampling point to the sum of their values. Specifically, after obtaining the brightness values ​​of multiple sampling points, the contrast of the bright spot region (DOT region) can be calculated using the following formula:

[0043] In the formula, This represents the brightness value of the first sampling point. This represents the brightness value of the second sampling point. When both the first and second sampling points include multiple points, then... This represents the average brightness value of multiple first sampling points. This represents the average brightness value of multiple second sampling points.

[0044] Step S2032: Determine the contrast of the non-bright spot region based on the ratio of the difference between the brightness values ​​of the third and fourth sampling points to their sum. Specifically, the contrast of the non-bright spot region (background region) can be calculated using the following formula:

[0045] In the formula, This represents the brightness value of the third sampling point. This represents the brightness value of the fourth sampling point. When both the third and fourth sampling points include multiple points, then... This represents the average brightness value of multiple third sampling points. This represents the average brightness value of multiple fourth sampling points.

[0046] It should be noted that the subscripts max and min in the above formula represent the brightness of different color regions. For example, the first and third sampling points correspond to the first color region, and the second and fourth sampling points correspond to the second color region. max indicates that the brightness value of the first color region is high, and min indicates that the brightness value of the second color region is low.

[0047] Step S2033: Determine the relative contrast based on the ratio of the contrast of the bright spot area to the contrast of the non-bright spot area. Specifically, the relative contrast can be calculated using the following formula:

[0048] Step S2034: Determine the contrast attenuation value according to the relative contrast. The relative contrast and the contrast attenuation value are used as contrast detection indicators to determine the contrast detection result. Specifically, the contrast attenuation value can be calculated using the following formula:

[0049] Specifically, the relative contrast can characterize the quality of the bright spot area, and the contrast attenuation value can be used as a quality judgment indicator. Both can be used as contrast detection indicators.

[0050] Step S2035: Determine whether the relative contrast is within a first preset range and whether the contrast attenuation value is within a second preset range; when the relative contrast is within the first preset range and the contrast attenuation value is within the second preset range, determine that the contrast detection result is qualified; otherwise, determine it as unqualified. Specifically, preset ranges can be set for the two contrast detection indicators respectively. For example, the preset range of the relative contrast is between 0.66 and 0.8, and the preset range of the contrast attenuation value is less than or equal to 0.35. After calculating the two indicators, compare them with the preset ranges. When they are within the preset ranges, it indicates that the contrast detection result meets the requirements and the contrast control situation of the writing and reading table meets the requirements.

[0051] In this embodiment, a method for detecting the contrast of a DOT writing and reading table is provided. The method includes the following steps: Step S301: Store the imaging image of the contrast detection image of the writing and reading table set on the optical detection jig and the foot point coordinates in the imaging image with the serial code as the index; perform formatting processing on each index; generate an image file path and a coordinate file path according to the formatted index. Among them, the first color image and the second color image are regular images with an adjacent edge, and the adjacent edge includes the foot point coordinates.

[0052] Specifically, for the convenience of automatically obtaining the sampling points, the first color image and the second color image are regular images, such as squares or rectangles, etc. At the same time, the first color image and the second color image are arranged adjacent to each other, that is, there is an adjacent edge between the two color images, and the two endpoints of the adjacent edge are called foot points. After obtaining the imaging image, the foot point coordinates in the image can be extracted first, and the foot point coordinates can be obtained by software for coordinate detection.

[0053] The acquired and extracted image coordinates are stored using serial numbers (SN codes) as indexes. For example, they are stored in a custom folder as BMP (Bitmap) images with inputtable SN codes. Simultaneously, the SN codes of the DOT reader / writer to be tested are batch-processed into a spreadsheet. When testing any reader / writer, a mathematical software supporting matrix calculations is opened, and its batch processing version of the code is run. A dialog box appears, allowing selection of a spreadsheet file. The image coordinates are then batch-processed using the data within that file as an index, and the final results are stored in the designated spreadsheet.

[0054] Specifically, mathematical software that supports matrix calculations can perform batch processing using SN codes as indices in the following manner: 1. Read index data. Read the index from the spreadsheet file; each index corresponds to a test image of a DOT reader / writer.

[0055] 2. Process each index in a loop. First, format the current index by converting it into a string format for file construction. Then, generate the image file path and coordinate file path based on the index.

[0056] Step S302: Obtain the imaging image of the contrast detection image set on the optical detection fixture by the reading and writing station. The contrast detection image includes a first color image and a second color image. The imaging image includes an image corresponding to the first color image and the second color image and has multiple bright spot areas superimposed on it.

[0057] Step S303: Determine multiple sampling points in the image and obtain the brightness values ​​of the sampling points. The sampling points include a first sampling point and a second sampling point located in the same bright spot area, namely: a first sampling point at the overlap of the bright spot area and the first color image, and a second sampling point at the overlap of the bright spot area and the second color image. The sampling points also include a third sampling point and a fourth sampling point located in the same non-bright spot area, namely: a third sampling point at the overlap of the non-bright spot area and the first color image, and a fourth sampling point at the overlap of the non-bright spot area and the second color image.

[0058] Specifically, step S303 includes: Step S3031: Obtain the coordinates of the foot points on the adjacent edges in the image. Specifically, the coordinates of the foot points (also known as reference point coordinates) on the image can be obtained based on the image file path generated in the above steps.

[0059] Step S3032 involves randomly offsetting the coordinates of the foot points in the first and second directions, and obtaining multiple sampling points using bilinear sampling difference. Specifically, based on the above analysis, it is known that the colors of the images on both sides of adjacent edges are different. For example, in a checkerboard image, for any two adjacent black and white checkerboard squares, they always have a connecting edge with two foot points on this edge. Assuming the black squares are arranged on the left and the white squares on the right, for these two squares, the left side of the connecting edge is the black area, and the right side of the connecting edge is the white area. That is, the connecting edge can be used to distinguish between the black and white areas. Simultaneously, since the two points form a line, the two foot points can also distinguish between black and white areas. After obtaining the coordinates of the two endpoints of the connecting edge, i.e., the two foot points, i.e., obtaining the reference point coordinates, pixel offset orientation is applied to obtain the desired sampling points.

[0060] For example, after obtaining the coordinates of the reference point, pixel offsets can be applied to the left and right respectively. This yields sampling points for the first color region and the second color region. The points obtained after applying the pixel offsets can be further calculated using bilinear sampling interpolation to obtain new points, thus generating sampling points within a reasonable range. The specific calculation method for bilinear interpolation can be found in relevant technical implementations and will not be elaborated upon here.

[0061] Step S3033 involves performing brightness detection on the multiple sampling points to classify them, resulting in a preset number of first sampling points, a preset number of second sampling points, a preset number of third sampling points, and a preset number of fourth sampling points. Specifically, after obtaining sampling points for two regions through step S3032, it is necessary to further distinguish whether the sampling points are located in bright spot regions or non-bright spot regions. Because the brightness values ​​of bright spot regions and non-bright spot regions are different, the sampling points are classified by brightness value detection to obtain the corresponding sampling points.

[0062] Step S3034: Determine whether the sampling points in different regions meet the brightness requirements; if they do not meet the brightness requirements, regenerate multiple sampling points. Specifically, after obtaining multiple sampling points, it is also necessary to determine whether the sampling points in different regions meet the brightness requirements of the corresponding regions. If they do not meet the requirements, step S3032 above needs to be repeated to generate new sampling points and re-divide the regions.

[0063] Step S304: Determine the contrast detection index of the reader / writer based on the contrast ratio of the bright spot area and the non-bright spot area. The contrast ratio of the bright spot area is determined based on the brightness values ​​of the first and second sampling points, and the contrast ratio of the non-bright spot area is determined based on the brightness values ​​of the third and fourth sampling points. For details, please refer to [link to relevant documentation]. Figure 1 Step S103 of the illustrated embodiment will not be described again here.

[0064] This embodiment provides a DOT reader / writer contrast detection system, such as... Figure 4 As shown, the system includes: an optical inspection fixture, an image acquisition device, and a controller; the DOT reader / writer under test is mounted on the optical inspection fixture and is used to image the contrast detection image mounted on the optical inspection fixture, the contrast detection image including a first color image and a second color image; The image acquisition device is used to acquire the imaging image of the DOT reader and send it to the controller; the imaging image includes an image corresponding to the first color image and the second color image, and multiple bright spot areas are superimposed on it; The controller is used to determine sampling points in the imaging image and acquire the brightness values ​​of the sampling points. The sampling points include a first sampling point and a second sampling point located in the same bright spot area, namely, the first sampling point where the bright spot area overlaps with the first color image and the second sampling point where the bright spot area overlaps with the second color image, respectively. The sampling points also include a third sampling point and a fourth sampling point located in a non-bright spot area, namely, the third sampling point where the non-bright spot area overlaps with the first color image and the fourth sampling point where the non-bright spot area overlaps with the second color image, respectively. Furthermore, the controller determines the contrast detection index of the reader / writer station based on the contrast of the bright spot area and the contrast of the non-bright spot area. The contrast of the bright spot area is determined based on the brightness values ​​of the first and second sampling points, and the contrast of the non-bright spot area is determined based on the brightness values ​​of the third and fourth sampling points.

[0065] In an optional implementation, when the image acquisition device is a camera, the controller is further configured to adjust the camera's exposure time. Specifically, an excessively long camera exposure time will result in overexposure of the detection image, while an excessively short camera exposure time will result in an unclear detection image. When adjusting the exposure time, appropriate software can adjust the exposure time by monitoring the overall grayscale of the image. For example, the software can monitor the grayscale of the image currently captured by the camera in real time; when the grayscale value is between 180 and 240, it indicates that the optimal camera exposure time has been adjusted.

[0066] As a specific application embodiment of the present invention, such as Figure 5 As shown, the contrast detection of the DOT reader / writer can proceed according to the following process: The DOT reader / writer is placed on an optical inspection fixture with a black and white checkerboard target. The DOT reader / writer images the checkerboard, and contrast is measured using this image. Because of the DOT optical elements on the reader / writer, the inspection image is divided into areas within and outside the DOT bright spot region. Next, the optical vision inspection software is run. This software can access the device's camera, adjust the optimal camera exposure time, and take pictures to record the image from the DOT reader / writer. The images are then saved in a custom folder in BMP format with an input serial number. Next, open mathematical software that supports matrix calculations, run the specified code, and a dialog box will appear. This dialog box allows you to select the imaging image to be used for contrast detection. After selection, an image dialog box will appear, with the title displaying "Please click on 16 points with the mouse. Points 1-4 calculate the DOT region Imax, points 5-8 calculate the DOT region Imin, points 9-12 calculate the DOT region outside Amax, and points 13-16 calculate the DOT region outside Amin. Press Enter to confirm." This samples 16 points. For example, ... Figure 6 As shown in the figure (the sampling area range of multiple similar sampling points is represented by boxes), the first 1-4 points represent sampling points in the white area where the DOT bright spot and the checkerboard pattern meet, points 5-8 represent sampling points in the black area where the DOT bright spot and the checkerboard pattern meet, points 9-12 represent sampling points in the white area of ​​the checkerboard pattern outside the DOT bright spot area, and points 13-16 represent sampling points in the black area of ​​the checkerboard pattern outside the DOT bright spot area.

[0067] After clicking 16 points, the system will automatically perform a test, obtaining the following results: contrast ratio (contrast 1) within the DOT area, contrast ratio (contrast 2) within the background area, relative contrast ratio (contrast 3, used to evaluate the quality of the DOT area), and contrast attenuation value (contrast 4, a quality assessment indicator). It will then determine whether contrast ratios 3 and 4 are within preset ranges and save the results in a statistics table using the previously named serial number.

[0068] As a specific application embodiment of the present invention, the contrast detection of the DOT reader / writer can also be carried out according to the following process: The DOT reader / writer is placed on an optical inspection fixture with a checkerboard pattern. The DOT reader / writer images this checkerboard pattern, and the contrast control of the DOT reader / writer is tested using this image. Because the reader / writer has DOT optical elements, the test image is divided into areas within and outside the DOT bright spot region. Next, the optical inspection software is run, which can access the device's camera. The software adjusts the optimal camera exposure time and takes pictures to record the image from the DOT reader / writer. The images are saved in a custom folder in BMP format with input serial numbers (SNs). The serial numbers of the DOT reader / writers to be tested are batch-entered into a spreadsheet. A mathematical software that supports matrix calculations is opened, and its batch processing version is run. A dialog box appears, allowing selection of a spreadsheet file. Batch processing is performed using the data within that file as an index, and the final results are saved into a designated spreadsheet. The image processing based on the spreadsheet file can be implemented as described in the previous embodiment and will not be repeated here.

[0069] This embodiment also provides a DOT reader / writer contrast detection device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0070] This embodiment provides a DOT reader / writer contrast detection device, such as... Figure 7 As shown, it includes: The image acquisition module 81 is used to acquire the image of the contrast detection image set on the optical detection fixture by the reading and writing station. The contrast detection image includes a first color image and a second color image. The image includes an image corresponding to the first color image and the second color image and multiple bright spot areas superimposed on it. The sampling module 82 is used to determine sampling points in the imaging image and obtain the brightness values ​​of the sampling points. The sampling points include a first sampling point and a second sampling point located in the same bright spot area, namely: a first sampling point at the overlap of the bright spot area and the first color image, and a second sampling point at the overlap of the bright spot area and the second color image. The sampling points also include a third sampling point and a fourth sampling point located in the same non-bright spot area, namely: a third sampling point at the overlap of the non-bright spot area and the first color image, and a fourth sampling point at the overlap of the non-bright spot area and the second color image. The contrast detection module 83 is used to determine the contrast detection index of the reader / writer based on the contrast of the bright spot area and the contrast of the non-bright spot area. The contrast of the bright spot area is determined based on the brightness value of the first sampling point and the brightness value of the second sampling point, and the contrast of the non-bright spot area is determined based on the brightness value of the third sampling point and the brightness value of the fourth sampling point.

[0071] Further functional descriptions of the above modules are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0072] This invention also provides a computer device having the above-described features. Figure 7 The DOT reader / writer contrast detection device shown is shown.

[0073] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 8 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 8 Take a processor 10 as an example.

[0074] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0075] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.

[0076] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device as shown by a landing page for an app. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, which can be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0077] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0078] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0079] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0080] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0081] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for detecting the contrast of a DOT reader / writer, characterized in that, The method includes: The reader / writer acquires an image of the contrast detection image set on the optical inspection fixture. The contrast detection image includes a first color image and a second color image. The image includes an image corresponding to the first color image and the second color image, and multiple bright spot areas are superimposed on it. Multiple sampling points are determined in the imaging image, and the brightness values ​​of the sampling points are obtained. The sampling points include a first sampling point and a second sampling point located in the same bright spot region, namely: a first sampling point at the overlap of the bright spot region and the first color image, and a second sampling point at the overlap of the bright spot region and the second color image; the sampling points also include a third sampling point and a fourth sampling point located in the same non-bright spot region, namely: a third sampling point at the overlap of the non-bright spot region and the first color image, and a fourth sampling point at the overlap of the non-bright spot region and the second color image; The contrast detection index of the reader / writer is determined based on the contrast of the bright spot area and the contrast of the non-bright spot area. The contrast of the bright spot area is determined based on the brightness value of the first sampling point and the brightness value of the second sampling point, and the contrast of the non-bright spot area is determined based on the brightness value of the third sampling point and the brightness value of the fourth sampling point.

2. The method according to claim 1, characterized in that, The contrast detection metrics of the reader / writer are determined based on the contrast ratio of bright areas and non-bright areas, including: The contrast of the bright spot region is determined by the ratio of the difference between the brightness values ​​of the first sampling point and the brightness values ​​of the second sampling point to the sum of the values. The contrast of the non-bright spot area is determined by the ratio of the difference between the brightness values ​​of the third and fourth sampling points to the sum of their values. The relative contrast is determined by the ratio of the contrast of the bright spot area to the contrast of the non-bright spot area.

3. The method according to claim 2, characterized in that, The contrast detection index of the reader / writer is determined based on the contrast ratio of bright areas and non-bright areas, and also includes: The contrast attenuation value is determined based on the relative contrast ratio, and the relative contrast ratio and contrast attenuation value are used as contrast detection indicators to determine the contrast detection result.

4. The method according to claim 3, characterized in that, The contrast detection result is determined as follows: whether the relative contrast is within a first preset range and whether the contrast attenuation value is within a second preset range; When the relative contrast is within a first preset range and the contrast attenuation value is within a second preset range, the contrast detection result is deemed qualified. Otherwise, it will be judged as unqualified.

5. The method according to claim 1, characterized in that, The first color image and the second color image are regular images with adjacent edges. The coordinates of the foot points of the adjacent edges are pre-stored. Multiple sampling points are determined in the image, including: Obtain the coordinates of the foot points of the adjacent edges in the image; The coordinates of the foot point are randomly offset in the first and second directions, and multiple sampling points are obtained by bilinear sampling interpolation; Brightness detection is performed on the multiple sampling points to classify them and obtain a preset number of first sampling points, a preset number of second sampling points, a preset number of third sampling points, and a preset number of fourth sampling points.

6. The method according to claim 5, characterized in that, Before acquiring the image of the contrast detection image of the reader / writer station placed on the optical inspection fixture, the method further includes: The image of the contrast detection image obtained by the reader and the coordinates of the foot points in the image are stored using the sequence code as an index. Format each index; Generate the image file path and coordinate file path based on the formatted index.

7. The method according to claim 5, characterized in that, After performing brightness detection on the multiple sampling points to classify them, the method further includes: Determine whether the sampling points in different areas meet the brightness requirements; If the brightness requirement is not met, multiple sampling points are regenerated.

8. The method according to claim 1, characterized in that, Multiple sampling points are determined in the imaging image, including: Click on a preset number of first sampling points, a preset number of second sampling points, a preset number of third sampling points, and a preset number of fourth sampling points in the imaging image, wherein the preset number of first sampling points and the preset number of second sampling points are located in the same bright spot area.

9. A contrast detection device for a DOT reader / writer, characterized in that, The device includes: The image acquisition module is used to acquire the image of the contrast detection image set on the optical detection fixture by the reading and writing station. The contrast detection image includes a first color image and a second color image. The image includes an image corresponding to the first color image and the second color image and multiple bright spot areas superimposed on it. A sampling module is used to determine sampling points in the imaging image and obtain the brightness values ​​of the sampling points. The sampling points include a first sampling point and a second sampling point located in the same bright spot region, namely: a first sampling point where the bright spot region overlaps with the first color image, and a second sampling point where the bright spot region overlaps with the second color image; the sampling points also include a third sampling point and a fourth sampling point located in the same non-bright spot region, namely: a third sampling point where the non-bright spot region overlaps with the first color image, and a fourth sampling point where the non-bright spot region overlaps with the second color image; The contrast detection module is used to determine the contrast detection index of the reader / writer based on the contrast of the bright spot area and the contrast of the non-bright spot area. The contrast of the bright spot area is determined based on the brightness value of the first sampling point and the brightness value of the second sampling point, and the contrast of the non-bright spot area is determined based on the brightness value of the third sampling point and the brightness value of the fourth sampling point.

10. A DOT reader / writer contrast detection system, characterized in that, The system includes: an optical inspection fixture, an image acquisition device, and a controller; The DOT reader / writer under test is set on an optical inspection fixture and is used to image the contrast detection image set on the optical inspection fixture. The contrast detection image includes a first color image and a second color image. The image acquisition device is used to acquire the imaging image of the DOT reader and send it to the controller; the imaging image includes an image corresponding to the first color image and the second color image, and multiple bright spot areas are superimposed on it; The controller is used to determine sampling points in the imaging image and acquire the brightness values ​​of the sampling points. The sampling points include a first sampling point and a second sampling point located in the same bright spot area, namely, the first sampling point where the bright spot area overlaps with the first color image, and the second sampling point where the bright spot area overlaps with the second color image, respectively. The sampling points also include a third sampling point and a fourth sampling point located in a non-bright spot area, namely, the third sampling point where the non-bright spot area overlaps with the first color image, and the fourth sampling point where the non-bright spot area overlaps with the second color image, respectively. Furthermore, the controller determines the contrast detection index of the reader / writer station based on the contrast of the bright spot area and the contrast of the non-bright spot area. The contrast of the bright spot area is determined based on the brightness values ​​of the first and second sampling points, and the contrast of the non-bright spot area is determined based on the brightness values ​​of the third and fourth sampling points.

11. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the DOT reader / writer contrast detection method according to any one of claims 1 to 8.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the DOT reader / writer contrast detection method according to any one of claims 1 to 8.