Camera module detection method, device and equipment
By acquiring multi-spectral images and performing consistency comparison, the problem of low camera module detection efficiency is solved, and efficient module detection is achieved, avoiding the time-consuming of manual testing.
Patent Information
- Application Number
- CN202510021854.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-04-15
AI Technical Summary
The detection efficiency of the camera module is low, and requires manual white balance and brightness uniformity testing, which takes a long time, resulting in low detection efficiency and increased cost.
By acquiring multispectral images, the standard camera module is determined, and the standard multispectral images are compared with the multispectral images of other modules to determine whether the module is a bad module.
It improves the detection efficiency of the camera module, avoids manual white balance and brightness uniformity testing, reduces detection time and reduces cost.
Smart Images

Figure CN119835406A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of hardware testing, and in particular relates to a detection method, device and equipment for a camera module. Background Art
[0002] Currently, camera module inspections require tests such as white balance and brightness uniformity to detect defective modules. However, the manual labor required to perform these tests, along with the time required for each test, results in low camera module inspection efficiency, which in turn increases costs for businesses. Therefore, low camera module inspection efficiency is a pressing technical issue that needs to be addressed. Summary of the Invention
[0003] The embodiments of the present invention provide a method, device and equipment for detecting a camera module, which solve the technical problem of low detection efficiency of the camera module.
[0004] In a first aspect, an embodiment of the present invention provides a method for detecting a camera module, comprising: obtaining a first group of multispectral images taken by a first group of camera modules and a second group of multispectral images taken by a second group of camera modules, the number of modules in the second group of camera modules being greater than that in the first group of camera modules, and the shooting environment of each image in the first group of multispectral images and the second group of multispectral images being the same; based on the first group of multispectral images, determining a standard camera module from the first group of camera modules; and comparing the standard multispectral image of the standard camera module with each image in the second group of multispectral images for consistency to determine whether each module in the second group of camera modules is a defective module.
[0005] In combination with the first aspect of the present invention, in some embodiments, determining the standard camera module from the first group of camera modules based on the first group of multispectral images includes: taking each image in the first group of multispectral images as a first target multispectral image in turn; determining a region of interest of the first target multispectral image, wherein the region of interest includes multiple channels; determining first brightness data within the region of interest of the first target multispectral image, wherein the brightness data is used to characterize the brightness of light allowed to pass through each channel in the multiple channels; and determining the standard camera module from the first group of camera modules based on the first brightness data of each image in the first group of multispectral images.
[0006] In combination with the first aspect of the present invention, in some embodiments, determining the first brightness data within the region of interest of the first target multispectral image includes: determining the average pixel value of each of the multiple channels within the region of interest of the first target multispectral image; taking the sum of the average pixel values of each channel in the multiple channels as the total pixel value; determining, for each channel in the multiple channels, the pixel ratio of the channel based on the average pixel value of the channel and the total pixel value; and taking the pixel ratio of each channel in the multiple channels as the first brightness data.
[0007] In combination with the first aspect of the present invention, in some embodiments, the determining the standard camera module from the first group of camera modules based on the first brightness data of each image in the first group of multispectral images includes: taking the multiple channels in sequence as target channels; under the target channel, selecting the pixel ratio of each image in the first group of multispectral images as a set of ratio values; taking the average value of the set of ratio values as the ratio average value of the target channel; taking the ratio average value of each channel in the multiple channels as second brightness data; based on the second brightness data, determining standard first brightness data from the first brightness data of each image in the first group of multispectral images; and taking the module corresponding to the standard first brightness data as the standard camera module.
[0008] In combination with the first aspect of the present invention, in some embodiments, determining the standard first brightness data from the first brightness data of each image in the first group of multispectral images based on the second brightness data includes: taking the first brightness data of each image in the first group of multispectral images in turn as the target first brightness data; determining the degree of discreteness of the target first brightness data relative to the second brightness data through variance to obtain the variance value corresponding to the target first brightness data; and determining the standard first brightness data based on the variance value corresponding to the first brightness data of each image in the first group of multispectral images.
[0009] In combination with the first aspect of the present invention, in some embodiments, the standard multispectral image of the standard camera module is respectively compared with each image in the second group of multispectral images for consistency to determine whether each module in the second group of camera modules is a bad module, including: taking each image in the second group of multispectral images in turn as a second target multispectral image; determining a region of interest of the second target multispectral image, wherein the region of interest includes multiple channels; determining third brightness data within the region of interest of the second target multispectral image; and comparing the standard first brightness data with the third brightness data of each image in the second group of multispectral images for consistency to determine whether each module in the second group of camera modules is a bad module.
[0010] In combination with the first aspect of the present invention, in some embodiments, the standard first brightness data is respectively compared with the third brightness data of each image in the second group of multispectral images for consistency to determine whether each module in the second group of camera modules is a defective module, including: taking the third brightness data of each image in the second group of multispectral images in turn as the target third brightness data; determining the deviation coefficient between the target third brightness data and the standard first brightness data; if the deviation coefficient is greater than a preset deviation threshold, determining that the module corresponding to the target third brightness data is a defective module.
[0011] In combination with the first aspect of the present invention, in some embodiments, the deviation coefficient includes a first deviation sub-coefficient and a second deviation sub-coefficient, and determining the deviation coefficient between the target third brightness data and the standard first brightness data includes: calculating the deviation rate of the pixel ratio of the corresponding channel in the target third brightness data and the standard first brightness data to obtain a set of deviation rates; taking the maximum value in the set of deviation rates as the first deviation sub-coefficient; and taking the average value of the set of deviation rates as the second deviation sub-coefficient.
[0012] In a second aspect, an embodiment of the present invention provides a detection device for a camera module, comprising: an image acquisition unit for acquiring a first group of multispectral images captured by a first group of camera modules and a second group of multispectral images captured by a second group of camera modules, the number of modules in the second group of camera modules being greater than the number of modules in the first group of camera modules, and the shooting environment of each image in the first group of multispectral images and the second group of multispectral images being the same; a standard determination unit for determining a standard camera module from the first group of camera modules based on the first group of multispectral images; and a judgment unit for comparing the standard multispectral image of the standard camera module with each image in the second group of multispectral images for consistency, so as to determine whether each module in the second group of camera modules is a defective module.
[0013] In a third aspect, an embodiment of the present invention provides an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the methods described in the first aspect when executing the computer program.
[0014] The one or more technical solutions provided by the embodiments of the present invention achieve at least the following technical effects or advantages:
[0015] The embodiment of the present invention obtains a first set of multispectral images captured by a first set of camera modules and a second set of multispectral images captured by a second set of camera modules, wherein the second set of camera modules has a greater number of modules than the first set of camera modules, and each image in the first and second sets of multispectral images is captured under the same shooting environment; based on the first set of multispectral images, a standard camera module is determined from the first set of camera modules; and the standard multispectral image of the standard camera module is compared for consistency with each image in the second set of multispectral images to determine whether each module in the second set of camera modules is a defective module. It should be noted that if the multispectral image consistency is high, it indicates that the performance consistency of the module is high with that of the standard camera module, and the module is determined to be a qualified module. If the multispectral image consistency is low, it indicates that the performance consistency of the module is low with that of the standard camera module, and the module is determined to be a defective module. This consistency comparison avoids the need for manual testing of items such as white balance and brightness uniformity, thereby avoiding the time-consuming inspection process caused by each test item. Therefore, the inspection efficiency of the camera module is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0017] Figure 1 Flowchart of a method for detecting a camera module according to an embodiment of the present invention;
[0018] Figure 2 This is a first schematic diagram of a multispectral image according to an embodiment of the present invention;
[0019] Figure 3 This is a second schematic diagram of a multispectral image according to an embodiment of the present invention;
[0020] Figure 4 1 is a functional module diagram of a detection device for a camera module according to an embodiment of the present invention;
[0021] Figure 5 Schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0023] In the present invention, descriptions such as "first" and "second" are for descriptive purposes only and should not be understood as indicating or implying their relative importance or implicitly indicating the number of the technical features indicated. Therefore, features defined as "first" or "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions of various embodiments may be combined with each other, but this must be based on the fact that they can be implemented by a person of ordinary skill in the art. If the combination of technical solutions is mutually contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
[0024] The embodiment of the present invention provides a method for detecting a camera module, referring to Figure 1 As shown, the method includes the following steps S101 to S103:
[0025] S101: Obtain a first group of multispectral images captured by a first group of camera modules and a second group of multispectral images captured by a second group of camera modules, wherein the second group of camera modules has a greater number of modules than the first group of camera modules, and the shooting environment of each image in the first group of multispectral images and the second group of multispectral images is the same.
[0026] It should be noted that the same shooting environment includes the same shooting object, the same ambient brightness and the same ambient light intensity.
[0027] refer to Figure 2 and Figure 3 As shown, Figure 2 is a first schematic diagram of a multispectral image in an embodiment of the present invention, Figure 3 This is a second schematic diagram of a multispectral image in an embodiment of the present invention. The multispectral image includes multiple channels, which can be channels C1 to C4 or channels C1 to C9. Each pixel point of the multispectral image corresponds to a channel, and the pixel value corresponding to the channel is used to represent the brightness of light allowed to pass through the channel. The pixel value can range from 0 to 255, and the larger the pixel value, the greater the brightness.
[0028] S102: Determine a standard camera module from the first group of camera modules based on the first group of multispectral images.
[0029] It should be noted that both the first and second camera modules belong to a batch of camera modules produced within a certain period of time. The first group of camera modules is used to determine the standard camera modules, and the second group of camera modules can be the remaining camera modules in the batch except for the standard camera modules. Therefore, the number of camera modules in the second group is greater than that in the first group of camera modules. Specifically, assuming that the number of camera modules produced within a certain period of time is 1,000, numbered from module 0001 to module 1000, the number of camera modules in the first group can be 100, specifically referring to modules numbered from 0001 to 0100, and the standard camera module can be module 0001. Then, the number of camera modules in the second group can be 999, specifically referring to modules numbered from 0002 to 1000.
[0030] In some embodiments, the number of camera modules in the first group may be greater than 50. Specifically, the number of camera modules in the first group may be 1000. When the number of camera modules in the first group is 1000, a sufficient number of samples is ensured, thereby ensuring that the standard camera modules determined from the first group of camera modules are qualified modules, thereby improving the accuracy of subsequent module detection.
[0031] In some implementations, step S102 may include the following steps S1021 to S1024:
[0032] S1021: taking each image in the first group of multispectral images in turn as a first target multispectral image.
[0033] S1022: Determine a region of interest (ROI) of the first target multispectral image, where the ROI includes multiple channels.
[0034] In some embodiments, determining the region of interest of the first target multispectral image may include: acquiring a starting position and an ending position; and determining the region of interest of the first target multispectral image based on the starting position and the ending position.
[0035] It should be noted that the region of interest is a part of the first target multispectral image. Figure 2 and Figure 3 As shown, the region of interest can be Figure 2 or Figure 3 The shaded part in .
[0036] S1023: Determine first brightness data within the region of interest of the first target multispectral image, where the brightness data is used to characterize the brightness of light allowed to pass through each of the multiple channels.
[0037] It should be noted that while determining the first brightness data based on the entire area of the first target's multispectral image is feasible, calculating the entire area significantly increases the computational load and reduces the computational speed. Therefore, determining the first brightness data based on a portion of the first target's multispectral image—that is, determining the first brightness data based on the region of interest—reduces the computational load, increases the computational speed, and thus improves the module's detection efficiency.
[0038] In some embodiments, step S1023 may include: determining the average pixel value of each of the multiple channels within the region of interest of the first target multispectral image; taking the sum of the average pixel values of each of the multiple channels as the total pixel value; determining, for each of the multiple channels, a pixel ratio of the channel based on the average pixel value of the channel and the total pixel value; and taking the pixel ratio of each of the multiple channels as the first brightness data.
[0039] refer to Figure 2 and Figure 3 As shown, the image is arranged according to √N*√N channels (C1~CN), where √N is the square root of the number of channels of multiple channels, and √N*√N channels refers to all channels in the C1~CN channels. To calculate the average pixel value of each channel in the region of interest, you only need to confirm which channel each data from the start coordinate to the end coordinate in the region of interest belongs to. According to the row (m_row) and column (m_col) to which each pixel point in the region of interest belongs in the entire image, m_row is moduloed by √N, and m_col is moduloed by √N to get modcol. There are √N possible values for modrow, namely 0, 1, 2...(√N-1), where m_row is the row number and m_col is the column number. There are √N possible values for modcol, namely 0, 1, 2...(√N-1), and then the channel corresponding to the pixel value of the pixel point can be determined based on the combination of modrow and modcol values. Reference Figure 2 As shown, taking √N equal to 2 as an example, when modrow=0, modcol=0, the pixel corresponds to channel C1, when modrow=0, modcol=1, the pixel corresponds to channel C2, when modrow=1, modcol=0, the pixel corresponds to channel C3, and when modrow=1, modcol=1, the pixel corresponds to channel C4. Figure 3As shown, taking √N equal to 3 as an example, when modrow=0, modcol=0, the pixel corresponds to channel C1, when modrow=0, modcol=1, the pixel corresponds to channel C2, when modrow=0, modcol=2, the pixel corresponds to channel C3, when modrow=1, modcol=0, the pixel corresponds to channel C4, when modrow=1, modcol=1, the pixel corresponds to channel C5, when modrow=1, modcol=2, the pixel corresponds to channel C6, when modrow=2, modcol=0, the pixel corresponds to channel C7, when modrow=2, modcol=1, the pixel corresponds to channel C8, and when modrow=2, modcol=2, the pixel corresponds to channel C9.
[0040] In some embodiments, determining the pixel ratio of the channel based on the average pixel value and the total pixel value of the channel may be: taking the quotient of the average pixel value and the total pixel value of the channel as the pixel ratio of the channel.
[0041] For example, assume that within the region of interest of a first target multispectral image, multiple channels are channels C1 to C4, and the pixel values of channel C1 include 100, 101, 101, and 98; the pixel values of channel C2 include 20, 20, 19, and 21; the pixel values of channel C3 include 200, 201, 201, and 198; and the pixel values of channel C4 include 81, 80, 79, and 80. Then, the average pixel value of channel C1 is the average of 100, 101, 101, and 98, that is, 100; the average pixel value of channel C2 is the average of 20, 20, 19, and 21, that is, 20; the average pixel value of channel C3 is the average of 200, 201, 201, and 198, that is, 200; and the average pixel value of channel C4 is the average of 81, 80, 79, and 80, that is, 80. The total pixel value is the sum of 100, 20, 200, and 80, that is, 400. The pixel ratio of channel C1 is 100÷400=0.25, the pixel ratio of channel C2 is 20÷400=0.05, the pixel ratio of channel C3 is 200÷400=0.5, and the pixel ratio of channel C4 is 80÷400=0.2. Therefore, the first brightness data in the region of interest of the first target multispectral image are 0.25, 0.05, 0.5, and 0.2.
[0042] S1024: Determine a standard camera module from the first group of camera modules based on the first brightness data of each image in the first group of multispectral images.
[0043] In some embodiments, step S1024 may include: sequentially taking multiple channels as target channels; under the target channel, selecting the pixel ratio of each image in the first group of multispectral images as a set of ratio values; taking the average of the set of ratio values as the ratio average of the target channel; taking the ratio average of each channel in the multiple channels as second brightness data; based on the second brightness data, determining standard first brightness data from the first brightness data of each image in the first group of multispectral images; and taking the module corresponding to the standard first brightness data as the standard camera module.
[0044] In some embodiments, based on the second brightness data, standard first brightness data is determined from the first brightness data of each image in the first group of multispectral images, including: taking the first brightness data of each image in the first group of multispectral images in turn as the target first brightness data; determining the degree of discreteness of the target first brightness data relative to the second brightness data through variance to obtain the variance value corresponding to the target first brightness data; and determining the standard first brightness data based on the variance value corresponding to the first brightness data of each image in the first group of multispectral images.
[0045] It should be noted that among a batch of camera modules produced over a period of time, most are qualified modules, and only a small number are defective modules. In other words, in the first group of camera modules, the first brightness data of a small number of modules are unqualified, while the first brightness data of the majority of modules are qualified. Because the second brightness data is the averaged data, the second brightness data reduces the impact of the unqualified data, making the second brightness data qualified data. Furthermore, the smaller the variance value, the smaller the degree of dispersion between the first brightness data and the second brightness data corresponding to the variance value, that is, the closer the first brightness data and the second brightness data are. Therefore, the first brightness data corresponding to the minimum variance value can be used as the standard first brightness data.
[0046] It should be noted that the larger the number of the first group of multispectral images, the more accurately the standard camera module can be determined. Theoretically, the number of the first group of multispectral images can be 100, 1000, or 2000, or even more. However, for the convenience of illustration, a smaller number of images is selected here. For example, assuming that the number of the first group of multispectral images is 3, the multiple channels are channels C1 to C4, the first group of multispectral images includes a first multispectral image, a second multispectral image, and a third multispectral image, the first brightness data of the first multispectral image is 0.25, 0.05, 0.5, and 0.2 (the data corresponds to channels C1 to C4 in order), the first brightness data of the second multispectral image is 0.24, 0.06, 0.5, and 0.2, and the first brightness data of the third multispectral image is 0.25, 0.05, 0.45, and 0.25. Then, when the target channel is channel C1, a set of proportional values is 0.25, 0.24 and 0.25, and the average proportional value of channel C1 is 0.247; when the target channel is channel C2, a set of proportional values is 0.05, 0.06 and 0.05, and the average proportional value of channel C2 is 0.053; when the target channel is channel C3, a set of proportional values is 0.5, 0.5 and 0.45, and the average proportional value of channel C3 is 0.483; when the target channel is channel C4, a set of proportional values is 0.2, 0.2 and 0.25, and the average proportional value of channel C4 is 0.217. Therefore, the second brightness data are 0.247, 0.053, 0.483, and 0.217. Referring to the following formula (1), we can know that the variance value corresponding to the first brightness data of the first multispectral image is 0.000149. Referring to the following formula (2), we can know that the variance value corresponding to the first brightness data of the second multispectral image is 0.000169. Referring to the following formula (3), we can know that the variance value corresponding to the first brightness data of the third multispectral image is 0.000549. The minimum variance value is 0.000149. Therefore, the standard first brightness data is the first brightness data of the first multispectral image, and the module corresponding to the first multispectral image is the standard camera module.
[0047]
[0048] S103: performing consistency comparison between the standard multispectral image of the standard camera module and each image in the second group of multispectral images to determine whether each module in the second group of camera modules is a defective module.
[0049] In some implementations, step S103 may include the following steps S1031 to S1034:
[0050] S1031: taking each image in the second group of multispectral images in turn as a second target multispectral image.
[0051] S1032: Determine a region of interest of the second target multispectral image, where the region of interest includes multiple channels.
[0052] It should be noted that the region of interest of the second target multispectral image may be the same as the region of interest of the first target multispectral image.
[0053] S1033: Determine third brightness data within the region of interest of the second target multispectral image.
[0054] It should be noted that, similar to the process of obtaining the first brightness data, the third brightness data also includes the pixel ratio of each channel in the multiple channels.
[0055] S1034: Compare the standard first brightness data with the third brightness data of each image in the second group of multispectral images for consistency, so as to determine whether each module in the second group of camera modules is a defective module.
[0056] It should be noted that the data used for consistency comparison can be in various forms. Using data obtained through complex transformations for consistency comparison will increase program complexity. Therefore, the embodiment of the present invention uses brightness data, which can be directly obtained through the pixel values of each channel. The brightness data is then compared with the consistency of the brightness data to determine the defective module. This avoids the use of data obtained through complex transformations for consistency comparison, reduces program complexity, and improves the convenience of module detection.
[0057] In some embodiments, step S1034 may include: sequentially using the third brightness data of each image in the second set of multispectral images as the target third brightness data; determining a deviation coefficient between the target third brightness data and the standard first brightness data; and if the deviation coefficient is greater than a preset deviation threshold, determining that the module corresponding to the target third brightness data is a defective module.
[0058] It should be noted that if the deviation coefficient is less than or equal to the preset deviation threshold, the module corresponding to the target third brightness data is determined to be a qualified module.
[0059] In some embodiments, the deviation coefficient includes a first deviation sub-coefficient and a second deviation sub-coefficient, and determining the deviation coefficient between the target third brightness data and the standard first brightness data may include: calculating the deviation rate of the pixel ratio of the corresponding channel in the target third brightness data and the standard first brightness data to obtain a set of deviation rates; taking the maximum value in a set of deviation rates as the first deviation sub-coefficient; and taking the average value of a set of deviation rates as the second deviation sub-coefficient.
[0060] In some embodiments, the deviation rate of the pixel ratio of the target third brightness data and the corresponding channel in the standard first brightness data is calculated to obtain a set of deviation rates, which can be: taking each channel of the multiple channels as the target channel in turn; under the target channel, taking the quotient of the pixel ratio of the target third brightness data and the pixel ratio of the standard first brightness data as the first value; taking the difference of one minus the first value as the second value; taking the product of the second value and 100% as the third value; taking the absolute value of the third value as the fourth value; and taking the fourth value corresponding to each channel of the multiple channels as a set of deviation rates.
[0061] In some embodiments, if the deviation coefficient is greater than a preset deviation threshold, the module corresponding to the target third brightness data is determined to be a bad module. It can be: if the first deviation sub-coefficient is greater than the preset first deviation threshold, and / or the second deviation sub-coefficient is greater than the preset second deviation threshold, the module corresponding to the target third brightness data is determined to be a bad module.
[0062] It should be noted that if only one judgment condition is set, misjudgment may occur. For example, if the deviation coefficient only includes the second deviation sub-coefficient, the second deviation sub-coefficient of the defective module may be up to standard, which will result in the inability to accurately detect the defective module. Therefore, the embodiment of the present invention limits the first deviation sub-coefficient to be greater than the preset first deviation threshold or the second deviation sub-coefficient to be greater than the preset second deviation threshold, and both determine that the module corresponding to the target third brightness data is a defective module. Therefore, in the case where the deviation coefficient includes the first deviation sub-coefficient and the second deviation sub-coefficient, a judgment condition is added, and any one that does not meet the standard is determined to be a defective module, which also improves the detection rate of defective modules.
[0063] The embodiment of the present invention obtains a first set of multispectral images captured by a first set of camera modules and a second set of multispectral images captured by a second set of camera modules, wherein the second set of camera modules has a greater number of modules than the first set of camera modules, and each image in the first and second sets of multispectral images is captured under the same shooting environment; based on the first set of multispectral images, a standard camera module is determined from the first set of camera modules; and the standard multispectral image of the standard camera module is compared for consistency with each image in the second set of multispectral images to determine whether each module in the second set of camera modules is a defective module. It should be noted that if the multispectral image consistency is high, it indicates that the performance consistency of the module is high with that of the standard camera module, and the module is determined to be a qualified module. If the multispectral image consistency is low, it indicates that the performance consistency of the module is low with that of the standard camera module, and the module is determined to be a defective module. This consistency comparison avoids the need for manual testing of items such as white balance and brightness uniformity, thereby avoiding the time-consuming inspection process caused by each test item. Therefore, the inspection efficiency of the camera module is improved.
[0064] Based on the same invention concept, Figure 4 As shown, an embodiment of the present invention provides a camera module detection device 10, including: an image acquisition unit 110, used to acquire a first group of multispectral images taken by a first group of camera modules and a second group of multispectral images taken by a second group of camera modules, the number of modules in the second group of camera modules is greater than that of the first group of camera modules, and the shooting environment of each image in the first group of multispectral images and the second group of multispectral images is the same; a standard determination unit 120, used to determine a standard camera module from the first group of camera modules based on the first group of multispectral images; a judgment unit 130, used to compare the standard multispectral image of the standard camera module with each image in the second group of multispectral images for consistency, so as to determine whether each module in the second group of camera modules is a defective module.
[0065] It can be understood that the standard determination unit 120 includes: a first target image determination subunit, which is used to sequentially take each image in the first group of multispectral images as the first target multispectral image; a first area determination subunit, which is used to determine the area of interest of the first target multispectral image, where the area of interest includes multiple channels; a first brightness data determination subunit, which is used to determine first brightness data within the area of interest of the first target multispectral image, where the brightness data is used to characterize the brightness of light allowed to pass through each channel in the multiple channels; and a module determination subunit, which is used to determine a standard camera module from the first group of camera modules based on the first brightness data of each image in the first group of multispectral images.
[0066] It can be understood that the first brightness data determination subunit is specifically used to: determine the average pixel value of each channel in the multiple channels within the region of interest of the first target multispectral image; take the sum of the average pixel values of each channel in the multiple channels as the total pixel value; for each channel in the multiple channels, determine the pixel ratio of the channel based on the average pixel value of the channel and the total pixel value; and take the pixel ratio of each channel in the multiple channels as the first brightness data.
[0067] It can be understood that the module determination subunit is specifically used to: sequentially use multiple channels as target channels; under the target channel, select the pixel ratio of each image in the first group of multispectral images as a set of ratio values; use the average of the set of ratio values as the ratio average of the target channel; use the ratio average of each channel in the multiple channels as the second brightness data; based on the second brightness data, determine the standard first brightness data from the first brightness data of each image in the first group of multispectral images; and use the module corresponding to the standard first brightness data as the standard camera module. Wherein, based on the second brightness data, determining the standard first brightness data from the first brightness data of each image in the first group of multispectral images includes: sequentially using the first brightness data of each image in the first group of multispectral images as the target first brightness data; determining the degree of dispersion of the target first brightness data relative to the second brightness data through variance to obtain the variance value corresponding to the target first brightness data; and determining the standard first brightness data based on the variance value corresponding to the first brightness data of each image in the first group of multispectral images.
[0068] It can be understood that the judgment unit 130 includes: a second target image determination subunit, which is used to sequentially take each image in the second group of multispectral images as the second target multispectral image; a second area determination subunit, which is used to determine the area of interest of the second target multispectral image, and the area of interest includes multiple channels; a third brightness data determination subunit, which is used to determine the third brightness data within the area of interest of the second target multispectral image; and a comparison subunit, which is used to compare the standard first brightness data with the third brightness data of each image in the second group of multispectral images for consistency, so as to determine whether each module in the second group of camera modules is a defective module.
[0069] It is understood that the comparison subunit is specifically configured to: sequentially use the third brightness data of each image in the second set of multispectral images as the target third brightness data; determine the deviation coefficient between the target third brightness data and the standard first brightness data; and if the deviation coefficient is greater than a preset deviation threshold, determine that the module corresponding to the target third brightness data is a defective module. The deviation coefficient includes a first deviation sub-coefficient and a second deviation sub-coefficient. Determining the deviation coefficient between the target third brightness data and the standard first brightness data includes: calculating the deviation ratio of the pixel ratios of the corresponding channels in the target third brightness data and the standard first brightness data to obtain a set of deviation ratios; determining the maximum value in the set of deviation ratios as the first deviation sub-coefficient; and determining the average value of the set of deviation ratios as the second deviation sub-coefficient.
[0070] It should be understood that more implementation details of the camera module detection device 10 in the embodiment of the present invention are described in the aforementioned camera module detection method, and for the sake of brevity of the specification, they are not repeated here.
[0071] Based on the same inventive concept, an embodiment of the present invention further provides an electronic device, such as Figure 5 As shown, it includes a memory 504, a processor 502 and a computer program stored in the memory 504 and capable of running on the processor 502. The processor 502 executes the program to implement the steps described in any implementation of the embodiment of the camera module detection method.
[0072] Among them, Figure 5 In the embodiment of the present invention, a bus architecture (represented by bus 500) is shown. Bus 500 may include any number of interconnected buses and bridges, and bus 500 links various circuits including one or more processors represented by processor 502 and memory represented by memory 504. Bus 500 may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. Bus interface 505 provides an interface between bus 500 and receiver 501 and transmitter 503. Receiver 501 and transmitter 503 may be the same component, namely a transceiver, which provides a unit for communicating with various other devices over a transmission medium. Processor 502 is responsible for managing bus 500 and general processing, while memory 504 may be used to store data used by processor 502 when performing operations.
[0073] The functions described herein may be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, the functions may be stored as one or more instructions or codes on or transmitted via a computer-readable medium. Other examples and implementations are within the scope and spirit of the present invention and the appended claims. For example, due to the nature of software, the functions described above may be implemented using software executed by a processor, hardware, firmware, hardwiring, or a combination of any of these. Furthermore, each functional unit may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.
[0074] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0075] The units described as separate components may or may not be physically separate, and the components of the control device may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0076] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program codes.
[0077] The foregoing description is merely an embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be included within the scope of the claims.
Claims
1. A camera module detection method, characterized in that: include: Acquire a first group of multispectral images captured by a first group of camera modules and a second group of multispectral images captured by a second group of camera modules, wherein the second group of camera modules has a greater number of modules than the first group of camera modules, and the shooting environment of each image in the first group of multispectral images and the second group of multispectral images is the same; Based on the first group of multispectral images, determining a standard camera module from the first group of camera modules; The standard multispectral image of the standard camera module is respectively compared with each image in the second group of multispectral images for consistency to determine whether each module in the second group of camera modules is a defective module.
2. The camera module detection method according to claim 1, characterized in that: The determining a standard camera module from the first group of camera modules based on the first group of multispectral images includes: sequentially taking each image in the first group of multispectral images as a first target multispectral image; Determine a region of interest of the first target multispectral image, wherein the region of interest includes a plurality of channels; Determining first brightness data within a region of interest of the first target multispectral image, wherein the brightness data is used to characterize the brightness of light allowed to pass through each of the multiple channels; The standard camera module is determined from the first group of camera modules based on the first brightness data of each image in the first group of multi-spectral images.
3. The camera module detection method according to claim 2, characterized in that: Determining first brightness data within a region of interest of the first target multispectral image includes: Determining, within a region of interest of the first target multispectral image, an average pixel value of each of the plurality of channels; Taking the sum of the average pixel values of each channel in the multiple channels as the total pixel value; For each channel of the plurality of channels, determining a pixel ratio of the channel based on an average pixel value of the channel and the total pixel value; The pixel ratio of each channel in the multiple channels is used as the first brightness data.
4. The camera module detection method according to claim 3, characterized in that: The determining the standard camera module from the first group of camera modules based on the first brightness data of each image in the first group of multispectral images comprises: sequentially taking the multiple channels as target channels; Under the target channel, selecting the pixel ratio of each image in the first group of multispectral images as a group of ratio values; Taking the average value of the set of ratio values as the average value of the ratio of the target channel; Taking the proportional average value of each channel in the multiple channels as second brightness data; determining standard first brightness data from the first brightness data of each image in the first group of multispectral images based on the second brightness data; The module corresponding to the standard first brightness data is used as the standard camera module.
5. The camera module detection method according to claim 4, characterized in that: The step of determining standard first brightness data from first brightness data of each image in the first group of multispectral images based on the second brightness data comprises: sequentially taking the first brightness data of each image in the first group of multispectral images as target first brightness data; Determine the discreteness of the target first brightness data relative to the second brightness data through the variance to obtain the variance value corresponding to the target first brightness data; The standard first brightness data is determined based on a variance value corresponding to the first brightness data of each image in the first group of multi-spectral images.
6. The camera module detection method according to claim 5, characterized in that: The step of comparing the consistency of the standard multispectral image of the standard camera module with each image in the second group of multispectral images to determine whether each module in the second group of camera modules is a bad module includes: sequentially taking each image in the second group of multispectral images as a second target multispectral image; Determine a region of interest of the second target multispectral image, wherein the region of interest includes a plurality of channels; determining third brightness data within a region of interest of the second target multispectral image; The standard first brightness data is respectively compared with the third brightness data of each image in the second group of multi-spectral images for consistency, so as to determine whether each module in the second group of camera modules is a defective module.
7. The camera module detection method according to claim 6, characterized in that: The step of comparing the standard first brightness data with the third brightness data of each image in the second group of multispectral images for consistency, so as to determine whether each module in the second group of camera modules is a bad module, includes: sequentially taking the third brightness data of each image in the second group of multispectral images as target third brightness data; Determining a deviation coefficient between the target third brightness data and the standard first brightness data; If the deviation coefficient is greater than a preset deviation threshold, it is determined that the module corresponding to the target third brightness data is a bad module.
8. The camera module detection method according to claim 7, characterized in that: The deviation coefficient includes a first deviation sub-coefficient and a second deviation sub-coefficient, and determining the deviation coefficient between the target third brightness data and the standard first brightness data includes: Calculating the deviation rate of the pixel ratio of the corresponding channel in the target third brightness data and the standard first brightness data to obtain a set of deviation rates; Taking the maximum value among the set of deviation rates as the first deviation sub-coefficient; An average value of the set of deviation rates is used as the second deviation sub-coefficient.
9. A camera module detection device, characterized in that: include: An image acquisition unit, used to acquire a first group of multispectral images taken by a first group of camera modules and a second group of multispectral images taken by a second group of camera modules, wherein the number of modules of the second group of camera modules is greater than that of the first group of camera modules, and the shooting environment of each image in the first group of multispectral images and the second group of multispectral images is the same; a standard determination unit, configured to determine a standard camera module from the first group of camera modules based on the first group of multispectral images; A judging unit is used to compare the standard multispectral image of the standard camera module with each image in the second group of multispectral images for consistency, so as to judge whether each module in the second group of camera modules is a bad module.
10. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 8 when executing the computer program.
Citation Information
Cited By
Camera quality detection method and system based on data analysis
CN120529068A
A camera quality detection method and system based on data analysis
CN120529068B