Equipment control method and device based on camera and computer storage medium

By implementing intelligent frame reduction function on the camera, dynamically adjusting the frame rate and shutter, combining the three-frame difference method and the water filling method to detect moving objects, the problem of poor monitoring effect of monitoring equipment in low-light environments is solved, and the further development is achieved Good brightness and stability reduce costs.

CN119172635AActive Publication Date: 2024-12-20ZHEJIANG DAHUA TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing intelligent fill-light monitoring equipment has poor monitoring effect in low-light environments, resulting in excessive darkness of remote monitoring, and existing hardware and software solutions are prone to loss of details or increase in costs when adjusting brightness.

Method used

By implementing intelligent frame reduction function on the camera, dynamically adjust the frame rate and shutter time according to the existence of dynamic objects, detect moving objects using the three-frame difference method and the water filling method, quickly adjust the frame rate and shutter to improve brightness and prevent jamming Dust.

Benefits of technology

In high gain scenarios, improve the transparency and effect of the monitoring screen, reduce equipment costs, avoid the phenomenon of stuck dynamic objects in the monitoring screen, and ensure the stability of the monitoring effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172635A_ABST
    Figure CN119172635A_ABST
Patent Text Reader

Abstract

The invention provides a camera-based equipment control method, an equipment control device and a computer storage medium. The equipment control method comprises the following steps: in response to the fact that the camera starts an intelligent frame reduction function, reducing the camera from a preset frame rate to a frame reduction frame rate, and prolonging the camera from preset shutter time to frame reduction shutter time; judging whether a dynamic object exists in a current frame collected by the camera or not; and if yes, increasing the frame reduction rate of the camera to the preset frame rate, and reducing the frame reduction shutter time of the camera to the preset shutter time. According to the equipment control method, the problem that remote monitoring is too dark is solved by prolonging the shutter time, movement detection can be carried out in real time after frame drop, if a key moving object exists in a monitored picture, the shutter is gradually reduced according to the speed of the moving object, and the frame drop logic is quitted, so that the moving object is prevented from being blocked in an image, and the image quality is improved. The collection effect is prevented from being influenced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the development and progress of society, people's safety awareness is constantly improving. Monitoring equipment can be seen everywhere. In darker environments, the equipment will turn on its own white light / infrared light to supplement the light, so as to improve the monitoring effect in darker environments. However, sometimes the problem of low brightness may still occur. This phenomenon is particularly obvious on some devices with insufficient performance, making it impossible to meet the demand for real-time monitoring at a distance. Once a crime occurs, important details of the monitoring will be lost.

[0003] One type of existing intelligent fill light monitoring equipment is implemented through hardware solutions. First, distance detection is performed through a wireless module, and the intensity of the fill light is controlled by judging the distance of the object from the fill light. On the one hand, it increases the monitoring cost. On the other hand, the current of the light board is controlled globally. Although the distance of the monitoring screen can be adjusted by adjusting the current of the light board, when there is a stationary object in the near part of the screen, it will be dark all the time, resulting in darkness all around. The other type is implemented by software solutions. By adjusting the automatic exposure intensity, the brightness of the monitoring screen can be improved. However, in high-gain scenes, forcibly increasing the gain to increase the brightness will make the monitoring effect worse, and often lead to the loss of monitoring details. Summary of the invention

[0004] In order to solve the above technical problems, the present application proposes a camera-based device control method, a device control apparatus and a computer storage medium.

[0005] In order to solve the above technical problems, the present application proposes a device control method based on a camera, and the device control method includes:

[0006] In response to the camera starting the intelligent frame reduction function, reducing the camera from a preset frame rate to a reduced frame rate, and increasing the camera from a preset shutter time to a reduced frame shutter time;

[0007] Determine whether there is a dynamic object 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 shutter time is reduced from the reduced frame rate to the preset shutter time.

[0009] The step of reducing the camera's shutter time from the frame-dropping shutter time to the preset shutter time includes:

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

[0011] Based on the speed of the moving object, obtaining a shutter adjustment step length;

[0012] The frame-dropping shutter time is reduced to the preset shutter time according to the shutter adjustment step.

[0013] Wherein, the determining whether there is a dynamic object in the current frame captured by the camera includes:

[0014] Obtaining the cumulative number of frames in which the number of moving seed blocks in the image frames before the current frame exceeds a preset seed block threshold;

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

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

[0017] It is determined whether the accumulated number of frames reaches a preset number of frames.

[0018] Wherein, the device control method further includes:

[0019] Acquire a first historical frame and a second historical frame of the current frame, wherein the first historical frame is a previous frame of the current frame, and the second historical frame is a previous frame of the first historical frame;

[0020] Acquire a first image block divided by the current frame, a second image block divided by the first historical frame, and a third image block divided by the second historical frame;

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

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

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

[0024] Wherein, obtaining the moving object speed of the dynamic object in the current frame includes:

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

[0026] Marking a neighborhood block whose pixel value similarity with the moving seed block is greater than a preset similarity threshold as a moving block;

[0027] Combining the mobile seed block and the mobile block into a mobile block area;

[0028] Taking the largest moving block region as the moving object region of the current frame;

[0029] Based on the moving object area of ​​the current frame and the moving object area of ​​the previous frame, the moving object speed of the dynamic object is obtained.

[0030] Wherein, 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 number is reduced.

[0032] Wherein, the determining whether there is a dynamic object in the current frame captured by the camera includes:

[0033] In response to the preset time after the camera starts the intelligent frame reduction function, it is determined whether there is a dynamic object in the current frame captured by the camera.

[0034] Wherein, the device control method further includes:

[0035] In response to the camera enabling the intelligent frame reduction function, obtaining the current gain of the camera;

[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 shutter time is reduced from the reduced frame rate to the preset shutter time.

[0038] In order to solve the above technical problems, the present application also proposes a device control device, 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] In order to solve the above technical problems, the present application also proposes a computer storage medium, which is used to store program data. When the program data is executed by a computer, it is used to implement the above device control method.

[0040] Compared with the prior art, the beneficial effects of the present application are as follows: the device control device responds to the camera turning on the intelligent frame reduction function, reduces the camera from the preset frame rate to the frame reduction frame rate, and increases the camera from the preset shutter time to the frame reduction shutter time; determines whether there is a dynamic object in the current frame captured by the camera; if so, increases the camera from the frame reduction frame rate to the preset frame rate, and reduces the camera from the frame reduction shutter time to the preset shutter time. Through the above-mentioned device control method, the problem of too dark in remote monitoring is solved by increasing the shutter time, and motion detection is performed in real time after frame reduction. If there is a key moving object in the monitoring picture, the shutter 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 freezing in the image and affect the acquisition effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described 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.

[0042] in:

[0043] Figure 1 It is a flowchart of an embodiment of a device control method based on a camera provided by the present application;

[0044] Figure 2 It is a flow chart of the frame rate linkage method of camera dynamic perception provided by this application;

[0045] Figure 3 It is a flowchart of an embodiment of a dynamic object detection method provided by the present application;

[0046] Figure 4 It is a module flow chart of the dynamic object detection method provided by this application;

[0047] Figure 5 It is a flowchart of an embodiment of a mobile seed block calculation method provided by the present application;

[0048] Figure 6 It is a schematic diagram of the overall process of the mobile seed block calculation method provided by this application;

[0049] Figure 7 It is a flowchart of an embodiment of a method for acquiring a moving object region provided by the present application;

[0050] Figure 8 It is a flowchart of an embodiment of a method for exiting the frame rate linkage function provided by the present application;

[0051] Fig. 9 It is a structural schematic diagram of an embodiment of a device control device provided by the present application;

[0052] Fig.10 It is a structural diagram of an embodiment of a computer storage medium provided by the present application. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only 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 creative work are within the scope of protection of this application.

[0054] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0055] Most current camera solutions for high-gain scene monitoring points only use light control, which roughly controls all fill lights globally to increase brightness, or uses other hardware solutions to identify the distance of objects to control the lights, which not only increases costs but also has unsatisfactory monitoring effects.

[0056] Among them, high gain is suitable for dark or low-light environments. High gain can improve image brightness and contrast, thereby better capturing dark details of objects. However, high gain may also cause certain noise or graininess in the image.

[0057] The dynamic perception frame rate linkage method proposed in this application can achieve better transparency and monitoring effect than the original effect in high-gain scenes, regardless of the type of sensor, as long as it supports frame reduction (such as shutter doubling), and can achieve better monitoring effect at a lower equipment cost. When the motion detection algorithm detects that a person enters the vicinity of the monitoring screen, the shutter and frame rate will be restored to avoid freezing of the screen and affecting the monitoring effect.

[0058] Specifically, the present application discloses a frame rate linkage method and system for dynamic camera perception. The essence of the present application is to solve the problem of too dark scenes by doubling the shutter in high-gain scenes. This not only requires solving the problem of environmental transparency, but also requires that the image effect after people enter the monitoring screen be not affected after the shutter is doubled. Therefore, after the intelligent frame reduction is turned on, motion detection will be performed in real time. If there are people or key moving objects (larger continuously moving objects) in the monitoring screen, the shutter will be gradually adjusted according to the speed of the moving object and the frame reduction logic will be exited to prevent the moving object from being stuck in the image and affecting the monitoring effect.

[0059] Please refer to Figure 1 and Figure 2 , Figure 1 is a flow chart of an embodiment of a camera-based device control method provided by the present application. Figure 2 It is a flow chart of the frame rate linkage method of camera dynamic perception provided in this application.

[0060] The camera-based device control method of the present application is applied to a device control device, wherein the device control device of the present application can be a server, a terminal device, or a system in which a server and a terminal device cooperate with each other. Accordingly, the various parts included in the device control device, such as various units, subunits, modules, and submodules, can all be set in the server, can all be set in the terminal device, or can be set in the server and the terminal device respectively.

[0061] Furthermore, the above-mentioned server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules, such as software or software modules used to provide distributed servers, or it can be implemented as a single software or software module, which is not specifically limited here.

[0062] Specifically, the device control apparatus of the present application may be a processing unit or processor in a camera, or may be a processing platform mounted on the camera or for remotely controlling the camera.

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

[0064] Step S11: in response to the camera starting the intelligent frame reduction function, reducing the camera frame rate from a preset frame rate to a reduced frame rate, and increasing the camera shutter time from a preset shutter time to a reduced frame shutter time.

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

[0066] During the algorithm operation phase, the dynamic object perception algorithm module will detect whether there are moving objects in the picture. If not, it will perform frame reduction processing and gradually double the shutter to increase the picture brightness. If there are moving objects, it will exit the frame reduction logic to restore the shutter to maintain the normal image effect, avoiding the phenomenon of freezing after people enter the picture and affecting the monitoring effect. The specific algorithm logic process is divided into five stages: picture stabilization stage (AE_MOVEFPSADJ_STABLE), picture frame rate recovery stage (ALG_MOVEFPSADJ_FPSUP), picture frame reduction stage (ALG_MOVEFPSADJ_FPSDOWN), picture stabilization stage after frame reduction (ALG_MOVEFPSADJ_FPSSTABLE) and frame rate linkage function exit stage (ALG_MOVEFPSADJ_FPSADJEXIT).

[0067] like Figure 2 Case 1 in the video is the stable stage (AE_MOVEFPSADJ_STABLE), in which the program runs normally. At this time, the camera has turned on the intelligent frame reduction function, which reduces the frame rate of the camera and increases the shutter time of the camera.

[0068] Step S12: Determine whether there is a dynamic object in the current frame captured by the camera.

