Control method, device, storage medium and device of image acquisition device

By determining whether the image acquisition device is blocked and controlling it to enter a non-working state, the problem of device energy consumption and privacy security in intelligent assisted driving is solved, and the life of the device is extended and safety is improved.

CN115705641BActive Publication Date: 2024-10-29BYD CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110932703.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-13
Publication Date
2024-10-29
Estimated Expiration
2041-08-13

AI Technical Summary

Technical Problem

In intelligent assisted driving, the image acquisition device is still working when it is blocked, which increases energy consumption and reduces the life of the device. At the same time, there is a problem that hackers may turn on the camera privately, threatening the privacy and security of the vehicle.

Method used

By obtaining the image collected by the image acquisition device, the target similarity between the image to be detected and the pre-photographed template image is determined, and it is judged whether the image acquisition device is blocked by the lens blocking device. If it is blocked, the control device enters a non-working state, reducing energy consumption. consumption and extend service life.

Benefits of technology

It effectively reduces the energy consumption of image collection equipment and extends its service life. It also enhances vehicle privacy and security and prevents the risk of hackers turning on the camera privately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115705641B_ABST
    Figure CN115705641B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a control method, device, storage medium and device for an image acquisition device. The control method for the image acquisition device comprises: obtaining an image to be detected through an image acquired by the image acquisition device, wherein the image acquisition device comprises a lens blocking device; determining the target similarity between the image to be detected and a pre-captured template image, wherein the template image is an image captured by the image acquisition device after the image acquisition device is blocked by the lens blocking device; determining whether the image acquisition device is blocked by the lens blocking device according to the target similarity; if the image acquisition device is blocked by the lens blocking device, controlling the image acquisition device to enter a non-working state. Through the present disclosure, the loss of the image acquisition device can be reduced and the service life of the camera device can be extended.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of intelligent driving, and in particular, to a control method, device, storage medium and device for an image acquisition device. Background Art

[0002] With the development of intelligent assisted driving, car assisted driving has brought great convenience to car use, but the driver still needs to be prepared to take over the car at any time, so the driver monitoring system came into being.

[0003] In the related art, the driver's behavior habits or the status of the user in the car are monitored by a camera device to improve the safety of the car, but it also increases the privacy and safety risks of the car.

[0004] Although the image acquisition device can be turned on / off by software, there may be a situation where hackers or other software secretly turn on the image acquisition device, resulting in the privacy security of the vehicle not being guaranteed.

[0005] At present, in order to protect user privacy, a shielding device installed in the car is mainly used to shield the lens of the image acquisition device. However, while the lens of the image acquisition device is blocked, the image acquisition device is still in a working state, which increases the energy consumption of the image acquisition device. Summary of the invention

[0006] The purpose of the present disclosure is to provide a control method, device, storage medium and device for an image acquisition device.

[0007] In order to achieve the above object, the present disclosure provides a control method for an image acquisition device, comprising:

[0008] Acquire an image acquired by an image acquisition device to obtain an image to be detected, wherein the image acquisition device includes a lens blocking device;

[0009] Determining the target similarity between the image to be detected and a pre-captured template image, wherein the template image is an image captured by the image acquisition device after the image acquisition device is shielded by the lens shielding device;

[0010] Determining whether the image acquisition device is blocked by the lens blocking device according to the target similarity;

[0011] If the image acquisition device is blocked by the lens blocking device, the image acquisition device is controlled to enter a non-working state.

[0012] Optionally, determining the target similarity between the image to be detected and a pre-shot template image includes:

[0013] Randomly selecting a plurality of image blocks from the image to be detected to obtain a plurality of first image blocks;

[0014] Determine a first template image block at a corresponding position of the template image according to the position of each first image block in the image to be detected;

[0015] Determine a first similarity value between each of the first image blocks and the first template image block at a corresponding position;

[0016] Obtaining a mean value of the first similarities according to each of the first similarity values;

[0017] The mean of the first similarities is used as the target similarity.

[0018] Optionally, determining the target similarity between the image to be detected and a pre-shot template image includes:

[0019] Dividing the image to be detected according to the target ratio to obtain a plurality of target sub-images, and randomly selecting one or more image blocks from each of the target sub-images to obtain a plurality of second target image blocks;

[0020] Determine a second target template image block at a corresponding position of each second target sub-template image according to the position of each second target image block in the image to be detected;

[0021] Determine a second similarity value between each of the second target image blocks and the second target template image block at a corresponding position;

[0022] According to each of the second similarity values, a target similarity between the image to be detected and the pre-shot template image is obtained.

