Light guide plate dot density detection method, system and device and storage medium

Through the processing method based on the binarization diagram of the light guide plate, the dot density of the light guide plate is calculated, and the problem that the edge defective points are not analyzed is solved, and the calculation accuracy is improved.

CN120411097AActive Publication Date: 2025-08-01TWL OPTRONICS SUZHOU

Patent Information

Application Number
CN202510907956.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-08-01
Estimated Expiration
2045-07-02

AI Technical Summary

Technical Problem

The existing light guide plate dot density detection technology fails to effectively analyze and calculate edge defective outlets, resulting in errors in dot density calculation.

Method used

By obtaining the standard dot area and dot area range based on the historical light guide plate binarization diagram, combining with the detection of the light guide plate binarization diagram, the normal fit area and the detection of the defective fit area are calculated, and the dot density of the light guide plate is then calculated.

Benefits of technology

It improves the accuracy of the dot density calculation of light guide plates, can effectively analyze and calculate edge defective points, and reduce errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120411097A_ABST
    Figure CN120411097A_ABST
Patent Text Reader

Abstract

The invention discloses a light guide plate dot density detection method, system and device and a storage medium, and relates to the technical field of light guide plate dot density detection, and the method comprises the following steps: converting a historical light guide plate image into a historical light guide plate binary image based on a graying processing method and a binary processing method; obtaining a standard dot area and a dot area range based on the historical light guide plate binary image; obtaining a detection normal fitting area and a detection incomplete fitting area based on the standard dot area, the dot area range and the detection light guide plate binary image; calculating and obtaining the dot density of the detection light guide plate based on the detection normal fitting area and the detection incomplete fitting area; the method is used for solving the problem that errors are generated in dot density calculation due to the fact that edge incomplete dots are not analyzed and calculated in an existing light guide plate dot density calculation technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of light guide plate dot density detection, and specifically provides a method, system, device and storage medium for detecting the dot density of a light guide plate. Background Art

[0002] The working principle of a light guide plate is to use the side as the incident surface of an LED light source, and set dots on the bottom surface of the light guide plate. After the light enters these dots, it is reflected upward to the upper surface, thereby converting the point light source into a surface light source. The dot density of the light guide plate reflects the quality of the light guide plate, so it is necessary to detect the dot density of the light guide plate.

[0003] In the existing light guide plate dot density detection technology, the number and area of dots are directly obtained for calculation. However, in actual operation, only half of the edge light guide dots will appear on the light guide plate itself, and incomplete light guide dots will also appear when obtaining a partial image of the light guide plate. Calculating the incomplete light guide dots as one light guide dot will cause errors. For example, in the patent application with the publication number CN112666162A, a light guide plate dot density detection device and its detection method are disclosed. This solution does not analyze and calculate the edge incomplete dots, resulting in certain errors in the dot density calculation. In the existing light guide plate dot density calculation technology, the edge incomplete dots are not analyzed and calculated, resulting in errors in the dot density calculation. Summary of the Invention

[0004] The present invention aims to solve at least one of the technical problems in the existing technology to some extent. Based on the binary image of the historical light guide plate, the standard dot area and the dot area range are obtained. Based on the standard dot area, the dot area range, and the binary image of the detected light guide plate, the detected normal fitting area and the detected incomplete fitting area are obtained. Based on the detected normal fitting area and the detected incomplete fitting area, the dot density of the detected light guide plate is calculated to solve the problem that in the existing light guide plate dot density calculation technology, the edge incomplete dots are not analyzed and calculated, resulting in errors in the dot density calculation.

[0005] To achieve the above object, in a first aspect, the present application provides a method for detecting the dot density of a light guide plate, including the following steps: Obtain a first number of historical light guide plate light transmission images, and label them as historical light guide plate images; Convert the historical light guide plate images into historical light guide plate binary images based on the grayscale processing method and the binary processing method; Obtain the standard dot area and the dot area range based on the historical light guide plate binary images; Obtain the light guide plate light transmission image to be detected, and label it as the detected light guide plate image; Convert the detected light guide plate image into a detected light guide plate binary image based on the grayscale processing method and the binary processing method; Obtain the detected normal fitting area and the detected defective fitting area based on the standard dot area, the dot area range, and the detected binary image of the light guide plate; Calculate the dot density of the detected light guide plate based on the detected normal fitting area and the detected defective fitting area.

[0006] Furthermore, the grayscale processing method includes: Obtain the RGB values of each pixel point in the historical light guide plate image, and mark them as historical RGB values; Convert the historical RGB values into grayscale values using the weighted average method, and mark them as historical grayscale values; Mark the historical light guide plate image in which all historical RGB values are converted into historical grayscale values as the historical light guide plate grayscale image.

[0007] Furthermore, the binary processing method includes: Obtain the historical grayscale value range; Evenly divide the historical grayscale value range into n equal ranges, and mark them as historical divided ranges; Count the frequency of each historical divided range, and mark it as the divided range frequency; Taking the historical grayscale value as the X-axis, the divided range frequency as the Y-axis, and the historical divided range as the histogram interval, draw a histogram, and mark it as the historical grayscale value histogram; In the historical grayscale value histogram, mark the historical divided ranges that are greater than the divided frequencies on both the left and right sides as the peak ranges; Starting from the leftmost side of the historical grayscale value histogram and moving to the right, obtain the first peak range, and mark it as the first peak range; Starting from the rightmost side of the historical grayscale value histogram and moving to the left, obtain the first peak range, and mark it as the second peak range; Obtain the historical divided range with the smallest divided range frequency among the first peak range and the second peak range, and mark it as the binary threshold range; Obtain the middle value of the binary threshold range, and mark it as the binary threshold; Set the grayscale values greater than or equal to the segmentation threshold to 255, and set the grayscale values less than the segmentation threshold to 0 to obtain the historical light guide plate binary image.

