A method, apparatus, electronic device and storage medium for detecting light spot quality
Patent Information
- Application Number
- CN202310304107.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-27
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2043-03-27
AI Technical Summary
[0005]本发明实施例提供了一种光斑质量检测方法、装置、电子设备及存储介质,以解决现有技术中对摄像机激光补光装置的质量检测效果较差的问题
[0052]本发明实施例中,首先获取图像采集设备采集的视场边界的第一位置信息以及补光设备发射的光斑的第二位置信息,然后根据第一位置信息和第二位置信息生成光斑圆心与视场边界中心点的偏移量,以及生成光斑边缘与视场边界边缘的偏移量,接着依据第一偏移量和第二偏移量进行对量化指标,即偏移角的确定,最后依据偏移角的大小来确定光斑质量检测结果,通过该方法,可以对不同型号下的图像采集设备以及补光设备进行光斑质量的量化评价,同时也提高了对摄像机激光补光装置的质量检测效果。
Smart Images

Figure CN116465602B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus, electronic device, and storage medium for detecting light spot quality. Background Technology
[0002] The infrared low-light supplementary lighting device for cameras is a nighttime auxiliary lighting product designed for video surveillance systems. Specifically, it uses a near-infrared semiconductor light source to output a high-power infrared laser, which, together with a beam expander that can remotely control the size of the light spot, illuminates targets within a certain range. It can adjust the lighting intensity and focal length, and is a commonly used night vision auxiliary module for cameras.
[0003] Since the quality of the laser fill light spot directly affects the night imaging effect of the camera, it is particularly important to control its quality. In the current technology, the quality of the laser fill light spot is usually judged based on the final imaging effect. Therefore, the judgment standard is relatively subjective and cannot obtain quantitative results.
[0004] It is evident that existing technologies have poor quality control capabilities for camera laser illumination devices. Summary of the Invention
[0005] This invention provides a method, apparatus, electronic device, and storage medium for detecting light spot quality, in order to solve the problem of poor quality detection effect of laser supplementary lighting devices for cameras in the prior art.
[0006] In a first aspect, embodiments of the present invention provide a method for detecting light spot quality, comprising:
[0007] Acquire first image information, which includes first position information of the field of view boundary acquired by the image acquisition device and second position information of the light spot emitted by the supplementary lighting device. The image acquisition device is used in conjunction with the supplementary lighting device.
[0008] A first offset and a second offset are generated based on the first position information and the second position information. The first offset represents the offset between the center of the circle and the center point, and the second offset represents the offset between the first edge and the second edge. The center of the circle is the center of the light spot, the center point is the geometric center of the field of view boundary, the first edge is the edge of the light spot, and the second edge is the edge of the field of view boundary.
[0009] The offset angle is determined based on the first offset and the second offset;
[0010] The spot quality detection result is determined based on the offset angle, and the spot quality detection result is used to demonstrate the performance evaluation of the supplementary lighting device.
[0011] Optionally, the first image information includes one of the following: image information when the focal length of the image acquisition device is short, image information when the focal length of the image acquisition device is medium, or image information when the focal length of the image acquisition device is long.
[0012] Optionally, the first offset includes a first horizontal offset and a first vertical offset, and the second offset includes a second horizontal offset and a second vertical offset.
[0013] The step of generating a first offset and a second offset based on the first location information and the second location information includes:
[0014] A coordinate system is created based on the first position information, wherein the horizontal axis and vertical axis of the coordinate system are parallel to the two perpendicular sides of the boundary, and the center point is set as the origin of the coordinate system.
[0015] The distance from the center of the circle to the vertical axis is calculated based on the coordinate system and the second position information to obtain the first horizontal offset.
[0016] The distance from the center of the circle to the horizontal axis is calculated based on the coordinate system and the second position information to obtain the first vertical offset.
[0017] The maximum horizontal distance from the first edge to the second edge is calculated based on the coordinate system, the first position information, and the second position information to obtain the second horizontal offset.
[0018] The maximum vertical distance from the first edge to the second edge is calculated based on the coordinate system, the first position information, and the second position information to obtain the second vertical offset.
[0019] Optionally, the offset angle includes the spot center offset angle and the spot boundary offset angle;
[0020] Determining the offset angle based on the first offset and the second offset includes:
[0021] Acquire the horizontal field of view, the vertical field of view, and the horizontal and vertical length values of the boundary field of view of the image acquisition device;
[0022] The first offset angle is obtained by multiplying the ratio of the first horizontal offset to the horizontal length value by the horizontal field of view, and the second offset angle is obtained by multiplying the ratio of the first vertical offset to the vertical length value by the vertical field of view. The spot center offset angle includes the first offset angle and the second offset angle.
[0023] The ratio of the second horizontal offset to the horizontal length value is multiplied by the horizontal field of view to obtain the third offset angle, and the ratio of the second vertical offset to the vertical length value is multiplied by the vertical field of view to obtain the fourth offset angle. The spot boundary offset angle includes the third offset angle and the fourth offset angle.
[0024] Optionally, the spot quality detection result includes a first detection result or a second detection result;
[0025] The determination of the spot quality detection result based on the spot quality detection information includes one of the following:
[0026] When both the center offset angle and the boundary offset angle of the light spot are within a preset angle range, the first detection result is generated, indicating that the supplementary lighting device meets the requirements of the image acquisition device.
[0027] If at least one of the spot center offset angle and the spot boundary offset angle is outside the preset angle range, the second detection result is generated, and the second detection result indicates that the supplementary lighting device does not meet the requirements of the image acquisition device.
[0028] Secondly, embodiments of the present invention provide a spot quality detection device, comprising:
[0029] The acquisition module is used to acquire first image information, which includes first position information of the field of view boundary acquired by the image acquisition device and second position information of the light spot emitted by the supplementary lighting device. The image acquisition device is used in conjunction with the supplementary lighting device.
[0030] The generation module is used to generate a first offset and a second offset based on the first position information and the second position information. The first offset represents the offset between the center of the circle and the center point, and the second offset represents the offset between the first edge and the second edge. The center of the circle is the center of the light spot, the center point is the geometric center of the field of view boundary, the first edge is the edge of the light spot, and the second edge is the edge of the field of view boundary.
[0031] The first determining module is used to determine the offset angle based on the first offset and the second offset;
[0032] The second determining module is used to determine the spot quality detection result based on the offset angle, and the spot quality detection result is used to display the performance evaluation of the supplementary lighting device.
[0033] Optionally, the generation module includes:
[0034] A creation unit is used to create a coordinate system based on the first position information. The horizontal axis and vertical axis of the coordinate system are parallel to the two vertical sides of the boundary, respectively, and the center point is set as the origin of the coordinate system.
[0035] The first calculation unit is used to calculate the distance from the center of the circle to the vertical axis based on the coordinate system and the second position information, so as to obtain the first horizontal offset.
[0036] The second calculation unit is used to calculate the distance from the center of the circle to the horizontal axis based on the coordinate system and the second position information, so as to obtain the first vertical offset.
[0037] The third calculation unit is used to calculate the maximum horizontal distance from the first edge to the second edge based on the coordinate system, the first position information and the second position information, so as to obtain the second horizontal offset.
[0038] The fourth calculation unit is used to calculate the maximum vertical distance from the first edge to the second edge based on the coordinate system, the first position information and the second position information, so as to obtain the second vertical offset.
[0039] Optionally, the first determining module includes:
[0040] The acquisition unit is used to acquire the horizontal field of view, the vertical field of view, and the horizontal and vertical length values of the boundary field of view of the image acquisition device;
[0041] The first processing unit is configured to multiply the ratio of the first horizontal offset to the horizontal length value by the horizontal field of view to obtain a first offset angle, and multiply the ratio of the first vertical offset to the vertical length value by the vertical field of view to obtain a second offset angle, wherein the spot center offset angle includes the first offset angle and the second offset angle;
[0042] The second processing unit is used to multiply the ratio of the second horizontal offset to the horizontal length value by the horizontal field of view to obtain a third offset angle, and to multiply the ratio of the second vertical offset to the vertical length value by the vertical field of view to obtain a fourth offset angle. The spot boundary offset angle includes the third offset angle and the fourth offset angle.
[0043] Optionally, the second determining module includes:
[0044] The first generation unit is used to generate the first detection result when both the center offset angle and the boundary offset angle of the light spot are within a preset angle range. The first detection result indicates that the supplementary lighting device meets the requirements of the image acquisition device.
[0045] The second generation unit is used to generate the second detection result when at least one of the spot center offset angle and the spot boundary offset angle is outside the preset angle range. The second detection result indicates that the supplementary lighting device does not meet the requirements of the image acquisition device.
[0046] Thirdly, embodiments of the present invention provide an electronic device, including:
[0047] At least one processor; and
[0048] A memory communicatively connected to the at least one processor; wherein,
[0049] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the spot quality detection method described in the first aspect.
[0050] Fourthly, embodiments of the present invention provide a non-transitory computer-readable storage medium storing computer instructions, comprising:
[0051] The computer instructions are used to cause the computer to execute the spot quality detection method according to the first aspect.
[0052] In this embodiment of the invention, firstly, the first position information of the field of view boundary acquired by the image acquisition device and the second position information of the light spot emitted by the supplementary lighting device are obtained. Then, based on the first and second position information, the offset between the center of the light spot and the center point of the field of view boundary, and the offset between the edge of the light spot and the edge of the field of view boundary are generated. Next, the quantitative index, namely the offset angle, is determined based on the first and second offsets. Finally, the light spot quality detection result is determined based on the magnitude of the offset angle. Through this method, the light spot quality of image acquisition devices and supplementary lighting devices of different models can be quantitatively evaluated, and the quality detection effect of camera laser supplementary lighting devices is also improved.
[0053] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0054] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1 This is a schematic flowchart of a spot quality detection method provided in an embodiment of the present invention;
[0056] Figure 2 This is one of the schematic diagrams of image information provided in the embodiments of the present invention;
[0057] Figure 3 This is a second schematic diagram of image information provided in an embodiment of the present invention;
[0058] Figure 4 This is a schematic diagram of image information provided in an embodiment of the present invention;
[0059] Figure 5 This is a left view of the image acquisition device provided in the embodiment of the present invention in its working state;
[0060] Figure 6 This is a top view of the image acquisition device provided in the embodiment of the present invention in its working state;
[0061] Figure 7 This is a schematic diagram of the structure of a spot quality detection device provided in an embodiment of the present invention;
[0062] Figure 8 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present invention is shown. Detailed Implementation
[0063] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0064] In the embodiments of this invention, the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.
[0065] Please see Figure 1 , Figure 1 This is a schematic flowchart of a spot quality detection method provided in an embodiment of the present invention, as shown below. Figure 1 As shown, it includes the following steps:
[0066] Step 101: Acquire first image information, which includes first position information of the field of view boundary acquired by the image acquisition device and second position information of the light spot emitted by the supplementary lighting device. The image acquisition device is used in conjunction with the supplementary lighting device.
[0067] Step 102: Generate a first offset and a second offset based on the first position information and the second position information. The first offset represents the offset between the center of the circle and the center point, and the second offset represents the offset between the first edge and the second edge. The center of the circle is the center of the light spot, the center point is the geometric center of the field of view boundary, the first edge is the edge of the light spot, and the second edge is the edge of the field of view boundary.
[0068] Step 103: Determine the offset angle based on the first offset and the second offset;
[0069] Step 104: Determine the spot quality detection result based on the offset angle. The spot quality detection result is used to demonstrate the performance evaluation of the supplementary lighting device.
[0070] In this embodiment of the invention, steps 101, 102, 103 and 104 of the above-mentioned spot quality detection method can be executed by a computer or a virtual machine, and the present invention does not limit the execution of these steps.
[0071] In step 101, the image acquisition device can be any type of camera, and the lighting device can be a camera infrared laser lighting device. The camera infrared laser lighting device can be understood as a nighttime auxiliary lighting product designed for the image acquisition device. The camera infrared laser lighting device uses an infrared semiconductor light source to output a high-power infrared laser and a beam expander that can remotely control the size of the light spot to illuminate targets within a certain range, thereby achieving adjustment of lighting intensity and lighting focal length. The camera infrared laser lighting device is a commonly used night vision auxiliary module paired with a camera.
[0072] The aforementioned first image information includes first position information of the field of view boundary acquired by the image acquisition device and second position information of the light spot emitted by the supplementary lighting device. The aforementioned first position information and the aforementioned second position information include the following situations: the light spot emitted by the supplementary lighting device falls entirely within the field of view boundary acquired by the image acquisition device; a portion of the light spot emitted by the supplementary lighting device falls within the field of view boundary acquired by the image acquisition device, and another portion falls outside the field of view boundary acquired by the image acquisition device; the light spot emitted by the supplementary lighting device falls entirely outside the field of view boundary acquired by the image acquisition device.
[0073] In step 102, the first offset may be an offset between the center of the light spot and the geometric center of the field of view boundary. In some optional embodiments, the first offset may include a horizontal offset and a vertical offset between the center of the light spot and the geometric center of the field of view boundary.
[0074] Similarly, the second offset can be an offset between the edge of the light spot and the center of the edge of the field of view boundary. In some optional embodiments, the second offset can include a horizontal offset and a vertical offset between the edge of the light spot and the edge of the field of view boundary. When determining the horizontal offset between the edge of the light spot and the edge of the field of view boundary, the maximum value between the edge of the light spot and the edge of the field of view boundary needs to be taken. Similarly, the vertical offset between the edge of the light spot and the edge of the field of view boundary also needs to be taken as the maximum value.
[0075] In step 103, the aforementioned offset angle can be understood as a quantitative evaluation index used to evaluate the quality of the light spot.
[0076] In one implementation, the offset angles corresponding to the first offset and the second offset are determined by the first offset and the second offset, respectively, specifically by determining the offset angles proportionally according to the magnitude of the offsets.
[0077] In another implementation, different models of image acquisition devices have different field of view boundaries. Therefore, it is necessary to obtain the field of view angle corresponding to the image acquisition device. Finally, the offset angles corresponding to the acquired field of view angle, the first offset, and the second offset are determined. Specifically, the offset angle can be determined by multiplying the ratio of the offset to the size of the field of view boundary by the field of view angle. The size of the field of view boundary includes both the horizontal and vertical dimensions, and the field of view angle includes both the horizontal and vertical field of view angles.
[0078] In step 104, the spot quality detection result can be determined by the magnitude of the offset angle. In some optional embodiments, the user can set a normal offset angle range. If the offset angle is within the normal offset angle range, the obtained spot quality detection result indicates that the performance evaluation of the supplementary lighting device meets the user's requirements. If the offset angle is outside the normal offset angle range, the obtained spot quality detection result indicates that the performance evaluation of the supplementary lighting device does not meet the user's requirements.
[0079] It should be noted that the above-mentioned normal offset angle range can be set by the user according to actual needs, and this embodiment of the invention does not limit this.
[0080] In another optional implementation, the user can also set a critical angle value and compare the offset angle with the critical angle value. If the offset angle is greater than the critical angle value, the obtained spot quality detection result indicates that the performance evaluation of the supplementary lighting device does not meet the user's needs; if the offset angle is less than or equal to the critical angle value, the obtained spot quality detection result indicates that the performance evaluation of the supplementary lighting device meets the user's needs.
[0081] Similarly, the above-mentioned critical angle value can be set by the user according to actual needs, and this embodiment of the invention does not limit this.
[0082] In this implementation scheme, the first position information of the field of view boundary acquired by the image acquisition device and the second position information of the light spot emitted by the supplementary lighting device are first obtained. Then, the offset between the center of the light spot and the center point of the field of view boundary, and the offset between the edge of the light spot and the edge of the field of view boundary are generated based on the first and second position information. Next, the quantitative index, namely the offset angle, is determined based on the first and second offsets. Finally, the light spot quality detection result is determined based on the magnitude of the offset angle. Through this method, the light spot quality of image acquisition devices and supplementary lighting devices of different models can be quantitatively evaluated, and the quality detection effect of camera laser supplementary lighting devices is also improved.
[0083] Optionally, the first image information includes one of the following: image information when the focal length of the image acquisition device is short, image information when the focal length of the image acquisition device is medium, or image information when the focal length of the image acquisition device is long.
[0084] Please see Figure 2 , Figure 2 This is one of the schematic diagrams of image information provided by an embodiment of the present invention. As shown in the figure, the light spot falls completely within the boundary of the field of view. Figure 2 The image information corresponding to the image acquisition device under the condition of telephoto focal length, where O is the center of the spot, C is the geometric center of the field of view boundary, AC and BC can represent the first offset mentioned above, and GF and ED can represent the second offset mentioned above.
[0085] Please see Figure 3 , Figure 3 This is a second schematic diagram of image information provided by an embodiment of the present invention. As shown in the figure, part of the light spot falls within the boundary of the field of view, and another part falls outside the boundary of the field of view. Figure 3Image information corresponding to the image acquisition device when the focal length is in the middle focal length, where O is the center of the light spot, C is the geometric center of the field of view boundary, AC and BC can represent the first offset mentioned above, and GF and ED can represent the second offset mentioned above.
[0086] Please see Figure 4 , Figure 4 This is a third schematic diagram of image information provided by an embodiment of the present invention. As shown in the figure, part of the light spot falls within the boundary of the field of view, and another part falls outside the boundary of the field of view. Figure 4 The image information corresponding to the image acquisition device under the condition of short focal length, where O is the center of the spot, C is the geometric center of the field of view boundary, AC and BC can represent the first offset mentioned above, and GF and ED can represent the second offset mentioned above.
[0087] In some optional implementations, when measuring the first offset, it can be determined based on image information of the image acquisition device under short focal length, medium focal length, and long focal length conditions, thus obtaining the first offset under three focal length conditions. When measuring the second offset, it can be determined based on image information of the image acquisition device under short focal length and long focal length conditions, thus obtaining the second offset under two focal length conditions. This method can improve the accuracy of the above-mentioned spot quality detection results.
[0088] Optionally, the first offset includes a first horizontal offset and a first vertical offset, and the second offset includes a second horizontal offset and a second vertical offset.
[0089] The step of generating a first offset and a second offset based on the first location information and the second location information includes:
[0090] A coordinate system is created based on the first position information, wherein the horizontal axis and vertical axis of the coordinate system are parallel to the two perpendicular sides of the boundary, and the center point is set as the origin of the coordinate system.
[0091] The distance from the center of the circle to the vertical axis is calculated based on the coordinate system and the second position information to obtain the first horizontal offset.
[0092] The distance from the center of the circle to the horizontal axis is calculated based on the coordinate system and the second position information to obtain the first vertical offset.
[0093] The maximum horizontal distance from the first edge to the second edge is calculated based on the coordinate system, the first position information, and the second position information to obtain the second horizontal offset.
[0094] The maximum vertical distance from the first edge to the second edge is calculated based on the coordinate system, the first position information, and the second position information to obtain the second vertical offset.
[0095] In this implementation scheme, a coordinate system is first constructed with the center point as the origin. By constructing the coordinate system, the coordinates of each point on the light spot and the coordinates of each point on the field of view boundary can be determined, thereby obtaining the distance between any two points. Furthermore, the first horizontal offset, the first vertical offset, the second horizontal offset, and the second vertical offset can be determined by the coordinates of each point. This method can improve the accuracy of the first offset and the second offset, thereby making the light spot quality detection results more accurate.
[0096] The first horizontal offset and the first vertical offset are calculated based on the length of the center of the light spot and the center point of the field of view boundary. The second horizontal offset and the second vertical offset are calculated based on the length of the edge of the light spot and the edge of the field of view boundary. By calculating the two indicators of the center and the edge, the effect of light spot quality detection is improved and the error is reduced.
[0097] Optionally, the offset angle includes the spot center offset angle and the spot boundary offset angle;
[0098] Determining the offset angle based on the first offset and the second offset includes:
[0099] Acquire the horizontal field of view, the vertical field of view, and the horizontal and vertical length values of the boundary field of view of the image acquisition device;
[0100] The first offset angle is obtained by multiplying the ratio of the first horizontal offset to the horizontal length value by the horizontal field of view, and the second offset angle is obtained by multiplying the ratio of the first vertical offset to the vertical length value by the vertical field of view. The spot center offset angle includes the first offset angle and the second offset angle.
[0101] The ratio of the second horizontal offset to the horizontal length value is multiplied by the horizontal field of view to obtain the third offset angle, and the ratio of the second vertical offset to the vertical length value is multiplied by the vertical field of view to obtain the fourth offset angle. The spot boundary offset angle includes the third offset angle and the fourth offset angle.
[0102] In this embodiment, the ratio of the offset length value (horizontal offset value or vertical offset value) to the overall length value (length of the field of view boundary in the horizontal direction or width of the field of view boundary in the vertical direction) is, in a special case, equal to the ratio of the offset angle (horizontal offset angle or vertical offset angle) to the field of view angle (horizontal field of view angle or vertical field of view angle). Therefore, in this embodiment of the invention, the offset angle is calculated based on this data relationship. By using this method, the offset angle is calculated from the horizontal and vertical aspects as well as the center edge aspect. The calculation results from multiple aspects can improve the accuracy of the judgment. The quantitative calculation of the spot quality detection is completed based on the first offset angle, the second offset angle, the third offset angle, and the fourth offset angle. On the one hand, the accuracy of the spot quality detection result is improved, and on the other hand, the detection effect of the spot quality is also improved.
[0103] It should be noted that the first offset angle, the second offset angle, the third offset angle, and the fourth offset angle can be used as four quantitative indicators to determine the quality of the light spot. That is, when all of the first offset angle, the second offset angle, the third offset angle, and the fourth offset angle are within the preset angle range, the detection result is that the supplementary lighting device meets the requirements of the image acquisition device; when at least one of the first offset angle, the second offset angle, the third offset angle, and the fourth offset angle is not within the preset angle range, the detection result is that the supplementary lighting device does not meet the requirements of the image acquisition device.
[0104] Please see Figure 5 , Figure 5 This is a left view of the image acquisition device provided in this embodiment of the invention in its working state. In this case, the offset angle of the light spot center can be calculated, where O is the center of the light spot. Figure 5 As shown, the light spot is located slightly above the center point of the field of view boundary. R represents the position of the image acquisition device and the supplementary lighting device, E1RE2 is the vertical field of view angle, and the vertical offset of the light spot center is OC. Since CR >> OC, we can obtain:
[0105]
[0106] Where E1E2 is the width of the field of view boundary in the vertical direction.
[0107] In special cases, the vertical offset angle ORC of the spot center can be equal to the vertical field of view angle E1RE2 multiplied by the vertical offset of the spot center, which is the width value E1E2 of the vertical distance between OC and the field of view boundary.
[0108] For calculating the spot boundary offset angle, please refer to [link / reference]. Figure 6 , Figure 6This is a top view of the image acquisition device provided in this embodiment of the invention in its working state, where O is the center of the light spot, as shown below. Figure 6 As shown, the light spot is located slightly to the right of the center point of the field of view boundary. R represents the position of the image acquisition device and the supplementary lighting device, E1RE2 is the horizontal field of view angle, and the horizontal offset of the light spot boundary is E. F E1, since CR >> OC, then we can obtain:
[0109]
[0110] Among them, E F1 and E F2 E1E2 represents the boundary of the light spot, and E1E2 represents the length of the field of view boundary in the horizontal direction.
[0111] In special cases, the horizontal offset angle E of the light spot boundary F1 RE1 can be equal to the horizontal field of view E1RE2 multiplied by the horizontal offset of the spot boundary, which is E. F1 E1 is the width value E1E2 of the field of view boundary in the horizontal direction.
[0112] Based on the above method, the offset angle of the light spot center in the horizontal direction and the offset angle of the light spot boundary in the vertical direction can be calculated, which will not be elaborated in the embodiments of the present invention.
[0113] Optionally, the spot quality detection result includes a first detection result or a second detection result;
[0114] The determination of the spot quality detection result based on the spot quality detection information includes one of the following:
[0115] When both the center offset angle and the boundary offset angle of the light spot are within a preset angle range, the first detection result is generated, indicating that the supplementary lighting device meets the requirements of the image acquisition device.
[0116] If at least one of the spot center offset angle and the spot boundary offset angle is outside the preset angle range, the second detection result is generated, and the second detection result indicates that the supplementary lighting device does not meet the requirements of the image acquisition device.
[0117] In this implementation scheme, the spot quality detection result may include the first detection result or the second detection result. The first detection result indicates that the supplementary lighting device meets the requirements of the image acquisition device, while the second detection result indicates that the supplementary lighting device does not meet the requirements of the image acquisition device. Specifically, the offset angle is compared with a preset angle range set by the user to detect whether the offset angle is within the preset angle range, thereby obtaining the first detection result or the second detection result. This method can accurately obtain the spot quality detection result, thereby providing the user with an objective evaluation basis for the supplementary lighting device. Furthermore, the comparison method reduces the workload and complexity of image detection, thus improving the effect of spot quality detection.
[0118] It should be noted that, theoretically, the smaller the offset angle, the better. However, the equipment and actual site conditions need to be taken into account. Therefore, when setting the preset angle range, users can set it according to relevant indicators, and users can modify and update the preset angle range.
[0119] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a spot quality detection device provided in an embodiment of the present invention, as shown below. Figure 7 As shown, the spot quality detection device 700 includes:
[0120] The acquisition module 701 is used to acquire first image information, which includes first position information of the field of view boundary acquired by the image acquisition device and second position information of the light spot emitted by the supplementary lighting device. The image acquisition device is used in conjunction with the supplementary lighting device.
[0121] The generation module 702 is used to generate a first offset and a second offset based on the first position information and the second position information. The first offset represents the offset between the center of the circle and the center point, and the second offset represents the offset between the first edge and the second edge. The center of the circle is the center of the light spot, the center point is the geometric center of the field of view boundary, the first edge is the edge of the light spot, and the second edge is the edge of the field of view boundary.
[0122] The first determining module 703 is used to determine the offset angle based on the first offset and the second offset;
[0123] The second determining module 704 is used to determine the spot quality detection result based on the offset angle, and the spot quality detection result is used to display the performance evaluation of the supplementary lighting device.
[0124] Optionally, the generation module 702 includes:
[0125] A creation unit is used to create a coordinate system based on the first position information. The horizontal axis and vertical axis of the coordinate system are parallel to the two vertical sides of the boundary, respectively, and the center point is set as the origin of the coordinate system.
[0126] The first calculation unit is used to calculate the distance from the center of the circle to the vertical axis based on the coordinate system and the second position information, so as to obtain the first horizontal offset.
[0127] The second calculation unit is used to calculate the distance from the center of the circle to the horizontal axis based on the coordinate system and the second position information, so as to obtain the first vertical offset.
[0128] The third calculation unit is used to calculate the maximum horizontal distance from the first edge to the second edge based on the coordinate system, the first position information and the second position information, so as to obtain the second horizontal offset.
[0129] The fourth calculation unit is used to calculate the maximum vertical distance from the first edge to the second edge based on the coordinate system, the first position information and the second position information, so as to obtain the second vertical offset.
[0130] Optionally, the first determining module 703 includes:
[0131] The acquisition unit is used to acquire the horizontal field of view, the vertical field of view, and the horizontal and vertical length values of the boundary field of view of the image acquisition device;
[0132] The first processing unit is configured to multiply the ratio of the first horizontal offset to the horizontal length value by the horizontal field of view to obtain a first offset angle, and multiply the ratio of the first vertical offset to the vertical length value by the vertical field of view to obtain a second offset angle, wherein the spot center offset angle includes the first offset angle and the second offset angle;
[0133] The second processing unit is used to multiply the ratio of the second horizontal offset to the horizontal length value by the horizontal field of view to obtain a third offset angle, and to multiply the ratio of the second vertical offset to the vertical length value by the vertical field of view to obtain a fourth offset angle. The spot boundary offset angle includes the third offset angle and the fourth offset angle.
[0134] Optionally, the second determining module 704 includes:
[0135] The first generation unit is used to generate the first detection result when both the center offset angle and the boundary offset angle of the light spot are within a preset angle range. The first detection result indicates that the supplementary lighting device meets the requirements of the image acquisition device.
[0136] The second generation unit is used to generate the second detection result when at least one of the spot center offset angle and the spot boundary offset angle is outside the preset angle range. The second detection result indicates that the supplementary lighting device does not meet the requirements of the image acquisition device.
[0137] According to embodiments of the present invention, the present invention also provides an electronic device and a readable storage medium.
[0138] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0139] like Figure 8 As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 802 or a computer program loaded from storage unit 808 into random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.
[0140] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0141] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as spot quality detection methods.
[0142] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard parts (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0143] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0144] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0145] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including voice input, speech input, or tactile input).
[0146] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0147] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0148] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0149] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for detecting the quality of a light spot, characterized in that, include: Acquire first image information, which includes first position information of the field of view boundary acquired by the image acquisition device and second position information of the light spot emitted by the supplementary lighting device. The image acquisition device is used in conjunction with the supplementary lighting device. A first offset and a second offset are generated based on the first position information and the second position information. The first offset represents the offset between the center of the circle and the center point, and the second offset represents the offset between the first edge and the second edge. The center of the circle is the center of the light spot, the center point is the geometric center of the field of view boundary, the first edge is the edge of the light spot, and the second edge is the edge of the field of view boundary. The offset angle is determined based on the first offset and the second offset; The spot quality detection result is determined based on the offset angle, and the spot quality detection result is used to demonstrate the performance evaluation of the supplementary lighting device; The offset angle includes the spot center offset angle and the spot boundary offset angle; the first offset includes a first horizontal offset and a first vertical offset; and the second offset includes a second horizontal offset and a second vertical offset. Determining the offset angle based on the first offset and the second offset includes: Acquire the horizontal field of view, vertical field of view, and horizontal and vertical length values of the boundary field of view of the image acquisition device; The first offset angle is obtained by multiplying the ratio of the first horizontal offset to the horizontal length value by the horizontal field of view, and the second offset angle is obtained by multiplying the ratio of the first vertical offset to the vertical length value by the vertical field of view. The spot center offset angle includes the first offset angle and the second offset angle. The ratio of the second horizontal offset to the horizontal length value is multiplied by the horizontal field of view to obtain the third offset angle, and the ratio of the second vertical offset to the vertical length value is multiplied by the vertical field of view to obtain the fourth offset angle. The spot boundary offset angle includes the third offset angle and the fourth offset angle.
2. The method for detecting light spot quality according to claim 1, characterized in that, The first image information includes one of the following: image information when the focal length of the image acquisition device is short, image information when the focal length of the image acquisition device is medium, or image information when the focal length of the image acquisition device is long.
3. The method for detecting light spot quality according to claim 1, characterized in that, The step of generating a first offset and a second offset based on the first location information and the second location information includes: A coordinate system is created based on the first position information. The horizontal axis and vertical axis of the coordinate system are parallel to the two vertical sides of the field of view boundary, respectively, and the center point is set as the origin of the coordinate system. The distance from the center of the circle to the vertical axis is calculated based on the coordinate system and the second position information to obtain the first horizontal offset. The distance from the center of the circle to the horizontal axis is calculated based on the coordinate system and the second position information to obtain the first vertical offset. The maximum horizontal distance from the first edge to the second edge is calculated based on the coordinate system, the first position information, and the second position information to obtain the second horizontal offset. The maximum vertical distance from the first edge to the second edge is calculated based on the coordinate system, the first position information, and the second position information to obtain the second vertical offset.
4. The method for detecting light spot quality according to claim 3, characterized in that, The spot quality detection result includes a first detection result or a second detection result; The determination of the spot quality detection result based on the offset angle includes one of the following: When both the center offset angle and the boundary offset angle of the light spot are within a preset angle range, the first detection result is generated, indicating that the supplementary lighting device meets the requirements of the image acquisition device. If at least one of the spot center offset angle and the spot boundary offset angle is outside the preset angle range, the second detection result is generated, and the second detection result indicates that the supplementary lighting device does not meet the requirements of the image acquisition device.
5. A light spot quality detection device, characterized in that, include: The acquisition module is used to acquire first image information, which includes first position information of the field of view boundary acquired by the image acquisition device and second position information of the light spot emitted by the supplementary lighting device. The image acquisition device is used in conjunction with the supplementary lighting device. The generation module is used to generate a first offset and a second offset based on the first position information and the second position information. The first offset represents the offset between the center of the circle and the center point, and the second offset represents the offset between the first edge and the second edge. The center of the circle is the center of the light spot, the center point is the geometric center of the field of view boundary, the first edge is the edge of the light spot, and the second edge is the edge of the field of view boundary. The first determining module is used to determine the offset angle based on the first offset and the second offset; The second determining module is used to determine the spot quality detection result based on the offset angle, and the spot quality detection result is used to display the performance evaluation of the supplementary lighting device. The offset angle includes the spot center offset angle and the spot boundary offset angle; the first offset includes a first horizontal offset and a first vertical offset; and the second offset includes a second horizontal offset and a second vertical offset. The first determination module includes: The acquisition unit is used to acquire the horizontal field of view, the vertical field of view, and the horizontal and vertical length values of the boundary field of view of the image acquisition device. The first processing unit is configured to multiply the ratio of the first horizontal offset to the horizontal length value by the horizontal field of view to obtain a first offset angle, and multiply the ratio of the first vertical offset to the vertical length value by the vertical field of view to obtain a second offset angle, wherein the spot center offset angle includes the first offset angle and the second offset angle; The first processing unit is configured to multiply the ratio of the second horizontal offset to the horizontal length value by the horizontal field of view to obtain a third offset angle, and multiply the ratio of the second vertical offset to the vertical length value by the vertical field of view to obtain a fourth offset angle, wherein the spot boundary offset angle includes the third offset angle and the fourth offset angle.
6. The spot quality detection device according to claim 5, characterized in that, The generation module includes: A creation unit is used to create a coordinate system based on the first position information. The horizontal axis and vertical axis of the coordinate system are parallel to the two vertical sides of the field of view boundary, respectively, and the center point is set as the origin of the coordinate system. The first calculation unit is used to calculate the distance from the center of the circle to the vertical axis based on the coordinate system and the second position information, so as to obtain the first horizontal offset. The second calculation unit is used to calculate the distance from the center of the circle to the horizontal axis based on the coordinate system and the second position information, so as to obtain the first vertical offset. The third calculation unit is used to calculate the maximum horizontal distance from the first edge to the second edge based on the coordinate system, the first position information and the second position information, so as to obtain the second horizontal offset. The fourth calculation unit is used to calculate the maximum vertical distance from the first edge to the second edge based on the coordinate system, the first position information and the second position information, so as to obtain the second vertical offset.
7. The spot quality detection device according to claim 5, characterized in that, The first determining module includes: The acquisition unit is used to acquire the horizontal field of view, the vertical field of view, and the horizontal and vertical length values of the boundary field of view of the image acquisition device; The first processing unit is configured to multiply the ratio of the first horizontal offset to the horizontal length value by the horizontal field of view to obtain a first offset angle, and multiply the ratio of the first vertical offset to the vertical length value by the vertical field of view to obtain a second offset angle, wherein the spot center offset angle includes the first offset angle and the second offset angle; The second processing unit is used to multiply the ratio of the second horizontal offset to the horizontal length value by the horizontal field of view to obtain a third offset angle, and multiply the ratio of the second vertical offset to the vertical length value by the vertical field of view to obtain a fourth offset angle. The spot boundary offset angle includes the third offset angle and the fourth offset angle.
8. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the spot quality detection method according to any one of claims 1 to 4.
9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to execute the spot quality detection method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Laser optical center calibration method and system, device and medium
CN111629154A
High-sensitivity low-power camera system for 3D structured light application
US20190349569A1