[0069] In the embodiments of the present application, Figure 2 In Case 1, the device control device detects and judges dynamic objects through a dynamic object perception algorithm. If a possible key moving object is detected, it will enter Case 2: the picture frame rate recovery stage, that is, continue to execute step S13.

[0070] Specifically, the device control device detects whether there is a dynamic object in the current frame captured by the camera, and the detection method includes but is not limited to the following dynamic target detection algorithms: background difference method, frame difference method, optical flow method, etc.

[0071] This application is inspired by the frame difference method in the prior art, and provides a dynamic object detection method that mainly implements moving object detection based on the idea of ​​three-frame difference method combined with flood filling method. Figure 3 and Figure 4 , Figure 3 is a flow chart of an embodiment of a dynamic object detection method provided by the present application, Figure 4It is a module flow chart 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: obtaining the cumulative number of frames in which the number of moving seed blocks in the image frames before the current frame exceeds a preset seed block threshold.

[0074] In the embodiments of the present application, Figure 4 In the moving area detection module shown, the device control device counts the number of moving block seeds moveBlockArea of ​​the image frame before the current frame and determines whether the number of each frame exceeds a preset threshold. If it exceeds the threshold, frame accumulation is performed and the frame accumulation number is recorded.

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

[0076] In the embodiment of the present application, the device control device obtains the number of moving block seeds moveBlockArea of ​​the current frame, and determines whether the number of the current frame exceeds a preset threshold. If so, it enters step S23.

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

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

[0079] Step S24: Determine whether the accumulated number of frames reaches a preset number of frames.

[0080] In the embodiment of the present application, the device control device determines whether the current frame accumulation number up to the current frame exceeds the preset frame number N. If so, it is considered that there is a moving object that needs attention in the captured picture.

[0081] Furthermore, the moving seed block in step S22 is an image block with object movement information obtained by comparing image blocks of adjacent frame images by frame difference method. Figure 5 and Figure 6 Continue to introduce the method of obtaining the mobile seed block, where: Figure 5 is a flow chart of an embodiment of a mobile seed block calculation method provided by the present application, Figure 6 It is a schematic diagram of the overall flow of the mobile seed block calculation method provided in this application.

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

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

[0084] In the embodiment of the present application, the device control device obtains a video image sequence, which includes at least three frames of images, namely, the current frame, the first historical frame (i.e. Figure 6 The previous frame in ) and the second historical frame (i.e. Figure 6 ).

[0085] Step S32: obtaining a first image block divided by the current frame, a second image block divided by the first historical frame, and a third image block divided by the second historical frame.

[0086] In the embodiments of the present application, Figure 4 In the mobile block marking module shown, the device control device divides the image frames in the video image sequence into a certain number of blocks according to the same division method.

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

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

[0089] In the embodiment of the present application, the device control apparatus uses a frame difference method to count the moving block seeds.

[0090] Specifically, in order to prevent dust, small flying insects and other reflective small objects from interfering with the motion detection algorithm, the pixel difference between the current frame and the previous frame is first calculated to 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, that is, a 0, 1 array; then the current frame and the previous frame image are subjected to the same operation to obtain the moving block data, that is, the second pixel difference, that is, a 0, 1 array; finally, the two moving block data are subtracted, and the one assigned a value of 1 after the subtraction operation is used as the moving seed block to eliminate single moving dust or small flying insects, etc.

[0092] Step S35: Mark the area obtained by subtracting the first moving block from the second moving block as the moving seed block.

[0093] In the embodiment of the present application, the device control device marks the first image block marked as both the first moving block and the second moving block as a moving seed block, which indicates 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 device can also accurately move the size position of the seed block through a subtraction operation, that is, use the area obtained by subtracting the first moving block from the second moving block as the image area of ​​the moving seed block, and assign the pixel value of the moving seed block through the first image block to obtain the moving seed block.

[0095] Please continue reading Figure 6 The device control device can also continue to perform corrosion operations on the acquired motion block data to further eliminate the interference of moving dust or small flying insects on the motion detection algorithm. In order to avoid eliminating the human movement process, the motion block data is expanded at this time; and corrosion and expansion operations are performed again, so that small reflective objects such as dust or small flying insects can be mostly eliminated.