[0023] Optionally, obtaining a target similarity between the image to be detected and a pre-shot template image according to each of the second similarity values ​​includes:

[0024] Acquire a similarity weight coefficient of each of the target sub-images, and obtain a third similarity value after weighting each of the second similarity values ​​according to each of the second similarity values ​​and the similarity weight coefficient of the corresponding target sub-image;

[0025] Obtaining a mean value of the third similarities according to each of the third similarity values;

[0026] The average of the third similarities is used as the target similarity.

[0027] Optionally, the similarity weight coefficient of each target sub-image is determined based on the following method:

[0028] According to the travel direction of the lens blocking device to block the image acquisition device, the order in which each of the target sub-images is blocked is obtained;

[0029] According to the order in which each of the target sub-images is blocked, a preset similarity weight coefficient is allocated to each of the target sub-images in a descending order of similarity weight coefficients to obtain a similarity weight coefficient of each of the target sub-images.

[0030] Optionally, determining whether the image acquisition device is blocked by the lens blocking device according to the target similarity includes:

[0031] Comparing the target similarity with a preset similarity threshold;

[0032] If the target similarity is greater than a preset similarity threshold, it is determined that the image acquisition device is blocked by the lens blocking device.

[0033] Optionally, acquiring an image acquired by an image acquisition device to obtain an image to be detected includes:

[0034] Acquire a plurality of image frames acquired by the image acquisition device within a preset time period according to a preset time interval, and use the plurality of image frames as the images to be detected;

[0035] Determining the target similarity between the image to be detected and the pre-shot template image includes:

[0036] Determine a fourth similarity value between each of the image frames and the template image, and use each of the fourth similarity values ​​as the target similarity;

[0037] The step of determining whether the image acquisition device is blocked by the lens blocking device according to the target similarity comprises:

[0038] Comparing each of the fourth similarity values ​​with a preset similarity threshold, respectively, and determining, according to the comparison result, an image frame whose corresponding fourth similarity value is greater than the similarity threshold;

[0039] comparing the number of image frames whose corresponding fourth similarity values ​​are greater than the similarity threshold with a preset similarity number threshold;

[0040] If the number is greater than the similarity number threshold, it is determined that the image acquisition device is blocked by the lens blocking device;

[0041] If the number is less than or equal to the similarity number threshold, it is determined that the image acquisition device is not blocked by the lens blocking device.

[0042] Optionally, after controlling the image acquisition device to enter a non-working state, the method further includes:

[0043] In response to receiving an operation instructing the image acquisition device to enter a working state, the image acquisition device is controlled to enter a working state.

[0044] According to a second aspect of the present disclosure, there is provided a control device for an image acquisition device, comprising:

[0045] An acquisition module, used for acquiring an image through an image acquisition device to obtain an image to be detected, wherein the image acquisition device includes a lens blocking device;

[0046] A determination module is used to determine the target similarity between the image to be detected and the pre-shot template image, and

[0047] Determining whether the image acquisition device is blocked by the lens blocking device according to the target similarity, wherein the template image is an image captured by the image acquisition device after the image acquisition device is blocked by the lens blocking device;

[0048] The processing module is used to control the image acquisition device to enter a non-working state if the image acquisition device is blocked by the lens blocking device.

[0049] Through the above technical scheme, after obtaining the image to be detected through the image captured by the image acquisition device, by determining the similarity between the image to be detected and the preset template image, it is determined whether the image acquisition device is blocked by the lens blocking device according to the determined similarity. If the image acquisition device is blocked by the lens blocking device, it indicates that the user has actively blocked the camera device, and the image acquisition device is controlled to enter a non-working state, which can reduce the loss of the image acquisition device and extend the service life of the camera device.

[0050] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:

[0052] Figure 1 The figure is a flow chart of a method for controlling an image acquisition device according to an exemplary embodiment.

[0053] Figure 2 The figure is a flow chart of a method for controlling an image acquisition device according to an exemplary embodiment.

[0054] Figure 3a is an exemplary diagram of a first image block according to an exemplary embodiment.

[0055] Figure 3b is an exemplary diagram of a first template image block according to an exemplary embodiment.

[0056] Figure 4 The figure is a flow chart of a method for controlling an image acquisition device according to an exemplary embodiment.

[0057] Figure 5a is an exemplary diagram of a second target image block according to an exemplary embodiment.

[0058] Figure 5b is an example diagram of a second target template image block according to an exemplary embodiment.

[0059] Figure 6 The figure is a flow chart of a method for controlling an image acquisition device according to an exemplary embodiment.

