Disclosure of Invention
The embodiment of the invention provides an optical detection device and a control method thereof, which can solve the problems of higher cost and larger occupied space of the optical detection device in the prior art.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
in one aspect, an embodiment of the present invention provides an optical detection apparatus, including: a base station; the clamping units are arranged on the base platform, each clamping unit can clamp one display device to be detected, and the clamping angle of each clamping unit can be adjusted; the image acquisition unit is arranged above the clamping unit and used for acquiring a gray image of the display device to be detected; the control unit is connected with the image acquisition unit and the plurality of clamping units, and is used for controlling the clamping angle of each clamping unit according to the gray level image acquired by the image acquisition unit.
Optionally, the clamping unit includes a clamp for clamping the display device to be detected, a first support rod for supporting a central region of the display device to be detected, and a plurality of second support rods for supporting an edge region of the display device to be detected; the first supporting rod and the second supporting rod are perpendicular to the upper surface of the base platform; the upper ends of the first supporting rod and the second supporting rod are respectively provided with a movably connected connecting piece, and the connecting pieces on the second supporting rod are connected with the clamp; the lower end of the second supporting rod is connected with the upper surface of the base station through a telescopic structure, and the telescopic structure can be stretched along the length direction of the second supporting rod so as to raise or lower the height of the second supporting rod; the control unit is used for controlling the telescopic height of each telescopic structure according to the gray level image acquired by the image acquisition unit so as to control the clamping angle of each clamp.
Optionally, the fixture is of a rectangular structure, the clamping unit includes two second support rods, and the two second support rods are respectively used for supporting the middle point positions of two adjacent sides of the fixture.
Optionally, the control unit is specifically configured to: obtaining the adjusting angle of the clamp according to a first formula; the first formula is: x ═ a-b) × δ - α + Δ W; wherein X is an adjusting angle, a and b are gray values at the midpoints of two opposite side edges in the gray image respectively, delta is a preset conversion coefficient, alpha is an included angle between a current plane of the clamp and a horizontal plane, and delta W is a preset compensation amount; and controlling the telescopic height of the corresponding telescopic structure according to the adjusting angle of the clamp.
Optionally, the distance from the center point of the clamp in the plurality of clamping units to the image acquisition unit is equal.
Optionally, the telescopic structure is a lifting motor.
Optionally, the connecting piece is a universal ball head connecting piece.
Optionally, the fixture is further provided with a backlight source for providing a lighting light source for the display device to be detected.
In another aspect, an embodiment of the present invention provides a control method for an optical detection apparatus described in any one of the above, where the control method includes: acquiring gray level images of a plurality of to-be-detected display devices on a plurality of clamping units; and controlling the clamping angle of each clamping unit according to the gray image.
Optionally, when the clipping units include the stretchable structure, the controlling the clipping angle of each clipping unit according to the grayscale image includes: and controlling the telescopic height of each telescopic structure according to the gray level image so as to control the clamping angle of each clamp.
The optical detection device and the control method thereof provided by the embodiment of the invention comprise a base station; the clamping units are arranged on the base platform, each clamping unit can clamp one display device to be detected, and the clamping angle of each clamping unit can be adjusted; the image acquisition unit is arranged above the clamping unit and is used for acquiring a gray image of the display device to be detected; the control unit is connected with the image acquisition unit and the plurality of clamping units and is used for controlling the clamping angle of each clamping unit according to the gray level image acquired by the image acquisition unit. Compared with the prior art, the optical detection device provided by the embodiment of the invention has the advantages that the clamping angle of each clamping unit is adjustable, before the optical detection is carried out, the control unit adjusts the clamping angle of the clamping unit corresponding to the display device to be detected according to the collected gray image of the display device to be detected, namely, one end of the clamping unit corresponding to the brighter side in the gray image is adjusted downwards by a certain angle, and one end of the clamping unit corresponding to the darker side in the gray image is adjusted upwards by a certain angle, so that the inclination angle of the display device to be detected clamped by the clamping unit is changed, therefore, when the actual optical detection is carried out, the difference of gray values of different areas in the gray image of the display device to be detected after imaging is reduced, and therefore, the defect analysis is facilitated. In the embodiment of the invention, the simultaneous and efficient optical detection of a plurality of display devices to be detected can be realized without arranging a plurality of image acquisition units, so that the cost of the optical detection device is reduced, and the occupied space of the optical detection device is reduced.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An embodiment of the present invention provides an optical detection apparatus, as shown in fig. 3 and 4, including: a base 11; the clamping units are arranged on the base platform 11, each clamping unit can clamp one display device to be detected, and the clamping angle of each clamping unit can be adjusted; the image acquisition unit is arranged above the clamping unit and used for acquiring a gray image of the display device to be detected; the control unit is connected with the image acquisition unit and the plurality of clamping units, and is used for controlling the clamping angle of each clamping unit according to the gray level image acquired by the image acquisition unit.
The Display device to be detected is a Display device to be detected, and may be an LCD (Liquid Crystal Display) or an OLED (Organic Light-Emitting Diode) Display device, and the like.
In practical applications, the image capturing unit is typically a CCD lens.
When the product is optically detected, the display device to be detected is generally placed on the clamping unit by utilizing the manipulator, so that the initial state of the clamping unit is generally in a horizontal state for the convenience of placement, namely the display device to be detected clamped by the clamping units is positioned on the same horizontal plane, and the image acquisition unit is positioned at a certain position above the display devices to be detected. After the image acquisition unit acquires the gray level images of the display devices to be detected, the control unit can adjust the corresponding clamping angle of the clamping unit according to the difference between the gray level values of different areas of each gray level image. Specifically, one end of the clamping unit corresponding to the brighter side in the gray image may be adjusted downward by a certain angle, and one end of the clamping unit corresponding to the darker side in the gray image may be adjusted upward by a certain angle, so as to correct and correct the gray value difference between different areas in the gray image. The adjusting angle for adjusting the clamping angle of the clamping unit may be a preset angle, or an adjusting angle obtained by analyzing and calculating the difference between the gray values of different areas in the gray image, which is not limited in the embodiment of the present invention.
Therefore, compared with the prior art, the optical detection device provided by the embodiment of the invention has the advantages that the clamping angle of each clamping unit is adjustable, before the optical detection is carried out, the control unit adjusts the clamping angle of the clamping unit corresponding to the display device to be detected according to the collected gray image of the display device to be detected, namely, one end of the clamping unit corresponding to the brighter side in the gray image is adjusted downwards by a certain angle, and one end of the clamping unit corresponding to the darker side in the gray image is adjusted upwards by a certain angle, so that the inclination angle of the display device to be detected clamped by the clamping unit is changed, and thus, when the actual optical detection is carried out, the difference of gray values of different areas in the gray image formed by the display device to be detected is reduced, and the defect analysis is facilitated. In the embodiment of the invention, the simultaneous and efficient optical detection of a plurality of display devices to be detected can be realized without arranging a plurality of image acquisition units, so that the cost of the optical detection device is reduced, and the occupied space of the optical detection device is reduced.
Further, referring to fig. 3, the clamping unit includes a clamp 12 for clamping the display device to be detected, a first support rod 13 for supporting a central region of the display device to be detected, and a plurality of second support rods 14 for supporting edge regions of the display device to be detected; the first supporting rod 13 and the second supporting rod 14 are both vertical to the upper surface of the base platform 11; the upper ends of the first supporting rod 13 and the second supporting rod 14 are respectively provided with a movably connected connecting piece 15, and the connecting piece 15 on the second supporting rod 14 is connected with the clamp 12; the lower end of the second support bar 14 is connected with the upper surface of the base 11 through a telescopic structure 16, and the telescopic structure 16 can be extended and contracted along the length direction of the second support bar 14 to raise or lower the height of the second support bar 14; the control unit is used for controlling the telescopic height of each telescopic structure 16 according to the gray level image collected by the image collecting unit so as to control the clamping angle of each clamp 12.
The embodiment of the present invention does not limit the specific shape, size, etc. of the clamp 12, and those skilled in the art can set the shape and size according to actual situations. Since the clamp 12 is used for clamping the display device to be tested, in practical applications, the shape and size of the clamp 12 are generally adapted to the shape and size of the display device to be tested, so as to facilitate clamping of the display device to be tested. It should be noted that the clamp 12 and the connecting member 15 are generally detachably connected, so that the clamps 12 with different sizes can be freely replaced to detect the display devices to be detected with different sizes, thereby improving the application range of the optical detection apparatus. Wherein, the connecting piece 15 can be a universal ball head connecting piece.
In practical application, distances from the central point of the clamp 12 in the plurality of clamping units to the image acquisition unit can be set to be equal, so that the difference of gray values of different areas in a gray image imaged by the display device to be detected can be reduced.
Referring to fig. 3, the angles of the first support bar 13 and the second support bar 14 and the connecting member 15 thereon are adjustable; the first supporting rod 13 is used for supporting a central region of the display device to be detected, and the bottom end of the first supporting rod 13 is not provided with the retractable structure 16, that is, the height of the first supporting rod 13 cannot be adjusted, so that the central points of the plurality of clamps 12 in the base station 11 can be ensured to be located on the same horizontal plane; the second supporting rod 14 is used for supporting the edge area of the display device to be detected, and the bottom end of the second supporting rod 14 is provided with the retractable structure 16, that is, the height of the first supporting rod 13 can be adjusted by the up-down extension of the retractable structure 16, so that the adjustment of the clamping angle of the clamp 12 can be realized, and the difference of gray values of different areas in the gray image imaged by the display device to be detected is further reduced. Wherein, the retractable structure 16 can be a lifting motor.
The embodiment of the invention does not limit the specific setting number and the specific setting position of the second supporting rod 14. Preferably, referring to fig. 4, the clamp 12 has a rectangular structure, and the clamping unit includes two second support bars 14, and the two second support bars 14 are respectively located right below the midpoint positions of the adjacent sides of the clamp 12; the two second support bars 14 are respectively used for supporting the middle point positions of two adjacent sides of the clamp 12. The supporting points of the first supporting rod 13 and the second supporting rod 14 on the fixture 12 form a triangular arrangement mode, and the purpose of adjusting the clamping angle of the fixture 12 can be achieved by changing the position form of the supporting points of the second supporting rod 14, so that the relatively complex angle adjustment of the fixture 12 can be achieved through relatively simple mechanical linkage.
It should be noted that, when the display device to be detected is not provided with a backlight, the fixture 12 is further provided with a backlight 17 for providing a lighting light source for the display device to be detected, so as to perform optical detection on the display device to be detected.
After the display device to be detected is placed in the fixture 12 of the base 11, the gray image of the display device to be detected is collected, and the inclination angle of the display device to be detected at different positions is corrected by an algorithm according to the gray image, that is, the adjustment angle of the fixture 12 is converted from the gray value in the gray image. Specifically, the control unit is specifically configured to: obtaining the adjusting angle of the clamp 12 according to a first formula; the first formula is: x ═ a-b) × δ - α + Δ W; wherein, X is an adjustment angle, a and b are gray values at the midpoint of two opposite sides in the gray image, δ is a preset conversion coefficient, α is an included angle between a plane where the clamp 12 is currently located and a horizontal plane, and Δ W is a preset compensation amount; the telescopic height of the corresponding telescopic structure 16 is controlled according to the adjusting angle of the clamp 12.
In practical applications, the preset transformation coefficient δ is generally related to the ambient illumination of the fixture 12, the distance between the image capturing unit and the display device to be detected, the lens characteristics of the image capturing unit, and other factors, which are not limited in the embodiment of the present invention. Since the calculation accuracy, the control accuracy, and the like of each component of the optical detection apparatus cannot reach an ideal state in actual operation, Δ W is set as a compensation amount for this, and the embodiment of the present invention does not limit the specific value of Δ W.
The control unit may be a Programmable Logic Controller (PLC) integrated on the AOI device, or may be a Personal Computer (PC) end independent of the AOI device, or may include both a PLC end and a PC end, for example, the control unit may perform processing and analysis on the gray image, the function of obtaining the adjustment angle of the clamp may be performed by the PC end, and the function of controlling the scalable structure according to the adjustment angle, which is performed by the control unit, may be performed by the PLC.
When the adjustment angle corresponding to the long side of the display device to be detected is calculated, referring to fig. 5 (a), a1 and b1 are respectively gray values at the midpoint of two long sides opposite to the display device to be detected, α 1 is an included angle between a plane where the short side of the display device to be detected is currently located and a horizontal plane, and the adjustment angle X1 corresponding to the long side of the display device to be detected is (a1-b1) × δ - α 1+ Δ W; when the adjustment angle corresponding to the short side of the display device to be detected is calculated, referring to fig. 5 (b), a2 and b2 are respectively gray values at the midpoint of two opposite short sides of the display device to be detected, α 2 is an included angle between the plane where the long side of the display device to be detected is currently located and the horizontal plane, and the adjustment angle X2 corresponding to the short side of the display device to be detected is (a2-b2) × δ - α 2+ Δ W.
After the adjustment angle X1 corresponding to the long side and the adjustment angle X2 corresponding to the short side are obtained, the telescopic heights of the telescopic structures 16 corresponding to the second support bars 14 below the long side and the short side are respectively adjusted according to the adjustment angle X1 and the adjustment angle X2, and therefore the clamping angle of the clamp 12 can be adjusted.
Another embodiment of the present invention provides a control method for an optical detection apparatus as described in any one of the above, as shown in fig. 6, the control method includes:
601, obtaining gray level images of a plurality of to-be-detected display devices on a plurality of clamping units;
step 602, controlling the clamping angle of each clamping unit according to the gray scale image.
Further, when the clipping units include the stretchable structure, the controlling the clipping angle of each clipping unit according to the grayscale image includes: and controlling the telescopic height of each telescopic structure according to the gray level image so as to control the clamping angle of each clamp.
According to the embodiment of the invention, the gray images of the display devices to be detected on the plurality of clamping units are obtained, and then the clamping angle of the corresponding clamping unit is controlled according to the gray images, namely, one end of the clamping unit corresponding to the brighter side in the gray images is downwards adjusted by a certain angle, and one end of the clamping unit corresponding to the darker side in the gray images is upwards adjusted by a certain angle, so that the inclination angle of the display devices to be detected clamped by the clamping unit is changed, therefore, when the actual optical detection is carried out, the difference of the gray values of different areas in the gray images of the display devices to be detected becomes small, and the defect analysis is facilitated. In the embodiment of the invention, the simultaneous and efficient optical detection of a plurality of display devices to be detected can be realized without arranging a plurality of image acquisition units, so that the cost of the optical detection device is reduced, and the occupied space of the optical detection device is reduced.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are 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 appended claims.