[0096] Step S13: increasing the frame rate of the camera from the reduced frame rate to the preset frame rate, and reducing the shutter time of the camera from the reduced frame rate to the preset shutter time.

[0097] In the embodiments of the present application, Figure 2 Case 2: Picture frame rate recovery stage (ALG_MOVEFPSADJ_FPSUP), the device control device will exit the frame reduction logic after detecting a key moving object in the captured image through the dynamic object perception algorithm, and the shutter will gradually return to its original level.

[0098] The specific adjustment details are as follows: the device control device determines whether the number of moving block seeds per frame moveBlockArea exceeds the preset threshold moveAreaStand, and if it exceeds the threshold, the frame accumulation is performed. When the accumulated frame number exceeds the preset frame number N, it is determined that there is a moving object, and the moving object area detection is performed to obtain the moving object speed. The device control device calculates the shutter adjustment step step according to the moving object speed. The specific step calculation formula is shown as follows:

[0099]

[0100] Among them, V cur V is the speed of the moving object in the current frame. min V is the minimum speed of the moving object in the picture. max is the maximum speed of the moving object on the screen, and iniStep is the preset initial adjustment step (usually set to 200).

[0101] Furthermore, the following is combined Figure 7 The following is a method for obtaining the moving object area: Figure 7 It is a flow chart of an embodiment of a method for acquiring a moving object region provided in the present 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 neighborhood blocks whose pixel value similarity with the moving seed block is greater than a preset similarity threshold as moving blocks.

[0105] Considering the existing motion detection methods such as frame difference method or background difference method, when detecting moving objects, since the objects have a large area of ​​similar grayscale values, there will often be a problem of holes in the middle part of the detected moving objects, resulting in inaccurate moving object detection area.

[0106] Therefore, in an embodiment of the present application, the device control device traverses the neighborhood block according to the moving block seed with the help of the flood filling idea, and determines whether the similarity between the pixel values ​​of the neighborhood block and the moving seed block exceeds a preset threshold. If so, the neighborhood block is considered to be similar to the moving seed block and is marked as a moving block.

[0107] Step S43: Combine the mobile seed block and the mobile block into a mobile block area.

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

[0109] In the embodiment of the present application, the device control device then traverses the adjacent blocks of each moving block in this step, and selects the largest moving block area in the image as the final moving object area, thereby obtaining the accurate area where the object moves.

[0110] Among them, the key moving objects (moving targets) detected by this application are not limited and can be people, pets, animals, or any moving objects.

[0111] Step S45: Based on the moving object area of ​​the current frame and the moving object area of ​​the previous frame, the moving object speed of the dynamic object is obtained.

[0112] In the embodiments of the present application, Figure 4 In the moving speed acquisition module shown, after obtaining the final moving object area, the device control device calculates the center coordinates of the area using the first-order moment algorithm. The specific calculation formula is as follows:

[0113]

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

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

[0116]

[0117] Among them, v is the approximate speed of the object, x c is the x coordinate of the center of the moving object in the current frame, x l The x coordinate and y coordinate of the center of the moving object in the previous frame c is the y coordinate of the center of the moving object in the current frame, y l The y coordinate of the center of the moving object in the previous frame.

[0118] Furthermore, if Figure 4 In the frame rate linkage module shown, the shutter is mainly used to adjust the picture brightness 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 darker scene (higher gain). At this time, the number of frames will be accumulated. If the continuous number of frames exceeds the preset number of frames TH, the dynamic perception frame rate linkage algorithm will be started.

