A light supplementing lamp angle adjusting method, device, system, equipment and medium

By acquiring target images and depth maps, and using a neural network model to identify reflective areas and adjust the angle of the supplementary lighting, the problem of low automation in supplementary lighting for reflection issues is solved, thus realizing an automated reflection solution.

CN116017129BActive Publication Date: 2026-04-10ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG DAHUA TECH CO LTD
Filing Date
2022-12-24
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing technologies, supplementary lighting has a low degree of automation in solving the reflection problem, requiring manual adjustment by the user.

Method used

By acquiring the target image and depth map, the trained neural network model is used to identify reflective areas. The normal vector of the reflective surface is determined based on the pixel coordinates and depth values ​​of the reflective areas. Combined with the radiation centerline vector of the fill light, the angle of the fill light is automatically adjusted to avoid reflection.

Benefits of technology

It achieves automated resolution of reflection issues, avoids manual intervention, and improves the automation level of image acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116017129B_ABST
    Figure CN116017129B_ABST
Patent Text Reader

Abstract

The application discloses a light supplementing lamp angle adjusting method, device, system, equipment and medium. In the method, a target light reflection area in a target image is determined based on a trained neural network model according to the obtained target image and a corresponding depth map, three target points in the target light reflection area are determined according to the coordinates of the pixels of the target light reflection area in the target image and the depth values of the target light reflection area in the depth map, a normal vector of a light reflection surface determined according to the three target points and a first vector of a radiation center line of the light supplementing lamp are determined, an included angle value between the normal vector and the first vector is determined, a difference value between a maximum radiation angle value and the included angle value is determined as an adjusting angle value, the light supplementing lamp is automatically controlled to deflect in the direction of the radiation center line according to the adjusting angle value, and the light reflection problem is solved by making the included angle between the normal vector and the first vector not located in the radiation range of the light supplementing lamp.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image acquisition, and in particular to a light supplementing lamp angle adjustment method, device, system, equipment and medium. BACKGROUND

[0002] In the field of image acquisition, a light supplementing lamp is usually used as a light compensation device, which mainly functions to increase light or light source points at various angles during image acquisition, so that the position required during image acquisition can obtain sufficient light, thereby improving the shooting effect, and thus the light supplementing lamp is needed to assist shooting.

[0003] However, in actual scenarios, when reflection occurs during image acquisition, the user needs to move the position to solve the reflection problem, and thus the existing technology has low automation degree in solving the reflection problem. SUMMARY

[0004] The present application provides a light supplementing lamp angle adjustment method, device, system, equipment and medium, which solves the problem of low automation degree in solving the reflection problem in the prior art.

[0005] The present application provides a light supplementing lamp angle adjustment method, which comprises the following steps:

[0006] obtaining a target image and a corresponding depth map;

[0007] inputting the target image into a trained neural network model to obtain an output target reflection area, determining any three non-collinear target points in the target reflection area according to the coordinates of the pixel points in the target reflection area in the target image and the depth values of the pixel points in the target reflection area in the depth map;

[0008] determining the angle value of the included angle between the normal vector of the reflection surface determined according to the three target points and a first vector of the radiation center line of the light supplementing lamp, determining the difference between a pre-stored maximum radiation angle value and the included angle value as an adjustment angle value, and controlling the light supplementing lamp to deflect in the direction of the radiation center line according to the adjustment angle value.

[0009] Further, the step of determining any three non-collinear target points in the target reflection area according to the coordinates of the pixel points in the target reflection area in the target image and the depth values of the pixel points in the target reflection area in the depth map comprises:

[0010] According to the target reflection region in the depth map, the target reflection region is divided into a set number of sub-regions, a target pixel point corresponding to a depth median in the set number of sub-regions is determined, and a coordinate value of a set number of target pixel points in the target image is obtained, wherein the set number is not less than 4;

[0011] According to the coordinate value and the depth value of the set number of target pixel points, a three-dimensional coordinate of a target pixel point is obtained, if any three points in the target pixel point are not collinear, then the three points with the largest depth value are determined as target points, and if any three points in the target pixel point are collinear, then the two points with the largest depth value and the remaining point in the three collinear points are determined as the target points.

[0012] Further, the training process of the neural network model comprises:

[0013] For any sample image in the sample set, the sample image and the first label information corresponding to the sample image are obtained, wherein the first label information identifies the position information of the reflection region in the sample image;

[0014] The sample image is input into the original neural network model, and the second label information of the output sample image is obtained;

[0015] According to the first label information and the second label information, the parameter values of each parameter of the original neural network model are adjusted, and the trained neural network model is obtained.

[0016] Correspondingly, the application provides a light supplement lamp angle adjusting device, the device comprises:

[0017] An acquisition module is configured to acquire a target image and a corresponding depth map;

[0018] A determination module is configured to input the target image into the trained neural network model to obtain an output target reflection region, determine any three non-collinear target points in the target reflection region based on the coordinates of the pixel points in the target reflection region in the target image and the depth values of the pixel points in the target reflection region in the depth map, determine the angle value of the included angle between the normal vector of the reflection surface determined based on the three target points and the first vector of the radiation center line of the light supplement lamp, and determine the adjustment angle value as the difference between the maximum radiation angle value and the included angle value.

[0019] A control module is configured to control the deflection of the light supplement lamp to the direction of the radiation center line according to the adjustment angle value.

[0020] Further, the determining module is specifically configured to: divide the target reflective light region in the depth map into a set number of sub-regions according to the target reflective light region, determine target pixel points corresponding to depth medians in the set number of sub-regions, and obtain coordinate values of a set number of target pixel points in the target image, where the set number is not less than 4; obtain three-dimensional coordinates of the target pixel points according to the coordinate values and the depth values of the set number of target pixel points, and determine three points with the largest depth values as target points if any three points in the target pixel points are not collinear, or determine two points with the largest depth values and a remaining point in three collinear points as the target points if any three points in the target pixel points are collinear.

[0021] Further, the apparatus further comprises:

[0022] The training module is configured to: for any sample image in a sample set, obtain the sample image and first label information corresponding to the sample image, where the first label information identifies position information of a reflective light region in the sample image; input the sample image into an original neural network model to obtain second label information of the sample image output by the original neural network model; and adjust parameter values of each parameter of the original neural network model according to the first label information and the second label information, to obtain the trained neural network model.

[0023] Correspondingly, the present application provides a light supplementing lamp angle adjustment system, which comprises a light supplementing lamp and an electronic device performing any of the above light supplementing lamp angle adjustment methods.

[0024] Correspondingly, the present application provides an electronic device, which comprises a processor and a memory, the memory is configured to store program instructions, and the processor is configured to implement the steps of any of the above light supplementing lamp angle adjustment methods when executing the computer program stored in the memory.

[0025] Correspondingly, the present application provides a computer readable storage medium, which stores a computer program, and the computer program implements the steps of any of the above light supplementing lamp angle adjustment methods when executed by a processor.

[0026] The application provides a light supplement lamp angle adjustment method, device, system, equipment and medium. According to the method, the target light reflection area in the target image is determined based on the trained neural network model according to the obtained target image and corresponding depth map, the three target points in the target light reflection area are determined according to the coordinates of the pixels in the target light reflection area in the target image and the depth values of the target light reflection area in the depth map, the normal vector of the light reflection surface determined according to the three target points and the first vector of the radiation center line of the light supplement lamp are determined, and the included angle value of the normal vector and the first vector is determined. Since the included angle of the normal vector and the first vector is located in the radiation range of the light supplement lamp, the light reflection problem occurs, therefore, in order to make the included angle not located in the radiation angle of the light supplement lamp, the difference value between the maximum radiation angle value and the included angle value is determined as the adjustment angle value, the light supplement lamp is automatically controlled to deflect to the direction of the radiation center line according to the adjustment angle value, so that the included angle of the normal vector and the first vector is not located in the radiation range of the light supplement lamp to avoid the light reflection problem, the light reflection problem is automatically solved, and manual participation is not needed. BRIEF DESCRIPTION OF DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.

[0028] Figure 1 A process schematic diagram of a light supplement lamp angle adjustment method provided by the embodiment of the application;

[0029] Figure 2 A schematic diagram of a target image with a target light reflection area photographed by a camera provided by the embodiment of the application;

[0030] Figure 3 A schematic diagram of a radiation range of a light supplement lamp provided by the embodiment of the application;

[0031] Figure 4 A schematic diagram of a depth map region division provided by the embodiment of the application;

[0032] Figure 5 A structural schematic diagram of a light supplement lamp angle adjustment device provided by the embodiment of the application;

[0033] Figure 6 A structural schematic diagram of an electronic equipment provided by the embodiment of the application. DETAILED DESCRIPTION

[0034] In order to make the objects, technical solutions and advantages of the present application clearer, the following will further describe the present application in detail with reference to the drawings. Obviously, the described embodiments are only a part but not all of the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.

[0035] In order to solve the light emitting problem automatically, the embodiment of the present application provides a light supplementing lamp angle adjusting method, device, system, equipment and medium.

[0036] Embodiment 1:

[0037] Figure 1 A process schematic diagram of a light supplementing lamp angle adjusting method provided by the embodiment of the present application is shown in the figure, and the process includes the following steps:

[0038] S101: Obtain a target image and a corresponding depth map.

[0039] In order to solve the light emitting problem automatically, the embodiment of the present application provides a light supplementing lamp angle adjusting method applied to an electronic device, wherein the electronic device can be a host, a tablet computer, a notebook computer, a smart phone and the like, can be an image acquisition device, and can also be a server. The image acquisition device can be a monocular camera, can be a binocular camera, and can also be a depth camera. The server can be a local server or a cloud server, and the embodiment of the present application does not limit this.

[0040] If the electronic device is a smart terminal device or an image acquisition device with image acquisition function, the electronic device obtains a target image acquired by itself. If the camera of the electronic device is a monocular camera, the target image acquired is input to a pre-stored depth estimation network to obtain a depth map corresponding to the output target image. If the camera of the electronic device is a binocular camera, a depth map is determined according to two target images acquired. If the camera of the electronic device is a depth camera, a depth map corresponding to the target image is directly acquired.

[0041] If the electronic device is a smart terminal device or a server without image acquisition function, the electronic device obtains a target image and a corresponding depth map acquired by another image acquisition device connected to the electronic device.

[0042] S102: Based on the trained neural network model, input the target image into the neural network model to obtain an output target light reflection area. According to the coordinates of the pixel points of the target light reflection area in the target image and the depth values of the pixel points of the target light reflection area in the depth map, determine any three non-collinear target points in the target light reflection area.

[0043] The electronic device also pre-stores a trained neural network model for determining the reflection region in the target image, and the neural network model is used to identify a region composed of overexposed pixels caused by reflection.

[0044] After obtaining the target image, the electronic device inputs the target image into the neural network model to determine a target reflection region output by the neural network model, which is a region composed of overexposed pixels in the target image caused by reflection.

[0045] According to the coordinates and depth values of the pixels in the target reflection region, the three-dimensional coordinates of each pixel are determined, wherein the three-dimensional coordinates include X-axis coordinates, Y-axis coordinates, and Z-axis coordinates, the X-axis coordinates are the horizontal coordinates of the pixels, the Y-axis coordinates are the vertical coordinates of the pixels, and the Z-axis coordinates are the depth values of the pixels.

[0046] S103: According to the normal vector of the reflection surface determined according to the three target points and the first vector of the radiation center line of the fill light, the included angle value of the normal vector and the first vector is determined, the difference between the pre-stored maximum radiation angle value and the included angle value is determined as an adjustment angle value, and the fill light is controlled to deflect in the direction of the radiation center line according to the adjustment angle value.

[0047] Figure 2 A schematic diagram of a camera shooting a target image with a target reflection region is provided for the embodiment of the present application, as shown in Figure 2 The camera shoots the target image of the reflection surface downward (up and down in Figure 2 ), the direction of the radiation center line of the fill light is also downward (up and down in Figure 2 ), and the light group on the reflection surface produces a reflection region in the target image. According to the geometric relationship, the included angle between the normal vector of the reflection surface and the radiation center line is the reflection angle of the connecting line between the reflection point and the radiation center point and the radiation center line. When the edge line of the radiation range of the fill light is parallel to the normal vector of the reflection surface, the reflection problem caused by the reflection of the reflection surface can be solved.

[0048] Therefore, after determining the three target points of the reflective surface, the electronic device determines the normal vector of the reflective surface based on the three-dimensional coordinates of the three target points; that is, it determines two vectors based on any two of the three target points, and determines the vector that is perpendicular to both vectors as the normal vector of the reflective surface.

[0049] Specifically, the three-dimensional coordinates of the three target points determined by the electronic device are P1(u1, v1, z1), P2(u2, v2, z2), and P3(u3, v3, z3). A vector of the reflective surface is determined based on P1 and P2. Another vector of the reflective surface is determined based on P1 and P3. Based on the two vectors of the reflective surface and Determine the normal vector of the reflective surface. in

[0050] In this embodiment of the invention, since the radiation centerline of the supplementary light is parallel to the image acquisition direction (both are in the depth direction) and perpendicular to the imaging plane of the target image, a first vector of the radiation centerline of the supplementary light is determined. Let (0, 0, z) be the integers, where z is any value.

[0051] Based on the normal vector of the reflective surface And the first vector of the pre-saved radiation center line of the fill light The electronic device is determined based on the function of the vector angle value. Determine the angle θ between the normal vector and the first vector.

[0052] Figure 3 A schematic diagram illustrating the radiation range of a supplementary lighting lamp provided in an embodiment of the present invention, as shown below. Figure 3 As shown, Figure 3 The two solid lines in the diagram represent the edge lines of the fill light's radiation range, the vertical dashed line represents the center line of the fill light's radiation, and the diagonal dashed line represents the normal vector of the reflective surface, which lies within the fill light's radiation range. Figure 3 In the diagram, number 1 represents the maximum radiation angle of the supplementary light's radiation range, number 2 represents the angle between the normal vector of the reflective surface and the radiation center line, and number 3 represents the angle between the normal vector of the reflective surface and the edge line of the supplementary light's radiation range. Since the reflection problem caused by the reflective surface can be solved when the edge line of the supplementary light's radiation range is parallel to the normal vector of the reflective surface, therefore, according to... Figure 3 It can be seen that when the fill light is deflected in the direction of the radiation center line, the edge line of the fill light's radiation range can be made parallel to the normal vector of the reflective surface.

[0053] In order to realize that the edge line is parallel to the normal vector of the reflecting surface, the electronic device determines a difference value between a maximum radiation angle value and an included angle value according to the maximum radiation angle value of the light supplement lamp and the included angle value, wherein the maximum radiation angle value is half of the radiation angle value of the light supplement lamp, and determines the difference value as an adjustment angle value, and controls the light supplement lamp to deflect by the adjustment angle value in the direction of the radiation center line.

[0054] In the embodiment, the target reflecting region in the target image is determined based on the trained neural network model according to the target image and the corresponding depth map, and the three target points in the target reflecting region are determined according to the coordinates of the pixels in the target reflecting region in the target image and the depth values of the target reflecting region in the depth map. The normal vector of the reflecting surface is determined according to the three target points, and the first vector of the radiation center line of the light supplement lamp is determined according to the pre-stored light supplement lamp. The included angle value between the normal vector and the first vector is determined. When the included angle between the normal vector and the first vector is located in the radiation range of the light supplement lamp, the reflecting problem occurs. Therefore, in order to make the included angle not located in the radiation angle of the light supplement lamp, the difference value between the maximum radiation angle value and the included angle value is determined as the adjustment angle value. The light supplement lamp is automatically controlled to deflect in the direction of the radiation center line according to the adjustment angle value, so that the included angle between the normal vector and the first vector is not located in the radiation range of the light supplement lamp to avoid the reflecting problem. The reflecting problem is automatically solved without manual intervention.

[0055] Embodiment 2:

[0056] In order to determine the three target points of the reflecting surface, in the embodiment, the target points in the target reflecting region are determined according to the coordinates of the pixels in the target reflecting region in the target image and the depth values of the pixels in the target reflecting region in the depth map.

