[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN112802052A - Image recognition method and device, electronic equipment and storage medium - Google Patents

Image recognition method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112802052A
CN112802052A CN202110071131.9A CN202110071131A CN112802052A CN 112802052 A CN112802052 A CN 112802052A CN 202110071131 A CN202110071131 A CN 202110071131A CN 112802052 A CN112802052 A CN 112802052A
Authority
CN
China
Prior art keywords
image
area
moving object
motion detection
target area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110071131.9A
Other languages
Chinese (zh)
Inventor
王宁波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202110071131.9A priority Critical patent/CN112802052A/en
Publication of CN112802052A publication Critical patent/CN112802052A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/207Analysis of motion for motion estimation over a hierarchy of resolutions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/329Power saving characterised by the action undertaken by task scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/97Determining parameters from multiple pictures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The present disclosure relates to an image recognition method, apparatus, electronic device, and storage medium to provide a new AI image recognition method, which reduces power consumption of the device and reduces the problem of false detection of the device due to a stationary object such as a face image. The image identification method comprises the following steps: acquiring a region image corresponding to a target region which can be acquired by image acquisition equipment; determining whether a moving object exists in the target area according to the motion detection result of the area image; and if the moving object exists in the target area, performing image recognition on the area image, and determining the identification information of the moving object in the target area.

Description

Image recognition method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to an image recognition method and apparatus, an electronic device, and a storage medium.
Background
With the continuous development of AI (Artificial Intelligence) technology, more and more electronic devices have an AI analysis function, which is greatly convenient for people's life. For example, an AI camera for monitoring may perform real-time AI analysis and processing on a captured monitoring picture through various AI algorithms. However, real-time AI analysis and image processing cause the power consumption of the processor to be increased, the temperature of the device to be increased, which may affect the operation of other chips of the device, or may cause the chip to stop operating, or even burn out the chip.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides an image recognition method, an image recognition apparatus, an electronic device, and a storage medium, so as to provide a new AI image recognition method.
According to a first aspect of embodiments of the present disclosure, there is provided an image recognition method, the method including:
acquiring a region image corresponding to a target region which can be acquired by image acquisition equipment;
determining whether a moving object exists in the target area according to the motion detection result of the area image;
and if the moving object exists in the target area, performing image recognition on the area image, and determining the identification information of the moving object in the target area.
Optionally, the acquiring an area image corresponding to a target area that can be acquired by the image acquisition device includes:
controlling the image acquisition equipment to acquire images aiming at an acquirable target area to obtain a plurality of area images with continuous acquisition time;
the determining whether a moving object exists in the target area according to the motion detection result of the area image includes:
determining the absolute value of the pixel difference between the pixel values of the corresponding positions in the area images adjacent to the acquisition time in the plurality of area images to obtain a difference area image;
and when the number of pixel points with pixel values larger than a preset pixel value in the difference region image reaches a first preset threshold value, determining that a moving object exists in the target region.
Optionally, the determining whether there is a moving object in the target region according to the motion detection result of the region image includes:
dividing the area image into a plurality of sub-area images, performing motion detection on each sub-area image, and determining a first motion detection result corresponding to each sub-area image;
and determining whether a moving object exists in the target area or not according to the first motion detection result corresponding to each sub-area image.
Optionally, the determining whether a moving object exists in the target region according to the first motion detection result corresponding to each of the sub-region images includes:
when the first motion detection result corresponding to each sub-area image represents that a moving object is detected, determining that the moving object exists in the target area; or
And when the number of the target sub-area images reaches a second preset threshold value, determining that a moving object exists in the target area, wherein the target sub-area images are the sub-area images of which the first motion detection result represents that the moving object is detected.
Optionally, the method further comprises:
performing motion detection on the target area through an infrared motion sensor to obtain a second motion detection result for representing whether a moving object exists in the target area;
the determining whether a moving object exists in the target area according to the motion detection result of the area image includes:
and when the first motion detection result aiming at the area image represents that a moving object exists in the target area, and the second motion detection result obtained by the infrared motion sensor represents that the moving object exists in the target area, determining that the moving object exists in the target area.
Optionally, before determining whether a moving object exists in the target region according to the motion detection result of the region image, the method further includes:
and responding to the received motion detection instruction sent by the user terminal, and performing motion detection on the area image.
Optionally, the method further comprises:
and when the moving object exists in the target area, sending identification information of the object obtained by carrying out image recognition on the area image to a user terminal.
According to a second aspect of the embodiments of the present disclosure, there is provided an image recognition apparatus, the apparatus including:
the acquisition module is configured to acquire an area image corresponding to a target area which can be acquired by the image acquisition equipment;
a detection module configured to determine whether a moving object exists in the target region according to a motion detection result of the region image;
the identification module is configured to perform image identification on the area image and determine the identification information of the object moving in the target area when the object moving in the target area exists.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring a region image corresponding to a target region which can be acquired by image acquisition equipment;
determining whether a moving object exists in the target area according to the motion detection result of the area image;
and if the moving object exists in the target area, performing image recognition on the area image, and determining the identification information of the moving object in the target area.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the method of any one of the first aspects.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
by the aid of the method, when moving objects exist in the target area, the area image corresponding to the target area can be subjected to image recognition, and compared with a method for performing real-time AI analysis and processing in the related art, the method has the advantages that operation resources required by motion detection are less, so that power consumption of equipment can be remarkably reduced, the temperature of the equipment is reduced, and normal operation of the equipment is guaranteed. In addition, if a moving object exists in the target area, it is indicated that a person actually appears in the target area, so that false detection of other static objects such as a face picture by the device can be reduced, and the accuracy of image recognition is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a schematic diagram illustrating an application scenario of an image recognition method according to an exemplary embodiment;
FIG. 2 is a flow diagram illustrating an image recognition method according to an exemplary embodiment;
FIG. 3 is a flow diagram illustrating an image recognition method according to an exemplary embodiment;
FIG. 4 is a block diagram illustrating an image recognition device according to an exemplary embodiment;
FIG. 5 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
With the continuous development of AI (Artificial Intelligence) technology, more and more electronic devices have an AI analysis function, which is greatly convenient for people's life. For example, in a home monitoring scene as shown in fig. 1, the AI camera has not only the traditional functions of live broadcasting, video recording, and intercom, but also the intelligent analysis functions of face recognition, human shape detection, and the like, which are possessed by the ordinary camera, so as to realize intelligent monitoring. For example, the AI camera may perform real-time AI analysis and processing on the captured monitoring scene to determine whether a person is present in the monitoring scene. When the AI camera determines that the human face or the human figure exists in the monitoring picture, prompt information such as 'presence of a person' can be generated, and the prompt information is sent to the user terminal through the cloud server to prompt the user that the person appears in the monitoring picture.
In such a scenario, in order to realize real-time monitoring, the AI camera needs to perform real-time AI analysis and processing on a captured monitoring picture. However, the inventor researches and discovers that the AI algorithm has high requirements on computing power and high power consumption, the real-time AI analysis and processing can cause the temperature of equipment to rise, the work of other chips of the equipment is influenced slightly, and the chip stops working even burns out the chip and other problems.
In addition, the inventor also researches and discovers that the AI algorithm in the related technology has uneven performance and accuracy rate which cannot reach 100%, and in addition, the user scene is complex and changeable, and the AI algorithm has more problems of false detection and false alarm of the face and the human figure in the monitoring picture. For example, when a face photo appears on a monitoring picture of the AI camera and face recognition is performed on the monitoring picture through an AI algorithm, the face is considered to exist in the monitoring picture, so that the AI camera always sends a prompt message of 'presence of person' to the user terminal. In this case, no person actually appears in the monitoring picture, the AI camera performs face recognition in real time and always sends wrong prompt information, which not only increases the operation burden of the AI camera, but also causes waste of network resources for sending the prompt information.
In view of the above, the present disclosure provides an image recognition method, an image recognition apparatus, an electronic device, and a storage medium, so as to reduce power consumption of a device having an AI image analysis function. In addition, the problems of false detection and false alarm of equipment with an AI image analysis function can be solved.
Fig. 2 is a flowchart illustrating an image recognition method according to an exemplary embodiment, which may be applied to the AI camera shown in fig. 1, as shown in fig. 2, including the following steps.
In step S21, an area image corresponding to the target area that can be captured by the image capturing apparatus is acquired.
In step S22, it is determined whether or not there is a moving object in the target area based on the result of the motion detection on the area image.
In step S23, if there is a moving object in the target area, the area image is subjected to image recognition to determine the identification information of the object moving in the target area.
By the aid of the method, when moving objects exist in the target area, the area image corresponding to the target area can be subjected to image recognition, and compared with a real-time AI analysis and processing mode in the related art, the method has the advantages that operation resources required by motion detection are less, so that power consumption of equipment can be remarkably reduced, the temperature of the equipment is reduced, and normal operation of the equipment is guaranteed.
In addition, the moving object in the target area indicates that a person actually appears in the target area, so that the false detection of other static objects such as a face picture and the like by equipment can be reduced, and the accuracy of image recognition is improved.
In order to make those skilled in the art understand the image recognition method provided by the embodiment of the present disclosure, the following takes an AI camera monitoring scene as an example to illustrate the above steps in detail.
For example, the target area may be a maximum monitoring area that can be monitored by the AI camera, or may be a partial monitoring area that can be monitored by the AI camera, which is not limited in this disclosure. The area image may be an image acquired by the AI camera while monitoring the target area, and used for characterizing the current situation of the target area. In a possible manner, the area image may also be a binary image obtained by performing binarization processing on an image acquired by the AI camera, or may also be an image obtained by processing an image acquired by the AI camera according to a conventional preprocessing manner before the analysis and processing of the AI image in the related art, which is not limited in this disclosure. For convenience of description, the area images described hereinafter refer to images directly captured by the AI camera.
For example, the area image corresponding to the target area may be acquired by the AI camera in real time, or, where possible, the area image corresponding to the target area may also be acquired periodically by the AI camera at preset time intervals, so as to further reduce power consumption of the AI camera.
In a possible manner, acquiring the area image corresponding to the target area that can be acquired by the image acquisition device may be: and controlling the image acquisition equipment to acquire images aiming at the acquirable target area so as to obtain a plurality of area images with continuous acquisition time. Accordingly, determining whether there is a moving object in the target region according to the motion detection result of the region image may be: determining the absolute value of a pixel difference value between pixel values of corresponding positions in regional images adjacent to each other in acquisition time in the plurality of regional images to obtain a differential regional image, and determining that a moving object exists in a target region when the number of pixel points of which the pixel values are greater than a preset pixel value in the differential regional image reaches a first preset threshold value.
For example, the image capturing device may be an AI camera, or a mobile phone or a computer having an image capturing function and an AI image analyzing function, which is not limited in this disclosure. The image acquisition equipment can be controlled to acquire images in real time aiming at the target area, and a plurality of area images with continuous acquisition time can be obtained. It should be understood that the plurality of area images are all acquired for the target area, and if there is no moving object in the target area, the image contents of the plurality of area images are the same. If there is a moving object in the target area image, the difference between the image contents of the plurality of area images is the moving object. Thus, the absolute value of the pixel difference between the pixel values of the corresponding positions in the images of the regions adjacent in the acquisition time is determined, and the object moving in the target region can be determined.
For example, the region images adjacent to each other in the acquisition time may be two region images adjacent to each other in the acquisition time, and therefore, the absolute value may be obtained by subtracting the pixel values of the corresponding positions in each two region images adjacent to each other in the acquisition time in the plurality of region images in sequence to obtain the differential region image. Or, the area image may be binarized first, and then, for the binarized area image, the pixel values of the corresponding positions in every two area images adjacent to each other in the acquisition time are subtracted in sequence, and then the absolute value is obtained.
Illustratively, the pixel value of each pixel point in the difference region image represents an absolute value of a pixel difference between corresponding pixel points in the region images adjacent to each other in the acquisition time. For an image region where no moving object exists in the region image, the pixel difference value is 0, that is, the image region is displayed in black. And for an image region in which a moving object exists in the region image, the pixel difference value is not 0, that is, the image region is displayed as non-black. In the embodiment of the present disclosure, by setting the preset pixel value, it may be determined how many absolute values of pixel differences between corresponding pixel points in the region images adjacent to each other in the acquisition time are, and then the moving object is considered to be detected.
For example, a preset pixel value may be set to 3, and when an absolute value of a pixel difference between corresponding pixel points in the region images adjacent to each other in the acquisition time is greater than 3, it is determined that a pixel point of a moving object exists in the corresponding pixel point. In this case, the apparatus has a high sensitivity to changes in moving objects. Or, the preset pixel value may be set to 25, and when the absolute value of the pixel difference between corresponding pixel points in the region images adjacent to each other in the acquisition time is greater than 25, it is determined that a pixel point of a moving object exists in the corresponding pixel point. In this case, the apparatus has low sensitivity to changes in moving objects. The embodiment of the present disclosure does not limit the setting of the preset pixel value.
In addition, the change degree of the moving object can be represented by the first preset threshold value. Similarly, the user may set the first preset threshold according to the actual service requirement, which is not limited in this disclosure. For example, if it is desired to determine the leaf swing caused by wind blowing as the detection of a moving object, that is, if the sensitivity requirement for the change of the moving object is high, the first preset threshold value may be set to be small. On the contrary, if it is desired to determine that the moving object is detected only when the large-amplitude motion of the person or the object is detected, that is, when the requirement on the change sensitivity of the moving object is low, the first preset threshold may be set to be large.
By the mode, the area image corresponding to the target area can be collected in real time, and when the moving object exists in the target area, AI image recognition is carried out, so that the real-time monitoring function can be guaranteed, and the power consumption of the equipment can be reduced. In addition, the detection sensitivity of the equipment can be controlled by setting the preset pixel value and the first preset threshold value, so that the monitoring requirements under different scenes can be better met.
In a possible manner, determining whether there is a moving object in the target area according to the motion detection result of the area image may further be: the method comprises the steps of dividing a region image into a plurality of sub-region images, carrying out motion detection on each sub-region image, determining a first motion detection result corresponding to each sub-region image, and then determining whether a moving object exists in a target region according to the first motion detection result corresponding to each sub-region image.
For example, the acquired region image is divided into 9 × 9 sub-region images, and then motion detection is performed on each sub-region image, so as to obtain a first motion detection result corresponding to each sub-region image. And then determining whether a moving object exists in the target area according to a first motion detection result corresponding to each sub-area image in the 9 multiplied by 9 sub-area images. In addition to the above-mentioned modes, the mode of motion detection may also be a mode of motion detection such as an optical flow method in the prior art, which is not limited in the embodiment of the present disclosure.
By the mode, the area image is divided into the plurality of subarea images to be respectively subjected to motion detection, and compared with the motion detection of the whole area image, the motion detection of the plurality of subarea images can be synchronously performed to improve the motion detection efficiency and the whole operation efficiency of the equipment.
In a possible manner, determining whether there is a moving object in the target region according to the first motion detection result corresponding to each sub-region image may be: when a first motion detection result corresponding to each sub-area image represents that a moving object is detected, determining that the moving object exists in the target area; or when the number of the target sub-region images reaches a second preset threshold, determining that a moving object exists in the target region, wherein the target sub-region images are the sub-region images of which the first motion detection result represents that the moving object is detected.
In a possible manner, when the first motion detection result corresponding to each sub-region image indicates that a moving object is detected, it may be determined that a moving object exists in the target region, and thus, when a large-amplitude moving object exists in the target region, it may be determined that a moving object exists in the target region, that is, the device has a low sensitivity to the degree of change of the moving object. Or, when the number of the sub-region images of the moving object detected by the first motion detection result is up to a second preset threshold, it may be determined that the moving object exists in the target region. Thus, by setting the second preset threshold, the degree of change sensitivity of the apparatus to the moving object can be controlled.
For example, when the second preset threshold is set to be larger, it indicates that there may be a moving object in the target region when the first motion detection result indicates that the number of sub-region images in which the moving object is detected is larger, and thus the apparatus has a lower sensitivity to the degree of change of the moving object. When the second preset threshold is set to be smaller, it indicates that there is a moving object in the target region when the first motion detection result represents that the number of the sub-region images in which the moving object is detected is smaller, and thus the apparatus has higher sensitivity to the degree of change of the moving object. The setting of the second preset threshold is not limited in the embodiments of the present disclosure, and in specific implementation, the second preset threshold may be set according to actual service requirements.
In a possible mode, motion detection can be performed on the target area through the infrared motion sensor, so that a second motion detection result for representing whether a moving object exists in the target area is obtained. Accordingly, determining whether there is a moving object in the target area according to the motion detection result of the area image may be: and when a first motion detection result aiming at the region image represents that a moving object exists in the target region and a second motion detection result obtained by the infrared motion sensor represents that the moving object exists in the target region, determining that the moving object exists in the target region.
The embodiment of the disclosure can not only determine whether a moving object exists in the target area by performing image processing on the area image, but also perform motion detection on the target area by combining an infrared motion sensor. Therefore, when a first motion detection result of the area image represents that a moving object exists in the target area and a second motion detection result obtained by the infrared motion sensor represents that the moving object exists in the target area, the moving object in the target area is determined to improve the accuracy of motion detection, so that the accuracy of the result of whether image identification is carried out or not in follow-up judgment is improved, and the effective operation of an AI monitoring function of the equipment is ensured while the power consumption of the equipment is reduced.
In a possible mode, before determining whether a moving object exists in the target area according to the motion detection result of the area image, the area image can be further subjected to motion detection in response to receiving a motion detection instruction sent by the user terminal.
For example, in the monitoring process of the AI camera, the AI camera acquires an area image corresponding to a target area in real time, and performs real-time motion detection on the acquired area image. To further reduce power consumption, motion detection may be made to be performed periodically, where possible. At the periodic interval of motion detection, if the user wants to determine whether there is a moving object in the target area, a motion detection instruction may be transmitted to the AI camera through the user terminal. Accordingly, after receiving the motion detection instruction sent by the user terminal, the AI camera may perform motion detection on the area image, so as to determine whether a moving object exists in the target area according to a motion detection result of the area image. Therefore, the power consumption of the equipment can be reduced, and meanwhile, the interactive control between the user terminal and the equipment is increased, so that the operation of the equipment can better meet the requirements of actual users, and the applicability of the equipment to different application scenes is improved.
After determining that the moving object exists in the target area in any of the above manners, image recognition may be performed on the acquired area image to obtain identification information of the moving object in the target area. The manner of performing image recognition on the acquired region image is similar to that in the related art, and is briefly described here. For example, the AI algorithm in the related art may be used to perform image processing such as face recognition and human shape detection on the region image. Then, the algorithm analysis result may be processed, for example, the algorithm analysis result may be extracted, processed, and the like. Then, business logic processing may be performed according to the processed algorithm analysis result, for example, corresponding prompt information may be generated when the algorithm analysis result indicates that a person appears, or a plurality of faces included in the algorithm analysis result may be compared to determine the number of faces included in the monitoring picture, and the like. And finally, reporting the result data after the business logic processing to a cloud server so that the cloud server actively sends the result data to the user terminal, or so that the cloud server sends the result data to the user terminal when receiving a data viewing request sent by the user terminal, and the like.
For example, the identification information of the object moving in the target area may be a direct result obtained by performing image recognition on the area image, or may be result data obtained by processing the algorithm analysis result in the manner described above and performing service logic processing according to the processed algorithm analysis result.
In a possible manner, when it is determined that a moving object exists in the target area, identification information of the object obtained by image recognition of the area image may also be transmitted to the user terminal. For example, if the identification information of the object obtained by image recognition of the area image is "2 persons", the identification information "2 persons" may be transmitted to the user terminal. Or, in order to facilitate reading by the user, the identification information directly obtained by image recognition may be processed in the manner described above, and service logic processing may be performed according to the processed identification information, so as to obtain corresponding prompt information, that is, "2 persons appear in the monitoring area", and then the prompt information is sent to the user terminal. The embodiment of the present disclosure does not limit the specific manner of sending the identification information of the moving object to the user terminal.
By the mode, when a moving object exists in the target area, the identification information of the object obtained by carrying out image recognition on the area image can be sent to the user terminal, namely when a person actually appears in the target area, the prompt information can be sent to the user terminal, false detection and false alarm of the device to other static objects such as facial pictures and the like can be reduced, and therefore network resources for communication between the device and the user terminal are saved.
The following describes an image recognition method provided by the present disclosure with reference to fig. 3, taking a home monitoring scene of the AI camera shown in fig. 1 as an example. As shown in fig. 3, the AI camera may perform the following steps:
and step 31, acquiring an area image corresponding to the target area which can be acquired by the image acquisition equipment.
Step 32, image preprocessing is performed on the region image. For example, the AI camera may perform preprocessing on the region image data corresponding to the target region by a conventional preprocessing means in the prior art to obtain an image required for subsequent AI algorithm analysis.
And step 33, performing motion detection on the preprocessed area image. It should be understood that this step 33 may perform motion detection on the preprocessed region image in any manner provided by the present disclosure, and the detailed process is not described here.
And step 34, determining whether a moving object exists in the target area according to the motion detection result of the preprocessed area image. If there is a moving object, step 35 is performed, otherwise step 31 is returned to. It should be appreciated that if there are moving objects in the target area, the scene is considered to be changed, and a subsequent AI algorithm analysis may be performed, thereby performing step 35. If no moving object exists in the target area, the scene is considered to be static, the area image is continuously acquired, the area image is preprocessed, whether a moving object exists in the target area is judged again, and the step 31 is returned.
And step 35, carrying out image recognition on the area image. For example, AI image recognition and analysis, such as face recognition, human shape detection, etc., may be performed on the region image through an image network algorithm that is relatively computationally expensive.
And step 36, carrying out standardization processing on the image recognition result. For example, the results of the algorithmic analysis may be extracted, processed, and so on.
And step 37, performing service logic processing on the image recognition result after the standardization processing. By this step 37, processing related to the actual service, such as face comparison and the like, can be performed.
And step 38, sending the image recognition result after the business logic processing to the user terminal through the cloud server. It should be appreciated that after step 38, the AI camera may return to step 31 to continue to acquire region images to perform the image recognition process described above.
By the mode, the light-weight motion detection algorithm is added before the AI algorithm analysis, so that the resource occupation is very little, the response speed is very high, and the change sensitivity of the moving object is dynamically configurable. When a moving object exists in the target area, AI algorithm analysis is performed. In a household monitoring scene, moving objects may not exist in a target area in most of time, so that the real working time of an AI algorithm is extremely short, the analysis can be carried out only when needed, no analysis is needed, the power consumption of equipment is obviously reduced, the temperature of the equipment is obviously lower than that of a traditional AI camera, and the normal operation of the AI camera can be ensured. In addition, by carrying out AI algorithm analysis when a moving object is detected in the target area, false AI algorithm false detection reports caused by static objects such as face images and the like can be eliminated, the operation performance of the AI camera is improved, and network resources for communication between the AI camera and a user terminal are saved.
Based on the same inventive concept, the disclosed embodiments provide an image recognition apparatus, which may become part or all of an AI camera through software, hardware, or a combination of both. Fig. 4 is a block diagram illustrating an image recognition apparatus according to an exemplary embodiment. Referring to fig. 4, the apparatus includes an acquisition module 41, a detection module 42, and an identification module 43.
The acquiring module 41 is configured to acquire an area image corresponding to a target area that can be acquired by the image acquisition device.
The detection module 42 is configured to determine whether a moving object is present in the target region according to the motion detection result of the region image.
The recognition module 43 is configured to perform image recognition on the region image and determine identification information of the object moving in the target region when the object moving in the target region exists.
Optionally, the obtaining module 41 is configured to:
controlling an image acquisition device to acquire images of the target area capable of being acquired so as to obtain a plurality of area images with continuous acquisition time;
the detection module 42 is configured to:
determining the absolute value of the pixel difference between the pixel values of the corresponding positions in the area images adjacent to the acquisition time in the plurality of area images to obtain a difference area image;
and when the number of pixel points with pixel values larger than a preset pixel value in the difference region image reaches a first preset threshold value, determining that a moving object exists in the target region.
Optionally, the detection module 42 is configured to:
dividing the area image into a plurality of sub-area images, performing motion detection on each sub-area image, and determining a first motion detection result corresponding to each sub-area image;
and determining whether a moving object exists in the target area or not according to the first motion detection result corresponding to each sub-area image.
Optionally, the detection module 42 is configured to:
when the first motion detection result corresponding to each sub-area image represents that a moving object is detected, determining that the moving object exists in the target area; or
And when the number of the target sub-area images reaches a second preset threshold value, determining that a moving object exists in the target area, wherein the target sub-area images are the sub-area images of which the first motion detection result represents that the moving object is detected.
Optionally, the apparatus further comprises:
the infrared detection module is configured to perform motion detection on the target area through an infrared motion sensor to obtain a second motion detection result for representing whether a moving object exists in the target area;
the detection module 42 is configured to:
and when the first motion detection result aiming at the area image represents that a moving object exists in the target area, and the second motion detection result obtained by the infrared motion sensor represents that the moving object exists in the target area, determining that the moving object exists in the target area.
Optionally, the apparatus further comprises:
and the response detection module is used for responding to the received motion detection instruction sent by the user terminal and performing motion detection on the area image before determining whether a moving object exists in the target area according to the motion detection result of the area image.
Optionally, the apparatus further comprises:
a transmitting module configured to transmit, to a user terminal, identification information of an object obtained by image-recognizing the area image, when it is determined that the moving object exists in the target area.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Based on the same inventive concept, the present disclosure also provides a computer-readable storage medium having stored thereon computer program instructions, which, when executed by a processor, implement the steps of any of the image recognition methods provided by the present disclosure.
Based on the same inventive concept, the present disclosure also provides an electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring a region image corresponding to a target region which can be acquired by image acquisition equipment;
determining whether a moving object exists in the target area according to the motion detection of the area image;
and if the moving object exists in the target area, performing image recognition on the area image, and determining the identification information of the moving object in the target area.
Fig. 5 is a block diagram illustrating an electronic device 500 for implementing any of the above image recognition approaches according to an example embodiment. For example, the electronic device 500 may be an AI camera, a mobile phone, a computer, and the like having an image acquisition function and an AI algorithm analysis function.
Referring to fig. 5, electronic device 500 may include one or more of the following components: a processing component 502, a memory 504, a power component 506, a multimedia component 508, an audio component 510, an input/output (I/O) interface 512, a sensor component 514, and a communication component 516.
The processing component 502 generally controls overall operation of the electronic device 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to perform all or a portion of the steps of any of the image recognition methods described above. Further, the processing component 502 can include one or more modules that facilitate interaction between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.
The memory 504 is configured to store various types of data to support operations at the electronic device 500. Examples of such data include instructions, messages, pictures, videos, etc. for any application or method operating on the electronic device 500. The memory 504 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power component 506 provides power to the various components of the electronic device 500. Power components 506 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for electronic device 500.
The multimedia component 508 includes a screen that provides an output interface between the electronic device 500 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 500 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 510 is configured to output and/or input audio signals. For example, the audio component 510 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 500 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 504 or transmitted via the communication component 516. In some embodiments, audio component 510 further includes a speaker for outputting audio signals.
The I/O interface 512 provides an interface between the processing component 502 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the electronic device 500. For example, the sensor assembly 514 may detect an open/closed state of the electronic device 500, the relative positioning of components, such as a display and keypad of the electronic device 500, the sensor assembly 514 may detect a change in the position of the electronic device 500 or a component of the electronic device 500, the presence or absence of user contact with the electronic device 500, orientation or acceleration/deceleration of the electronic device 500, and a change in the temperature of the electronic device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, an infrared motion sensor, or a temperature sensor.
The communication component 516 is configured to facilitate wired or wireless communication between the electronic device 500 and other devices. The electronic device 500 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 500 may be implemented by 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), controllers, micro-controllers, microprocessors or other electronic components for performing any of the image recognition methods described above.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 504 comprising instructions, executable by the processor 520 of the electronic device 500 to perform any of the image recognition methods described above is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In another exemplary embodiment, a computer program product is also provided, which comprises a computer program executable by a programmable apparatus, the computer program having code portions for performing any of the image recognition methods described above when executed by the programmable apparatus.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (16)

