Nothing Special   »   [go: up one dir, main page]

WO2021082006A1 - Monitoring device and control method - Google Patents

Monitoring device and control method Download PDF

Info

Publication number
WO2021082006A1
WO2021082006A1 PCT/CN2019/115138 CN2019115138W WO2021082006A1 WO 2021082006 A1 WO2021082006 A1 WO 2021082006A1 CN 2019115138 W CN2019115138 W CN 2019115138W WO 2021082006 A1 WO2021082006 A1 WO 2021082006A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
camera module
processed
target object
controller
Prior art date
Application number
PCT/CN2019/115138
Other languages
French (fr)
Chinese (zh)
Inventor
舒邦懿
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2019/115138 priority Critical patent/WO2021082006A1/en
Publication of WO2021082006A1 publication Critical patent/WO2021082006A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis

Definitions

  • This application relates to the field of computer image recognition, and in particular to a monitoring device and a control method.
  • Image recognition technology is one of the classic problems in computer vision.
  • Pedestrian recognition technology can be a technology that recognizes the identity of a specific pedestrian in an image or video sequence by using computer vision technology. For example, a face image is obtained and compared with a face image in an image database, and the identity of the pedestrian corresponding to the face image can be identified through image recognition technology and the behavior trajectory of the pedestrian can be generated. Therefore, recognition technology can be widely used in fields such as smart video surveillance and smart security.
  • a camera module deployed in a monitoring device usually captures images and transmits the acquired images to a back-end server for identification and analysis through the network.
  • the transmission delay of the image is relatively large, resulting in low image processing efficiency. Therefore, how to improve image processing efficiency has become an urgent problem to be solved.
  • the present application provides a monitoring device and a control method, so that after the monitoring device acquires an image, the image processing and analysis can be performed in the monitoring device, so that the processing efficiency of the image can be improved.
  • a monitoring device including a camera module, a controller, and a processor, wherein the camera module is used to obtain images to be processed; the controller is used to send sample images to the processor; The processor is configured to perform image feature comparison between the to-be-processed image and the sample image to obtain a comparison result.
  • the above-mentioned image to be processed may include a target object.
  • the above-mentioned target object may refer to a human figure; or, it may refer to the face of a human figure; or, it may also refer to a vehicle (for example, a vehicle that has obvious characteristics and cannot recognize a license plate number); for example, , The appearance of vehicles with obvious recesses, protrusions, or scratches.
  • the above-mentioned sample image may be an image in a database; for example, the sample image may be a blacklisted face image obtained through a security system, or the sample image may be an image of a suspicious vehicle obtained, and this application does not do anything about it. limited.
  • the processor deployed in the monitoring device can perform image feature comparison on the acquired image to be processed and the sample image, so as to obtain the comparison result of the image to be processed; it is realized that the image to be processed is completed in the monitoring device During the process of acquiring, processing and analyzing the acquired images to be processed, there is no need to transmit the acquired images to be processed to a server deployed in the background for processing and analysis, thereby avoiding the delay problem introduced by the communication network and improving the processing efficiency of the images to be processed.
  • the processor and the controller may refer to the same device.
  • the foregoing processor may be a neural network processor.
  • a neural network processor can be deployed in the monitoring device, and the acquired image to be processed can be compared with the sample image through the neural network processor. Since the neural network processor includes a computing unit, The calculation time of image feature comparison can be reduced, and the calculation efficiency of image feature comparison can be improved.
  • the above-mentioned controller and processor may be deployed in an integrated chip, and the integrated chip may be called a system on a chip (system on a chip, SOC), or a part of the system on a chip.
  • SOC system on a chip
  • controller and processor may be deployed in two physically independent chips.
  • the controller can be deployed in the main control chip to execute logic programs;
  • the processor can refer to a neural network processor, and the neural network processor can be deployed in an artificial intelligence (AI) chip to execute images. Processing operation.
  • AI artificial intelligence
  • the processor is further configured to send the comparison result to the controller; the controller is configured to control the camera module according to the comparison result Whether the camera module of the dome camera in the monitor tracks and monitors the target object in the image to be processed.
  • the processor can be used to send the comparison result to the controller, so that the controller can be used to determine whether to control the dome camera module in the camera module according to the comparison result to the target object in the image to be processed Continuous tracking is realized, thereby avoiding the problem that real-time monitoring of the target object cannot be achieved when the target object is far away from the monitoring range of the camera module, and improving the safety performance of the monitoring device.
  • the comparison result is a similarity value between the image to be processed and the sample image.
  • the comparison result of the image to be processed and the sample image may be measured by the similarity value between the image feature of the image to be processed and the image feature of the sample image.
  • the similarity value of the image feature can be measured by the cosine distance between the image feature of the image to be processed and the image feature of the sample image.
  • the similarity value between the image to be processed and the sample image can be determined by the following equation:
  • the controller is further configured to: when the similarity value is greater than a preset threshold, control the dome camera module in the camera module to Tracking and monitoring the target object in the image to be processed in a rotating manner.
  • the similarity value when the similarity value is greater than or equal to the preset threshold, it can indicate that the image to be processed and the sample image include the same target object; for example, when the target object is a portrait or face image, it can indicate the monitored pedestrian It is a pedestrian in the blacklist database.
  • the dome camera module when it is determined that the similarity value between the image to be processed and the sample image is greater than the preset threshold, the dome camera module can be controlled by the controller to continuously track the target object, so as to avoid when the target object is far away from the camera module.
  • the continuous tracking mechanism of the dome camera module proposed in the embodiment of the present application can obtain more information of the target object, thereby improving the safety performance of the monitoring device.
  • the box camera module in the camera module is used to obtain the image to be processed.
  • the aforementioned camera module may be a bolt-action camera module, and the bolt-action camera module may be used to obtain images to be processed.
  • the box camera module can be a wide-angle box camera, and can also be called a wide-angle box camera or box camera.
  • the above-mentioned monitoring device may be a monitoring device that cooperates with a gun and a ball
  • the camera module may include a bolt camera module and a dome camera module, and the bolt camera module in the camera module may be Used to obtain the image to be processed.
  • the box camera in the camera module can obtain the above-mentioned to-be-processed image.
  • the dome camera module in the camera module is used to obtain the image to be processed.
  • the image to be processed includes a target object
  • the dome camera module is configured to obtain the image to be processed according to the target coordinate information of the target object
  • the target coordinate information is obtained by performing coordinate mapping on the coordinate information of the target object in the gun camera module in the camera module.
  • the controller can obtain the image according to the box camera module in the camera module.
  • the coordinate information of the target object obtains the target coordinate information of the dome camera module of the target object in the camera module; the dome camera module in the camera module can obtain the aforementioned image to be processed according to the target coordinate information.
  • the controller can be used to obtain the coordinate information of the target object in the camera module of the dome camera, and perform coordinate mapping through a preset algorithm to obtain the target coordinate information of the target object in the camera module of the dome camera, and then can control the camera module of the dome camera.
  • the group's magnification or zooming parameters, etc. enable the dome camera module to monitor the target object and obtain the to-be-processed image that meets the recognition requirements.
  • the target object in the image to be processed is a portrait.
  • a control method is provided, the control method is applied to a monitoring device, the monitoring device includes a camera module, a controller, and a processor, and the control method includes:
  • the monitoring device includes a camera module, a controller, and a processor.
  • the control method includes: the camera module obtains an image to be processed; the controller sends a sample image to the processor; The image feature comparison between the to-be-processed image and the sample image is performed to obtain a comparison result.
  • the above-mentioned image to be processed may include a target object.
  • the above-mentioned target object may refer to a human figure; or, it may refer to the face of a human figure; or, it may also refer to a vehicle (for example, a vehicle that has obvious characteristics and cannot recognize a license plate number); for example, , The appearance of vehicles with obvious recesses, protrusions or scratches.
  • the processor can perform image feature comparison on the acquired image to be processed and the sample image to obtain the comparison result of the image to be processed; the acquisition, processing and analysis of the image to be processed can be completed in the monitoring device In the process, there is no need to transmit the acquired image to be processed to a server deployed in the background for processing and analysis, thereby avoiding the delay problem introduced by the communication network and improving the processing efficiency of the image to be processed.
  • the processor and the controller may refer to the same device.
  • the foregoing processor may be a neural network processor.
  • a neural network processor can be deployed in the monitoring device, and the acquired image to be processed can be compared with the sample image through the neural network processor. Since the neural network processor includes a computing unit, The calculation time of image feature comparison can be reduced, and the calculation efficiency of image feature comparison can be improved.
  • the above-mentioned controller and processor may be deployed in an integrated chip, which may also be called a system on a chip (system on a chip, SOC), or a part of the system on a chip.
  • SOC system on a chip
  • the above-mentioned controller and processor may be deployed in two physically independent chips.
  • the controller can be deployed in the main control chip to execute logic programs;
  • the processor can refer to a neural network processor, and the neural network processor can be deployed in an artificial intelligence chip to perform operations in image processing.
  • control method further includes: the processor sends the comparison result to the controller; and the controller controls the comparison result according to the comparison result. Whether the dome camera module in the camera module tracks and monitors the target object in the image to be processed.
  • the processor may send the comparison result to the controller, so that the controller can determine whether to control the dome camera module in the camera module to continuously track the target object in the image to be processed according to the comparison result. This can avoid the problem that real-time monitoring of the target object cannot be achieved when the target object is far away from the monitoring range of the camera module, and the safety performance of the monitoring device can be improved.
  • the comparison result is a similarity value between the image to be processed and the sample image.
  • the comparison result of the image to be processed and the sample image may be measured by the similarity value between the image feature of the image to be processed and the image feature of the sample image.
  • the similarity value of the image feature can be measured by the cosine distance between the image feature of the image to be processed and the image feature of the sample image.
  • the similarity value between the image to be processed and the sample image can be determined by the following equation:
  • the controller controls whether the dome camera module in the camera module tracks and monitors the target object in the image to be processed according to the comparison result , Including: when the similarity value is greater than a preset threshold, the controller controls the dome camera module in the camera module to track and monitor the target object in the image to be processed in a rotating manner.
  • the similarity value when the similarity value is greater than or equal to the preset threshold, it can indicate that the image to be processed and the sample image include the same target object; for example, when the target object is a portrait or face image, it can indicate the monitored pedestrian It is a pedestrian in the blacklist database.
  • the dome camera module when the controller determines that the similarity value between the image to be processed and the sample image is greater than the preset threshold, the dome camera module can be controlled by the controller to continuously track the target object to avoid when the target object is far away The target object cannot be monitored during the monitoring range of the bullet camera module.
  • the continuous tracking mechanism of the dome camera module proposed in the embodiment of the present application can obtain more information about the target object, thereby improving the security performance of the monitoring device.
  • the acquiring the image to be processed by the camera module includes: acquiring the image to be processed by the box camera module in the camera module.
  • the aforementioned camera module may be a bolt-action camera module, and the bolt-action camera module may be used to obtain images to be processed.
  • the box camera module can be a wide-angle box camera, and can also be called a wide-angle box camera or box camera.
  • the above-mentioned monitoring device may be a monitoring device that cooperates with a gun and a ball
  • the camera module may include a bolt camera module and a dome camera module, and the bolt camera module in the camera module may be Used to obtain the image to be processed.
  • the gun in the camera module can obtain the above-mentioned to-be-processed image.
  • the dome camera module in the camera module is used to obtain the image to be processed.
  • the image to be processed includes a target object
  • the dome camera module is configured to obtain the image to be processed according to the target coordinate information of the target object
  • the target coordinate information is obtained by performing coordinate mapping on the coordinate information of the target object in the gun camera module in the camera module.
  • the controller can obtain the image according to the box camera module in the camera module.
  • the coordinate information of the target object obtains the target coordinate information of the dome camera module of the target object in the camera module; the dome camera module in the camera module can obtain the aforementioned image to be processed according to the target coordinate information.
  • the controller can be used to obtain the coordinate information of the target object in the camera module of the dome camera, and perform coordinate mapping through a preset algorithm to obtain the target coordinate information of the target object in the camera module of the dome camera, and then can control the camera module of the dome camera.
  • the group's magnification or zooming parameters, etc. enable the dome camera module to monitor the target object and obtain the to-be-processed image that meets the recognition requirements.
  • the target object in the image to be processed is a portrait.
  • a computer program product includes: computer program code, which when the computer program code runs on a computer, causes the computer to execute the control method in the second aspect.
  • the above-mentioned computer program code may be stored in whole or in part on a first storage medium, where the first storage medium may be packaged with the processor, or may be packaged separately with the processor.
  • first storage medium may be packaged with the processor, or may be packaged separately with the processor.
  • a computer-readable medium stores a program code, and when the computer program code runs on a computer, the computer executes the control method in the second aspect.
  • FIG. 1 is a schematic diagram of an image shooting system provided by an embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of a monitoring device provided by an embodiment of the present application.
  • Fig. 3 is a schematic diagram of a monitoring device for gun-and-ball cooperation provided by an embodiment of the present application
  • FIG. 4 is a schematic structural diagram of an integrated chip provided by an embodiment of the present application.
  • Fig. 5 is a schematic structural diagram of a neural network processor provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a processor provided by an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of a control method provided by an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of another control method provided by an embodiment of the present application.
  • Fig. 9 is a schematic flowchart of another control method provided by an embodiment of the present application.
  • Fig. 1 is a schematic diagram of an image capturing system provided by an embodiment of the present application.
  • the image capturing system 100 may include a monitoring device 110 and a server 120, where the monitoring device 110 is used to obtain a monitoring image (for example, a face image), and the server is used to receive the monitoring image sent by the monitoring device 110, And compare the image features according to the monitored images and the sample images in the database (for example, the blacklisted face image library) to obtain the comparison result.
  • a monitoring image for example, a face image
  • the server is used to receive the monitoring image sent by the monitoring device 110, And compare the image features according to the monitored images and the sample images in the database (for example, the blacklisted face image library) to obtain the comparison result.
  • the database for example, the blacklisted face image library
  • the image shooting system it is necessary to transmit the surveillance image acquired by the surveillance device to a server deployed on the back-end through a communication network, and the server performs further processing and analysis on the surveillance image.
  • the communication network is usually susceptible to factors such as the environment, which results in a large transmission delay of the surveillance image, which results in a lower efficiency of the overall image capture system in processing the surveillance image.
  • the embodiment of the present application proposes a monitoring device and a control method.
  • the processor deployed in the monitoring device can perform image feature comparison on the acquired image to be processed and the sample image, so as to obtain the comparison result of the image to be processed.
  • the process of acquiring, processing and analyzing the image to be processed in the monitoring device is realized, without the need to transmit the acquired image to be processed to a server deployed in the background for processing and analysis, thereby avoiding the delay problem introduced by the communication network. Improve the processing efficiency of the image to be processed.
  • the monitoring device provided in the embodiment of the present application can be applied to a scene of an intelligent tracing system.
  • a pedestrian photo for example, a photo of a missing child
  • the monitoring image acquired in real time within the monitoring range of the monitoring device is matched with the child's photo to realize the image matching in the monitoring range.
  • the location information of the missing child can be quickly determined within.
  • the monitoring device provided in the embodiment of the present application can be applied to a safe city scene.
  • a pedestrian photo for example, a blacklisted face photo
  • the monitoring device of the embodiment of the present application is sent to the monitoring device of the embodiment of the present application, and the monitoring image acquired in real time within the monitoring range of the monitoring device is matched with the blacklisted face photo, thereby The location information of suspicious persons can be quickly determined within the monitoring range.
  • a vehicle photo (for example, the vehicle has obvious characteristics and the license plate number cannot be recognized) is sent to the monitoring device of the embodiment of the present application; for example, a vehicle with obvious concave parts, convex parts or scratches in appearance.
  • the real-time monitoring image acquired by the monitoring device in the monitoring range is matched with the vehicle photo, so as to quickly determine the location information of the suspicious vehicle in the monitoring range.
  • the monitoring device of the embodiment of the present application will be described in detail below with reference to FIG. 2 to FIG. 5.
  • FIG. 2 is a schematic structural diagram of a monitoring device provided by an embodiment of the present application.
  • the monitoring device 200 can include a camera module 210, a controller 220, and a processor 230.
  • the camera module 210 can be used to obtain images to be processed; the controller 220 can be used to send images to the processor 230. Sample image; the processor 230 is used to perform image feature comparison between the image to be processed and the sample image to obtain a comparison result.
  • the monitoring device can be deployed at subway entrances, buildings, or road intersections, etc.
  • the monitoring device can shoot real-time road images near the monitoring device, and the road images can include pedestrian images or vehicle images.
  • the aforementioned camera module 210 may refer to a camera used to obtain images to be processed in the monitoring device 200, and the images to be processed may include a target object, where the target object may refer to a portrait, or the target object may refer to a portrait of a portrait.
  • the face, or the target object can also refer to a vehicle (for example, a vehicle that has obvious characteristics and cannot recognize a license plate number).
  • the processor may be a general-purpose processor, such as a central processing unit (CPU), or a dedicated processor, such as a graphics processing unit (GPU), or a neural network processor (neural-processing unit, GPU). network processing unit, NPU).
  • CPU central processing unit
  • GPU graphics processing unit
  • NPU neural network processor
  • the processor and the controller may refer to the same device.
  • the monitoring device 200 may be a bolt-action monitoring device, that is, the camera module 210 may refer to a bolt-action camera module; wherein, the bolt-action camera module may be used to monitor a global picture of a road.
  • the box camera module can be a wide-angle box camera, and can also be called a wide-angle box camera or box camera.
  • the image to be processed may be the image to be processed obtained by the box camera module.
  • the monitoring device 200 may be a monitoring device that cooperates with a bullet camera module and a dome camera module, and may be called a monitoring device with a bullet camera cooperation, that is, the camera module 210 may include a bullet camera. Camera module and dome camera module.
  • FIG. 3 is a schematic diagram of a monitoring device for gun-and-ball cooperation provided by an embodiment of the present application.
  • the monitoring device 300 may include a box camera module 310, a dome camera module 320, and an integrated chip 330.
  • the dome camera module 320 may refer to a dome camera, or it may be called a long camera. Focus ball machine or ball machine; the integrated chip 330 may include the controller 220 and the processor 230 shown in FIG. 2.
  • the controller 220 may be used to control the gun-camera module and the ball-camera module to monitor.
  • the controller 220 may be used to detect the first coordinate information of the object to be photographed in the box camera module, and map the first coordinate information to obtain the second coordinate information of the object to be photographed in the dome camera module.
  • the camera module of the dome camera is controlled to monitor the object to be photographed.
  • the bolt-action camera module may not be able to obtain the monitored image of pedestrian A.
  • the controller 220 may Pedestrian A’s coordinate position information in the camera module of the dome camera obtains the coordinate information of pedestrian A in the camera module of the dome camera, thereby adjusting the zoom parameters of the dome camera module and controlling the monitoring distance of the dome camera module. Group of pedestrians A farther away.
  • the image to be processed may be an image obtained by the box camera module, or the image to be processed may also be a dome camera module The captured image.
  • the box camera module in the camera module is used to obtain the above-mentioned image to be processed.
  • the gun in the camera module can be used to obtain images to be processed.
  • the dome camera module in the camera module is used to obtain the above-mentioned image to be processed.
  • the target object can be included in the image to be processed, and the dome camera module in the camera module can be used to obtain the image to be processed according to the target coordinate information of the target object.
  • the coordinate information of the target object in the gun camera module is obtained by coordinate mapping.
  • the controller can obtain The coordinate information of the target object in the camera module of the dome camera can be mapped through the preset algorithm to obtain the target coordinate information of the target object in the camera module of the dome camera, and then the magnification or zoom parameters of the camera module of the dome camera can be controlled. , So that the camera module of the dome camera can monitor the target object and obtain the to-be-processed image that meets the recognition requirements.
  • the image to be processed can be obtained through the box camera module or the dome camera module in the camera module, and the image to be processed is sent to the processor; the processor can be used to connect the image to be processed with The sample image is compared with image features to obtain the comparison result.
  • the monitoring device provided by the embodiments of the present application, the process of acquiring, processing, and analyzing the image to be processed is completed in the monitoring device, without the need to transmit the acquired image to be processed to a server deployed in the background for processing and analysis, thereby The time delay introduced by the communication network is avoided, and the processing efficiency of the image to be processed is improved.
  • a neural network may be used to perform image feature extraction and image feature comparison between the image to be processed and the sample image to obtain a comparison result.
  • the processor 230 may be further configured to send 220 the comparison result of the image feature comparison between the image to be processed and the sample image to the controller; the controller 220 may be configured to control the camera module according to the comparison result. Whether the dome camera module in the group 210 tracks and monitors the target object in the image to be processed.
  • the so-called tracking monitoring means that the dome camera module continuously monitors the target object in the image to be processed for a period of time. Specifically, the dome camera module continuously monitors the target object in the image to be processed. The camera module can track and monitor the target object in a rotating manner until the dome camera module rotates to the maximum angle and cannot rotate further for monitoring. Therefore, the dome camera module tracks the monitoring time, that is, the above period of time. It is related to the angle that the dome camera module can rotate.
  • the aforementioned comparison result may be the similarity value between the image to be processed and the sample image.
  • the processor 230 may refer to a neural network processor.
  • the neural network processor may obtain images to be processed (for example, pedestrian images) and sample patterns (for example, blacklisted face image data); Feature extraction obtains the image features of the image to be processed and the image features of the sample image; according to the image features of the image to be processed and the image features of the sample image, the similarity value of the image features is determined.
  • the similarity value of the image feature can be measured by the cosine distance between the image feature of the image to be processed and the image feature of the sample image.
  • the similarity value between the image to be processed and the sample image can be determined by the following equation:
  • the similarity value when the similarity value is less than the preset threshold, it means that the image to be processed and the sample image include different target objects; for example, when the target object is a portrait or a face image, it can indicate The monitored pedestrian is not a pedestrian in the blacklist database.
  • the similarity value is greater than or equal to the preset threshold, it means that the image to be processed and the sample image include the same target object; for example, when the target object is a portrait or face image, it can indicate that the monitored pedestrian is a blacklist Pedestrians in the library.
  • the controller 220 may control the dome camera module in the camera module to track and monitor the target object in the image to be processed in a rotating manner.
  • the dome camera module when it is determined that the similarity value between the image to be processed and the sample image is greater than the preset threshold, the dome camera module can be controlled by the controller to continuously track the target object, so as to avoid when the target object is far away from the gun.
  • the continuous tracking mechanism of the dome camera module proposed in the embodiment of this application, more information about the target object can be obtained, thereby improving the security performance of the monitoring device and improving the efficiency of solving crimes. .
  • FIG. 4 is a schematic structural diagram of an integrated chip provided by an embodiment of the present application.
  • the integrated chip 400 may include a controller 410 and a processor 420, where the controller 410 may be used to execute logic programs in the monitoring device 200; the processor 420 may be used to execute operations in image processing .
  • the integrated chip 400 may be the integrated chip 330 as shown in FIG. 3.
  • the integrated chip shown in FIG. 4 may be called a system on a chip (system on a chip, SOC), or a part of a system on a chip.
  • SOC system on a chip
  • controller 220 and the processor 230 may also be deployed in two physically independent chips, which is not limited in this application.
  • the controller 220 may be deployed in a main control chip to execute logic programs; the processor 230 may refer to a neural network processor, and the neural network processor may be deployed in an artificial intelligence (AI) chip for Perform calculations in image processing; among them, the main control chip and the AI chip can be two physically independent chips.
  • AI artificial intelligence
  • Fig. 5 is a schematic structural diagram of a neural network processor provided by an embodiment of the present application.
  • the core part of the neural network processor 500 is the arithmetic circuit 503, and the controller 504 controls the arithmetic circuit 503 to extract the data in the memory (weight memory or input memory) and perform calculations .
  • the arithmetic circuit 503 includes multiple processing units (process engines, PE). In some implementations, the arithmetic circuit 503 is a two-dimensional systolic array. The arithmetic circuit 503 may also be a one-dimensional systolic array or other electronic circuit capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit 503 is a general-purpose matrix processor.
  • the arithmetic circuit 503 fetches the data corresponding to matrix B from the weight memory 502 and caches it on each PE in the arithmetic circuit 503.
  • the arithmetic circuit 503 fetches the matrix A data and matrix B from the input memory 501 to perform matrix operations, and the partial result or final result of the obtained matrix is stored in an accumulator 508 (accumulator).
  • the vector calculation unit 507 can perform further processing on the output of the arithmetic circuit 503, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, and so on.
  • the vector calculation unit 507 can be used for network calculations in the non-convolutional/non-FC layer of the neural network, such as pooling, batch normalization, local response normalization, etc. .
  • the vector calculation unit 507 can store the processed output vector to the unified memory 506.
  • the vector calculation unit 507 may apply a nonlinear function to the output of the arithmetic circuit 503, such as a vector of accumulated values, to generate the activation value.
  • the vector calculation unit 507 generates a normalized value, a combined value, or both.
  • the processed output vector can be used as an activated input to the arithmetic circuit 503, for example, for use in a subsequent layer in a neural network.
  • the unified memory 506 is used to store input data and output data.
  • the weight data directly passes through the storage unit access controller 505 (direct memory access controller, DMAC) to store the input data in the external memory into the input memory 501 and/or unified memory 506, and the weight data in the external memory into the weight memory 502 , And store the data in the unified memory 506 into the external memory.
  • DMAC direct memory access controller
  • the bus interface unit 510 (bus interface unit, BIU) is used to implement interaction with the instruction fetch memory 509 through a bus.
  • the instruction fetch buffer 509 (instruction fetch buffer) connected to the controller 504 is used to store instructions used by the controller 504.
  • the controller 504 is used to call the instructions cached in the instruction fetch memory 509 to control the working process of the computing accelerator.
  • the unified memory 506, the input memory 501, the weight memory 502, and the instruction fetch memory 509 are all on-chip (On-Chip) memories.
  • the external memory is a memory external to the NPU.
  • the external memory can be a double data rate synchronous dynamic random access memory.
  • Memory double data rate synchronous dynamic random access memory, DDR SDRAM), high bandwidth memory (HBM) or other readable and writable memory.
  • the neural network processor may include the above-mentioned arithmetic circuit 503 or the vector calculation unit 507, when the neural network processor performs matrix operations in image processing, for example, image feature extraction and image feature extraction are performed on the image to be processed and the sample image. The calculation efficiency is higher when comparing features.
  • the processor shown in FIG. 6 may be a neural network processor, and the neural network processor and the controller may be respectively deployed in the main control chip and the NPU chip.
  • the NPU chip can include a CPU and a matrix calculation unit, where the CPU can be used to perform processing logic during image feature comparison; the matrix calculation unit can be used to perform matrix operations during image feature comparison ;
  • the main control chip can be used for image management.
  • the main control chip can be used to obtain images in the database, such as blacklisted face images obtained through the security system, or blacklisted vehicle images;
  • the NPU chip can receive the main The database image sent by the control chip and the image to be processed taken by the camera module, the CPU in the NPU chip can be used to control the matrix calculation unit to start performing image comparison;
  • the matrix calculation unit can be used to obtain the image to be processed taken by the camera module Load the image characteristics of the image into the left matrix of the matrix calculation unit, load the blacklist image characteristics into the right matrix of the matrix calculation unit, and obtain the face similarity through the matrix multiplication and addition operation.
  • FIG. 6 takes the NPU chip including the CPU and the matrix calculation unit as an example for illustration.
  • the NPU may not include the CPU.
  • the NPU chip may be connected to a CPU deployed outside the NPU chip.
  • the similarity determination may be performed in the NPU chip including the CPU.
  • the matrix calculation unit in the NPU chip can be used to perform matrix operations on the image features of the image to be processed and the image features of the blacklist image to obtain the similarity value (for example, the cosine distance) between the image features;
  • the NPU chip includes The CPU can be used to compare the magnitude of the similarity value (for example, the cosine distance) with a preset threshold; when the similarity value is less than the preset threshold, it can indicate that the image to be processed and the blacklist image include different target objects. When the similarity value is greater than or equal to the preset threshold, it can indicate that the image to be processed and the blacklist image include the same target object.
  • the NPU chip can send the similarity value to the main control chip, and the main control chip can control the dome camera module in the camera module to track and monitor the image in the image to be processed in a rotating manner. target.
  • the similarity determination may also be performed in the main control chip.
  • the matrix calculation unit in the NPU chip can be used to perform matrix operations on the image features of the image to be processed and the image features of the blacklisted image to obtain the similarity value (for example, cosine distance) between the image features; and the similarity value Send to the main control chip, the main control chip executes the comparison between the similarity value and the preset threshold.
  • the main control chip can control whether the dome camera module in the camera module tracks and monitors the target in the image to be processed according to the similarity value Object. For example, when the similarity value is greater than the preset threshold, the main control chip can control the dome camera module in the camera module to track and monitor the target object in the image to be processed in a rotating manner.
  • the matrix calculation unit shown in FIG. 6 may be the arithmetic circuit 503 or the vector calculation unit 507 shown in FIG. 5.
  • the monitoring device in the embodiment of the present application can execute the following control method of the embodiment of the present application, that is, for the specific working process of the above various monitoring devices, refer to the corresponding process in the following method embodiment.
  • Fig. 7 is a schematic diagram of a control method provided by an embodiment of the present application.
  • the control method shown in FIG. 7 may be applied to a monitoring device, and the monitoring device may include a camera module, a controller, and a processor.
  • control method 600 shown in FIG. 7 may be applied to the monitoring device shown in FIG. 2 or FIG. 3 described above.
  • the control method shown in FIG. 7 includes steps 610 to 630, and these steps are respectively described in detail below.
  • Step 610 The camera module obtains an image to be processed.
  • the monitoring device may be deployed at a subway entrance, a building, or a road intersection, and the image to be processed may be a picture within a monitoring range captured by the monitoring device through a camera module.
  • the image to be processed may include a target object; where the target object may refer to an object whose recognition result obtained by a recognition algorithm is unstructured data.
  • the target object may refer to a portrait, or the target object may refer to the face of a portrait, or the target object may also refer to a vehicle; for example, a vehicle that has obvious characteristics and cannot recognize a license plate number.
  • the above-mentioned vehicle with obvious characteristics and unable to identify the license plate number may refer to a vehicle with obvious recessed parts, raised parts or scratches in appearance.
  • Step 620 The controller may send the sample image to the processor.
  • the sample image may be an image in the database; for example, the sample image may be a blacklisted face image obtained through a security system, or the sample image may be an image of a suspicious vehicle obtained, which is not limited in this application.
  • the sample image may refer to a blacklisted face image in the database or a sample image of a pedestrian to be identified.
  • the sample images may be vehicle images in a database or sample images of vehicles that need to be identified.
  • Step 630 The processor may perform image feature comparison between the image to be processed and the sample image to obtain a comparison result.
  • the processor may receive the sample image sent by the controller and the image to be processed taken by the camera module, and compare the features of the image to be processed and the sample image to obtain the comparison result of the image to be processed and the sample image, thereby Identify the target object included in the image to be processed.
  • the aforementioned monitoring device may be a bolt-action monitoring device, that is, the camera module may refer to a bolt-action camera module; the bolt-action camera module may be a wide-angle bolt-action camera, or it may be called a wide-angle gun Machine or box camera.
  • the image to be processed in step 610 may be an image obtained by the box camera module.
  • the above-mentioned monitoring device may be a monitoring device that cooperates with the camera module of the bullet camera and the camera module of the dome camera, and may be called the monitoring device of the cooperation of the bullet camera, namely the camera module. It can include a box camera camera module and a ball camera camera module.
  • the image to be processed in the above step 610 may be an image obtained by the box camera module, or may also be an image obtained by the dome camera module .
  • the box camera module in the camera module obtains the above-mentioned image to be processed.
  • the gun in the camera module can obtain the above-mentioned to-be-processed image.
  • the dome camera module in the camera module is used to obtain the above-mentioned image to be processed.
  • the target object can be included in the image to be processed, and the dome camera module in the camera module can be used to obtain the image to be processed according to the target coordinate information of the target object.
  • the coordinate information of the target object in the gun camera module is obtained by coordinate mapping.
  • the controller can obtain The coordinate information of the target object in the camera module of the dome camera can be mapped through the preset algorithm to obtain the target coordinate information of the target object in the camera module of the dome camera, and then the magnification or zoom parameters of the camera module of the dome camera can be controlled. , So that the camera module of the dome camera can monitor the target object and obtain the to-be-processed image that meets the recognition requirements.
  • the image to be processed can be obtained through the box camera module or the dome camera module in the camera module, and the image to be processed is sent to the processor; the processor can be used to connect the image to be processed with The sample image is compared with image features to obtain the comparison result.
  • a neural network may be used to perform image feature extraction and image feature comparison between the image to be processed and the sample image to obtain a comparison result.
  • control method may further include: the processor may send a comparison result to the controller; the controller may control whether the dome camera module in the camera module tracks and monitors the target object in the image to be processed according to the comparison result.
  • the aforementioned comparison result may refer to the similarity value between the image to be processed and the sample image.
  • the neural network processor can first obtain images to be processed (for example, pedestrian images) and sample patterns (for example, blacklisted face image data), and then perform image feature extraction on the images to be processed and sample images to obtain Image features and image features of the sample image; according to the image features of the image to be processed and the image features of the sample image, determine the similarity value of the image features.
  • images to be processed for example, pedestrian images
  • sample patterns for example, blacklisted face image data
  • the similarity value of the image feature can be measured by the cosine distance between the image feature of the image to be processed and the image feature of the sample image.
  • the similarity value between the image to be processed and the sample image can be determined by the following equation:
  • the controller may compare the received similarity value with a preset threshold.
  • the similarity value is less than the preset threshold, it means that the image to be processed and the sample image include different target objects; for example, when the target When the object is a portrait or a face image, it can indicate that the monitored pedestrian is not a pedestrian in the blacklist database.
  • the similarity value is greater than or equal to the preset threshold, it means that the image to be processed and the sample image include the same target object; for example, when the target object is a portrait or face image, it can indicate that the monitored pedestrian is a blacklist Pedestrians in the library.
  • the controller may control the dome camera module in the camera module to track and monitor the target object in the image to be processed in a rotating manner.
  • the processor may compare the similarity value with a preset threshold value, and send the comparison result to the controller.
  • the dome camera module when it is determined that the similarity value between the image to be processed and the sample image is greater than the preset threshold, the dome camera module can be controlled by the controller to continuously track the target object, so as to avoid when the target object is far away from the gun.
  • the continuous tracking mechanism of the dome camera module proposed in the embodiment of this application, more information about the target object can be obtained, thereby improving the security performance of the monitoring device and improving the efficiency of solving crimes. .
  • the image acquired by the camera module can be the image acquired by the box camera module, or the image acquired by the camera module can also be the image acquired by the dome camera module. The different possible situations are explained in detail.
  • Fig. 8 is a schematic diagram of a control method provided by an embodiment of the present application. This control method can be applied to a monitoring device for gun-and-ball cooperation.
  • the control method 700 shown in FIG. 8 includes steps 701 to 710, and these steps are respectively described in detail below.
  • control method shown in FIG. 8 is illustrated by taking the target object in the acquired image to be processed as a portrait.
  • the control method shown in FIG. 8 can also be applied to a to-be-processed image that includes other target objects, where the target object may refer to an object whose recognition result obtained by a recognition algorithm is unstructured data.
  • Step 701 The controller may send a coordinate system synchronization request to the bolt camera module.
  • Step 702 The controller may send a coordinate system synchronization request to the bolt camera module.
  • step 701 and 702 it is possible to request the bolt camera module and the dome camera module to realize the synchronization of the coordinate system.
  • the above steps 701 and 702 can be performed at the same time, or step 702 can be performed first.
  • Step 701 is executed again, and the execution sequence of step 701 and step 702 is not limited in this application.
  • the box camera module and the dome camera module can be integrated into the body of the all-in-one camera, and can communicate with the controller and the NPU; the above controller and the NPU can be integrated in the same chip Or, the controller and NPU can also be deployed in two physically independent chips.
  • Step 703 The box camera module may send the coordinate system synchronization success to the controller.
  • Step 704 The dome camera module may send the coordinate system synchronization success to the controller.
  • steps 703 and 704 may be performed at the same time, or step 704 may be performed first, and then step 703 may be performed.
  • the present application does not limit the execution order of step 703 and step 704 in any way.
  • Step 705 The controller sends sample data to the NPU.
  • sample data may refer to sample images.
  • the sample data may refer to a blacklisted image library; for example, it may be a blacklisted face image, or it may also be a blacklisted vehicle image.
  • the above-mentioned sample data may refer to blacklist image features obtained after feature extraction of the sample image through a neural network algorithm.
  • sample data sent by the controller to the NPU may be the original blacklist image, or may be image features obtained after feature extraction on the blacklist database, and this application does not make any limitation on this.
  • Step 706 The box camera module may send an image (for example, an image to be processed) to the NPU.
  • an image for example, an image to be processed
  • the above-mentioned image may be an image taken by the box camera module within the monitoring range.
  • the target object may be included in the image.
  • the target object may be a human face, or the target object may be a vehicle with obvious characteristics and an unrecognizable license plate number.
  • the image can be processed in the NPU through the detection network, the tracking network, and the image selection network.
  • the detection network is used to obtain the coordinates of the portrait in the image
  • the tracking network is used to mark the portrait in the image
  • the image selection network is used to evaluate the image quality and determine the image with better image quality.
  • detection network may be different algorithms executed in the NPU.
  • the NPU receives multi-frame images sent by the box camera module, and the detection network can detect the coordinates of the portrait in each frame of the multi-frame image; the tracking network can detect the portrait of the same pedestrian in the multi-frame image Marking; the image selection network can evaluate the image quality of multi-frame images and select the optimal frame image, that is, the image that needs to be recognized can be determined from the multi-frame image.
  • step 707 is executed.
  • Step 707 The NPU chip performs face comparison to determine the similarity value.
  • the sample data sent by the controller to the NPU may be a sample image
  • the NPU may perform image feature extraction on the portrait and the sample image in the image (for example, the above-mentioned optimal frame image) to obtain image features and samples of the portrait
  • the image characteristics of the image according to the image characteristics of the portrait and the image characteristics of the sample image, the similarity value of the image characteristics is determined.
  • the sample data sent by the controller to the NPU may be sample image features obtained through a neural network algorithm, and the NPU may use the same neural network algorithm to image the portrait in the image (for example, the above-mentioned optimal frame image).
  • Feature extraction to obtain the image features of the portrait according to the image features of the portrait and the image features of the sample image, determine the similarity value of the image features.
  • the aforementioned portrait may also refer to a face image.
  • the similarity value of the image feature can be measured by the cosine distance between the image feature of the portrait and the image feature of the sample image.
  • the similarity value between the image to be processed and the sample image can be determined by the following equation:
  • Step 708 The NPU sends the similarity value to the controller.
  • Step 709 The controller determines whether to continuously track the target object.
  • the controller compares the preset threshold with the similarity value.
  • the similarity value is less than the preset threshold, it means that the image to be processed and the sample image include different portraits, which can indicate that the monitored pedestrian is not black.
  • Pedestrians in the list library when the similarity value is greater than or equal to the preset threshold, it means that the portrait in the image to be processed and the sample image include the same portrait, which can indicate that the monitored pedestrian is a pedestrian in the blacklist library.
  • Step 710 When the similarity value is greater than or equal to the preset threshold, the controller controls the dome camera module to continuously track the target object.
  • the controller can immediately send an alarm instruction and control the dome camera module to continuously track the target object.
  • the image to be processed is the image obtained by the box camera module in the camera module.
  • the following is a detailed description of the dome camera module in the camera module. The embodiment of processing the image will be described in detail.
  • Fig. 9 is a schematic diagram of a control method provided by an embodiment of the present application. This control method can be applied to a monitoring device for gun-and-ball cooperation.
  • the control method 800 shown in FIG. 9 includes steps 801 to 815, and these steps are respectively described in detail below.
  • control method shown in FIG. 9 is illustrated by taking the target object in the acquired image to be processed as a portrait.
  • the control method shown in FIG. 9 is also applied to a to-be-processed image including other target objects, where the target object may refer to an object whose recognition result obtained by a recognition algorithm is unstructured data.
  • Step 801 The controller may send a coordinate system synchronization request to the bolt camera module.
  • Step 802 The controller may send a coordinate system synchronization request to the bolt camera module.
  • step 801 and 802 the bolt camera module and the dome camera module can be requested to synchronize the coordinate system.
  • the above steps 801 and 802 can be executed at the same time, or step 802 can be executed first. , Step 801 is executed again, and the execution sequence of step 801 and step 802 is not limited in this application.
  • the box camera module and the dome camera module can be integrated into the body of the all-in-one camera, and can communicate with the controller and the NPU; the above controller and the NPU can be integrated in the same chip Or, the controller and NPU can also be deployed in two physically independent chips.
  • Step 803 The box camera module may send the coordinate system synchronization success to the controller.
  • Step 804 The dome camera module may send the coordinate system synchronization success to the controller.
  • step 803 and step 804 may be performed at the same time, or step 804 may be performed first, and then step 803 may be performed.
  • the present application does not limit the execution order of step 803 and step 804 in any way.
  • Step 805 The controller sends sample data to the NPU.
  • sample data may refer to sample images.
  • blacklisted image library for example, it may be a blacklisted face image, or it may also be a blacklisted vehicle image.
  • the above-mentioned sample data may refer to blacklist image features obtained after feature extraction of the sample image through a neural network algorithm.
  • sample data sent by the controller to the NPU may be the original blacklist image, or may be image features obtained after feature extraction on the blacklist database, and this application does not make any limitation on this.
  • Step 806 The box camera module may send the first image to the NPU.
  • the first image may be an image taken by the box camera module within the monitoring range.
  • Step 807 The NPU detects the portrait coordinates in the first image.
  • the NPU may send the portrait coordinates in the first image obtained through the detection network to the controller, and the controller then controls the dome camera module to obtain the image of the pedestrian.
  • Step 808 The NPU sends the portrait coordinates in the first image to the controller.
  • the controller can obtain the target coordinate information of the portrait in the dome camera module through coordinate mapping according to the portrait coordinates in the acquired first image.
  • Step 809 The controller sends target coordinate information to the camera module of the dome camera.
  • Step 810 The camera module of the dome camera performs omni-directional movement of the pan/tilt, lens zoom, and zoom control (Pan/Tilt/Zoom, PTZ) adjustments according to the target coordinates.
  • the dome camera module obtains an image of the target after being adjusted to the best monitoring position through translation, rotation, and zooming according to the target coordinate information.
  • Step 811 The dome camera module may send the second image to the NPU.
  • the NPU can process the acquired multi-frame second image through the detection network, the tracking network, and the image selection network to obtain the optimal frame image in the multi-frame second image; the specific processing flow can be seen in Figure 8 above Step 706 is not repeated here.
  • the optimal frame image among the multiple frames of second images may be identified, that is, step 812 is performed.
  • Step 812 The NPU performs face comparison and determines the similarity value.
  • the sample data sent by the controller to the NPU may be a sample image
  • the NPU may perform image feature extraction on the portrait and the sample image in the second image (for example, the optimal frame image in the multi-frame second image) , Get the image features of the portrait and the image features of the sample image; determine the similarity value of the image features according to the image features of the portrait and the image features of the sample image.
  • the sample data sent by the controller to the NPU may be sample image features obtained through a neural network algorithm, and the NPU may use the same neural network algorithm to extract image features of the portrait in the second image to obtain the image of the portrait Features: Determine the similarity value of the image features according to the image features of the portrait and the image features of the sample image.
  • the aforementioned portrait may also refer to a face image.
  • the cosine distance between the image feature of the portrait and the image feature of the sample image can be used to measure the similarity value of the image feature.
  • the similarity value between the image to be processed (for example, the second image) and the sample image can be determined by the following equation:
  • Step 813 The NPU sends the similarity value to the controller.
  • Step 814 The controller determines whether to continuously track the target object.
  • the controller compares the preset threshold with the similarity value.
  • the similarity value is less than the preset threshold, it means that the portrait in the second image and the sample image include different portraits, which can indicate that the monitored pedestrian is not a blacklist.
  • Pedestrians in the library when the similarity value is greater than or equal to the preset threshold, it means that the portrait in the second image and the sample image include the same portrait, which can indicate that the monitored pedestrian is a pedestrian in the blacklist library.
  • Step 815 When the similarity value is greater than or equal to the preset threshold, the controller may control the dome camera module to continuously track the target object.
  • the controller can immediately send an alarm instruction and control the dome camera module to continuously track the target object.
  • the image to be processed can be obtained through the box camera module or the dome camera module in the camera module, and the image to be processed is sent to the neural network processor; the neural network processor can be used for Perform image feature comparison between the image to be processed and the sample image to obtain the comparison result.
  • the camera module of the dome camera can be controlled by the controller to continuously track the target object, so as to avoid being used as the target object.
  • the continuous tracking mechanism of the dome camera module proposed in the embodiment of this application can obtain more information about the target object, thereby improving the security performance of the monitoring device .
  • the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not correspond to the embodiments of the present application.
  • the implementation process constitutes any limitation.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional modules in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disks or optical disks and other media that can store program codes. .