[0057] According to the target reflecting region in the depth map, the target reflecting region is divided into a plurality of sub-regions, the target pixel points corresponding to the median depth values in the plurality of sub-regions are determined, and the coordinate values of the target pixel points in the target image are obtained, wherein the number of the target pixel points is not less than 4.

[0058] According to the coordinate values and the depth values of the target pixel points, the three-dimensional coordinates of the target pixel points are obtained. If any three points in the target pixel points are not collinear, the three points with the maximum depth values are determined as the target points. If any three points in the target pixel points are collinear, the two points with the maximum depth values and the remaining point in the three collinear points are determined as the target points.

[0059] The electronic device divides the target reflection area in the depth map into a set number of sub-areas according to the target reflection area, the set number is not less than 4, respectively performs histogram statistics according to the depth values of each pixel point in the set number of sub-areas, sequentially performs statistics on the depth values in the set number of sub-areas, determines the depth median values in the set number of areas and corresponding target pixel points, if the number of pixel points corresponding to the depth median value in the area is 1, the pixel point is determined as the target pixel point, if the number of pixel points corresponding to the depth median value in the area is multiple, any pixel point in the multiple pixel points is determined as the target pixel point.

[0060] According to the coordinate points of each pixel point in the target image and the determined target pixel points, the coordinate values of the target pixel points are determined, according to the coordinate values and the depth values of the target pixel points, the horizontal coordinate values of the target pixel points are taken as the X-axis coordinate values in the three-dimensional coordinates, the vertical coordinate values are taken as the Y-axis coordinate values in the three-dimensional coordinates, and the depth values are taken as the Z-axis coordinate values in the three-dimensional coordinates.

[0061] According to the three-dimensional coordinates of each target pixel point, the three-dimensional coordinates of any three target pixel points are obtained, whether they are on a line is judged, the method for judging whether they are on a line according to the three-dimensional coordinates is a prior art, which will not be described herein, if it is determined that they are not on a line, the three points with the largest depth values in each target pixel point are obtained as target points, if any three points are collinear, the two points with the largest depth values in the three collinear points and any point in the remaining points are obtained as target points.

[0062] The scheme for determining the three target points of the reflection surface in the present application will be described below through a specific embodiment, when the target image obtained by the electronic device is an image collected only on the reflection surface, the electronic device divides the depth map into four areas {s1, s2, s3, s4}, respectively performs histogram statistics, sequentially performs statistics on the depth values in the four areas, obtains the coordinates of the pixel points corresponding to the depth median values of each area, the coordinates of the four pixel points are Pi(ui, vi), i = 1…4, and the depth values of the four pixel points are obtained, the three-dimensional coordinates of the four pixel points are Pi(ui, vi, zi), i = 1…4.

[0063] Figure 4 A depth map area division schematic diagram provided by the embodiment of the present application is shown as Figure 4 as shown, Figure 4 The solid line box in the depth map, the dashed line box represents the reflection surface, the intersecting cross dashed line divides the depth map into s1, s2, s3 and s4, a total of 4 areas, each dot in the depth map represents a pixel point corresponding to the determined depth median value of the area.

[0064] If there is no three-point collinear condition in the four pixel points, three pixel points with the largest depth values in the four pixel points are taken as the target points; if there is a three-point collinear condition in the four pixel points, two pixel points with the largest depth values in the three collinear points and the fourth pixel point are taken as the target points.

[0065] Embodiment 3

[0066] In order to obtain the trained neural network model, on the basis of the above embodiments, in the embodiment of the application, the training process of the neural network model comprises:

[0067] For any sample image in the sample set, the sample image and the first label information corresponding to the sample image are obtained, wherein the first label information identifies the position information of the reflection region in the sample image.

[0068] The sample image is input into the original neural network model, and the output second label information of the sample image is obtained.

[0069] According to the first label information and the second label information, the parameter values of the parameters of the original neural network model are adjusted, and the trained neural network model is obtained.

[0070] In order to realize the training of the neural network model, the sample set for training is saved in the embodiment of the application, the sample images in the sample set include images containing reflection regions collected in various scenes, and the first label information of the sample images in the sample set is artificially pre-labeled, wherein the first label information is used to identify the position information of the reflection region in the sample image.

