Security camera control method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202510386790.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2026-09-29
AI Technical Summary
上述方案虽然仍然可以使低功耗摄像机能够实现全天候录像,但由于录像时间较长,导致摄像头的功耗过高,无法适用于电池板摄像头
[0071]第五方面,本申请实施例提供一种计算机程序产品,所述计算机程序产品包括计算机可读代码,当所述计算机可读代码在设备上运行时,使得该设备中的处理器实现如上述第一方面的安防摄像头的控制方法中任一实施例的方法。
Smart Images

Figure CN122845927A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of security, and in particular to a control method, device, electronic device and storage medium for a security camera. Background Technology
[0002] Some cameras can be woken up periodically to capture images. Traditional solutions require capturing images, encoding and saving them, and then switching to sleep mode. While this allows low-power cameras to record around the clock, the long recording time results in excessive power consumption, making it unsuitable for solar-powered cameras.
[0003] Clearly, reducing the power consumption of cameras is a technical issue that deserves attention. Summary of the Invention
[0004] In view of this, in order to solve some or all of the above-mentioned technical problems, embodiments of this application provide a control method, device, electronic device and storage medium for a security camera.
[0005] In a first aspect, embodiments of this application provide a control method for a security camera, the method comprising:
[0006] Acquire the target image within the monitoring range of the security camera;
[0007] The target image is enhanced using a first image enhancement algorithm to obtain an enhanced image.
[0008] By performing motion detection on the enhanced image, the moving regions in the enhanced image are determined;
[0009] A second image enhancement algorithm is used to enhance the image of the moving region to obtain a processed image;
[0010] Determine the security target information of the processed image;
[0011] Based on the security object information, control whether the security camera starts recording.
[0012] In one possible implementation, before performing image enhancement processing on the target image using the first image enhancement algorithm, the method further includes:
[0013] Obtain environmental information of the monitoring range, wherein the environmental information includes the light intensity of the monitoring range;
[0014] Determine whether the light intensity is less than or equal to a preset intensity threshold; and
[0015] The first image enhancement algorithm is used to perform image enhancement processing on the target image, including:
[0016] When the illumination intensity is less than or equal to the preset intensity threshold, the first image enhancement algorithm is used to perform image enhancement processing on the target image.
[0017] In one possible implementation,
[0018] The security camera is battery powered; and / or
[0019] The first image enhancement algorithm includes a color equalization algorithm, and the second image enhancement algorithm includes a contrast enhancement algorithm.
[0020] In one possible implementation, the security object information includes: whether the security object is in motion; and
[0021] The determination of the security object information of the processed image includes:
[0022] By performing target detection on the processed image, it can be determined whether the processed image contains a security object;
[0023] If the processed image contains the security object, determine whether the security object is in motion; and
[0024] The step of controlling whether the security camera starts recording based on the security object information includes:
[0025] When the object being monitored is in motion, control the security camera to start recording.
[0026] When the object being monitored is not in motion, the security camera is controlled not to start recording.
[0027] In one possible implementation, the method further includes, when controlling the security camera to not start recording:
[0028] The processed image is then compressed to obtain a compressed image;
[0029] Store the compressed image.
[0030] In one possible implementation, when controlling the security camera to start recording, the method further includes:
[0031] The compressed image is subjected to at least one of the following processes: decompression, transcoding, and encoding.
[0032] In one possible implementation,
[0033] When the security camera is controlled not to start recording, the method is executed through the first operating system, while the second operating system is in a non-started state;
[0034] When the security camera is controlled to start recording, or when the security camera is in recording mode, the method is executed through the second operating system;
[0035] Wherein, the startup speed of the first operating system is faster than that of the second operating system, and / or the power consumption of the first operating system is lower than that of the second operating system.
[0036] Secondly, embodiments of this application provide a control device for a security camera, the device comprising:
[0037] The first acquisition unit is used to acquire target images within the monitoring range of the security camera;
[0038] The first processing unit is used to perform image enhancement processing on the target image using a first image enhancement algorithm to obtain an enhanced image;
[0039] The first determining unit is configured to determine the motion region in the enhanced image by performing motion detection on the enhanced image;
[0040] The second processing unit is used to perform image enhancement processing on the moving region using a second image enhancement algorithm to obtain a processed image;
[0041] The second determining unit is used to determine the security object information of the processed image;
[0042] The control unit is used to control whether the security camera starts recording based on the security object information.
[0043] In one possible implementation, before performing image enhancement processing on the target image using the first image enhancement algorithm, the method further includes:
[0044] Obtain environmental information of the monitoring range, wherein the environmental information includes the light intensity of the monitoring range;
[0045] Determine whether the light intensity is less than or equal to a preset intensity threshold; and
[0046] The first image enhancement algorithm is used to perform image enhancement processing on the target image, including:
[0047] When the illumination intensity is less than or equal to the preset intensity threshold, the first image enhancement algorithm is used to perform image enhancement processing on the target image.
[0048] In one possible implementation,
[0049] The security camera is battery powered; and / or
[0050] The first image enhancement algorithm includes a color equalization algorithm, and the second image enhancement algorithm includes a contrast enhancement algorithm.
[0051] In one possible implementation, the security object information includes: whether the security object is in motion; and
[0052] The determination of the security object information of the processed image includes:
[0053] By performing target detection on the processed image, it can be determined whether the processed image contains a security object;
[0054] If the processed image contains the security object, determine whether the security object is in motion; and
[0055] The step of controlling whether the security camera starts recording based on the security object information includes:
[0056] When the object being monitored is in motion, control the security camera to start recording.
[0057] When the object being monitored is not in motion, the security camera is controlled not to start recording.
[0058] In one possible implementation, the device further includes, when controlling the security camera to not start recording:
[0059] A compression unit is used to compress the processed image to obtain a compressed image;
[0060] A storage unit for storing the compressed image.
[0061] In one possible implementation, when controlling the security camera to start recording, the device further includes:
[0062] The third processing unit is used to perform at least one of the following processes on the compressed image: decompression, transcoding, and encoding.
[0063] In one possible implementation,
[0064] When the security camera is not controlled to start recording, the device is executed through the first operating system, while the second operating system is in an inactive state;
[0065] When the security camera is controlled to start recording, or when the security camera is in recording mode, the device executes through the second operating system;
[0066] Wherein, the startup speed of the first operating system is faster than that of the second operating system, and / or the power consumption of the first operating system is lower than that of the second operating system.
[0067] Thirdly, embodiments of this application provide an electronic device, including:
[0068] Memory, used to store computer programs;
[0069] A processor is configured to execute a computer program stored in the memory, and when the computer program is executed, to implement the method of any embodiment of the security camera control method of the first aspect of this application.
[0070] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the method of any embodiment of the security camera control method of the first aspect described above.
[0071] Fifthly, embodiments of this application provide a computer program product comprising computer-readable code that, when executed on a device, causes a processor in the device to implement the method of any embodiment of the security camera control method of the first aspect described above.
[0072] The security camera control method provided in this application can acquire a target image within the monitoring range of the security camera, then perform image enhancement processing on the target image using a first image enhancement algorithm to obtain an enhanced image. Subsequently, motion detection is performed on the enhanced image to determine the moving regions within it. Next, a second image enhancement algorithm is used to perform image enhancement processing on the moving regions to obtain a processed image. Then, the security object information in the processed image is determined. Finally, based on the security object information, the method controls whether the security camera should start recording. Therefore, by first performing global image enhancement processing on the target image, and then performing local image enhancement processing on the moving regions in the resulting image, the security object information can be determined more accurately, thereby allowing for a more accurate determination of the camera's recording timing and reducing the camera's power consumption. Attached Figure Description
[0073] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0074] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0075] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0076] Figure 1 A flowchart illustrating a control method for a security camera provided in an embodiment of this application;
[0077] Figure 2 A flowchart illustrating another method for controlling a security camera provided in an embodiment of this application;
[0078] Figure 3A A flowchart illustrating another method for controlling a security camera provided in this application embodiment;
[0079] Figures 3B-3D This is a schematic diagram of image enhancement processing in a control method for a security camera provided in an embodiment of this application;
[0080] Figure 4 This is a schematic diagram of the structure of a control device for a security camera provided in an embodiment of this application;
[0081] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0082] Various exemplary embodiments of this application will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of this application.
[0083] Those skilled in the art will understand that the terms "first" and "second" in the embodiments of this application are only used to distinguish different steps, devices or modules, and do not represent any specific technical meaning, nor do they indicate the logical order between them.
[0084] It should also be understood that in this embodiment, "multiple" can refer to two or more, and "at least one" can refer to one, two or more.
[0085] It should also be understood that any component, data or structure mentioned in the embodiments of this application can generally be understood as one or more unless explicitly defined or given contrary guidance in the context.
[0086] Furthermore, the term "and / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this application generally indicates that the preceding and following related objects have an "or" relationship.
[0087] It should also be understood that the description of the various embodiments in this application emphasizes the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, they will not be described in detail.
[0088] The following description of at least one exemplary embodiment is merely illustrative and is not intended to limit the scope of this application or its application or use.
[0089] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0090] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0091] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. To facilitate understanding of the embodiments of this application, the application will be described in detail below with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0092] To address the technical problem of reducing the power consumption of cameras in the prior art, this application provides a control method, device, electronic device, and storage medium for security cameras, which can reduce the power consumption of cameras.
[0093] Figure 1This is a flowchart illustrating a control method for a security camera provided in an embodiment of this application. This method can be applied to one or more electronic devices such as cameras (e.g., solar panel cameras), smartphones, laptops, desktop computers, portable computers, and servers. Furthermore, the execution entity of this method can be hardware or software. When the execution entity is hardware, it can be one or more of the aforementioned electronic devices. For example, a single electronic device can execute this method, or multiple electronic devices can cooperate with each other to execute this method. When the execution entity is software, this method can be implemented as multiple software programs or software modules, or as a single software program or software module. No specific limitations are made here.
[0094] like Figure 1 As shown, the method specifically includes:
[0095] Step 101: Obtain the target image within the monitoring range of the security camera.
[0096] In this embodiment, the security camera can be a camera used for surveillance. As an example, the security camera can be a power-powered camera or a solar panel camera, such as a solar panel AOV (Always On Video) camera, a solar panel camera, etc.
[0097] AOV is typically used to describe the real-time recording function of a camera. When the sensor enters AOV mode, the image sensor will output images at a specified frame rate, enabling image playback at 1 frame per second.
[0098] The monitoring range can be the area within which the aforementioned security cameras can effectively monitor and capture image or video information.
[0099] The target image can be an image obtained by capturing images of the monitored area. The target image can be captured by the aforementioned security cameras, or by other devices with image acquisition capabilities besides the aforementioned security cameras.
[0100] Step 102: The target image is enhanced using the first image enhancement algorithm to obtain an enhanced image.
[0101] In this embodiment, the first image enhancement algorithm can be any image enhancement algorithm. As an example, the first image enhancement algorithm may include at least one of the following: a spatial domain algorithm and a frequency domain algorithm. For instance, the first image enhancement algorithm can be used to perform color equalization on a target image. Specifically, the width w, height h, and the number of pixels with the same grayscale value sum of the target image can be used. The probability p(r) of each pixel with the same grayscale value is calculated as sum / (w×h). Then, using the probability p(r) of each pixel with the same grayscale value and the current pixel value px, the new value of the current pixel is calculated, thereby achieving the effect of overall image enhancement. Furthermore, the first image enhancement algorithm can also be an ACE (Adaptive Contrast Enhancement) algorithm, which can not only adjust the color and spatial domain of the target image to complete color difference correction and obtain a spatially reconstructed image, but also dynamically expand the corrected image.
[0102] In some cases, the first image enhancement algorithm can be used to enhance the target image as a whole.
[0103] An enhanced image can be an image obtained directly or indirectly after image enhancement processing is performed on a target image.
[0104] Step 103: Determine the motion region in the enhanced image by performing motion detection on the enhanced image.
[0105] In this embodiment, motion detection can be used to detect whether there is a moving object in the enhanced image. If there is a moving object in the enhanced image, the motion region in the enhanced image can be further determined.
[0106] The aforementioned motion region can represent the area in the enhanced image where an object is in motion.
[0107] Step 104: The second image enhancement algorithm is used to perform image enhancement processing on the moving region to obtain the processed image.
[0108] In this embodiment, the second image enhancement algorithm can be any image enhancement algorithm. As an example, the second image enhancement algorithm may include at least one of the following: a spatial domain algorithm and a frequency domain algorithm. The second image enhancement algorithm may be the same as or different from the first image enhancement algorithm.
[0109] For example, the second image enhancement algorithm can be used to enhance the contrast of moving areas. Specifically, the grayscale value new_pixel after stretching can be calculated using the current pixel's grayscale value (pixel), the maximum grayscale value (max_pixel) and the minimum grayscale value (min_pixel) of all pixels in the image to be stretched, the maximum grayscale value (new_max) and the minimum grayscale value (new_min) of all pixels in the moving area before stretching. For example, the formula is as follows: new_pixel = ((pixel - min_pixel) / (max_pixel - min_pixel)) × (new_max - new_min) + new_min.
[0110] In some cases, a second image enhancement algorithm can be used to enhance local areas of the enhanced image (i.e., the aforementioned motion regions).
[0111] The image after the above processing can be the result obtained directly or indirectly by performing image enhancement processing on the moving region using the second image enhancement algorithm.
[0112] Step 106: Determine the security object information of the processed image.
[0113] In this embodiment, the security object information may include at least one of the following: whether the processed image includes a security object, whether the security object in the processed image is in motion, and the object type of the security object in the processed image.
[0114] Security targets can be objects that pose a danger or whose safety needs to be ensured. For example, security targets can be family members, vehicles, strangers, pets, etc.
[0115] Step 107: Based on the security object information, control whether the security camera starts recording.
[0116] In this embodiment, after obtaining the security target information, it is possible to control whether the security camera starts recording.
[0117] As an example, if the image after security object information representation processing includes a security object, the security camera can be controlled to start recording; if the image after security object information representation processing does not include a security object, the security camera can be controlled not to start recording.
[0118] As another example, when the security object in the image after security object information representation processing is in motion, the security camera can be controlled to start recording; when the security object in the image after security object information representation processing is not in motion, the security camera can be controlled not to start recording.
[0119] As another example, if the object type of the security object in the image after security object information representation processing is "object with danger", the security camera can be controlled to start recording; if the object type of the security object in the image after security object information representation processing is "object without danger", the security camera can be controlled not to start recording.
[0120] In some optional implementations of this embodiment, before performing image enhancement processing on the target image using the first image enhancement algorithm, the following steps may also be performed:
[0121] The first step is to obtain environmental information within the monitoring range.
[0122] The environmental information includes the light intensity within the monitoring range.
[0123] The second step is to determine whether the light intensity is less than or equal to a preset intensity threshold.
[0124] Based on this, when the illumination intensity is less than or equal to the preset intensity threshold, a first image enhancement algorithm can be used to perform image enhancement processing on the target image.
[0125] It is understandable that among the above-mentioned optional implementation methods, image enhancement processing can be performed on the images within the monitoring range when the light intensity is low. This allows for a more accurate determination of the security target information, which in turn allows for a more accurate determination of when the camera should record, and further reduces the power consumption of the camera.
[0126] In some optional implementations of this embodiment, when the security camera is controlled not to start recording, the following steps can also be performed:
[0127] The first step is to compress the processed image to obtain a compressed image.
[0128] The compressed image can be an image obtained directly or indirectly after compressing the processed image.
[0129] In some cases, the compression process described above can be lossless compression, block-based average sampling compression algorithms, or compression algorithms based on fast Fourier transform.
[0130] The compression process described above can be a compression algorithm with minimal encoding and transcoding. For example, the compression algorithm can meet at least one of the following conditions: the encoding length is less than or equal to a preset length threshold, the encoding complexity is less than or equal to a preset complexity threshold, the encoding efficiency is greater than or equal to a preset efficiency threshold, the number of transcoding operations is less than or equal to a preset number threshold, the data change amplitude is less than or equal to a preset amplitude threshold, and the entropy value of the transcoded data is less than or equal to a preset threshold. Alternatively, it can be a compression algorithm that does not involve transcoding or encoding.
[0131] The second step is to store the compressed image.
[0132] It is understandable that among the above optional implementation methods, compressed images can be stored without the security camera starting to record, without the need for complex image processing, thus further reducing the power consumption of the camera.
[0133] In some application scenarios of the above-mentioned optional implementations, when the security camera is controlled not to start recording, the method is executed through the first operating system, and the second operating system is in a non-started state. When the security camera is controlled to start recording, or when the security camera is in recording mode, the method is executed through the second operating system.
[0134] Wherein, the startup speed of the first operating system is faster than that of the second operating system, and / or the power consumption of the first operating system is lower than that of the second operating system.
[0135] As an example, the first operating system could be RTOS (Real-Time Operating System), VxWorks, QNX Neutrino, ThreadX, etc.
[0136] The second operating system could be, for example, Linux or Android.
[0137] It is understandable that in the above application scenario, when the security camera is not recording, the relevant steps can be executed through a first operating system with lower power consumption and faster startup speed, while the second operating system, with higher power consumption and slower startup speed, remains inactive. When the security camera starts recording, or when the security camera is in recording mode, the second operating system performs more complex recording operations. This further reduces the power consumption of the security camera, improves the accuracy and timeliness of recording timing, extends the working time of the security camera, and thus improves the effectiveness of security measures.
[0138] In some optional implementations of this embodiment, the security camera is battery powered.
[0139] It is understandable that, among the above optional implementation methods, when the security camera is battery powered, the power provided by the battery to the security camera is relatively limited. Therefore, the above solutions can reduce the power consumption of the battery-powered security camera by more accurately controlling whether the security camera records, thereby improving the security effectiveness of the battery-powered security camera.
[0140] Alternatively, in some cases, the aforementioned security cameras may also be powered by AC power or other non-battery-powered methods.
[0141] In some optional implementations of this embodiment, the first image enhancement algorithm includes a color equalization algorithm, and the second image enhancement algorithm includes a contrast enhancement algorithm.
[0142] It is understandable that, among the above optional implementation methods, the target image can first be subjected to global color equalization, and then the motion area in the image obtained after color equalization can be subjected to contrast enhancement processing. In this way, the security object information can be determined more accurately, and thus the timing of camera recording can be determined more accurately.
[0143] It should be noted that, where there is no conflict, the technical features described in different alternative implementations can be included in the same embodiment. For the sake of brevity, they will not be elaborated here.
[0144] The security camera control method provided in this application can acquire a target image within the monitoring range of the security camera, then perform image enhancement processing on the target image using a first image enhancement algorithm to obtain an enhanced image; determine the moving regions in the enhanced image by motion detection; perform image enhancement processing on the moving regions using a second image enhancement algorithm to obtain a processed image; then determine the security object information in the processed image; and finally, control whether the security camera starts recording based on the security object information. Therefore, by first performing global image enhancement processing on the target image, and then performing local image enhancement processing on the moving regions in the resulting image, the security object information can be determined more accurately, thereby allowing for a more accurate determination of the camera's recording timing and reducing the camera's power consumption.
[0145] Figure 2 This is a flowchart illustrating another control method for a security camera provided in an embodiment of this application. Figure 2 As shown, the method specifically includes:
[0146] Step 201: Obtain the target image within the monitoring range of the security camera. Then, proceed to step 202.
[0147] In this embodiment, step 201 and Figure 1 Step 101 in the corresponding embodiment is basically the same, and will not be repeated here.
[0148] Step 202: The target image is enhanced using the first image enhancement algorithm to obtain an enhanced image. Then, step 203 is executed.
[0149] In this embodiment, step 202 and Figure 1 Step 102 in the corresponding embodiment is basically the same, and will not be repeated here.
[0150] Step 203: Motion detection is performed on the enhanced image to determine the moving regions in the enhanced image. Then, step 204 is executed.
[0151] In this embodiment, step 203 and Figure 1 Step 103 in the corresponding embodiment is basically the same, and will not be repeated here.
[0152] Step 204: The second image enhancement algorithm is used to enhance the image of the moving region to obtain the processed image. Then, step 205 is executed.
[0153] In this embodiment, step 204 and Figure 1 Step 104 in the corresponding embodiment is basically the same, and will not be repeated here.
[0154] Step 205: Perform target detection on the processed image to determine whether the processed image contains a security target. Then, proceed to step 206.
[0155] In this embodiment, target detection can be used to determine whether the processed image contains security objects.
[0156] Step 206: If the processed image contains the security object, determine whether the security object is in motion. If yes, proceed to step 207; otherwise, proceed to step 208.
[0157] In this embodiment, the security object information includes whether the security object is in motion.
[0158] Step 207: Control the security camera to start recording.
[0159] In this embodiment, when the security object is in motion, the security camera is controlled to start recording.
[0160] Step 208: Control the security camera to not start recording.
[0161] In this embodiment, when the object being monitored is not in motion, the security camera is controlled not to start recording.
[0162] It should be noted that, in addition to the contents described above, this embodiment may also include... Figure 1 The corresponding technical features described in the corresponding embodiments are then implemented. Figure 1 For details on the technical effects of the security camera control method shown, please refer to [link / reference]. Figure 1 The relevant descriptions are presented concisely and will not be elaborated upon here.
[0163] The security camera control method provided in this application embodiment can control the security camera to start recording only when the processed image contains a security object and the security object is in motion. If the processed image does not contain a security object, or if the processed image contains a security object that is not in motion, then it is not necessary to control the security camera to start recording. As a result, the recording timing of the camera can be determined more accurately, and the power consumption of the camera can be reduced.
[0164] The following describes the embodiments of this application by way of example. However, it should be noted that the following content is only used to understand the technical solutions of the embodiments of this application and does not constitute a limitation on the protection scope of the embodiments of this application.
[0165] In current solar panel AOV cameras, image capture can typically be initiated by periodically waking the device. Since traditional AOV cameras usually operate on a single Linux system, images need to be captured, encoded, and saved before switching to sleep mode. While this still allows low-power cameras to record 24 / 7, solving the problem of traditional low-power cameras not recording when no event is triggered and greatly improving the integrity and continuity of recording, some issues remain.
[0166] 1. In low light conditions, the image quality captured by the AOV camera is poor. Under low light, the images captured by the AOV are too dark and unclear, resulting in poor AOV image quality and a low success rate for subsequent AI (Artificial Intelligence) detection, easily leading to missed recordings.
[0167] 2. The pressure on power consumption remains relatively high. Using a single Linux system requires waiting for the system to fully load before data can be collected. After data collection, encoding is also required, and the entire process takes more than 1.5 seconds, which is not very power-efficient.
[0168] 3. Insufficient continuity and completeness of video recording. For power consumption considerations, traditional solar panel AOV cameras typically go into sleep mode immediately after capturing images without triggering. If a target appears at this time but the triggering device does not activate, that part of the recording may be missed.
[0169] See Figure 3A , Figure 3A This is a flowchart illustrating another control method for a security camera provided in an embodiment of this application. The following describes this solution:
[0170] 1. Under night vision conditions (i.e., light intensity less than or equal to a preset intensity threshold), perform image enhancement twice, such as... Figures 3B-3D The supplementary lighting effect diagram shows that the image quality under night vision is optimized, solving the problem of overly dark images captured by AOV under poor lighting conditions.
[0171] a. Rtos (also known as the first operating system mentioned above) quickly starts up and obtains image data in raw (an image file format) format.
[0172] b. The original image (i.e., the target image mentioned above) is as follows: Figure 3B As shown in the figure, motion detection is then performed on the original image in Rtos (that is, the motion detection mentioned above, a technique for detecting the motion state of objects in a scene, which will be introduced below in terms of principle, application scenarios, and implementation methods).
[0173] c. For example Figure 3C As shown. We can first perform global enhancement (automatic color equalization) on the entire image (i.e., the target image mentioned above). Using the image's width w, height h, and the number of pixels with the same grayscale value sum, we calculate the probability p(r) of each pixel with the same grayscale value appearing: p(r) = sum / (w×h).
[0174] d. Then, using the probability p(r) of each pixel and the current pixel value px, the new value of the current pixel is calculated, thus achieving the effect of overall image enhancement.
[0175] Supplement: The ACE algorithm has two main functions: first, it adjusts the color and spatial domain of the image to correct color differences and obtain a reconstructed spatial domain image; second, it dynamically expands the corrected image.
[0176] e. such as Figure 3DAs shown; after motion detection, local image enhancement is performed on the detected target area (i.e., the aforementioned motion area) by linear contrast stretching, making the image of the target area brighter and clearer. The stretched grayscale value `new_pixel` is calculated using the current target pixel's grayscale value (`pixel`), the maximum grayscale value to be stretched (`max_pixel`), the minimum grayscale value to be stretched (`min_pixel`), the maximum grayscale value `new_max` among the pixels in the image before stretching (i.e., the aforementioned motion area), and the minimum grayscale value `new_min` among the pixels in the image before stretching. The current formula is as follows: `new_pixel = ((pixel - min_pixel) / (max_pixel - min_pixel)) × (new_max - new_min) + new_min`.
[0177] 2. Using enhanced images for AI object detection in Rtos can improve the success rate of AI detection.
[0178] If the AI does not detect the target (i.e., the security object mentioned above) for five consecutive frames, it can save the AOV image (i.e., the compressed image mentioned above) and then enter sleep mode. Due to the Rtos startup speed and the format of the saved data, it can enter sleep mode within 500ms, which can reduce power consumption pressure.
[0179] In this solution, the final enhanced raw image (i.e., the processed image described above) can be compressed and saved to the shared flash memory (flash memory) of both big and small cores, and then the system can enter hibernation mode. Furthermore, booting the RTOS operating system takes 100ms, detecting 5 frames takes approximately 400ms, there's no need to create an encoder, and it can enter hibernation mode approximately 500ms after booting. This results in significantly lower power consumption compared to traditional solutions.
[0180] Traditional solutions typically use Linux systems. If you want to convert a raw image to JPG format, you need to first convert the raw image to YUV (Luminance Chrominance) and then start the encoder to encode it into a JPG image. The whole process takes more than 1.5 seconds.
[0181] Compared with the traditional solution, the overall time of this solution is more than 1 second less than that of the traditional solution, and the power consumption during startup is also lower than that of the traditional solution.
[0182] b. If a target (i.e., a security object) is detected, the Linux system (i.e., the second operating system mentioned above) is started to continuously record, which solves the problem of insufficient recording continuity and integrity when the triggering device (e.g., PIR (Passive Infrared)) is not triggered.
[0183] i. After the next trigger or AI detection of the target, launch the Linux system and process the compressed data in batches within the Linux system. Convert this data into RGB data and then encode it into JPG data.
[0184] ii. If the AI detects the target and motion is triggered at that location, the Linux system is started to continuously record.
[0185] It should be noted that, in addition to the contents described above, this embodiment may also include the technical features described in the above embodiments, thereby achieving the technical effect of the security camera control method shown above. Please refer to the above description for details. For the sake of brevity, it will not be elaborated here.
[0186] This solution can be applied to AOV solar panel cameras in the security field. It utilizes two image enhancement techniques: a first global image enhancement and a second local image enhancement. Within the RTOS system, motion detection is used to determine the target's location, and the enhanced image is then applied locally. This enhanced image allows for more accurate AI detection, improving target detection rates in night vision scenarios and reducing the probability of missed recordings. Leveraging the startup advantages of the RTOS system and reducing or eliminating transcoding and encoding time, AOV data is stored quickly. AI detection models are used within the RTOS system for detection; once detected, continuous recording begins, optimizing recording continuity and integrity. This solution can be applied to relatively remote scenarios such as fishponds and grasslands. It saves power and optimizes recording continuity and integrity. Users experience lower power consumption, longer usage time, a better user experience, and improved recording continuity and integrity. Furthermore, the use of local image enhancement improves target detection rates in night vision scenarios and reduces the probability of missed recordings.
[0187] Figure 4 This is a schematic diagram of the structure of a control device for a security camera provided in an embodiment of this application. Specifically, it includes:
[0188] The first acquisition unit 401 is used to acquire target images within the monitoring range of the security camera;
[0189] The first processing unit 402 is configured to perform image enhancement processing on the target image using a first image enhancement algorithm to obtain an enhanced image; determine the motion region in the enhanced image by performing motion detection on the enhanced image; and perform image enhancement processing on the motion region using a second image enhancement algorithm to obtain a processed image.
[0190] The second determining unit 403 is used to determine the security object information of the processed image;
[0191] The control unit 404 is used to control whether the security camera starts recording based on the security object information.
[0192] In one possible implementation, before performing image enhancement processing on the target image using the first image enhancement algorithm, the apparatus further includes:
[0193] The second acquisition unit (not shown in the figure) is used to acquire environmental information of the monitoring range, wherein the environmental information includes the light intensity of the monitoring range;
[0194] The third determining unit (not shown in the figure) is used to determine whether the light intensity is less than or equal to a preset intensity threshold; and
[0195] The first image enhancement algorithm is used to perform image enhancement processing on the target image, including:
[0196] When the illumination intensity is less than or equal to the preset intensity threshold, the first image enhancement algorithm is used to perform image enhancement processing on the target image.
[0197] In one possible implementation, the first image enhancement algorithm includes a color equalization algorithm, and the second image enhancement algorithm includes a contrast enhancement algorithm.
[0198] In one possible implementation, the security object information includes: whether the security object is in motion; and
[0199] The determination of the security object information of the processed image includes:
[0200] By performing target detection on the processed image, it can be determined whether the processed image contains a security object;
[0201] If the processed image contains the security object, determine whether the security object is in motion; and
[0202] The step of controlling whether the security camera starts recording based on the security object information includes:
[0203] When the object being monitored is in motion, control the security camera to start recording.
[0204] When the object being monitored is not in motion, the security camera is controlled not to start recording.
[0205] In one possible implementation, the device further includes, when controlling the security camera to not start recording:
[0206] A compression unit (not shown in the figure) is used to compress the processed image to obtain a compressed image;
[0207] A storage unit (not shown in the figure) is used to store the compressed image.
[0208] In one possible implementation, when controlling the security camera to start recording, the device further includes:
[0209] The third processing unit (not shown in the figure) is used to perform at least one of the following processes on the compressed image: decompression, transcoding, and encoding.
[0210] In one possible implementation,
[0211] When the security camera is not controlled to start recording, the device is executed through the first operating system, while the second operating system is in an inactive state;
[0212] When the security camera is controlled to start recording, or when the security camera is in recording mode, the device executes through the second operating system;
[0213] Wherein, the startup speed of the first operating system is faster than that of the second operating system, and / or the power consumption of the first operating system is lower than that of the second operating system.
[0214] The control device for the security camera provided in this embodiment can be as follows: Figure 4 The control device for the security camera shown can execute all the steps of the control methods for each security camera described above, thereby achieving the technical effects of the control methods for each security camera described above. For details, please refer to the relevant descriptions above. For the sake of brevity, further details are not provided here.
[0215] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5The illustrated electronic device 500 includes at least one processor 501, a memory 502, at least one network interface 504, and other user interfaces 503. The various components in the electronic device 500 are coupled together via a bus system 505. It is understood that the bus system 505 is used to implement communication between these components. In addition to a data bus, the bus system 505 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 5 The general designated all buses as Bus System 505.
[0216] The user interface 503 may include a display, keyboard, or clicking device (e.g., mouse, trackball, touchpad, or touchscreen).
[0217] It is understood that the memory 502 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 502 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0218] In some implementations, memory 502 stores elements, executable units or data structures, or subsets thereof, or extended sets thereof: operating system 5021 and application program 5022.
[0219] The operating system 5021 includes various system programs, such as the framework layer, core library layer, and driver layer, used to implement various basic business functions and handle hardware-based tasks. The application program 5022 includes various applications, such as a media player and a browser, used to implement various application functions. Programs implementing the methods of this application embodiment can be included in application program 5022.
[0220] In this embodiment, by calling the program or instructions stored in memory 502, specifically the program or instructions stored in application program 5022, processor 501 executes the method steps provided in each method embodiment, including, for example:
[0221] Acquire the target image within the monitoring range of the security camera;
[0222] The target image is enhanced using a first image enhancement algorithm to obtain an enhanced image.
[0223] By performing motion detection on the enhanced image, the moving regions in the enhanced image are determined;
[0224] A second image enhancement algorithm is used to enhance the image of the moving region to obtain a processed image;
[0225] Determine the security target information of the processed image;
[0226] Based on the security object information, control whether the security camera starts recording.
[0227] The methods disclosed in the embodiments of this application can be applied to or implemented by processor 501. Processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 501 or by instructions in the form of software. The processor 501 may 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. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software units in the decoding processor. The software units may be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 502. Processor 501 reads the information in memory 502 and, in conjunction with its hardware, completes the steps of the above method.
[0228] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described above in this application, or combinations thereof.
[0229] For software implementation, the techniques described herein can be implemented by units that perform the functions described above. The software code can be stored in memory and executed by a processor. The memory can be implemented within the processor or external to the processor.
[0230] The electronic device provided in this embodiment may be as follows: Figure 5 The electronic device shown can execute all the steps of the control methods for each security camera described above, thereby achieving the technical effects of the control methods for each security camera described above. For details, please refer to the relevant descriptions above. For the sake of brevity, further details are not provided here.
[0231] This application also provides a storage medium (computer-readable storage medium). This storage medium stores one or more programs. The storage medium may include volatile memory, such as random access memory; it may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive; and it may also include combinations of the above types of memory.
[0232] When one or more programs in the storage medium can be executed by one or more processors to implement the above-described control method for security cameras executed on the electronic device side.
[0233] The processor described above is used to execute the control program for the security camera stored in the memory to implement the following steps of the security camera control method executed on the electronic device side:
[0234] Acquire the target image within the monitoring range of the security camera;
[0235] The target image is enhanced using a first image enhancement algorithm to obtain an enhanced image.
[0236] By performing motion detection on the enhanced image, the moving regions in the enhanced image are determined;
[0237] A second image enhancement algorithm is used to enhance the image of the moving region to obtain a processed image;
[0238] Determine the security target information of the processed image;
[0239] Based on the security object information, control whether the security camera starts recording.
[0240] Furthermore, the computer program product provided in this application embodiment may include computer-readable code, which, when executed on a device, causes a processor in the device to implement the following steps of a security camera control method executed on the electronic device side:
[0241] Acquire the target image within the monitoring range of the security camera;
[0242] The target image is enhanced using a first image enhancement algorithm to obtain an enhanced image.
[0243] By performing motion detection on the enhanced image, the moving regions in the enhanced image are determined;
[0244] A second image enhancement algorithm is used to enhance the image of the moving region to obtain a processed image;
[0245] Determine the security target information of the processed image;
[0246] Based on the security object information, control whether the security camera starts recording.
[0247] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0248] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0249] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “described” as used herein may also include the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not construed as requiring them to be performed in a particular order described or illustrated unless the order of performance is explicitly indicated. It should also be understood that additional or alternative steps may be used.
[0250] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A control method for a security camera, characterized in that, The method includes: Acquire the target image within the monitoring range of the security camera; The target image is enhanced using a first image enhancement algorithm to obtain an enhanced image. By performing motion detection on the enhanced image, the moving regions in the enhanced image are determined; A second image enhancement algorithm is used to enhance the image of the moving region to obtain a processed image; Determine the security target information of the processed image; Based on the security object information, control whether the security camera starts recording.
2. The method according to claim 1, characterized in that, Before performing image enhancement processing on the target image using the first image enhancement algorithm, the method further includes: Obtain environmental information of the monitoring range, wherein the environmental information includes the light intensity of the monitoring range; Determine whether the light intensity is less than or equal to a preset intensity threshold; and The first image enhancement algorithm is used to perform image enhancement processing on the target image, including: When the illumination intensity is less than or equal to the preset intensity threshold, the first image enhancement algorithm is used to perform image enhancement processing on the target image.
3. The method according to claim 1, characterized in that, The security camera is battery powered; and / or The first image enhancement algorithm includes a color equalization algorithm, and the second image enhancement algorithm includes a contrast enhancement algorithm.
4. The method according to claim 1, characterized in that, The security object information includes: whether the security object is in motion; and The determination of the security object information of the processed image includes: By performing target detection on the processed image, it can be determined whether the processed image contains a security object; If the processed image contains the security object, determine whether the security object is in motion; and The step of controlling whether the security camera starts recording based on the security object information includes: When the object being monitored is in motion, control the security camera to start recording. When the object being monitored is not in motion, the security camera is controlled not to start recording.
5. The method according to claim 1, characterized in that, When the security camera is prevented from recording, the method further includes: The processed image is then compressed to obtain a compressed image; Store the compressed image.
6. The method according to claim 5, characterized in that, When controlling the security camera to start recording, the method further includes: The compressed image is subjected to at least one of the following processes: decompression, transcoding, and encoding.
7. The method according to any one of claims 1-6, characterized in that, When the security camera is controlled not to start recording, the method is executed through the first operating system, while the second operating system is in a non-started state; When the security camera is controlled to start recording, or when the security camera is in recording mode, the method is executed through the second operating system; Wherein, the startup speed of the first operating system is faster than that of the second operating system, and / or, the power consumption of the first operating system is lower than that of the second operating system.
8. A control device for a security camera, characterized in that, The device includes: The first acquisition unit is used to acquire target images within the monitoring range of the security camera; The first processing unit is used to perform image enhancement processing on the target image using a first image enhancement algorithm to obtain an enhanced image; The first determining unit is configured to determine the motion region in the enhanced image by performing motion detection on the enhanced image; The second processing unit is used to perform image enhancement processing on the moving region using a second image enhancement algorithm to obtain a processed image; The second determining unit is used to determine the security object information of the processed image; The control unit is used to control whether the security camera starts recording based on the security object information.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor is configured to execute a computer program stored in the memory, wherein when the computer program is executed, it implements the control method for the security camera according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the control method of the security camera according to any one of claims 1-7.