Camera-based device control method, apparatus, and computer storage medium

CN119172635BActive Publication Date: 2026-09-18ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411125030.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2026-09-18
Estimated Expiration
2044-08-15

AI Technical Summary

Technical Problem

但有时仍可能会出现亮度较暗的问题,这个现象在一些性能不足的设备上尤为明显,使得对于远处的实时监控效果无法满足需求

Benefits of technology

[0040]Compared with existing technologies, the beneficial effects of this application are as follows: The device control unit responds to the camera activating the intelligent frame reduction function by reducing the camera's frame rate from a preset frame rate to the reduced frame rate, and increasing the camera's shutter speed from a preset shutter speed to the reduced frame shutter speed; it determines whether there are moving objects in the current frame captured by the camera; if so, it increases the camera's frame rate from the reduced frame rate to the preset frame rate, and decreases the camera's shutter speed from the reduced frame rate to the preset shutter speed. Through the above device control method, the problem of excessively dark distant monitoring is solved by increasing the shutter speed. Furthermore, motion detection is performed in real time after frame reduction. If there are critical moving objects in the monitored image, the shutter speed is gradually reduced according to the speed of the moving objects, and the frame reduction logic is exited to prevent stuttering of moving objects in the image and avoid affecting the acquisition effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172635B_ABST
    Figure CN119172635B_ABST
Patent Text Reader

Abstract

The application provides a camera-based device control method, a device control apparatus and a computer storage medium. The device control method comprises: in response to the camera starting an intelligent frame reduction function, reducing the frame rate of the camera from a preset frame rate to a frame reduction frame rate, and increasing the shutter time of the camera from a preset shutter time to a frame reduction shutter time; determining whether a current frame captured by the camera contains a dynamic object; if yes, increasing the frame rate of the camera from the frame reduction frame rate to the preset frame rate, and reducing the shutter time of the camera from the frame reduction shutter time to the preset shutter time. Through the above device control method, the shutter time is increased to solve the problem of overdarkness in long-distance monitoring, and after frame reduction, real-time movement detection is performed. If there is a key moving object in the monitoring picture, the shutter time is gradually reduced according to the speed of the moving object, and the frame reduction logic is exited, so as to prevent the moving object from appearing in the image, avoid affecting the acquisition effect, and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a camera-based device control method, device control apparatus, and computer storage medium. Background Technology

[0002] With societal progress and increased public awareness of security, surveillance equipment is now ubiquitous. In low-light conditions, these devices activate their white or infrared lights to supplement illumination and improve monitoring effectiveness. However, sometimes insufficient brightness can still occur, particularly noticeable with less powerful equipment, making real-time monitoring of distant locations unsatisfactory. Furthermore, in the event of illegal or criminal activity, crucial details from the surveillance footage can be lost.

[0003] Existing intelligent supplementary lighting monitoring devices fall into two categories. One type is implemented through hardware solutions. It first uses a wireless module to detect distance and then controls the intensity of the supplementary light based on the distance of objects to the light source. This increases monitoring costs, and the current control of the light panel is global. Although it can adjust the distance of the monitored image by adjusting the current of the light panel, it will continuously darken the image when there are stationary objects in the foreground, resulting in a completely dark surrounding area. The other type is implemented through software solutions. It improves the brightness of the monitored image by adjusting the automatic exposure intensity. However, in high-gain scenes, forcibly increasing the gain to improve brightness will degrade the monitoring effect and often lead to the loss of monitoring details. Summary of the Invention

[0004] To address the aforementioned technical problems, this application proposes a camera-based device control method, device control apparatus, and computer storage medium.

[0005] To address the aforementioned technical problems, this application proposes a camera-based device control method, which includes:

[0006] In response to the camera activating the intelligent frame reduction function, the camera's frame rate is reduced from the preset frame rate to the reduced frame rate, and the camera's shutter speed is increased from the preset shutter speed to the reduced frame shutter speed.

[0007] Determine whether there are moving objects in the current frame captured by the camera;

[0008] If so, the camera is increased from the reduced frame rate to the preset frame rate, and the camera is decreased from the reduced shutter speed to the preset shutter speed.

[0009] Wherein, reducing the camera's shutter speed from the frame-down time to the preset shutter speed includes:

[0010] Obtain the moving speed of the dynamic object in the current frame;

[0011] Based on the speed of the moving object, obtain the shutter adjustment step size;

[0012] The frame rate reduction shutter time is reduced to the preset shutter time according to the shutter speed adjustment step size.

[0013] The step of determining whether there are moving objects in the current frame captured by the camera includes:

[0014] Get the cumulative number of frames in the image frames before the current frame where the number of moved seed blocks exceeds a preset seed block threshold;

[0015] Determine whether the number of moving seed blocks in the current frame exceeds the preset seed block threshold;

[0016] If so, update the frame accumulation number based on the current frame;

[0017] Determine whether the cumulative frame count has reached the preset frame count.

[0018] The device control method further includes:

[0019] Obtain the first historical frame and the second historical frame of the current frame, wherein the first historical frame is the previous frame of the current frame, and the second historical frame is the previous frame of the first historical frame.

[0020] Obtain the first image block of the current frame, the second image block of the first historical frame, and the third image block of the second historical frame;

[0021] Obtain the first pixel difference between the first image block and the second image block at the same position, and mark the first image block whose first pixel difference is greater than the dynamic detection threshold as the first moving block;

[0022] Obtain the second pixel difference between the first image block and the third image block at the same position, and mark the first image block whose second pixel difference is greater than the dynamic detection threshold as the second moving block;

[0023] The region obtained by subtracting the first moving block from the second moving block is marked as the moving seed block.

[0024] The step of obtaining the moving object speed of the dynamic object in the current frame includes:

[0025] For each moving seed block, traverse the neighboring blocks of the moving seed block;

[0026] Neighboring blocks whose pixel values ​​are more similar to the moving seed block than a preset similarity threshold are marked as moving blocks;

[0027] The moving seed block and the moving sub-block are combined into a moving sub-block region;

[0028] The largest moving block region is taken as the moving object region of the current frame;

[0029] The moving object speed of the dynamic object is obtained based on the moving object region in the current frame and the moving object region in the previous frame.

[0030] The device control method further includes:

[0031] In response to the absence of the dynamic object in the current frame captured by the camera, the value of the frame accumulation is reduced.

[0032] The step of determining whether there are moving objects in the current frame captured by the camera includes:

[0033] After a preset time has elapsed since the camera activated its intelligent frame reduction function, it is determined whether there are any moving objects in the current frame captured by the camera.

[0034] The device control method further includes:

[0035] In response to the camera activating the intelligent frame reduction function, the current gain of the camera is obtained;

[0036] Determine whether the current gain is less than a preset exit gain threshold, and whether the accumulated number of frames less than the preset exit gain threshold is greater than a preset frame number threshold;

[0037] If so, the camera is increased from the reduced frame rate to the preset frame rate, and the camera is decreased from the reduced shutter speed to the preset shutter speed.

[0038] To address the aforementioned technical problems, this application also proposes a device control apparatus, which includes a memory and a processor coupled to the memory; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the device control method as described above.

[0039] To address the aforementioned technical problems, this application also proposes a computer storage medium for storing program data, which, when executed by a computer, is used to implement the aforementioned device control method.

[0040] Compared with existing technologies, the beneficial effects of this application are as follows: The device control unit responds to the camera activating the intelligent frame reduction function by reducing the camera's frame rate from a preset frame rate to the reduced frame rate, and increasing the camera's shutter speed from a preset shutter speed to the reduced frame shutter speed; it determines whether there are moving objects in the current frame captured by the camera; if so, it increases the camera's frame rate from the reduced frame rate to the preset frame rate, and decreases the camera's shutter speed from the reduced frame rate to the preset shutter speed. Through the above device control method, the problem of excessively dark distant monitoring is solved by increasing the shutter speed. Furthermore, motion detection is performed in real time after frame reduction. If there are critical moving objects in the monitored image, the shutter speed is gradually reduced according to the speed of the moving objects, and the frame reduction logic is exited to prevent stuttering of moving objects in the image and avoid affecting the acquisition effect. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] in:

[0043] Figure 1 This is a schematic flowchart of an embodiment of the camera-based device control method provided in this application;

[0044] Figure 2 This is a flowchart illustrating the frame rate linkage method for camera dynamic perception provided in this application.