Landscapes

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

Abstract

A monitoring device (110) and a control method. The monitoring device (110) comprises a photographing module (210), a controller (220), and a processor (230), wherein the photographing module (210) is used for obtaining an image to be processed; the controller (220) is used for sending a sample image to the processor (230); and the processor (230) is used for performing image feature comparison on the image to be processed and the sample image so as to obtain a comparison result. Therefore, processing and analysis of the image to be processed can be performed in the monitoring device (110), thereby avoiding the problem of long delay when the image to be processed is transmitted to a background server (120) for processing, and the processing efficiency of the image to be processed can be improved.

Description

监控装置以及控制方法Monitoring device and control method 技术领域Technical field
本申请涉及计算机图像识别领域,尤其涉及一种监控装置以及控制方法。This application relates to the field of computer image recognition, and in particular to a monitoring device and a control method.
背景技术Background technique
图像识别技术是计算机视觉中的经典问题之一。行人识别技术可以是通过利用计算机视觉技术判断图像或者视频序列中特定行人的人脸图像识别该行人身份的技术。例如,获取一张人脸图像与图像数据库中的人脸图像进行比对,通过图像识别技术可以识别该人脸图像对应的行人身份并生成该行人的行为轨迹。因此,识别技术可以广泛应用于智能视频监控、智能安保等领域。Image recognition technology is one of the classic problems in computer vision. Pedestrian recognition technology can be a technology that recognizes the identity of a specific pedestrian in an image or video sequence by using computer vision technology. For example, a face image is obtained and compared with a face image in an image database, and the identity of the pedestrian corresponding to the face image can be identified through image recognition technology and the behavior trajectory of the pedestrian can be generated. Therefore, recognition technology can be widely used in fields such as smart video surveillance and smart security.
随着科学技术水平的不断发展、安防监控的重要性不断提升,越来越多的功能集成在监控装置上。目前,通常由部署于监控装置中摄像模组进行图像的拍摄并通过网络将获取的图像传输至后台服务器中进行识别以及分析处理。但是,由于受到传输环境等因素的影响,造成图像的传输时延较大,导致图像的处理效率较低。因此,如何提升图像的处理效率,成为一个亟需解决的问题。With the continuous development of science and technology and the increasing importance of security monitoring, more and more functions are integrated in the monitoring device. Currently, a camera module deployed in a monitoring device usually captures images and transmits the acquired images to a back-end server for identification and analysis through the network. However, due to the influence of factors such as the transmission environment, the transmission delay of the image is relatively large, resulting in low image processing efficiency. Therefore, how to improve image processing efficiency has become an urgent problem to be solved.
发明内容Summary of the invention
本申请提供一种监控装置以及控制方法,使得监控装置获取图像后可以在监控装置中进行图像的处理与分析,从而能够提升图像的处理效率。The present application provides a monitoring device and a control method, so that after the monitoring device acquires an image, the image processing and analysis can be performed in the monitoring device, so that the processing efficiency of the image can be improved.
第一方面,提供了一种监控装置,包括摄像模组、控制器以及处理器,其中,所述摄像模组用于获取待处理图像;所述控制器用于向所述处理器发送样本图像;所述处理器用于对所述待处理图像与所述样本图像进行图像特征对比以得到对比结果。In a first aspect, a monitoring device is provided, including a camera module, a controller, and a processor, wherein the camera module is used to obtain images to be processed; the controller is used to send sample images to the processor; The processor is configured to perform image feature comparison between the to-be-processed image and the sample image to obtain a comparison result.
其中,上述待处理图像中可以包括目标对象。Wherein, the above-mentioned image to be processed may include a target object.
在一种可能的实现方式中,上述目标对象可以是指人像;或者,可以是指人像的脸部;或者,还可以是指车辆(例如,具有明显特征且无法识别车牌号码的车辆);比如,外观具有明显的凹陷部分、凸起部分,或者划痕的车辆。In a possible implementation manner, the above-mentioned target object may refer to a human figure; or, it may refer to the face of a human figure; or, it may also refer to a vehicle (for example, a vehicle that has obvious characteristics and cannot recognize a license plate number); for example, , The appearance of vehicles with obvious recesses, protrusions, or scratches.
示例性地,上述样本图像可以是数据库中的图像;比如,样本图像可以是通过安防系统获取的黑名单人脸图像,或者,样本图像可以是获取的可疑车辆的图像,本申请对此不作任何限定。Exemplarily, the above-mentioned sample image may be an image in a database; for example, the sample image may be a blacklisted face image obtained through a security system, or the sample image may be an image of a suspicious vehicle obtained, and this application does not do anything about it. limited.
在本申请的实施例中,通过监控装置中部署的处理器可以对获取的待处理图像以及样本图像进行图像特征对比,从而得到待处理图像的对比结果;实现了在监控装置中完成待处理图像的获取、处理以及分析的过程,无需将获取的待处理图像传输至部署于后台的服务器中进行处理与分析,从而避免了通信网络引入的时延问题,提高了待处理图像的处理效率。In the embodiment of the present application, the processor deployed in the monitoring device can perform image feature comparison on the acquired image to be processed and the sample image, so as to obtain the comparison result of the image to be processed; it is realized that the image to be processed is completed in the monitoring device During the process of acquiring, processing and analyzing the acquired images to be processed, there is no need to transmit the acquired images to be processed to a server deployed in the background for processing and analysis, thereby avoiding the delay problem introduced by the communication network and improving the processing efficiency of the images to be processed.
在一种可能的实现方式中,在上述处理器为中央处理器CPU的情况下,处理器与控 制器可以是指同一个器件。In a possible implementation manner, in the case where the foregoing processor is a central processing unit (CPU), the processor and the controller may refer to the same device.
在一种可能的实现方式中,上述处理器可以是神经网络处理器。In a possible implementation manner, the foregoing processor may be a neural network processor.
在本申请的实施例中,可以在监控装置中部署神经网络处理器,通过神经网络处理器可以对获取的待处理图像与样本图像进行图像特征对比,由于神经网络处理器中包括计算单元,因此可以减小图像特征对比的运算时间,提高图像特征对比的计算效率。In the embodiment of the present application, a neural network processor can be deployed in the monitoring device, and the acquired image to be processed can be compared with the sample image through the neural network processor. Since the neural network processor includes a computing unit, The calculation time of image feature comparison can be reduced, and the calculation efficiency of image feature comparison can be improved.
在一种可能的实现方式中,上述控制器与处理器可以部署在集成芯片中,集成芯片又可以被称作片上系统(system on a chip,SOC),或者是片上系统的一部分。In a possible implementation manner, the above-mentioned controller and processor may be deployed in an integrated chip, and the integrated chip may be called a system on a chip (system on a chip, SOC), or a part of the system on a chip.
在另一种可能的实现方式中,上述控制器与处理器可以部署在两个物理独立的芯片中。In another possible implementation manner, the above-mentioned controller and processor may be deployed in two physically independent chips.
例如,控制器可以部署于主控芯片中,用于执行逻辑程序;处理器可以是指神经网络处理器,神经网络处理器可以部署于人工智能(artificial intelligence,AI)芯片中,用于执行图像处理中的运算。For example, the controller can be deployed in the main control chip to execute logic programs; the processor can refer to a neural network processor, and the neural network processor can be deployed in an artificial intelligence (AI) chip to execute images. Processing operation.
结合第一方面,在第一方面的某些实现方式中,所述处理器还用于向所述控制器发送所述对比结果;所述控制器用于根据所述对比结果控制所述摄像模组中的球机摄像模组是否跟踪监控所述待处理图像中的目标对象。With reference to the first aspect, in some implementations of the first aspect, the processor is further configured to send the comparison result to the controller; the controller is configured to control the camera module according to the comparison result Whether the camera module of the dome camera in the monitor tracks and monitors the target object in the image to be processed.
在本申请的实施例中,处理器可以用于将对比结果发送至控制器,从而控制器可以用于根据对比结果确定是否控制摄像模组中的球机摄像模组对待处理图像中的目标对象实现持续跟踪,从而能够避免在目标对象远离摄像模组的监控范围时无法实现实时监控目标对象的问题,提升监控装置的安全性能。In the embodiment of the present application, the processor can be used to send the comparison result to the controller, so that the controller can be used to determine whether to control the dome camera module in the camera module according to the comparison result to the target object in the image to be processed Continuous tracking is realized, thereby avoiding the problem that real-time monitoring of the target object cannot be achieved when the target object is far away from the monitoring range of the camera module, and improving the safety performance of the monitoring device.
结合第一方面,在第一方面的某些实现方式中,所述对比结果为所述待处理图像与所述样本图像的相似度值。With reference to the first aspect, in some implementation manners of the first aspect, the comparison result is a similarity value between the image to be processed and the sample image.
在本申请的实施例中,待处理图像与样本图像的对比结果可以通过待处理图像的图像特征与样本图像的图像特征之间的相似度值进行度量。In the embodiment of the present application, the comparison result of the image to be processed and the sample image may be measured by the similarity value between the image feature of the image to be processed and the image feature of the sample image.
示例性地,可以通过待处理图像的图像特征与样本图像的图像特征之间的余弦距离来度量图像特征的相似度值。Exemplarily, the similarity value of the image feature can be measured by the cosine distance between the image feature of the image to be processed and the image feature of the sample image.
例如,可以通过以下等式确定待处理图像与样本图像的相似度值:For example, the similarity value between the image to be processed and the sample image can be determined by the following equation:
Figure PCTCN2019115138-appb-000001
Figure PCTCN2019115138-appb-000001
其中,i可以表示第i个图像特征;n可以表示图像特征的数量;A可以表示待处理图像特征;B可以表示样本图像特征;A i可以表示待处理图像中第i个图像特征;B i可以表示样本图像中第i个图像特征,即样本图像中与A i对应的图像特征。 Among them, i can represent the i-th image feature; n can represent the number of image features; A can represent the image feature to be processed; B can represent the sample image feature; A i can represent the i-th image feature in the image to be processed; B i may represent the i-th sample image features of the image, i.e., image features with sample image corresponding to the a i.
结合第一方面,在第一方面的某些实现方式中,所述控制器还用于:在所述相似度值大于预设阈值时,控制所述摄像模组中的球机摄像模组以转动的方式跟踪监控所述待处理图像中的目标对象。With reference to the first aspect, in some implementations of the first aspect, the controller is further configured to: when the similarity value is greater than a preset threshold, control the dome camera module in the camera module to Tracking and monitoring the target object in the image to be processed in a rotating manner.
例如,当相似度值大于或等于预设阈值时,则可以说明待处理图像与样本图像中包括相同的目标对象;比如,当目标对象为人像,或者人脸图像时,则可以表明监控的行人是黑名单库中的行人。For example, when the similarity value is greater than or equal to the preset threshold, it can indicate that the image to be processed and the sample image include the same target object; for example, when the target object is a portrait or face image, it can indicate the monitored pedestrian It is a pedestrian in the blacklist database.
在本申请的实施例中,在确定待处理图像与样本图像的相似度值大于预设阈值的情况 下,可以通过控制器控制球机摄像模组持续跟踪目标对象,避免当目标对象远离摄像模组的监控范围时无法监控目标对象的问题,通过本申请实施例提出的球机摄像模组的持续跟踪机制可以获取目标对象的更多信息,从而提升监控装置的安全性能。In the embodiment of the present application, when it is determined that the similarity value between the image to be processed and the sample image is greater than the preset threshold, the dome camera module can be controlled by the controller to continuously track the target object, so as to avoid when the target object is far away from the camera module. The problem that the target object cannot be monitored in the monitoring range of the group, the continuous tracking mechanism of the dome camera module proposed in the embodiment of the present application can obtain more information of the target object, thereby improving the safety performance of the monitoring device.
结合第一方面,在第一方面的某些实现方式中,所述摄像模组中的枪机摄像模组用于获取所述待处理图像。With reference to the first aspect, in some implementations of the first aspect, the box camera module in the camera module is used to obtain the image to be processed.
在一种可能的实现方式中,上述摄像模组可以是枪机摄像模组,则枪机摄像模组可以用于获取待处理图像。In a possible implementation manner, the aforementioned camera module may be a bolt-action camera module, and the bolt-action camera module may be used to obtain images to be processed.
例如,枪机摄像模组可以是广角枪机摄像机,也可以称为广角枪机或者枪机。For example, the box camera module can be a wide-angle box camera, and can also be called a wide-angle box camera or box camera.
在一种可能的实现方式中,上述监控装置可以是枪球协作的监控装置,则摄像模组可以包括枪机摄像模组与球机摄像模组,摄像模组中的枪机摄像模组可以用于获取待处理图像。In a possible implementation manner, the above-mentioned monitoring device may be a monitoring device that cooperates with a gun and a ball, and the camera module may include a bolt camera module and a dome camera module, and the bolt camera module in the camera module may be Used to obtain the image to be processed.
例如,当目标对象在枪机摄像模组的监控范围内与枪机摄像模组的距离较近,或者,枪机摄像模组可以清晰地监控到目标对象,则摄像模组中的枪机摄像模组可以获取上述待处理图像。For example, when the target object is within the monitoring range of the box camera module and the distance between the box camera module and the box camera module is close, or the box camera module can clearly monitor the target object, the box camera in the camera module The module can obtain the above-mentioned to-be-processed image.
结合第一方面,在第一方面的某些实现方式中,所述摄像模组中的球机摄像模组用于获取所述待处理图像。With reference to the first aspect, in some implementations of the first aspect, the dome camera module in the camera module is used to obtain the image to be processed.
结合第一方面,在第一方面的某些实现方式中,所述待处理图像中包括目标对象,所述球机摄像模组用于根据所述目标对象的目标坐标信息获取所述待处理图像,其中,所述目标坐标信息是通过对所述摄像模组中的枪机摄像模组中所述目标对象的坐标信息进行坐标映射得到的。With reference to the first aspect, in some implementations of the first aspect, the image to be processed includes a target object, and the dome camera module is configured to obtain the image to be processed according to the target coordinate information of the target object , Wherein the target coordinate information is obtained by performing coordinate mapping on the coordinate information of the target object in the gun camera module in the camera module.
例如,当目标对象与枪机摄像模组的距离较远,则枪机摄像模组获取的待处理图像无法满足识别要求,此时控制器可以根据摄像模组中的枪机摄像模组获取的目标对象的坐标信息得到目标对象在摄像模组中的球机摄像模组的目标坐标信息;摄像模组中的球机摄像模组可以根据目标坐标信息获取上述待处理图像。For example, when the distance between the target object and the box camera module is far, the to-be-processed image acquired by the box camera module cannot meet the recognition requirements. At this time, the controller can obtain the image according to the box camera module in the camera module. The coordinate information of the target object obtains the target coordinate information of the dome camera module of the target object in the camera module; the dome camera module in the camera module can obtain the aforementioned image to be processed according to the target coordinate information.
具体地,控制器可以用于获取目标对象在枪机摄像模组中坐标信息,通过预设的算法进行坐标映射得到目标对象在球机摄像模组的目标坐标信息,进而可以控制球机摄像模组的放大倍数或者缩放参数等,使得球机摄像模组可以监控到目标对象,获取到满足识别要求的待处理图像。Specifically, the controller can be used to obtain the coordinate information of the target object in the camera module of the dome camera, and perform coordinate mapping through a preset algorithm to obtain the target coordinate information of the target object in the camera module of the dome camera, and then can control the camera module of the dome camera. The group's magnification or zooming parameters, etc., enable the dome camera module to monitor the target object and obtain the to-be-processed image that meets the recognition requirements.
结合第一方面,在第一方面的某些实现方式中,所述待处理图像中的目标对象为人像。With reference to the first aspect, in some implementation manners of the first aspect, the target object in the image to be processed is a portrait.
第二方面,提供了一种控制方法,所述控制方法应用于监控装置中,所述监控装置包括摄像模组、控制器以及处理器,所述控制方法包括:In a second aspect, a control method is provided, the control method is applied to a monitoring device, the monitoring device includes a camera module, a controller, and a processor, and the control method includes:
所述监控装置包括摄像模组、控制器、处理器,所述控制方法包括:所述摄像模组获取待处理图像;所述控制器向所述处理器发送样本图像;所述处理器对所述待处理图像与所述样本图像进行图像特征对比以得到对比结果。The monitoring device includes a camera module, a controller, and a processor. The control method includes: the camera module obtains an image to be processed; the controller sends a sample image to the processor; The image feature comparison between the to-be-processed image and the sample image is performed to obtain a comparison result.
其中,上述待处理图像中可以包括目标对象。Wherein, the above-mentioned image to be processed may include a target object.
在一种可能的实现方式中,上述目标对象可以是指人像;或者,可以是指人像的脸部;或者,还可以是指车辆(例如,具有明显特征且无法识别车牌号码的车辆);比如,外观具有明显的凹陷部分、凸起部分或者划痕的车辆。In a possible implementation manner, the above-mentioned target object may refer to a human figure; or, it may refer to the face of a human figure; or, it may also refer to a vehicle (for example, a vehicle that has obvious characteristics and cannot recognize a license plate number); for example, , The appearance of vehicles with obvious recesses, protrusions or scratches.
在本申请的实施例中,处理器可以对获取的待处理图像以及样本图像进行图像特征对 比,从而得到待处理图像的对比结果;实现了在监控装置中完成待处理图像的获取、处理以及分析的过程,无需将获取的待处理图像传输至部署于后台的服务器中进行处理与分析,从而避免了通信网络引入的时延问题,提高了待处理图像的处理效率。In the embodiment of the present application, the processor can perform image feature comparison on the acquired image to be processed and the sample image to obtain the comparison result of the image to be processed; the acquisition, processing and analysis of the image to be processed can be completed in the monitoring device In the process, there is no need to transmit the acquired image to be processed to a server deployed in the background for processing and analysis, thereby avoiding the delay problem introduced by the communication network and improving the processing efficiency of the image to be processed.
在一种可能的实现方式中,在上述处理器为CPU的情况下,处理器与控制器可以是指同一个器件。In a possible implementation manner, in the case where the foregoing processor is a CPU, the processor and the controller may refer to the same device.
在一种可能的实现方式中,上述处理器可以是神经网络处理器。In a possible implementation manner, the foregoing processor may be a neural network processor.
在本申请的实施例中,可以在监控装置中部署神经网络处理器,通过神经网络处理器可以对获取的待处理图像与样本图像进行图像特征对比,由于神经网络处理器中包括计算单元,因此可以减小图像特征对比的运算时间,提高图像特征对比的计算效率。In the embodiment of the present application, a neural network processor can be deployed in the monitoring device, and the acquired image to be processed can be compared with the sample image through the neural network processor. Since the neural network processor includes a computing unit, The calculation time of image feature comparison can be reduced, and the calculation efficiency of image feature comparison can be improved.
在一种可能的实现方式中,上述控制器与处理器可以部署于集成芯片中,集成芯片又可以被称作片上系统(system on a chip,SOC),或者是片上系统的一部分。In a possible implementation manner, the above-mentioned controller and processor may be deployed in an integrated chip, which may also be called a system on a chip (system on a chip, SOC), or a part of the system on a chip.
在一种可能的实现方式中,上述控制器与处理器可以部署于两个物理独立的芯片中。In a possible implementation manner, the above-mentioned controller and processor may be deployed in two physically independent chips.
例如,控制器可以部署于主控芯片中,用于执行逻辑程序;处理器可以是指神经网络处理器,神经网络处理器可以部署于人工智能芯片中,用于执行图像处理中的运算。For example, the controller can be deployed in the main control chip to execute logic programs; the processor can refer to a neural network processor, and the neural network processor can be deployed in an artificial intelligence chip to perform operations in image processing.
结合第二方面,在第二方面的某些实现方式中,所述控制方法还包括:所述处理器向所述控制器发送所述对比结果;所述控制器根据所述对比结果控制所述摄像模组中的球机摄像模组是否跟踪监控所述待处理图像中的目标对象。With reference to the second aspect, in some implementations of the second aspect, the control method further includes: the processor sends the comparison result to the controller; and the controller controls the comparison result according to the comparison result. Whether the dome camera module in the camera module tracks and monitors the target object in the image to be processed.
在本申请的实施例中,处理器可以将对比结果发送至控制器,从而控制器可根据对比结果确定是否控制摄像模组中的球机摄像模组对待处理图像中的目标对象实现持续跟踪,从而能够避免当目标对象远离摄像模组的监控范围时无法实现实时监控目标对象的问题,提升监控装置的安全性能。In the embodiment of the present application, the processor may send the comparison result to the controller, so that the controller can determine whether to control the dome camera module in the camera module to continuously track the target object in the image to be processed according to the comparison result. This can avoid the problem that real-time monitoring of the target object cannot be achieved when the target object is far away from the monitoring range of the camera module, and the safety performance of the monitoring device can be improved.
结合第二方面,在第二方面的某些实现方式中,所述对比结果为所述待处理图像与所述样本图像的相似度值。With reference to the second aspect, in some implementations of the second aspect, the comparison result is a similarity value between the image to be processed and the sample image.
在本申请的实施例中,待处理图像与样本图像的对比结果可以通过待处理图像的图像特征与样本图像的图像特征之间的相似度值进行度量。In the embodiment of the present application, the comparison result of the image to be processed and the sample image may be measured by the similarity value between the image feature of the image to be processed and the image feature of the sample image.
示例性地,可以通过待处理图像的图像特征与样本图像的图像特征之间的余弦距离来度量图像特征的相似度值。Exemplarily, the similarity value of the image feature can be measured by the cosine distance between the image feature of the image to be processed and the image feature of the sample image.
例如,可以通过以下等式确定待处理图像与样本图像的相似度值:For example, the similarity value between the image to be processed and the sample image can be determined by the following equation:
Figure PCTCN2019115138-appb-000002
Figure PCTCN2019115138-appb-000002
其中,i可以表示第i个图像特征;n可以表示图像特征的数量;A可以表示待处理图像特征;B可以表示样本图像特征;A i可以表示待处理图像中第i个图像特征;B i可以表示样本图像中第i个图像特征,即样本图像中与A i对应的图像特征。 Among them, i can represent the i-th image feature; n can represent the number of image features; A can represent the image feature to be processed; B can represent the sample image feature; A i can represent the i-th image feature in the image to be processed; B i may represent the i-th sample image features of the image, i.e., image features with sample image corresponding to the a i.
结合第二方面,在第二方面的某些实现方式中,所述控制器根据所述对比结果控制所述摄像模组中的球机摄像模组是否跟踪监控所述待处理图像中的目标对象,包括:在所述相似度值大于预设阈值时,所述控制器控制所述摄像模组中的球机摄像模组以转动的方式跟踪监控所述待处理图像中的目标对象。With reference to the second aspect, in some implementations of the second aspect, the controller controls whether the dome camera module in the camera module tracks and monitors the target object in the image to be processed according to the comparison result , Including: when the similarity value is greater than a preset threshold, the controller controls the dome camera module in the camera module to track and monitor the target object in the image to be processed in a rotating manner.
例如,当相似度值大于或等于预设阈值时,则可以说明待处理图像与样本图像中包括 相同的目标对象;比如,当目标对象为人像,或者人脸图像时,则可以表明监控的行人是黑名单库中的行人。For example, when the similarity value is greater than or equal to the preset threshold, it can indicate that the image to be processed and the sample image include the same target object; for example, when the target object is a portrait or face image, it can indicate the monitored pedestrian It is a pedestrian in the blacklist database.
在本申请的实施例中,在控制器确定待处理图像与样本图像的相似度值大于预设阈值的情况下,可以通过控制器控制球机摄像模组持续跟踪目标对象,避免当目标对象远离枪机摄像模组的监控范围时无法监控目标对象的问题,通过本申请实施例提出的球机摄像模组的持续跟踪机制可以获取目标对象的更多信息,从而提升监控装置的安全性能。In the embodiment of the present application, when the controller determines that the similarity value between the image to be processed and the sample image is greater than the preset threshold, the dome camera module can be controlled by the controller to continuously track the target object to avoid when the target object is far away The target object cannot be monitored during the monitoring range of the bullet camera module. The continuous tracking mechanism of the dome camera module proposed in the embodiment of the present application can obtain more information about the target object, thereby improving the security performance of the monitoring device.
结合第二方面,在第二方面的某些实现方式中,所述摄像模组获取待处理图像,包括:所述摄像模组中的枪机摄像模组获取所述待处理图像。With reference to the second aspect, in some implementation manners of the second aspect, the acquiring the image to be processed by the camera module includes: acquiring the image to be processed by the box camera module in the camera module.
在一种可能的实现方式中,上述摄像模组可以是枪机摄像模组,则枪机摄像模组可以用于获取待处理图像。In a possible implementation manner, the aforementioned camera module may be a bolt-action camera module, and the bolt-action camera module may be used to obtain images to be processed.
例如,枪机摄像模组可以是广角枪机摄像机,也可以称为广角枪机或者枪机。For example, the box camera module can be a wide-angle box camera, and can also be called a wide-angle box camera or box camera.
在一种可能的实现方式中,上述监控装置可以是枪球协作的监控装置,则摄像模组可以包括枪机摄像模组与球机摄像模组,摄像模组中的枪机摄像模组可以用于获取待处理图像。In a possible implementation manner, the above-mentioned monitoring device may be a monitoring device that cooperates with a gun and a ball, and the camera module may include a bolt camera module and a dome camera module, and the bolt camera module in the camera module may be Used to obtain the image to be processed.
例如,当待拍摄对象在枪机摄像模组的监控范围内与枪机摄像模组的距离较近,或者,枪机摄像模组可以清晰地监控到待拍摄对象,则摄像模组中的枪机摄像模组可以获取上述待处理图像。For example, when the object to be photographed is within the monitoring range of the box camera module and the distance between the box camera module and the box camera module is close, or the box camera module can clearly monitor the object to be photographed, the gun in the camera module The camera module can obtain the above-mentioned to-be-processed image.
结合第二方面,在第二方面的某些实现方式中,所述摄像模组中的球机摄像模组用于获取所述待处理图像。With reference to the second aspect, in some implementations of the second aspect, the dome camera module in the camera module is used to obtain the image to be processed.
结合第二方面,在第二方面的某些实现方式中,所述待处理图像中包括目标对象,所述球机摄像模组用于根据所述目标对象的目标坐标信息获取所述待处理图像,其中,所述目标坐标信息是通过对所述摄像模组中的枪机摄像模组中所述目标对象的坐标信息进行坐标映射得到的。With reference to the second aspect, in some implementations of the second aspect, the image to be processed includes a target object, and the dome camera module is configured to obtain the image to be processed according to the target coordinate information of the target object , Wherein the target coordinate information is obtained by performing coordinate mapping on the coordinate information of the target object in the gun camera module in the camera module.
例如,当目标对象与枪机摄像模组的距离较远,则枪机摄像模组获取的待处理图像无法满足识别要求,此时控制器可以根据摄像模组中的枪机摄像模组获取的目标对象的坐标信息得到目标对象在摄像模组中的球机摄像模组的目标坐标信息;摄像模组中的球机摄像模组可以根据目标坐标信息获取上述待处理图像。For example, when the distance between the target object and the box camera module is far, the to-be-processed image acquired by the box camera module cannot meet the recognition requirements. At this time, the controller can obtain the image according to the box camera module in the camera module. The coordinate information of the target object obtains the target coordinate information of the dome camera module of the target object in the camera module; the dome camera module in the camera module can obtain the aforementioned image to be processed according to the target coordinate information.
具体地,控制器可以用于获取目标对象在枪机摄像模组中坐标信息,通过预设的算法进行坐标映射得到目标对象在球机摄像模组的目标坐标信息,进而可以控制球机摄像模组的放大倍数或者缩放参数等,使得球机摄像模组可以监控到目标对象,获取到满足识别要求的待处理图像。Specifically, the controller can be used to obtain the coordinate information of the target object in the camera module of the dome camera, and perform coordinate mapping through a preset algorithm to obtain the target coordinate information of the target object in the camera module of the dome camera, and then can control the camera module of the dome camera. The group's magnification or zooming parameters, etc., enable the dome camera module to monitor the target object and obtain the to-be-processed image that meets the recognition requirements.
结合第二方面,在第二方面的某些实现方式中,所述待处理图像中的目标对象为人像。With reference to the second aspect, in some implementation manners of the second aspect, the target object in the image to be processed is a portrait.
第三方面,提供一种计算机程序产品,所述计算机程序产品包括:计算机程序代码,当所述计算机程序代码在计算机上运行时,使得计算机执行上述第二方面中的控制方法。In a third aspect, a computer program product is provided. The computer program product includes: computer program code, which when the computer program code runs on a computer, causes the computer to execute the control method in the second aspect.
需要说明的是,上述计算机程序代码可以全部或者部分存储在第一存储介质上,其中第一存储介质可以与处理器封装在一起的,也可以与处理器单独封装,本申请实施例对此不作具体限定。It should be noted that the above-mentioned computer program code may be stored in whole or in part on a first storage medium, where the first storage medium may be packaged with the processor, or may be packaged separately with the processor. This embodiment of the present application does not deal with this. Specific restrictions.
第四方面,提供了一种计算机可读介质,所述计算机可读介质存储有程序代码,当所述计算机程序代码在计算机上运行时,使得计算机执行上述第二方面中的控制方法。In a fourth aspect, a computer-readable medium is provided, the computer-readable medium stores a program code, and when the computer program code runs on a computer, the computer executes the control method in the second aspect.
附图说明Description of the drawings
图1是本申请实施例提供的一种图像拍摄系统的示意图;FIG. 1 is a schematic diagram of an image shooting system provided by an embodiment of the present application;
图2是本申请实施例提供的监控装置的结构示意图;Figure 2 is a schematic structural diagram of a monitoring device provided by an embodiment of the present application;
图3是本申请实施例提供的枪球协作的监控装置的示意图;Fig. 3 is a schematic diagram of a monitoring device for gun-and-ball cooperation provided by an embodiment of the present application;
图4是本申请实施例提供的集成芯片的结构示意图;FIG. 4 is a schematic structural diagram of an integrated chip provided by an embodiment of the present application;
图5是本申请实施例提供的神经网络处理器的结构示意图;Fig. 5 is a schematic structural diagram of a neural network processor provided by an embodiment of the present application;
图6是本申请实施例提供的处理器的结构示意图;FIG. 6 is a schematic structural diagram of a processor provided by an embodiment of the present application;
图7是本申请实施例提供的一种控制方法的示意性流程图;FIG. 7 is a schematic flowchart of a control method provided by an embodiment of the present application;
图8是本申请实施例提供的另一种控制方法的示意性流程图;FIG. 8 is a schematic flowchart of another control method provided by an embodiment of the present application;
图9是本申请实施例提供的另一种控制方法的示意性流程图。Fig. 9 is a schematic flowchart of another control method provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following describes the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
图1是本申请实施例提供的一种图像拍摄系统的示意图。Fig. 1 is a schematic diagram of an image capturing system provided by an embodiment of the present application.
如图1所示,图像拍摄系统100中可以包括监控装置110和服务器120,其中,监控装置110用于获取监控图像(例如,人脸图像),服务器用于接收监控装置110发送的监控图像,并根据监控图像以及数据库中的样本图像(例如,黑名单人脸图像库)进行图像特征对比,得到对比结果。As shown in FIG. 1, the image capturing system 100 may include a monitoring device 110 and a server 120, where the monitoring device 110 is used to obtain a monitoring image (for example, a face image), and the server is used to receive the monitoring image sent by the monitoring device 110, And compare the image features according to the monitored images and the sample images in the database (for example, the blacklisted face image library) to obtain the comparison result.
目前,在图像拍摄系统中需要将监控装置获取的监控图像通过通信网络传输至部署于后端的服务器,由服务器对监控图像进行进一步的处理与分析。但是,通信网络通常容易受到环境等因素的影响,导致监控图像传输时延较大,从而造成整体图像拍摄系统处理监控图像时的效率较低。At present, in the image shooting system, it is necessary to transmit the surveillance image acquired by the surveillance device to a server deployed on the back-end through a communication network, and the server performs further processing and analysis on the surveillance image. However, the communication network is usually susceptible to factors such as the environment, which results in a large transmission delay of the surveillance image, which results in a lower efficiency of the overall image capture system in processing the surveillance image.
有鉴于此,本申请实施例提出了一种监控装置以及控制方法,通过监控装置中部署的处理器可以对获取的待处理图像以及样本图像进行图像特征对比,从而得到待处理图像的对比结果,实现了在监控装置中完成待处理图像的获取、处理以及分析的过程,无需将获取的待处理图像传输至部署于后台的服务器中进行处理与分析,从而避免了通信网络引入的时延问题,提高了待处理图像的处理效率。In view of this, the embodiment of the present application proposes a monitoring device and a control method. The processor deployed in the monitoring device can perform image feature comparison on the acquired image to be processed and the sample image, so as to obtain the comparison result of the image to be processed. The process of acquiring, processing and analyzing the image to be processed in the monitoring device is realized, without the need to transmit the acquired image to be processed to a server deployed in the background for processing and analysis, thereby avoiding the delay problem introduced by the communication network. Improve the processing efficiency of the image to be processed.
应用场景一:智能寻人系统Application scenario 1: Intelligent tracing system
在一个实施例中,本申请实施例提供的监控装置可以应用于智能寻人系统场景。In an embodiment, the monitoring device provided in the embodiment of the present application can be applied to a scene of an intelligent tracing system.
例如,向本申请实施例的监控装置中发送一张行人照片(例如,走失儿童的照片),通过监控装置在监控范围内实时获取的监控图像与该儿童照片进行图像匹配,从而实现在监控范围内快速地确定该走失儿童的位置信息。For example, send a pedestrian photo (for example, a photo of a missing child) to the monitoring device of the embodiment of the present application, and the monitoring image acquired in real time within the monitoring range of the monitoring device is matched with the child's photo to realize the image matching in the monitoring range. The location information of the missing child can be quickly determined within.
应用场景二:平安城市Application Scenario 2: Safe City
在一个实施例中,本申请实施例提供的监控装置可以应用于平安城市场景。In an embodiment, the monitoring device provided in the embodiment of the present application can be applied to a safe city scene.
例如,向本申请实施例的监控装置中发送一张行人照片(例如,黑名单人脸照片), 通过监控装置在监控范围内实时获取的监控图像与该黑名单人脸照片进行图像匹配,从而实现在监控范围内快速地确定可疑人员的位置信息。For example, a pedestrian photo (for example, a blacklisted face photo) is sent to the monitoring device of the embodiment of the present application, and the monitoring image acquired in real time within the monitoring range of the monitoring device is matched with the blacklisted face photo, thereby The location information of suspicious persons can be quickly determined within the monitoring range.
例如,向本申请实施例的监控装置中发送一张车辆照片(例如,该车辆具有明显特征且车牌号码无法识别);比如,外观具有明显的凹陷部分、凸起部分或者划痕的车辆。通过监控装置在监控范围内实时获取的监控图像与该车辆照片进行图像匹配,从而实现在监控范围内快速地确定可疑车辆的位置信息。For example, a vehicle photo (for example, the vehicle has obvious characteristics and the license plate number cannot be recognized) is sent to the monitoring device of the embodiment of the present application; for example, a vehicle with obvious concave parts, convex parts or scratches in appearance. The real-time monitoring image acquired by the monitoring device in the monitoring range is matched with the vehicle photo, so as to quickly determine the location information of the suspicious vehicle in the monitoring range.
下面结合附图2至图5对本申请实施例的监控装置进行详细说明。The monitoring device of the embodiment of the present application will be described in detail below with reference to FIG. 2 to FIG. 5.
图2是本申请实施例提供的监控装置的结构示意图。如图2所示,监控装置200中可以包括摄像模组210、控制器220以及处理器230,其中,摄像模组210可以用于获取待处理图像;控制器220可以用于向处理器230发送样本图像;处理器230用于对待处理图像与样本图像进行图像特征对比以得到对比结果。Figure 2 is a schematic structural diagram of a monitoring device provided by an embodiment of the present application. As shown in FIG. 2, the monitoring device 200 can include a camera module 210, a controller 220, and a processor 230. The camera module 210 can be used to obtain images to be processed; the controller 220 can be used to send images to the processor 230. Sample image; the processor 230 is used to perform image feature comparison between the image to be processed and the sample image to obtain a comparison result.
例如,监控装置可以部署于地铁口、楼宇或者道路交叉路口等位置,通过监控装置可以实时拍摄监控装置附近的道路画面,道路画面中可以包括行人图像,或者车辆图像。For example, the monitoring device can be deployed at subway entrances, buildings, or road intersections, etc. The monitoring device can shoot real-time road images near the monitoring device, and the road images can include pedestrian images or vehicle images.
其中,上述摄像模组210可以是指监控装置200中用于获取待处理图像的摄像头,待处理图像中可以包括目标对象,其中,目标对象可以是指人像,或者,目标对象可以是指人像的脸部,或者目标对象还可以是指车辆(例如,具有明显特征且无法识别车牌号码的车辆)。Wherein, the aforementioned camera module 210 may refer to a camera used to obtain images to be processed in the monitoring device 200, and the images to be processed may include a target object, where the target object may refer to a portrait, or the target object may refer to a portrait of a portrait. The face, or the target object, can also refer to a vehicle (for example, a vehicle that has obvious characteristics and cannot recognize a license plate number).
本申请中,处理器可以是通用处理器,比如中央处理器(central processing unit,CPU),也可以是专用处理器,比如图形处理器(graphics processing unit,GPU),神经网络处理器(neural-network processing unit,NPU)。In this application, the processor may be a general-purpose processor, such as a central processing unit (CPU), or a dedicated processor, such as a graphics processing unit (GPU), or a neural network processor (neural-processing unit, GPU). network processing unit, NPU).
在一个示例中,在上述处理器为CPU的情况下,处理器与控制器可以是指同一个器件。In an example, in the case where the foregoing processor is a CPU, the processor and the controller may refer to the same device.
在一种可能的实现方式中,监控装置200可以是枪机监控装置,即摄像模组210可以是指枪机摄像模组;其中,枪机摄像模组可以用于监控道路的全局画面。In a possible implementation manner, the monitoring device 200 may be a bolt-action monitoring device, that is, the camera module 210 may refer to a bolt-action camera module; wherein, the bolt-action camera module may be used to monitor a global picture of a road.
例如,枪机摄像模组可以是广角枪机摄像机,也可以称为广角枪机或者枪机。For example, the box camera module can be a wide-angle box camera, and can also be called a wide-angle box camera or box camera.
可选地,当监控装置200中的摄像模组210为枪机摄像模组时,待处理图像可以是枪机摄像模组获取的待处理图像。Optionally, when the camera module 210 in the monitoring device 200 is a box camera module, the image to be processed may be the image to be processed obtained by the box camera module.
在另一种可能的实现方式中,监控装置200可以是枪机摄像模组与球机摄像模组协作的监控装置,可以称为枪球协作的监控装置,即摄像模组210可以包括枪机摄像模组与球机摄像模组。In another possible implementation manner, the monitoring device 200 may be a monitoring device that cooperates with a bullet camera module and a dome camera module, and may be called a monitoring device with a bullet camera cooperation, that is, the camera module 210 may include a bullet camera. Camera module and dome camera module.
例如,图3是本申请实施例提供的枪球协作的监控装置的示意图。如图3所示,监控装置300中可以包括枪机摄像模组310、球机摄像模组320以及集成芯片330,其中,球机摄像模组320可以是指球机摄像机,也可以称为长焦球机或者球机;集成芯片330中可以包括图2所示的控制器220与处理器230。For example, FIG. 3 is a schematic diagram of a monitoring device for gun-and-ball cooperation provided by an embodiment of the present application. As shown in FIG. 3, the monitoring device 300 may include a box camera module 310, a dome camera module 320, and an integrated chip 330. The dome camera module 320 may refer to a dome camera, or it may be called a long camera. Focus ball machine or ball machine; the integrated chip 330 may include the controller 220 and the processor 230 shown in FIG. 2.
应理解,在枪球协作的监控装置中,控制器220可以用于控制枪机摄像模组与球机摄像模组进行监控。例如,控制器220可以用于检测到的枪机摄像模组中待拍摄对象的第一坐标信息,对第一坐标信息进行映射得到待拍摄对象在球机摄像模组中的第二坐标信息,从而控制球机摄像模组进行待拍摄对象的监控。It should be understood that in the monitoring device with gun-ball cooperation, the controller 220 may be used to control the gun-camera module and the ball-camera module to monitor. For example, the controller 220 may be used to detect the first coordinate information of the object to be photographed in the box camera module, and map the first coordinate information to obtain the second coordinate information of the object to be photographed in the dome camera module. Thus, the camera module of the dome camera is controlled to monitor the object to be photographed.
例如,当枪机摄像模组监控的待拍摄对象行人A与枪机摄像模组的监控范围距离较 远,则枪机摄像模组可能无法获取行人A的监控图像,此时控制器220可以根据行人A的在枪机摄像模组中坐标位置信息得到行人A在球机摄像模组中的坐标信息,从而调节球机摄像模组的缩放参数,控制球机摄像模组监控距离枪机摄像模组距离较远的行人A。For example, when the target pedestrian A monitored by the bolt-action camera module is far away from the monitoring range of the bolt-action camera module, the bolt-action camera module may not be able to obtain the monitored image of pedestrian A. In this case, the controller 220 may Pedestrian A’s coordinate position information in the camera module of the dome camera obtains the coordinate information of pedestrian A in the camera module of the dome camera, thereby adjusting the zoom parameters of the dome camera module and controlling the monitoring distance of the dome camera module. Group of pedestrians A farther away.
可选地,当摄像模组210包括枪机摄像模组与球机摄像模组时,待处理图像可以是枪机摄像模组获取的图像,或者,待处理图像也可以是球机摄像模组获取的图像。Optionally, when the camera module 210 includes a box camera module and a dome camera module, the image to be processed may be an image obtained by the box camera module, or the image to be processed may also be a dome camera module The captured image.
情况一Situation One
示例性地,摄像模组中的枪机摄像模组用于获取上述待处理图像。Exemplarily, the box camera module in the camera module is used to obtain the above-mentioned image to be processed.
例如,当待拍摄对象在枪机摄像模组的监控范围内与枪机摄像模组的距离较近,或者,枪机摄像模组可以清晰地监控到待拍摄对象,则摄像模组中的枪机摄像模组可以用于获取待处理图像。For example, when the object to be photographed is within the monitoring range of the box camera module and the distance between the box camera module and the box camera module is close, or the box camera module can clearly monitor the object to be photographed, the gun in the camera module The camera module can be used to obtain images to be processed.
情况二Situation two
示例性地,摄像模组中的球机摄像模组用于获取上述待处理图像。Exemplarily, the dome camera module in the camera module is used to obtain the above-mentioned image to be processed.
例如,待处理图像中可以包括目标对象,摄像模组中的球机摄像模组可以用于根据目标对象的目标坐标信息获取待处理图像,其中,目标坐标信息可以是通过对摄像模组中的枪机摄像模组中目标对象的坐标信息进行坐标映射得到的。For example, the target object can be included in the image to be processed, and the dome camera module in the camera module can be used to obtain the image to be processed according to the target coordinate information of the target object. The coordinate information of the target object in the gun camera module is obtained by coordinate mapping.
例如,当目标对象与枪机摄像模组的距离较远时,则枪机摄像模组获取的目标对象的图像可能会存在像素小而无法满足识别要求的问题;此时,控制器可以根据获取目标对象在枪机摄像模组中坐标信息,通过预设的算法可以进行坐标映射得到目标对象在球机摄像模组的目标坐标信息,进而可以控制球机摄像模组的放大倍数或者缩放参数等,使得球机摄像模组可以监控到目标对象,获取到满足识别要求的待处理图像。For example, when the distance between the target object and the camera module of the box camera is far, the image of the target object acquired by the camera module of the box camera may have the problem of small pixels that cannot meet the recognition requirements; at this time, the controller can obtain The coordinate information of the target object in the camera module of the dome camera can be mapped through the preset algorithm to obtain the target coordinate information of the target object in the camera module of the dome camera, and then the magnification or zoom parameters of the camera module of the dome camera can be controlled. , So that the camera module of the dome camera can monitor the target object and obtain the to-be-processed image that meets the recognition requirements.
在本申请的实施例中,可以通过摄像模组中的枪机摄像模组或者球机摄像模组获取待处理图像,并将待处理图像发送至处理器;处理器可以用于对待处理图像与样本图像进行图像特征对比,以得到对比结果。通过本申请实施例提供的监控装置,实现了在监控装置中完成待处理图像的获取、处理以及分析的过程,无需将获取的待处理图像传输至部署于后台的服务器中进行处理与分析,从而避免了通信网络引入的时延问题,提高了待处理图像的处理效率。In the embodiment of the present application, the image to be processed can be obtained through the box camera module or the dome camera module in the camera module, and the image to be processed is sent to the processor; the processor can be used to connect the image to be processed with The sample image is compared with image features to obtain the comparison result. Through the monitoring device provided by the embodiments of the present application, the process of acquiring, processing, and analyzing the image to be processed is completed in the monitoring device, without the need to transmit the acquired image to be processed to a server deployed in the background for processing and analysis, thereby The time delay introduced by the communication network is avoided, and the processing efficiency of the image to be processed is improved.
可选地,在本申请的实施例中可以通过神经网络对待处理图像与样本图像进行图像特征提取以及图像特征对比,得到对比结果。Optionally, in the embodiment of the present application, a neural network may be used to perform image feature extraction and image feature comparison between the image to be processed and the sample image to obtain a comparison result.
进一步地,在本申请的实施例中,处理器230可以还用于向控制器发220发送待处理图像与样本图像进行图像特征对比的对比结果;控制器220可以用于根据对比结果控制摄像模组210中的球机摄像模组是否跟踪监控所述待处理图像中的目标对象。Further, in the embodiment of the present application, the processor 230 may be further configured to send 220 the comparison result of the image feature comparison between the image to be processed and the sample image to the controller; the controller 220 may be configured to control the camera module according to the comparison result. Whether the dome camera module in the group 210 tracks and monitors the target object in the image to be processed.
通常地,目标对象是动态移动的,因此,需要对该目标对象进行跟踪监控,所谓跟踪监控是指球机摄像模组在一段时间内持续监控待处理图像中的目标对象,具体地,球机摄像模组可以以转动的方式跟踪监控该目标对象,直至球机摄像模组转动到最大的角度,无法进一步转动来进行监控,因此,球机摄像模组跟踪监控的时间,即上述一段时间,与球机摄像模组所能转动的角度相关。Normally, the target object is dynamically moving, therefore, the target object needs to be tracked and monitored. The so-called tracking monitoring means that the dome camera module continuously monitors the target object in the image to be processed for a period of time. Specifically, the dome camera module continuously monitors the target object in the image to be processed. The camera module can track and monitor the target object in a rotating manner until the dome camera module rotates to the maximum angle and cannot rotate further for monitoring. Therefore, the dome camera module tracks the monitoring time, that is, the above period of time. It is related to the angle that the dome camera module can rotate.
示例性地,上述对比结果可以是待处理图像与样本图像的相似度值。Exemplarily, the aforementioned comparison result may be the similarity value between the image to be processed and the sample image.
例如,处理器230可以是指神经网络处理器,神经网络处理器可以获取待处理图像(例如,行人图像)与样本图样(例如,黑名单人脸图像数据);对待处理图像与样本图像进 行图像特征提取,得到待处理图像的图像特征与样本图像的图像特征;根据待处理图像的图像特征与样本图像的图像特征,确定图像特征的相似度值。For example, the processor 230 may refer to a neural network processor. The neural network processor may obtain images to be processed (for example, pedestrian images) and sample patterns (for example, blacklisted face image data); Feature extraction obtains the image features of the image to be processed and the image features of the sample image; according to the image features of the image to be processed and the image features of the sample image, the similarity value of the image features is determined.
在一个示例中,可以通过待处理图像的图像特征与样本图像的图像特征之间的余弦距离来度量图像特征的相似度值。In one example, the similarity value of the image feature can be measured by the cosine distance between the image feature of the image to be processed and the image feature of the sample image.
例如,可以通过以下等式确定待处理图像与样本图像的相似度值:For example, the similarity value between the image to be processed and the sample image can be determined by the following equation:
Figure PCTCN2019115138-appb-000003
Figure PCTCN2019115138-appb-000003
其中,i可以表示第i个图像特征;n可以表示图像特征的数量;A可以表示待处理图像特征;B可以表示样本图像特征;A i可以表示待处理图像中第i个图像特征;B i可以表示样本图像中第i个图像特征,即样本图像中与A i对应的图像特征。 Among them, i can represent the i-th image feature; n can represent the number of image features; A can represent the image feature to be processed; B can represent the sample image feature; A i can represent the i-th image feature in the image to be processed; B i may represent the i-th sample image features of the image, i.e., image features with sample image corresponding to the a i.
在本申请的实施例中,当相似度值小于预设阈值时,则说明待处理图像与样本图像中包括不同的目标对象;比如,当目标对象为人像,或者人脸图像时,则可以表明监控的行人不是黑名单库中的行人。当相似度值大于或等于预设阈值时,则说明待处理图像与样本图像中包括相同的目标对象;比如,当目标对象为人像,或者人脸图像时,则可以表明监控的行人是黑名单库中的行人。In the embodiment of the present application, when the similarity value is less than the preset threshold, it means that the image to be processed and the sample image include different target objects; for example, when the target object is a portrait or a face image, it can indicate The monitored pedestrian is not a pedestrian in the blacklist database. When the similarity value is greater than or equal to the preset threshold, it means that the image to be processed and the sample image include the same target object; for example, when the target object is a portrait or face image, it can indicate that the monitored pedestrian is a blacklist Pedestrians in the library.
可选地,在本申请的实施例中,在相似度值大于预设阈值时,控制器220可以控制摄像模组中的球机摄像模组以转动的方式跟踪监控待处理图像中的目标对象。Optionally, in the embodiment of the present application, when the similarity value is greater than a preset threshold, the controller 220 may control the dome camera module in the camera module to track and monitor the target object in the image to be processed in a rotating manner. .
在本申请的实施例中,在确定待处理图像与样本图像的相似度值大于预设阈值的情况下,可以通过控制器控制球机摄像模组持续跟踪目标对象,避免当目标对象远离枪机摄像模组的监控范围时无法监控目标对象的问题,通过本申请实施例提出的球机摄像模组的持续跟踪机制可以获取目标对象的更多信息,从而提升监控装置的安全性能,提高破案效率。In the embodiment of the present application, when it is determined that the similarity value between the image to be processed and the sample image is greater than the preset threshold, the dome camera module can be controlled by the controller to continuously track the target object, so as to avoid when the target object is far away from the gun. The problem that the camera module cannot monitor the target object during the monitoring range of the camera module. Through the continuous tracking mechanism of the dome camera module proposed in the embodiment of this application, more information about the target object can be obtained, thereby improving the security performance of the monitoring device and improving the efficiency of solving crimes. .
在一个示例中,上述控制器220与处理器230可以部署在集成芯片中。例如,图4是本申请实施例提供的集成芯片的结构示意图。如图4所示,集成芯片400中可以包括控制器410与处理器420,其中,控制器410可以用于执行监控装置200中的逻辑程序;处理器420中可以用于执行图像处理中的运算。需要说明的是,集成芯片400可以是如图3所示的集成芯片330。In an example, the aforementioned controller 220 and processor 230 may be deployed in an integrated chip. For example, FIG. 4 is a schematic structural diagram of an integrated chip provided by an embodiment of the present application. As shown in FIG. 4, the integrated chip 400 may include a controller 410 and a processor 420, where the controller 410 may be used to execute logic programs in the monitoring device 200; the processor 420 may be used to execute operations in image processing . It should be noted that the integrated chip 400 may be the integrated chip 330 as shown in FIG. 3.
上述图4所示的集成芯片又可以被称作片上系统(system on a chip,SOC),或者是片上系统的一部分。The integrated chip shown in FIG. 4 may be called a system on a chip (system on a chip, SOC), or a part of a system on a chip.
在另一个示例中,控制器220与处理器230也可以部署于物理上独立的两个芯片中,本申请对此不作任何限定。In another example, the controller 220 and the processor 230 may also be deployed in two physically independent chips, which is not limited in this application.
例如,控制器220可以部署于主控芯片中,用于执行逻辑程序;处理器230可以是指神经网络处理器,神经网络处理器可以部署于人工智能(artificial intelligence,AI)芯片中,用于执行图像处理中的运算;其中,主控芯片与AI芯片可以是物理上独立的两个芯片。For example, the controller 220 may be deployed in a main control chip to execute logic programs; the processor 230 may refer to a neural network processor, and the neural network processor may be deployed in an artificial intelligence (AI) chip for Perform calculations in image processing; among them, the main control chip and the AI chip can be two physically independent chips.
下面结合图5,以处理器为神经网络处理器进行举例说明。图5是本申请实施例提供的神经网络处理器的结构示意图。如图5所示,神经网络处理器500(neural-network processing unit,NPU)的核心部分为运算电路503,控制器504控制运算电路503提取存储器(权重存储器或输入存储器)中的数据并进行运算。In the following, in conjunction with Fig. 5, the processor is an example of a neural network processor. Fig. 5 is a schematic structural diagram of a neural network processor provided by an embodiment of the present application. As shown in Figure 5, the core part of the neural network processor 500 (neural-network processing unit, NPU) is the arithmetic circuit 503, and the controller 504 controls the arithmetic circuit 503 to extract the data in the memory (weight memory or input memory) and perform calculations .
在一些实现中,运算电路503内部包括多个处理单元(process engine,PE)。在一些实现中,运算电路503是二维脉动阵列。运算电路503还可以是一维脉动阵列或者能够执行例如乘法和加法这样的数学运算的其它电子线路。在一些实现中,运算电路503是通用的矩阵处理器。In some implementations, the arithmetic circuit 503 includes multiple processing units (process engines, PE). In some implementations, the arithmetic circuit 503 is a two-dimensional systolic array. The arithmetic circuit 503 may also be a one-dimensional systolic array or other electronic circuit capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit 503 is a general-purpose matrix processor.
举例来说,假设有输入矩阵A,权重矩阵B,输出矩阵C。运算电路503从权重存储器502中取矩阵B相应的数据,并缓存在运算电路503中每一个PE上。运算电路503从输入存储器501中取矩阵A数据与矩阵B进行矩阵运算,得到的矩阵的部分结果或最终结果,保存在累加器508(accumulator)中。For example, suppose there is an input matrix A, a weight matrix B, and an output matrix C. The arithmetic circuit 503 fetches the data corresponding to matrix B from the weight memory 502 and caches it on each PE in the arithmetic circuit 503. The arithmetic circuit 503 fetches the matrix A data and matrix B from the input memory 501 to perform matrix operations, and the partial result or final result of the obtained matrix is stored in an accumulator 508 (accumulator).
向量计算单元507可以对运算电路503的输出做进一步处理,如向量乘,向量加,指数运算,对数运算,大小比较等等。例如,向量计算单元507可以用于神经网络中非卷积/非FC层的网络计算,如池化(pooling),批归一化(batch normalization),局部响应归一化(local response normalization)等。The vector calculation unit 507 can perform further processing on the output of the arithmetic circuit 503, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, and so on. For example, the vector calculation unit 507 can be used for network calculations in the non-convolutional/non-FC layer of the neural network, such as pooling, batch normalization, local response normalization, etc. .
在一些实现中,向量计算单元能507将经处理的输出的向量存储到统一存储器506。例如,向量计算单元507可以将非线性函数应用到运算电路503的输出,例如累加值的向量,用以生成激活值。In some implementations, the vector calculation unit 507 can store the processed output vector to the unified memory 506. For example, the vector calculation unit 507 may apply a nonlinear function to the output of the arithmetic circuit 503, such as a vector of accumulated values, to generate the activation value.
在一些实现中,向量计算单元507生成归一化的值、合并值,或二者均有。在一些实现中,处理过的输出的向量能够用作到运算电路503的经过激活后的输入,例如,用于在神经网络中的后续层中的使用。In some implementations, the vector calculation unit 507 generates a normalized value, a combined value, or both. In some implementations, the processed output vector can be used as an activated input to the arithmetic circuit 503, for example, for use in a subsequent layer in a neural network.
统一存储器506用于存放输入数据以及输出数据。权重数据直接通过存储单元访问控制器505(direct memory access controller,DMAC)将外部存储器中的输入数据存入至输入存储器501和/或统一存储器506、将外部存储器中的权重数据存入权重存储器502,以及将统一存储器506中的数据存入外部存储器。The unified memory 506 is used to store input data and output data. The weight data directly passes through the storage unit access controller 505 (direct memory access controller, DMAC) to store the input data in the external memory into the input memory 501 and/or unified memory 506, and the weight data in the external memory into the weight memory 502 , And store the data in the unified memory 506 into the external memory.
总线接口单元510(bus interface unit,BIU),用于通过总线实现与取指存储器509之间进行交互。与控制器504连接的取指存储器509(instruction fetch buffer)用于存储控制器504使用的指令。控制器504用于调用取指存储器509中缓存的指令,实现控制该运算加速器的工作过程。The bus interface unit 510 (bus interface unit, BIU) is used to implement interaction with the instruction fetch memory 509 through a bus. The instruction fetch buffer 509 (instruction fetch buffer) connected to the controller 504 is used to store instructions used by the controller 504. The controller 504 is used to call the instructions cached in the instruction fetch memory 509 to control the working process of the computing accelerator.
一般地,统一存储器506,输入存储器501,权重存储器502以及取指存储器509均为片上(On-Chip)存储器,外部存储器为该NPU外部的存储器,该外部存储器可以为双倍数据率同步动态随机存储器(double data rate synchronous dynamic random access memory,DDR SDRAM)、高带宽存储器(high bandwidth memory,HBM)或其他可读可写的存储器。Generally, the unified memory 506, the input memory 501, the weight memory 502, and the instruction fetch memory 509 are all on-chip (On-Chip) memories. The external memory is a memory external to the NPU. The external memory can be a double data rate synchronous dynamic random access memory. Memory (double data rate synchronous dynamic random access memory, DDR SDRAM), high bandwidth memory (HBM) or other readable and writable memory.
应理解,由于神经网络处理器中可以包括上述运算电路503或者向量计算单元507,因此当神经网络处理器执行图像处理中的矩阵运算时,比如,对待处理图像与样本图像进行图像特征提取以及图像特征对比时运算效率较高。It should be understood that since the neural network processor may include the above-mentioned arithmetic circuit 503 or the vector calculation unit 507, when the neural network processor performs matrix operations in image processing, for example, image feature extraction and image feature extraction are performed on the image to be processed and the sample image. The calculation efficiency is higher when comparing features.
在一个示例中,如图6所示处理器可以是神经网络处理器,神经网络处理器可以与控制器分别部署于主控芯片与NPU芯片中。In an example, the processor shown in FIG. 6 may be a neural network processor, and the neural network processor and the controller may be respectively deployed in the main control chip and the NPU chip.
如图6中的(a)所示,NPU芯片可以包括CPU与矩阵计算单元,其中,CPU可以用于执行图像特征对比时的处理逻辑;矩阵计算单元可以用于执行图像特征对比时的矩阵运算;主控芯片可以用于图像管理。例如,如图6中的(b)所示主控芯片可以用于获取 数据库中的图像,比如可以是通过安防系统获取的黑名单人脸图像,或者,黑名单车辆图像;NPU芯片可以接收主控芯片发送的数据库图像以及摄像模组拍摄的待处理图像,NPU芯片中的CPU可以用于控制矩阵计算单元开始执行图像对比;矩阵计算单元可以用于将获取的摄像模组拍摄的待处理图像的图像特征加载到矩阵计算单元的左矩阵,将黑名单图像特征加载到矩阵计算单元的右矩阵,通过矩阵乘加运算得到人脸相似度。As shown in (a) in Figure 6, the NPU chip can include a CPU and a matrix calculation unit, where the CPU can be used to perform processing logic during image feature comparison; the matrix calculation unit can be used to perform matrix operations during image feature comparison ; The main control chip can be used for image management. For example, as shown in Figure 6(b), the main control chip can be used to obtain images in the database, such as blacklisted face images obtained through the security system, or blacklisted vehicle images; the NPU chip can receive the main The database image sent by the control chip and the image to be processed taken by the camera module, the CPU in the NPU chip can be used to control the matrix calculation unit to start performing image comparison; the matrix calculation unit can be used to obtain the image to be processed taken by the camera module Load the image characteristics of the image into the left matrix of the matrix calculation unit, load the blacklist image characteristics into the right matrix of the matrix calculation unit, and obtain the face similarity through the matrix multiplication and addition operation.
需要说明的是,图6以NPU芯片中包括CPU与矩阵计算单元为例进行说明,NPU中也可以不包括CPU,比如NPU芯片可以与部署于NPU芯片外部的CPU进行连接。It should be noted that FIG. 6 takes the NPU chip including the CPU and the matrix calculation unit as an example for illustration. The NPU may not include the CPU. For example, the NPU chip may be connected to a CPU deployed outside the NPU chip.
在一个示例中,在NPU芯片中包括CPU的情况下,相似度判别可以是在NPU芯片中包括CPU中执行。In an example, in the case where the NPU chip includes a CPU, the similarity determination may be performed in the NPU chip including the CPU.
例如,NPU芯片中的矩阵计算单元可以用于对待处理图像的图像特征与黑名单图像的图像特征进行矩阵运算,得到图像特征之间的相似度值(例如,余弦距离);NPU芯片中包括的CPU可以用于比较相似度值(例如,余弦距离)与预设阈值的大小;当相似度值小于预设阈值时,则可以说明待处理图像与黑名单图像中包括不同的目标对象。当相似度值大于或等于预设阈值时,则可以说明待处理图像与黑名单图像中包括相同的目标对象。在相似度值大于预设阈值情况下,NPU芯片可以将相似度值发送至主控芯片,主控芯片可以控制摄像模组中的球机摄像模组以转动的方式跟踪监控待处理图像中的目标对象。For example, the matrix calculation unit in the NPU chip can be used to perform matrix operations on the image features of the image to be processed and the image features of the blacklist image to obtain the similarity value (for example, the cosine distance) between the image features; the NPU chip includes The CPU can be used to compare the magnitude of the similarity value (for example, the cosine distance) with a preset threshold; when the similarity value is less than the preset threshold, it can indicate that the image to be processed and the blacklist image include different target objects. When the similarity value is greater than or equal to the preset threshold, it can indicate that the image to be processed and the blacklist image include the same target object. When the similarity value is greater than the preset threshold, the NPU chip can send the similarity value to the main control chip, and the main control chip can control the dome camera module in the camera module to track and monitor the image in the image to be processed in a rotating manner. target.
在另一个示例中,在NPU芯片中不包括CPU的情况下,相似度判别也可以是在主控芯片中执行的。In another example, when the NPU chip does not include a CPU, the similarity determination may also be performed in the main control chip.
例如,NPU芯片中的矩阵计算单元可以用于对待处理图像的图像特征与黑名单图像的图像特征进行矩阵运算,得到图像特征之间的相似度值(例如,余弦距离);并将相似度值发送至主控芯片,由主控芯片执行比较相似度值与预设阈值的大小,主控芯片可以根据相似度值控制摄像模组中的球机摄像模组是否跟踪监控待处理图像中的目标对象。例如,在相似度值大于预设阈值时,主控芯片可以控制摄像模组中的球机摄像模组以转动的方式跟踪监控待处理图像中的目标对象。For example, the matrix calculation unit in the NPU chip can be used to perform matrix operations on the image features of the image to be processed and the image features of the blacklisted image to obtain the similarity value (for example, cosine distance) between the image features; and the similarity value Send to the main control chip, the main control chip executes the comparison between the similarity value and the preset threshold. The main control chip can control whether the dome camera module in the camera module tracks and monitors the target in the image to be processed according to the similarity value Object. For example, when the similarity value is greater than the preset threshold, the main control chip can control the dome camera module in the camera module to track and monitor the target object in the image to be processed in a rotating manner.
上述图6所示的矩阵计算单元可以是图5所示的运算电路503或者向量计算单元507。The matrix calculation unit shown in FIG. 6 may be the arithmetic circuit 503 or the vector calculation unit 507 shown in FIG. 5.
应理解,上述举例说明是为了帮助本领域技术人员理解本申请实施例,而非要将本申请实施例限于所例示的具体数值或具体场景。本领域技术人员根据所给出的上述举例说明,显然可以进行各种等价的修改或变化,这样的修改或变化也落入本申请实施例的范围内。It should be understood that the above examples are intended to help those skilled in the art understand the embodiments of the present application, and are not intended to limit the embodiments of the present application to the specific numerical values or specific scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or changes based on the above examples given, and such modifications or changes also fall within the scope of the embodiments of the present application.
上文结合图1至图6,详细描述了本申请实施提供的监控装置,下面将结合图7至图9,详细描述本申请的提供的控制方法。The monitoring device provided by the implementation of the present application is described in detail above in conjunction with Figs. 1 to 6, and the control method provided by the present application will be described in detail below in conjunction with Figs. 7 to 9.
应理解,本申请实施例中的监控装置可以执行下面本申请实施例的控制方法,即以上各种监控装置的具体工作过程,可以参考下面的方法实施例中的对应过程。It should be understood that the monitoring device in the embodiment of the present application can execute the following control method of the embodiment of the present application, that is, for the specific working process of the above various monitoring devices, refer to the corresponding process in the following method embodiment.
图7是本申请实施例提供的控制方法的示意图。图7所示的控制方法可以应用于监控装置中,监控装置可以包括摄像模组、控制器以及处理器。Fig. 7 is a schematic diagram of a control method provided by an embodiment of the present application. The control method shown in FIG. 7 may be applied to a monitoring device, and the monitoring device may include a camera module, a controller, and a processor.
例如,图7所示的控制方法600可以应用于上述图2或图3所示的监控装置中。图7所示的控制方法包括步骤610至630,下面分别对这些步骤进行详细的描述。For example, the control method 600 shown in FIG. 7 may be applied to the monitoring device shown in FIG. 2 or FIG. 3 described above. The control method shown in FIG. 7 includes steps 610 to 630, and these steps are respectively described in detail below.
步骤610、摄像模组获取待处理图像。Step 610: The camera module obtains an image to be processed.
其中,监控装置可以部署于地铁口、楼宇或者道路交叉路口等位置,待处理图像可以是监控装置通过摄像模组拍摄到的监控范围内的画面。Among them, the monitoring device may be deployed at a subway entrance, a building, or a road intersection, and the image to be processed may be a picture within a monitoring range captured by the monitoring device through a camera module.
例如,待处理图像中可以包括目标对象;其中,目标对象可以是指通过识别算法得到的识别结果为非结构化数据的对象。For example, the image to be processed may include a target object; where the target object may refer to an object whose recognition result obtained by a recognition algorithm is unstructured data.
例如,目标对象可以是指人像,或者,目标对象可以是指人像的脸部,或者,目标对象还可以是指车辆;比如,具有明显特征且无法识别车牌号码的车辆。For example, the target object may refer to a portrait, or the target object may refer to the face of a portrait, or the target object may also refer to a vehicle; for example, a vehicle that has obvious characteristics and cannot recognize a license plate number.
示例性地,上述具有明显特征且无法识别车牌号码的车辆可以是指外观具有明显的凹陷部分、凸起部分或者划痕的车辆。Exemplarily, the above-mentioned vehicle with obvious characteristics and unable to identify the license plate number may refer to a vehicle with obvious recessed parts, raised parts or scratches in appearance.
步骤620、控制器可以向处理器发送样本图像。Step 620: The controller may send the sample image to the processor.
其中,样本图像可以是数据库中的图像;比如,样本图像可以是通过安防系统获取的黑名单人脸图像,或者,样本图像可以是获取的可疑车辆的图像,本申请对此不作任何限定。The sample image may be an image in the database; for example, the sample image may be a blacklisted face image obtained through a security system, or the sample image may be an image of a suspicious vehicle obtained, which is not limited in this application.
在一个示例,当监控装置需要拍摄道路中的行人的图像进行识别与分析时,样本图像可以是指数据库中的黑名单人脸图像或者需要识别的行人的样本图像。In an example, when the monitoring device needs to take images of pedestrians on the road for identification and analysis, the sample image may refer to a blacklisted face image in the database or a sample image of a pedestrian to be identified.
在一个示例,当监控装置需要拍摄道路中的车辆的图像进行识别与分析时,样本图像可以是数据库中的车辆图像,或者需要识别的车辆的样本图像。In an example, when the monitoring device needs to take images of vehicles on the road for identification and analysis, the sample images may be vehicle images in a database or sample images of vehicles that need to be identified.
步骤630、处理器可以对待处理图像与样本图像进行图像特征对比以得到对比结果。Step 630: The processor may perform image feature comparison between the image to be processed and the sample image to obtain a comparison result.
在本申请的实施例中,处理器可以接收控制器发送的样本图像以及摄像模组拍摄的待处理图像,对待处理图像以及样本图像进行特征对比,得到待处理图像与样本图像的对比结果,从而识别待处理图像中包括的目标对象。In the embodiment of the present application, the processor may receive the sample image sent by the controller and the image to be processed taken by the camera module, and compare the features of the image to be processed and the sample image to obtain the comparison result of the image to be processed and the sample image, thereby Identify the target object included in the image to be processed.
在一种可能的实现方式中,上述监控装置可以是枪机监控装置,即摄像模组可以是指枪机摄像模组;枪机摄像模组可以是广角枪机摄像机,也可以称为广角枪机或者枪机。In a possible implementation, the aforementioned monitoring device may be a bolt-action monitoring device, that is, the camera module may refer to a bolt-action camera module; the bolt-action camera module may be a wide-angle bolt-action camera, or it may be called a wide-angle gun Machine or box camera.
在摄像模组为枪机摄像模组的情况下,上述步骤610中待处理图像可以是枪机摄像模组获取的图像。In the case where the camera module is a box camera module, the image to be processed in step 610 may be an image obtained by the box camera module.
在另一种可能的实现方式中,如图3所示上述监控装置可以是枪机摄像模组与球机摄像模组协作的监控装置,可以称为枪球协作的监控装置,即摄像模组可以包括枪机摄像模组与球机摄像模组。In another possible implementation, as shown in FIG. 3, the above-mentioned monitoring device may be a monitoring device that cooperates with the camera module of the bullet camera and the camera module of the dome camera, and may be called the monitoring device of the cooperation of the bullet camera, namely the camera module. It can include a box camera camera module and a ball camera camera module.
在摄像模组包括枪机摄像模组与球机摄像模组的情况下,上述步骤610中待处理图像可以是枪机摄像模组获取的图像,或者也可以是球机摄像模组获取的图像。In the case that the camera module includes a box camera module and a dome camera module, the image to be processed in the above step 610 may be an image obtained by the box camera module, or may also be an image obtained by the dome camera module .
情况一Situation One
示例性地,在摄像模组包括枪机摄像模组与球机摄像模组的情况下,摄像模组中的枪机摄像模组获取上述待处理图像。Exemplarily, when the camera module includes a box camera module and a dome camera module, the box camera module in the camera module obtains the above-mentioned image to be processed.
例如,当待拍摄对象在枪机摄像模组的监控范围内与枪机摄像模组的距离较近,或者,枪机摄像模组可以清晰地监控到待拍摄对象,则摄像模组中的枪机摄像模组可以获取上述待处理图像。For example, when the object to be photographed is within the monitoring range of the box camera module and the distance between the box camera module and the box camera module is close, or the box camera module can clearly monitor the object to be photographed, the gun in the camera module The camera module can obtain the above-mentioned to-be-processed image.
情况二Situation two
示例性地,摄像模组中的球机摄像模组用于获取上述待处理图像。Exemplarily, the dome camera module in the camera module is used to obtain the above-mentioned image to be processed.
例如,待处理图像中可以包括目标对象,摄像模组中的球机摄像模组可以用于根据目标对象的目标坐标信息获取待处理图像,其中,目标坐标信息可以是通过对摄像模组中的 枪机摄像模组中目标对象的坐标信息进行坐标映射得到的。For example, the target object can be included in the image to be processed, and the dome camera module in the camera module can be used to obtain the image to be processed according to the target coordinate information of the target object. The coordinate information of the target object in the gun camera module is obtained by coordinate mapping.
例如,当目标对象与枪机摄像模组的距离较远时,则枪机摄像模组获取的目标对象的图像可能会存在像素小而无法满足识别要求的问题;此时,控制器可以根据获取目标对象在枪机摄像模组中坐标信息,通过预设的算法可以进行坐标映射得到目标对象在球机摄像模组的目标坐标信息,进而可以控制球机摄像模组的放大倍数或者缩放参数等,使得球机摄像模组可以监控到目标对象,获取到满足识别要求的待处理图像。For example, when the distance between the target object and the camera module of the box camera is far, the image of the target object acquired by the camera module of the box camera may have the problem of small pixels that cannot meet the recognition requirements; at this time, the controller can obtain The coordinate information of the target object in the camera module of the dome camera can be mapped through the preset algorithm to obtain the target coordinate information of the target object in the camera module of the dome camera, and then the magnification or zoom parameters of the camera module of the dome camera can be controlled. , So that the camera module of the dome camera can monitor the target object and obtain the to-be-processed image that meets the recognition requirements.
在本申请的实施例中,可以通过摄像模组中的枪机摄像模组或者球机摄像模组获取待处理图像,并将待处理图像发送至处理器;处理器可以用于对待处理图像与样本图像进行图像特征对比,以得到对比结果。通过本申请实施例提供的控制方法,实现了在监控装置中完成待处理图像的获取、处理以及分析的过程,无需将获取的待处理图像传输至部署于后台的服务器中进行处理与分析,从而避免了通信网络引入的时延问题,提高了待处理图像的处理效率。In the embodiment of the present application, the image to be processed can be obtained through the box camera module or the dome camera module in the camera module, and the image to be processed is sent to the processor; the processor can be used to connect the image to be processed with The sample image is compared with image features to obtain the comparison result. Through the control method provided in the embodiments of the present application, the process of acquiring, processing, and analyzing the image to be processed in the monitoring device is realized, without the need to transmit the acquired image to be processed to a server deployed in the background for processing and analysis, thereby The time delay introduced by the communication network is avoided, and the processing efficiency of the image to be processed is improved.
可选地,在本申请的实施例中可以通过神经网络对待处理图像与样本图像进行图像特征提取以及图像特征对比,得到对比结果。Optionally, in the embodiment of the present application, a neural network may be used to perform image feature extraction and image feature comparison between the image to be processed and the sample image to obtain a comparison result.
进一步地,上述控制方法还可以包括:处理器可以向控制器发送对比结果;控制器可以根据对比结果控制摄像模组中的球机摄像模组是否跟踪监控待处理图像中的目标对象。Further, the above control method may further include: the processor may send a comparison result to the controller; the controller may control whether the dome camera module in the camera module tracks and monitors the target object in the image to be processed according to the comparison result.
例如,上述对比结果可以是指待处理图像与样本图像的相似度值。For example, the aforementioned comparison result may refer to the similarity value between the image to be processed and the sample image.
具体地,神经网络处理器首先可以获取待处理图像(例如,行人图像)与样本图样(例如,黑名单人脸图像数据),接着对待处理图像与样本图像进行图像特征提取,得到待处理图像的图像特征与样本图像的图像特征;根据待处理图像的图像特征与样本图像的图像特征,确定图像特征的相似度值。Specifically, the neural network processor can first obtain images to be processed (for example, pedestrian images) and sample patterns (for example, blacklisted face image data), and then perform image feature extraction on the images to be processed and sample images to obtain Image features and image features of the sample image; according to the image features of the image to be processed and the image features of the sample image, determine the similarity value of the image features.
在一个示例中,可以通过待处理图像的图像特征与样本图像的图像特征之间的余弦距离来度量图像特征的相似度值。In one example, the similarity value of the image feature can be measured by the cosine distance between the image feature of the image to be processed and the image feature of the sample image.
例如,可以通过以下等式确定待处理图像与样本图像的相似度值:For example, the similarity value between the image to be processed and the sample image can be determined by the following equation:
Figure PCTCN2019115138-appb-000004
Figure PCTCN2019115138-appb-000004
其中,i可以表示第i个图像特征;n可以表示图像特征的数量;A可以表示待处理图像特征;B可以表示样本图像特征;A i可以表示待处理图像中第i个图像特征;B i可以表示样本图像中第i个图像特征,即样本图像中与A i对应的图像特征。 Among them, i can represent the i-th image feature; n can represent the number of image features; A can represent the image feature to be processed; B can represent the sample image feature; A i can represent the i-th image feature in the image to be processed; B i may represent the i-th sample image features of the image, i.e., image features with sample image corresponding to the a i.
在一个示例中,控制器可以根据接收的相似度值与预设阈值进行比较,当相似度值小于预设阈值时,则说明待处理图像与样本图像中包括不同的目标对象;比如,当目标对象为人像,或者人脸图像时,则可以表明监控的行人不是黑名单库中的行人。当相似度值大于或等于预设阈值时,则说明待处理图像与样本图像中包括相同的目标对象;比如,当目标对象为人像,或者人脸图像时,则可以表明监控的行人是黑名单库中的行人。In one example, the controller may compare the received similarity value with a preset threshold. When the similarity value is less than the preset threshold, it means that the image to be processed and the sample image include different target objects; for example, when the target When the object is a portrait or a face image, it can indicate that the monitored pedestrian is not a pedestrian in the blacklist database. When the similarity value is greater than or equal to the preset threshold, it means that the image to be processed and the sample image include the same target object; for example, when the target object is a portrait or face image, it can indicate that the monitored pedestrian is a blacklist Pedestrians in the library.
进一步,在上述相似度值大于预设阈值时,控制器可以控制摄像模组中的球机摄像模组以转动的方式跟踪监控待处理图像中的目标对象。Further, when the aforementioned similarity value is greater than a preset threshold, the controller may control the dome camera module in the camera module to track and monitor the target object in the image to be processed in a rotating manner.
在一个示例中,处理器可以根据相似度值与预设阈值进行比较,并将比较结果发送至控制器。In an example, the processor may compare the similarity value with a preset threshold value, and send the comparison result to the controller.
在本申请的实施例中,在确定待处理图像与样本图像的相似度值大于预设阈值的情况下,可以通过控制器控制球机摄像模组持续跟踪目标对象,避免当目标对象远离枪机摄像模组的监控范围时无法监控目标对象的问题,通过本申请实施例提出的球机摄像模组的持续跟踪机制可以获取目标对象的更多信息,从而提升监控装置的安全性能,提高破案效率。In the embodiment of the present application, when it is determined that the similarity value between the image to be processed and the sample image is greater than the preset threshold, the dome camera module can be controlled by the controller to continuously track the target object, so as to avoid when the target object is far away from the gun. The problem that the camera module cannot monitor the target object during the monitoring range of the camera module. Through the continuous tracking mechanism of the dome camera module proposed in the embodiment of this application, more information about the target object can be obtained, thereby improving the security performance of the monitoring device and improving the efficiency of solving crimes. .
下面结合图8与图9对适用于枪球协作的监控装置的控制方法进行详细说明。对于枪球协作的监控装置,摄像模组获取的图像可以是枪机摄像模组获取的图像,或者,摄像模组获取的图像也可以是球机摄像模组获取的图像,下面分别对两种不同的可能情形进行详细的说明。The control method of the monitoring device suitable for gun-and-ball cooperation will be described in detail below in conjunction with FIG. 8 and FIG. 9. For a surveillance device with gun-and-ball cooperation, the image acquired by the camera module can be the image acquired by the box camera module, or the image acquired by the camera module can also be the image acquired by the dome camera module. The different possible situations are explained in detail.
图8是本申请实施例提供的控制方法的示意图。该控制方法可以应用于枪球协作的监控装置,图8所示的控制方法700包括步骤701至步骤710,下面分别对这些步骤进行详细的描述。Fig. 8 is a schematic diagram of a control method provided by an embodiment of the present application. This control method can be applied to a monitoring device for gun-and-ball cooperation. The control method 700 shown in FIG. 8 includes steps 701 to 710, and these steps are respectively described in detail below.
需要说明的是,图8所示的控制方法以获取的待处理图像中的目标对象为人像进行举例说明。图8所示的控制方法还可以应用于包括其它目标对象的待处理图像,其中,目标对象可以是指通过识别算法得到的识别结果为非结构化数据的对象。It should be noted that the control method shown in FIG. 8 is illustrated by taking the target object in the acquired image to be processed as a portrait. The control method shown in FIG. 8 can also be applied to a to-be-processed image that includes other target objects, where the target object may refer to an object whose recognition result obtained by a recognition algorithm is unstructured data.
步骤701、控制器可以向枪机摄像模组发送坐标系同步请求。Step 701: The controller may send a coordinate system synchronization request to the bolt camera module.
步骤702、控制器可以向枪机摄像模组发送坐标系同步请求。Step 702: The controller may send a coordinate system synchronization request to the bolt camera module.
需要说明的是,通过上述步骤701与步骤702可以请求枪机摄像模组与球机摄像模组实现坐标系的同步,上述步骤701与步骤702可以是同时执行的,也可以是先执行步骤702,再执行步骤701,本申请对步骤701与步骤702的执行顺序不作任何限定。It should be noted that, through the above steps 701 and 702, it is possible to request the bolt camera module and the dome camera module to realize the synchronization of the coordinate system. The above steps 701 and 702 can be performed at the same time, or step 702 can be performed first. , Step 701 is executed again, and the execution sequence of step 701 and step 702 is not limited in this application.
应理解,在本申请的实施例中,枪机摄像模组与球机摄像模组可以集成于一体机本体,且可以与控制器及NPU进行通信;上述控制器与NPU可以集成于同一芯片中,或者,控制器与NPU也可以部署于物理上独立的两个芯片中。It should be understood that, in the embodiments of the present application, the box camera module and the dome camera module can be integrated into the body of the all-in-one camera, and can communicate with the controller and the NPU; the above controller and the NPU can be integrated in the same chip Or, the controller and NPU can also be deployed in two physically independent chips.
步骤703、枪机摄像模组可以向控制器发送坐标系同步成功。Step 703: The box camera module may send the coordinate system synchronization success to the controller.
步骤704、球机摄像模组可以向控制器发送坐标系同步成功。Step 704: The dome camera module may send the coordinate system synchronization success to the controller.
同理,上述步骤703与步骤704可以是同时执行的,也可以是先执行步骤704,再执行步骤703,本申请对步骤703与步骤704的执行顺序不作任何限定。In the same way, the above steps 703 and 704 may be performed at the same time, or step 704 may be performed first, and then step 703 may be performed. The present application does not limit the execution order of step 703 and step 704 in any way.
步骤705、控制器向NPU发送样本数据。Step 705: The controller sends sample data to the NPU.
在一种可能的实现方式中,上述样本数据可以是指样本图像。In a possible implementation manner, the aforementioned sample data may refer to sample images.
例如,样本数据可以是指黑名单图像库;比如,可以是黑名单人脸图像,或者也可以是黑名单车辆图像。For example, the sample data may refer to a blacklisted image library; for example, it may be a blacklisted face image, or it may also be a blacklisted vehicle image.
在一种可能的实现方式中,上述样本数据可以是指通过神经网络算法对样本图像进行特征提取后得到的黑名单图像特征。In a possible implementation manner, the above-mentioned sample data may refer to blacklist image features obtained after feature extraction of the sample image through a neural network algorithm.
需要说明的是,控制器向NPU发送的样本数据可以是原始的黑名单图像,也可以是对黑名单数据库进行特征提取后得到的图像特征,本申请对此不作任何限定。It should be noted that the sample data sent by the controller to the NPU may be the original blacklist image, or may be image features obtained after feature extraction on the blacklist database, and this application does not make any limitation on this.
步骤706、枪机摄像模组可以向NPU发送图像(例如,待处理图像)。Step 706: The box camera module may send an image (for example, an image to be processed) to the NPU.
其中,上述图像可以是枪机摄像模组在监控范围内拍摄的图像。Wherein, the above-mentioned image may be an image taken by the box camera module within the monitoring range.
示例性地,在图像中可以包括目标对象,例如,目标对象可以是人脸,或者,目标对象可以是具有明显特征且车牌号码无法识别的车辆。Exemplarily, the target object may be included in the image. For example, the target object may be a human face, or the target object may be a vehicle with obvious characteristics and an unrecognizable license plate number.
在NPU获取枪机摄像模组发送的图像后,可以在NPU中通过检测网络、跟踪网络以 及图像选取网络对图像进行处理。其中,检测网络用于获取图像中的人像坐标;跟踪网络用于对图像中的人像进行标记;图像选取网络用于对图像质量进行评估,确定图像质量较好的图像。After the NPU obtains the image sent by the box camera module, the image can be processed in the NPU through the detection network, the tracking network, and the image selection network. Among them, the detection network is used to obtain the coordinates of the portrait in the image; the tracking network is used to mark the portrait in the image; the image selection network is used to evaluate the image quality and determine the image with better image quality.
需要说明的是,上述检测网络、跟踪网络以及图像选取网络可以是在NPU中执行的不同算法。It should be noted that the aforementioned detection network, tracking network, and image selection network may be different algorithms executed in the NPU.
示例性地,NPU接收枪机摄像模组发送的多帧图像,检测网络可以检测出多帧图像的每帧图像中的人像所在的坐标;跟踪网络可以对多帧图像中属于同一个行人的人像进行标记;图像选取网络可以评估多帧图像的图像质量,进行最优帧图像的选取,即可以从多帧图像中确定需要识别的图像。Exemplarily, the NPU receives multi-frame images sent by the box camera module, and the detection network can detect the coordinates of the portrait in each frame of the multi-frame image; the tracking network can detect the portrait of the same pedestrian in the multi-frame image Marking; the image selection network can evaluate the image quality of multi-frame images and select the optimal frame image, that is, the image that needs to be recognized can be determined from the multi-frame image.
进一步地,可以对上述最优帧图像进行识别,即执行步骤707。Further, the above-mentioned optimal frame image can be identified, that is, step 707 is executed.
步骤707、NPU芯片进行人脸对比,确定相似度值。Step 707: The NPU chip performs face comparison to determine the similarity value.
在一个示例中,控制器向NPU发送的样本数据可以是样本图像,则NPU可以对图像(例如,上述最优帧图像)中的人像与样本图像进行图像特征提取,得到人像的图像特征与样本图像的图像特征;根据人像的图像特征与样本图像的图像特征,确定图像特征的相似度值。In an example, the sample data sent by the controller to the NPU may be a sample image, and the NPU may perform image feature extraction on the portrait and the sample image in the image (for example, the above-mentioned optimal frame image) to obtain image features and samples of the portrait The image characteristics of the image; according to the image characteristics of the portrait and the image characteristics of the sample image, the similarity value of the image characteristics is determined.
在一个示例中,控制器向NPU发送的样本数据可以是经过神经网络算法获取的样本图像特征,则NPU可以采用相同的神经网络算法对图像(例如,上述最优帧图像)中的人像进行图像特征提取,获取人像的图像特征;根据人像的图像特征与样本图像的图像特征,确定图像特征的相似度值。In an example, the sample data sent by the controller to the NPU may be sample image features obtained through a neural network algorithm, and the NPU may use the same neural network algorithm to image the portrait in the image (for example, the above-mentioned optimal frame image). Feature extraction to obtain the image features of the portrait; according to the image features of the portrait and the image features of the sample image, determine the similarity value of the image features.
应理解,上述人像也可以是指人脸图像。It should be understood that the aforementioned portrait may also refer to a face image.
示例性地,可以通过人像的图像特征与样本图像的图像特征之间的余弦距离来度量图像特征的相似度值。Exemplarily, the similarity value of the image feature can be measured by the cosine distance between the image feature of the portrait and the image feature of the sample image.
例如,可以通过以下等式确定待处理图像与样本图像的相似度值:For example, the similarity value between the image to be processed and the sample image can be determined by the following equation:
Figure PCTCN2019115138-appb-000005
Figure PCTCN2019115138-appb-000005
其中,i可以表示第i个图像特征;n可以表示图像特征的数量;A可以表示待处理图像特征;B可以表示样本图像特征;A i可以表示待处理图像中第i个图像特征;B i可以表示样本图像中第i个图像特征,即样本图像中与A i对应的图像特征。 Among them, i can represent the i-th image feature; n can represent the number of image features; A can represent the image feature to be processed; B can represent the sample image feature; A i can represent the i-th image feature in the image to be processed; B i may represent the i-th sample image features of the image, i.e., image features with sample image corresponding to the a i.
步骤708、NPU向控制器发送相似度值。Step 708: The NPU sends the similarity value to the controller.
步骤709、控制器判断是否对目标对象进行持续跟踪。Step 709: The controller determines whether to continuously track the target object.
例如,控制器根据预设阈值与相似度值进行比较,当相似度值小于预设阈值时,则说明待处理图像中的人像与样本图像中包括不同的人像,则可以表明监控的行人不是黑名单库中的行人;当相似度值大于或等于预设阈值时,则说明待处理图像中的人像与样本图像中包括相同的人像,则可以表明监控的行人是黑名单库中的行人。For example, the controller compares the preset threshold with the similarity value. When the similarity value is less than the preset threshold, it means that the image to be processed and the sample image include different portraits, which can indicate that the monitored pedestrian is not black. Pedestrians in the list library; when the similarity value is greater than or equal to the preset threshold, it means that the portrait in the image to be processed and the sample image include the same portrait, which can indicate that the monitored pedestrian is a pedestrian in the blacklist library.
步骤710、在相似度值大于或等于预设阈值的情况下,控制器控制球机摄像模组持续跟踪目标对象。Step 710: When the similarity value is greater than or equal to the preset threshold, the controller controls the dome camera module to continuously track the target object.
例如,控制器确定相似度值大于或等于预设阈值的情况下,控制器可以立即发送告警指令,并控制球机摄像模组持续跟踪目标对象。For example, when the controller determines that the similarity value is greater than or equal to the preset threshold, the controller can immediately send an alarm instruction and control the dome camera module to continuously track the target object.
在图8所示的控制方法中,对待处理图像为摄像模组中的枪机摄像模组获取的图像进行了详细描述,下面结合图9,对摄像模组中的球机摄像模组获取待处理图像的实施例进行详细说明。In the control method shown in FIG. 8, the image to be processed is the image obtained by the box camera module in the camera module. The following is a detailed description of the dome camera module in the camera module. The embodiment of processing the image will be described in detail.
图9是本申请实施例提供的控制方法的示意图。该控制方法可以应用于枪球协作的监控装置,图9所示的控制方法800包括步骤801至步骤815,下面分别对这些步骤进行详细的描述。Fig. 9 is a schematic diagram of a control method provided by an embodiment of the present application. This control method can be applied to a monitoring device for gun-and-ball cooperation. The control method 800 shown in FIG. 9 includes steps 801 to 815, and these steps are respectively described in detail below.
应理解,图9所示的控制方法以获取的待处理图像中的目标对象为人像进行举例说明。图9所示的控制方法还应用于包括其它目标对象的待处理图像,其中,目标对象可以是指通过识别算法得到的识别结果为非结构化数据的对象。It should be understood that the control method shown in FIG. 9 is illustrated by taking the target object in the acquired image to be processed as a portrait. The control method shown in FIG. 9 is also applied to a to-be-processed image including other target objects, where the target object may refer to an object whose recognition result obtained by a recognition algorithm is unstructured data.
步骤801、控制器可以向枪机摄像模组发送坐标系同步请求。Step 801: The controller may send a coordinate system synchronization request to the bolt camera module.
步骤802、控制器可以向枪机摄像模组发送坐标系同步请求。Step 802: The controller may send a coordinate system synchronization request to the bolt camera module.
需要说明的是,通过上述步骤801与步骤802可以请求枪机摄像模组与球机摄像模组实现坐标系的同步,上述步骤801与步骤802可以是同时执行的,也可以是先执行步骤802,再执行步骤801,本申请对步骤801与步骤802的执行顺序不作任何限定。It should be noted that, through the above steps 801 and 802, the bolt camera module and the dome camera module can be requested to synchronize the coordinate system. The above steps 801 and 802 can be executed at the same time, or step 802 can be executed first. , Step 801 is executed again, and the execution sequence of step 801 and step 802 is not limited in this application.
应理解,在本申请的实施例中,枪机摄像模组与球机摄像模组可以集成于一体机本体,且可以与控制器及NPU进行通信;上述控制器与NPU可以集成于同一芯片中,或者,控制器与NPU也可以部署于物理上独立的两个芯片中。It should be understood that, in the embodiments of the present application, the box camera module and the dome camera module can be integrated into the body of the all-in-one camera, and can communicate with the controller and the NPU; the above controller and the NPU can be integrated in the same chip Or, the controller and NPU can also be deployed in two physically independent chips.
步骤803、枪机摄像模组可以向控制器发送坐标系同步成功。Step 803: The box camera module may send the coordinate system synchronization success to the controller.
步骤804、球机摄像模组可以向控制器发送坐标系同步成功。Step 804: The dome camera module may send the coordinate system synchronization success to the controller.
同理,上述步骤803与步骤804可以是同时执行的,也可以是先执行步骤804,再执行步骤803,本申请对步骤803与步骤804的执行顺序不作任何限定。In the same way, the above step 803 and step 804 may be performed at the same time, or step 804 may be performed first, and then step 803 may be performed. The present application does not limit the execution order of step 803 and step 804 in any way.
步骤805、控制器向NPU发送样本数据。Step 805: The controller sends sample data to the NPU.
在一种可能的实现方式中,上述样本数据可以是指样本图像。In a possible implementation manner, the aforementioned sample data may refer to sample images.
例如,可以是指黑名单图像库,比如可以是黑名单人脸图像,或者也可以是黑名单车辆图像。For example, it may refer to a blacklisted image library, for example, it may be a blacklisted face image, or it may also be a blacklisted vehicle image.
在一种可能的实现方式中,上述样本数据可以是指通过神经网络算法对样本图像进行特征提取后得到的黑名单图像特征。In a possible implementation manner, the above-mentioned sample data may refer to blacklist image features obtained after feature extraction of the sample image through a neural network algorithm.
需要说明的是,控制器向NPU发送的样本数据可以是原始的黑名单图像,也可以是对黑名单数据库进行特征提取后得到的图像特征,本申请对此不作任何限定。It should be noted that the sample data sent by the controller to the NPU may be the original blacklist image, or may be image features obtained after feature extraction on the blacklist database, and this application does not make any limitation on this.
步骤806、枪机摄像模组可以向NPU发送第一图像。Step 806: The box camera module may send the first image to the NPU.
其中,第一图像可以是枪机摄像模组在监控范围内拍摄的图像。Wherein, the first image may be an image taken by the box camera module within the monitoring range.
步骤807、NPU检测第一图像中的人像坐标。Step 807: The NPU detects the portrait coordinates in the first image.
具体地,在NPU获取枪机摄像模组发送的第一图像后,通过检测网络确定第一图像中包括移动的目标对象,但是目标对象太小无法满足识别需求;例如,可能是第一图像中的人像的像素小而无法满足识别要求。此时,NPU可以将通过检测网络得到的第一图像中的人像坐标发送至控制器,由控制器进而控制球机摄像模组获取该行人的图像。Specifically, after the NPU obtains the first image sent by the box camera module, it is determined through the detection network that the first image includes a moving target object, but the target object is too small to meet the recognition requirements; for example, it may be in the first image The pixels of the portrait are too small to meet the recognition requirements. At this time, the NPU may send the portrait coordinates in the first image obtained through the detection network to the controller, and the controller then controls the dome camera module to obtain the image of the pedestrian.
步骤808、NPU向控制器发送第一图像中的人像坐标。Step 808: The NPU sends the portrait coordinates in the first image to the controller.
进一步,控制器可以根据获取的第一图像中的人像坐标,通过坐标映射得到人像在球机摄像模组中的目标坐标信息。Further, the controller can obtain the target coordinate information of the portrait in the dome camera module through coordinate mapping according to the portrait coordinates in the acquired first image.
步骤809、控制器向球机摄像模组发送目标坐标信息。Step 809: The controller sends target coordinate information to the camera module of the dome camera.
步骤810、球机摄像模组根据目标坐标,进行云台全方位移动及镜头变倍、变焦控制(Pan/Tilt/Zoom,PTZ)调整。Step 810: The camera module of the dome camera performs omni-directional movement of the pan/tilt, lens zoom, and zoom control (Pan/Tilt/Zoom, PTZ) adjustments according to the target coordinates.
例如,球机摄像模组根据目标坐标信息通过平移、旋转和变焦等调整至最佳监控位置后获取目标的图像。For example, the dome camera module obtains an image of the target after being adjusted to the best monitoring position through translation, rotation, and zooming according to the target coordinate information.
步骤811、球机摄像模组可以向NPU发送第二图像。Step 811: The dome camera module may send the second image to the NPU.
示例性地,NPU可以通过检测网络、跟踪网络以及图像选取网络对获取的多帧第二图像进行处理,得到多帧第二图像中的最优帧图像;具体处理流程可以参见上述图8所示的步骤706,此处不再赘述。Exemplarily, the NPU can process the acquired multi-frame second image through the detection network, the tracking network, and the image selection network to obtain the optimal frame image in the multi-frame second image; the specific processing flow can be seen in Figure 8 above Step 706 is not repeated here.
进一步地,可以对多帧第二图像中的最优帧图像进行识别,即执行步骤812。Further, the optimal frame image among the multiple frames of second images may be identified, that is, step 812 is performed.
步骤812、NPU进行人脸对比,确定相似度值。Step 812: The NPU performs face comparison and determines the similarity value.
在一个示例中,控制器向NPU发送的样本数据可以是样本图像,则NPU可以对第二图像(例如,多帧第二图中的最优帧图像)中的人像与样本图像进行图像特征提取,得到人像的图像特征与样本图像的图像特征;根据人像的图像特征与样本图像的图像特征,确定图像特征的相似度值。In an example, the sample data sent by the controller to the NPU may be a sample image, and the NPU may perform image feature extraction on the portrait and the sample image in the second image (for example, the optimal frame image in the multi-frame second image) , Get the image features of the portrait and the image features of the sample image; determine the similarity value of the image features according to the image features of the portrait and the image features of the sample image.
在一个示例中,控制器向NPU发送的样本数据可以是经过神经网络算法获取的样本图像特征,则NPU可以采用相同的神经网络算法对第二图像中的人像进行图像特征提取,获取人像的图像特征;根据人像的图像特征与样本图像的图像特征,确定图像特征的相似度值。In an example, the sample data sent by the controller to the NPU may be sample image features obtained through a neural network algorithm, and the NPU may use the same neural network algorithm to extract image features of the portrait in the second image to obtain the image of the portrait Features: Determine the similarity value of the image features according to the image features of the portrait and the image features of the sample image.
应理解,上述人像也可以是指人脸图像。It should be understood that the aforementioned portrait may also refer to a face image.
示例性地,可以通人像的图像特征与样本图像的图像特征之间的余弦距离来度量图像特征的相似度值。Exemplarily, the cosine distance between the image feature of the portrait and the image feature of the sample image can be used to measure the similarity value of the image feature.
例如,可以通过以下等式确定待处理图像(例如,第二图像)与样本图像的相似度值:For example, the similarity value between the image to be processed (for example, the second image) and the sample image can be determined by the following equation:
Figure PCTCN2019115138-appb-000006
Figure PCTCN2019115138-appb-000006
其中,i可以表示第i个图像特征;n可以表示图像特征的数量;A可以表示待处理图像特征;B可以表示样本图像特征;A i可以表示待处理图像中第i个图像特征;B i可以表示样本图像中第i个图像特征,即样本图像中与A i对应的图像特征。 Among them, i can represent the i-th image feature; n can represent the number of image features; A can represent the image feature to be processed; B can represent the sample image feature; A i can represent the i-th image feature in the image to be processed; B i may represent the i-th sample image features of the image, i.e., image features with sample image corresponding to the a i.
步骤813、NPU向控制器发送相似度值。Step 813: The NPU sends the similarity value to the controller.
步骤814、控制器判断是否对目标对象进行持续跟踪。Step 814: The controller determines whether to continuously track the target object.
例如,控制器根据预设阈值与相似度值进行比较,当相似度值小于预设阈值时,则说明第二图像中的人像与样本图像包括不同的人像,则可以表明监控的行人不是黑名单库中的行人;当相似度值大于或等于预设阈值时,则说明第二图像中的人像与样本图像包括相同的人像,则可以表明监控的行人是黑名单库中的行人。For example, the controller compares the preset threshold with the similarity value. When the similarity value is less than the preset threshold, it means that the portrait in the second image and the sample image include different portraits, which can indicate that the monitored pedestrian is not a blacklist. Pedestrians in the library; when the similarity value is greater than or equal to the preset threshold, it means that the portrait in the second image and the sample image include the same portrait, which can indicate that the monitored pedestrian is a pedestrian in the blacklist library.
步骤815、在相似度值大于或等于预设阈值的情况下,控制器可以控制球机摄像模组持续跟踪目标对象。Step 815: When the similarity value is greater than or equal to the preset threshold, the controller may control the dome camera module to continuously track the target object.
例如,在控制器确定相似度值大于或等于预设阈值的情况下,控制器可以立即发送告警指令,并控制球机摄像模组持续跟踪目标对象。For example, when the controller determines that the similarity value is greater than or equal to the preset threshold, the controller can immediately send an alarm instruction and control the dome camera module to continuously track the target object.
在本申请的实施例中,可以通过摄像模组中的枪机摄像模组或者球机摄像模组获取待处理图像,并将待处理图像发送至神经网络处理器;神经网络处理器可以用于对待处理图像与样本图像进行图像特征对比,以得到对比结果。通过本申请实施例提供的控制方法,实现了在监控装置中完成待处理图像的获取、处理以及分析的过程,无需将获取的待处理图像传输至部署于后台的服务器中进行处理与分析,从而避免了通信网络引入的时延问题,提高了待处理图像的处理效率。In the embodiment of the present application, the image to be processed can be obtained through the box camera module or the dome camera module in the camera module, and the image to be processed is sent to the neural network processor; the neural network processor can be used for Perform image feature comparison between the image to be processed and the sample image to obtain the comparison result. Through the control method provided in the embodiments of the present application, the process of acquiring, processing, and analyzing the image to be processed in the monitoring device is realized, without the need to transmit the acquired image to be processed to a server deployed in the background for processing and analysis, thereby The time delay introduced by the communication network is avoided, and the processing efficiency of the image to be processed is improved.
此外,在本申请的实施例中,在控制器确定待处理图像与样本图像的相似度值大于预设阈值的情况下,可以通过控制器控制球机摄像模组持续跟踪目标对象,避免当目标对象远离枪机摄像模组的监控范围时无法监控目标对象的问题,通过本申请实施例提出的球机摄像模组的持续跟踪机制可以获取目标对象的更多信息,从而提升监控装置的安全性能。In addition, in the embodiment of the present application, when the controller determines that the similarity value between the image to be processed and the sample image is greater than the preset threshold, the camera module of the dome camera can be controlled by the controller to continuously track the target object, so as to avoid being used as the target object. The problem that the target object cannot be monitored when the object is far away from the monitoring range of the bullet camera module. The continuous tracking mechanism of the dome camera module proposed in the embodiment of this application can obtain more information about the target object, thereby improving the security performance of the monitoring device .
应理解,上述举例说明是为了帮助本领域技术人员理解本申请实施例,而非要将本申请实施例限于所例示的具体数值或具体场景。本领域技术人员根据所给出的上述举例说明,显然可以进行各种等价的修改或变化,这样的修改或变化也落入本申请实施例的范围内。It should be understood that the above examples are intended to help those skilled in the art understand the embodiments of the present application, and are not intended to limit the embodiments of the present application to the specific numerical values or specific scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or changes based on the above examples given, and such modifications or changes also fall within the scope of the embodiments of the present application.
应理解,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that the term "and/or" in this text is only an association relationship describing the associated objects, indicating that there can be three types of relationships, for example, A and/or B, which can mean: A alone exists, and both A and B exist. , There are three cases of B alone. In addition, the character "/" in this text generally indicates that the associated objects before and after are in an "or" relationship.
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that in the various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not correspond to the embodiments of the present application. The implementation process constitutes any limitation.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of the description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiment, which is not repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, the functional modules in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储 在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disks or optical disks and other media that can store program codes. .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Should be covered within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (18)

  1. 一种监控装置,其特征在于,包括摄像模组、控制器以及处理器,其中,A monitoring device, which is characterized by comprising a camera module, a controller and a processor, wherein:
    所述摄像模组用于获取待处理图像;The camera module is used to obtain images to be processed;
    所述控制器用于向所述处理器发送样本图像;The controller is used to send a sample image to the processor;
    所述处理器用于对所述待处理图像与所述样本图像进行图像特征对比以得到对比结果。The processor is configured to perform image feature comparison between the to-be-processed image and the sample image to obtain a comparison result.
  2. 如权利要求1所述的监控装置,其特征在于,所述处理器还用于向所述控制器发送所述对比结果;The monitoring device according to claim 1, wherein the processor is further configured to send the comparison result to the controller;
    所述控制器用于根据所述对比结果控制所述摄像模组中的球机摄像模组是否跟踪监控所述待处理图像中的目标对象。The controller is used to control whether the dome camera module in the camera module tracks and monitors the target object in the image to be processed according to the comparison result.
  3. 如权利要求2所述的监控装置,其特征在于,所述对比结果为所述待处理图像与所述样本图像的相似度值。3. The monitoring device according to claim 2, wherein the comparison result is a similarity value between the image to be processed and the sample image.
  4. 如权利要求3所述的监控装置,其特征在于,所述控制器还用于:The monitoring device according to claim 3, wherein the controller is further used for:
    在所述相似度值大于预设阈值时,控制所述摄像模组中的球机摄像模组以转动的方式跟踪监控所述待处理图像中的目标对象。When the similarity value is greater than a preset threshold, the dome camera module in the camera module is controlled to track and monitor the target object in the image to be processed in a rotating manner.
  5. 如权利要求1至4中任一项所述的监控装置,其特征在于,所述摄像模组中的枪机摄像模组用于获取所述待处理图像。The monitoring device according to any one of claims 1 to 4, wherein the box camera module in the camera module is used to obtain the image to be processed.
  6. 如权利要求1至4中任一项所述的监控装置,其特征在于,所述摄像模组中的球机摄像模组用于获取所述待处理图像。The monitoring device according to any one of claims 1 to 4, wherein the dome camera module in the camera module is used to obtain the image to be processed.
  7. 如权利要求6所述的监控装置,其特征在于,所述待处理图像中包括目标对象,所述球机摄像模组用于根据所述目标对象的目标坐标信息获取所述待处理图像,其中,所述目标坐标信息是通过对所述摄像模组中的枪机摄像模组中所述目标对象的坐标信息进行坐标映射得到的。The monitoring device according to claim 6, wherein the image to be processed includes a target object, and the dome camera module is used to obtain the image to be processed according to the target coordinate information of the target object, wherein The target coordinate information is obtained by performing coordinate mapping on the coordinate information of the target object in the gun camera module of the camera module.
  8. 如权利要求2至7中任一项所述的监控装置,其特征在于,所述待处理图像中的目标对象为人像。8. The monitoring device according to any one of claims 2 to 7, wherein the target object in the image to be processed is a human image.
  9. 如权利要求1至8中任一项所述的监控装置,其特征在于,所述处理器为神经网络处理器。8. The monitoring device according to any one of claims 1 to 8, wherein the processor is a neural network processor.
  10. 一种控制方法,其特征在于,所述控制方法应用于监控装置中,所述监控装置包括摄像模组、控制器以及处理器,所述控制方法包括:A control method, characterized in that the control method is applied to a monitoring device, the monitoring device includes a camera module, a controller, and a processor, and the control method includes:
    所述摄像模组获取待处理图像;The camera module obtains an image to be processed;
    所述控制器向所述处理器发送样本图像;The controller sends a sample image to the processor;
    所述处理器对所述待处理图像与所述样本图像进行图像特征对比以得到对比结果。The processor performs image feature comparison between the image to be processed and the sample image to obtain a comparison result.
  11. 如权利要求10所述的控制方法,其特征在于,所述控制方法还包括:The control method according to claim 10, wherein the control method further comprises:
    所述处理器向所述控制器发送所述对比结果;Sending the comparison result to the controller by the processor;
    所述控制器根据所述对比结果控制所述摄像模组中的球机摄像模组是否跟踪监控所述待处理图像中的目标对象。The controller controls whether the dome camera module in the camera module tracks and monitors the target object in the image to be processed according to the comparison result.
  12. 如权利要求11所述的控制方法,其特征在于,所述对比结果为所述待处理图像 与所述样本图像的相似度值。The control method according to claim 11, wherein the comparison result is the similarity value between the image to be processed and the sample image.
  13. 如权利要求12所述的控制方法,其特征在于,所述控制器根据所述对比结果控制所述摄像模组中的球机摄像模组是否跟踪监控所述待处理图像中的目标对象,包括:The control method according to claim 12, wherein the controller controls whether the dome camera module in the camera module tracks and monitors the target object in the image to be processed according to the comparison result, comprising :
    在所述相似度值大于预设阈值时,所述控制器控制所述摄像模组中的球机摄像模组以转动的方式跟踪监控所述待处理图像中的目标对象。When the similarity value is greater than a preset threshold, the controller controls the dome camera module in the camera module to track and monitor the target object in the image to be processed in a rotating manner.
  14. 如权利要求10至13中任一项所述的控制方法,其特征在于,所述摄像模组获取待处理图像,包括:The control method according to any one of claims 10 to 13, wherein the camera module acquiring the image to be processed includes:
    所述摄像模组中的枪机摄像模组获取所述待处理图像。The box camera module in the camera module obtains the image to be processed.
  15. 如权利要求10至13中任一项所述的控制方法,其特征在于,所述摄像模组获取待处理图像,包括:The control method according to any one of claims 10 to 13, wherein the camera module acquiring the image to be processed includes:
    所述摄像模组中的球机摄像模组获取所述待处理图像。The dome camera module in the camera module obtains the image to be processed.
  16. 如权利要求15所述的控制方法,其特征在于,所述待处理图像中包括目标对象,所述摄像模组中的球机摄像模组获取所述待处理图像,包括:The control method according to claim 15, wherein the image to be processed includes a target object, and the dome camera module in the camera module obtains the image to be processed, comprising:
    所述球机摄像模组根据所述目标对象的目标坐标信息获取所述待处理图像,其中,所述目标坐标信息是通过对所述摄像模组中的枪机摄像模组中所述目标对象的坐标信息进行坐标映射得到的。The dome camera module acquires the to-be-processed image according to the target coordinate information of the target object, wherein the target coordinate information is obtained by comparing the target object in the box camera module in the camera module The coordinate information is obtained by coordinate mapping.
  17. 如权利要求11至16中任一项所述的控制方法,其特征在于,所述待处理图像中的目标对象为人像。The control method according to any one of claims 11 to 16, wherein the target object in the image to be processed is a portrait.
  18. 如权利要求10至17中任一项所述的控制方法,其特征在于,所述处理器为神经网络处理器。The control method according to any one of claims 10 to 17, wherein the processor is a neural network processor.
PCT/CN2019/115138 2019-11-01 2019-11-01 Monitoring device and control method WO2021082006A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/115138 WO2021082006A1 (en) 2019-11-01 2019-11-01 Monitoring device and control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/115138 WO2021082006A1 (en) 2019-11-01 2019-11-01 Monitoring device and control method

Publications (1)

Publication Number Publication Date
WO2021082006A1 true WO2021082006A1 (en) 2021-05-06

Family

ID=75715733

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/115138 WO2021082006A1 (en) 2019-11-01 2019-11-01 Monitoring device and control method

Country Status (1)

Country Link
WO (1) WO2021082006A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113709400A (en) * 2021-07-29 2021-11-26 四川天翼网络服务有限公司 System and method for detecting violation behaviors of examinees in real time based on ARM architecture

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108416285A (en) * 2018-03-02 2018-08-17 深圳市佳信捷技术股份有限公司 Rifle ball linkage surveillance method, apparatus and computer readable storage medium
CN108900758A (en) * 2018-09-07 2018-11-27 厦门博聪信息技术有限公司 A kind of the Intelligent human-face candid camera and its face snap method of the cooperation of rifle ball
US20190007623A1 (en) * 2017-06-30 2019-01-03 Polycom, Inc. People detection method for auto-framing and tracking in a video conference
CN110084139A (en) * 2019-04-04 2019-08-02 长沙千视通智能科技有限公司 A kind of recognition methods again of the vehicle based on multiple-limb deep learning
CN110210404A (en) * 2019-05-31 2019-09-06 深圳算子科技有限公司 Face identification method and system
CN110232307A (en) * 2019-04-04 2019-09-13 中国石油大学(华东) A kind of multi-frame joint face recognition algorithms based on unmanned plane

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190007623A1 (en) * 2017-06-30 2019-01-03 Polycom, Inc. People detection method for auto-framing and tracking in a video conference
CN108416285A (en) * 2018-03-02 2018-08-17 深圳市佳信捷技术股份有限公司 Rifle ball linkage surveillance method, apparatus and computer readable storage medium
CN108900758A (en) * 2018-09-07 2018-11-27 厦门博聪信息技术有限公司 A kind of the Intelligent human-face candid camera and its face snap method of the cooperation of rifle ball
CN110084139A (en) * 2019-04-04 2019-08-02 长沙千视通智能科技有限公司 A kind of recognition methods again of the vehicle based on multiple-limb deep learning
CN110232307A (en) * 2019-04-04 2019-09-13 中国石油大学(华东) A kind of multi-frame joint face recognition algorithms based on unmanned plane
CN110210404A (en) * 2019-05-31 2019-09-06 深圳算子科技有限公司 Face identification method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113709400A (en) * 2021-07-29 2021-11-26 四川天翼网络服务有限公司 System and method for detecting violation behaviors of examinees in real time based on ARM architecture

