Light-emitting component detection method, device, terminal equipment and storage medium
By presetting the camera and image processing algorithm configuration, detection is carried out according to the type of light-emitting parts and the type of tooling, which solves the problem of poor compatibility of detection software in the existing technology and achieves efficient detection of light-emitting parts.
Patent Information
- Application Number
- CN202110792458.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-13
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2041-07-13
AI Technical Summary
In the existing technology, light-emitting component detection software cannot be flexibly compatible with different types of cameras and tooling, resulting in long detection cycles and low efficiency.
Using preset cameras and image processing algorithms, the selected camera parameters and detection algorithms are configured according to the equipment type, tooling type and camera type of the light-emitting parts to achieve image detection of different types of light-emitting parts.
The detection cycle is greatly reduced and the detection efficiency is improved, so that there is no need to re-develop detection software for different types of light-emitting components.
Smart Images

Figure CN113592787B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of display technology, and in particular to a light-emitting component detection method, device, terminal equipment and computer-readable storage medium. Background Art
[0002] With the rapid development of industrial electronic products, various types of LED (Light Emitting Diode) lamps, LED digital tubes and LCD (Liquid Crystal Display) screens have been widely used. Therefore, LED and LCD quality inspection becomes very important when LED and LCD are manufactured.
[0003] At present, visual inspection software is used to inspect the luminous components to be inspected. However, the visual inspection software cannot be flexibly compatible with different types of cameras, luminous components of different tooling types, or different types of luminous components, resulting in the need to redevelop the inspection software for each type of tooling type of luminous components, each camera, or each type of luminous components. This results in a long inspection cycle for the luminous components to be inspected and low inspection efficiency for the luminous components to be inspected. Summary of the invention
[0004] The main purpose of the present invention is to provide a light-emitting component detection method, device, terminal equipment and computer-readable storage medium, aiming to solve the technical problems of long detection cycle and low detection efficiency of the light-emitting components to be detected in the prior art.
[0005] To achieve the above object, the present invention provides a method for detecting a light-emitting component, the method comprising the following steps:
[0006] Using a preset camera to shoot the luminous component to be inspected to obtain a luminous image, the preset camera is configured using selected camera parameters corresponding to the camera type of the preset camera;
[0007] The luminous image is detected by using an image processing algorithm to obtain a detection result of the luminous component to be detected. The image processing algorithm is obtained by configuring a selected detection algorithm. The selected detection algorithm is determined in a preset algorithm set based on the device type of the luminous component to be detected, the tooling type of the luminous component to be detected and the camera type.
[0008] Optionally, the step of detecting the luminous image using an image processing algorithm to obtain a detection result of the luminous component to be detected includes:
[0009] Detecting the luminous image using the image processing algorithm to obtain the detection external features of the luminous component to be detected;
[0010] Based on the comparison result of the detection external feature and the preset external feature of the light-emitting component to be detected, the detection result of the light-emitting component to be detected is obtained.
[0011] Optionally, before the step of detecting the luminous image using the image processing algorithm to obtain the detection external features of the luminous component to be detected, the method further includes:
[0012] Determining a selected segmentation strategy corresponding to the tooling type from a set of preset segmentation strategies;
[0013] Segmenting the luminescent image using the selected segmentation strategy to obtain a segmented luminescent image;
[0014] The step of detecting the luminous image by using the image processing algorithm to obtain the detection external features of the luminous component to be detected includes:
[0015] The segmented luminous image is detected using the image processing algorithm to obtain the detection external features.
[0016] Optionally, before the step of detecting the segmented luminous image using the image processing algorithm to obtain the step of detecting external features, the method further includes:
[0017] Using a preset calibration strategy, calibrating the segmented luminescent image to obtain a calibrated luminescent image;
[0018] The step of detecting the segmented luminous image using the image processing algorithm to obtain the detected external features includes:
[0019] The calibrated luminescent image is detected using the image processing algorithm to obtain the detected external features.
[0020] Optionally, before the step of detecting the calibrated luminescent image using the image processing algorithm to obtain the step of detecting external features, the method further includes:
[0021] Determine a selected positioning algorithm corresponding to the tool type and the equipment type in a preset positioning algorithm set;
[0022] Using the selected positioning algorithm, determining the effective area corresponding to the light-emitting component to be detected in the calibrated light-emitting image;
[0023] The step of detecting the calibrated luminous image using the image processing algorithm to obtain the detected external features includes:
[0024] The effective area is detected using the image processing algorithm to obtain the detected external features.
[0025] Optionally, before the step of detecting the luminous image using an image processing algorithm to obtain a detection result of the luminous component to be detected, the method further includes:
[0026] Determining the selected detection algorithm in a preset algorithm set based on the device type of the light-emitting component to be detected, the tooling type of the light-emitting component to be detected, and the camera type;
[0027] configuring the selected detection algorithm using preset configuration parameters to obtain an initial image processing algorithm;
[0028] Using the initial image processing algorithm to detect a preset test image to obtain a preview external feature of the preset test image;
[0029] When the preview external feature and the preset preview external feature of the preset test image meet a preset condition, the initial image processing algorithm is determined as the image processing algorithm.
[0030] Optionally, after the step of detecting a preset test image using the initial image processing algorithm to obtain a preview external feature of the preset test image, the method further includes:
[0031] When the preview external feature and the preset preview external feature do not satisfy the preset condition, obtaining new preset configuration parameters;
[0032] The configuration parameters are updated using the new preset configuration parameters, and the step of configuring the selected detection algorithm using the preset configuration parameters is returned to be executed until the preview external features and the preset preview external features meet the preset conditions, thereby obtaining the image processing algorithm.
[0033] In addition, to achieve the above-mentioned purpose, the present invention also proposes a light-emitting component detection device, the device comprising:
[0034] A shooting module, used for shooting the luminous component to be detected by using a preset camera to obtain a luminous image, wherein the preset camera is configured with selected camera parameters corresponding to the camera type of the preset camera;
[0035] A detection module is used to detect the luminous image using an image processing algorithm to obtain a detection result of the luminous component to be detected, wherein the image processing algorithm is obtained by configuring a selected detection algorithm, and the selected detection algorithm is determined in a preset algorithm set based on the device type of the luminous component to be detected, the tooling type of the luminous component to be detected, and the camera type.
[0036] In addition, to achieve the above-mentioned purpose, the present invention also proposes a terminal device, which includes: a memory, a processor, and a light-emitting component detection program stored in the memory and running on the processor, and when the light-emitting component detection program to be detected is executed by the processor, the steps of the light-emitting component detection method described in any one of the above items are implemented.
[0037] In addition, to achieve the above-mentioned purpose, the present invention also proposes a computer-readable storage medium, on which a light-emitting component detection program is stored. When the light-emitting component detection program to be detected is executed by a processor, the steps of the light-emitting component detection method as described in any one of the above items are implemented.
[0038] The technical solution of the present invention proposes a method for detecting luminous components, by using a preset camera to shoot the luminous component to be detected to obtain a luminous image, and the preset camera is configured with selected camera parameters corresponding to the camera type of the preset camera; the luminous image is detected by an image processing algorithm to obtain a detection result of the luminous component to be detected, and the image processing algorithm is obtained by configuring a selected detection algorithm, and the selected detection algorithm is determined in a preset algorithm set based on the equipment type of the luminous component to be detected, the tooling type of the luminous component to be detected and the camera type.
[0039] In the present invention, the preset camera is configured using the selected camera parameters corresponding to the camera type of the preset camera. At the same time, based on the equipment type, tooling type and the camera type, a selected detection algorithm is determined in a preset algorithm set, and the selected detection algorithm is configured to obtain an image processing algorithm, so that the image processing algorithm can detect luminous images corresponding to different equipment types, different tooling types and different camera types, and there is no need to redevelop the detection software, thereby greatly reducing the detection cycle of the luminous components to be detected, thereby improving the detection efficiency of the luminous components to be detected. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0041] Figure 1 A schematic diagram of the structure of a terminal device in a hardware operating environment involved in an embodiment of the present invention;
[0042] Figure 2 It is a schematic diagram of the flow chart of the first embodiment of the light emitting component detection method of the present invention;
[0043] Figure 3 It is a structural block diagram of the first embodiment of the light-emitting component detection device of the present invention.
[0044] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] Reference Figure 1 , Figure 1 A schematic diagram of the terminal device structure of the hardware operating environment involved in the embodiment of the present invention.
[0047] The terminal device may be a user equipment (UE) such as a mobile phone, a smart phone, a laptop, a digital broadcast receiver, a personal digital assistant (PDA), a tablet computer (PAD), a handheld device, a vehicle-mounted device, a wearable device, a computing device or other processing device connected to a wireless modem, a mobile station (MS), etc. The terminal device may be called a user terminal, a portable terminal, a desktop terminal, etc.
[0048] Typically, the terminal device includes: at least one processor 301, a memory 302, and a light-emitting component detection program stored in the memory and executable on the processor, wherein the light-emitting component detection program to be detected is configured to implement the steps of the light-emitting component detection method as described above.
[0049] The processor 301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 301 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 301 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. The processor 301 may also include an AI (Artificial Intelligence) processor, which is used to process operations related to the light-emitting component detection method, so that the light-emitting component detection method model can be trained and learned autonomously to improve efficiency and accuracy.
[0050] The memory 302 may include one or more computer-readable storage media, which may be non-transitory. The memory 302 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 302 is used to store at least one instruction, which is used to be executed by the processor 301 to implement the light-emitting component detection method provided in the method embodiment of the present application.
[0051] In some embodiments, the terminal may further optionally include: a communication interface 303 and at least one peripheral device. The processor 301, the memory 302 and the communication interface 303 may be connected via a bus or a signal line. Each peripheral device may be connected to the communication interface 303 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 304, a display screen 305 and a power supply 306.
[0052] The communication interface 303 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 301 and the memory 302. In some embodiments, the processor 301, the memory 302, and the communication interface 303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 301, the memory 302, and the communication interface 303 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0053] The radio frequency circuit 304 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 304 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 304 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 304 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 304 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 304 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0054] The display screen 305 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos and any combination thereof. When the display screen 305 is a touch display screen, the display screen 305 also has the ability to collect touch signals on the surface or above the surface of the display screen 305. The touch signal can be input to the processor 301 as a control signal for processing. At this time, the display screen 305 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 305 can be one, the front panel of the electronic device; in other embodiments, the display screen 305 can be at least two, respectively arranged on different surfaces of the electronic device or in a folding design; in some further embodiments, the display screen 305 can be a flexible display screen, arranged on a curved surface or a folding surface of the electronic device. Even, the display screen 305 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 305 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).
[0055] The power supply 306 is used to power various components in the electronic device. The power supply 306 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 306 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0056] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the terminal device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0057] In addition, an embodiment of the present invention further proposes a computer-readable storage medium, on which a light-emitting component detection program is stored, and when the light-emitting component detection program to be detected is executed by a processor, the steps of the light-emitting component detection method described above are implemented. Therefore, it will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in the present application, please refer to the description of the method embodiment of the present application. As an example, the program instructions can be deployed to be executed on a terminal device, or on multiple terminal devices located at one location, or on multiple terminal devices distributed at multiple locations and interconnected by a communication network.
[0058] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the above-mentioned program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the above-mentioned computer-readable storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0059] Based on the above hardware structure, an embodiment of the light-emitting component detection method of the present invention is proposed.
[0060] Reference Figure 2 , Figure 2 This is a flow chart of a first embodiment of a method for detecting a light-emitting component according to the present invention. The method comprises the following steps:
[0061] Step S11: photographing the luminous component to be inspected by using a preset camera to obtain a luminous image, wherein the preset camera is configured using selected camera parameters corresponding to the camera type of the preset camera.
[0062] It should be noted that the executor of the present invention is a terminal device, and the terminal device is installed with a light-emitting component detection program. When the terminal device executes the light-emitting component detection program, the light-emitting component detection method of the present invention is implemented.
[0063] The light-emitting component to be inspected may refer to a light-emitting component that has been produced but not put into use and needs to be tested for brightness. The light-emitting component to be inspected may be an LED (Light Emitting Diode) lamp, an LED digital tube, and an LCD (Liquid Crystal Display) display, etc. The present invention does not make any specific restrictions.
[0064] Usually, when the light-emitting component to be detected is photographed by a preset camera, the light-emitting component to be detected needs to emit light according to a preset brightness. Generally speaking, the light-emitting component to be detected has a plurality of preset brightnesses, and different preset brightnesses correspond to different preset drive signals. When the light-emitting component is driven according to different preset drive signals, the light-emitting component displays different preset brightnesses, and one preset drive signal corresponds to one preset brightness. When a preset drive signal (or multiple preset drive signals) of the light-emitting component is used to drive the light-emitting component to be detected to emit light, when the actual brightness displayed by the light-emitting component to be detected (the detection brightness obtained by the method of the present invention) is different from the preset brightness corresponding to the preset drive signal (or when the difference is large), the light-emitting component to be detected has a fault, and the detection result of the light-emitting component to be detected is unqualified; when all the preset drive signals of the light-emitting component to be detected are used to drive the light-emitting component to be detected to emit light, when all the actual brightness of the light-emitting component to be detected (all the detection brightness obtained by the method of the present invention) and the preset brightness corresponding to all the preset drive signals are the same (or when the difference is small), the light-emitting component to be detected does not have a fault, and the detection result of the light-emitting component is qualified.
[0065] In specific applications, it is necessary to detect all preset brightnesses involved in the light-emitting components to be detected, that is, it is necessary to drive the light-emitting components to be detected to emit light according to all preset driving signals of the light-emitting components, and obtain the actual display brightness (obtained detection brightness) corresponding to all preset driving signals, and then obtain the detection result of the light-emitting component based on the comparison result of all detection brightness and the preset brightness corresponding to the preset driving signal.
[0066] For example, the light-emitting component to be detected has three preset brightnesses corresponding to three preset signals, and the preset drive signals are a, b and c, respectively, and the corresponding preset brightnesses are 2, 4 and 6, respectively. It is necessary to perform steps S11-S14 of the light-emitting detection method of the present invention three times on the light-emitting component to be detected to obtain three comparison results, among which only the comparison result between the detection brightness corresponding to the preset drive signal a and the preset brightness is greatly different, and the comparison results between the detection brightness corresponding to the preset drive signals b and c and the preset brightness are the same, then the detection result of the light-emitting component to be detected is unqualified. If the comparison results between the detection brightness corresponding to the preset drive signals a, b and c and the preset brightness are all the same, then the detection result of the light-emitting component to be detected is qualified.
[0067] It should be noted that different camera types may correspond to different camera parameters. The camera type may be a Daheng camera or a Basler camera. The camera parameters may include the exposure time and gain value of the camera. After configuring the preset camera, the configured preset camera may be used for multiple shootings to perform the light-emitting component detection method of the present invention multiple times. There is no need to reconfigure the camera each time the light-emitting component detection method of the present invention is performed. The selected camera parameters are the camera parameters of the preset camera.
[0068] In a specific application, the preset camera can be a camera built into the terminal device, or a camera external to the terminal device. When the preset camera is a camera external to the terminal device, the terminal device needs to obtain the luminous image captured by the external camera.
[0069] In addition, in some embodiments, it is also possible to directly obtain a local picture that has been taken. When performing the light-emitting component detection method of the present invention, it is sufficient to directly obtain the local picture without the need to perform a photographing step.
[0070] Step S12: Use an image processing algorithm to detect the luminous image to obtain a detection result of the luminous component to be detected, wherein the image processing algorithm is obtained by configuring a selected detection algorithm, and the selected detection algorithm is determined in a preset algorithm set based on the device type of the luminous component to be detected, the tooling type of the luminous component to be detected, and the camera type.
[0071] It should be noted that the type of the light-emitting component to be detected is the device type, the type of tooling for the light-emitting component to be detected is the tooling type, and the type of the preset camera is the camera type. Different device types of light-emitting components to be detected, different tooling types of light-emitting components to be detected, and different types of cameras have corresponding detection algorithms. The detection algorithms in the preset algorithm set may include OCR (Optical Character Recognition) recognition, template comparison, brightness detection, and particle detection, etc. Based on the device type of the light-emitting component to be detected, the tooling type of the light-emitting component to be detected, and the camera type, a corresponding detection algorithm is determined in the preset algorithm set, which is the selected detection algorithm. For example, the detection algorithms for LED light-emitting components and LCD light-emitting components are different, and the detection algorithms for LED light-emitting components with tooling types of 1×2 and 1×4 are also different.
[0072] Furthermore, before the step of using an image processing algorithm to detect the luminous image to obtain the detection result of the luminous component to be detected, the method also includes: determining the selected detection algorithm in a preset algorithm set based on the device type of the luminous component to be detected, the tooling type of the luminous component to be detected and the camera type; configuring the selected detection algorithm using preset configuration parameters to obtain an initial image processing algorithm; detecting a preset test image using the initial image processing algorithm to obtain preview external features of the preset test image; and determining the initial image processing algorithm as the image processing algorithm when the preview external features and the preset preview external features of the preset test image meet preset conditions.
[0073] It should be noted that different detection algorithms correspond to different preset configuration parameters, which may include image preprocessing parameters and image detection parameters. Image preprocessing parameters may include filtering and binarization; when the detection algorithm is OCR detection, the image detection parameters mainly include character template, character size, and character spacing, etc., when the detection algorithm is equal brightness detection, the image detection parameters include extraction plane type and grayscale threshold, etc., when the detection algorithm is particle detection, the image detection parameters include particle feature type and threshold, etc., when the detection algorithm is template comparison, the image detection parameters include template comparison type, template image, and matching score, etc.
[0074] Among them, the external features (detection external features, preview external features, preset external features and preset preview external features, etc.) in this application can all include multiple features such as brightness, shape, color and position of the light-emitting component to be detected. The preset test image is a light-emitting image corresponding to a qualified light-emitting component, the preview external features corresponding to the preset test image are external features detected using the initial image processing algorithm, and the preset preview external features corresponding to the preset test image are actual external features corresponding to the qualified light-emitting component to be detected. When the preview external features and the preset preview external features of the preset test image meet the preset conditions, it indicates that the detection accuracy of the initial image processing algorithm is high. When the preview external features and the preset preview external features of the preset test image do not meet the preset conditions, it indicates that the detection accuracy of the initial image processing algorithm is low. Among them, the preset condition is that the preset preview external feature is the same as the preview external feature, or the difference between the preset preview external feature and the preview external feature is less than the preset constraint (the preset constraint includes a preset position difference, a preset brightness difference, a preset shape difference and a preset color difference, etc. The difference between the preset preview external feature and the preview external feature is less than the preset constraint, which means that all the preset preview external features and the preview external features are less than the corresponding preset constraints).
[0075] When the preview external features and the preset preview external features of the preset test image meet the preset conditions, it indicates that the detection accuracy of the initial image processing algorithm is high, and the initial image processing algorithm can be directly used as the image processing algorithm to continue with the subsequent steps.
[0076] When the preview extrinsic features and the preset preview extrinsic features of the preset test image do not meet the preset conditions, it indicates that the detection accuracy of the initial image processing algorithm is low, and the initial image processing algorithm needs to be reconfigured, that is, by obtaining new preset configuration parameters, and updating the configuration parameters using the new preset configuration parameters, and returning to execute the step of configuring the selected detection algorithm using the preset configuration parameters, until the preview extrinsic features and the preset preview extrinsic features meet the preset conditions, indicating that the initial image processing algorithm at this time has a high accuracy rate, and it is used as the image processing algorithm.
[0077] At this time, after obtaining the image processing algorithm, the image processing algorithm can be repeatedly used to perform the light-emitting component detection method of the present invention multiple times. It is not necessary to configure the detection algorithm each time the light-emitting component detection method of the present invention is performed, which greatly reduces the time for reconfiguring the detection algorithm and improves the detection efficiency of the light-emitting components.
[0078] Specifically, step S12 includes: using the image processing algorithm to detect the luminous image to obtain the detection external features of the luminous component to be detected; based on the comparison results of the detection external features and the preset external features of the luminous component to be detected, obtaining the detection results of the luminous component to be detected.
[0079] Generally speaking, the luminous image corresponding to the luminous component to be detected needs to be divided into multiple small images before the image processing algorithm can be used to continue to detect the small images to obtain the detection external features. That is, before the step of using the image processing algorithm to detect the luminous image to obtain the detection external features of the luminous component to be detected, the method also includes: determining a selected segmentation strategy corresponding to the tooling type in the preset segmentation strategy set; using the selected segmentation strategy to segment the luminous image to obtain the segmented luminous image; correspondingly, the step of using the image processing algorithm to detect the luminous image to obtain the detection external features of the luminous component to be detected includes: using the image processing algorithm to detect the segmented luminous image to obtain the detection external features.
[0080] It should be noted that there are many types of tooling (tooling layout) for the light-emitting components to be detected, including 1×1, 1×2 and 1×4, etc., where 1×1 represents one camera corresponding to one light-emitting component to be detected, and 1×2 represents one camera corresponding to two light-emitting components to be detected. For different tooling types, the obtained light-emitting image includes different numbers of light-emitting components to be detected, and the light-emitting image needs to be segmented to obtain segmented light-emitting images. In the segmented light-emitting images, one light-emitting component to be detected corresponds to one image, and multiple light-emitting components to be detected correspond to multiple images. For example, if the tooling type is 1×4, the segmented light-emitting image includes images corresponding to four light-emitting components to be detected.
[0081] Among them, the preset segmentation strategy set includes different segmentation strategies. When the tooling types include 1×1, 1×2 and 1×4, the preset segmentation strategy set includes three segmentation strategies: non-segmentation strategy, image two segmentation strategy and image four segmentation strategy. Users can select more forms of tooling types according to their needs and determine the corresponding segmentation strategies to obtain the preset segmentation strategy set. It can be understood that the segmentation strategy corresponding to the tooling type of the light-emitting component to be detected in the preset segmentation strategy set is the selected segmentation strategy.
[0082] Furthermore, before the step of detecting the segmented luminous image using the image processing algorithm to obtain the step of detecting external features, the method also includes: calibrating the segmented luminous image using a preset calibration strategy to obtain a calibrated luminous image; correspondingly, the step of detecting the segmented luminous image using the image processing algorithm to obtain the step of detecting external features includes: detecting the calibrated luminous image using the image processing algorithm to obtain the step of detecting external features.
[0083] It should be noted that, in order to ensure the accuracy of the brightness detection, the segmented luminous image needs to be calibrated before the segmented luminous image is detected, and the preset calibration strategy may be distance calibration or lens distortion calibration.
[0084] Furthermore, before the step of using the image processing algorithm to detect the calibrated luminous image to obtain the step of detecting external features, the method also includes: determining a selected positioning algorithm corresponding to the tooling type and the equipment type in a preset positioning algorithm set; using the selected positioning algorithm, determining an effective area corresponding to the luminous component to be detected in the calibrated luminous image; accordingly, the step of using the image processing algorithm to detect the calibrated luminous image to obtain the step of detecting external features includes: using the image processing algorithm to detect the effective area to obtain the step of detecting external features.
[0085] It should be noted that the preset positioning algorithm set may include specified ROI (region of interest), manual sampling, template positioning and boundary intersection positioning, etc. The user can determine a positioning algorithm in the preset positioning algorithm set based on the tooling type and the equipment type. This positioning algorithm is the selected positioning algorithm. The user can also randomly determine a positioning algorithm in the preset positioning algorithm set. The randomly determined positioning algorithm is the selected positioning algorithm.
[0086] Typically, the corrected luminous image may include invalid areas outside the luminous component to be detected. In this case, it is necessary to use the above-mentioned method to determine the valid area corresponding to the luminous component to be detected in the calibrated luminous image. The valid area only includes the part corresponding to the luminous component to be detected, and the part outside the luminous component will be eliminated. There is no need to detect the invalid area (non-valid area) to improve the accuracy and speed of brightness detection (there is no need to detect the non-valid area, saving data processing time).
[0087] It should be noted that the preset external features refer to the external features corresponding to the light-emitting component to be detected when the light-emitting component to be detected is a qualified light-emitting component, that is, the preset external features include the brightness, position, color and shape corresponding to the qualified light-emitting component. The shape corresponding to the qualified light-emitting component is the preset shape, the brightness corresponding to the qualified light-emitting component is the preset brightness, and the color corresponding to the qualified light-emitting component is the preset color. The corresponding position corresponding to the qualified light-emitting component is the preset position. When performing comparison, it is necessary to compare the detection position, detection brightness, detection color and detection shape corresponding to the detection external features of the light-emitting component to be detected with the preset position, preset brightness, preset color and preset shape respectively.
[0088] In addition, in step S12, the comparison result may be that the detected external feature and the preset external feature are the same (or similar, the change interval of the detected external feature relative to the preset external feature may be set, and if the detected external feature is within the change interval, it indicates that they are similar, and the change interval may include a position change interval, a brightness change interval, a shape change interval, and a color change interval, etc. The detected external feature is within the change interval, which means that all the features are within the corresponding change interval). In this case, the detection result is that the luminous component to be detected is qualified; the comparison result may also be that the detected external feature and the preset external feature are greatly different (one or all of the detected external features are outside the corresponding change interval). In this case, the detection result is that the luminous component to be detected is unqualified.
[0089] It is understandable that when there are multiple preset brightnesses of the light-emitting component to be detected, the criterion for judging the test result is: if multiple preset brightnesses are the same (or similar) to the corresponding multiple test brightnesses, the brightness test of the light-emitting component to be detected is qualified; if any of the multiple preset brightnesses of the light-emitting component to be detected is significantly different from the corresponding test brightness, the light-emitting component to be detected is unqualified. When there are multiple preset colors, preset positions, and preset shapes of the light-emitting component to be detected, refer to the judgment criteria of the brightness test result.
[0090] In another embodiment, the terminal device can also output the initial luminous image and the effective area (a portion of the luminous image, which can be obtained by referring to the image corresponding to the effective area obtained in the above manner), so as to determine whether the above image processing process (image segmentation, image correction and image effective area extraction) is abnormal through the luminous image and the effective area. When an abnormality occurs, the abnormality can be corrected in time.
[0091] When executing the light-emitting component detection method of the present invention, it is only necessary to configure the camera once, configure the tooling type once, and configure the preset parameters of the detection algorithm once, and then the steps of the light-emitting component detection method of the present invention can be performed multiple times using the configured content. In other words, the same product only needs to be configured once, and the steps of the light-emitting component detection of the present invention can be performed directly through the configured content, without the need to perform the above configuration process every time the light-emitting component to be detected is detected, which saves a lot of configuration time and improves detection efficiency.
[0092] The technical solution of the present invention proposes a method for detecting luminous components, by using a preset camera to shoot the luminous component to be detected to obtain a luminous image, and the preset camera is configured with selected camera parameters corresponding to the camera type of the preset camera; the luminous image is detected by an image processing algorithm to obtain a detection result of the luminous component to be detected, and the image processing algorithm is obtained by configuring a selected detection algorithm, and the selected detection algorithm is determined in a preset algorithm set based on the equipment type of the luminous component to be detected, the tooling type of the luminous component to be detected and the camera type.
[0093] In the present invention, the preset camera is configured using the selected camera parameters corresponding to the camera type of the preset camera. At the same time, based on the equipment type, tooling type and the camera type, a selected detection algorithm is determined in a preset algorithm set, and the selected detection algorithm is configured to obtain an image processing algorithm, so that the image processing algorithm can detect luminous images corresponding to different equipment types, different tooling types and different camera types, and there is no need to redevelop the detection software, thereby greatly reducing the detection cycle of the luminous components to be detected, thereby improving the detection efficiency of the luminous components to be detected.
[0094] Reference Figure 3 , Figure 3 This is a structural block diagram of a first embodiment of a light-emitting component detection device of the present invention, the device is used in a terminal device, and the device includes:
[0095] A shooting module 10, used for shooting the luminous component to be detected by using a preset camera to obtain a luminous image, wherein the preset camera is configured with selected camera parameters corresponding to the camera type of the preset camera;
[0096] The detection module 20 is used to detect the luminous image using an image processing algorithm to obtain a detection result of the luminous component to be detected. The image processing algorithm is obtained by configuring a selected detection algorithm. The selected detection algorithm is determined in a preset algorithm set based on the device type of the luminous component to be detected, the tooling type of the luminous component to be detected and the camera type.
[0097] The above descriptions are only optional embodiments of the present invention, and are not intended to limit the patent scope of the present invention. All equivalent structural changes made using the contents of the present invention's specification and drawings, or directly / indirectly applied in other related technical fields, are included in the patent protection scope of the present invention.
Claims
1. A method for detecting a light-emitting component, characterized in that: The method comprises the following steps: Using a preset camera to shoot the luminous component to be inspected to obtain a luminous image, the preset camera is configured using selected camera parameters corresponding to the camera type of the preset camera, and the selected camera parameters include exposure time and gain value of the preset camera; The luminous image is detected by using an image processing algorithm to obtain a detection result of the luminous component to be detected, the image processing algorithm is obtained by configuring a selected detection algorithm, the selected detection algorithm is determined in a preset algorithm set based on the device type of the luminous component to be detected, the tooling type of the luminous component to be detected and the camera type, the detection algorithms in the preset algorithm set include OCR detection, brightness detection, particle detection and template comparison, the tooling type is the tooling layout of the luminous component to be detected, and the tooling layout refers to the corresponding relationship between the number of preset cameras and the number of luminous components to be detected; The step of detecting the luminous image by using an image processing algorithm to obtain a detection result of the luminous component to be detected includes: Determining a selected segmentation strategy corresponding to the tooling type from a set of preset segmentation strategies; Segmenting the luminescent image using the selected segmentation strategy to obtain a segmented luminescent image; Using the image processing algorithm to detect the segmented luminous image to obtain the detection external features of the luminous component to be detected, wherein the detection external features include brightness, shape, color and position; Based on the comparison result of the detection external feature and the preset external feature of the light-emitting component to be detected, the detection result of the light-emitting component to be detected is obtained.
2. The method according to claim 1, characterized in that Before the step of detecting the segmented luminous image using the image processing algorithm to obtain the detected external features, the method further includes: Using a preset calibration strategy, calibrating the segmented luminescent image to obtain a calibrated luminescent image; The step of detecting the segmented luminous image using the image processing algorithm to obtain the detected external features includes: The calibrated luminescent image is detected using the image processing algorithm to obtain the detected external features.
3. The method according to claim 2, characterized in that Before the step of detecting the calibrated luminous image using the image processing algorithm to obtain the detected external features, the method further includes: Determine a selected positioning algorithm corresponding to the tool type and the equipment type in a preset positioning algorithm set; Using the selected positioning algorithm, determining the effective area corresponding to the light-emitting component to be detected in the calibrated light-emitting image; The step of detecting the calibrated luminous image using the image processing algorithm to obtain the detected external features includes: The effective area is detected using the image processing algorithm to obtain the detected external features.
4. The method according to claim 3, characterized in that Before the step of detecting the luminous image by using an image processing algorithm to obtain the detection result of the luminous component to be detected, the method further includes: Determining the selected detection algorithm in a preset algorithm set based on the device type of the light-emitting component to be detected, the tooling type of the light-emitting component to be detected, and the camera type; configuring the selected detection algorithm using preset configuration parameters to obtain an initial image processing algorithm; Using the initial image processing algorithm to detect a preset test image to obtain a preview external feature of the preset test image; When the preview external feature and the preset preview external feature of the preset test image meet a preset condition, the initial image processing algorithm is determined as the image processing algorithm.
5. The method according to claim 4, characterized in that After the step of detecting the preset test image using the initial image processing algorithm to obtain the preview external features of the preset test image, the method further includes: When the preview external feature and the preset preview external feature do not satisfy the preset condition, obtaining new preset configuration parameters; The preset configuration parameters are updated using the new preset configuration parameters, and the step of configuring the selected detection algorithm using the preset configuration parameters is returned to be executed until the preview external features and the preset preview external features meet the preset conditions, thereby obtaining the image processing algorithm.
6. A light-emitting component detection device, characterized in that: The device comprises: A shooting module, used for shooting the luminous component to be detected by using a preset camera to obtain a luminous image, wherein the preset camera is configured using selected camera parameters corresponding to the camera type of the preset camera, and the selected camera parameters include an exposure time and a gain value of the preset camera; a detection module, configured to detect the luminous image using an image processing algorithm to obtain a detection result of the luminous component to be detected, wherein the image processing algorithm is obtained by configuring a selected detection algorithm, wherein the selected detection algorithm is determined in a preset algorithm set based on the device type of the luminous component to be detected, the tooling type of the luminous component to be detected, and the camera type, wherein the detection algorithms in the preset algorithm set include OCR detection, brightness detection, particle detection, and template comparison, wherein the tooling type is the tooling layout of the luminous component to be detected, and the tooling layout refers to a corresponding relationship between the number of preset cameras and the number of luminous components to be detected; The detection module is also used to determine a selected segmentation strategy corresponding to the tooling type in a preset segmentation strategy set, use the selected segmentation strategy to segment the luminous image to obtain a segmented luminous image, use the image processing algorithm to detect the segmented luminous image to obtain the detection external features of the luminous component to be detected, and obtain the detection results of the luminous component to be detected based on the comparison results of the detection external features and the preset external features of the luminous component to be detected, wherein the detection external features include brightness, shape, color and position.
7. A terminal device, characterized in that: The terminal device comprises: a memory, a processor, and a light-emitting component detection program stored in the memory and running on the processor, and when the light-emitting component detection program to be detected is executed by the processor, the steps of the light-emitting component detection method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a light-emitting component detection program, and when the light-emitting component detection program to be detected is executed by a processor, the steps of the light-emitting component detection method according to any one of claims 1 to 5 are implemented.