[0045] Figure 3 This is a flowchart illustrating an embodiment of the dynamic object detection method provided in this application;

[0046] Figure 4 This is a flowchart of the dynamic object detection method provided in this application;

[0047] Figure 5 This is a flowchart illustrating an embodiment of the moving seed block calculation method provided in this application;

[0048] Figure 6 This is a schematic diagram of the overall process of the moving seed block calculation method provided in this application;

[0049] Figure 7 This is a flowchart illustrating an embodiment of the method for obtaining a moving object region provided in this application;

[0050] Figure 8 This is a flowchart illustrating an embodiment of the frame rate linkage function exit method provided in this application;

[0051] Figure 9 This is a schematic diagram of the structure of an embodiment of the device control apparatus provided in this application;

[0052] Figure 10 This is a schematic diagram of the structure of an embodiment of the computer storage medium provided in this application. Detailed Implementation

[0053] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0054] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0055] Current camera monitoring solutions for high-gain scenes mostly rely on light control, which is a rough approach of globally controlling all supplementary lights to increase brightness, or using other hardware solutions to identify the distance of objects to control the lights. This not only increases costs but also results in unsatisfactory monitoring effects.

[0056] High gain is suitable for darker or low-light environments. High gain improves image brightness and contrast, thus better capturing details in the shadows of objects. However, high gain may also introduce some noise or graininess to the image.

[0057] The dynamic sensing frame rate linkage method proposed in this application, regardless of the type of sensor, as long as it supports frame rate reduction (such as doubling the shutter speed), can achieve better clarity and monitoring effects than the original effect in high-gain scenes, and can obtain better monitoring results with lower equipment costs. Furthermore, when the motion detection algorithm detects a person entering the vicinity of the monitoring screen, it will restore the shutter speed and frame rate to avoid image stuttering that would affect the monitoring effect.

[0058] Specifically, this application discloses a frame rate linkage method and system for camera dynamic perception. The essence of this application is to address the problem of excessively dark scenes in high-gain scenarios by doubling the shutter speed. This requires not only solving the environmental brightness issue but also ensuring that doubling the shutter speed does not affect the image quality when a person enters the monitoring frame. Therefore, after intelligent frame reduction is enabled, motion detection is performed in real time. If a person or a key moving object (a large, continuously moving object) is detected in the monitoring frame, the shutter speed is gradually adjusted according to the object's speed, and the frame reduction logic is exited to prevent the moving object from appearing jerky in the image and thus avoid affecting the monitoring effect.

[0059] Please refer to the details. Figure 1 and Figure 2 , Figure 1 This is a schematic flowchart of an embodiment of the camera-based device control method provided in this application. Figure 2 This is a flowchart illustrating the frame rate linkage method for camera dynamic perception provided in this application.

[0060] The camera-based device control method of this application is applied to a device control apparatus. This apparatus can be a server, a terminal device, or a system in which the server and terminal devices cooperate. Accordingly, all components of the device control apparatus, such as units, subunits, modules, and submodules, can be entirely located in the server, entirely located in the terminal device, or separately located in both the server and the terminal device.

[0061] Furthermore, the aforementioned server can be either hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software programs or software modules, such as software or software modules used to provide distributed server functionality, or as a single software program or software module; no specific limitations are made here.

[0062] Specifically, the device control device of this application can be a processing unit or processor in the camera, or a processing platform mounted on the camera or used for remote control of the camera.

[0063] like Figure 1 As shown, the specific steps are as follows:

[0064] Step S11: In response to the camera enabling the intelligent frame rate reduction function, the camera is reduced from the preset frame rate to the reduced frame rate, and the camera is increased from the preset shutter speed to the reduced shutter speed.

[0065] In the embodiments of this application, Figure 2The frame rate linkage algorithm logic shown mainly uses the shutter to adjust the brightness of the image. When the camera gain exceeds the preset threshold N, it is considered that the device is in a dark scene (high gain). At this time, the frame count will be accumulated. If the cumulative number of consecutive frames exceeds the preset frame count TH, the state-aware frame rate linkage algorithm will be activated.

