Method and device for realizing RGB sub-pixel positioning based on a single positioning map
Through the improved method based on single-position map, the Harris detection algorithm and morphological method combined with grid method and cubic spline interpolation algorithm are used to realize the simultaneous positioning of RGB subpixels, solving the problem of long positioning time in traditional methods, and improving the The positioning accuracy and robustness are adapted to the high standard needs of industrial applications.
Patent Information
- Application Number
- CN202010677807.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-15
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2040-07-15
AI Technical Summary
Traditional methods require switching and shooting of three pictures when detecting RGB subpixel positioning of active luminescent displays, resulting in a long positioning process and cannot meet the requirements of high standards of industrial applications.
Using a single-positioning map-based method, the coarse positioning of the cross mark center is obtained by improving the Harris detection algorithm, and the center of gravity is calculated using morphological methods. Combining the improved grid method and cubic spline interpolation algorithm, the simultaneous positioning of RGB subpixels is achieved.
The positioning process is simplified, the positioning time is shortened, the positioning accuracy and robustness is improved, the number of feature points is reduced, and it meets the needs of high-standard industrial applications.
Smart Images

Figure CN111882609B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of optical imaging systems and image processing, and specifically relates to a technology for screen image detection, in particular to a method and device for realizing screen RGB sub-pixel positioning based on a single positioning map. Background Art
[0002] The production process of active light-emitting display screens (such as OLED, miniLED and uLED) is complex, and the appearance of screen defects is inevitable. In order to detect these defects and provide technical support for subsequent processes, it is necessary to accurately locate the defects. Moreover, with the continuous improvement of detection requirements, positioning needs to be accurate to sub-pixels of different colors. The sub-pixel positioning technology has been applied to the AOI field for accurate defect positioning and distance measurement, and the Demura field for sub-pixel positioning and Mura repair.
[0003] For the RGB sub-pixel positioning of active light-emitting display screens, the traditional approach is to use a chessboard or dot pattern as the positioning feature map, produce three R / G / B positioning maps respectively, and then import them into the screen display respectively. After the camera takes the image, the R / G / B sub-pixels are positioned based on the image data. This method requires switching and taking three pictures, and also requires three positioning calculations, which undoubtedly increases the time of the entire detection system positioning process. The reduction of system detection time means a geometric increase in output for the entire factory. Therefore, it is necessary to develop a new positioning method to reduce the positioning time, thereby shortening the duration of the entire detection system process to meet the requirements of today's high-standard industrial application technology. Summary of the invention
[0004] In view of the defects and improvement needs of the prior art, the present invention provides a method and device for realizing simultaneous RGB sub-pixel positioning based on a single positioning map, comprising: preparing a positioning map according to information such as OLED screen resolution; obtaining a rough positioning of the center of the cross mark by an improved Harris detection algorithm based on the Mark marking information of the picture channel contained in the positioning map; calculating the center of gravity of the mark by a morphological method to achieve sub-pixel positioning accuracy; sorting the positioning coordinates of all sub-pixels in the picture by an improved grid method, and obtaining the sub-pixel coordinates of the image corresponding to all sub-pixels of the OLED screen picture channel in the camera picture by an optimized cubic spline interpolation algorithm according to the coordinates.
[0005] To achieve the above object, according to a first aspect of the present invention, a method for realizing simultaneous RGB sub-pixel positioning based on a single positioning map is provided, which specifically includes:
[0006] A positioning map is obtained by design, and any one of the three-color images, R image, G image, and B image, is selected as a reference image of the positioning map.
[0007] Obtain the original image of the camera imaging, collect the Mark point information of the picture channel contained in the positioning map, obtain the rough positioning coordinates of the Mark point by improving the Harris detection algorithm, calculate the center of gravity of the Mark point by morphology, and obtain the positioning coordinates of the sub-pixel feature point of the picture channel;
[0008] In order to avoid the problem of coordinate confusion of the acquired feature point positioning coordinates due to missing pixels, the sub-pixel feature point positioning coordinates are sorted using an improved grid method, and then the sub-pixel coordinates of all pixels of the OLED screen channel are obtained using a cubic spline interpolation algorithm;
[0009] Through the coordinates of all pixels in the picture channel, the coordinates of all pixels in the other two channels are calculated according to the screen coordinate system relationship between R, G, and B.
[0010] Preferably, two other picture points are designed in the reference picture at the same time, serving as positioning reference points for the two picture points.
[0011] Further, the positioning map reference picture is the G picture, and the other two picture points are the R point and the B point respectively.
[0012] Preferably, the MARK point type of the picture channel is designed to be a rectangle, a single point or a cross point.
[0013] Preferably, the screen coordinate system relationships between the three R, G, and B are respectively the coordinate system relationship between R and G, and the coordinate system relationship between B and G, which are expressed as:
[0014] R=G+Δ′GR
[0015] B=G+Δ'GB
[0016] The above formulas are respectively based on the inherent translation amounts ΔGR and ΔGB, and obtain the translation amounts Δ'GR and Δ'GB caused by the interference in the optical system through actual measurement.
[0017] Considering the factors such as the process distortion and spherical dispersion of the optical imaging system, the theoretical translation amounts ΔGR and ΔGB no longer meet the positioning accuracy requirements in practice after simple optical magnification conversion. The present invention obtains the above translation amounts Δ'GR and Δ'GB in the optical system by designing a positioning map and actually measuring them. The precise coordinate information of all pixel points in the R channel and the B channel can be calculated from the relationship between the above RG and BG.
[0018] According to the second aspect of the present invention, there is also provided a device for realizing simultaneous RGB sub-pixel positioning based on a single positioning map, comprising: an acquisition unit, for designing a screen positioning map, and selecting any one of the three-color images R, G, and B as a reference image of the positioning map; a positioning unit, for acquiring the original image of the camera imaging, collecting the Mark point information of the image channel contained in the positioning map, obtaining the rough positioning coordinates of the Mark points by means of an improved Harris detection algorithm, and calculating the center of gravity of the Mark points by means of morphology to obtain the positioning coordinates of the sub-pixel feature points of the image channel; a coordinate acquisition unit, for sorting the sub-pixel feature point positioning coordinates by means of an improved grid method, and then obtaining the sub-pixel coordinates of all pixels of the image channel of the OLED screen by means of a cubic spline interpolation algorithm; and an RGB pixel point coordinate acquisition unit, for calculating the coordinates of all pixels of the other two point channels by means of the coordinates of all pixels of the image channel and according to the screen coordinate system relationship between R, G, and B.
[0019] Preferably, the acquisition unit simultaneously designs two other picture points in the reference picture as positioning reference points for the two picture points.
[0020] Furthermore, the positioning map reference picture is the G picture, and the other two picture points are the R point and the B point respectively.
[0021] The method and device for realizing RGB sub-pixel positioning based on a single positioning map proposed in the present invention have the following beneficial effects: the positioning process can be completed through one positioning map and one positioning, which simplifies the traditional method and shortens the positioning time; the inherent characteristics of the screen are fully utilized to restore the real effect more and the feature points required are far less than those required by the traditional method; the specially designed Mark points can be used to judge the focus of the three types of RGB pixels at the same time, and the horizontal situation of the detected object can be judged at the same time; the improved grid sorting method can more effectively avoid the interference of abnormal points during positioning, and improve the robustness of positioning. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The specific implementation of the present invention will be further described below in conjunction with the accompanying drawings:
[0023] Figure 1 is a flow chart of a positioning method provided by an embodiment of the present invention;
[0024] Figure 2 It is a positioning diagram and a partial enlarged schematic diagram designed in the embodiment;
[0025] Figure 3 Schematic diagram of cross mark point rough positioning in the embodiment;
[0026] Figure 4 Schematic diagram of precise positioning of the center of the cross mark point in the embodiment;
[0027] FIG5( a ) is a schematic diagram of the actual arrangement of pixels of an OLED screen in the embodiment;
[0028] FIG5( b ) is a schematic diagram showing the offset of point R relative to point G in the positioning diagram of the embodiment;
[0029] Figure 6 Schematic diagram of positioning information of all pixels of R monochrome picture in the embodiment;
[0030] Figure 7 Schematic diagram of positioning information of all pixels of monochrome picture B in the embodiment. DETAILED DESCRIPTION
[0031] To further explain the technical solution of the present invention in detail, this embodiment is implemented on the premise of the technical solution of the present invention, and provides detailed implementation methods and specific steps. In addition, the technical features involved in each implementation method of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0032] In this embodiment, the positioning device utilizes the positioning method and is implemented in software and / or hardware, and can be integrated on an electronic device.
[0033] like Figure 1 is a flow chart of a positioning method provided by an embodiment of the present invention. First, draw Figure 2 As shown in the positioning diagram, the feature points in the picture are cross mark points, and they are all G channels. In order to calculate the relationship between R and G as well as B and G in the camera coordinate system, the two points R and B are designed in the cross mark.
[0034] After the positioning map is drawn, it is imported into the screen to display the positioning screen. The camera collects the feature positioning map. In order to ensure the accuracy and availability of subsequent data, the angle of the screen in the camera's field of view is first calculated through the cross mark before taking the picture, and it is determined whether it is within a reasonable range. Then the focus of the camera is adjusted. Since the three RGB colors do not reach the same optimal focus state in the camera's field of view, in order to quickly adjust to the balance point of the RGB optimal focus, the three channels of R, G, and B designed in the embodiment are displayed in one picture, and the camera can be quickly adjusted to the optimal focus state.
[0035] After binarizing the positioning map, the Harris corner point detection algorithm is used to calculate the center of the cross mark. Since the camera resolution is usually very high and the image data volume is too large, the traditional dot map needs to be searched and located point by point, and the execution efficiency of the program is relatively low. The positioning map designed in the embodiment only needs dozens of points as the calibration reference. In order to further reduce the amount of calculation, preferably, the number of mark points is set to 20×20, and the positioning map is first binarized and then downsampled. At this time, the cross point map is processed into a cross line, so the corner point of the cross line can be detected by the Harris algorithm. At this time, the corner point is defined as a rough coordinate, such as Figure 3 As shown, the morphological processing method is then used to calculate the center of gravity of the cross mark point whose rough position has been determined to perform coordinate calibration and obtain the precise coordinates. The effect is as follows Figure 4 shown.
[0036] In order to improve the stability and versatility of positioning, the above coordinates are gridded and sorted. Due to the screen manufacturing process and shooting environment, when finding and aligning pixels, it is inevitable that there will be interference caused by missing pixels in the screen and the presence of noise or other abnormal points. Preferably, the screen is gridded based on the feature points to avoid the above interference, and the grid point coordinates are recorded as: cameraPos(m,n)=(x,y), where 1≤m≤M, 1≤m≤N. The coordinates of the positioning map, that is, the coordinates in the pixel coordinate system of the measured screen are recorded as panelPos(m,n)=(xp,yp).
[0037] According to the coordinates of two different coordinate systems, a total of M*N points, the conversion relationship between the two is established. Through cubic spline interpolation, a functional relationship between the two coordinate systems is established. By specifying the coordinates of one coordinate system, the coordinates of the other coordinate system can be quickly obtained. At this time, the precise coordinate information of all pixel points in the G channel can be obtained.
[0038] Finally, when positioning the positioning map taken by G's camera at the beginning, the center coordinate information of the cross mark points where R and B are located in the map has been obtained. As shown in Figures 5(a) and 5(b), taking R and G as an example, there is a relationship between R and G in the bitmap screen: R=G+Δ'GR, that is, the coordinate information of R can be obtained by offsetting the coordinate information of G by a certain amount.
[0039] Assume that the coordinates of point G in Figure 5(b) are G(x, y), and the coordinates of point R are R(x, y). According to the known theoretical constant ΔGR, the relative position relationship between R and G in the screen coordinate system is:
[0040] R(x, y) = G(x, y) + ΔGR + Δ
[0041] Among them, Δ is the error caused by distortion, bright spot dispersion, etc. when the camera is shooting. From the known coordinate information of R and G in the camera coordinate system, the functional relationship between R and G coordinates can be inferred. From this relationship, all the coordinate information of the R channel can be obtained. Similarly, all the coordinate information of the B channel can be obtained according to the above method, such as Figure 6 and Figure 7 As shown, where '*' marks the center positions of all sub-pixels of the R and B channels, and the coordinates of '*' are obtained from the G channel pixels according to the above method.
[0042] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A sub-pixel positioning method for RGB based on a single positioning map, characterized in that: include: (a) Designing a positioning map, and selecting any one of the three color images, R, G, and B, as a reference image of the positioning map; (b) Obtaining the original image of the camera imaging, before taking the image, first calculate the angle of the screen in the camera field of view through the cross mark, and determine whether it is within a reasonable range, then adjust the focus of the camera, collect the cross mark information of the picture channel contained in the positioning map, binarize the positioning map, and obtain the coarse positioning coordinates of the cross mark through the Harris algorithm, including: setting the number of cross marks, binarizing the positioning map and then downsampling it, processing the cross mark map into cross lines, detecting the corner points of the cross lines through the Harris algorithm, and defining the corner points as coarse coordinates; using morphological calculation to determine the cross mark center of gravity of the coarse coordinates, for coordinate calibration, to obtain the precise coordinates, that is, the positioning coordinates of the sub-pixel feature points of the picture channel; (c) using an improved grid method to sort the sub-pixel feature point positioning coordinates, and then using a cubic spline interpolation algorithm to obtain the sub-pixel coordinates of all pixels in the picture channel, including: gridding the screen based on the feature points, generating grid points, and sorting the grid points, while recording the grid point coordinates and the positioning map coordinates, and establishing a conversion relationship between the two based on the coordinates of two different coordinate systems; establishing a functional relationship between the two coordinate systems through a cubic spline interpolation algorithm, specifying one coordinate system coordinate, and obtaining the other coordinate system coordinate, at this time, based on the functional relationship between the two coordinate systems, obtaining the sub-pixel coordinates of all pixels in the picture channel; (d) calculating the coordinates of all pixels in the other two channels through the sub-pixel coordinates of all pixels in the picture channel and the screen coordinate system relationship between R, G, and B; The screen coordinate system relationships between the three R, G, and B are respectively the R and G coordinate system relationships, and the B and G coordinate system relationships, which are expressed as: R=G+Δ′GR (1) B=G+Δ'GB (2) In the above formulas (1) and (2), Δ'GR and Δ'GB are respectively the translation amounts Δ'GR and Δ'GB caused by the interference in the optical system obtained through actual measurement on the basis of the inherent translation amounts ΔGR and ΔGB.
2. According to claim 1, a method for implementing RGB sub-pixel positioning based on a single positioning map, characterized in that: Two other picture points are simultaneously designed in the reference picture as positioning reference points for the two pictures.
3. According to claim 2, a method for implementing RGB sub-pixel positioning based on a single positioning map, characterized in that: The positioning map reference picture is the G picture, and the other two picture points are respectively the R point and the B point.
4. A sub-pixel positioning device for RGB based on a single positioning map, characterized in that: include: An acquisition unit is used to design and obtain a screen positioning map, and select any one of the three color pictures R picture, G picture, and B picture as a reference picture of the positioning map; The positioning unit obtains the original image of the camera imaging. Before taking the image, the angle of the screen in the camera field of view is calculated by the cross mark, and it is determined whether it is within a reasonable range, and then the focus of the camera is adjusted, and the cross mark information of the picture channel contained in the positioning map is collected. After the positioning map is binarized, the coarse positioning coordinates of the cross mark are obtained by the Harris algorithm, including: setting the number of cross marks, binarizing the positioning map and then downsampling it, processing the cross mark map into cross lines, detecting the corner points of the cross lines by the Harris algorithm, and defining the corner points as coarse coordinates; using morphological calculation to determine the cross mark center of gravity of the coarse coordinates, for coordinate calibration, to obtain the precise coordinates, that is, the positioning coordinates of the sub-pixel feature points of the picture channel; The coordinate acquisition unit uses an improved grid method to sort the sub-pixel feature point positioning coordinates, and then uses a cubic spline interpolation algorithm to obtain the sub-pixel coordinates of all pixels in the picture channel, including: gridding the screen based on the feature points, generating grid points, and sorting the grid points, while recording the grid point coordinates and the positioning map coordinates, and establishing a conversion relationship between the two according to the coordinates of two different coordinate systems; establishing a functional relationship between the two coordinate systems through a cubic spline interpolation algorithm, specifying the coordinates of one coordinate system, and obtaining the coordinates of another coordinate system, and at this time, based on the functional relationship between the two coordinate systems, obtaining the sub-pixel coordinates of all pixels in the picture channel; The RGB pixel coordinate acquisition unit calculates the coordinates of all the pixels in the other two channels through the coordinates of all the pixels in the picture channel and the screen coordinate system relationship between R, G and B. The screen coordinate system relationships between the three R, G, and B are respectively the R and G coordinate system relationships, and the B and G coordinate system relationships, which are expressed as: R=G+Δ′GR (1) B=G+Δ'GB (2) In the above formulas (1) and (2), Δ'GR and Δ'GB are respectively the translation amounts Δ'GR and Δ'GB caused by the interference in the optical system obtained through actual measurement on the basis of the inherent translation amounts ΔGR and ΔGB.
5. According to claim 4, a sub-pixel positioning device for implementing RGB based on a single positioning map, characterized in that: The acquisition unit simultaneously designs two other picture points in the reference picture as positioning reference points for the two pictures.
6. The device for implementing RGB sub-pixel positioning based on a single positioning map according to claim 5, characterized in that: The positioning map reference picture is the G picture, and the other two picture points are respectively the R point and the B point.