[0119] Please continue reading Figure 2 Case 3 shown: Screen frame reduction stage (ALG_MOVEFPSADJ_FPSDOWN). When the number of moving block seeds in the current frame moveLightArea does not exceed the preset threshold moveAreaStand in the dynamic detection stage, the device control device will accumulate frames and set the dynamic detection waiting threshold N to half of the original, or reduce the dynamic detection waiting threshold, so that when a moving object enters the monitoring screen during this stage, it can respond quickly and restore the frame rate. If the accumulated frame number exceeds the preset threshold TH1, it will enter the frame reduction stage, at which time the shutter will be gradually doubled to increase the brightness of the picture.

[0120] The shutter adjustment details are as follows:

[0121] 1. When there are no key moving objects in the picture, it will be judged in real time whether there are moving objects that may need attention in the current monitoring picture, that is, whether the number of moving block seeds in the current frame moveLightArea exceeds the preset threshold moveAreaStand. If not, the frame accumulation count will be performed. When the accumulated frame number exceeds the threshold TH1, it means that there are no moving objects in the monitoring picture for a period of time; at this time, it will enter the frame reduction stage and increase the picture brightness by doubling the shutter (in order to achieve an imperceptible state of the shutter doubling process, the gain will also be adjusted when the shutter is adjusted); when the frame reduction is completed, the picture will enter the stable stage after frame reduction.

[0122] 2. During the frame reduction process, if there are moving objects that may need attention in the current monitoring screen, that is, the number of moving block seeds moveLightArea in the current frame 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), the frame rate recovery stage is continued, and the shutter is adjusted according to the Case 2 strategy steps.

[0123] Please continue reading Figure 2 Case 4 shown: the stabilization stage after the frame reduction (ALG_MOVEFPSADJ_FPSSTABLE). After entering this stage, the frame rate adjustment will stabilize for a period of TH2 frames, and no dynamic object detection will be performed during this time to avoid brightness oscillation after the frame rate adjustment to falsely trigger the motion detection algorithm. After the frame reduction stabilization stage is over, the image will enter the stabilization stage, and then wait for the next key moving object detection.

[0124] Please combine Figure 8 Continue reading Figure 2 Case 5 shown: frame rate linkage function exit stage (ALG_MOVEFPSADJ_FPSADJEXIT), where: Figure 8 It is a flow chart of an embodiment of a method for exiting the frame rate linkage function provided in the present application.

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

[0126] Step S51: In response to the camera starting the intelligent frame reduction function, the current gain of the camera is obtained.

[0127] Step S52: determining 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.

[0128] Step S53: increasing the frame rate of the camera from the reduced frame rate to the preset frame rate, and reducing the shutter time of the camera from the reduced frame rate to the preset shutter time.

[0129] In the embodiment of the present application, after the dynamic perception frame rate linkage algorithm is started, the current gain will be obtained in real time and compared with the function exit gain. If the current gain is lower than the exit gain, it is considered that the device is in a brighter scene (lower gain). At this time, the number of frames will be accumulated. If the continuous number of frames exceeds TH3, the state perception frame rate linkage algorithm will be turned off and wait for the next judgment to be turned on.

[0130] In the present application, in response to the camera starting the intelligent frame reduction function, the device control device reduces the camera from a preset frame rate to a reduced frame rate, and increases the camera from a preset shutter time to a reduced frame shutter time; determines whether there is a dynamic object in the current frame captured by the camera; if so, increases the camera from the reduced frame rate to the preset frame rate, and reduces the camera from the reduced frame shutter time to the preset shutter time. Through the above device control method, the problem of too dark in remote monitoring is solved by increasing the shutter time, and motion detection is performed in real time after the frame reduction. If there is a key moving object in the monitoring picture, the shutter 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 freezing in the image and affect the acquisition effect.

[0131] The device control method of the present application utilizes the three-frame difference method and performs adjacent result subtraction operations, and combines the flood filling idea to detect the moving object area, which can achieve a more accurate detection effect.

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

[0133] The device control method of the present application solves the problem of too dark in distant monitoring by doubling the shutter, and performs motion detection in real time after frame reduction. If there is a key moving object in the monitoring picture (larger continuously moving objects such as people or animals), the shutter 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 stuck in the image and affecting the monitoring effect.

[0134] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0135] In order to implement the above device control method, this application also proposes a device control device, please refer to Fig. 9 , Fig. 9 It is a structural schematic diagram of an embodiment of a device control device provided in this application.

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

[0137] The processor 41 , the memory 42 , and the 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 embodiment.

[0138] In the embodiment of the present application, the processor 41 may also be referred to as a CPU (Central Processing Unit). The processor 41 may be an integrated circuit chip having the ability to process signals. The processor 41 may 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 gates or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or the processor 41 may also be any conventional processor, etc.

[0139] This application also provides a computer storage medium, please continue to refer to Fig.10 , Fig.10 It is a structural diagram of an embodiment of a computer storage medium provided in the present application. The computer storage medium 600 stores a computer program 61. When the computer program 61 is executed by a processor, it is used to implement the device control method of the above embodiment.

[0140] When the embodiments of the present application are implemented in the form of 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 the present application is essentially 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, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

[0141] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A device control method based on a camera, characterized in that: The device control method comprises: In response to the camera starting the intelligent frame reduction function, reducing the camera from a preset frame rate to a reduced frame rate, and increasing the camera from a preset shutter time to a reduced frame shutter time; Determine whether there is a dynamic object in the current frame captured by the camera; If so, the camera is increased from the reduced frame rate to the preset frame rate, and the camera shutter time is reduced from the reduced frame rate to the preset shutter time.

2. The device control method according to claim 1, characterized in that: The step of reducing the camera's shutter time from the frame-dropping shutter time to the preset shutter time comprises: Obtaining the moving object speed of the dynamic object in the current frame; Based on the speed of the moving object, obtaining a shutter adjustment step length; The frame-dropping shutter time is reduced to the preset shutter time according to the shutter adjustment step.

3. The device control method according to claim 2, characterized in that: The determining whether there is a dynamic object in the current frame captured by the camera comprises: Obtaining the cumulative number of frames in which the number of moving seed blocks in the image frames before the current frame exceeds a preset seed block threshold; Determining whether the number of mobile seed blocks in the current frame exceeds the preset seed block threshold; If so, updating the frame accumulation number based on the current frame; It is determined whether the accumulated number of frames reaches a preset number of frames.

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

5. The device control method according to claim 4, characterized in that: The obtaining the moving object speed of the dynamic object in the current frame includes: Based on each moving seed block, traverse the neighboring blocks of the moving seed block; Marking a neighborhood block whose pixel value similarity with the moving seed block is greater than a preset similarity threshold as a moving block; Combining the mobile seed block and the mobile block into a mobile block area; Taking the largest moving block region as the moving object region of the current frame; Based on the moving object area of ​​the current frame and the moving object area of ​​the previous frame, the moving object speed of the dynamic object is obtained.

6. The device control method according to claim 3, 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 number is reduced.

7. The device control method according to claim 1, characterized in that: The determining whether there is a dynamic object in the current frame captured by the camera comprises: In response to the preset time after the camera starts the intelligent frame reduction function, it is determined whether there is a dynamic object in the current frame captured by the camera.

8. The device control method according to claim 1, characterized in that: The device control method further includes: In response to the camera enabling the intelligent frame reduction function, obtaining the current gain of the camera; 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, the camera is increased from the reduced frame rate to the preset frame rate, and the camera shutter time is reduced from the reduced frame rate to the preset shutter time.

9. A device control device, characterized in that: The device control apparatus 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 according to any one of claims 1 to 8.

10. A computer storage medium, characterized in that: The computer storage medium is used to store program data, and when the program data is executed by a computer, it is used to implement the device control method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Imaging device, imaging method, and imaging program

    CN115336251A

  • Sports character color feature capturing method under low illumination and computer storage medium

    CN116801109A

  • Camera signal processor and exposure range expanding method thereof

    JP2003259199A

  • Mobile terminal and method for controlling the same

    KR1020160019145A

  • Method and adaptively deriving exposure time and frame rate from image motion

    US20020149693A1