Similar Documents

Publication Publication Date Title
US10943095B2 (en) Methods and systems for matching extracted feature descriptors for enhanced face recognition
US20200364443A1 (en) Method for acquiring motion track and device thereof, storage medium, and terminal
CN107093171B (en) Image processing method, device and system
WO2020125623A1 (en) Method and device for live body detection, storage medium, and electronic device
KR100851981B1 (en) Liveness detection method and apparatus in video image
CN106682620A (en) Human face image acquisition method and device
KR101781358B1 (en) Personal Identification System And Method By Face Recognition In Digital Image
CN109492550B (en) Living body detection method, living body detection device and related system applying living body detection method
WO2023016271A1 (en) Attitude determining method, electronic device, and readable storage medium
US20210027080A1 (en) Spoof detection by generating 3d point clouds from captured image frames
US9965494B2 (en) Sharing photos
CN112052830B (en) Method, device and computer storage medium for face detection
CN111626163B (en) Human face living body detection method and device and computer equipment
WO2022121130A1 (en) Power target detection method and apparatus, computer device, and storage medium
CN112052831A (en) Face detection method, device and computer storage medium
CN113298158B (en) Data detection method, device, equipment and storage medium
WO2021218695A1 (en) Monocular camera-based liveness detection method, device, and readable storage medium
JPWO2020079741A1 (en) Iris recognition device, iris recognition method, iris recognition program and recording medium
CN109214324A (en) Most face image output method and output system based on polyphaser array
CN111429476A (en) Method and device for determining action track of target person
CN112052832A (en) Face detection method, device and computer storage medium
John et al. Real time blink recognition from various head pose using single eye
Qi et al. A real-time face detection method based on blink detection
US11875573B2 (en) Image processing system
WO2021082006A1 (en) Monitoring device and control method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19950517

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19950517

Country of ref document: EP

Kind code of ref document: A1