[0060] Figure 7 It is a block diagram of a control device of an image acquisition device shown in an exemplary embodiment.

[0061] Figure 8 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0062] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.

[0063] With the development of intelligent assisted driving, more and more vehicles are equipped with cameras to monitor the driver's behavior or the status of users in the car, but at the same time, it increases the potential safety and privacy risks of vehicles. Although the camera can be turned on / off by software, there may be hackers or other software that can open the camera without permission, resulting in the situation that the privacy and security of the vehicle cannot be guaranteed.

[0064] In view of this, the present disclosure configures a physical shielding device for the camera device in the vehicle. When the physical device is opened, the camera is completely shielded, thereby ensuring the privacy and security in the vehicle. After the shielding device actively shields the camera device, if the driver's behavior habits or the status of the user in the vehicle are still monitored through the camera device, on the one hand, the monitoring is ineffective, and on the other hand, the loss of the camera device is increased, and the life of the camera device is reduced.

[0065] Therefore, in an exemplary embodiment of the present disclosure, by determining the similarity between an image captured by a camera device and a preset template image, it is determined whether the image acquisition device is blocked by a lens blocking device based on the determined similarity. If the image acquisition device is blocked by the lens blocking device, indicating that the user has actively blocked the camera device, the image acquisition device is controlled to enter a non-working state, which can effectively reduce the loss of the image acquisition device and extend the service life of the camera device.

[0066] Figure 1 is a flow chart of a control method of an image acquisition device according to an exemplary embodiment. Figure 1 As shown, the control method of the image acquisition device includes the following steps.

[0067] In step S11, an image to be detected is obtained by acquiring an image through an image acquisition device, and the image acquisition device includes a lens blocking device.

[0068] In one embodiment, the image acquisition device may be a device for monitoring the behavioral habits of a driver in a vehicle and / or monitoring the status of a user in a vehicle, and the lens blocking device may be a device for blocking the camera of the image acquisition device to prevent the camera from monitoring the driver's behavioral habits or the status of a user in the vehicle.

[0069] The lens shielding device may be a light-proof cover plate installed outside the camera lens of the camera device. The camera device may be an infrared camera device.

[0070] In step S12, the target similarity between the image to be detected and the pre-shot template image is determined.

[0071] The template image is an image that is pre-stored after being photographed by the image acquisition device after the image acquisition device is blocked by a lens blocking device.

[0072] For example, the target similarity between the image to be detected and the pre-captured template image can be determined based on the perceptual hashing algorithm:

[0073] The image to be detected and the template image are compressed, for example, the width*height of the image to be detected and the template image are compressed to a size of 32*32 pixels to obtain the compressed image to be detected and the compressed template image, and then the compressed image to be detected and the compressed template image are respectively subjected to cosine discrete transformation to obtain the discrete transformation image to be detected and the discrete transformation image of the template, and the hash value of the image to be detected and the hash value of the template image are calculated based on the discrete transformation image to be detected and the discrete transformation image of the template, and the corresponding Hamming distance is calculated. According to the Hamming distance between the image to be detected and the template image, the target similarity between the image to be detected and the pre-shot template image is obtained.

[0074] In step S13, it is determined whether the image acquisition device is blocked by the lens blocking device according to the target similarity.

[0075] In one implementation, based on the target similarity, it can be determined whether the image acquisition device is blocked by the lens blocking device, for example, in the following manner:

[0076] The target similarity is compared with a preset similarity threshold, and if the target similarity is greater than the preset similarity threshold, it is determined that the image acquisition device is blocked by the lens blocking device. If the target similarity is less than or equal to the preset similarity threshold, it is determined that the image acquisition device is not blocked by the lens blocking device.

[0077] In step S14, if the image acquisition device is blocked by the lens blocking device, the image acquisition device is controlled to enter a non-working state.

[0078] If the image acquisition device is blocked by the lens blocking device, indicating that the user has actively blocked the camera device, then controlling the image acquisition device to enter a non-working state can reduce the energy consumption of the image acquisition device, effectively reduce the loss of the image acquisition device, and extend the service life of the camera device.

[0079] In addition, in order to prevent the image acquisition device from being blocked by the lens blocking device due to user's misoperation, resulting in misjudgment, in one embodiment, after it is first determined that the image acquisition device is blocked by the lens blocking device, the moment when the image acquisition device is blocked is used as a reference. After a preset time period after this moment, the image acquired by the image acquisition device can be acquired again, and the similarity between the acquired image and the preset template image can be re-determined. According to the re-determined similarity, if it is determined that the image acquisition device is still blocked by the lens blocking device, the image acquisition device is controlled to enter a non-working state; if it is determined that the image acquisition device is not blocked by the lens blocking device, the image acquisition device is not controlled.

[0080] The non-working state may be a shutdown state or a sleep state.

[0081] Furthermore, in response to receiving an operation instructing the image acquisition device to enter a working state, the image acquisition device may be controlled to enter a working state.

[0082] Through the above technical solution, after obtaining the image captured by the image acquisition device and obtaining the image to be detected, by determining the similarity between the image to be detected and the preset template image, it is determined whether the image acquisition device is blocked by the lens blocking device according to the determined similarity. If the image acquisition device is blocked by the lens blocking device, it indicates that the user has actively blocked the camera device. In this case, the image acquisition device is controlled to enter a non-working state, which can effectively reduce the loss of the image acquisition device and extend the service life of the camera device.

[0083] Figure 2 is a flow chart of a control method of an image acquisition device according to an exemplary embodiment. Figure 2 As shown, the control method of the image acquisition device includes the following steps.

[0084] In step S21, an image is captured by an image capture device to obtain an image to be detected, and the image capture device includes a lens blocking device.

[0085] In step S22, a plurality of image blocks are randomly selected from the image to be detected to obtain a plurality of first image blocks, and a first template image block is determined at a corresponding position of the template image according to the position of each first image block in the image to be detected.

[0086] In order to reduce the amount of calculation for determining the similarity between the image to be detected and the template image, in one implementation, multiple image blocks can be randomly selected from the image to be detected to obtain multiple first image blocks, and accordingly, according to the position of each first image block in the image to be detected, the first template image block is determined at the corresponding position of the template image. The size of any first image block and the first template image block at the corresponding position is the same.

[0087] Furthermore, by respectively determining the first similarity value between each first image block and the first template image block at the corresponding position, the target similarity between the image to be detected and the pre-shot template image is determined according to each first similarity value.

[0088] In step S23, the first similarity values ​​between each first image block and the first template image block at the corresponding position are determined to obtain an average value of the first similarities, and the average value of the first similarities is used as the target similarity.

[0089] In step S24, it is determined whether the image acquisition device is blocked by the lens blocking device according to the target similarity.

[0090] In step S25, if the image acquisition device is blocked by the lens blocking device, the image acquisition device is controlled to enter a non-working state.

[0091] refer to Figure 3a and Figure 3b , Figure 3a is an example diagram of a first image block according to an exemplary embodiment. Figure 3b is an exemplary diagram of a first template image block according to an exemplary embodiment.

[0092] exist Figure 3a In the method, 5 image blocks are randomly selected from the image to be detected to obtain 5 first image blocks.

[0093] Accordingly, in Figure 3b In the method, according to the positions of the five first image blocks in the image to be detected, the first template image block is determined at the corresponding position of the template image.

[0094] Thus, after a plurality of first image blocks are randomly selected and a first template image block is determined at a corresponding position of the template image, a first similarity value between each first image block and the first template image block at the corresponding position is respectively determined, and based on each first similarity value, a target similarity between the image to be detected and the pre-shot template image is determined, thereby reducing the amount of calculation of the similarity between the image to be detected and the template image.

[0095] Figure 4 is a flow chart of a control method of an image acquisition device according to an exemplary embodiment. Figure 4 As shown, the control method of the image acquisition device includes the following steps.

[0096] In step S41, an image is captured by an image capture device to obtain an image to be detected, and the image capture device includes a lens blocking device.

[0097] In this embodiment, the image to be detected may be an image acquired by an image acquisition device.

[0098] In step S42, the image to be detected is divided according to the target ratio to obtain a plurality of target sub-images, and one or more image blocks are randomly selected from each target sub-image to obtain a plurality of second target image blocks.

[0099] The division of the image to be detected may be to divide the image vertically according to a target ratio, or to divide the image to be detected horizontally, etc., which is not limited in the present disclosure.

[0100] In step S43, according to the position occupied by each second target image block, a second target template image block is determined at a corresponding position of each second target sub-template image.

[0101] In step S44, a second similarity value between each second target image block and a second target template image block at a corresponding position is determined, and a target similarity between the image to be detected and the pre-shot template image is obtained according to each second similarity value.

[0102] In order to avoid excessive concentration of randomly selected image blocks while ensuring the randomness of image block selection, in one implementation, the image to be detected can be divided according to the target ratio to obtain multiple target sub-images, and one or more image blocks are randomly selected from each target sub-image to obtain multiple second target image blocks. Accordingly, for the template image, according to the position of each target image block in the image to be detected, the second target template image block is determined at the corresponding position of each second target sub-template image. Among them, the size of any second target image block is the same as the second target template image block at the corresponding position.

[0103] Afterwards, a second similarity value between each second target image block and a second target template image block at a corresponding position may be determined, and a target similarity between the image to be detected and the pre-shot template image may be obtained according to each second similarity value.

[0104] In step S45, it is determined whether the image acquisition device is blocked by the lens blocking device according to the target similarity. If the image acquisition device is blocked by the lens blocking device, the image acquisition device is controlled to enter a non-working state.

[0105] refer to Figure 5a and Figure 5b , Figure 5a is an example diagram of a second target image block according to an exemplary embodiment. Figure 5b is an example diagram of a second target template image block according to an exemplary embodiment.

[0106] exist Figure 5a In the method, the image to be detected is divided into five regions according to the target ratio to obtain five target sub-images, and then one or more image blocks are randomly selected from each target sub-image, for example, according to the target width*height size (for example, the preset width*height size is 32*32), to obtain multiple second target image blocks.

[0107] Accordingly, in Figure 5b In the method, according to the position occupied by each second target image block, the second target template image block is determined at the corresponding position of each target sub-template image.

[0108] Therefore, by randomly selecting multiple second target image blocks and determining the second target template image blocks at the corresponding positions of the template image, it is possible to avoid excessive concentration of randomly selected image blocks while ensuring the randomness of image block selection. Then, by respectively determining the second similarity value between each second target image block and the second target template image block at the corresponding position, the target similarity between the image to be detected and the pre-captured template image is determined based on each second similarity value.

[0109] The target similarity between the image to be detected and the pre-shot template image can be obtained, for example, in the following manner:

[0110] The similarity weight coefficient of each target sub-image is obtained, and the second similarity value after weighting each second similarity value is obtained according to each second similarity value and the similarity weight coefficient of the corresponding target sub-image. The mean of the second similarities is obtained according to each second similarity value, and the mean of the second similarities is used as the target similarity.

[0111] Among them, the similarity weight coefficient of each target sub-image can be preset to be the same, or different weights can be set for the similarities of different target sub-images according to the travel direction of the lens blocking device, and then the second similarity value after weighting each second similarity value is calculated, and the mean of the second similarity is obtained according to each second similarity value, and the mean of the second similarity is compared with a preset similarity threshold to determine whether the image acquisition device is blocked by the lens blocking device.

[0112] According to the travel direction of the lens blocking device, the similarity weight coefficient of each target sub-image can be determined, for example, in the following manner:

[0113] According to the travel direction of the lens blocking device to block the image acquisition device, the order in which each of the target sub-images is blocked is obtained, and according to the order in which each of the target sub-images is blocked, a preset similarity weight coefficient is assigned to each of the target sub-images in order from high to low similarity weight coefficients to obtain the similarity weight coefficient of each of the target sub-images.

[0114] Figure 6 is a flow chart of a control method of an image acquisition device according to an exemplary embodiment. Figure 6 As shown, the control method of the image acquisition device includes the following steps.

[0115] In step S61, a plurality of image frames acquired by an image acquisition device within a preset time period are acquired at preset time intervals, and the plurality of image frames are used as images to be detected.

[0116] In order to prevent the image acquisition device from being blocked by the lens blocking device due to user's misoperation, resulting in misjudgment, and to reduce the operation frequency of the image acquisition device, such as the alarm rate and the frequency of working state switching, in one embodiment, a plurality of image frames acquired by the image acquisition device within a preset time period (for example, within 20 minutes) can be acquired at a preset time interval (for example, 5 seconds, 10 seconds, etc.), and the plurality of image frames are used as images to be detected, and the similarity between each image frame and the template image is determined respectively to obtain a third similarity value, and each third similarity value is used as the target similarity.

[0117] In step S62, a fourth similarity value between each image frame and the template image is determined, and each fourth similarity value is used as a target similarity.

[0118] In step S63, it is determined whether the image acquisition device is blocked by the lens blocking device according to the target similarity.

[0119] In this embodiment, according to the target similarity, it can be determined whether the image acquisition device is blocked by the lens blocking device in the following manner, for example:

[0120] Each fourth similarity value is compared with a preset similarity threshold value respectively, and based on the comparison result, the image frames greater than the similarity threshold value are determined, and the number of image frames greater than the similarity threshold value is compared with a preset similarity number threshold value. If the number is greater than the similarity number threshold value, it is determined that the image acquisition device is blocked by the lens blocking device; if the number is less than or equal to the similarity number threshold value, it is determined that the image acquisition device is not blocked by the lens blocking device.

[0121] In step S64, if the image acquisition device is blocked by the lens blocking device, the image acquisition device is controlled to enter a non-working state.

[0122] Through the above technical scheme, a plurality of image frames acquired by the image acquisition device within a preset time period are obtained according to a preset time interval, and the plurality of image frames are used as images to be detected. It is determined that the image acquisition device is blocked by the lens blocking device based on the plurality of images to be detected, and then the image acquisition device is controlled to enter a non-working state. This can prevent the image acquisition device from being blocked by the lens blocking device due to user's misoperation, thereby preventing misjudgment. This improves the accuracy of judging whether the image acquisition device is blocked by the lens blocking device.

[0123] Figure 7 FIG. 7 is a block diagram 700 of a control device for an image acquisition device, shown as an exemplary embodiment. Figure 7 As shown, the control device 700 of the image acquisition device may include an acquisition module 701, a determination module 702 and a processing module 703, wherein:

[0124] An acquisition module 701 is used to obtain an image to be detected by using an image acquired by an image acquisition device, wherein the image acquisition device includes a lens blocking device;

[0125] The determination module 702 is used to determine the target similarity between the image to be detected and the pre-shot template image, and

[0126] Determine whether the image acquisition device is blocked by the lens blocking device according to the target similarity, the template image is an image captured by the image acquisition device after the image acquisition device is blocked by the lens blocking device;

[0127] The processing module 703 is used to control the image acquisition device to enter a non-working state if the image acquisition device is blocked by the lens blocking device.

[0128] Optionally, the processing module 703 is further configured to:

[0129] After the image acquisition device is controlled to enter the non-working state, in response to receiving an operation instructing the image acquisition device to enter the working state, the image acquisition device is controlled to enter the working state.

[0130] Optionally, the determination module 702 determines the target similarity between the image to be detected and the pre-shot template image in the following manner:

[0131] Divide the image to be detected according to the target ratio to obtain multiple target sub-images, and randomly select image blocks of the target number from each target sub-image according to the target size to obtain multiple target image blocks;

[0132] Divide the template image according to the target ratio to obtain multiple target sub-template images, and determine the target template image block according to the target size at the corresponding position of each target sub-template image according to the position occupied by each target image block;

[0133] Determine a first similarity value between each target image block and a target template image block at a corresponding position;

[0134] According to each first similarity value, a target similarity between the image to be detected and the pre-shot template image is obtained.

[0135] Optionally, the determination module 702 determines the target similarity between the image to be detected and the pre-shot template image in the following manner:

[0136] Randomly selecting a plurality of image blocks from the image to be detected to obtain a plurality of first image blocks;

[0137] Determining a first template image block at a corresponding position of the template image according to the position of each first image block in the image to be detected;

[0138] Determine a first similarity value between each first image block and a first template image block at a corresponding position;

[0139] According to each first similarity value, obtaining a mean of the first similarities;

[0140] The mean of the first similarities is taken as the target similarity.

[0141] Optionally, the determination module 702 determines the target similarity between the image to be detected and the pre-shot template image in the following manner:

[0142] Dividing the image to be detected according to the target ratio to obtain a plurality of target sub-images, and randomly selecting one or more image blocks from each target sub-image to obtain a plurality of second target image blocks;

[0143] Determine the second target template image block at the corresponding position of each second target sub-template image according to the position of each second target image block in the image to be detected;

[0144] Determine a second similarity value between each second target image block and a second target template image block at a corresponding position;

[0145] According to each second similarity value, a target similarity between the image to be detected and the pre-shot template image is obtained.

[0146] Optionally, the determination module 702 obtains the target similarity between the image to be detected and the pre-shot template image according to each second similarity value in the following manner:

[0147] Obtaining a similarity weight coefficient of each target sub-image, and obtaining a third similarity value after weighting each second similarity value according to each second similarity value and the similarity weight coefficient of the corresponding target sub-image;

[0148] According to each third similarity value, obtaining a mean value of the third similarities;

[0149] The mean of the third similarities is taken as the target similarity.

[0150] Optionally, the similarity weight coefficient of each target sub-image is determined based on the following method:

[0151] According to the travel direction of the lens blocking device blocking the image acquisition device, the blocking order of each target sub-image is obtained;

[0152] According to the order in which each target sub-image is blocked, a preset similarity weight coefficient is allocated to each target sub-image in a descending order of similarity weight coefficients to obtain a similarity weight coefficient of each target sub-image.

[0153] Optionally, the determination module 702 determines whether the image acquisition device is blocked by the lens blocking device according to the target similarity in the following manner:

[0154] Compare the target similarity with a preset similarity threshold;

[0155] If the target similarity is greater than a preset similarity threshold, it is determined that the image acquisition device is blocked by the lens blocking device.

[0156] Optionally, the acquisition module 701 acquires the image to be detected by acquiring the image through the image acquisition device in the following manner:

[0157] Acquire multiple image frames collected by an image acquisition device within a preset time period according to a preset time interval, and use the multiple image frames as images to be detected;

[0158] Determine the target similarity between the image to be detected and the pre-captured template image, including:

[0159] determining a fourth similarity value between each image frame and the template image, and taking each fourth similarity value as a target similarity;

[0160] The determination module 702 determines whether the image acquisition device is blocked by the lens blocking device according to the target similarity in the following manner:

[0161] Comparing each fourth similarity value with a preset similarity threshold value respectively, and determining, according to the comparison result, an image frame whose corresponding fourth similarity value is greater than the similarity threshold value;

[0162] Compare the number of image frames whose corresponding fourth similarity values ​​are greater than the similarity threshold with a preset similarity number threshold;

[0163] If the number is greater than the similarity number threshold, it is determined that the image acquisition device is blocked by the lens blocking device;

[0164] If the number is less than or equal to the similarity number threshold, it is determined that the image acquisition device is not blocked by the lens blocking device.

[0165] Optionally, the processing module 703 is further configured to:

[0166] After the image acquisition device is controlled to enter the non-working state, in response to receiving an operation instructing the image acquisition device to enter the working state, the image acquisition device is controlled to enter the working state.

[0167] Optionally, the target similarity between the image to be detected and the pre-captured template image is determined based on a perceptual hash algorithm.

[0168] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0169] Figure 8 FIG. 8 is a block diagram of an electronic device 800 according to an exemplary embodiment. Figure 8 As shown, the electronic device 800 may include: a processor 801 and a memory 802. The electronic device 800 may also include one or more of a multimedia component 803, an input / output (I / O) interface 804, and a communication component 805.

[0170] The processor 801 is used to control the overall operation of the electronic device 800 to complete all or part of the steps in the control method of the above-mentioned image acquisition device. The memory 802 is used to store various types of data to support the operation of the electronic device 800, and these data may include, for example, instructions for any application or method used to operate on the electronic device 800, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 803 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 802 or sent through the communication component 805. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 804 provides an interface between the processor 801 and other interface modules, and the above-mentioned other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the electronic device 800 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, is not limited here. Therefore, the corresponding communication component 805 may include: Wi-Fi module, Bluetooth module, NFC module, etc.

[0171] In an exemplary embodiment, the electronic device 800 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned control method of the image acquisition device.

[0172] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the control method of the above-mentioned image acquisition device are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 802 including program instructions, and the above-mentioned program instructions can be executed by the processor 801 of the electronic device 800 to complete the above-mentioned control method of the image acquisition device.

[0173] In another exemplary embodiment, a computer program product is also provided. The computer program product includes a computer program executable by a programmable device, and the computer program has a code portion for executing the above-mentioned control method of the image acquisition device when executed by the programmable device.

[0174] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.

[0175] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0176] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.

Claims

1. A control method for an image acquisition device, characterized in that: The method comprises: Acquire an image by an image acquisition device to obtain an image to be detected, wherein the image acquisition device includes a lens blocking device; Determining the target similarity between the image to be detected and a pre-captured template image, wherein the template image is an image captured by the image acquisition device after the image acquisition device is shielded by the lens shielding device; Determining whether the image acquisition device is blocked by the lens blocking device according to the target similarity; If the image acquisition device is blocked by the lens blocking device, controlling the image acquisition device to enter a non-working state; Wherein, determining the target similarity between the image to be detected and the pre-shot template image includes: Dividing the image to be detected according to the target ratio to obtain a plurality of target sub-images, and randomly selecting one or more image blocks from each of the target sub-images to obtain a plurality of second target image blocks; Determine a second target template image block at a corresponding position of each second target sub-template image according to the position of each second target image block in the image to be detected; Determine a second similarity value between each of the second target image blocks and the second target template image block at a corresponding position; Obtaining a target similarity between the image to be detected and a pre-shot template image according to each of the second similarity values; Wherein, obtaining the target similarity between the image to be detected and the pre-shot template image according to each of the second similarity values ​​includes: Acquire a similarity weight coefficient of each of the target sub-images, and obtain a third similarity value after weighting each of the second similarity values ​​according to each of the second similarity values ​​and the similarity weight coefficient of the corresponding target sub-image; Obtaining a mean value of the third similarities according to each of the third similarity values; Taking the mean of the third similarities as the target similarity; The similarity weight coefficient of each target sub-image is predetermined based on the following method: According to the travel direction of the lens blocking device to block the image acquisition device, the order in which each of the target sub-images is blocked is obtained; According to the order in which each of the target sub-images is blocked, a preset similarity weight coefficient is allocated to each of the target sub-images in a descending order of similarity weight coefficients to obtain a similarity weight coefficient of each of the target sub-images.