[0008] Furthermore, obtaining the standard dot area and the dot area range based on the historical light guide plate binary image includes the following sub-steps: Form a coherent area with the pixel points with a grayscale value of 0 in the historical light guide plate value image, and mark it as the dot area; Establish a plane rectangular coordinate system, and mark it as the dot area coordinate system; Place each dot area separately in the dot area coordinate system; Obtain any coordinate point on the outline of the dot area and mark it as the starting coordinate point; Starting from the starting coordinate point, obtain a coordinate point at intervals of the first path distance along one direction of the outline of the dot area and mark it as A i ; where the size of i represents the order of obtaining the coordinate points; Obtain A i to A i+1 vector of, and mark it as ; Obtain A i+1 to A i+2 vector of, and mark it as ; Calculate length of is: ; where X i , X i+1 and X i+2 are the abscissas of A i , A i+1 and A i+2 respectively; Y i , Y i+1 and Y i+2 are the ordinates of A i , A i+1 and A i+2 respectively; Calculate length of is: ; where is the length of ; Calculate the product of and is: ; Calculate the included angle between and is: ; where θ is the included angle between and ; Judge whether θ is greater than the surface angle threshold. If it is greater, mark Ai+1 as a surface contour point; if it is less, mark Ai+1 as a tangent contour point.

[0009] Furthermore, obtaining the standard dot area and dot area range based on the historical light guide plate binarization map includes the following sub-steps: Obtain all surface contour points, and only retain the surface contour points in the dot area coordinate system, marked as the contour scatter plot; Preset the overall contour fitting equation as: H1 2 +Z1 2+n1*H1 + n2*Z1 + n2 = 0; where H1 is the abscissa data, Z1 is the ordinate data, and n1, n2, and n3 are the parameters of the overall contour fitting equation; The contour scatter plot is fitted with a preset overall contour fitting equation to obtain the overall contour fitting equation; The fitted grid area is obtained as: ; where Mn is the fitted grid area; Calculate the fitted grid areas of all grid regions; Obtain the range of the fitted grid areas; Evenly divide the range of the fitted grid areas into d intervals, marked as area intervals; count the frequency of the fitted grid areas in each area interval, marked as the grid area frequency; Using the fitted grid area as the X-axis, the grid area frequency as the Y-axis, and the area interval as the histogram interval, draw the area frequency histogram; Judge whether the grid area frequencies in the leftmost and rightmost area intervals of the area frequency histogram are less than the smaller area frequency threshold. If so, delete the grid area frequencies less than the smaller area frequency threshold in the area frequency histogram, and continue to judge whether the grid area frequencies in the leftmost and rightmost area intervals of the deleted area frequency histogram are less than the smaller area frequency threshold until it is not contained, then stop the judgment; if not, stop the judgment; mark the area frequency histogram after stopping the judgment as the screened area histogram; Obtain the maximum and minimum values of the area intervals in the screened area histogram, marked as the minimum area threshold and the maximum area threshold respectively; Mark the range from the minimum area threshold to the maximum area threshold as the grid area range; Obtain the mean value of the fitted grid areas within the grid area range, marked as the standard grid area.

[0010] Further, obtaining the detected normal fitting area and the detected defective fitting area based on the standard grid area, the grid area range, and the binary image of the detected light guide plate includes the following sub-steps: Obtain the binary image of the detected light guide plate; Obtain the grid region of the binary image of the detected light guide plate, marked as the detected grid region; Mark the tangent contour points and the curved surface contour points of the detected grid region as the detected tangent points and the detected curved surface points respectively; Judge whether the detected grid region contains detected tangent points. If not, obtain the fitted grid area of the detected grid region and mark it as the detected normal fitting area; If so, obtain the two detected tangent points farthest apart on the detected grid region, marked as the circular tangent points; Obtain the overall contour fitting equation of the detected grid region and mark it as the detected fitting equation; Among them, the detection fitting equation is: H2 2 +Z2 2 +n4*H2 + n5*Z2 + n6 = 0; where H2 is the abscissa data, Z2 is the ordinate data, and n4, n5, and n6 are the parameters of the overall contour fitting equation; Connect the fitting center point and the tangent points of the two circles respectively to obtain line segments, marked as connecting line segments; among them, the fitting center point is: (-n3 / 2, -n4 / 2); where n3 and n4 are the parameters of the detection fitting equation; The included angle formed by the two connecting line segments is marked as β, and β satisfies the orientation of the curved surface contour points; Calculate the detected defective fitting area as: ; where Mc is the detected defective fitting area.

[0011] Furthermore, calculating the dot density of the detected light guide plate based on the detected normal fitting area and the detected defective fitting area includes the following sub-steps: Count the number of detected normal fitting areas within the dot area, marked as the normal number; Obtain the sum of all detected defective fitting areas, divide the sum of all detected defective fitting areas by the standard dot area, and mark it as the defective number; Obtain the actual light guide plate area in the detected light guide plate image; Calculate the dot density of the detected light guide plate as: Dm = (Gz + Gc) / Sj; where Dm is the dot density of the detected light guide plate, Gz is the normal number, Gc is the defective number, and Sj is the actual light guide plate area in the detected light guide plate image.

[0012] In a second aspect, the present application provides a light guide plate dot density detection system, including a historical image acquisition module, a historical image processing module, a dot parameter acquisition module, a detection image acquisition module, a detection image processing module, a detection dot analysis module, and a dot density calculation module; The historical image acquisition module is used to acquire a first number of historical light guide plate light transmission images, marked as historical light guide plate images; The historical image processing module is used to convert the historical light guide plate image into a historical light guide plate binary image based on the grayscale processing method and the binarization processing method; The dot parameter acquisition module is used to obtain the standard dot area and the dot area range based on the historical light guide plate binary image; The detection image acquisition module is used to acquire the light guide plate light transmission image to be detected, marked as the detection light guide plate image; The detection image processing module is used to convert the detection light guide plate image into a detection light guide plate binary image based on the grayscale processing method and the binarization processing method; The detection dot analysis module is used to obtain the detected normal fitting area and the detected defective fitting area based on the standard dot area, the dot area range, and the detected binarized light guide plate image; The dot density calculation module is used to calculate the dot density of the detected light guide plate based on the detected normal fitting area, the detected defective fitting area, and the standard dot area.

[0013] In a third aspect, the present application provides an electronic device, including a processor and a memory. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the above method are run.

[0014] In a fourth aspect, the present application provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method are run.

[0015] Advantages of the present invention: By obtaining the standard dot area and the dot area range based on the historical binarized light guide plate image, and obtaining the detected normal fitting area and the detected defective fitting area based on the standard dot area, the dot area range, and the detected binarized light guide plate image, and calculating the dot density of the detected light guide plate based on the detected normal fitting area and the detected defective fitting area, the advantage is that it can analyze and calculate the defective dots at the edge of the light guide plate, increasing the accuracy of dot density calculation; By obtaining the standard dot area and the dot area range based on the historical binarized light guide plate image, the advantage of the present invention is that the dots of the existing light guide plate are approximately circular. Regarding the dot as a circle can quickly calculate the area of a dot, and at the same time can better analyze the defective dots. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a flowchart of the steps of the method of the present invention; Figure 2 is a schematic diagram of the historical gray histogram of the present invention; Figure 3 is a schematic diagram of the dot area coordinate system of the present invention; Figure 4 is a schematic diagram of the contour scatter plot of the present invention; Figure 5 is a schematic diagram of the area frequency histogram of the present invention; Figure 6 is a schematic diagram of the screened area histogram of the present invention; Figure 7 is a schematic diagram of β of the present invention; Figure 8 is a schematic block diagram of the system of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0017] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0018] Embodiment 1. Please refer to Figure 8 As shown in the figure, the present application provides a light guide plate dot density detection system, including a historical image acquisition module, a historical image processing module, a dot parameter acquisition module, a detection image acquisition module, a detection image processing module, a detection dot analysis module, and a dot density calculation module; The historical image acquisition module is used to acquire the first number of historical light guide plate light transmission images, marked as historical light guide plate images; when acquiring images, the background is usually set to black to facilitate the acquisition and processing of dots; The historical image processing module is used to convert the historical light guide plate image into a historical light guide plate binary image based on the grayscale processing method and the binary processing method; The historical image processing module is configured with a grayscale strategy, and the grayscale strategy includes: Obtain the RGB value of each pixel point in the historical light guide plate image, marked as historical RGB value; Convert the historical RGB value into a grayscale value using the weighted average method, marked as historical grayscale value; since the acquired images are usually only black and white, the weighted average method is suitable; Mark the historical light guide plate image in which all historical RGB values are converted into historical grayscale values as the historical light guide plate grayscale image.

[0019] The historical image processing module is configured with a binary strategy, and the binary strategy includes: Obtain the historical grayscale value range; Average the historical grayscale value range into n equal ranges, marked as historical division ranges; Count the frequency of each historical division range, marked as division range frequency; Taking the historical grayscale value as the X-axis, the division range frequency as the Y-axis, and the historical division range as the histogram interval, draw a histogram, marked as the historical grayscale value histogram; In the historical grayscale value histogram, mark the historical division ranges greater than the division frequencies on both the left and right sides as the peak ranges; Starting from the leftmost side of the historical grayscale value histogram and moving to the right, obtain the first peak range, marked as the first peak range; Starting from the rightmost side of the historical grayscale value histogram and moving to the left, obtain the first peak range, marked as the second peak range; Obtain the historical division range with the smallest frequency of divided ranges in the first peak range and the second peak range, and mark it as the binarization threshold range; Obtain the middle value of the binarization threshold range and mark it as the binarization threshold; Set the gray values greater than or equal to the segmentation threshold to 255, and set the gray values less than the segmentation threshold to 0 to obtain the historical light guide plate binarization map; In practical applications, please refer to Figure 2 As shown, the binarization threshold is 111. Set the gray values greater than or equal to 111 to 255, and set the gray values less than 111 to 0 to obtain the historical light guide plate binarization map; The dot parameter acquisition module is used to obtain the standard dot area and dot area range based on the historical light guide plate binarization map; The dot parameter acquisition module is configured with an included angle calculation strategy, and the included angle calculation strategy includes: Form a continuous area with the pixel points with gray value 0 in the historical light guide plate value map and mark it as the dot area; Establish a plane rectangular coordinate system and mark it as the dot area coordinate system; Place each dot area separately in the dot area coordinate system; Obtain any coordinate point on the contour of the dot area and mark it as the starting coordinate point; Starting from the starting coordinate point, obtain a coordinate point every first path distance along one direction of the contour of the dot area and mark it as A i ; where the size of i represents the order of obtaining the coordinate points; Obtain A i to A i+1 vector and mark it as ; obtain A i+1 to A i+2 vector and mark it as ; Calculate the length of as: ; where X i 、X i+1 and X i+2 are the abscissas of A i 、A i+1 and A i+2 respectively; Y i 、Y)] i+1 and Y i+2 are the ordinates of A i 、A i+1 and A i+2 respectively; <( Calculate the length of as: ; where The length of; Calculate and The product is: ; Calculate and The included angle between is: ; where θ is and The included angle between; Judge whether θ is greater than the surface included angle threshold. If it is greater, mark Ai+1 as a surface contour point; if it is less, mark Ai+1 as a tangent contour point; the setting of the included angle threshold is to distinguish the tangent and the curve. The tangent is a straight line and the included angle is usually 0°. Therefore, the included angle threshold is usually set to 0°; In practical applications, please refer to Figure 3 as shown, A i , A i+1 and A i+2 are respectively (11.6, 11.5), (12.1, 10.5), (12.7, 9.5). Substitute into the calculation The length formula of, calculate The length of is 1.118. Substitute into the calculation The length formula of, calculate The length of is 1.166. Substitute into the calculation and The product formula, calculate and The product is 1.300. Substitute into the calculation and The included angle formula between, calculate θ to be 4.244°. The above calculation results are reserved to three decimal places. The included angle threshold is set to 0°. 4.244° is greater than 0°. Mark A i+1 as a surface contour point.

[0020] The dot parameter acquisition module is configured with a standard dot area calculation strategy, and the standard dot area calculation strategy includes: Obtain all surface contour points. In the dot area coordinate system, only retain the surface contour points and mark them as a contour scatter plot; Preset the overall contour fitting equation as: H1 2 +Z1 2 +n1*H1 + n2*Z1 + n2 = 0; where H1 is the abscissa data, Z1 is the ordinate data, and n1, n2, and n3 are the parameters of the overall contour fitting equation; Fit the contour scatter plot with the preset overall contour fitting equation to obtain the overall contour fitting equation; The fitted grid area is obtained as follows: ; where Mn is the fitted grid area; In practical applications, please refer to Figure 4 As shown, the contour scatter plot is fitted with a preset overall contour fitting equation, and the obtained overall contour fitting equation is: H2 + Z2 - 18.4*H - 16.4*Z + 135.88 = 0, where n1, n2, and n3 are -18.4, -16.4, and 135.88 respectively. Substituting into the formula for obtaining the fitted grid area, the fitted grid area is: 50.265 mm 2 , and the above calculation results are reserved to three decimal places; Calculate the fitted grid areas of all grid regions; Obtain the range of the fitted grid areas; Evenly divide the range of the fitted grid areas into d intervals, marked as area intervals; count the frequencies of the fitted grid areas in each area interval, marked as grid area frequencies; Taking the fitted grid area as the X-axis, the grid area frequency as the Y-axis, and the area interval as the histogram interval, draw an area frequency histogram; Judge whether the grid area frequencies in the leftmost and rightmost area intervals of the area frequency histogram are less than the smaller area frequency threshold. If so, delete the grid area frequencies less than the smaller area frequency threshold in the area frequency histogram, and continue to judge whether the grid area frequencies in the leftmost and rightmost area intervals of the deleted area frequency histogram are less than the smaller area frequency threshold until there is no such situation, then stop the judgment; if not, stop the judgment; mark the area frequency histogram after stopping the judgment as the screened area histogram; mark the area intervals with grid area frequencies less than the smaller area frequency threshold as the intervals to be deleted; the setting of the smaller area frequency threshold is to screen out the regions with smaller grid area frequencies; for example, set it to 1% or 2% of all grid area frequencies; Obtain the maximum and minimum values of the area intervals in the screened area histogram, marked as the minimum area threshold and the maximum area threshold respectively; Mark the range from the minimum area threshold to the maximum area threshold as the grid area range; Calculate the mean value of the fitted grid areas within the grid area range, marked as the standard grid area; In practical applications, please refer to Figure 5 and Figure 6 As shown, if all grid area frequencies are 115,000, 1% of 115,000 is 1,150, then the smaller area frequency threshold is 1,150, and the intervals to be deleted are from 4 mm 2 to 5 mm 2 between and 7 mm 2 to 8 mm 2Between them, the minimum area threshold and the maximum area threshold are 5mm 2 and 7mm 2 , and the mean value of the fitted dot areas between 5mm 2 and 7mm 2 is calculated to be 6.12mm 2 , and the standard dot area is 6.12mm 2 . The calculation result is reserved to two decimal places.

[0021] The detection image acquisition module is used to acquire the light guide plate light transmission image to be detected, marked as the detection light guide plate image; The detection image processing module is used to convert the detection light guide plate image into a detection light guide plate binary image based on the grayscale processing method and the binaryzation processing method; The detection dot analysis module is used to obtain the detection normal fitting area and the detection incomplete fitting area based on the standard dot area, the dot area range, and the detection light guide plate binary image; The detection dot analysis module is configured with a fitting area strategy, and the fitting area strategy includes: Obtain the detection light guide plate binary image; Obtain the dot area of the detection light guide plate binary image, marked as the detection dot area; Mark the tangent contour points and the curved surface contour points of the detection dot area as the detection tangent points and the detection curved surface points respectively; Judge whether the detection dot area contains detection tangent points. If not, obtain the fitted dot area of the detection dot area and mark it as the detection normal fitting area; If it contains, obtain the two detection tangent points farthest apart on the detection dot area and mark them as the circle tangent points; Obtain the overall contour fitting equation of the detection dot area and mark it as the detection fitting equation; Among them, the detection fitting equation is: H2 2 +Z2 2 +n4*H2 + n5*Z2 + n6 = 0; where H2 is the abscissa data, Z2 is the ordinate data, and n4, n5, and n6 are the parameters of the overall contour fitting equation; Connect the fitting center point with the two circle tangent points respectively to obtain line segments, marked as the connection line segments; where the fitting center point is: (-n3 / 2, -n4 / 2); where n3 and n4 are the parameters of the detection fitting equation; The included angle formed by the two connection line segments is marked as β, and β satisfies facing the curved surface contour points; Calculate the detection incomplete fitting area as: ; where Mc is the detection incomplete fitting area; In practical applications, please refer to Figure 7As shown in the figure, taking a detection dot area as an example, if the detection fitting equation is: H2 2 +Z2 2 -17.2*H2 - 16.2*Z2 + 136 = 0, then n4, n5 and n6 are -17.2, -16.2 and 136 respectively. When calculating here, it should be noted that β needs to be converted to radians, β = 210° = 7*Π / 6. Then substitute all data into the detection incomplete fitting area formula, Mc = 5.65mm 2 , and round the calculation result to two decimal places; The dot density calculation module is used to calculate the dot density of the detected light guide plate based on the detected normal fitting area, the detected incomplete fitting area and the standard dot area; The dot density calculation module is configured with a dot density calculation strategy, and the dot density calculation strategy includes: Count the number of detected normal fitting areas within the dot area range, and mark it as the normal number; Obtain the sum of all detected incomplete fitting areas, divide the sum of all detected incomplete fitting areas by the standard dot area, and mark it as the incomplete number; Obtain the actual light guide plate area in the detected light guide plate diagram; The dot density of the detected light guide plate is obtained as: Dm = (Gz + Gc) / Sj; where Dm is the dot density of the detected light guide plate, Gz is the normal number, Gc is the incomplete number, and Sj is the actual light guide plate area in the detected light guide plate diagram; In practical applications, such as the normal number is 32, the sum of all detected incomplete fitting areas is 30.62mm 2 This , the incomplete number is 30.62 / 6.21 = 4.93, and the actual light guide plate area in the detected light guide plate diagram is: 676mm 2 , and obtain Dm = 5.46 dots / cm 2 , and round the calculation result to two decimal places; Obtain the sum of all detected incomplete fitting areas, divide the sum of all detected incomplete fitting areas by the standard dot area, and mark it as the incomplete number; Obtain the actual light guide plate area in the detected light guide plate diagram.

[0022] Example 2, please refer to Figure 1 As shown in the figure, the present application provides a method for detecting the dot density of a light guide plate, including the following steps: Step S1, obtain a first quantity of historical light guide plate light transmission diagrams, and mark them as historical light guide plate diagrams; Step S2, convert the historical light guide plate diagram into a historical light guide plate binary diagram based on the grayscale processing method and the binarization processing method. Step S2 includes the following sub-steps: Step S201, obtain the RGB value of each pixel point in the historical light guide plate diagram, and mark it as the historical RGB value; Step S202: Convert the historical RGB values into grayscale values using the weighted average method, and mark them as historical grayscale values; Step S203: Mark the historical light guide plate image obtained by converting all historical RGB values into historical grayscale values as the historical light guide plate grayscale image.

[0023] Step S204: Obtain the historical grayscale value range; Step S205: Evenly divide the historical grayscale value range into n equal ranges, and mark them as historical division ranges; Step S206: Count the frequency of each historical division range, and mark it as the division range frequency; Step S207: Draw a histogram with the historical grayscale value as the X-axis, the division range frequency as the Y-axis, and the historical division range as the histogram interval, and mark it as the historical grayscale value histogram; Step S208: In the historical grayscale value histogram, mark the historical division ranges with division frequencies greater than those on the left and right sides as peak ranges; Step S209: Starting from the leftmost side of the historical grayscale value histogram, obtain the first peak range moving to the right, and mark it as the first peak range; Step S210: Starting from the rightmost side of the historical grayscale value histogram, obtain the first peak range moving to the left, and mark it as the second peak range; Step S211: Obtain the historical division range with the smallest division range frequency among the first peak range and the second peak range, and mark it as the binarization threshold range; Step S212: Obtain the middle value of the binarization threshold range, and mark it as the binarization threshold; Step S213: Set the grayscale values greater than or equal to the segmentation threshold to 255, and set the grayscale values less than the segmentation threshold to 0 to obtain the historical light guide plate binarization image.

[0024] Step S3: Obtain the standard dot area and the dot area range based on the historical light guide plate binarization image. Step S3 includes the following sub-steps: Step S301: Form a continuous area with the pixel points with grayscale value 0 in the historical light guide plate value map, and mark it as the dot area; Step S302: Establish a plane rectangular coordinate system, and mark it as the dot area coordinate system; Step S302: Place each dot area separately in the dot area coordinate system; Step S303: Obtain any coordinate point on the contour of the dot area, and mark it as the starting coordinate point; Step S304: Starting from the starting coordinate point, obtain a coordinate point every first path distance along one direction of the contour of the dot area, and mark it as A i; where the size of i represents the order of obtaining coordinate points; Step S305, obtain the vector from A i to A i+1 , and mark it as ; obtain the vector from A i+1 to A i+2 , and mark it as ; Step S306, calculate the lengths of and are: ; where X i , X i+1 and X i+2 are the abscissas of A i , A i+1 and A i+2 respectively; Y i , Y i+1 and Y i+2 are the ordinates of A i , A i+1 and A i+2 respectively; Step S307, calculate the length of as: ; where is the length of ; Step S308, calculate the product of and as: ; Step S309, calculate the angle between and as: ; where θ is the angle between and ; Step S310, determine whether θ is greater than the surface angle threshold. If it is greater, mark A i+1 as a surface contour point; if it is less, mark A i+1 as a tangent contour point; Step S311, obtain all surface contour points, and only retain the surface contour points in the grid area coordinate system, marked as a contour scatter plot; Step S312, preset the overall contour fitting equation as: H1 2 +Z1 2 +n1*H1+n2*Z1+n2 = 0; where H1 is the abscissa data, Z1 is the ordinate data, and n1, n2, and n3 are the parameters of the overall contour fitting equation; Step S313, fit the contour scatter plot with the preset overall contour fitting equation to obtain the overall contour fitting equation; Step S314, obtain the fitted dot area as: ; where Mn is the fitted dot area; Step S315, calculate the fitted dot areas of all dot regions; Step S316, obtain the range of the fitted dot area; Step S317, evenly divide the range of the fitted dot area into d intervals, marked as area intervals; count the frequency of the fitted dot area in each area interval, marked as the dot area frequency; Step S318, use the fitted dot area as the X-axis, the dot area frequency as the Y-axis, and the area interval as the histogram interval to draw the area frequency histogram; Step S319, determine whether the dot area frequencies in the leftmost and rightmost area intervals of the area frequency histogram are less than the smaller area frequency threshold. If so, delete the dot area frequencies less than the smaller area frequency threshold in the area frequency histogram, and continue to determine whether the dot area frequencies in the leftmost and rightmost area intervals of the deleted area frequency histogram are less than the smaller area frequency threshold until there is no such situation, then stop the determination; if not, stop the determination; mark the area frequency histogram after stopping the determination as the screened area histogram; Step S320, obtain the maximum and minimum values of the area intervals in the screened area histogram, marked as the minimum area threshold and the maximum area threshold respectively; Step S321, mark the range from the minimum area threshold to the maximum area threshold as the dot area range; Step S322, obtain the mean value of the fitted dot areas within the dot area range, marked as the standard dot area; Step S4, obtain the light guide plate light transmission image to be detected, marked as the detected light guide plate image; Step S5, convert the detected light guide plate image into a detected light guide plate binary image based on the grayscale processing method and the binary processing method; Step S6, obtain the detected normal fitted area and the detected defective fitted area based on the standard dot area, the dot area range, and the detected light guide plate binary image. Step S6 includes the following sub-steps: Step S601, obtain the detected light guide plate binary image; Step S602, obtain the dot region of the detected light guide plate binary image, marked as the detected dot region; Step S603, mark the tangent contour points and the curved surface contour points of the detected dot region as the detected tangent points and the detected curved surface points respectively; Step S604, determine whether the detected dot region contains detected tangent points. If not, obtain the fitted dot area of the detected dot region and mark it as the detected normal fitted area; Step S605, if any, obtain the two detection tangent points that are farthest apart on the detection network point area, and mark them as circle tangent points; obtain the overall contour fitting equation of the detection network point area and mark it as the detection fitting equation; where the detection fitting equation is: H2 2 +Z2 2 +n4*H2 + n5*Z2 + n6 = 0; where H2 is the abscissa data, Z2 is the ordinate data, and n4, n5, and n6 are the parameters of the overall contour fitting equation; connect the fitting center point with the two circle tangent points respectively to obtain line segments, and mark them as connection segments; where the fitting center line point is: (-n3 / 2, -n4 / 2); where n3 and n4 are the parameters of the detection fitting equation; the included angle formed by the two connection segments is marked as β, and β satisfies the orientation of the curved surface contour point; calculate the detected incomplete fitting area as: ; where Mc is the detected incomplete fitting area.

[0025] Step S7, calculate the dot density of the detected light guide plate based on the detected normal fitting area and the detected incomplete fitting area. Step S7 includes the following sub-steps: Step S701, count the number of detected normal fitting areas within the dot area, and mark it as the normal number; Step S702, obtain the sum of all detected incomplete fitting areas, divide the sum of all detected incomplete fitting areas by the standard dot area, and mark it as the incomplete number; Step S703, obtain the actual light guide plate area in the detected light guide plate diagram; Step S704, obtain the dot density of the detected light guide plate as: Dm = (Gz + Gc) / Sj; where Dm is the dot density of the detected light guide plate, Gz is the normal number, Gc is the incomplete number, and Sj is the actual light guide plate area in the detected light guide plate diagram.

[0026] Embodiment 3, the present application also provides an electronic device, which may include: a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus. The memory stores computer-readable instructions, and the processor can call the instructions in the memory. When the computer-readable instructions are executed by the processor, the steps in a method for detecting the dot density of a light guide plate are run to achieve the following functions: convert the historical light guide plate diagram into a historical light guide plate binary diagram based on the grayscale processing method and the binarization processing method, obtain the standard dot area and the dot area range based on the historical light guide plate binary diagram, obtain the detected normal fitting area and the detected incomplete fitting area based on the standard dot area, the dot area range, and the detected light guide plate binary diagram, and calculate the dot density of the detected light guide plate based on the detected normal fitting area and the detected incomplete fitting area.

[0027] In addition, when the logical instructions in the above-mentioned memory are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0028] Embodiment 4. This application also provides a computer program product. The computer program product includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a method for detecting the dot density of a light guide plate provided by the above-mentioned various methods. The method includes: converting a historical light guide plate image into a historical light guide plate binary image based on a grayscale processing method and a binarization processing method, obtaining a standard dot area and a dot area range based on the historical light guide plate binary image, obtaining a detected normal fitting area and a detected defective fitting area based on the standard dot area, the dot area range, and the detected light guide plate binary image, and calculating the dot density of the detected light guide plate based on the detected normal fitting area and the detected defective fitting area.

[0029] Embodiment 5. This application also provides a computer-readable storage medium. This application provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, it runs the steps in the above-mentioned method for detecting the dot density of a light guide plate to achieve the following functions: converting a historical light guide plate image into a historical light guide plate binary image based on a grayscale processing method and a binarization processing method, obtaining a standard dot area and a dot area range based on the historical light guide plate binary image, obtaining a detected normal fitting area and a detected defective fitting area based on the standard dot area, the dot area range, and the detected light guide plate binary image, and calculating the dot density of the detected light guide plate based on the detected normal fitting area and the detected defective fitting area.

[0030] Through the description of the above embodiments, the embodiments of the present invention can be provided as a method, a system or a computer program product. Based on such an understanding, the above technical solution, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0031] In the embodiments provided in the present application, it should be understood that the disclosed system or method can be implemented in other ways. The above-described embodiments are merely illustrative. For example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation. For another example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some communication interfaces. The indirect coupling or communication connection of the system, module and unit can be in an electrical, mechanical or other form.

[0032] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present application.

Claims

1. A method for detecting the dot density of a light guide plate, characterized in that, It includes the following steps: Obtain a first quantity of historical light guide plate light transmission images, marked as historical light guide plate images; Convert the historical light guide plate images into historical light guide plate binary images based on the grayscale processing method and the binaryzation processing method; Obtain the standard dot area and the dot area range based on the historical light guide plate binary images; Obtain the light guide plate light transmission image to be detected, marked as the detection light guide plate image; Convert the detection light guide plate image into a detection light guide plate binary image based on the grayscale processing method and the binaryzation processing method; Obtain the detection normal fitting area and the detection defective fitting area based on the standard dot area, the dot area range, and the detection light guide plate binary image; Calculate the dot density of the detection light guide plate based on the detection normal fitting area and the detection defective fitting area.

2. The method for detecting the dot density of a light guide plate according to claim 1, characterized in that, The grayscale processing method includes: Obtain the RGB values of each pixel point in the historical light guide plate image, marked as historical RGB values; Convert the historical RGB values into grayscale values using the weighted average method, marked as historical grayscale values; Mark the historical light guide plate image in which all historical RGB values are converted into historical grayscale values as the historical light guide plate grayscale image.

3. A method for detecting the dot density of a light guide plate according to claim 2, wherein The binaryzation processing method includes: Obtain the historical grayscale value range; Evenly divide the historical grayscale value range into n equal ranges, marked as historical division ranges; Count the frequency of each historical division range, marked as the division range frequency; Draw a histogram with the historical grayscale value as the X-axis, the division range frequency as the Y-axis, and the historical division range as the histogram interval, marked as the historical grayscale value histogram; In the historical grayscale value histogram, mark the historical division ranges greater than the division frequencies on both the left and right sides as the peak ranges; Starting from the leftmost side of the historical grayscale value histogram, obtain the first peak range moving to the right, marked as the first peak range; Starting from the rightmost side of the historical grayscale value histogram, obtain the first peak range moving to the left, marked as the second peak range; Obtain the historical division range with the smallest division range frequency among the first peak range and the second peak range, marked as the binaryzation threshold range; Obtain the middle value of the binaryzation threshold range, marked as the binaryzation threshold; Set the grayscale values greater than or equal to the segmentation threshold to 255, and set the grayscale values less than the segmentation threshold to 0 to obtain the historical light guide plate binary image.

4. A method for detecting the dot density of a light guide plate according to claim 3, characterized in that Obtaining the standard dot area and the dot area range based on the historical light guide plate binary image includes the following sub-steps: Form a continuous area with the pixel points with a grayscale value of 0 in the historical light guide plate value image, marked as the dot area; Establish a plane rectangular coordinate system, marked as the dot area coordinate system; Place each dot area separately in the dot area coordinate system; Obtain any coordinate point on the contour of the dot area, marked as the starting coordinate point; Starting from the starting coordinate point, obtain a coordinate point every first path distance in one direction along the contour of the grid area, and mark it as A i ; where the size of i represents the order of obtaining the coordinate points; Obtain A i To A i+1 The vector of, marked as ; Obtain A i+1 To A i+2 The vector of, marked as ; Calculation The length of: ; where X i , X i+1 and X i+2 are respectively the abscissas of A i , A i+1 and A i+2 ; Y i , Y i+1 and Y i+2 are respectively the ordinates of A i , A i+1 and A i+2 . Calculation The length of: ; wherein is the length of; Calculated and The product is: ; Calculation and The included angle between them is: ; where θ is the angle between and Judge whether θ is greater than the curved surface angle threshold. If it is greater, mark Ai+1 as the curved surface contour point; if it is less, mark Ai+1 as the tangent contour point.