1. An image recognition method, characterized in that the method comprises:
acquiring a region image corresponding to a target region which can be acquired by image acquisition equipment;
determining whether a moving object exists in the target area according to the motion detection result of the area image;
and if the moving object exists in the target area, performing image recognition on the area image, and determining the identification information of the moving object in the target area.
2. The image recognition method according to claim 1, wherein the acquiring of the area image corresponding to the target area that can be acquired by the image acquisition device comprises:
controlling the image acquisition equipment to acquire images aiming at an acquirable target area to obtain a plurality of area images with continuous acquisition time;
the determining whether a moving object exists in the target area according to the motion detection result of the area image includes:
determining the absolute value of the pixel difference between the pixel values of the corresponding positions in the area images adjacent to the acquisition time in the plurality of area images to obtain a difference area image;
and when the number of pixel points with pixel values larger than a preset pixel value in the difference region image reaches a first preset threshold value, determining that a moving object exists in the target region.
3. The image recognition method according to claim 1, wherein the determining whether a moving object exists in the target region according to the motion detection result of the region image comprises:
dividing the area image into a plurality of sub-area images, performing motion detection on each sub-area image, and determining a first motion detection result corresponding to each sub-area image;
and determining whether a moving object exists in the target area or not according to the first motion detection result corresponding to each sub-area image.
4. The image recognition method according to claim 3, wherein the determining whether there is a moving object in the target region according to the first motion detection result corresponding to each of the sub-region images comprises:
when the first motion detection result corresponding to each sub-area image represents that a moving object is detected, determining that the moving object exists in the target area; or
And when the number of the target sub-area images reaches a second preset threshold value, determining that a moving object exists in the target area, wherein the target sub-area images are the sub-area images of which the first motion detection result represents that the moving object is detected.
5. The image recognition method of any one of claims 1-4, wherein the method further comprises:
performing motion detection on the target area through an infrared motion sensor to obtain a second motion detection result for representing whether a moving object exists in the target area;
the determining whether a moving object exists in the target area according to the motion detection result of the area image includes:
and when the first motion detection result aiming at the area image represents that a moving object exists in the target area, and the second motion detection result obtained by the infrared motion sensor represents that the moving object exists in the target area, determining that the moving object exists in the target area.
6. The image recognition method according to any one of claims 1 to 4, wherein before determining whether a moving object exists in a target region based on the result of the motion detection on the region image, the method further comprises:
and responding to the received motion detection instruction sent by the user terminal, and performing motion detection on the area image.
7. The image recognition method of any one of claims 1-4, wherein the method further comprises:
and when the moving object exists in the target area, sending identification information of the object obtained by carrying out image recognition on the area image to a user terminal.
8. An image recognition apparatus, characterized in that the apparatus comprises:
the acquisition module is configured to acquire an area image corresponding to a target area which can be acquired by the image acquisition equipment;
a detection module configured to determine whether a moving object exists in the target region according to a motion detection result of the region image;
the identification module is configured to perform image identification on the area image and determine the identification information of the object moving in the target area when the object moving in the target area exists.
9. The apparatus of claim 8, wherein the acquisition module is configured to:
controlling an image acquisition device to acquire images of the target area capable of being acquired so as to obtain a plurality of area images with continuous acquisition time;
the detection module is configured to:
determining the absolute value of the pixel difference between the pixel values of the corresponding positions in the area images adjacent to the acquisition time in the plurality of area images to obtain a difference area image;
and when the number of pixel points with pixel values larger than a preset pixel value in the difference region image reaches a first preset threshold value, determining that a moving object exists in the target region.
10. The apparatus of claim 8, wherein the detection module is configured to:
dividing the area image into a plurality of sub-area images, performing motion detection on each sub-area image, and determining a first motion detection result corresponding to each sub-area image;
and determining whether a moving object exists in the target area or not according to the first motion detection result corresponding to each sub-area image.
11. The apparatus of claim 10, wherein the detection module is configured to:
when the first motion detection result corresponding to each sub-area image represents that a moving object is detected, determining that the moving object exists in the target area; or
And when the number of the target sub-area images reaches a second preset threshold value, determining that a moving object exists in the target area, wherein the target sub-area images are the sub-area images of which the first motion detection result represents that the moving object is detected.
12. The apparatus according to any one of claims 8-11, further comprising:
the infrared detection module is configured to perform motion detection on the target area through an infrared motion sensor to obtain a second motion detection result for representing whether a moving object exists in the target area;
the detection module is configured to:
and when the first motion detection result aiming at the area image represents that a moving object exists in the target area, and the second motion detection result obtained by the infrared motion sensor represents that the moving object exists in the target area, determining that the moving object exists in the target area.
13. The apparatus according to any one of claims 8-11, further comprising:
and the response detection module is used for responding to the received motion detection instruction sent by the user terminal and performing motion detection on the area image before determining whether a moving object exists in the target area according to the motion detection result of the area image.
14. The apparatus according to any one of claims 8-11, further comprising:
a transmitting module configured to transmit, to a user terminal, identification information of an object obtained by image-recognizing the area image, when it is determined that the moving object exists in the target area.
15. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring a region image corresponding to a target region which can be acquired by image acquisition equipment;
determining whether a moving object exists in the target area according to the motion detection result of the area image;
and if the moving object exists in the target area, performing image recognition on the area image, and determining the identification information of the moving object in the target area.
16. A computer-readable storage medium, on which computer program instructions are stored, which program instructions, when executed by a processor, carry out the steps of the method according to any one of claims 1 to 7.
CN202110071131.9A 2021-01-19 2021-01-19 Image recognition method and device, electronic equipment and storage medium Pending CN112802052A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110071131.9A CN112802052A (en) 2021-01-19 2021-01-19 Image recognition method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110071131.9A CN112802052A (en) 2021-01-19 2021-01-19 Image recognition method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112802052A true CN112802052A (en) 2021-05-14

Family

ID=75810501

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110071131.9A Pending CN112802052A (en) 2021-01-19 2021-01-19 Image recognition method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112802052A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106372576A (en) * 2016-08-23 2017-02-01 南京邮电大学 Deep learning-based intelligent indoor intrusion detection method and system
CN109462745A (en) * 2018-12-29 2019-03-12 维沃移动通信有限公司 A kind of white balancing treatment method and mobile terminal
CN109922310A (en) * 2019-01-24 2019-06-21 北京明略软件系统有限公司 The monitoring method of target object, apparatus and system
CN110147752A (en) * 2019-05-15 2019-08-20 浙江大华技术股份有限公司 Motion detection processing method, device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106372576A (en) * 2016-08-23 2017-02-01 南京邮电大学 Deep learning-based intelligent indoor intrusion detection method and system
CN109462745A (en) * 2018-12-29 2019-03-12 维沃移动通信有限公司 A kind of white balancing treatment method and mobile terminal
CN109922310A (en) * 2019-01-24 2019-06-21 北京明略软件系统有限公司 The monitoring method of target object, apparatus and system
CN110147752A (en) * 2019-05-15 2019-08-20 浙江大华技术股份有限公司 Motion detection processing method, device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
林培杰 等: "面向多区域视频监控的运动目标检测系统", 《液晶与显示》, vol. 30, no. 3, 30 June 2015 (2015-06-30), pages 484 - 491 *