2. The method according to claim 1, characterized in that The step of determining whether the image acquisition device is blocked by the lens blocking device according to the target similarity comprises: Comparing the target similarity with a preset similarity threshold; If the target similarity is greater than a preset similarity threshold, it is determined that the image acquisition device is blocked by the lens blocking device.

3. The method according to claim 1, characterized in that The step of acquiring an image by an image acquisition device to obtain an image to be detected includes: Acquire a plurality of image frames acquired by the image acquisition device within a preset time period according to a preset time interval, and use the plurality of image frames as the images to be detected; Determining the target similarity between the image to be detected and the pre-shot template image includes: Determine a fourth similarity value between each of the image frames and the template image, and use each of the fourth similarity values ​​as the target similarity; The step of determining whether the image acquisition device is blocked by the lens blocking device according to the target similarity comprises: Comparing each of the fourth similarity values ​​with a preset similarity threshold, respectively, and determining, according to the comparison result, an image frame whose corresponding fourth similarity value is greater than the similarity threshold; comparing the number of image frames whose corresponding fourth similarity values ​​are greater than the similarity threshold with a preset similarity number threshold; If the number is greater than the similarity number threshold, it is determined that the image acquisition device is blocked by the lens blocking device; If the number is less than or equal to the similarity number threshold, it is determined that the image acquisition device is not blocked by the lens blocking device.

4. The method according to claim 1, characterized in that: After controlling the image acquisition device to enter a non-working state, the method further includes: In response to receiving an operation instructing the image acquisition device to enter a working state, the image acquisition device is controlled to enter a working state.

5. The method according to any one of claims 1 to 4, characterized in that: The target similarity between the image to be detected and a pre-shot template image is determined based on a perceptual hash algorithm.

6. A control device for an image acquisition device, characterized in that: The device comprises: An acquisition module, used to acquire an image acquired by an image acquisition device to obtain an image to be detected, wherein the image acquisition device includes a lens blocking device; A determination module is used to determine the target similarity between the image to be detected and the pre-shot template image, and Determining whether the image acquisition device is blocked by the lens blocking device according to the target similarity, wherein the template image is an image captured by the image acquisition device after the image acquisition device is blocked by the lens blocking device; A processing module, configured to control the image acquisition device to enter a non-working state if the image acquisition device is blocked by the lens blocking device; The determination module determines the target similarity between the image to be detected and the pre-shot template image in the following manner: Dividing the image to be detected according to the target ratio to obtain a plurality of target sub-images, and randomly selecting one or more image blocks from each of the target sub-images to obtain a plurality of second target image blocks; Determine a second target template image block at a corresponding position of each second target sub-template image according to the position of each second target image block in the image to be detected; Determine a second similarity value between each of the second target image blocks and the second target template image block at a corresponding position; Obtaining a target similarity between the image to be detected and a pre-shot template image according to each of the second similarity values; The determination module obtains the target similarity between the image to be detected and the pre-shot template image according to each of the second similarity values ​​in the following manner: Acquire a similarity weight coefficient of each of the target sub-images, and obtain a third similarity value after weighting each of the second similarity values ​​according to each of the second similarity values ​​and the similarity weight coefficient of the corresponding target sub-image; Obtaining a mean value of the third similarities according to each of the third similarity values; Taking the mean of the third similarities as the target similarity; The similarity weight coefficient of each target sub-image is predetermined based on the following method: According to the travel direction of the lens blocking device to block the image acquisition device, the order in which each of the target sub-images is blocked is obtained; According to the order in which each of the target sub-images is blocked, a preset similarity weight coefficient is allocated to each of the target sub-images in a descending order of similarity weight coefficients to obtain a similarity weight coefficient of each of the target sub-images.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 5 are implemented.

8. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Household electrical appliance, control method thereof and storage medium

    CN109283850A

  • Face recognition method and device and storage medium

    CN109829448A

  • Camera shielding detection method and device, electronic equipment and channel gate

    CN112804519A