5. The method for detecting the dot density of a light guide plate according to claim 4, wherein, Obtaining the standard dot area and the dot area range based on the historical light guide plate binary image includes the following sub-steps: Obtain all the curved surface contour points, and only retain the curved surface contour points in the dot area coordinate system, marked as the contour scatter plot; The preset overall contour fitting equation is: H1 2 +Z1 2 +n1*H1 + n2*Z1 + n2 = 0; where H1 is the abscissa data, Z1 is the ordinate data, and n1, n2, and n3 are the parameters of the overall contour fitting equation; Fit the contour scatter plot with a preset overall contour fitting equation to obtain the overall contour fitting equation; The fitting grid point area is obtained as follows: ; where Mn is the fitting grid point area; Calculate the fitting dot areas of all dot areas; Obtain the fitting dot area range; Evenly divide the fitting dot area range into d intervals, marked as area intervals; count the frequency of the fitting dot areas in each area interval, marked as dot area frequencies; Taking the fitting dot area as the X-axis, the dot area frequency as the Y-axis, and the area interval as the histogram interval, draw the area frequency histogram; Judge whether the dot area frequencies in the leftmost and rightmost area intervals of the area frequency histogram are less than the smaller area frequency threshold. If so, delete the dot area frequencies less than the smaller area frequency threshold in the area frequency histogram, and continue to judge whether the dot area frequencies in the leftmost and rightmost area intervals of the deleted area frequency histogram are less than the smaller area frequency threshold until it is not less than, then stop judging; if not, stop judging; mark the area frequency histogram after stopping judging as the screened area histogram; Obtain the maximum and minimum values of the area intervals in the screened area histogram, marked as the minimum area threshold and the maximum area threshold respectively; Mark the range from the minimum area threshold to the maximum area threshold as the dot area range; Calculate the mean value of the fitting dot areas within the dot area range, marked as the standard dot area.

6. The method for detecting the dot density of a light guide plate according to claim 5, wherein Based on the standard dot area, the dot area range, and the binary image of the detected light guide plate, obtaining the detected normal fitting area and the detected defective fitting area includes the following sub-steps: Obtain the binary image of the detected light guide plate; Obtain the dot area of the binary image of the detected light guide plate, marked as the detected dot area; Mark the tangent contour points and the curved surface contour points of the detected dot area as the detected tangent points and the detected curved surface points respectively; Judge whether the detected dot area contains detected tangent points. If not, obtain the fitting dot area of the detected dot area and mark it as the detected normal fitting area; If so, obtain the two detected tangent points farthest apart on the detected dot area, marked as the circular tangent points; Obtain the overall contour fitting equation of the detected dot area, marked as the detected fitting equation; Among them, the detection fitting equation is: H2 2 +Z2 2 +n4*H2 + n5*Z2 + n6 = 0; where H2 is the abscissa data, Z2 is the ordinate data, and n4, n5, and n6 are the parameters of the overall contour fitting equation; Connect the fitting center point with the two circular tangent points respectively to obtain line segments, marked as the connecting line segments; where the fitting center point is: (-n3 / 2, -n4 / 2); where n3 and n4 are the parameters of the detected fitting equation; The included angle formed by the two connecting line segments is marked as β, and β satisfies facing the curved surface contour points; Calculate the detected defective fitting area as: ; where Mc is the detected area of the incomplete fitting.

7. A method for detecting the dot density of a light guide plate according to claim 6, characterized in that, Based on the detected normal fitting area and the detected defective fitting area, calculating the dot density of the detected light guide plate includes the following sub-steps: Count the number of detected normal fitting areas within the dot area range, marked as the normal number; Calculate the sum of all detected defective fitting areas, divide the sum of all detected defective fitting areas by the standard dot area, and mark it as the defective number; Obtain the actual light guide plate area in the detected light guide plate image; Calculate the dot density of the detected light guide plate as: Dm = (Gz + Gc) / Sj; where Dm is the dot density of the detected light guide plate, Gz is the normal number, Gc is the defective number, and Sj is the actual light guide plate area in the detected light guide plate image.

8. A light guide plate dot density detection system for implementing a light guide plate dot density detection method according to any one of claims 1-7, characterized in that, It includes a historical image acquisition module, a historical image processing module, a dot parameter acquisition module, a detection image acquisition module, a detection image processing module, a detection dot analysis module, and a dot density calculation module; The historical image acquisition module is used to acquire a first quantity of historical light guide plate light transmission images, marked as historical light guide plate images; The historical image processing module is used to convert the historical light guide plate image into a historical light guide plate binary image based on a grayscale processing method and a binarization processing method; The dot parameter acquisition module is used to acquire a standard dot area and a dot area range based on the historical light guide plate binary image; The detection image acquisition module is used to acquire a light guide plate light transmission image to be detected, marked as a detection light guide plate image; The detection image processing module is used to convert the detection light guide plate image into a detection light guide plate binary image based on a grayscale processing method and a binarization processing method; The detection dot analysis module is used to acquire a detection normal fitting area and a detection defective fitting area based on the standard dot area, the dot area range, and the detection light guide plate binary image; The dot density calculation module is used to calculate the dot density of the detection light guide plate based on the detection normal fitting area, the detection defective fitting area, and the standard dot area.

9. An electronic device, characterized in that, It includes a processor and a memory, and the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the method according to any one of claims 1-7 are run.

10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps in the method according to any one of claims 1-7 are run.

Citation Information

Patent Citations

  • Light guide plate dot optimization design method

    CN107843950A

  • Light guide plate dot density detection equipment and detection method thereof

    CN112666162A

  • Screen point setting method based on side light type backlight module and related device

    CN113448083A

  • Light guide plate quality monitoring method and system based on image processing

    CN118279301A

  • Light conducting plate mesh points measuring method

    CN1525138A

Cited By

  • AOI detection system and detection method after hot pressing of light guide plate

    CN120807519A

  • AOI detection system and detection method in front of hot pressing line of light guide plate

    CN120894357A

  • Light guide plate coating alignment detection method, system and equipment

    CN120912608A

  • Light guide plate sampling inspection method, system and equipment based on machine vision and medium

    CN121120523A