[0071] In the embodiment of the application, after any sample image in the sample set and the first label information of the sample image are obtained, the sample image is input into the original neural network model, and the original neural network model outputs the second label information of the sample image. Wherein, the second label information identifies the position information of the reflection region in the sample image identified by the original neural network model.

[0072] After the second label information of the sample image is determined according to the original neural network model, the original neural network model is trained according to the second label information and the first label information of the sample image, so as to adjust the parameter values of the parameters of the original neural network model.

[0073] Each sample image included in the sample set for training the original neural network model is subjected to the above operation, and when a preset condition is met, a trained neural network model is obtained. The preset condition can be that the number of sample images in the sample set for which the first label information obtained after training by the original neural network model is consistent with the second label information is greater than a set number; or the number of iterations of training the original neural network model reaches a set maximum number of iterations, etc. Specifically, the present application does not limit this.

[0074] As a possible implementation, when training the original neural network model, the sample images in the sample set can be divided into training sample images and test sample images, the original neural network model is first trained based on the training sample images, and then the reliability of the trained neural network model is tested based on the test sample images.

[0075] Embodiment 4:

[0076] Figure 5 A structure diagram of a light supplementing lamp angle adjusting device provided by the embodiment of the present application is shown in FIG. 1, which includes: Figure 5

[0077] The acquisition module 501 is configured to acquire a target image and a corresponding depth map.

[0078] The determination module 502 is configured to input the target image into the trained neural network model to obtain an output target light reflection area, determine any three target points in the target light reflection area based on the coordinates of the pixel points of the target light reflection area in the target image and the depth values of the pixel points of the target light reflection area in the depth map, determine an angle value of an included angle between a normal vector of a light reflection surface determined based on the three target points and a first vector of a radiation center line of a light supplementing lamp, and determine an adjusting angle value as a difference between a maximum radiation angle value and the angle value of the included angle.

[0079] The control module 503 is configured to control the light supplementing lamp to deflect in the direction of the radiation center line according to the adjusting angle value.

[0080] ​Further, the determining module 502 is specifically configured to divide the target reflective region in the depth map into a set number of sub-regions according to the target reflective region in the depth map, determine target pixel points corresponding to depth medians in the set number of sub-regions, and obtain coordinate values of the set number of target pixel points in the target image, where the set number is not less than 4; obtain three-dimensional coordinates of the target pixel points according to the coordinate values and the depth values of the set number of target pixel points, and determine three points with the largest depth values as target points if any three points in the target pixel points are not collinear, or determine two points with the largest depth values and a remaining point in the three collinear points as the target points if any three points in the target pixel points are collinear.

[0081] Further, the apparatus further comprises:

[0082] The training module 504 is configured to obtain a sample image and first label information corresponding to the sample image for any sample image in a sample set, where the first label information identifies position information of a reflective region in the sample image; input the sample image into an original neural network model to obtain second label information of the sample image output by the original neural network model; and adjust parameter values of each parameter of the original neural network model according to the first label information and the second label information, to obtain the trained neural network model.

[0083] Embodiment 5:

[0084] Figure 6 An electronic device structure schematic diagram provided by the embodiment of the application is provided, and the application further provides an electronic device based on the above embodiments, as shown in the figure, comprising a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602 and the memory 603 complete mutual communication through the communication bus 604. Figure 6

[0085] The memory 603 stores a computer program, and when the program is executed by the processor 601, the processor 601 executes the following steps:

[0086] Obtain a target image and a corresponding depth map;

[0087] Input the target image into the trained neural network model to obtain a target reflective region output by the neural network model, and determine any three non-collinear target points in the target reflective region according to coordinates of pixel points in the target reflective region in the target image and depth values of the pixel points in the target reflective region in the depth map.

[0088] ​A normal vector of the reflective surface determined according to the three target points, and a first vector of a radiation center line of the fill light pre-stored, an included angle value of the normal vector and the first vector is determined, a difference value between a pre-stored maximum radiation angle value and the included angle value is determined as an adjustment angle value, and the fill light is controlled to deflect in the direction of the radiation center line according to the adjustment angle value.