[0066] During the algorithm's execution phase, the dynamic object perception algorithm module detects whether there are moving objects in the frame. If not, it performs frame rate reduction and gradually doubles the shutter speed to increase image brightness. If there are moving objects, it exits the frame rate reduction logic and restores the shutter speed to maintain normal image quality, preventing stuttering when people enter the frame and affecting monitoring results. The specific algorithm logic flow is divided into five stages: image stabilization stage (AE_MOVEFPSADJ_STABLE), frame rate recovery stage (ALG_MOVEFPSADJ_FPSUP), frame rate reduction stage (ALG_MOVEFPSADJ_FPSDOWN), frame rate stabilization stage after frame rate reduction (ALG_MOVEFPSADJ_FPSSTABLE), and frame rate linkage function exit stage (ALG_MOVEFPSADJ_FPSADJEXIT).

[0067] like Figure 2 Case 1: Smooth Image Stage (AE_MOVEFPSADJ_STABLE), during which the program runs normally. At this stage, the camera has its intelligent frame rate reduction function enabled, which reduces the camera's frame rate and increases its shutter speed.

[0068] Step S12: Determine whether there are dynamic objects in the current frame captured by the camera.

[0069] In the embodiments of this application, such as Figure 2 In Case 1, the device control unit uses a dynamic object perception algorithm to detect and judge dynamic objects. If a possible key moving object is detected, it will enter Case 2: the frame rate recovery stage, that is, continue to execute step S13.

[0070] Specifically, the equipment control device detects whether there are dynamic objects in the current frame captured by the camera. The detection methods include, but are not limited to, the following dynamic target detection algorithms: background subtraction, frame difference, optical flow, etc.

[0071] This application draws inspiration from the existing frame difference method and provides a dynamic object detection method that primarily relies on the three-frame difference method combined with the flood filling method to achieve moving object detection. Please refer to [link / reference] for details. Figure 3 and Figure 4 , Figure 3 This is a schematic flowchart of an embodiment of the dynamic object detection method provided in this application. Figure 4This is a flowchart of the module of the dynamic object detection method provided in this application.

[0072] like Figure 3 As shown, the specific steps are as follows:

[0073] Step S21: Obtain the cumulative number of frames in the image frames before the current frame where the number of moved seed blocks exceeds the preset seed block threshold.

[0074] In the embodiments of this application, such as Figure 4 The moving area detection module shown in the diagram counts the number of moving block seeds (moveBlockArea) in the image frames preceding the current frame and determines whether the number in each frame exceeds a preset threshold. If it exceeds the threshold, the frame is accumulated and the number of accumulated frames is recorded.

[0075] Step S22: Determine whether the number of moving seed blocks in the current frame exceeds the preset seed block threshold.

[0076] In this embodiment of the application, the device control device obtains the number of move block seeds (moveBlockArea) of the current frame, determines whether the number of current frames exceeds a preset threshold, and if so, proceeds to step S23.

[0077] Step S23: Update the frame accumulation number based on the current frame.

[0078] In this embodiment of the application, the device control device increments the current frame on the frame accumulation number to update the frame accumulation number.

[0079] Step S24: Determine whether the frame accumulation number has reached the preset frame number.

[0080] In this embodiment, the device control unit determines whether the current frame count, up to the current frame, exceeds a preset frame number N. If so, it considers that there is a moving object of interest in the captured image.

[0081] Furthermore, the moving seed block in step S22 is the image block containing object movement information obtained by comparing adjacent frame images using the frame difference method. The following section will combine... Figure 5 and Figure 6 Continuing with the method for obtaining the moving seed block, among which, Figure 5 This is a flowchart illustrating an embodiment of the moving seed block calculation method provided in this application. Figure 6 This is a schematic diagram of the overall process of the moving seed block calculation method provided in this application.

[0082] like Figure 5 As shown, the specific steps are as follows:

[0083] Step S31: Obtain the first historical frame and the second historical frame of the current frame, wherein the first historical frame is the previous frame of the current frame and the second historical frame is the previous frame of the first historical frame.

[0084] In this embodiment of the application, the device control device acquires a video image sequence, the sequence including at least three frames, namely the current frame, the first historical frame (i.e., Figure 6 The previous frame in the first history (and the second history frame) and the second history frame (i.e. Figure 6 (The frame before the previous frame in the text).

[0085] Step S32: Obtain the first image block of the current frame, the second image block of the first historical frame, and the third image block of the second historical frame.

[0086] In the embodiments of this application, such as Figure 4 The moving block marking module shown in the diagram divides the image frames in the video image sequence into a certain number of blocks according to the same division method.

[0087] Step S33: Obtain the first pixel difference between the first image block and the second image block at the same position, and mark the first image block whose first pixel difference is greater than the dynamic detection threshold as the first moving block.

[0088] Step S34: Obtain the second pixel difference between the first image block and the third image block at the same position, and mark the first image block whose second pixel difference is greater than the dynamic detection threshold as the second moving block.

[0089] In this embodiment of the application, the device control device uses the frame difference method to count the moving block seed.

[0090] Specifically, to avoid interference from reflective objects such as dust or small flying insects on the motion detection algorithm, we first calculate the pixel difference between the current frame and the previous frame and determine whether it exceeds the motion detection threshold diffThresh.

[0091] If so, the corresponding image block is assigned a value of 1 and marked as a moving block seed, and the moving block data after the difference is obtained, that is, the first pixel difference, which is an array of 0 and 1; then the same operation is performed on the current frame and the frame before that to obtain the moving block data, that is, the second pixel difference, which is an array of 0 and 1; finally, the moving block data of the two are subtracted, and the block with a value of 1 after the subtraction is used as the moving seed block to eliminate individual moving dust or small flying insects, etc.

[0092] Step S35: The region obtained by subtracting the first moving block from the second moving block is marked as the moving seed block.

[0093] In this embodiment, the device control device marks the first image block, which is simultaneously labeled as the first moving block and the second moving block, as a moving seed block, indicating that the first image block has continuous motion in the video image sequence. The pixel value of the moving seed block is the same as the pixel value of the first image block at the corresponding position.

[0094] Furthermore, the device control unit can also precisely move the size and position of the seed block through a subtraction operation, that is, the area obtained by subtracting the first moving block and the second moving block is used as the image area of ​​the moving seed block, and the pixel value of the moving seed block is assigned through the first image block to obtain the moving seed block.

[0095] Please continue reading. Figure 6 The equipment control device can further perform erosion operations on the acquired moving data blocks to further eliminate interference from moving dust or small flying insects on the motion detection algorithm. To avoid also eliminating the human movement process, an expansion operation is then performed on the moving data blocks; and another erosion and expansion operation is performed, which can largely eliminate small reflective objects such as dust or small flying insects.

[0096] Step S13: Increase the camera's frame rate from the reduced frame rate to the preset frame rate, and decrease the camera's shutter speed from the reduced frame rate to the preset shutter speed.

[0097] In the embodiments of this application, such as Figure 2 Case 2: Frame rate recovery stage (ALG_MOVEFPSADJ_FPSUP). After the device control device detects a key moving object in the captured image through the dynamic object perception algorithm, it will exit the frame rate reduction logic, and the shutter speed will gradually return to the original level.

[0098] The specific adjustment details are as follows: The device control unit determines whether the number of move block seeds (moveBlockArea) per frame exceeds the preset threshold (moveAreaStand). If it exceeds the threshold, frame accumulation is performed. When the accumulated frame number exceeds the preset frame number N, it is determined that a moving object exists. Moving object region detection is then performed, and the moving object's speed is obtained. The device control unit calculates the shutter adjustment step size (step) based on the moving object's speed. The specific formula for calculating step is shown below:

[0099]

[0100] Among them, V cur V represents the speed of the moving object in the current frame. min V is the minimum speed at which a moving object on the screen can move. max The maximum movement speed of the moving object on the screen is set to iniStep, which is the preset initial adjustment step size (usually set to 200).

[0101] Furthermore, the following is combined with Figure 7 Continuing with the methods for obtaining the region of a moving object, Figure 7 This is a flowchart illustrating an embodiment of the method for obtaining the region of a moving object provided in this application.

[0102] like Figure 7 As shown, the specific steps are as follows:

[0103] Step S41: Based on each moving seed block, traverse the neighboring blocks of the moving seed block.

[0104] Step S42: Mark the neighboring blocks whose pixel value similarity with the moving seed block is greater than a preset similarity threshold as moving blocks.

[0105] Existing motion detection methods, such as frame difference or background difference, often result in holes in the middle of the detected moving object due to the large area of ​​similar gray values, leading to inaccurate detection of the moving object area.

[0106] Therefore, in this embodiment of the application, the device control device uses the idea of ​​flood filling to traverse the neighboring blocks according to the moving block seed, and determines whether the similarity between the pixel values ​​of the neighboring block and the moving seed block exceeds a preset threshold. If so, the neighboring block is considered to be similar to the moving seed block and is marked as a moving block.

[0107] Step S43: Combine the moving seed block and the moving block into a moving block region.

[0108] Step S44: Select the largest moving block region as the moving object region of the current frame.

[0109] In this embodiment of the application, the device control device then uses this step to traverse the adjacent blocks of each moving block and selects the largest moving block area in the image as the final moving object area, thereby obtaining the accurate area of ​​the object's movement.

[0110] The key moving object (moving target) detected in this application is not limited; it can be a person, a pet, an animal, or any moving object.

[0111] Step S45: Based on the moving object region in the current frame and the moving object region in the previous frame, obtain the moving object speed of the dynamic object.

[0112] In the embodiments of this application, such as Figure 4 The moving speed acquisition module shown above, after acquiring the final moving object area, uses the device control device to calculate the center coordinates of that area using a first-order moment algorithm. The specific calculation formula is as follows:

[0113]

[0114] Where n is the total number of coordinates, p xi Let p be the x-axis coordinate of the i-th block. yi Let k be the y-coordinate of the i-th block. x k is the x-coordinate of the center of the moving object's region. y The y-axis coordinate is the center of the moving object's region.

[0115] After calculating the center of the moving object's region, the device control unit directly calculates the approximate speed v of the object's movement based on the coordinates of the moving region's center in the current frame and the previous frame. The specific calculation formula is as follows:

[0116]

[0117] Where v is the approximate velocity of the object, and x c The x-coordinate of the center of the moving object in the current frame, x l The x-coordinate of the center of the moving object in the previous frame, and the y-coordinate of the moving object. c The y-coordinate of the center of the moving object in the current frame. l This is the y-coordinate of the center of the moving object in the previous frame.

[0118] Furthermore, such as Figure 4 The frame rate linkage module shown mainly uses the shutter to adjust the brightness of the image in the frame rate linkage algorithm logic. When the camera gain exceeds the preset threshold N, it is considered that the device is in a dark scene (high gain). At this time, the frame count will be accumulated. If the cumulative number of consecutive frames exceeds the preset frame count TH, the dynamic perception frame rate linkage algorithm will be activated.

[0119] Please continue reading. Figure 2 Case 3 shown: Frame Reduction Phase (ALG_MOVEFPSADJ_FPSDOWN). During the dynamic detection phase, if the number of moving blocks (moveLightArea) in the current frame does not exceed the preset threshold (moveAreaStand), the device control unit will accumulate frames and set the dynamic detection wait threshold N to half its original value, or lower the dynamic detection wait threshold, so that if a moving object enters the monitored area during this phase, it can quickly respond and restore the frame rate. If the accumulated frame count exceeds the preset threshold (TH1), the frame reduction phase will begin, at which point the shutter speed will be gradually doubled to increase image brightness.

[0120] The specific shutter speed adjustment details are as follows:

[0121] 1. When there are no key moving objects in the frame, the system will continuously determine whether there are any moving objects that may need attention in the current monitoring frame, i.e., whether the number of moving blocks (moveLightArea) in the current frame exceeds the preset threshold (moveAreaStand). If not, the system will accumulate frames. When the accumulated frame count exceeds the threshold (TH1), it means that there are no moving objects in the monitoring frame for a period of time. At this time, the system will enter the frame reduction phase and increase the brightness of the image by doubling the shutter speed (in order to make the shutter speed doubling process imperceptible, the gain will also be adjusted at the same time as the shutter speed adjustment). After the frame reduction is completed, the system will enter the frame reduction stabilization phase.

[0122] 2. During frame rate reduction, if there is a moving object that may need to be monitored in the current monitoring scene, i.e., the number of moving blocks in the current frame (moveLightArea) exceeds the preset threshold (moveLightAreaStand), then frame accumulation is performed. If the accumulated number of frames exceeds the threshold N (which is half of the preset threshold at this time, so as to quickly adjust the shutter speed), then the frame rate recovery stage continues, and the shutter speed is adjusted according to the Case 2 strategy steps.

[0123] Please continue reading. Figure 2 Case 4 shown: Frame rate stabilization phase after frame rate reduction (ALG_MOVEFPSADJ_FPSSTABLE). After entering this phase, the frame rate adjustment will stabilize for a period of TH2 frames. During this time, dynamic object detection will not be performed to avoid brightness fluctuations that could falsely trigger the motion detection algorithm after the frame rate adjustment is complete. After the frame rate reduction stabilization phase ends, the image will enter a stable phase, where it awaits the next critical moving object detection.

[0124] Please combine Figure 8 Continue reading Figure 2 Case 5 shown: Frame rate linkage function exit phase (ALG_MOVEFPSADJ_FPSADJEXIT), where, Figure 8 This is a flowchart illustrating an embodiment of the frame rate linkage function exit method provided in this application.

[0125] like Figure 8 As shown, the specific steps are as follows:

[0126] Step S51: Respond to the camera enabling intelligent frame reduction function and obtain the camera's current gain.

[0127] Step S52: Determine whether the current gain is less than the preset exit gain threshold, and whether the cumulative number of frames less than the preset exit gain threshold is greater than the preset frame number threshold.

[0128] Step S53: Increase the camera's frame rate from the reduced frame rate to the preset frame rate, and decrease the camera's shutter speed from the reduced frame rate to the preset shutter speed.

[0129] In this embodiment of the application, after the dynamic sensing frame rate linkage algorithm is started, it will obtain the current gain in real time and compare it with the function exit gain. If the current gain is lower than the exit gain, it is considered that the device is in a bright scene (lower gain). At this time, the frame count will be accumulated. If the cumulative number of consecutive frames exceeds TH3, the dynamic sensing frame rate linkage algorithm will be turned off and wait for the next judgment to be turned on.

[0130] In this application, the device control unit responds to the camera activating the intelligent frame reduction function by reducing the camera's frame rate from a preset frame rate to the reduced frame rate and increasing the camera's shutter speed from a preset shutter speed to the reduced frame rate shutter speed; it determines whether there are moving objects in the current frame captured by the camera; if so, it increases the camera's frame rate from the reduced frame rate to the preset frame rate and decreases the camera's shutter speed from the reduced frame rate shutter speed to the preset shutter speed. Through the above device control method, the problem of excessively dark distant monitoring is solved by increasing the shutter speed. Furthermore, motion detection is performed in real time after frame reduction. If there are key moving objects in the monitored image, the shutter speed is gradually reduced according to the speed of the moving objects, and the frame reduction logic is exited to prevent the moving objects from appearing jerky in the image, thus avoiding affecting the acquisition effect.

[0131] The device control method of this application utilizes the three-frame difference method and performs adjacent result subtraction operation, while combining the idea of ​​flood filling to detect the area of ​​moving objects, which can achieve a more accurate detection effect.

[0132] The device control method of this application is based on the obtained moving object region and uses the first-order moment method to quickly calculate the approximate movement speed of the moving object.

[0133] The device control method of this application solves the problem of excessively dark monitoring at a distance by doubling the shutter speed. After frame reduction, motion detection is performed in real time. If there is a critical moving object (a large, continuously moving object such as a person or animal) in the monitoring screen, the shutter speed will be gradually reduced according to the speed of the moving object and the frame reduction logic will be exited to prevent the moving object from appearing stuttered in the image and avoid affecting the monitoring effect.

[0134] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0135] To implement the above-mentioned equipment control method, this application also proposes an equipment control device, for details please refer to [link / reference needed]. Figure 9 , Figure 9 This is a schematic diagram of an embodiment of the device control apparatus provided in this application.

[0136] The device control device 400 in this embodiment includes a processor 41, a memory 42, an input / output device 43, and a bus 44.

[0137] The processor 41, memory 42, and input / output device 43 are respectively connected to the bus 44. The memory 42 stores program data, and the processor 41 is used to execute the program data to implement the device control method described in the above embodiments.

[0138] In this embodiment, processor 41 can also be referred to as a CPU (Central Processing Unit). Processor 41 may be an integrated circuit chip with signal processing capabilities. Processor 41 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor, or processor 41 can be any conventional processor.

[0139] This application also provides a computer storage medium; please refer to the following: Figure 10 , Figure 10 This is a schematic diagram of a computer storage medium according to an embodiment of the present application. The computer storage medium 600 stores a computer program 61, which, when executed by a processor, is used to implement the device control method of the above embodiment.

[0140] When the embodiments of this application are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0141] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A camera-based device control method, characterized in that, The equipment control method includes: In response to the camera activating the intelligent frame reduction function, the camera's frame rate is reduced from the preset frame rate to the reduced frame rate, and the camera's shutter speed is increased from the preset shutter speed to the reduced frame shutter speed. Determine whether there are moving objects in the current frame captured by the camera; If so, increase the camera from the reduced frame rate to the preset frame rate, and decrease the camera from the reduced shutter speed to the preset shutter speed; The device control method further includes: In response to the camera activating the intelligent frame reduction function, the current gain of the camera is obtained; Determine whether the current gain is less than a preset exit gain threshold, and whether the accumulated number of frames less than the preset exit gain threshold is greater than a preset frame number threshold; If so, increase the camera from the reduced frame rate to the preset frame rate, and decrease the camera from the reduced shutter speed to the preset shutter speed; The step of reducing the camera's shutter speed from the frame-down time to the preset shutter speed includes: Obtain the moving speed of the dynamic object in the current frame; Based on the speed of the moving object, obtain the shutter adjustment step size; The frame rate reduction shutter time is reduced to the preset shutter time according to the shutter speed adjustment step size.

2. The equipment control method according to claim 1, characterized in that, The step of determining whether there are moving objects in the current frame captured by the camera includes: Get the cumulative number of frames in the image frames before the current frame where the number of moved seed blocks exceeds a preset seed block threshold; Determine whether the number of moving seed blocks in the current frame exceeds the preset seed block threshold; If so, update the frame accumulation number based on the current frame; Determine whether the cumulative frame count has reached the preset frame count.

3. The equipment control method according to claim 2, characterized in that, The device control method further includes: Obtain the first historical frame and the second historical frame of the current frame, wherein the first historical frame is the previous frame of the current frame, and the second historical frame is the previous frame of the first historical frame. Obtain the first image block of the current frame, the second image block of the first historical frame, and the third image block of the second historical frame; Obtain the first pixel difference between the first image block and the second image block at the same position, and mark the first image block whose first pixel difference is greater than the dynamic detection threshold as the first moving block; Obtain the second pixel difference between the first image block and the third image block at the same position, and mark the first image block whose second pixel difference is greater than the dynamic detection threshold as the second moving block; The region obtained by subtracting the first moving block from the second moving block is marked as the moving seed block.

4. The equipment control method according to claim 3, characterized in that, The step of obtaining the moving object speed of the dynamic object in the current frame includes: For each moving seed block, traverse the neighboring blocks of the moving seed block; Neighboring blocks whose pixel values ​​are more similar to the moving seed block than a preset similarity threshold are marked as moving blocks; The moving seed block and the moving sub-block are combined into a moving sub-block region; The largest moving block region is taken as the moving object region of the current frame; The moving object speed of the dynamic object is obtained based on the moving object region in the current frame and the moving object region in the previous frame.

5. The equipment control method according to claim 2, characterized in that, The device control method further includes: In response to the absence of the dynamic object in the current frame captured by the camera, the value of the frame accumulation is reduced.

6. The equipment control method according to claim 1, characterized in that, The step of determining whether there are moving objects in the current frame captured by the camera includes: After a preset time has elapsed since the camera activated its intelligent frame reduction function, it is determined whether there are any moving objects in the current frame captured by the camera.

7. A device control apparatus, characterized in that, The device control unit includes a memory and a processor coupled to the memory; The memory is used to store program data, and the processor is used to execute the program data to implement the device control method as described in any one of claims 1 to 6.

8. A computer storage medium, characterized in that, The computer storage medium is used to store program data, which, when executed by the computer, is used to implement the device control method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Imaging device, imaging method, and imaging program

    CN115336251A

  • Mobile terminal and method for controlling the same

    KR1020160019145A