CN117392225B - Method and system for correcting position of detection area of display screen - Google Patents
Method and system for correcting position of detection area of display screen Download PDFInfo
- Publication number
- CN117392225B CN117392225B CN202311659634.3A CN202311659634A CN117392225B CN 117392225 B CN117392225 B CN 117392225B CN 202311659634 A CN202311659634 A CN 202311659634A CN 117392225 B CN117392225 B CN 117392225B
- Authority
- CN
- China
- Prior art keywords
- point
- offset
- points
- corrected
- display screen
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 122
- 238000000034 method Methods 0.000 title claims abstract description 60
- 238000004364 calculation method Methods 0.000 claims abstract description 9
- 238000012937 correction Methods 0.000 claims description 53
- 238000004590 computer program Methods 0.000 claims description 13
- 238000003702 image correction Methods 0.000 claims 1
- 238000011897 real-time detection Methods 0.000 claims 1
- 230000007547 defect Effects 0.000 abstract description 11
- 230000009286 beneficial effect Effects 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 12
- 238000004891 communication Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 3
- 241000287196 Asthenes Species 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4007—Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/75—Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
- G06V10/757—Matching configurations of points or features
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Artificial Intelligence (AREA)
- Computing Systems (AREA)
- Health & Medical Sciences (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention discloses a method and a system for correcting the position of a detection area of a display screen, comprising the following steps: setting a characteristic point position outside a display screen; calculating the position offset of the out-of-plane feature points by using template matching; calculating the offset of the position to be corrected by adopting an improved bilinear interpolation method according to the position offset of the feature points calculated in advance; and adjusting the image position of the detection area in real time according to the corrected offset. The beneficial effects of the invention are as follows: first, the calculation accuracy is high, and the defect detection rate can be improved and the false defect rate can be reduced. Secondly, only one time of setting is needed, and the device is used for multiple times. The calculated characteristic point position offset can be used for all types of display screens. And finally, the operation flow for calculating the offset is simple.
Description
Technical Field
The invention belongs to the technical field of computer vision detection, and particularly relates to a method and a system for correcting the position of a detection area of a display screen.
Background
Computer vision detection is widely applied in the field of object detection, and the computer vision detection technology has the advantages of high speed, high efficiency, high precision, integration and the like, and gradually becomes a main method for detecting various industries. The method has wide application in the fields of display screen defect detection, circuit board defect detection, workpiece detection defect detection and the like.
High-precision display screen detection based on machine vision requires high defect detection rate and low false defect rate. Therefore, high requirements are placed on the positioning accuracy of the position of the detection area. In practical application, the vision system comprises a camera fixed on a guide rail, and the camera is driven to collect images by means of the movement of a motor. Due to the influences of the installation precision and the load of the guide rail, the guide rail can generate certain deformation, and the image of the detection area acquired by the camera can also change. On the other hand, when the detection area is defined by a microscope, since there is a certain positional deviation between the microscope and the support beam, the actual detection area position is not exactly the same as the set detection area position. In the last aspect, the distortion of the lens also has a certain influence on the acquisition of the image of the detection area. They can lead to detection area defect omission and false defect increase.
In order to accurately locate each detection area, correction must be made for each detection area position set.
Disclosure of Invention
Based on the necessity of the current display screen detection area position correction, the invention provides a display screen detection area position correction method. Firstly, setting characteristic points outside a display screen; secondly, calculating the position offset of the out-of-plane feature points by using template matching; then, calculating the offset of the position to be corrected by adopting an improved bilinear interpolation method according to the position offset of the feature points calculated in advance; and finally, adjusting the image position of the detection area in real time according to the corrected offset.
Specifically, the invention provides a method for correcting the position of a detection area of a display screen, which comprises the following steps:
setting a characteristic point position outside a display screen;
Calculating the position offset of the out-of-plane feature points by using template matching;
calculating the offset of the position to be corrected by adopting an improved bilinear interpolation method;
the position of the detection area image is adjusted in real time according to the offset obtained by correction;
further, the process of setting the feature points outside the display screen is as follows:
According to the characteristics of the display screen, the display screen is divided into an in-plane area and an out-of-plane area, the circuits of the out-of-plane area are irregularly distributed, and the circuits of the in-plane area are regularly distributed. And acquiring a plurality of different characteristic points outside the surface, acquiring the different characteristic points at equal intervals as far as possible in the upper, lower, left and right areas of each panel, and recording the position information of the characteristic points.
Further, the process of calculating the positional offset of the out-of-plane feature point using template matching is as follows:
A) Setting a template image. The same template images are arranged on the same feature points outside the surface, different template images are arranged on different feature points, and the feature points are arranged at the center positions of the template images.
B) And obtaining the offset of the characteristic points. After setting the position of the feature point and the template image of the feature point, starting to acquire the feature point image, taking the feature point as the center according to the set point information, acquiring the image of each point with a fixed image size, marking the width and the height of the image as W and H respectively, carrying out template matching with the acquired point image according to the set point template image, marking the matching position of the template image in the feature point image as (x, y) after matching, marking the width and the height of the template image as W and H respectively, and taking the difference between the center of the template image and the center of the feature point image after image matching as the position offset of the feature point. I.e. the offset in the x-direction isThe offset in the y direction is。
C) And saving the offset and the position information of the feature points. And storing the offset of each characteristic point calculated by template matching in the x direction and the y direction by adopting a text file, and simultaneously storing the position information of the characteristic point.
Further, the method for calculating the offset of the position to be corrected by adopting the improved bilinear interpolation method is as follows:
A) A correction detection area is set. Through the distribution characteristics of each display screen, the in-plane and out-of-plane detection areas are set, and the position information of the in-plane and out-of-plane detection areas is used for detection.
B) When the display screen starts to detect, firstly, the position information of the characteristic points stored in the hard disk in advance and the offset of the characteristic points in the x and y directions are read, so that preparation is made for correction during detection.
C) And calculating four characteristic points required by correction of the region to be detected. During detection, the detection areas in the display screen and outside the display screen are divided into a plurality of small areas with the same size for detection, and the center position of each small area is used as a point to be corrected of the whole small area. In the set feature points, the difference between the positions of all feature points and the positions of the points to be corrected in the center of the small detection area is four quadrants according to a rectangular coordinate system, and the difference between the X direction and the Y direction of the coordinates is respectively recorded as dx and dy. If dx and dy are both greater than zero, then the point belongs to the first quadrant; if dx is less than zero and dy is greater than zero, then the point belongs to the second quadrant; if dx and dy are both less than zero, then the point belongs to the third quadrant; if dx is greater than zero and dy is less than zero, then the point belongs to the fourth quadrant. The distances from the feature points in each quadrant to the points to be corrected of the small correction area are obtained, the distances calculated in each quadrant are arranged in a descending order, the feature points with the smallest distances in each quadrant are used as effective feature points of the points to be corrected of the small detection area, and the total number of the effective feature points is four.
D) The detection area to-be-corrected point needs to be calculated by correcting offset. In order to reduce correction position deviation which may be caused by the fact that the four effective feature points are not in a standard rectangular distribution, an improved bilinear interpolation method is adopted to calculate coordinate offsets in the x direction and the y direction of the point to be corrected. If the coordinate positions of the effective feature points in the four quadrants are (x 1,y1),(x2,y2),(x3,y3),(x4,y4), the coordinate offsets of the four feature points in the x direction and the y direction are respectively,,,. The coordinate position of the point to be corrected is (x 0,y0), the y-direction projection of the acquisition point (x 0,y0) on the line segment formed by the points (x 1,y1) and (x 2,y2) is (x 0,y12), and the y-direction projection of the acquisition point (x 0,y0) on the line segments of the points (x 3,y3) and (x 4,y4) is (x 0,y34). The value of y 12 can be obtained by a linear equation. The value of y 34 can be obtained by the straight line equation, i.e. The x-direction coordinate offset of the projection point (x 0,y12) on the line segment formed by the points (x 1,y1) and (x 2,y2) isThen calculate to get
. The x-direction coordinate offset of the projection point (x 0,y34) on the line segment formed by the points (x 3,y3) and (x 4,y4) isThen calculate to get. Finally, obtaining the coordinate offset of the point (x 0,y0) to be corrected in the x direction by interpolation calculation asThen calculate to getThe coordinate offset of the projection point (x 0,y12) in the y direction on the line segment formed by the points (x 1,y1) and (x 2,y2) is; The y-direction coordinate offset of the projected point (x 0,y34) on the line segment formed by the points (x 3,y3) and (x 4,y4) is; Finally, obtaining the coordinate offset of the point (x 0,y0) to be corrected in the y direction by interpolation calculation as。
Further, the method for adjusting the image of the detection area in real time according to the corrected offset is as follows:
If the detection area is small, the point image coordinate to be corrected is (x 0,y0), and the point position coordinate to be corrected after correction is In the same way, the correction of the image of the detection small area also adopts the same correction offset, and the initial coordinate positions of the detection small area are respectively added withAndAnd the new image detection position of the detection small area after correction is obtained.
According to another aspect of the present invention, there is also provided an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the memory, the processor executing the program to implement the method for correcting the position of a detection area of a display screen as described above.
According to another aspect of the present invention, a non-transitory computer readable storage medium has stored thereon a computer program that is executed by a processor to implement a method of display screen detection area position correction as described above.
The beneficial effects of the invention are as follows: first, the calculation accuracy is high, and the defect detection rate can be improved and the false defect rate can be reduced. Secondly, only one time of setting is needed, and the device is used for multiple times. The calculated characteristic point position offset can be used for all types of display screens. And finally, the operation flow for calculating the offset is simple.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 is a flow chart of a method for correcting the position of a detection area of a display screen according to the present invention;
FIG. 2 is an exemplary graph of out-of-plane feature point distribution for display screen detection area position correction according to the present invention;
FIG. 3 is an exemplary diagram of feature points for display screen detection area position correction according to the present invention;
FIG. 4 is an exemplary diagram of a feature point template image for display screen detection area position correction according to the present invention;
FIG. 5 is a diagram showing an example of the center of an image and the center of a template before correction of a feature point for the position correction of a detection area of a display screen according to the present invention;
FIG. 6 is an exemplary diagram of a corrected image center and template center image for a feature point corrected display screen detection area location correction in accordance with the present invention;
FIG. 7 is an exemplary graph of x-direction offset before and after correction for all feature points for display screen detection area position correction according to the present invention;
FIG. 8 is an exemplary graph of y-direction offset before and after correction for all feature points for display screen detection area position correction according to the present invention;
FIG. 9 is a diagram showing an example of an image before detection area position correction for display screen detection area position correction according to the present invention;
FIG. 10 is a diagram showing an example of a corrected detection area position image for display screen detection area position correction according to the present invention;
FIG. 11 is a diagram showing an example of a detection area position pre-correction offset for detecting an area position correction of a display screen according to the present invention;
FIG. 12 is a diagram showing an example of a display screen with corrected detection area position and no offset after the correction;
FIG. 13 is a system configuration diagram of display screen detection area position correction according to the present invention;
FIG. 14 is a schematic diagram of an electronic device according to an embodiment of the present invention;
fig. 15 is a schematic diagram of a storage medium according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The invention aims at correcting the position of a detection area of a display screen. The correction flow is to select the characteristic points at approximately equal distance outside the plane according to the characteristic of more out-of-plane characteristic points of the display screen, acquire the image of each characteristic point, then set the template image by using the image, and set the same template image by the characteristic points of the same type. Collecting images of all the feature points, carrying out template matching by using the template images, and taking the difference between the central position of the template image in the feature point images and the central position of the feature point images as the position offset of the feature point positions in the x direction and the y direction after the template matching. During detection, the detection area of each detection area is divided into a plurality of small areas with the same size, the center of each small detection area is used as a point to be corrected, quadrants are divided according to coordinate differences between all characteristic points and the point to be corrected according to a quadrant dividing method of a rectangular coordinate system, and the point, closest to the point to be corrected, of each quadrant is taken as an effective point participating in correction. And finally, calculating the coordinate offset of the point to be corrected according to the improved bilinear interpolation method. And adjusting the image position of the small detection area in real time according to the coordinate offset.
Example 1
The invention aims at correcting the position of a detection area of a display screen. The calculation process is as follows:
1. the feature points outside the display panel are set as shown in fig. 2.
According to the characteristics of the display screen, the display screen is divided into an in-plane area and an out-of-plane area, the circuits of the out-of-plane area are irregularly distributed, and the circuits of the in-plane area are regularly distributed. A plurality of different feature points are first acquired out of plane, the feature points being points selected for a region having a unique texture feature, for example, where the texture feature refers to the texture feature of a region, and the unique texture feature region refers to a region in the vicinity of the region that does not have the same texture feature as it. Different characteristic points are obtained at equal intervals as far as possible in the upper, lower, left and right areas of each panel, and equidistant and separate points are difficult to obtain when the points are actually arranged. The pitch of the feature points in the same area is about 50 mm, and the position information of the feature points is recorded. In fig. 2, the units of the abscissa and the ordinate are both millimeters.
2. The positional shift amount of the out-of-plane feature point is calculated using template matching, as shown in fig. 3 and 4.
A) Setting a template image. The same template images are arranged on the same feature points outside the surface, different template images are arranged on different feature points, and the feature points are arranged at the center positions of the template images.
B) And obtaining the offset of the characteristic points. After setting the position of the feature point and the template image of the feature point, starting to collect the feature point image, taking the feature point as the center according to the set point information, taking the fixed image size to obtain the image of each point, marking the width and the height of the image as W and H respectively, marking the values of W and H as 2mm, carrying out template matching with the obtained point image according to the set point template image, marking the matching position of the template image in the feature point image as (x, y) after matching, marking the width and the height of the template image as W and H respectively, and taking the difference between the center of the template image and the center of the feature point image after image matching as the position offset of the feature point. I.e. the offset in the x-direction isThe offset in the y direction is。
C) And saving the offset and the position information of the feature points. And storing the offset of each characteristic point calculated by template matching in the x direction and the y direction by adopting a text file, and simultaneously storing the position information of the characteristic point.
3. And calculating the offset of the position to be corrected by adopting an improved bilinear interpolation method.
A) A correction detection area is set. Through the distribution characteristics of each display screen, the in-plane and out-of-plane detection areas are set, and the position information of the in-plane and out-of-plane detection areas is used for detection.
B) When the display screen starts to detect, firstly, the position information of the characteristic points stored in the hard disk in advance and the offset of the characteristic points in the x and y directions are read, so that preparation is made for correction during detection.
C) And calculating four characteristic points required by the position correction of the region to be detected. During detection, the detection areas in the display screen and outside the display screen are divided into a plurality of small areas with the same size for detection, and the center position of each small area is used as a point to be corrected of the whole small area. In the set feature points, the difference between the positions of all feature points and the positions of the points to be corrected in the center of the small detection area is four quadrants according to a rectangular coordinate system, and the difference between the X direction and the Y direction of the coordinates is respectively recorded as dx and dy. If dx and dy are both greater than zero, then the point belongs to the first quadrant; if dx and dy are both less than zero, then the point belongs to the second quadrant; if dx is less than zero and dy is less than zero, then the point belongs to the third quadrant; if dx is greater than zero and dy is less than zero, then the point belongs to the fourth quadrant. The distances from the feature points in each quadrant to the points to be corrected of the small correction area are obtained, the distances calculated in each quadrant are arranged in a descending order, the feature points with the smallest distances in each quadrant are used as effective feature points of the points to be corrected of the small detection area, and the total number of the effective feature points is four.
D) The detection area to-be-corrected point needs to be calculated by correcting offset. In order to reduce correction position deviation which may be caused by the fact that the four effective feature points are not in a standard rectangular distribution, an improved bilinear interpolation method is adopted to calculate coordinate offsets in the x direction and the y direction of the point to be corrected. If the coordinate positions of the effective feature points in the four quadrants are (x 1,y1),(x2,y2),(x3,y3),(x4,y4), the coordinate offsets of the four feature points in the x direction and the y direction are respectively,,,. The coordinate position of the point to be corrected is (x 0,y0), the y-direction projection of the acquisition point (x 0,y0) on the line segment formed by the points (x 1,y1) and (x 2,y2) is (x 0,y12), and the y-direction projection of the acquisition point (x 0,y0) on the line segments of the points (x 3,y3) and (x 4,y4) is (x 0,y34). The value of y 12 can be obtained by a linear equation. The value of y 34 can be obtained by the straight line equation, i.e. The x-direction coordinate offset of the projection point (x 0,y12) on the line segment formed by the points (x 1,y1) and (x 2,y2) isCalculated to obtain
. The x-direction coordinate offset of the projection point (x 0,y34) on the line segment formed by the points (x 3,y3) and (x 4,y4) isThen calculate to get. Finally, obtaining the coordinate offset of the point (x 0,y0) to be corrected in the x direction by interpolation calculation asThen calculate to getThe coordinate offset of the projection point (x 0,y12) in the y direction on the line segment formed by the points (x 1,y1) and (x 2,y2) is; The y-direction coordinate offset of the projected point (x 0,y34) on the line segment formed by the points (x 3,y3) and (x 4,y4) is; Finally, obtaining the coordinate offset of the point (x 0,y0) to be corrected in the y direction by interpolation calculation as. Fig. 5 and 6 are comparisons of results before and after correction of the x-direction and y-direction of the feature points.
4. And adjusting the detection area image in real time according to the corrected offset.
If the detection area is small, the point image coordinate to be corrected is (x 0,y0), and the point position coordinate to be corrected after correction is. In the same way, the correction of the image of the detection small area also adopts the same correction offset, and the initial coordinate positions of the detection small area are respectively added withAndAnd the new image detection position of the detection small area after correction is obtained. In this embodiment, the feature points are corrected in position, as shown in fig. 5, 6, 7 and 8, the cross marks in fig. 5 and 6 are central positions, and the ordinate units in millimeters in fig. 7 and 8. The present embodiment corrects the detection area position as shown in fig. 9, 10, 11 and 12.
Example 2
The present embodiment provides a system for correcting a detection area of a display screen, as shown in fig. 13, including:
an out-of-plane feature point location module 101 is configured to obtain a location of a feature point;
a feature point position offset calculating module 102, configured to calculate a feature point position offset in advance;
an offset module 103 for calculating the position of the point to be corrected, for calculating the offset of the position to be corrected;
the real-time adjustment detection area image position module 104 is used for adjusting the detection area position image;
According to another aspect of the present invention, there is also provided a computer program comprising a memory, a processor and a computer program stored on the memory and executable on the memory, the processor executing the program to implement the display screen detection area correction method as described above.
According to another aspect of the present invention, there is also provided a non-transitory computer-readable storage medium having stored thereon a computer program that is executed by a processor to implement the display screen detection area position correction method as described above.
The embodiment of the invention also provides an electronic device corresponding to the method for correcting the position of the detection area of the display screen provided by the previous embodiment, so as to execute the method for correcting the position of the detection area of the upper display screen. The embodiment of the invention is not limited.
Referring to fig. 14, a schematic diagram of an electronic device according to some embodiments of the present invention is shown. As shown in fig. 14, the electronic device 20 includes: a processor 200, a memory 201, a bus 202 and a communication interface 203, the processor 200, the communication interface 203 and the memory 201 being connected by the bus 202; the memory 201 stores a computer program that can be executed on the processor 200, and the processor 200 executes the method for correcting the position of the detection area of the display screen according to any one of the foregoing embodiments of the present invention when executing the computer program.
The memory 201 may include a high-speed random access memory (RAM: random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the system network element and at least one other network element is implemented via at least one communication interface 203 (which may be wired or wireless), the internet, a wide area network, a local network, a metropolitan area network, etc. may be used.
Bus 202 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be classified as address buses, data buses, control buses, etc. The memory 201 is configured to store a program, and the processor 200 executes the program after receiving an execution instruction, and the method for correcting the position of the detection area of the display screen disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 200 or implemented by the processor 200.
The processor 200 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in the processor 200 or by instructions in the form of software. The processor 200 may be a general-purpose processor, including a central processing unit (Central Processing Unit, abbreviated as CPU), a network processor (Net work Processor, abbreviated as NP), etc.; but may also be a Digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in the memory 201, and the processor 200 reads the information in the memory 201, and in combination with its hardware, performs the steps of the above method.
The electronic equipment provided by the embodiment of the invention and the method for correcting the position of the detection area of the display screen provided by the embodiment of the invention have the same beneficial effects as the method adopted, operated or realized by the electronic equipment based on the same inventive concept.
The embodiment of the present invention further provides a computer readable storage medium corresponding to the method for correcting the position of the detection area of the display screen provided in the foregoing embodiment, referring to fig. 15, the computer readable storage medium is shown as an optical disc 30, on which a computer program (i.e. a program product) is stored, where the computer program, when executed by a processor, performs the method for correcting the position of the detection area of the display screen provided in any of the foregoing embodiments.
It should be noted that examples of the computer readable storage medium may also include, but are not limited to, a phase change memory (PRAM), a Static Random Access Memory (SRAM), a Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a flash memory, or other optical or magnetic storage medium, which will not be described in detail herein.
The computer readable storage medium provided by the above embodiment of the present invention has the same advantages as the method adopted, operated or implemented by the application program stored in the computer readable storage medium for correcting the position of the detection area of the display screen provided by the embodiment of the present invention, because of the same inventive concept.
It should be noted that:
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose devices may also be used with the teachings herein. The required structure for the construction of such devices is apparent from the description above. In addition, the present invention is not directed to any particular programming language. It will be appreciated that the teachings of the present invention described herein may be implemented in a variety of programming languages, and the above description of specific languages is provided for disclosure of enablement and best mode of the present invention.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
Various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functions of some or all of the components in the creation means of a virtual machine according to an embodiment of the present invention may be implemented in practice using a microprocessor or Digital Signal Processor (DSP). The present invention can also be implemented as an apparatus or device program (e.g., a computer program and a computer program product) for performing a portion or all of the methods described herein. Such a program embodying the present invention may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.
The present invention is not limited to the above-mentioned embodiments, and any changes or substitutions that can be easily understood by those skilled in the art within the technical scope of the present invention are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (5)
1. A method for correcting the position of a detection area of a display screen, comprising the steps of:
Setting characteristic points outside a display panel;
Calculating the position offset of the out-of-plane feature points by using template matching;
calculating the offset of the position to be corrected by adopting an improved bilinear interpolation method;
the position of the image of the detection area is adjusted in real time according to the corrected offset;
The process of setting the characteristic points outside the display screen is as follows:
According to the characteristics of the display screen, the display screen is divided into an in-plane area and an out-of-plane area, wherein the circuits of the out-of-plane area are irregularly distributed, and the circuits of the in-plane area are regularly distributed;
acquiring a plurality of different characteristic points outside the surface, acquiring different characteristic points at equal intervals in the upper, lower, left and right areas of each panel, and recording the position information of the characteristic points;
The process of calculating the position offset of the out-of-plane feature points by using template matching is as follows:
A) Setting a template image; the same template images are arranged on the same feature points outside the surface, different template images are arranged on different feature points, and the feature points are arranged at the center positions of the template images;
b) Acquiring the offset of the feature points; after setting the characteristic points and template images of the characteristic points, starting to acquire the characteristic point images, taking the characteristic points as the centers according to the set characteristic point information, acquiring the images of each characteristic point with a fixed image size, marking the width and the height of the characteristic point images as W and H respectively, carrying out template matching with the acquired characteristic point images according to the set characteristic point template images, marking the matching positions of the template images in the characteristic point images as (x, y) after the matching is completed, marking the width and the height of the template images as W and H respectively, and taking the difference between the centers of the template images and the centers of the characteristic point images after the image matching as the position offset of the display screen at the characteristic points; that is, the offset in the x direction is DX=x+w/2-W/2, and the offset in the y direction is DY=y+h/2-H/2;
C) Storing the offset and the position information of the feature points; storing the offset of each characteristic point calculated by template matching in the x direction and the y direction by adopting a text file, and simultaneously storing the position information of the characteristic point; the method for calculating the offset of the position to be corrected by adopting the improved bilinear interpolation method comprises the following steps:
a) Setting a correction detection area; setting in-plane and out-of-plane detection areas according to the distribution characteristics of each display screen, wherein the position information of the in-plane and out-of-plane detection areas is used for detection;
B) When the display screen starts to detect, firstly, the pre-stored position information of the characteristic points and the offset of the characteristic points in the x and y directions are read;
C) Calculating four characteristic points required by the position correction of the region to be detected; dividing the detection areas in and out of the display screen into a plurality of small areas with the same size for detection, and taking the central position of each small area as a point to be corrected of the whole small area; in the set characteristic points, the difference values of the positions of all the characteristic points and the positions of the points to be corrected in the center of the detection small area are four quadrants according to a rectangular coordinate system, and the difference values of the x direction and the y direction of the coordinates are respectively recorded as dx and dy; if dx and dy are both greater than zero, the feature point belongs to the first quadrant; if dx is less than zero and dy is greater than zero, the feature point belongs to the second quadrant; if dx and dy are both smaller than zero, the feature point belongs to the third quadrant; if dx is greater than zero and dy is less than zero, the feature point belongs to the fourth quadrant; the method comprises the steps of obtaining the distance from a feature point in each quadrant to a point to be corrected of a small detection area, arranging the calculated distances in each quadrant in a sequence from small to large, and taking the feature point with the smallest distance in each quadrant as the effective feature point of the point to be corrected of the small detection area, wherein the total number of the effective feature points is four;
d) Calculating the correction offset of the to-be-corrected point of the detection area; calculating coordinate offset of the point to be corrected in the x direction and the y direction by adopting an improved bilinear interpolation method; if the coordinate positions of the effective feature points in the four quadrants are (x 1,y1),(x2,y2),(x3,y3),(x4,y4) respectively, the coordinate offsets of the four feature points in the x direction and the y direction are (OffsetX1,OffsetY1),(OffsetX2,OffsetY2),(OffsetX3,OffsetY3),(OffsetX4,OffsetY4); respectively, the coordinate positions of the points to be corrected are (x 0,y0), the y-direction projection of the acquisition point (x 0,y0) on the line segment formed by points (x 1,y1) and (x 2,y2) is (x 0,y12), Acquiring the y-direction projection of the point (x 0,y0) on the line segments of the point (x 3,y3) and the point (x 4,y4) as (x 0,y34); The value of y 12 can be obtained through a linear equation, namely the value of y 34 can be obtained through a linear equation by y12=(x2-x0)/(x2-x1)×y1+(x0-x1)/(x2-x1)×y2;, i.e. y34=(x4-x0)/(x4-x3)×y3+(x0-x3)/(x4-x3)×y4; projects the x-direction coordinate offset OffsetX 12 of point (x 0,y12) on the line segment formed by points (x 1,y1) and (x 2,y2), The calculated x-direction coordinate offset of OffsetX12=(x2-x0)/(x2-x1)×OffsetX1+(x0-x1)/(x2-x1)×OffsetX2; projected point (x 0,y34) on the line segment formed by points (x 3,y3) and (x 4,y4) is OffsetX 34, Then OffsetX34=(x4-x0)/(x4-x3)×OffsetX3+(x0-x3)/(x4-x3)×OffsetX4; is calculated, and finally the coordinate offset of the point to be corrected (x 0,y0) in the x direction is OffsetX through interpolation calculation, The calculated coordinate offset of OffsetX=(y34-y0)/(y34-y12)×OffsetX12+(y0-y12)/(y34-y12)×OffsetX34; projected point (x 0,y12) in the y direction on the line segment formed by points (x 1,y1) and (x 2,y2) is OffsetY12=(x2-x0)/(x2-x1)×OffsetY1+(x0-x1)/(x2-x1)×OffsetY2;, the calculated coordinate offset of projected point (x 0,y34) in the y direction on the line segment formed by points (x 3,y3) and (x 4,y4) is OffsetY34=(x4-x0)/(x4-x3)×OffsetY3+(x0-x3)/(x4-x3)×OffsetY4;, and finally the coordinate offset of the point (x 0,y0) to be corrected in the y direction is obtained by interpolation calculation OffsetY=(y34-y0)/(y34-y12)×OffsetY12+(y0-y12)/(y34-y12)×OffsetY34.
2. A method for correcting the position of a detection area of a display screen according to claim 1, wherein:
The method for adjusting the image position of the detection area in real time according to the corrected offset comprises the following steps:
If the coordinates of the point image to be corrected are (x 0,y0) and the coordinates of the corrected point position are (x 0+OffsetX,y0 + OffsetY) when the small area is detected, the same correction offset is adopted for the image correction of the small area, and OffsetX and OffsetY are added to the initial coordinate position of the small area, namely the new image detection position of the small area after correction.
3. A system for display screen detection area position correction using the method of claim 1 or 2, comprising:
the out-of-plane feature point position module is used for acquiring the positions of the feature points;
the characteristic point position offset calculating module is used for calculating the characteristic point position offset in advance;
The offset module is used for calculating the offset of the position of the point to be corrected;
and the real-time detection area image position adjustment module is used for adjusting the detection area image position.
4. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the memory, the processor executing the program to implement the method of display screen detection area position correction of claim 1 or 2.
5. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the program is executed by a processor to implement the method of display screen detection area position correction as claimed in claim 1 or 2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311659634.3A CN117392225B (en) | 2023-12-06 | 2023-12-06 | Method and system for correcting position of detection area of display screen |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311659634.3A CN117392225B (en) | 2023-12-06 | 2023-12-06 | Method and system for correcting position of detection area of display screen |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117392225A CN117392225A (en) | 2024-01-12 |
CN117392225B true CN117392225B (en) | 2024-07-23 |
Family
ID=89463339
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311659634.3A Active CN117392225B (en) | 2023-12-06 | 2023-12-06 | Method and system for correcting position of detection area of display screen |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117392225B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116051551A (en) * | 2023-03-29 | 2023-05-02 | 深圳市康凌源科技有限公司 | Display screen defect detection method and related device based on image processing |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5809575B2 (en) * | 2012-01-31 | 2015-11-11 | 株式会社日立ハイテクノロジーズ | Image processing apparatus and method, distortion correction map creating apparatus and method, and semiconductor measurement apparatus |
RU2691195C1 (en) * | 2015-09-11 | 2019-06-11 | Айверифай Инк. | Image and attribute quality, image enhancement and identification of features for identification by vessels and individuals, and combining information on eye vessels with information on faces and/or parts of faces for biometric systems |
JP2019092089A (en) * | 2017-11-16 | 2019-06-13 | キヤノン株式会社 | Image processing apparatus, image display system, image processing method, and program |
CN113838137A (en) * | 2021-11-24 | 2021-12-24 | 中导光电设备股份有限公司 | Method and system for acquiring correction mark position based on TFT-LCD |
-
2023
- 2023-12-06 CN CN202311659634.3A patent/CN117392225B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116051551A (en) * | 2023-03-29 | 2023-05-02 | 深圳市康凌源科技有限公司 | Display screen defect detection method and related device based on image processing |
Also Published As
Publication number | Publication date |
---|---|
CN117392225A (en) | 2024-01-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3096286A1 (en) | Image processing apparatus, image processing method, and computer program product | |
US10102631B2 (en) | Edge detection bias correction value calculation method, edge detection bias correction method, and edge detection bias correcting program | |
CN113822883B (en) | Wafer alignment method and system based on searching of straight edge of wafer | |
CN108429908B (en) | Camera module testing method, device, equipment and medium | |
CN113808108B (en) | Visual detection method and system for defects of printing film | |
CN106570907B (en) | Camera calibration method and device | |
CN111263142A (en) | Method, device, equipment and medium for testing optical anti-shake of camera module | |
CN104517109A (en) | QR code image correction method and system | |
CN112308934B (en) | Calibration detection method and device, storage medium and computing equipment | |
CN112556994A (en) | Optical information detection method, device and equipment | |
CN116012242A (en) | Camera distortion correction effect evaluation method, device, medium and equipment | |
CN117392225B (en) | Method and system for correcting position of detection area of display screen | |
CN112784633A (en) | Method and device for processing lane boundary, electronic equipment and storage medium | |
CN115482267A (en) | Circle center positioning method, device, equipment and medium based on circular object | |
CN117191805B (en) | Automatic focusing method and system for AOI (automatic optical inspection) detection head | |
CN118169911B (en) | TFT short line detection method and system | |
CN116634134B (en) | Imaging system calibration method and device, storage medium and electronic equipment | |
CN115115687B (en) | Lane line measuring method and device | |
CN113808136B (en) | Liquid crystal screen defect detection method and system based on nearest neighbor algorithm | |
CN117406563B (en) | Method for detecting position offset of alignment mark and method for processing semiconductor | |
CN113658268B (en) | Verification method and device for camera calibration result, electronic equipment and storage medium | |
CN113612990B (en) | Analytical force test method, device, equipment and medium of camera module | |
CN116205988A (en) | Coordinate processing method, coordinate processing device, computer equipment and computer readable storage medium | |
CN117807256A (en) | Construction method of precision template local graph database, and acquisition method and device of precision template image corresponding to image to be detected | |
CN115578407A (en) | Checkerboard angular point detection method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |