Infrared fill light image shooting method, terminal equipment and device
By setting a camera, a first infrared lamp and a movable second infrared lamp in the terminal device, and using the mobile fill light technology of the second infrared lamp, the problem of insufficient infrared fill light distance during night shooting of the portable device is solved, and clear fill light and recognition of faces with longer distances is achieved.
Patent Information
- Application Number
- CN202310325304.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-29
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2043-03-29
AI Technical Summary
When existing portable devices shoot at night, the infrared fill light distance is limited, resulting in low recognition of faces at longer distances and unavailable to take pictures clearly.
A camera, a first infrared lamp and a movable second infrared lamp are provided in the terminal device. The fill light angle range of the first infrared lamp is greater than the second infrared lamp, and the fill light distance is smaller than the second infrared lamp. The fill light is filled by moving the second infrared lamp to the position of the face contour, and the fill light distance is increased.
It effectively improves the recognition distance and clarity of face shooting at night by terminal devices, and achieves clear filling light for face contours at longer distances.
Smart Images

Figure CN116389894B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to an infrared fill light image shooting method, terminal equipment and device. Background Art
[0002] In the prior art, portable devices such as law enforcement recorders that require infrared light to take photos or record videos at night use a dedicated infrared camera. This camera requires infrared light to image people at a distance. However, due to the size and battery capacity of the portable device, the power of the infrared light cannot be very high. Therefore, the effective illumination distance of the infrared light is limited. Generally, only faces within a relatively close distance can be clearly identified. Faces at a greater distance cannot be clearly captured due to the limited infrared light range. This results in poor recognition of faces at a greater distance when shooting at night. Therefore, there is an urgent need for a method to increase the nighttime shooting distance of portable devices such as law enforcement recorders and improve the recognition of faces at medium and long distances. Summary of the Invention
[0003] The purpose of this application is to provide an infrared fill light image shooting method, terminal equipment and device to solve the problem that when portable devices such as law enforcement recorders are shooting at night, the infrared fill light distance is close, and the faces at a farther distance are not clearly photographed due to insufficient infrared fill light.
[0004] In a first aspect, the present application provides a method for capturing an image using infrared fill light. The method is applied to a terminal device, the terminal device including a camera, a first infrared light, and a movable second infrared light. The fill light angle range of the first infrared light is greater than the fill light angle range of the second infrared light, and the fill light distance of the first infrared light is less than the fill light distance of the second infrared light. The method includes:
[0005] In response to a user-triggered acquisition operation for an image to be processed, starting the first infrared light and controlling the camera to acquire the image to be processed;
[0006] If it is detected that at least one face contour exists in the image to be processed, determining a first position of the at least one face contour in the image to be processed;
[0007] For any one of the at least one facial contours to be processed, the following operations are respectively performed: moving the second infrared light to a second position corresponding to the first position of the facial contour to be processed, and performing fill light on the facial contour to be processed, while controlling the camera to capture a reference image after the fill light is performed by the second infrared light; wherein the first position represents the position of the facial contour in the image to be processed, and the second position represents the position of the second infrared light in the terminal device;
[0008] Based on the obtained reference image, a target image corresponding to the image to be processed is determined.
[0009] In a second aspect, the present application provides a terminal device, the terminal device comprising:
[0010] A camera, a first infrared light, a movable second infrared light, a processor, and a memory;
[0011] The camera is used for infrared photography and collecting images to be processed;
[0012] The first infrared light and the movable second infrared light provide fill light for the face in the image to be processed; wherein the fill light angle range of the first infrared light is greater than the fill light angle range of the second infrared light, and the fill light distance of the first infrared light is less than the fill light distance of the second infrared light;
[0013] The memory is used to store the processor executable instructions;
[0014] The processor is configured to execute the infrared fill light image shooting method as described in any one of the first aspects above.
[0015] In a third aspect, the present application provides an infrared fill light image capture device, which is applied to a terminal device, wherein the terminal device includes a camera, a first infrared light, and a movable second infrared light, wherein the fill light angle range of the first infrared light is greater than the fill light angle range of the second infrared light, and the fill light distance of the first infrared light is less than the fill light distance of the second infrared light, and the device includes:
[0016] a first fill light module, configured to activate the first infrared light and control the camera to capture the image to be processed in response to a user-triggered capture operation for the image to be processed;
[0017] a position determination module, configured to determine a first position of the at least one face contour in the image to be processed if at least one face contour is detected in the image to be processed;
[0018] a second fill light module, configured to perform the following operations for any one of the at least one facial contours to be processed: moving the second infrared light to a second position corresponding to the first position of the facial contour to be processed, performing fill light on the facial contour to be processed, and controlling the camera to capture a reference image after the fill light is applied by the second infrared light; wherein the first position represents a position of the facial contour in the image to be processed, and the second position represents a position of the second infrared light in the terminal device;
[0019] The target image determination module is used to determine the target image corresponding to the image to be processed based on the obtained reference image.
[0020] In a fourth aspect, the present application provides a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by a terminal device, the terminal device can execute the infrared fill light image shooting method as described in any one of the above-mentioned first aspects.
[0021] In a fifth aspect, the present application provides a computer program product, including a computer program:
[0022] When the computer program is executed by a processor, the infrared fill light image shooting method described in any one of the first aspects above is implemented.
[0023] The technical solutions provided by the embodiments of this application bring at least the following beneficial effects:
[0024] The embodiment of the present application is achieved by setting a camera, a first infrared lamp and a movable second infrared lamp in a terminal device; wherein the fill light angle range of the first infrared lamp is greater than the fill light angle range of the second infrared lamp, and the fill light distance of the first infrared lamp is less than the fill light distance of the second infrared lamp; in response to the user-triggered acquisition operation for the image to be processed, the first infrared lamp is started and the camera is controlled to acquire the image to be processed, if at least one facial contour is detected in the image to be processed, the first position of the at least one facial contour in the image to be processed is determined; for any one of the at least one facial contours to be processed, the second infrared lamp is moved to a second position corresponding to the first position of the facial contour to be processed, and fill light is performed on the facial contour to be processed, and at the same time, the camera is controlled to acquire a reference image after the second infrared lamp is used to fill light; wherein the first position represents the position of the facial contour in the image to be processed, and the second position represents the position of the second infrared lamp in the terminal device; based on the obtained reference image, the target image corresponding to the image to be processed is determined.
[0025] Therefore, in this application, the first infrared lamp mainly provides infrared fill light for the facial contour within a relatively close fill light distance, while the second infrared lamp concentrates the infrared light within a narrower fill light angle range to achieve infrared fill light for the facial contour at a longer fill light distance; at the same time, by moving the position of the second infrared lamp, the infrared beam of the second infrared lamp can move freely within the camera's field of view, thereby achieving fill light for the facial contour at a longer distance in the camera's screen, effectively improving the effective distance for terminal equipment such as law enforcement recorders to clearly capture faces at night.
[0026] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present application. The purposes and other advantages of the present application can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. Obviously, the drawings introduced below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0028] Figure 1 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application;
[0029] Figure 2 A software structure diagram of a terminal device provided in an embodiment of the present application;
[0030] Figure 3 A schematic diagram of an application scenario of an infrared fill light image shooting method provided in an embodiment of the present application;
[0031] Figure 4 A schematic diagram of a flow chart of a method for capturing an infrared fill light image provided in an embodiment of the present application;
[0032] Figure 5 A schematic diagram of a terminal device provided in an embodiment of the present application;
[0033] Figure 6 A schematic diagram of a user-triggered acquisition operation for an image to be processed provided in an embodiment of the present application;
[0034] Figure 7 A schematic diagram of a user-triggered acquisition operation for an image to be processed provided in an embodiment of the present application;
[0035] Figure 8 A schematic diagram of a process for determining a first position of each face contour in an image to be processed provided in an embodiment of the present application;
[0036] Figure 9 A schematic diagram of a preset facial contour key point provided in an embodiment of the present application;
[0037] Figure 10 A flowchart for determining the contour of a face to be processed provided in an embodiment of the present application;
[0038] Figure 11A schematic diagram of an image to be processed captured after fill lighting by the first infrared light provided in an embodiment of the present application;
[0039] Figure 12 A flow chart of moving a second infrared lamp to a second position provided in an embodiment of the present application;
[0040] Figure 13 A schematic diagram of a process for determining a preset correspondence between a first position and a second position of a face contour provided in an embodiment of the present application;
[0041] Figure 14 A schematic diagram of a movable component and a second infrared lamp provided in an embodiment of the present application;
[0042] Figure 15 A schematic diagram of a movable component and a second infrared lamp provided in an embodiment of the present application;
[0043] Figure 16 A schematic diagram of a first position of a pixel provided in an embodiment of the present application;
[0044] Figure 17 A flowchart of determining a target image of an image to be processed provided in an embodiment of the present application;
[0045] Figure 18 A complete flow chart of an infrared fill light image shooting method provided in an embodiment of the present application;
[0046] Figure 19 A schematic diagram of a terminal device provided in an embodiment of the present application;
[0047] Figure 20 A schematic diagram of an infrared fill light image shooting device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] To make the purpose, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Among them, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0049] Moreover, in the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0050] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, features defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.
[0051] Portable police terminals, such as body cameras, require infrared light to capture nighttime photos or videos. These cameras require infrared light to image people, but due to the size and battery capacity of portable devices, the power of the infrared light cannot be very high.
[0052] In existing technologies, infrared fill lights are designed with a fixed field of view and fixed infrared light emission angle. Therefore, the effective illumination range of the infrared fill light is limited. Generally, faces can only be clearly identified within a very close distance of the infrared camera. However, faces at greater distances cannot be clearly identified because the infrared light energy is dispersed and the illumination decreases. The reflected light from the face is relatively dim when the infrared camera forms an image, resulting in poor recognition of faces at a distance when shooting at night. Therefore, there is an urgent need for a method to increase the shooting range of portable devices such as law enforcement recorders at night and improve face recognition at medium and long distances.
[0053] In view of this, the present application provides an infrared fill light image shooting method, terminal equipment and device to solve the problem that when portable devices such as law enforcement recorders are shooting at night, the infrared fill light distance is close, and the faces at a farther distance are not clearly photographed due to insufficient infrared fill light.
[0054] The inventive concept of the present application can be summarized as follows: in the embodiment of the present application, a camera, a first infrared lamp and a movable second infrared lamp are set in the terminal device; wherein the fill light angle range of the first infrared lamp is greater than the fill light angle range of the second infrared lamp, and the fill light distance of the first infrared lamp is less than the fill light distance of the second infrared lamp; in response to the user-triggered acquisition operation for the image to be processed, the first infrared lamp is started and the camera is controlled to acquire the image to be processed, if at least one facial contour is detected in the image to be processed, the first position of the at least one facial contour in the image to be processed is determined; for any one of the at least one facial contours to be processed, the second infrared lamp is moved to the second position corresponding to the first position of the facial contour to be processed, and the facial contour to be processed is fill-illuminated, and at the same time, the camera is controlled to acquire a reference image after the second infrared lamp is fill-illuminated; wherein the first position represents the position of the facial contour in the image to be processed, and the second position represents the position of the second infrared lamp in the terminal device; based on the obtained reference image, the target image corresponding to the image to be processed is determined. As a result, fill light is provided for the facial contours at a greater distance within the camera image, effectively improving the recognition distance and ability of terminal equipment such as law enforcement recorders to capture faces at night.
[0055] After introducing the main inventive ideas of the embodiments of this application, the terminal device provided by this application is described below. Figure 1 FIG1 shows a schematic diagram of the structure of a terminal device 100. It should be understood that Figure 1 The terminal device 100 shown is only an example, and the terminal device 100 may have more Figure 1 The more or less components shown in the figure can be combined with two or more components, or can have different component configurations. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.
[0056] Figure 1 FIG. 1 shows a block diagram of the hardware configuration of the terminal device 100 according to an exemplary embodiment. Figure 1 As shown, the terminal device 100 includes: a radio frequency (RF) circuit 110, a memory 120, a display unit 130, a camera 140, a sensor 150, an audio circuit 160, a wireless fidelity (Wi-Fi) module 170, a processor 180, a Bluetooth module 181, and a power supply 190 and other components.
[0057] RF circuit 110 is used to receive and transmit signals during multimedia information transmission. It receives downlink data from the base station and passes it to processor 180 for processing; it also transmits uplink data to the base station. Typically, RF circuits include, but are not limited to, antennas, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, and other components.
[0058] The memory 120 can be used to store software programs and data. The processor 180 executes various functions and data processing of the terminal device 100 by running the software programs or data stored in the memory 120. The memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. The memory 120 stores an operating system that enables the terminal device 100 to run. In the present application, the memory 120 can store an operating system and various application programs, and can also store program code for executing the infrared fill light image shooting method of the embodiment of the present application.
[0059] The display unit 130 may be configured to receive multimedia information such as input numbers or characters, and generate signal inputs related to user settings and function control of the terminal device 100 . Specifically, the display unit 130 may include a touch screen 131 disposed on the front of the terminal device 100 .
[0060] The display unit 130 can also be used to display information input by the user or provided to the user, as well as a graphical user interface (GUI) for displaying various menus of the terminal device 100. Specifically, the display unit 130 may include a display screen 132 disposed on the front of the terminal device 100. The display screen 132 may be configured in the form of a liquid crystal display, a light-emitting diode, etc. The display unit 130 can be used to display the image to be processed captured by the terminal device in this application, as well as the reference image and target image after the second infrared light is used to fill the image.
[0061] The touch screen 131 may be covered on the display screen 132 , or the touch screen 131 and the display screen 132 may be integrated to realize the input and output functions of the terminal device 100 , and the integrated touch screen may be referred to as a touch display screen.
[0062] Camera 140 can be used to capture still images or video. The lens generates an optical image of an object and projects it onto a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transmitted to processor 180 for conversion into a digital image signal.
[0063] The terminal device 100 may further include at least one sensor 150, such as an acceleration sensor 151, a distance sensor 152, a fingerprint sensor 153, and a temperature sensor 154. The terminal device 100 may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, a light sensor, and a motion sensor.
[0064] The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the terminal device 100. The audio circuit 160 can transmit the electrical signal converted from the received audio data to the speaker 161, which is converted into a sound signal for output. The terminal device 100 can also be configured with a volume button for adjusting the volume of the sound signal, and can also be used to combine other buttons to perform corresponding operations. On the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 160 and converted into audio data. The audio data is then output to the RF circuit 110 to be sent to, for example, another terminal device, or the audio data is output to the memory 120 for further processing.
[0065] Wi-Fi is a short-range wireless transmission technology. The terminal device 100 can help users send and receive emails, browse web pages, and access streaming media through the Wi-Fi module 170, which provides users with wireless broadband Internet access.
[0066] The processor 180 is the control center of the terminal device 100. It uses various interfaces and lines to connect the various parts of the entire terminal device. It executes various functions of the terminal device 100 and processes data by running or executing software programs stored in the memory 120 and calling data stored in the memory 120. In some embodiments, the processor 180 may include one or more processing units; the processor 180 may also integrate an application processor and a baseband processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the baseband processor mainly processes wireless communications. It is understandable that the above-mentioned baseband processor may not be integrated into the processor 180. In the present application, the processor 180 can run the operating system, application programs, user interface display and touch response, as well as the infrared fill light image shooting method of the embodiment of the present application. In addition, the processor 180 is coupled to the display unit 130.
[0067] The Bluetooth module 181 is used to exchange information with other Bluetooth devices having a Bluetooth module through the Bluetooth protocol. For example, the terminal device 100 can establish a Bluetooth connection with a wearable electronic device (such as a smart watch) that also has a Bluetooth module through the Bluetooth module 181 to exchange data.
[0068] The terminal device 100 also includes a power supply 190 (e.g., a battery) that supplies power to various components. The power supply can be logically connected to the processor 180 via a power management system, thereby enabling the power management system to manage functions such as charging, discharging, and power consumption. The terminal device 100 may also be configured with a power button for turning the terminal device on and off, as well as for locking the screen.
[0069] Figure 2 It is a software structure block diagram of the terminal device 100 according to an embodiment of the present application.
[0070] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system can be divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0071] The application layer can include a series of application packages.
[0072] like Figure 2 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, video, and recording.
[0073] The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0074] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0075] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.
[0076] Content providers are used to store and retrieve data and make it accessible to applications. Data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, text messages, etc.
[0077] The view system includes visual controls. For example, a camera user interface can include controls for displaying text, images, and scene identifiers. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface containing a short message notification icon can include a view for displaying text and a view for displaying images.
[0078] The network manager is used to provide communication functions for the terminal device 100, as well as provide the connection status and transmission interface of the network (including data and Wi-Fi), such as determining whether the network is available and receiving and sending data packets through the transmission interface.
[0079] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, etc.
[0080] The notification manager enables applications to display notification information in the status bar (such as a summary of a short message, notifications of updated message content and scenario identifiers). It can be used to convey notification-type messages and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the completion of downloads, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of an icon or scrolling text bar, such as notifications from applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message can be displayed in the status bar, a prompt sound can be emitted, the terminal device can vibrate, the indicator light can flash, etc.
[0081] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
[0082] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0083] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0084] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0085] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
[0086] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0087] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0088] A 2D (animation method) graphics engine is a drawing engine for 2D drawing.
[0089] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.
[0090] Among them, the terminal devices in this application include but are not limited to portable terminals such as law enforcement recorders that require infrared light supplementary lighting to achieve night-time photography or video recording.
[0091] After introducing the terminal device of the embodiment of the present application, the following briefly introduces the application scenarios to which the infrared fill light image shooting method provided in the embodiment of the present application can be applied. It should be noted that the application scenarios introduced below are only used to illustrate the embodiment of the present application and are not limiting. In specific implementation, the technical solutions provided in the embodiment of the present application can be flexibly applied according to actual needs.
[0092] refer to Figure 3, which is a schematic diagram of an application scenario of the infrared fill light image shooting method provided in an embodiment of the present application. The application scenario includes a terminal device 100, a user 101, a face contour to be processed 102, and a server 103. The terminal device 100 and the server 103 are connected via a wireless or wired network.
[0093] Among them, the terminal device 100 includes a camera, a first infrared light and a movable second infrared light; the fill light angle range of the first infrared light is greater than the fill light angle range of the second infrared light, and the fill light distance of the first infrared light is less than the fill light distance of the second infrared light; in response to the acquisition operation for the image to be processed triggered by the user 101, the first infrared light is started and the camera is controlled to acquire the image to be processed. If at least one facial contour is detected in the image to be processed, the first position of the at least one facial contour in the image to be processed is determined; for any one of the at least one facial contours 102 to be processed, the second infrared light is moved to the second position corresponding to the first position of the facial contour 102 to be processed, and fill light is performed on the facial contour 102 to be processed, and at the same time, the camera is controlled to acquire a reference image after the second infrared light is used to fill light, and the reference image is saved to the server 103; based on the obtained reference image, the target image corresponding to the image to be processed is determined.
[0094] Of course, the method provided in the embodiment of the present application is not limited to Figure 3 The application scenarios shown can also be used in other possible application scenarios, and the embodiments of this application are not limited thereto. Figure 3 The functions that can be implemented by each device in the application scenario shown will be described in subsequent method embodiments and will not be described in detail here.
[0095] In order to facilitate understanding of the infrared fill light image shooting method provided in the embodiment of the present application, it is further explained below with reference to the accompanying drawings.
[0096] Figure 4 This is a flow chart of a method for capturing an infrared image with fill light provided in an embodiment of the present application. The method is applied to a terminal device, such as Figure 5 As shown, the terminal device includes a camera, a first infrared light, and a movable second infrared light; the first infrared light is a conventional infrared light, the fill light angle range of the first infrared light is larger than the fill light angle range of the second infrared light, and the fill light distance of the first infrared light is smaller than the fill light distance of the second infrared light; the first infrared light provides fill light for objects within the camera's field of view within a larger fill light angle range; and the movable second infrared light narrows the infrared light beam to a smaller fill light angle range, thereby increasing the fill light distance and providing fill light for objects farther away from the camera's field of view. Figure 4 As shown, the method specifically includes the following steps:
[0097] In step 401, in response to a user-triggered acquisition operation for an image to be processed, a first infrared light is started and a camera is controlled to acquire the image to be processed.
[0098] When implementing it specifically, Figure 6 As shown, a user carrying a terminal device such as a law enforcement recorder triggers a "photograph" button on the terminal device for the acquisition operation of the image to be processed, or, as shown in FIG. Figure 7 As shown, a user carrying a body camera or other terminal device triggers the "record" button on the terminal device for capturing the image to be processed, simultaneously activating the first infrared light and controlling the camera to capture the image to be processed. Each target object in the image to be processed is an object that can be captured by the camera after the first infrared light is applied.
[0099] In step 402, if it is detected that at least one face contour exists in the image to be processed, a first position of the at least one face contour in the image to be processed is determined.
[0100] In a possible implementation, if at least one face contour is detected in the image to be processed, determining the first position of the at least one face contour in the image to be processed may be performed as follows: Figure 8 Steps shown:
[0101] In step 801, image analysis technology is used to extract feature key points in the image to be processed.
[0102] In step 802, at least one face contour in the image to be processed is determined based on the feature key points and the preset facial contour key points.
[0103] In step 803, for each face contour, the position of the central pixel point of the face contour in the image to be processed is used as the first position of the face contour in the image to be processed.
[0104] When implementing it specifically, Figure 9 The figure shows the preset facial contour key points. After identifying the position of the person's contour in the image to be processed using the camera and locating the characteristic key points in the image to be processed using image analysis methods, the characteristic key points in the image to be processed can be compared with the preset facial contour key points to obtain at least one facial contour in the image to be processed. The center pixel point of the facial contour is then used as the first position of the facial contour in the image to be processed.
[0105] Among them, the preset facial contour key points can be set according to actual needs, and the embodiments of the present application do not limit this.
[0106] In step 403, for any one of the at least one facial contours to be processed, the following operations are performed: the second infrared light is moved to the second position corresponding to the first position of the facial contour to be processed, and the facial contour to be processed is filled with light, and the camera is controlled to capture a reference image after the second infrared light is used to fill in the light.
[0107] The first position represents the position of the facial outline in the image to be processed, and the second position represents the position of the second infrared light in the terminal device. When the second infrared light provides fill light for the facial outline to be processed, it aims the light beam at the actual face corresponding to the facial outline to be processed, and then provides fill light for the actual face.
[0108] In a possible implementation, in an embodiment of the present application, for each facial contour in at least one facial contour in the image to be processed, the second infrared light can be moved to a second position corresponding to the first position of the facial contour, and the facial contour can be filled with light, while the camera can be controlled to capture a reference image after the second infrared light is used to fill in the light.
[0109] In another possible implementation, the embodiment of the present application can also execute the operation of moving the second infrared light to the second position corresponding to the first position of the face contour to be processed for the face contour to be processed in at least one face contour in the image to be processed, and performing fill light on the face contour to be processed, while controlling the camera to collect the reference image after the second infrared light is used to fill light. Specifically, the following operations can be executed for any one face contour in the at least one face contour. Figure 10 Steps shown:
[0110] In step 1001, a first ratio of the face area included in the face contour to the area of the image to be processed is determined;
[0111] In step 1002, based on a preset correspondence between the ratio of the face area to the image area and the actual distance between the face and the camera, an actual distance corresponding to the first ratio is determined;
[0112] The preset correspondence between the ratio of the face area to the image area and the actual distance between the face and the camera can be obtained based on experiments or set according to actual needs. The embodiments of the present application do not impose any restrictions on this.
[0113] In step 1003, if the actual distance corresponding to the first ratio is greater than the preset distance threshold, the face contour is determined to be the face contour to be processed.
[0114] The ratio of the face area to the image area is inversely proportional to the actual distance between the face and the camera. The larger the ratio of the face area to the image area, the closer the face is to the camera. The preset distance threshold can be set according to actual needs and is not limited in this embodiment of the present application.
[0115] When implementing it specifically, Figure 11 As shown, the image to be processed is captured by the camera after the first infrared light is used for fill lighting. There are five face outlines in total. First, a first ratio of the face area included in each of the five face outlines to the area of the image to be processed is determined. Then, based on a preset correspondence between the ratio of the face area to the image area and the actual distance of the face from the camera, the actual distance corresponding to the first ratio is determined. If the actual distance corresponding to the first ratio is greater than a preset distance threshold, the face outline is determined to be the face outline to be processed.
[0116] Figure 11 The first ratio of the facial area included in face contour 1 and face contour 2 to the area of the image to be processed is significantly greater than the first ratio of the facial area included in face contours 3, 4, and 5 to the area of the image to be processed. According to a preset correspondence between the ratio of the facial area to the image area and the actual distance between the face and the camera, it can be determined that the actual distance corresponding to the first ratio of the facial area included in face contour 1 and face contour 2 to the area of the image to be processed is less than a preset distance threshold, and the actual distance corresponding to the first ratio of the facial area included in face contours 3, 4, and 5 to the area of the image to be processed is greater than the preset distance threshold. Therefore, face contours 3, 4, and 5 are determined to be face contours to be processed.
[0117] In a possible implementation, the method in the embodiment of the present application can also be executed as follows: if at least one facial contour of the image to be processed includes multiple facial contours to be processed, then according to the actual distance corresponding to each facial contour to be processed, determine the order of moving the second infrared light to the second position corresponding to the first position of the facial contour to be processed, and fill in the light for the facial contour to be processed.
[0118] During specific implementation, the second infrared light can be moved to the second position corresponding to the first position of each facial contour to be processed in order of actual distance from large to small, and fill-in light can be applied to each facial contour to be processed; or the second infrared light can be moved to the second position corresponding to the first position of each facial contour to be processed in order of actual distance from small to large, and fill-in light can be applied to each facial contour to be processed.
[0119] For example, Figure 11The image to be processed shown includes multiple face contours to be processed, namely face contour 3, face contour 4, and face contour 5. Based on the relationship that the ratio of the face area to the image area is inversely proportional to the actual distance between the face and the camera, it can be determined that the actual distance corresponding to the first ratio of the face area included in face contour 3 to the area of the image to be processed is smaller than the actual distance corresponding to the first ratio of the face area included in face contour 4 to the area of the image to be processed, and smaller than the actual distance corresponding to the first ratio of the face area included in face contour 5 to the area of the image to be processed. Therefore, the second infrared light can be first moved to the second position corresponding to the first position of face contour 3, and fill light can be applied to face contour 3. Then, the second infrared light can be moved to the second position corresponding to the first position of face contour 4, and fill light can be applied to face contour 4. Finally, the second infrared light can be moved to the second position corresponding to the first position of face contour 5, and fill light can be applied to face contour 5.
[0120] Alternatively, the second infrared light is first moved to the second position corresponding to the first position of the facial contour 5, and fill-in light is applied to the facial contour 5. Then, the second infrared light is moved to the second position corresponding to the first position of the facial contour 4, and fill-in light is applied to the facial contour 4. Finally, the second infrared light is moved to the second position corresponding to the first position of the facial contour 3, and fill-in light is applied to the facial contour 3.
[0121] In a possible implementation manner, the second infrared light is moved to the second position corresponding to the first position of the face contour to be processed in the embodiment of the present application, which can be performed as follows: Figure 12 Steps shown:
[0122] In step 1201, based on a preset correspondence between a first position and a second position of a facial contour, a second position corresponding to the first position of the facial contour to be processed is determined;
[0123] In step 1202, the second infrared lamp is moved to a second position.
[0124] In an embodiment of the present application, in order to reduce the displacement effect caused by vibration when the user operates the terminal device, the second infrared lamp is designed so that the spot area of the second infrared lamp at a longer distance is larger than the area included in the facial contour.
[0125] In a possible implementation manner, the terminal device in the embodiment of the present application further includes a movable component for moving the second infrared lamp; therefore, in the embodiment of the present application, the terminal device can be configured as follows: Figure 13 The preset correspondence between the first position and the second position of the face contour is determined in the manner shown:
[0126] In step 1301, the center pixel points of the four sides of the first image acquired by the camera after the first infrared light is used for fill light and the first position of the image center pixel point of the first image are determined;
[0127] In step 1302, the movable component of the second infrared lamp is moved so that the second infrared lamp fills the central pixel of the image with light, and the camera is controlled to capture the image after the second infrared lamp fills the image, and the current first horizontal position and first vertical position of the movable component are recorded;
[0128] In step 1303, for each of the central pixel points of the four edges, the movable component of the second infrared lamp is moved so that the second infrared lamp fills the central pixel point with light, and the camera is controlled to capture an image after the second infrared lamp fills the image, while recording the second horizontal position and the second vertical position of the movable component.
[0129] In step 1304, based on the first position of the central pixel points of the four sides of the first image, the first position of the image center pixel point of the first image, the first horizontal position and the first vertical position of the movable part, and the second horizontal position and the second vertical position of the movable part corresponding to the central pixel points of each side, the correspondence between the first position of each pixel point in the first image and the second position of the movable part is determined; the second position includes the horizontal position and the vertical position of the movable part.
[0130] When implementing it specifically, Figure 14 The figure shows a schematic diagram of the movable part for moving the second infrared lamp in the terminal device and the second infrared lamp. Figure 14 The illustrated suspension and tilt-controlled stepper motor mechanism can also employ a mechanical structure with the same functionality. 1 and 2 are stepper motors for the X and Y axes, respectively; 3 is the body of the second infrared lamp; 4 and 5 are the lenses within the lens assembly; 6 and 7 are suspension springs for the second infrared lamp, allowing the displacement of the other end of the motor to adjust the direction of the light-emitting axis of the second infrared lamp and its lens assembly, forming the overall structure 10. The motor can be a stepper motor or a VCM motor with precise current drive control. The suspension mechanism can be made of elastic, fixed materials capable of withstanding a certain amount of deformation, such as metal shrapnel, springs, or wire.
[0131] Among them, the second infrared lamp is matched with the lens assembly to narrow the infrared light beam to a smaller fill light angle range, thereby increasing the fill light distance. At the same time, a mechanical structure (including a stepper motor or a VCM motor) can dynamically adjust the infrared beam direction of the second infrared lamp. The beam position is aligned with the center point of the camera's field of view by default.
[0132] like Figure 15The figure below shows another schematic diagram of the active components and the second infrared lamp in the terminal device from another angle. 1 and 2 are stepper motors for the X and Y axes, respectively; 3 is the lamp body of the second infrared lamp; 4 and 5 are the lenses within the lens assembly; 6, 7, 8, and 9 are suspension springs for the second infrared lamp, which facilitate adjustment of the light-emitting axis of the second infrared lamp and its lens assembly, forming the overall structure 10, when the motor at the other end moves. The motor can be a stepper motor or a VCM motor with precise current drive control. The suspension mechanism can be made of elastic materials such as metal shrapnel, springs, and wires that can withstand a certain amount of deformation.
[0133] When producing terminal equipment, the second infrared lamp is aligned and calibrated in the imaging field of view of the camera, and the X-axis (motor 2) is controlled to adjust the optical axis of the second infrared lamp to sweep the entire imaging field of view of the image to be processed from the leftmost to the rightmost, so as to obtain the X-axis adjustment range (X+ and X-) of the second infrared lamp; the Y-axis (motor 1) is controlled to adjust the optical axis of the second infrared lamp to sweep the entire imaging field of view of the image to be processed from the topmost to the bottommost, so as to obtain the Y-axis adjustment range (Y+ and Y-) of the second infrared lamp, thereby determining the preset correspondence between the first position and the second position of the facial contour.
[0134] In a specific implementation, when determining the preset corresponding relationship between the first position and the second position of the face contour, such as Figure 16 The figure shows the first position (x, y) of a pixel in the first image after the first infrared light is applied. First, the pixel distance (Δx, Δy) of the first position of the pixel relative to the image center is calculated. Based on the corresponding relationship, Δx / (W / 2)*(X-) is calculated, which indicates that the motor in the second position has moved horizontally to the right, to X. Similarly, based on the corresponding relationship, Δy / (H / 2)*(Y+) is calculated, which indicates that the motor in the second position has moved vertically upward, to Y. This allows the second infrared light to be moved to the second position (X-, Y+) to apply fill light to the pixel. Controlling the camera to capture the image completes the second infrared light fill light capture process, and simultaneously obtains the second position (X-, Y+) corresponding to the pixel's first position (x, y). W is the number of pixels in the first image horizontally, or the image width; H is the number of pixels in the first image vertically, or the image height.
[0135] In step 404, a target image corresponding to the image to be processed is determined based on the obtained reference image.
[0136] In a possible implementation, in the embodiment of the present application, determining the target image corresponding to the image to be processed based on the obtained reference image can be performed in the following two cases:
[0137] Case 1: If there is a face contour to be processed in the image to be processed, the reference image of the face contour to be processed is used as the target image corresponding to the image to be processed;
[0138] Case 2: If there are multiple face contours to be processed in the image to be processed, multiple reference images corresponding to the multiple face contours to be processed are synthesized to obtain a target image corresponding to the image to be processed.
[0139] In specific implementation, in the embodiment of the present application, based on the obtained reference image, the target image corresponding to the image to be processed is determined, which can be performed as follows: Figure 17 Steps shown:
[0140] In step 1701, it is determined whether there is only one face contour to be processed in the image to be processed;
[0141] If there is only one face outline to be processed in the image to be processed, then in step 1702, a reference image of the face outline to be processed after being illuminated by the second infrared light is obtained; in step 1703, the reference image of the face outline to be processed is used as the target image corresponding to the image to be processed;
[0142] If there is more than one facial contour to be processed in the image to be processed, then in step 1704, a reference image is obtained after the second infrared light is used to fill in the light for multiple facial contours to be processed respectively; in step 1705, multiple reference images corresponding to the multiple facial contours to be processed are synthesized to obtain a target image corresponding to the image to be processed.
[0143] If there are multiple facial contours to be processed in the image to be processed, the second infrared light can be automatically controlled to fill in the light for each of the multiple facial contours to be processed, and then the images after the fill-in light are collected respectively.
[0144] In order to facilitate understanding of the infrared fill light image shooting method provided in the embodiment of the present application, the following reference is made to Figure 18 , the complete process of the infrared fill light image shooting method provided in the embodiment of the present application is described.
[0145] In step 1801, in response to a user-triggered acquisition operation for an image to be processed, a first infrared light is activated and a camera is controlled to acquire the image to be processed;
[0146] In step 1802, if at least one face contour is detected in the image to be processed, a first position of the at least one face contour in the image to be processed is determined;
[0147] In step 1803, a first ratio of the face area included in each face contour to the area of the image to be processed is determined; based on a preset correspondence between the ratio of the face area to the image area and the actual distance between the face and the camera, an actual distance corresponding to the first ratio is determined;
[0148] In step 1804, if the actual distance corresponding to the first ratio is greater than the preset distance threshold, the facial contour is determined to be the facial contour to be processed;
[0149] In step 1805, for any face contour to be processed, the following operations are performed: the second infrared light is moved to the second position corresponding to the first position of the face contour to be processed, and fill light is applied to the face contour to be processed, while the camera is controlled to capture a reference image after the fill light is applied by the second infrared light;
[0150] In step 1806 , based on the obtained reference image, a target image corresponding to the image to be processed is determined.
[0151] Based on the foregoing description, an embodiment of the present application sets a camera, a first infrared lamp and a movable second infrared lamp in a terminal device; wherein the fill light angle range of the first infrared lamp is greater than the fill light angle range of the second infrared lamp, and the fill light distance of the first infrared lamp is less than the fill light distance of the second infrared lamp; in response to a user-triggered acquisition operation for the image to be processed, the first infrared lamp is started and the camera is controlled to acquire the image to be processed, and if at least one facial contour is detected in the image to be processed, the first position of the at least one facial contour in the image to be processed is determined; for any one of the at least one facial contours to be processed, the second infrared lamp is moved to a second position corresponding to the first position of the facial contour to be processed, and fill light is performed on the facial contour to be processed, and at the same time, the camera is controlled to acquire a reference image after the second infrared lamp is filled in; wherein the first position represents the position of the facial contour in the image to be processed, and the second position represents the position of the second infrared lamp in the terminal device; based on the obtained reference image, the target image corresponding to the image to be processed is determined.
[0152] Therefore, in this application, the first infrared lamp mainly provides infrared fill light for the facial contour within a relatively close fill light distance, while the second infrared lamp concentrates the infrared light within a narrower fill light angle range to achieve infrared fill light for the facial contour at a longer fill light distance; at the same time, by moving the position of the second infrared lamp, the infrared beam of the second infrared lamp can move freely within the camera's field of view, thereby achieving fill light for the facial contour at a longer distance in the camera's screen, effectively improving the effective distance for terminal equipment such as law enforcement recorders to clearly capture faces at night.
[0153] Based on the same inventive concept, the embodiment of the present application also provides a terminal device, such as Figure 19As shown, it includes: a camera 1901, a first infrared light 1902, a second infrared light 1903, a processor 1904, a memory 1905 and a bus interface 1906, wherein the second infrared light 1903 is movable, wherein:
[0154] The camera 1901 is configured to capture infrared images and collect images to be processed; the first infrared light 1902 and the second infrared light 1903 provide fill light for faces in the images to be processed; the fill light angle range of the first infrared light is greater than the fill light angle range of the second infrared light, and the fill light distance of the first infrared light is less than the fill light distance of the second infrared light; and the memory 1905 is configured to store instructions executable by the processor 1904.
[0155] Among them, Figure 19 In the embodiment, the bus interface 1906 may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors 1904 represented by the processor 1904 and the memory 1905 represented by the memory 1905. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be further described herein. The bus interface 1906 provides an interface. Optionally, the processor 1904 may be a CPU (central processing unit), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a CPLD (Complex Programmable Logic Device), and the processor may also adopt a multi-core architecture.
[0156] The processor 1904 is configured to execute any of the infrared fill light image shooting methods provided in the embodiments of the present application according to the obtained executable instructions by calling the computer program stored in the memory 1905. The processor 1904 and the memory 1905 may also be physically separated. It should be noted that the above-mentioned device provided in the embodiments of the present invention can implement all the above-mentioned method steps and can achieve the same technical effects.
[0157] Based on the same inventive concept, an embodiment of the present application further provides an infrared fill light image shooting device, which is applied to a terminal device, wherein the terminal device includes a camera, a first infrared light, and a movable second infrared light, wherein the fill light angle range of the first infrared light is greater than the fill light angle range of the second infrared light, and the fill light distance of the first infrared light is less than the fill light distance of the second infrared light, such as Figure 20 Shown, including:
[0158] The first fill light module 2001 is configured to activate the first infrared light and control the camera to capture the image to be processed in response to a user-triggered capture operation for the image to be processed;
[0159] a position determination module 2002, configured to determine a first position of the at least one face contour in the image to be processed if at least one face contour is detected in the image to be processed;
[0160] The second fill light module 2003 is configured to perform the following operations for any one of the at least one facial contours to be processed: move the second infrared light to a second position corresponding to the first position of the facial contour to be processed, and perform fill light on the facial contour to be processed, while controlling the camera to capture a reference image after the fill light is applied by the second infrared light; wherein the first position represents the position of the facial contour in the image to be processed, and the second position represents the position of the second infrared light in the terminal device;
[0161] The target image determination module 2004 is configured to determine a target image corresponding to the image to be processed based on the obtained reference image.
[0162] In a possible implementation, the target image determination module 2004 is specifically configured to:
[0163] If there is a face contour to be processed in the image to be processed, then using the reference image of the face contour to be processed as the target image corresponding to the image to be processed;
[0164] If there are multiple face contours to be processed in the image to be processed, multiple reference images corresponding to the multiple face contours to be processed are synthesized to obtain a target image corresponding to the image to be processed.
[0165] In a possible implementation, the location determination module 2002 is specifically configured to:
[0166] Extracting key feature points from the image to be processed using image analysis technology;
[0167] Determining at least one facial contour in the image to be processed based on the feature key points and preset facial contour key points;
[0168] For each face contour, the position of the central pixel point of the face contour in the image to be processed is used as the first position of the face contour in the image to be processed.
[0169] In a possible implementation manner, the second fill light module 2003 is specifically configured to:
[0170] Determining, based on a preset correspondence between a first position and a second position of a facial contour, a second position corresponding to the first position of the facial contour to be processed;
[0171] Move the second infrared lamp to the second position.
[0172] In a possible implementation manner, the terminal device further includes a movable component for moving the second infrared lamp; therefore, the apparatus further includes:
[0173] The correspondence determination module is configured to determine a preset correspondence between a first position and a second position of a face contour according to the following method:
[0174] Determine the center pixel points of four sides of the first image captured by the camera after the first infrared light is used for fill light and a first position of the image center pixel point of the first image;
[0175] Moving the movable component of the second infrared light so that the second infrared light fills the central pixel of the image, controlling the camera to capture the image after the second infrared light fills the image, and recording the current first horizontal position and first vertical position of the movable component;
[0176] For each of the central pixel points of the four edges, the movable component of the second infrared lamp is moved so that the second infrared lamp provides fill light to the central pixel point, and the camera is controlled to capture an image after the fill light is provided by the second infrared lamp, while recording a second horizontal position and a second vertical position of the movable component.
[0177] Based on the first positions of the central pixel points of the four sides of the first image, the first position of the image center pixel point of the first image, the first horizontal position and the first vertical position of the movable part, and the second horizontal position and the second vertical position of the movable part corresponding to the central pixel points of each side, the correspondence between the first position of each pixel point in the first image and the second position of the movable part is determined; the second position includes the horizontal position and the vertical position of the movable part.
[0178] In a possible implementation manner, the second fill light module 2003 is further configured to:
[0179] Determine the face contour to be processed in the at least one face contour according to the following method:
[0180] For any one of the at least one face contour, perform the following operations:
[0181] Determine a first ratio of the face area included in the face contour to the area of the image to be processed;
[0182] Determining the actual distance corresponding to the first ratio based on a preset correspondence between a ratio of the face area to the image area and an actual distance between the face and the camera;
[0183] If the actual distance corresponding to the first ratio is greater than a preset distance threshold, the facial contour is determined to be the facial contour to be processed.
[0184] In a possible implementation manner, the second fill light module 2003 is further configured to:
[0185] If the at least one facial contour includes multiple facial contours to be processed, the order of moving the second infrared light to the second position corresponding to the first position of the facial contour to be processed and filling the facial contour to be processed is determined according to the actual distance corresponding to each facial contour to be processed.
[0186] In an exemplary embodiment, the present application further provides a computer-readable storage medium including instructions, such as a memory including instructions, wherein the instructions can be executed by a processor of an electronic device to complete the above-mentioned infrared fill light image shooting method. Optionally, the computer-readable storage medium can be a non-transitory computer-readable storage medium, for example, a non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0187] In an exemplary embodiment, a computer program product is further provided, including a computer program. When the computer program is executed by a processor, the infrared fill light image shooting method provided in the present application is implemented.
[0188] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0189] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0190] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0191] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0192] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A method for shooting infrared fill light images, characterized in that: The method is applied to a terminal device, the terminal device including a camera, a first infrared light, and a movable second infrared light, the fill light angle range of the first infrared light being greater than the fill light angle range of the second infrared light, and the fill light distance of the first infrared light being less than the fill light distance of the second infrared light, the method comprising: In response to a user-triggered acquisition operation for an image to be processed, starting the first infrared light and controlling the camera to acquire the image to be processed; If it is detected that at least one face contour exists in the image to be processed, determining a first position of the at least one face contour in the image to be processed; For any one of the at least one facial contours to be processed, the following operations are respectively performed: moving the second infrared light to a second position corresponding to the first position of the facial contour to be processed, and performing fill light on the facial contour to be processed, while controlling the camera to capture a reference image after the fill light is performed by the second infrared light; wherein the first position represents the position of the facial contour in the image to be processed, and the second position represents the position of the second infrared light in the terminal device; Based on the obtained reference image, a target image corresponding to the image to be processed is determined.
2. The method according to claim 1, characterized in that The step of determining a target image corresponding to the image to be processed based on the obtained reference image includes: If there is a face contour to be processed in the image to be processed, then using the reference image of the face contour to be processed as the target image corresponding to the image to be processed; If there are multiple face contours to be processed in the image to be processed, multiple reference images corresponding to the multiple face contours to be processed are synthesized to obtain a target image corresponding to the image to be processed.
3. The method according to claim 1, characterized in that If at least one face contour is detected in the image to be processed, determining a first position of the at least one face contour in the image to be processed includes: Extracting key feature points from the image to be processed using image analysis technology; Determining at least one face contour in the image to be processed based on the feature key points and preset facial contour key points; For each face contour, the position of the central pixel point of the face contour in the image to be processed is used as the first position of the face contour in the image to be processed.
4. The method according to claim 1, wherein The step of moving the second infrared lamp to a second position corresponding to the first position of the face contour to be processed comprises: Determining, based on a preset correspondence between a first position and a second position of a facial contour, a second position corresponding to the first position of the facial contour to be processed; Move the second infrared lamp to the second position.
5. The method according to claim 4, characterized in that The terminal device further includes a movable component for moving the second infrared lamp; The preset correspondence between the first position and the second position of the face contour is determined according to the following method: Determine the center pixel points of four sides of the first image captured by the camera after the first infrared light is used for fill light and a first position of the image center pixel point of the first image; Moving the movable component of the second infrared light so that the second infrared light fills the central pixel of the image, controlling the camera to capture the image after the second infrared light fills the image, and recording the current first horizontal position and first vertical position of the movable component; For each of the central pixel points of the four edges, the movable component of the second infrared lamp is moved so that the second infrared lamp provides fill light to the central pixel point, and the camera is controlled to capture an image after the fill light is provided by the second infrared lamp, while recording a second horizontal position and a second vertical position of the movable component. Based on the first positions of the central pixel points of the four sides of the first image, the first position of the image center pixel point of the first image, the first horizontal position and the first vertical position of the movable part, and the second horizontal position and the second vertical position of the movable part corresponding to the central pixel points of each side, the correspondence between the first position of each pixel point in the first image and the second position of the movable part is determined; the second position includes the horizontal position and the vertical position of the movable part.
6. The method according to claim 1, characterized in that Determine the face contour to be processed in the at least one face contour according to the following method: For any one of the at least one face contour, perform the following operations: Determine a first ratio of the face area included in the face contour to the area of the image to be processed; Determining the actual distance corresponding to the first ratio based on a preset correspondence between a ratio of the face area to the image area and an actual distance between the face and the camera; If the actual distance corresponding to the first ratio is greater than a preset distance threshold, the facial contour is determined to be the facial contour to be processed.
7. The method according to claim 6, characterized in that The method further comprises: If the at least one facial contour includes multiple facial contours to be processed, the order of moving the second infrared light to the second position corresponding to the first position of the facial contour to be processed and filling the facial contour to be processed is determined according to the actual distance corresponding to each facial contour to be processed.
8. A terminal device, characterized in that: The terminal device includes: A camera, a first infrared light, a movable second infrared light, a processor, and a memory; The camera is used for infrared photography and collecting images to be processed; The first infrared light and the movable second infrared light provide fill light for the face in the image to be processed; wherein the fill light angle range of the first infrared light is greater than the fill light angle range of the second infrared light, and the fill light distance of the first infrared light is less than the fill light distance of the second infrared light; The memory is used to store the processor executable instructions; The processor is configured to execute the steps of the method according to any one of claims 1 to 7.
9. An infrared fill light image shooting device, characterized in that: The device is applied to a terminal device, the terminal device including a camera, a first infrared light, and a movable second infrared light, the fill light angle range of the first infrared light is greater than the fill light angle range of the second infrared light, and the fill light distance of the first infrared light is less than the fill light distance of the second infrared light, and the device includes: a first fill light module, configured to activate the first infrared light and control the camera to capture the image to be processed in response to a user-triggered capture operation for the image to be processed; a position determination module, configured to determine a first position of the at least one face contour in the image to be processed if at least one face contour is detected in the image to be processed; a second fill light module, configured to perform the following operations for any one of the at least one facial contours to be processed: moving the second infrared light to a second position corresponding to the first position of the facial contour to be processed, performing fill light on the facial contour to be processed, and controlling the camera to capture a reference image after the fill light is applied by the second infrared light; wherein the first position represents a position of the facial contour in the image to be processed, and the second position represents a position of the second infrared light in the terminal device; The target image determination module is used to determine the target image corresponding to the image to be processed based on the obtained reference image.
10. A computer-readable storage medium, characterized in that The method comprises a program code, and when the program code is run on a terminal device, the program code is used to enable the terminal device to execute the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Light supplementing method and system for camera, intelligent terminal and storage medium
CN112995527A
Control method, control apparatus, and infrared camera
WO2022006739A1