[0089] Further, the processor 601 is specifically configured to determine any three target points in the target reflective region according to the coordinates of the pixel points in the target reflective region in the target image and the depth values of the pixel points in the target reflective region in the depth map, including:

[0090] According to the target reflective region in the depth map, the target reflective region is divided into a set number of sub-regions, target pixel points corresponding to the median depth values in the set number of sub-regions are determined, and coordinate values of the set number of target pixel points in the target image are obtained, wherein the set number is not less than 4;

[0091] According to the coordinate values and the depth values of the set number of target pixel points, three-dimensional coordinates of the target pixel points are obtained, if any three points in the target pixel points are not collinear, three points with the largest depth values are determined as the target points, and if any three points in the target pixel points are collinear, two points with the largest depth values and the remaining point in the three collinear points are determined as the target points.

[0092] Further, the processor 601 is specifically configured to include the following in the training process of the neural network model:

[0093] For any sample image in the sample set, the sample image and the first label information corresponding to the sample image are obtained, wherein the first label information identifies the position information of the reflective region in the sample image;

[0094] The sample image is input into the original neural network model, and the second label information of the output sample image is obtained;

[0095] According to the first label information and the second label information, the parameter values of each parameter of the original neural network model are adjusted, and the trained neural network model is obtained.

[0096] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0097] The communication interface 602 is used for communication between the above electronic device and other devices.

[0098] The memory can include a Random Access Memory (RAM) and can also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.

[0099] The processor mentioned above can be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; can also be a Digital Signal Processing (DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0100] Embodiment 6:

[0101] On the basis of the above embodiments, the application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program executable by a processor, and when the program runs on the processor, the processor executes the following steps:

[0102] Obtaining a target image and a corresponding depth map;

[0103] Based on the trained neural network model, inputting the target image into the neural network model to obtain an output target reflection area, and determining any three non-collinear target points in the target reflection area according to the coordinates of the pixel points of the target reflection area in the target image and the depth values of the pixel points of the target reflection area in the depth map.

[0104] According to the normal vector of the reflecting surface determined according to the three target points and a first vector of a radiation center line of the supplementary light, an included angle value of the normal vector and the first vector is determined, a difference value between a maximum radiation angle value and the included angle value is determined as an adjustment angle value, and the supplementary light is controlled to deflect in the direction of the radiation center line according to the adjustment angle value.

[0105] Further, the determining of the three target points in the target reflecting region according to the coordinates of the pixel points in the target reflecting region in the target image and the depth values of the pixel points in the target reflecting region in the depth map comprises:

[0106] According to the target reflecting region in the depth map, the target reflecting region is divided into a set number of sub-regions, target pixel points corresponding to median values of depths in the set number of sub-regions are determined, and coordinate values of the set number of target pixel points in the target image are obtained, wherein the set number is not less than 4.

[0107] According to the coordinate values and the depth values of the set number of target pixel points, three-dimensional coordinates of the target pixel points are obtained, if any three points in the target pixel points are not collinear, three points with the largest depth values are determined as the target points, and if any three points in the target pixel points are collinear, two points with the largest depth values and the remaining point in the three collinear points are determined as the target points.

[0108] Further, the training process of the neural network model comprises:

[0109] For any sample image in the sample set, the sample image and first label information corresponding to the sample image are obtained, wherein the first label information identifies position information of a reflecting region in the sample image.

[0110] The sample image is input into the original neural network model, and second label information of the sample image output by the original neural network model is obtained.

[0111] According to the first label information and the second label information, parameter values of parameters of the original neural network model are adjusted, and the trained neural network model is obtained.

[0112] Those skilled in the art will understand that embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.

[0113] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.

[0114] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.

[0115] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.

[0116] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.

Claims

1. A method for adjusting the angle of a light supplement lamp, characterized in that The method comprises: acquiring a target image and a corresponding depth map; inputting the target image into a trained neural network model to obtain an output target reflective region, determining any three non-collinear target points in the target reflective region according to coordinates of pixel points of the target reflective region in the target image and depth values of pixel points of the target reflective region in the depth map; determining a normal vector of a reflective surface according to the three target points and a first vector of a radiation center line of a fill light, determining an included angle value between the normal vector and the first vector, determining a difference between a maximum radiation angle value and the included angle value as an adjustment angle value, and controlling the fill light to deflect in the direction of the radiation center line according to the adjustment angle value, wherein the maximum radiation angle value is half of a radiation angle value of the fill light; the determining any three non-collinear target points in the target reflective region according to the coordinates of the pixel points of the target reflective region in the target image and the depth values of the pixel points of the target reflective region in the depth map comprises: dividing the target reflective region in the depth map into a set number of sub-regions, determining target pixel points corresponding to median depth values in the set number of sub-regions, and acquiring coordinate values of the set number of target pixel points in the target image, wherein the set number is not less than 4; obtaining three-dimensional coordinates of the target pixel points according to the coordinate values and the depth values of the set number of target pixel points, determining three points with the largest depth values as target points if any three points of the target pixel points are not collinear, and determining two points with the largest depth values and a remaining point among collinear three points as the target points if any three points of the target pixel points are collinear.

2. The method of claim 1, wherein, The training process of the neural network model comprises: for any sample image in a sample set, acquiring the sample image and first label information corresponding to the sample image, wherein the first label information identifies position information of a reflective region in the sample image; inputting the sample image into an original neural network model to obtain second label information of the sample image; adjusting parameter values of each parameter of the original neural network model according to the first label information and the second label information to obtain the trained neural network model.

3. A light supplementing lamp angle adjustment device, characterized by, The device comprises: an acquisition module configured to acquire a target image and a corresponding depth map; The determining module is configured to input the target image into the trained neural network model to obtain an output target reflective region, determine any three target points in the target reflective region according to coordinates of pixel points in the target reflective region in the target image and depth values of the pixel points in the target reflective region in the depth map, determine an angle between a normal vector of a reflective surface determined according to the three target points and a first vector of a radiation center line of the light supplement lamp, and determine an adjustment angle value as a difference between a maximum radiation angle value and the angle, where the maximum radiation angle value is half of a radiation angle value of the light supplement lamp. The control module is configured to control the light supplement lamp to deflect in a direction of the radiation center line according to the adjustment angle value. The determining module is specifically configured to divide the target reflective region in the depth map into a set number of sub-regions, determine target pixel points corresponding to median depth values in the set number of sub-regions, and obtain coordinate values of the set number of target pixel points in the target image, where the set number is not less than 4, obtain three-dimensional coordinates of the target pixel points according to the coordinate values and the depth values of the set number of target pixel points, determine three target points with the largest depth values as the target points if any three of the target pixel points are not collinear, and determine two target points with the largest depth values and a remaining target point from collinear three target points as the target points if any three of the target pixel points are collinear.

4. The apparatus of claim 3, wherein, The device further includes: The training module is configured to obtain a sample image and first label information corresponding to the sample image for any sample image in a sample set, where the first label information identifies position information of a reflective region in the sample image, input the sample image into an original neural network model to obtain second label information of the sample image, and adjust parameter values of parameters of the original neural network model according to the first label information and the second label information to obtain the trained neural network model.

5. A light supplement lamp angle adjustment system, characterized by, The system includes a light supplement lamp and an electronic device that executes the light supplement lamp angle adjustment method according to any one of claims 1-2.

6. An electronic device, comprising: The system includes a light supplement lamp and an electronic device that executes the light supplement lamp angle adjustment method according to any one of claims 1-2. The system includes a light supplement lamp and an electronic device that executes the light supplement lamp angle adjustment method according to any one of claims 1-2. The system includes a light supplement lamp and an electronic device that executes the light supplement lamp angle adjustment method according to any one of claims 1-2.

7. A computer readable storage medium characterized in that, The system includes a light supplement lamp and an electronic device that executes the light supplement lamp angle adjustment method according to any one of claims 1-2. The system includes a light supplement lamp and an electronic device that executes the light supplement lamp angle adjustment method according to any one of claims 1-2.

Citation Information

Patent Citations

  • 3D visual detection system based on structured light imaging

    CN112067626A

  • Self-adaptive light supplementing method, system, equipment and medium

    CN114758111A