Similar Documents

Publication Publication Date Title
KR101852284B1 (en) Alarming method and device
US9674395B2 (en) Methods and apparatuses for generating photograph
WO2022062896A1 (en) Livestreaming interaction method and apparatus
CN112037787B (en) Wake-up control method, device and computer readable storage medium
US11361586B2 (en) Method for sending warning information, storage medium and terminal
CN108154466B (en) Image processing method and device
CN105095881A (en) Method, apparatus and terminal for face identification
US11551465B2 (en) Method and apparatus for detecting finger occlusion image, and storage medium
CN106559631A (en) Method for processing video frequency and device
CN108122195B (en) Picture processing method and device
CN113055966B (en) Frequency band switching method, frequency band switching device and storage medium
CN112188091B (en) Face information identification method and device, electronic equipment and storage medium
CN107809588B (en) Monitoring method and device
CN110796012B (en) Image processing method and device, electronic equipment and readable storage medium
CN107948876B (en) Method, device and medium for controlling sound box equipment
CN108182658B (en) Image beautifying method and device
CN112802052A (en) Image recognition method and device, electronic equipment and storage medium
CN107122356B (en) Method and device for displaying face value and electronic equipment
CN115914721A (en) Live broadcast picture processing method and device, electronic equipment and storage medium
CN114189719A (en) Video information extraction method and device, electronic equipment and storage medium
CN107979695B (en) Network message receiving method and device and storage medium
CN114697515A (en) Method and device for collecting image and readable storage medium
CN114449212A (en) Object tracking method and device, electronic equipment and storage medium
CN114097217A (en) Shooting method and device
CN111724398A (en) Image display method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination