WO2023024787A1 - Image processing method and apparatus, electronic device, computer-readable storage medium, and computer program product - Google Patents

Image processing method and apparatus, electronic device, computer-readable storage medium, and computer program product Download PDF

Info

Publication number
WO2023024787A1
WO2023024787A1 PCT/CN2022/107671 CN2022107671W WO2023024787A1 WO 2023024787 A1 WO2023024787 A1 WO 2023024787A1 CN 2022107671 W CN2022107671 W CN 2022107671W WO 2023024787 A1 WO2023024787 A1 WO 2023024787A1
Authority
WO
WIPO (PCT)
Prior art keywords
vehicle
camera
image
target vehicle
target
Prior art date
Application number
PCT/CN2022/107671
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 上海商汤智能科技有限公司
Publication of WO2023024787A1 publication Critical patent/WO2023024787A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/78Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/783Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/78Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/787Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using geographical or spatial information, e.g. location
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30232Surveillance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30236Traffic on road, railway or crossing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30241Trajectory

Definitions

  • the present disclosure relates to the technical field of image processing, and in particular to an image processing method and device, electronic equipment, computer-readable storage media, and computer program products.
  • tracking vehicles entering a specific area is one of the application scenarios.
  • the video captured by the camera will be displayed. But after the vehicle drives out of the shooting area of the camera, the video captured by the camera is still displayed instead of the real-time video of the vehicle.
  • the disclosure provides an image processing method and device, electronic equipment, a computer-readable storage medium, and a computer program product.
  • an image processing method comprising:
  • the first video source device of the first target vehicle is the first camera;
  • the shooting area of the first camera enters the shooting area of the second camera, the first video source device of the first target vehicle is switched from the first camera to the second camera, and the first The camera is different from said second camera.
  • an image processing device comprising:
  • the first processing unit is configured to determine that the first video source device of the first target vehicle is the first camera when it is determined that the first target vehicle is within the shooting area of the first camera; the second processing A unit configured to transfer the first video source device of the first target vehicle from the first video source device of the first target vehicle to the A camera is switched to the second camera, and the first camera is different from the second camera.
  • an electronic device including: a processor and a memory, the memory is used to store computer program codes, the computer program codes include computer instructions, and when the processor executes the computer instructions , the electronic device executes the method according to the foregoing first aspect and any possible implementation manner thereof.
  • a computer-readable storage medium is provided.
  • a computer program is stored in the computer-readable storage medium, and the computer program includes program instructions.
  • the program instructions are executed by a processor, the The processor executes the method according to the first aspect and any possible implementation manner thereof.
  • a computer program product in a fifth aspect, includes a computer program or an instruction, and when the computer program or instruction is run on a computer, the computer executes the first aspect and any of the above-mentioned aspects.
  • the first video source device of the first target vehicle is transferred from the Switching the first camera to the second camera can improve the accuracy of the determined real-time first video source device, thereby improving the effect of video relay.
  • FIG. 1 is a schematic diagram of the architecture of an image processing system provided by an embodiment of the present disclosure
  • FIG. 2 is a schematic flowchart of an image processing method provided by an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of a display page provided by an embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of an image processing device provided by an embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram of a hardware structure of an image processing device provided by an embodiment of the present disclosure.
  • At least one (item) means one or more
  • “multiple” means two or more
  • at least two (items) means two or three And three or more
  • "and/or” is used to describe the association relationship of associated objects, indicating that there can be three types of relationships, for example, "A and/or B” can mean: only A exists, only B exists, and A exists at the same time and B, where A and B can be singular or plural.
  • the character "/" can indicate that the contextual objects are an "or” relationship, which refers to any combination of these items, including any combination of single items (items) or plural items (items).
  • At least one item (piece) of a, b or c can mean: a, b, c, "a and b", “a and c", “b and c", or "a and b and c ", where a, b, c can be single or multiple.
  • tracking vehicles entering a specific area is one of the application scenarios.
  • the embodiment of the present disclosure provides a technical solution to display the real-time video of the vehicle.
  • the execution subject of the embodiments of the present disclosure is an image processing apparatus, where the image processing apparatus may be any electronic device capable of executing the technical solutions disclosed in the method embodiments of the present disclosure.
  • the image processing device may be one of the following: a mobile phone, a computer, a tablet computer, and a wearable smart device.
  • FIG. 1 is a schematic diagram of an image processing system 1000 provided by an embodiment of the present disclosure.
  • the image processing apparatus 1001 also has a communication connection with the display device 1003 , and the image processing apparatus 1001 can display through the display device 1003 based on the communication connection.
  • the image processing apparatus 1001 is a server.
  • the image processing device 1001 can be deployed in the control center of the management area.
  • At least two cameras 1002 are deployed in the management area for collecting images and/or videos in the management area.
  • the image processing device 1001 processes the images and/or videos collected by at least two cameras 1002 based on the technical solutions provided below, determines the first video source device of the first target vehicle, and then can display the first video through the display device 1003 The capture screen of the source device.
  • the at least two cameras 1002 include a first camera and a second camera.
  • the image processing device 1001 determines that the first target vehicle appears in the shooting area of the first camera, it determines that the first video source device is the first camera, and then displays the picture taken by the first camera through the display device 1003 .
  • the image processing device 1001 determines that the first target vehicle has entered the shooting area of the second camera from the shooting area of the first camera, it switches the first video source device from the first camera to the second camera, and then displays the display device 1003 The display screen of the first camera is switched from the shooting screen of the first camera to the shooting screen of the second camera.
  • the image processing device 1001 and the display device 1003 may be the same terminal device, and the terminal device includes both image processing and analysis capabilities and display capabilities, and can simultaneously implement the method steps performed by the image processing device 1001 and the display device 1003 .
  • the image processing apparatus 1001 and the display device 1003 are computers.
  • FIG. 2 is a schematic flowchart of an image processing method provided by an embodiment of the present disclosure, the method is executed by an electronic device, and the method includes the following steps 201 and 202, wherein:
  • Step 201 When it is determined that the first target vehicle is within the shooting area of the first camera, determine that the first video source device of the first target vehicle is the first camera.
  • the vehicle (including the above-mentioned first target vehicle, and the second target vehicle and the vehicle to be identified which will be mentioned below) may be any vehicle.
  • the first target vehicle is a sedan.
  • the first target vehicle is a dump truck.
  • the first target vehicle is a bus.
  • the camera (including the above-mentioned first camera and the second camera to be mentioned below) may be a camera, and the camera may also be a capture machine.
  • the video source device of the vehicle (including the first video source device of the above-mentioned first target vehicle and the second video source device of the second target vehicle to be mentioned below) is, when displaying the real-time video of the vehicle The source of the video shown.
  • the first video source device of the first target vehicle is camera a
  • the real-time video of the first target vehicle is displayed.
  • the first target vehicle is in the shooting area of the first camera, indicating that when displaying the real-time video of the first target vehicle, the real-time video collected by the first camera should be displayed. Therefore, in this case, the image processing device determines the first target
  • the first video source device of the vehicle is the first camera.
  • Step 202 When it is determined that the first target vehicle has entered the shooting area of the second camera from the shooting area of the first camera, switch the first video source device of the first target vehicle from the first camera to the above-mentioned The second camera, the above-mentioned first camera is different from the above-mentioned second camera.
  • the first target vehicle drives from the shooting area of the first camera into the shooting area of the second camera.
  • the displayed video should be switched from the real-time video collected by the first camera to the second camera. Captured real-time video. Therefore, when it is determined that the first target vehicle is driving from the shooting area of the first camera into the shooting area of the second camera, the first video source device of the first target vehicle is switched from the first camera to the second camera.
  • the image processing device switches the first video source device of the first target vehicle from the first camera when the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera is the second camera, so that the first video source device of the first target vehicle can be determined in real time.
  • the real-time video of the first target vehicle can be displayed by displaying the real-time video collected by the first video source device.
  • the first video source device of the first target vehicle is switched from the first camera to the second camera, which is called video relay.
  • the image processing device determines that the above-mentioned first target vehicle enters the shooting area of the second camera from the shooting area of the above-mentioned first camera, it also performs the following steps:
  • Step 1 Acquire a time difference threshold and at least two first images.
  • the time difference threshold is a positive number.
  • the at least two first images may be one first image, and the at least two first images may also be two or more first images.
  • Each of the at least two first images includes a first target vehicle.
  • the at least one first image includes an image captured by the first camera and an image captured by the second camera.
  • the at least two first images include image a and image b.
  • image a is captured by the first camera
  • image b is captured by the second camera.
  • both image a and image b include the first target vehicle.
  • the image processing apparatus receives a time difference threshold input by a user through an input component.
  • the above-mentioned input components include: a keyboard, a mouse, a touch screen, a touch pad, an audio input device, and the like.
  • the image processing apparatus receives the time difference threshold sent by the terminal.
  • the above-mentioned terminals include: mobile phones, computers, tablet computers, and servers.
  • the image processing device receives at least two first images input by a user through an input component.
  • the image processing apparatus receives at least two first images sent by the terminal.
  • the step of acquiring at least two first images and the step of acquiring the time difference threshold may be performed separately, or may be performed simultaneously.
  • the image processing device may first acquire at least two first images, and then acquire the time difference threshold.
  • the image processing device may acquire the time difference threshold first, and then acquire at least two first images.
  • the image processing apparatus acquires a time difference threshold during the process of acquiring at least two first images, or acquires at least two first images during the process of acquiring the time difference threshold.
  • Step 2 Determine the difference between the time stamp of the second image and the time stamp of the third image.
  • the second image is the image with the smallest time stamp collected by the second camera among the at least two first images
  • the third image is the time stamp collected by the first camera among the at least two first images minimal image.
  • the at least two first images include image a, image b, image c, and image d, where image a and image d are captured by the first camera, and image b and image c are captured by the second camera. If the acquisition time of image a is earlier than the acquisition time of image d, that is, the time stamp of image a is smaller than the time stamp of image d, then the second image is image a. If the acquisition time of image b is earlier than the acquisition time of image c, that is, the time stamp of image b is smaller than the time stamp of image c, then the third image is image b.
  • the difference between the time stamp of the second image and the time stamp of the third image is the difference obtained by subtracting the time stamp of the third image from the time stamp of the second image.
  • the difference characterizes the time difference between the acquisition time of the second image and the acquisition time of the third image.
  • the image processing device determines that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera by performing the following steps:
  • Step 3 If the difference is greater than the time difference threshold, determine that the first target vehicle has entered the shooting area of the second camera from the shooting area of the first camera.
  • the first target vehicle drives from the shooting area of the first camera into the shooting area of the second camera, that is, the first target vehicle first appears in the shooting area of the first camera image, and then appears in the shooting area of the second camera. That is to say, the first camera captures the first target vehicle first, and the second camera captures the first target vehicle afterwards. In addition, it takes a certain amount of time for the vehicle to drive into the shooting area of the first camera and leave the shooting area of the first camera, that is, there is a gap between the first target vehicle captured by the first camera and the first target vehicle captured by the second camera. Time difference. Therefore, it can be judged whether the first target vehicle drives into the shooting area of the second camera from the shooting area of the first camera by the time difference between the collection time of the second image and the collection time of the third image.
  • the time difference threshold may be understood as the time required for the vehicle to drive out of the shooting area of the camera from entering the shooting area of the camera. It should be understood that the time difference threshold is an empirical value, and the value of the time difference threshold may be set according to actual conditions.
  • step 2 If the difference obtained in step 2 is greater than the time difference threshold, on the one hand, because the time difference threshold is a positive number, the first camera captures the first target vehicle first, and the second camera captures the first target vehicle later. On the other hand, if the first target vehicle is greater than the time difference threshold, it means that the first target vehicle has driven out of the shooting area of the first camera. That is to say, the first target vehicle has driven into the shooting area of the second camera from the shooting area of the first camera.
  • the image processing device determines that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera when the difference value is greater than the time difference threshold.
  • step 2 If the difference obtained in step 2 is less than or equal to the time difference threshold, it includes the following two situations:
  • the second camera captures the first target vehicle first, and then the first camera captures the first target vehicle. At this time, the first target vehicle is in the shooting area of the first camera;
  • the first camera captures the first target vehicle first, and then the second camera captures the first target vehicle.
  • the first target vehicle does not drive out of the shooting area of the first camera, that is, the first target vehicle is still in the shooting area of the first camera.
  • the image processing device determines that the target vehicle is within the shooting area of the first camera when the difference value is less than or equal to the time difference threshold.
  • step 1 and step 2 the image processing device judges whether the first target vehicle has driven from the shooting area of the first camera into the shooting area of the second camera through the difference between the time stamp of the second image and the time stamp of the third image.
  • the shooting area can improve the accuracy of judgment, thereby improving the effect of video relay.
  • the at least two first images include n images with the largest timestamp in the target vehicle image set, the images in the target vehicle image set all include the first target vehicle, and the images in the target vehicle image set Both include images collected by the first camera and images collected by the second camera, and n is an integer greater than 1.
  • the images collected by the camera are time-sensitive, and the video relay needs to determine the real-time first video source device, so when at least two first images include the n images with the largest time stamp in the target vehicle image set, the determination can be improved.
  • the accuracy of the first video source device in real time thereby improving the effect of video relay.
  • the image processing device determines that the above-mentioned difference value is greater than the above-mentioned time difference threshold, before determining that the first target vehicle has entered the shooting area of the second camera from the shooting area of the above-mentioned first camera, Also perform the following steps:
  • Step 4. Determine the first size of the first target vehicle in the second image and the second size of the first target vehicle in the third image.
  • the size of the first target vehicle in the image may be the size of the pixel area covered by the first target vehicle.
  • the size of the first target vehicle in the image is an area including a vehicle detection frame of the first target vehicle, wherein the vehicle detection frame is obtained by performing vehicle detection processing on the image.
  • the image processing device obtains the first vehicle detection frame including the first target vehicle by performing vehicle detection processing on the second image, and obtains the second vehicle detection frame including the first target vehicle by performing vehicle detection processing on the third image.
  • the area of the first vehicle detection frame is the first size
  • the area of the second vehicle detection frame is the second size.
  • step 4 the image processing device determines that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera by performing the following steps:
  • Step 5 If the first size is larger than the second size, determine that the first target vehicle has entered the shooting area of the second camera from the shooting area of the first camera.
  • the first size is greater than the second size, it means that the distance between the first target vehicle and the second camera is smaller than the distance between the first target vehicle and the first camera. At this time, the second camera should be used as the first video source of the first target vehicle equipment. Therefore, when the first size is greater than the second size, the image processing device determines that the first target vehicle drives into the shooting area of the second camera from the shooting area of the first camera.
  • the first size is smaller than the second size, it means that the distance between the first target vehicle and the second camera is greater than the distance between the first target vehicle and the first camera. At this time, the first camera should be used as the first video source of the first target vehicle equipment. In some embodiments, the image processing device determines that the first target vehicle is still within the shooting area of the first camera when the first size is smaller than the second size.
  • the first size is equal to the second size, it means that the distance between the first target vehicle and the second camera is the same as the distance between the first target vehicle and the first camera, but since the current first video source device of the first target vehicle is the first camera , in order to make the display effect of the video relay more smooth, the first camera can still be used as the first video source device of the first target vehicle at this time.
  • the image processing device determines that the first target vehicle is still within the shooting area of the first camera when the first size is equal to the second size.
  • step 4 and step 5 if the difference is greater than the time difference threshold, the image processing device further judges whether the first target vehicle enters the area of the second camera from the shooting area of the first camera based on the first size and the second size.
  • the shooting area can improve the accuracy of judgment, thereby improving the effect of video relay.
  • the image processing device also displays the shooting picture of the first video source device, so that the real-time video of the first target vehicle can be displayed, achieving the effect of visually tracking the first target vehicle.
  • both the first camera and the second camera are deployed in the target area.
  • the target area may be any area, for example, the target area is a school, and for example, the target area is an industrial park.
  • the target area includes an administrative area. Both the first camera and the second camera are deployed in the target area, that is, both the shooting area of the first camera and the shooting area of the second camera are located in the target area.
  • the image processing device also stops displaying the shooting picture of the first video source device when it is determined that the first target vehicle has left the target area. This can release hardware resources for tracking and displaying the first target vehicle, and improve the utilization rate of hardware resources of the image processing device, wherein the hardware resources include: hardware resources for determining the first video source device of the first target vehicle and The hardware resource used for displaying the captured picture of the first video source device of the first target vehicle.
  • the image processing device tracks the track of the first target vehicle in the target area through the first camera and the second camera, and displays the video of the first target vehicle in the target area in real time.
  • the image processing device determines that the first target vehicle has left the target area, it is determined that there is no need to continue to track the track of the first target vehicle in the target area, so stop displaying the captured picture of the first video source device, so as to improve the utilization of hardware resources of the image processing device Rate.
  • stopping displaying the shooting picture of the first video source device is to stop displaying the shooting picture newly collected by the first video source device, but take the last frame image of the first target vehicle leaving the target area as the first tracking A display screen of the display area, wherein the first tracking display area is used to display the video of the first target vehicle in the target area.
  • the image processing device determines that the first target vehicle leaves the target area after driving out of the shooting area of the second camera, and the last frame captured by the second camera includes the image of the first target vehicle as image a, then the image processing device will Image a is used as the display screen of the first tracking display area, that is, the display screen of the first tracking display area is always image a after the first target vehicle leaves the target area.
  • the instruction may be input by the user to the image processing device through the input component, or the instruction may be sent by the terminal to the image processing device.
  • the image processing device determines that the first target vehicle disappears from the shooting area of the bayonet camera, and the first target vehicle disappears before the first target vehicle disappears from the shooting area of the bayonet camera. If there is a track record in the target area, it is determined that the first target vehicle has left the target area, wherein the bayonet camera includes a camera deployed at an entrance and exit of the target area.
  • the bayonet camera since the bayonet camera is deployed at the entrance and exit of the target area, when the first target vehicle disappears from the shooting area of the bayonet camera, it means that the first target vehicle has either entered the target area or left target area. Also, since the first target vehicle has a track record in the target area before the first target vehicle disappears from the shooting area of the bayonet camera, it means that the first target vehicle has left the target area. Therefore, the image processing device determines in this case that the first target vehicle has left the target area.
  • the shooting picture of the first video source is displayed in the first display area of the display page, and the display page also includes a second display area, and the second display area is used to display the second video source of the second target vehicle
  • the first target vehicle is different from the second target vehicle.
  • the display page can simultaneously display the real-time video of the first target vehicle and the real-time video of the second target vehicle.
  • first display area and the second display area in the embodiment of the present disclosure are only examples, and should not be understood as only real-time videos of two vehicles can be displayed simultaneously on the display page.
  • the image processing device may simultaneously display the implementation videos of m vehicles on the display page, where m is an integer greater than 1.
  • the display page shown in FIG. 3 it includes four different display areas, namely the first display area 301, the second display area 302, the third display area 303 and the fourth display area 304, wherein different display areas Regions are used to display real-time video of different vehicles respectively.
  • the first display area 301 is used to display the real-time video of vehicle a
  • the second display area 302 is used to display the real-time video of vehicle b
  • the third display area 303 is used to display the real-time video of vehicle c
  • the fourth display area 304 is used to display the real-time video of vehicle a. to display real-time video of vehicle d.
  • the following steps are further performed:
  • Step 6 Obtain the second image captured by the above-mentioned first camera.
  • the image processing device acquires the second image captured by the first camera through the communication connection.
  • the image processing apparatus receives the second image input by the user through the input component.
  • the image processing apparatus receives the second image sent by the terminal.
  • step 6 the image processing device determines that the first target vehicle is within the shooting area of the first camera when it is determined that the second image includes the first target vehicle.
  • the second image includes the vehicle to be identified, and the image processing device further performs the following steps before determining that the second image includes the first target vehicle:
  • Step 7 Obtain the target characteristic data of the first target vehicle.
  • the target characteristic data of the first target vehicle carries the identity information of the first target vehicle, that is, by comparing the characteristic data of any vehicle with the target characteristic data, it can be determined whether the vehicle is the same as the first target vehicle .
  • the target feature data includes a feature vector carrying identity information of the first target vehicle.
  • the target feature data carries local feature information of the first target vehicle.
  • the target characteristic data carries at least one of the following information: characteristic information of vehicle lights, characteristic information of vehicle logos, and characteristic information of vehicle windows.
  • the target feature data carries global feature information of the first target vehicle, where the global feature information includes overall appearance feature information of the first target vehicle.
  • the target feature data carries not only local feature information of the first target vehicle, but also global feature information of the first target vehicle.
  • the image processing device receives target feature data input by a user through an input component.
  • the image processing apparatus receives target feature data sent by the terminal.
  • the image processing device determines that the second image includes the first target vehicle by performing the following steps:
  • Step 8 Perform feature extraction processing on the second image to obtain the first feature data of the vehicle to be identified.
  • the first feature data carries the identity information of the vehicle to be identified, that is, by comparing the feature data of any vehicle with the first feature data, it can be determined whether the vehicle is the same as the vehicle to be identified.
  • the first feature data includes a feature vector carrying identity information of the vehicle to be identified.
  • the first feature data carries local feature information of the vehicle to be identified.
  • the first characteristic data carries at least one of the following information: characteristic information of vehicle lights, characteristic information of vehicle logos, and characteristic information of vehicle windows.
  • the first feature data carries global feature information of the vehicle to be identified, where the global feature information includes overall appearance feature information of the vehicle to be identified.
  • the first feature data carries not only local feature information of the vehicle to be identified, but also global feature information of the vehicle to be identified.
  • the feature extraction process is used to extract feature data of the vehicle in the image.
  • the image processing device implements feature extraction processing on the image by performing convolution processing on the image.
  • the feature extraction processing of the image is implemented through a convolutional neural network.
  • the convolutional neural network is trained, so that the trained convolutional neural network can complete the feature extraction process of the image.
  • the annotation information of the training data includes at least one of the following: local feature information of the vehicle in the image, and global feature information of the vehicle in the image.
  • Step 9 Obtain a comparison result between the first target vehicle and the vehicle to be identified according to the first similarity between the target feature data and the first feature data.
  • the first similarity is the similarity between the target feature data and the first feature data.
  • the comparison result includes that the first target vehicle is the same as the vehicle to be identified, and the comparison result may include that the first target vehicle is different from the vehicle to be identified.
  • the image processing device determines that the comparison result includes that the first target vehicle is the same as the vehicle to be identified when the first similarity is greater than the feature comparison threshold; the image processing device determines that the first similarity is less than or equal to the feature comparison threshold, it is determined that the comparison result includes that the first target vehicle is different from the vehicle to be identified.
  • the image processing device determines the square of the first similarity to obtain the squared similarity. In the case where the square similarity is greater than the feature comparison threshold, determining the comparison result includes that the first target vehicle is the same as the vehicle to be identified; when the square similarity is less than or equal to the feature comparison threshold, the image processing device determines the comparison result It is included that the first target vehicle is different from the vehicle to be identified.
  • Step 10 When the comparison result includes that the first target vehicle is the same as the vehicle to be identified, determine that the second image includes the first target vehicle.
  • the image processing device compares the first feature data with the target feature data to obtain the first similarity, and then determines whether the vehicle to be recognized is the first target vehicle according to the first similarity, thereby determining Whether the first target vehicle is included in the second image.
  • the comparison result includes that the first target vehicle is different from the vehicle to be identified, it is determined that the second image does not include the first target vehicle.
  • the image processing device before performing step 9, the image processing device further performs the following steps:
  • Step 11 Obtain at least one first target vehicle attribute of the above-mentioned first target vehicle.
  • the vehicle attribute (including the above-mentioned first target vehicle attribute and the first target vehicle attribute to be mentioned below) includes at least one of the following: vehicle type, body color, vehicle brand, vehicle number, and vehicle model.
  • the vehicle types include: a hatchback sedan, a sedan sedan, a sport utility vehicle (sport utility vehicle, SUV), a pickup, a truck, a bus, a dump truck, and a muck truck.
  • the body colors include: black, blue, gray, white, navy blue, yellow, red, green, and purple.
  • the vehicle brands include: Mercedes-Benz, BMW, Audi, Volkswagen, Hyundai, Toyota, Nissan, Great Wall, and BYD.
  • the first target vehicle attribute is the vehicle attribute of the first target vehicle.
  • the at least one first target vehicle attribute may be one first target vehicle attribute, and the at least one first target vehicle attribute may also be two or more first target vehicle attributes.
  • the at least one first target vehicle attribute includes a body color of the first target vehicle.
  • the at least one attribute of the first target vehicle includes the body color of the first target vehicle and the vehicle type of the first target vehicle.
  • the at least one first target vehicle attribute of the first target vehicle is stored in an image processing device.
  • the image processing device acquires at least one first target vehicle attribute of the first target vehicle by reading at least one first target vehicle attribute of the first target vehicle from the storage medium.
  • the image processing device receives at least one first target vehicle attribute of the first target vehicle input by a user through an input component.
  • the image processing device receives the at least one first target vehicle attribute of the first target vehicle sent by the terminal.
  • Step 12. Perform vehicle attribute extraction processing on the second image to obtain at least one first vehicle attribute of the vehicle to be identified.
  • a vehicle attribute extraction process is used to extract vehicle attributes in the image.
  • the vehicle attribute extraction process can be realized by a vehicle attribute extraction model, wherein the vehicle attribute extraction model is a computer vision model for extracting vehicle attributes.
  • the first vehicle attribute is the vehicle attribute of the vehicle to be recognized obtained by performing vehicle attribute extraction processing on the first image.
  • the at least one first vehicle attribute may be one first vehicle attribute, and the at least one first vehicle attribute may also be two or more first vehicle attributes.
  • the at least one first vehicle attribute includes the body color of the vehicle to be identified.
  • the at least one first vehicle attribute includes the body color of the vehicle to be identified and the vehicle type of the vehicle to be identified.
  • step 11 and step 12 the image processing device performs the following steps in the process of performing step 9:
  • Step 13 Obtain a comparison result between the first target vehicle and the vehicle to be identified according to the first similarity and the second similarity.
  • the second similarity is the at least one first target vehicle attribute and the at least one first target vehicle attribute.
  • the image processing device determines that the comparison result includes the first target vehicle and the vehicle to be identified when the first similarity is greater than the feature comparison threshold and the second similarity is greater than the attribute comparison threshold. same. Otherwise, the image processing device determines that the comparison result includes that the first target vehicle is different from the vehicle to be identified.
  • the first similarity degree is greater than the feature comparison threshold, indicating that the feature data of the first target vehicle is similar to the feature data of the vehicle to be identified.
  • the second similarity is greater than the attribute comparison threshold, indicating that the vehicle attribute of the first target vehicle is similar to the vehicle attribute of the vehicle to be identified. Therefore, in this case, judging that the first target vehicle is the same as the vehicle to be recognized can improve the judgment accuracy.
  • the image processing apparatus obtains the third similarity according to the first similarity and the second similarity. In a case where the third similarity is greater than the similarity threshold, it is determined that the comparison result includes that the first target vehicle is the same as the vehicle to be identified. In a case where the third similarity is less than or equal to the similarity threshold, it is determined that the comparison result includes that the first target vehicle is different from the vehicle to be identified.
  • the image processing apparatus obtains the third similarity by weighting and summing the first similarity and the second similarity.
  • s1, s2, and s3 satisfy the following formula:
  • s1, s2, and s3 satisfy the following formula:
  • s1, s2, and s3 satisfy the following formula:
  • the image processing device obtains the comparison result according to the first similarity and the second similarity, which not only utilizes the information carried by the characteristic data, but also utilizes the information carried by the vehicle attribute, so the comparison result can be improved. accuracy of the results.
  • the image processing device when the first camera is deployed in the target area, the image processing device performs the following steps in the process of executing step 7:
  • Step 14 acquiring the vehicle database to be tracked.
  • the database of vehicles to be tracked includes characteristic data of at least one vehicle to be tracked.
  • the database of vehicles to be tracked includes feature data of vehicle a to be tracked and feature data of vehicle b to be tracked.
  • the at least one vehicle to be tracked includes a vehicle whose trajectory is to be tracked within the target area.
  • the target area is the management area.
  • any vehicle entering the target area needs to be tracked.
  • the vehicle entering the target area is the vehicle to be tracked.
  • the target vehicle may be any one of the at least one vehicle to be tracked, that is, the target vehicle is a vehicle that needs to track a trajectory within the target area.
  • the image processing device receives the database of vehicles to be tracked input by a user through an input component.
  • the image processing device receives the database of vehicles to be tracked sent by the terminal.
  • Step 15 In the case of acquiring the second image captured by the first camera, acquire a characteristic data from the database of the vehicle to be tracked as the characteristic data of the target.
  • the first camera is deployed in the target area, and the second image is collected by the first camera, and the second image includes the vehicle to be identified. Then the image processing device obtains the second image collected by the first camera, indicating that the vehicle to be identified has entered the target area, so it is necessary to determine the identity of the vehicle to be identified, that is, to determine which of the at least one vehicle to be tracked is the vehicle to be identified car.
  • the image processing device acquires the second image captured by the first camera, it acquires a feature data from the database of the vehicle to be tracked, and uses the feature data as target feature data. In this way, it can be determined whether the vehicle to be identified is the target vehicle by comparing the first characteristic data with the target characteristic data.
  • the target feature data in step 15 is only an example, and it should not be understood that the image processing device only acquires feature data of a vehicle to be tracked from the vehicle to be tracked database, and determines the relationship between the vehicle to be identified and at least one vehicle to be tracked Is one of the cars in the same. In practical applications, the image processing device may compare the first characteristic data with the characteristic data of each vehicle to be tracked in the database of vehicles to be tracked, so as to determine the identity of the vehicle to be identified.
  • the following steps are also performed: acquiring the fifth image of the target area and the first image of the first camera in the fifth image.
  • Position Determine a second position of the first target vehicle in the fifth image according to the first position.
  • the comparison result includes that the first target vehicle is the same as the vehicle to be identified, indicating that the first target vehicle has appeared in the shooting area of the first camera. Therefore, the position of the first target vehicle in the fifth image, ie, the second position, can be determined according to the first position.
  • the image processing apparatus uses the first location as the second location.
  • the target area is a map missing area.
  • the missing area of the map includes an area missing detailed information on the map, wherein the detailed information includes at least one of the following: building information and road information. In this way, by determining the position of the first target vehicle in the fifth map, the accuracy of positioning in the target area can be improved.
  • the second position is displayed in the fifth image, that is, the position of the first target vehicle within the target area is displayed.
  • the image processing device when the image processing device obtains at least two positions of the first target vehicle in the fifth image, determine the track of the first target vehicle in the fifth image according to the at least two positions, and The track is displayed.
  • the image processing device performs the following steps in the process of executing step 14:
  • Step 16 Acquire at least one fourth image, where the at least one fourth image includes the at least one vehicle to be tracked.
  • the image processing apparatus receives at least one fourth image input by a user through an input component.
  • the image processing apparatus receives at least one fourth image sent by the terminal.
  • the image processing device acquires at least one image to be confirmed captured by at least one bayonet camera as at least one fourth image through the communication connection.
  • the image processing device determines that the vehicle in the image to be confirmed does not have a track record in the target area, and uses the image to be confirmed as the fourth image, thereby obtaining at least one a fourth image.
  • At least one image to be confirmed includes image a and image b, wherein image a includes vehicle A, and image b includes vehicle B. If there is no track record of vehicle A in the target area, the image processing device uses image a as the fourth image. If the vehicle B has a track record in the target area, the image processing device does not use the image b as the fourth image. At this time, at least one fourth image includes image a.
  • Step 17 Obtain the vehicle database to be tracked according to the at least one fourth image.
  • the image processing device obtains the vehicle database to be tracked by performing structural processing on at least one fourth image.
  • the image processing device obtains feature data of at least one vehicle to be tracked by performing feature extraction processing on at least one fourth image, and obtains a database of vehicles to be tracked.
  • the image processing device performs the following steps during the execution of step 16:
  • Step 18 Acquire at least one sixth image.
  • each of the at least one sixth image includes a vehicle.
  • the vehicle in at least one sixth image is a vehicle to be confirmed, that is, the vehicle to be confirmed needs to be further confirmed whether it needs to track a trajectory within the target area.
  • the image processing device acquires at least one image to be confirmed collected by at least one bayonet camera through the communication connection. After the image processing device acquires the image to be confirmed, if it is determined that the vehicle in the image to be confirmed does not have a track record in the target area, the image to be confirmed is used as the sixth image, thereby obtaining at least one sixth image.
  • At least one image to be confirmed includes image a and image b, wherein image a includes vehicle A, and image b includes vehicle B. If there is no track record of vehicle A in the target area, the image processing device uses image a as the sixth image. If the vehicle B has a track record in the target area, the image processing device does not use the image b as the sixth image. At this time, at least one sixth image includes image a.
  • Step 19 Obtaining at least one fourth image according to the at least one sixth image and the deletion instruction when a deletion instruction for at least one sixth image is detected.
  • the deletion instruction may be input by the user to the image processing apparatus.
  • the user can delete at least one image in the at least one sixth image, thereby determining at least one vehicle to be confirmed from the at least one vehicle to be confirmed included in the at least one sixth image. Track vehicles.
  • At least one sixth image includes image a and image b, wherein image a includes vehicle A to be confirmed, and image b includes vehicle B to be confirmed.
  • the user confirms that the image a is blurred. If the vehicle database to be tracked is obtained based on the image a, the accuracy of the data in the vehicle database to be tracked may be affected. Therefore, the user inputs a delete instruction to delete the image b to the image processing device. When the image processing device detects the deletion instruction, delete the image b in the at least one sixth image to obtain at least one fourth image. At this time, at least one fourth image includes image a, and at least one vehicle to be tracked includes vehicle A.
  • the image processing device performs the following steps in the process of executing step 19:
  • Step 20 Delete at least one image in the sixth image according to the deletion instruction to obtain at least one seventh image.
  • At least one seventh image in this step corresponds to at least one fourth image in step 19, that is, in this step, the image processing device according to The deleting instruction deletes the image in the at least one sixth image to obtain not at least one fourth image but at least one seventh image.
  • the vehicles in at least one seventh image are all vehicles to be confirmed, that is, at least one seventh image includes at least one vehicle to be confirmed.
  • Step 21 In a case where a confirmation tracking instruction for at least one seventh image is detected, use the at least one seventh image indicated by the confirmation tracking instruction as at least one fourth image.
  • the confirmation tracking instruction may be input by a user to the image processing device.
  • the user can determine at least one vehicle to be tracked from at least one vehicle to be confirmed included in at least one seventh image by inputting a confirmation tracking instruction to the image processing device, and then determine at least one vehicle to be tracked from at least one seventh image.
  • At least one seventh image includes image a and image b, wherein image a includes vehicle A to be confirmed, and image b includes vehicle B to be confirmed.
  • the user confirms that the vehicle B to be confirmed is the vehicle of the staff in the target area, so there is no need to track the vehicle B to be confirmed. Therefore, the user inputs a confirmation tracking instruction to the image processing device, so that the image processing device takes the vehicle A as the vehicle to be tracked.
  • the image processing device detects the confirmation tracking instruction
  • the image a in the at least one seventh image is used as the at least one fourth image.
  • at least one fourth image includes image a
  • at least one vehicle to be tracked includes vehicle A.
  • the database of vehicles to be tracked further includes at least one second vehicle attribute of at least one vehicle to be tracked, and the at least one second vehicle attribute is obtained by performing vehicle attribute extraction processing on at least one fourth image.
  • the image processing device performs the following steps during the execution of step 17:
  • Step 22 According to the at least one fourth image, obtain the feature data of the at least one vehicle to be tracked and at least one third vehicle attribute of the at least one vehicle to be tracked.
  • the image processing device can obtain feature data of at least one vehicle to be tracked according to at least one fourth image.
  • the image processing device can obtain at least one third vehicle attribute of at least one vehicle to be tracked by performing vehicle attribute extraction processing on at least one fourth image.
  • Step 23 when an editing instruction for the at least one third attribute is detected, edit the at least one third vehicle attribute according to the editing instruction to obtain the at least one second vehicle attribute.
  • the editing instruction may be input by the user to the image processing device.
  • the user can edit at least one third vehicle attribute by inputting the editing command to the image processing device.
  • the image processing device determines that the body color of the vehicle A to be tracked is white by performing step 22 . However, the body color of the vehicle A to be tracked is actually gray. At this time, the user can modify the body color of the vehicle A to be tracked to gray by inputting an edit command to the image processing device. At this time, at least one second vehicle attribute includes that the body color of the vehicle A to be tracked is gray.
  • Step 24 Obtain the vehicle database to be tracked according to the feature data of the at least one vehicle to be tracked and the at least one second attribute.
  • the image processing device stores the feature data and at least one second attribute of at least one vehicle to be tracked in the vehicle to be tracked database.
  • the user can modify the vehicle attributes of the vehicle to be tracked by inputting editing instructions to the image processing device, thereby improving the accuracy of the data in the vehicle to be tracked database.
  • the image processing device before performing step 24, the image processing device further performs the following steps:
  • Step 25 Perform vehicle detection processing on at least one seventh image, and determine at least one third position of at least one vehicle to be tracked in the at least one seventh image.
  • a vehicle detection process is used to detect the position of the vehicle in the image.
  • the image processing device determines the position of each vehicle to be tracked in the image by performing vehicle detection processing on each seventh image, and obtains at least one third position.
  • At least one seventh image includes image a and image b.
  • the image processing device determines the position of the vehicle A in the image a in the image a as a third position by performing vehicle detection processing on the image a.
  • the image processing device determines the position of the vehicle B in the image b as a third position by performing vehicle detection processing on the image b.
  • at least one third position includes the position of vehicle A in image a and the position of vehicle B in image b.
  • Step 26 Intercept at least one pixel region determined according to at least one third position from at least one seventh image to obtain at least one eighth image.
  • the image processing device can determine the position of the vehicle detection frame including the vehicle to be tracked in the image according to the third position, and then can use the pixel area included in the vehicle detection frame including the vehicle to be tracked as Eighth image.
  • the at least one third position includes the position of vehicle A in image a and the position of vehicle B in image b.
  • the image processing device determines the pixel area included in the vehicle detection frame of vehicle A according to the position of vehicle A in image a, and intercepts the pixel area included in the vehicle detection frame of vehicle A as image c.
  • the image processing device determines the pixel area included in the vehicle detection frame of the vehicle B according to the position of the vehicle B in the image b, and intercepts the pixel area included in the vehicle detection frame of the vehicle B as the image d.
  • at least one eighth image includes image c and image d.
  • the image processing device After performing step 26, the image processing device performs the following steps in the process of performing step 24:
  • Step 27 Store at least one eighth image, feature data of at least one vehicle to be tracked, at least one second vehicle attribute and at least one seventh image in the vehicle to be tracked database.
  • the image processing device also performs the following steps:
  • Step 28 obtaining retrieval conditions.
  • the retrieval condition is used to retrieve the record of the vehicle to be tracked entering the target area from the vehicle to be tracked database.
  • the retrieval condition includes at least one of the following information: time requirement, body color, vehicle type, vehicle model, license plate number.
  • the image processing apparatus receives retrieval conditions input by a user through an input component.
  • the image processing apparatus receives the retrieval conditions sent by the terminal.
  • the image processing device After performing step 28, the image processing device performs one of the following steps:
  • Step 29 Search the database of vehicles to be tracked by using the retrieval conditions to obtain image data matching the retrieval conditions, the image data includes at least one of the following: at least one seventh image, at least one eighth image.
  • the retrieval condition includes a time requirement
  • the image processing device collects images whose time meets the time requirement as image data matching the retrieval condition.
  • the retrieval condition includes vehicles to be tracked that have entered the target area within the last 5 days.
  • the image processing device uses the seventh image whose collection time is within the last 5 days and the eighth image whose collection time is within the last 5 days as the image data matching the retrieval condition.
  • the acquisition time of the eighth image is the same as the acquisition time of the corresponding seventh image, for example, the eighth image a is obtained by intercepting the pixel area in the seventh image b, then the acquisition time of the eighth image a is the same as that of the seventh image
  • the acquisition time of b is the same.
  • the retrieval condition includes a vehicle attribute
  • the image processing device uses the included image matching the vehicle attribute of the vehicle to be tracked with the vehicle attribute in the retrieval condition as the image data matching the retrieval condition.
  • the retrieval condition includes a vehicle to be tracked whose body color is red.
  • the image processing device takes the seventh image containing the red vehicle to be tracked and the eighth image containing the red vehicle to be tracked as image data matching the retrieval condition.
  • Step 30 Search the database of vehicles to be tracked by using the retrieval conditions to obtain at least one second vehicle attribute matching the retrieval conditions.
  • the retrieval condition includes a time requirement
  • the image processing device takes the image whose acquisition time meets the time requirement as the image data matching the retrieval condition, and uses the image data that matches the retrieval condition to be tracked At least one second vehicle attribute of the vehicle is used as the at least one second vehicle attribute matching the retrieval condition.
  • the retrieval condition includes vehicles to be tracked that have entered the target area within the last 5 days.
  • the image processing device takes the seventh image whose acquisition time is within the last 5 days as the image data matching the retrieval condition. Taking at least one second vehicle attribute of the vehicle to be tracked in the seventh image as the at least one second vehicle attribute matching the retrieval condition.
  • the image processing device searches the database of vehicles to be tracked using the retrieval conditions, and can obtain not only image data matching the retrieval conditions, but also at least one second vehicle attribute matching the retrieval conditions.
  • the image processing device may display the trajectory of the corresponding vehicle to be tracked within the target area.
  • the image processing device before performing step 6, the image processing device further performs the following steps:
  • Step 31 obtaining the working time zone.
  • the first camera can collect images within a specified time period.
  • the working time period is the time period during which the first camera collects images according to regulations.
  • the image processing apparatus receives the working time period input by the user through the input component.
  • the image processing apparatus receives the working time period sent by the terminal.
  • Step 32 Sending a vehicle tracking instruction to the first camera, where the vehicle tracking instruction is used to instruct the first camera to collect images within a working time period.
  • the vehicle tracking instruction is used to instruct the first camera to collect images within a working time period.
  • the image processing device can enable the first camera to collect images during the working time period, thereby improving the working efficiency of the first camera and reducing the energy consumption of the first camera.
  • FIG. 4 is a schematic structural diagram of an image processing device provided by an embodiment of the present disclosure.
  • the image processing device 1 includes: a first processing unit 11 and a second processing unit 12 .
  • the image processing device 1 further includes: an acquisition unit 13, a determination unit 14, a display unit 15, an extraction unit 16, and a third processing unit 17, wherein:
  • the first processing unit 11 is configured to determine that the first video source device of the first target vehicle is the first camera when it is determined that the first target vehicle is within the shooting area of the first camera;
  • the second processing unit 12 is configured to send the first video source device of the first target vehicle to the Switching from the first camera to the second camera, where the first camera is different from the second camera.
  • the image processing device further includes: an acquisition unit 13 configured to, when determining that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera, Before the case of , acquire a time difference threshold and at least two first images, the time difference threshold is a positive number, both of the at least two first images include the first target vehicle, and the at least one first image Including the image collected by the first camera and the image collected by the second camera; the determination unit 14 is configured to determine the difference between the time stamp of the second image and the time stamp of the third image, the second image is the image with the smallest time stamp collected by the second camera in the at least two first images, and the third image is the time of the at least two first images collected by the first camera Poke the smallest image;
  • the second processing unit 12 is configured to determine that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera when the difference is greater than the time difference threshold .
  • the at least two first images include n images with the largest time stamp in the target vehicle image set, the images in the target vehicle image set all include the first target vehicle, and the target The images in the vehicle image set include images captured by the first camera and images captured by the second camera, and the n is an integer greater than 1.
  • the determining unit 14 is further configured to determine the shooting area of the first target vehicle from the first camera after the difference is greater than the time difference threshold Before entering the shooting area of the second camera, determine a first size of the first target vehicle in the second image and a second size of the first target vehicle in the third image;
  • the second processing unit 12 is configured to determine that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera when the first size is larger than the second size. area.
  • the device further includes: a display unit 15 configured to display a captured image of the first video source device.
  • both the first camera and the second camera are deployed in the target area; the display unit 15 is further configured to determine that the first target vehicle has left the target area In this case, stop displaying the shooting picture of the first video source device.
  • the shooting picture of the first video source device is displayed in the first display area of the display page, and the display page further includes a second display area, and the second display area is used to display the second A shooting picture of a second video source device of a target vehicle, where the first target vehicle is different from the second target vehicle.
  • the acquiring unit 13 is configured to acquire the second image captured by the first camera before determining that the first target vehicle is within the shooting area of the first camera;
  • the first processing unit 11 is configured to determine that the first target vehicle is within the shooting area of the first camera when it is determined that the second image includes the first target vehicle.
  • the first processing unit 11 is configured to perform feature extraction processing on the second image to obtain first feature data of the vehicle to be identified; according to the first feature data between the target feature data and the first feature data Similarity, obtain the comparison result of the first target vehicle and the vehicle to be identified; if the comparison result includes that the first target vehicle is the same as the vehicle to be identified, determine the second An image includes the first target vehicle.
  • the acquisition unit 13 is further configured to: obtain the first target vehicle and the target vehicle according to the first similarity between the target feature data and the first feature data. Before identifying the comparison result of the vehicle, at least one first target vehicle attribute of the first target vehicle is obtained;
  • the image processing device further includes: an extraction unit 16 configured to: perform vehicle attribute extraction processing on the second image to obtain at least one first vehicle attribute of the vehicle to be identified;
  • the first processing unit 11 is configured to: obtain a comparison result between the first target vehicle and the vehicle to be identified according to the first similarity and the second similarity, the second similarity being the The similarity between the at least one first target vehicle attribute and the at least one first vehicle attribute.
  • the first processing unit 11 is configured to: perform weighted summation of the first similarity and the second similarity to obtain a third similarity; When the degree of similarity is greater than the similarity threshold, it is determined that the comparison result includes that the vehicle to be identified is the same as the target vehicle; when the third similarity is less than or equal to the similarity threshold, it is determined that the comparison The result includes that the vehicle to be identified is different from the target vehicle.
  • the first camera is deployed in the target area
  • the acquisition unit 13 is configured to: acquire a database of vehicles to be tracked, the database of vehicles to be tracked includes characteristic data of at least one vehicle to be tracked, and the at least one vehicle to be tracked includes vehicles that need to be tracked in the target area track vehicle, and the target vehicle is any one of the at least one vehicle to be tracked; in the case of acquiring the second image collected by the first camera, from the vehicle to be tracked
  • the database obtains a feature data as the target feature data.
  • the acquisition unit 13 is configured to: acquire at least one fourth image, the at least one fourth image includes the at least one vehicle to be tracked; according to the at least one first Four images to obtain the vehicle database to be tracked.
  • the acquisition unit 13 is configured to: acquire the at least one fourth image captured by at least one checkpoint camera, and the at least one checkpoint camera is deployed at the entrance and exit of the target area .
  • the comparison result includes that the first target vehicle is the same as the vehicle to be identified, and the acquiring unit 13 is further configured to: acquire the fifth image of the target area and the The first position of the first camera in the fifth image; the image processing device further includes: a third processing unit 17, and is also configured to: according to the first position, determine that the first target vehicle is in the The second position in the fifth image.
  • the functions of the device provided by the embodiments of the present disclosure or the modules included therein can be used to execute the methods described in the above method embodiments, and the implementation can refer to the descriptions of the above method embodiments.
  • FIG. 5 is a schematic diagram of a hardware structure of an image processing device provided by an embodiment of the present disclosure.
  • the image processing device 2 includes a processor 21 , a memory 22 , an input device 23 and an output device 24 .
  • the processor 21 , the memory 22 , the input device 23 and the output device 24 are coupled through connectors, and the connectors include various interfaces, transmission lines or buses, etc., which are not limited in this embodiment of the present disclosure.
  • coupling refers to interconnection in a specific manner, including direct connection or indirect connection through other devices, for example, connection through various interfaces, transmission lines, and buses.
  • the processor 21 may be one or more graphics processing units (graphics processing unit, GPU), and in the case where the processor 21 is a GPU, the GPU may be a single-core GPU or a multi-core GPU.
  • the processor 21 may be a processor group composed of multiple GPUs, and the multiple processors are coupled to each other through one or more buses.
  • the processor may also be other types of processors, etc., which are not limited in this embodiment of the present disclosure.
  • the memory 22 can be used to store computer program instructions and various computer program codes including program codes for implementing the solutions of the present disclosure.
  • Memory includes but not limited to random access memory (random access memory, RAM), read-only memory (read-only memory, ROM), erasable programmable read-only memory (erasable programmable read only memory, EPROM), or portable Read-only memory (compact disc read-only memory, CD-ROM), which is used for related instructions and data.
  • the input device 23 is used for inputting data and/or signals and the output device 24 is used for outputting data and/or signals.
  • the input device 23 and the output device 24 can be independent devices, or an integrated device.
  • the memory 22 may not only be used to store related instructions, but also be used to store related data.
  • Fig. 5 only shows a simplified design of an image processing device.
  • the image processing device may also include other necessary components, including but not limited to any number of input/output devices, processors, memories, etc., and all image processing devices that can implement the embodiments of the present disclosure are included in this within the scope of public protection.
  • the disclosed systems, devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • all or part of them may be implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, all or part of the processes or functions according to the embodiments of the present disclosure will be generated.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in or transmitted via a computer-readable storage medium.
  • the computer instructions can be sent from a website site, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) Another website site, computer, server or data center for transmission.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device including a server, a data center, and the like integrated with one or more available media.
  • the available medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital versatile disc (digital versatile disc, DVD)), or a semiconductor medium (for example, a solid state disk (solid state disk, SSD) )wait.
  • a magnetic medium for example, a floppy disk, a hard disk, a magnetic tape
  • an optical medium for example, a digital versatile disc (digital versatile disc, DVD)
  • a semiconductor medium for example, a solid state disk (solid state disk, SSD)
  • the processes can be completed by computer programs to instruct related hardware.
  • the programs can be stored in computer-readable storage media.
  • When the programs are executed may include the processes of the foregoing method embodiments.
  • the aforementioned storage medium includes: various media capable of storing program codes such as read-only memory (ROM) or random access memory (RAM), magnetic disk or optical disk.
  • the image processing method includes: determining that the first target vehicle is in the shooting area of the first camera, determining that the first video source device of the first target vehicle is the first camera; When it is determined that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera, the first video source device of the first target vehicle is switched from the first camera to the shooting area of the second camera.
  • the second camera, the first camera is different from the second camera.
  • the first video source device of the first target vehicle is transferred from the Switching the first camera to the second camera can improve the accuracy of the determined real-time first video source device, thereby improving the effect of video relay.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Multimedia (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Image Analysis (AREA)
  • Closed-Circuit Television Systems (AREA)
  • Traffic Control Systems (AREA)

Abstract

The present application provides an image processing method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product. The method comprises: when it is determined that a first target vehicle is in a photographing area of a first camera, determining that a first video source device of the first target vehicle is the first camera; and when it is determined that the first target vehicle enters a photographing area of a second camera from the photographing area of the first camera, switching the first video source device of the first target vehicle from the first camera to the second camera, the first camera being different from the second camera.

Description

图像处理方法及装置、电子设备、计算机可读存储介质及计算机程序产品Image processing method and device, electronic device, computer-readable storage medium, and computer program product
相关申请的交叉引用Cross References to Related Applications
本公开基于申请号为202110971089.6、申请日为2021年8月23日、发明名称为“图像处理方法及装置、电子设备及计算机可读存储介质”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本公开作为参考。This disclosure is based on the Chinese patent application with the application number 202110971089.6, the filing date is August 23, 2021, and the invention title is "image processing method and device, electronic equipment and computer-readable storage medium", and requires the Chinese patent application Priority, the entire content of the Chinese patent application is hereby incorporated by reference into this disclosure.
技术领域technical field
本公开涉及图像处理技术领域,尤其涉及一种图像处理方法及装置、电子设备、计算机可读存储介质及计算机程序产品。The present disclosure relates to the technical field of image processing, and in particular to an image processing method and device, electronic equipment, computer-readable storage media, and computer program products.
背景技术Background technique
随着摄像头的增多,越来越多场景利用摄像头提高社会治安管理能力。如,对进入特定区域的车辆进行跟踪,即为其中的一个应用场景。With the increase of cameras, more and more scenes use cameras to improve social security management capabilities. For example, tracking vehicles entering a specific area is one of the application scenarios.
目前的方法中,在确定摄像头拍摄到车辆后,会显示该摄像头所采集的视频。但在车辆驶出该摄像头的拍摄区域后,仍然显示该摄像头所采集的视频,而未显示车辆的实时视频。In the current method, after it is determined that the camera captures the vehicle, the video captured by the camera will be displayed. But after the vehicle drives out of the shooting area of the camera, the video captured by the camera is still displayed instead of the real-time video of the vehicle.
发明内容Contents of the invention
本公开提供一种图像处理方法及装置、电子设备、计算机可读存储介质及计算机程序产品。The disclosure provides an image processing method and device, electronic equipment, a computer-readable storage medium, and a computer program product.
第一方面,提供了一种图像处理方法,所述方法包括:In a first aspect, an image processing method is provided, the method comprising:
在确定第一目标车辆处于所述第一摄像头的拍摄区域内的情况下,确定所述第一目标车辆的第一视频源设备为所述第一摄像头;在确定所述第一目标车辆从所述第一摄像头的拍摄区域驶入第二摄像头的拍摄区域的情况下,将所述第一目标车辆的第一视频源设备由所述第一摄像头切换为所述第二摄像头,所述第一摄像头与所述第二摄像头不同。When it is determined that the first target vehicle is in the shooting area of the first camera, it is determined that the first video source device of the first target vehicle is the first camera; When the shooting area of the first camera enters the shooting area of the second camera, the first video source device of the first target vehicle is switched from the first camera to the second camera, and the first The camera is different from said second camera.
第二方面,提供了一种图像处理装置,所述装置包括:In a second aspect, an image processing device is provided, the device comprising:
第一处理单元,配置为在确定第一目标车辆处于所述第一摄像头的拍摄区域内的情况下,确定所述第一目标车辆的第一视频源设备为所述第一摄像头;第二处理单元,配置为在确定所述第一目标车辆从所述第一摄像头的拍摄区域驶入第二摄像头的拍摄区域的情况下,将所述第一目标车辆的第一视频源设备由所述第一摄像头切换为所述第二摄像头,所述第一摄像头与所述第二摄像头不同。The first processing unit is configured to determine that the first video source device of the first target vehicle is the first camera when it is determined that the first target vehicle is within the shooting area of the first camera; the second processing A unit configured to transfer the first video source device of the first target vehicle from the first video source device of the first target vehicle to the A camera is switched to the second camera, and the first camera is different from the second camera.
第三方面,提供了一种电子设备,包括:处理器和存储器,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,在所述处理器执行所述计算机指令的情况下,所述电子设备执行如上述第一方面及其任意一种可能实现的方式的方法。In a third aspect, an electronic device is provided, including: a processor and a memory, the memory is used to store computer program codes, the computer program codes include computer instructions, and when the processor executes the computer instructions , the electronic device executes the method according to the foregoing first aspect and any possible implementation manner thereof.
第四方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序包括程序指令,在所述程序指令被处理器执行的情况下,使所述处理器执行如上述第一方面及其任意一种可能实现的方式的方法。In a fourth aspect, a computer-readable storage medium is provided. A computer program is stored in the computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a processor, the The processor executes the method according to the first aspect and any possible implementation manner thereof.
第五方面,提供了一种计算机程序产品,所述计算机程序产品包括计算机程序或指令,在所述计算机程序或指令在计算机上运行的情况下,使得所述计算机执行上述第一方面及其任一种可能的实现方式的方法。In a fifth aspect, a computer program product is provided, the computer program product includes a computer program or an instruction, and when the computer program or instruction is run on a computer, the computer executes the first aspect and any of the above-mentioned aspects. A method of one possible implementation.
本公开实施例通过在确定所述第一目标车辆从所述第一摄像头的拍摄区域驶入第二摄像头的拍摄区域的情况下,将所述第一目标车辆的第一视频源设备由所述第一摄像头切换为 所述第二摄像头,可提高确定的实时第一视频源设备的准确度,进而提升视频接力的效果。In the embodiment of the present disclosure, when it is determined that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera, the first video source device of the first target vehicle is transferred from the Switching the first camera to the second camera can improve the accuracy of the determined real-time first video source device, thereby improving the effect of video relay.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
附图说明Description of drawings
为了更清楚地说明本公开实施例或背景技术中的技术方案,下面将对本公开实施例或背景技术中所需要使用的附图进行说明。In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the background art, the following will describe the drawings that need to be used in the embodiments of the present disclosure or the background art.
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。The accompanying drawings here are incorporated into the description and constitute a part of the present description. These drawings show embodiments consistent with the present disclosure, and are used together with the description to explain the technical solution of the present disclosure.
图1为本公开实施例提供的一种图像处理系统的架构示意图;FIG. 1 is a schematic diagram of the architecture of an image processing system provided by an embodiment of the present disclosure;
图2为本公开实施例提供的一种图像处理方法的流程示意图;FIG. 2 is a schematic flowchart of an image processing method provided by an embodiment of the present disclosure;
图3为本公开实施例提供的一种显示页面示意图;FIG. 3 is a schematic diagram of a display page provided by an embodiment of the present disclosure;
图4为本公开实施例提供的一种图像处理装置的结构示意图;FIG. 4 is a schematic structural diagram of an image processing device provided by an embodiment of the present disclosure;
图5为本公开实施例提供的一种图像处理装置的硬件结构示意图。FIG. 5 is a schematic diagram of a hardware structure of an image processing device provided by an embodiment of the present disclosure.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本公开方案,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。In order to enable those skilled in the art to better understand the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only It is a part of the embodiments of the present disclosure, but not all of them. Based on the embodiments in the present disclosure, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present disclosure.
本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包括。例如包括了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。The terms "first", "second" and the like in the specification and claims of the present disclosure and the above drawings are used to distinguish different objects, rather than to describe a specific order. Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally further includes For other steps or units inherent in these processes, methods, products or devices.
应当理解,在本公开中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上,“至少两个(项)”是指两个或三个及三个以上,“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。字符“/”可表示前后关联对象是一种“或”的关系,是指这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”,其中a,b,c可以是单个,也可以是多个。字符“/”还可表示数学运算中的除号,例如,a/b=a除以b;6/3=2。“以下至少一项(个)”或其类似表达。It should be understood that in this disclosure, "at least one (item)" means one or more, "multiple" means two or more, and "at least two (items)" means two or three And three or more, "and/or", is used to describe the association relationship of associated objects, indicating that there can be three types of relationships, for example, "A and/or B" can mean: only A exists, only B exists, and A exists at the same time and B, where A and B can be singular or plural. The character "/" can indicate that the contextual objects are an "or" relationship, which refers to any combination of these items, including any combination of single items (items) or plural items (items). For example, at least one item (piece) of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c ", where a, b, c can be single or multiple. The character "/" can also represent a division sign in mathematical operations, for example, a/b=a divided by b; 6/3=2. "At least one of the following" or similar expressions.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包括在本公开的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present disclosure. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.
随着摄像头的增多,越来越多场景利用摄像头提高社会治安管理能力。如,对进入特定区域的车辆进行跟踪,即为其中的一个应用场景。With the increase of cameras, more and more scenes use cameras to improve social security management capabilities. For example, tracking vehicles entering a specific area is one of the application scenarios.
目前的方法中,在确定摄像头拍摄到车辆后,会显示该摄像头所采集的视频。但在车辆驶出该摄像头的拍摄区域后,仍然显示该摄像头所采集的视频,而无法显示车辆的实时视频。基于此,本公开实施例提供了一种技术方案,以显示车辆的实时视频。In the current method, after it is determined that the camera captures the vehicle, the video captured by the camera will be displayed. But after the vehicle drives out of the shooting area of the camera, the video collected by the camera is still displayed, but the real-time video of the vehicle cannot be displayed. Based on this, the embodiment of the present disclosure provides a technical solution to display the real-time video of the vehicle.
本公开实施例的执行主体为图像处理装置,其中,图像处理装置可以是任意一种可执行本公开方法实施例所公开的技术方案的电子设备。图像处理装置可以是以下中的一种:手机、计算机、平板电脑、可穿戴智能设备。The execution subject of the embodiments of the present disclosure is an image processing apparatus, where the image processing apparatus may be any electronic device capable of executing the technical solutions disclosed in the method embodiments of the present disclosure. The image processing device may be one of the following: a mobile phone, a computer, a tablet computer, and a wearable smart device.
应理解,本公开方法实施例还可以通过处理器执行计算机程序代码的方式实现。下面结合本公开实施例中的附图对本公开实施例进行描述。It should be understood that the method embodiments of the present disclosure may also be implemented in a manner in which a processor executes computer program codes. Embodiments of the present disclosure are described below with reference to the accompanying drawings in the embodiments of the present disclosure.
请参阅图1,图1所示为本公开实施例提供的一种图像处理系统1000架构示意图。在图1中,图像处理装置1001与至少两个摄像头1002之间具有通信连接。图像处理装置1001还和显示设备1003存在通信连接,图像处理装置1001基于该通信连接可通过显示设备1003进行显示。Please refer to FIG. 1 . FIG. 1 is a schematic diagram of an image processing system 1000 provided by an embodiment of the present disclosure. In FIG. 1 , there is a communication connection between an image processing device 1001 and at least two cameras 1002 . The image processing apparatus 1001 also has a communication connection with the display device 1003 , and the image processing apparatus 1001 can display through the display device 1003 based on the communication connection.
在一些实施例中,图像处理装置1001是服务器。图像处理装置1001可部署在管理区域的控制中心。至少两个摄像头1002均部署于管理区域内,用于采集管理区域内的图像和/或视频。In some embodiments, the image processing apparatus 1001 is a server. The image processing device 1001 can be deployed in the control center of the management area. At least two cameras 1002 are deployed in the management area for collecting images and/or videos in the management area.
图像处理装置1001基于下文提供的技术方案对至少两个摄像头1002所采集到的图像和/或视频进行处理,确定第一目标车辆的第一视频源设备,进而可通过显示设备1003显示第一视频源设备的拍摄画面。如,至少两个摄像头1002包括第一摄像头和第二摄像头。图像处理装置1001在确定第一目标车辆出现在第一摄像头的拍摄区域内的情况下,确定第一视频源设备为第一摄像头,进而通过显示设备1003显示第一摄像头的拍摄画面。图像处理装置1001在确定第一目标车辆从第一摄像头的拍摄区域驶入第二摄像头的拍摄区域的情况下,将第一视频源设备由第一摄像头切换为第二摄像头,进而将显示设备1003的显示画面由第一摄像头的拍摄画面切换为第二摄像头的拍摄画面。The image processing device 1001 processes the images and/or videos collected by at least two cameras 1002 based on the technical solutions provided below, determines the first video source device of the first target vehicle, and then can display the first video through the display device 1003 The capture screen of the source device. For example, the at least two cameras 1002 include a first camera and a second camera. When the image processing device 1001 determines that the first target vehicle appears in the shooting area of the first camera, it determines that the first video source device is the first camera, and then displays the picture taken by the first camera through the display device 1003 . When the image processing device 1001 determines that the first target vehicle has entered the shooting area of the second camera from the shooting area of the first camera, it switches the first video source device from the first camera to the second camera, and then displays the display device 1003 The display screen of the first camera is switched from the shooting screen of the first camera to the shooting screen of the second camera.
由此,基于图像处理系统1000可实现对第一目标车辆在管理区域内的视频进行实时显示。Thus, based on the image processing system 1000 , real-time display of the video of the first target vehicle in the management area can be realized.
在一些实施例中,图像处理装置1001和显示设备1003可以为同一个终端设备,该终端设备同时包括图像处理分析能力以及显示能力,能同时实现图像处理装置1001及显示设备1003所执行的方法步骤。例如,图像处理装置1001和显示设备1003是计算机。In some embodiments, the image processing device 1001 and the display device 1003 may be the same terminal device, and the terminal device includes both image processing and analysis capabilities and display capabilities, and can simultaneously implement the method steps performed by the image processing device 1001 and the display device 1003 . For example, the image processing apparatus 1001 and the display device 1003 are computers.
请参阅图2,图2所示为本公开实施例提供的一种图像处理方法的流程示意图,所述方法由电子设备执行,所述方法包括以下步骤201和步骤202,其中:Please refer to FIG. 2. FIG. 2 is a schematic flowchart of an image processing method provided by an embodiment of the present disclosure, the method is executed by an electronic device, and the method includes the following steps 201 and 202, wherein:
步骤201、在确定第一目标车辆处于上述第一摄像头的拍摄区域内的情况下,确定上述第一目标车辆的第一视频源设备为上述第一摄像头。 Step 201. When it is determined that the first target vehicle is within the shooting area of the first camera, determine that the first video source device of the first target vehicle is the first camera.
在一些实施例中,车辆(包括上述第一目标车辆,以及下文将要提及的第二目标车辆和待识别车辆)可以是任意车辆。例如,第一目标车辆是轿车。又例如,第一目标车辆是泥头车。再例如,第一目标车辆是公交车。In some embodiments, the vehicle (including the above-mentioned first target vehicle, and the second target vehicle and the vehicle to be identified which will be mentioned below) may be any vehicle. For example, the first target vehicle is a sedan. For another example, the first target vehicle is a dump truck. For another example, the first target vehicle is a bus.
在一些实施例中,摄像头(包括上述第一摄像头和下文将要提及的第二摄像头)可以是摄像机,摄像头也可以是抓拍机。In some embodiments, the camera (including the above-mentioned first camera and the second camera to be mentioned below) may be a camera, and the camera may also be a capture machine.
在一些实施例中,车辆的视频源设备(包括上述第一目标车辆的第一视频源设备和下文将要提及的第二目标车辆的第二视频源设备)为,在显示车辆的实时视频时所显示的视频来源。In some embodiments, the video source device of the vehicle (including the first video source device of the above-mentioned first target vehicle and the second video source device of the second target vehicle to be mentioned below) is, when displaying the real-time video of the vehicle The source of the video shown.
例如,第一目标车辆的第一视频源设备为摄像头a,那么在显示第一目标车辆的实时视频时,显示摄像头a采集到的实时视频。For example, if the first video source device of the first target vehicle is camera a, then when displaying the real-time video of the first target vehicle, the real-time video captured by camera a is displayed.
第一目标车辆处于第一摄像头的拍摄区域内,说明在显示第一目标车辆的实时视频时,应显示第一摄像头采集的实时视频,因此,图像处理装置在该种情况下,确定第一目标车辆的第一视频源设备为第一摄像头。The first target vehicle is in the shooting area of the first camera, indicating that when displaying the real-time video of the first target vehicle, the real-time video collected by the first camera should be displayed. Therefore, in this case, the image processing device determines the first target The first video source device of the vehicle is the first camera.
步骤202、在确定上述第一目标车辆从上述第一摄像头的拍摄区域驶入第二摄像头的拍摄区域的情况下,将上述第一目标车辆的第一视频源设备由上述第一摄像头切换为上述第二摄像头,上述第一摄像头与上述第二摄像头不同。 Step 202. When it is determined that the first target vehicle has entered the shooting area of the second camera from the shooting area of the first camera, switch the first video source device of the first target vehicle from the first camera to the above-mentioned The second camera, the above-mentioned first camera is different from the above-mentioned second camera.
第一目标车辆从第一摄像头的拍摄区域驶入第二摄像头的拍摄区域,在显示第一目标车辆的实时视频时,应将所显示的视频由第一摄像头采集的实时视频切换为第二摄像头采集的实时视频。因此,在确定第一目标车辆从第一摄像头的拍摄区域驶入第二摄像头的拍摄区域的情况下,将第一目标车辆的第一视频源设备由第一摄像头切换为第二摄像头。The first target vehicle drives from the shooting area of the first camera into the shooting area of the second camera. When displaying the real-time video of the first target vehicle, the displayed video should be switched from the real-time video collected by the first camera to the second camera. Captured real-time video. Therefore, when it is determined that the first target vehicle is driving from the shooting area of the first camera into the shooting area of the second camera, the first video source device of the first target vehicle is switched from the first camera to the second camera.
在一些实施例中,图像处理装置在定第一目标车辆从第一摄像头的拍摄区域驶入第二摄 像头的拍摄区域的情况下,将第一目标车辆的第一视频源设备由第一摄像头切换为第二摄像头,由此可实时确定第一目标车辆的第一视频源设备。In some embodiments, the image processing device switches the first video source device of the first target vehicle from the first camera when the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera is the second camera, so that the first video source device of the first target vehicle can be determined in real time.
这样,在确定第一目标车辆的第一视频源设备后,可通过显示第一视频源设备采集的实时视频,实现显示第一目标车辆的实时视频。In this way, after the first video source device of the first target vehicle is determined, the real-time video of the first target vehicle can be displayed by displaying the real-time video collected by the first video source device.
为表述方便,下文将第一目标车辆从第一摄像头的拍摄区域驶入第二摄像头的拍摄区域时,将第一目标车辆的第一视频源设备由第一摄像头切换为第二摄像头称为视频接力。For the convenience of expression, when the first target vehicle drives from the shooting area of the first camera into the shooting area of the second camera, the first video source device of the first target vehicle is switched from the first camera to the second camera, which is called video relay.
图像处理装置在确定上述第一目标车辆从上述第一摄像头的拍摄区域驶入第二摄像头的拍摄区域的情况下之前,还执行以下步骤:Before the image processing device determines that the above-mentioned first target vehicle enters the shooting area of the second camera from the shooting area of the above-mentioned first camera, it also performs the following steps:
步骤1、获取时间差阈值和至少两张第一图像。Step 1. Acquire a time difference threshold and at least two first images.
在一些实施例中,时间差阈值为正数。至少两张第一图像可以是一张第一图像,至少两张第一图像也可以是两张或两张以上第一图像。至少两张第一图像中的每张图像均包括第一目标车辆。至少一张第一图像包括第一摄像头采集到的图像和第二摄像头采集到的图像。In some embodiments, the time difference threshold is a positive number. The at least two first images may be one first image, and the at least two first images may also be two or more first images. Each of the at least two first images includes a first target vehicle. The at least one first image includes an image captured by the first camera and an image captured by the second camera.
例如,至少两张第一图像包括图像a和图像b,此时,图像a由第一摄像头采集得到,图像b由第二摄像头采集得到。而且图像a和图像b均包括第一目标车辆。For example, the at least two first images include image a and image b. At this time, image a is captured by the first camera, and image b is captured by the second camera. Moreover, both image a and image b include the first target vehicle.
在一种获取时间差阈值的实现方式中,图像处理装置接收用户通过输入组件输入的时间差阈值。上述输入组件包括:键盘、鼠标、触控屏、触控板和音频输入器等。In an implementation manner of acquiring a time difference threshold, the image processing apparatus receives a time difference threshold input by a user through an input component. The above-mentioned input components include: a keyboard, a mouse, a touch screen, a touch pad, an audio input device, and the like.
在另一种获取时间差阈值的实现方式中,图像处理装置接收终端发送的时间差阈值。上述终端包括:手机、计算机、平板电脑、服务器。In another implementation manner of acquiring the time difference threshold, the image processing apparatus receives the time difference threshold sent by the terminal. The above-mentioned terminals include: mobile phones, computers, tablet computers, and servers.
在一种获取至少两张第一图像的实现方式中,图像处理装置接收用户通过输入组件输入的至少两张第一图像。In an implementation manner of acquiring at least two first images, the image processing device receives at least two first images input by a user through an input component.
在另一种获取至少两张第一图像的实现方式中,图像处理装置接收终端发送的至少两张第一图像。In another implementation manner of acquiring at least two first images, the image processing apparatus receives at least two first images sent by the terminal.
应理解,在本公开实施例中,获取至少两张第一图像的步骤和获取时间差阈值的步骤可以分开执行,也可以同时执行。例如,图像处理装置可先获取至少两张第一图像,再获取时间差阈值。又例如,图像处理装置可先获取时间差阈值,再获取至少两张第一图像。再例如,图像处理装置在获取至少两张第一图像的过程中获取时间差阈值,或在获取时间差阈值的过程中获取至少两张第一图像。It should be understood that, in the embodiment of the present disclosure, the step of acquiring at least two first images and the step of acquiring the time difference threshold may be performed separately, or may be performed simultaneously. For example, the image processing device may first acquire at least two first images, and then acquire the time difference threshold. For another example, the image processing device may acquire the time difference threshold first, and then acquire at least two first images. For another example, the image processing apparatus acquires a time difference threshold during the process of acquiring at least two first images, or acquires at least two first images during the process of acquiring the time difference threshold.
步骤2、确定第二图像的时间戳与第三图像的时间戳的差值。 Step 2. Determine the difference between the time stamp of the second image and the time stamp of the third image.
在一些实施例中,第二图像为至少两张第一图像中由第二摄像头采集到的时间戳最小的图像,第三图像为至少两张第一图像中由第一摄像头采集到的时间戳最小的图像。In some embodiments, the second image is the image with the smallest time stamp collected by the second camera among the at least two first images, and the third image is the time stamp collected by the first camera among the at least two first images minimal image.
例如,至少两张第一图像包括图像a、图像b、图像c和图像d,其中,图像a和图像d由第一摄像头采集得到,图像b和图像c由第二摄像头采集得到。若图像a的采集时间早于图像d的采集时间,即图像a的时间戳小于图像d的时间戳,那么第二图像为图像a。若图像b的采集时间早于图像c的采集时间,即图像b的时间戳小于图像c的时间戳,那么第三图像为图像b。For example, the at least two first images include image a, image b, image c, and image d, where image a and image d are captured by the first camera, and image b and image c are captured by the second camera. If the acquisition time of image a is earlier than the acquisition time of image d, that is, the time stamp of image a is smaller than the time stamp of image d, then the second image is image a. If the acquisition time of image b is earlier than the acquisition time of image c, that is, the time stamp of image b is smaller than the time stamp of image c, then the third image is image b.
本公开实施例中,第二图像的时间戳与第三图像的时间戳的差值,即为第二图像的时间戳减去第三图像的时间戳得到的差值。该差值表征第二图像的采集时间与第三图像的采集时间之间的时间差。In the embodiment of the present disclosure, the difference between the time stamp of the second image and the time stamp of the third image is the difference obtained by subtracting the time stamp of the third image from the time stamp of the second image. The difference characterizes the time difference between the acquisition time of the second image and the acquisition time of the third image.
在执行完步骤1和步骤2之后,图像处理装置通过执行以下步骤确定上述第一目标车辆从上述第一摄像头的拍摄区域驶入第二摄像头的拍摄区域:After steps 1 and 2 are executed, the image processing device determines that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera by performing the following steps:
步骤3、在差值大于上述时间差阈值的情况下,确定上述第一目标车辆从上述第一摄像头的拍摄区域驶入上述第二摄像头的拍摄区域。Step 3. If the difference is greater than the time difference threshold, determine that the first target vehicle has entered the shooting area of the second camera from the shooting area of the first camera.
第一目标车辆从第一摄像头的拍摄区域驶入第二摄像头的拍摄区域,即第一目标车辆先出现在第一摄像图的拍摄区域内,再出现在第二摄像头的拍摄区域内。也就是说,第一摄像头先拍摄到第一目标车辆,第二摄像头后拍摄到第一目标车辆。又车辆从驶入第一摄像头的拍摄区域到驶出第一摄像头的拍摄区域需要一定的时间,即第一摄像头最早拍摄到第一目标车辆与第二摄像头最早拍摄到第一目标车辆之间存在时间差。因此可通过第二图像的采集时 间与第三图像的采集时间之间的时间差来判断第一目标车辆是否从第一摄像头的拍摄区域驶入第二摄像头破的拍摄区域。The first target vehicle drives from the shooting area of the first camera into the shooting area of the second camera, that is, the first target vehicle first appears in the shooting area of the first camera image, and then appears in the shooting area of the second camera. That is to say, the first camera captures the first target vehicle first, and the second camera captures the first target vehicle afterwards. In addition, it takes a certain amount of time for the vehicle to drive into the shooting area of the first camera and leave the shooting area of the first camera, that is, there is a gap between the first target vehicle captured by the first camera and the first target vehicle captured by the second camera. Time difference. Therefore, it can be judged whether the first target vehicle drives into the shooting area of the second camera from the shooting area of the first camera by the time difference between the collection time of the second image and the collection time of the third image.
本公开实施例中,时间差阈值可理解为车辆从驶入摄像头的拍摄区域到驶出摄像头的拍摄区域所需的时间。应理解,时间差阈值为经验值,时间差阈值的取值可依据实际情况进行设置。In the embodiment of the present disclosure, the time difference threshold may be understood as the time required for the vehicle to drive out of the shooting area of the camera from entering the shooting area of the camera. It should be understood that the time difference threshold is an empirical value, and the value of the time difference threshold may be set according to actual conditions.
若步骤2得到的差值大于时间差阈值,一方面由于时间差阈值为正数,第一摄像头先拍摄到第一目标车辆,第二摄像头后拍摄到第一目标车辆。另一方面,第一目标车辆大于时间差阈值,说明第一目标车辆已驶出第一摄像头的拍摄区域。也就是说,第一目标车辆已从第一摄像头的拍摄区域驶入第二摄像头的拍摄区域。If the difference obtained in step 2 is greater than the time difference threshold, on the one hand, because the time difference threshold is a positive number, the first camera captures the first target vehicle first, and the second camera captures the first target vehicle later. On the other hand, if the first target vehicle is greater than the time difference threshold, it means that the first target vehicle has driven out of the shooting area of the first camera. That is to say, the first target vehicle has driven into the shooting area of the second camera from the shooting area of the first camera.
因此,图像处理装置在差值大于时间差阈值的情况下,确定第一目标车辆从第一摄像头的拍摄区域驶入第二摄像头的拍摄区域。Therefore, the image processing device determines that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera when the difference value is greater than the time difference threshold.
若步骤2得到的差值小于或等于时间差阈值,那么包括以下两种情况:If the difference obtained in step 2 is less than or equal to the time difference threshold, it includes the following two situations:
1)第二摄像头先拍摄到第一目标车辆,第一摄像头后拍摄到第一目标车辆。此时第一目标车辆处于第一摄像头的拍摄区域内;1) The second camera captures the first target vehicle first, and then the first camera captures the first target vehicle. At this time, the first target vehicle is in the shooting area of the first camera;
2)第一摄像头先拍摄到第一目标车辆,第二摄像头后拍摄到第一目标车辆。但第一目标车辆未驶出第一摄像头的拍摄区域,即第一目标车辆仍处于第一摄像头的拍摄区域内。2) The first camera captures the first target vehicle first, and then the second camera captures the first target vehicle. However, the first target vehicle does not drive out of the shooting area of the first camera, that is, the first target vehicle is still in the shooting area of the first camera.
因此,在一种可能的实施方式中,图像处理装置在差值小于或等于时间差阈值的情况下,确定目标车辆处于第一摄像头的拍摄区域内。Therefore, in a possible implementation manner, the image processing device determines that the target vehicle is within the shooting area of the first camera when the difference value is less than or equal to the time difference threshold.
在步骤1和步骤2中,图像处理装置通过第二图像的时间戳与第三图像的时间戳之间的差值,判断第一目标车辆是否从第一摄像头的拍摄区域驶入第二摄像头的拍摄区域,可提高判断准确度,从而提升视频接力的效果。In step 1 and step 2, the image processing device judges whether the first target vehicle has driven from the shooting area of the first camera into the shooting area of the second camera through the difference between the time stamp of the second image and the time stamp of the third image. The shooting area can improve the accuracy of judgment, thereby improving the effect of video relay.
作为一种可能的实施方式,至少两张第一图像包括目标车辆图像集中时间戳最大的n张图像,上述目标车辆图像集中的图像均包括上述第一目标车辆,且上述目标车辆图像集中的图像均包括上述第一摄像头采集到的图像和上述第二摄像头采集到的图像,上述n为大于1的整数。As a possible implementation manner, the at least two first images include n images with the largest timestamp in the target vehicle image set, the images in the target vehicle image set all include the first target vehicle, and the images in the target vehicle image set Both include images collected by the first camera and images collected by the second camera, and n is an integer greater than 1.
摄像头采集到的图像具有时效性,而视频接力需要确定实时的第一视频源设备,因此在至少两张第一图像包括目标车辆图像集中时间戳最大的n张图像的情况下,可提高确定的实时第一视频源设备的准确度,进而提升视频接力的效果。The images collected by the camera are time-sensitive, and the video relay needs to determine the real-time first video source device, so when at least two first images include the n images with the largest time stamp in the target vehicle image set, the determination can be improved. The accuracy of the first video source device in real time, thereby improving the effect of video relay.
作为一种可能的实施方式,图像处理装置在上述差值大于上述时间差阈值的情况下之后,在确定上述第一目标车辆从上述第一摄像头的拍摄区域驶入上述第二摄像头的拍摄区域之前,还执行以下步骤:As a possible implementation manner, after the image processing device determines that the above-mentioned difference value is greater than the above-mentioned time difference threshold, before determining that the first target vehicle has entered the shooting area of the second camera from the shooting area of the above-mentioned first camera, Also perform the following steps:
步骤4、确定上述第一目标车辆在上述第二图像中的第一尺寸和上述第一目标车辆在上述第三图像中的第二尺寸。Step 4. Determine the first size of the first target vehicle in the second image and the second size of the first target vehicle in the third image.
本公开实施例中,第一目标车辆在图像中的尺寸可以是,第一目标车辆所覆盖的像素区域的尺寸。In the embodiment of the present disclosure, the size of the first target vehicle in the image may be the size of the pixel area covered by the first target vehicle.
在一种可能实现的方式中,第一目标车辆在图像中的尺寸是,包括第一目标车辆的车辆检测框的面积,其中,车辆检测框为通过对图像进行车辆检测处理得到。例如,图像处理装置通过对第二图像进行车辆检测处理得到包括第一目标车辆的第一车辆检测框,通过对第三图像进行车辆检测处理得到包括第一目标车辆的第二车辆检测框。第一车辆检测框的面积即为第一尺寸,第二车辆检测框的面积即为第二尺寸。In a possible implementation manner, the size of the first target vehicle in the image is an area including a vehicle detection frame of the first target vehicle, wherein the vehicle detection frame is obtained by performing vehicle detection processing on the image. For example, the image processing device obtains the first vehicle detection frame including the first target vehicle by performing vehicle detection processing on the second image, and obtains the second vehicle detection frame including the first target vehicle by performing vehicle detection processing on the third image. The area of the first vehicle detection frame is the first size, and the area of the second vehicle detection frame is the second size.
在执行完步骤4后,图像处理装置通过执行以下步骤确定上述第一目标车辆从上述第一摄像头的拍摄区域驶入上述第二摄像头的拍摄区域:After step 4 is executed, the image processing device determines that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera by performing the following steps:
步骤5、在上述第一尺寸大于上述第二尺寸的情况下,确定上述第一目标车辆从上述第一摄像头的拍摄区域驶入上述第二摄像头的拍摄区域。Step 5. If the first size is larger than the second size, determine that the first target vehicle has entered the shooting area of the second camera from the shooting area of the first camera.
若第一尺寸大于第二尺寸,说明第一目标车辆离第二摄像头的距离比第一目标车辆离第一摄像头的距离小,此时应该将第二摄像头作为第一目标车辆的第一视频源设备。因此,图像处理装置在第一尺寸大于第二尺寸的情况下,确定第一目标车辆从第一摄像头的拍摄区域 驶入第二摄像头的拍摄区域。If the first size is greater than the second size, it means that the distance between the first target vehicle and the second camera is smaller than the distance between the first target vehicle and the first camera. At this time, the second camera should be used as the first video source of the first target vehicle equipment. Therefore, when the first size is greater than the second size, the image processing device determines that the first target vehicle drives into the shooting area of the second camera from the shooting area of the first camera.
若第一尺寸小于第二尺寸,说明第一目标车辆离第二摄像头的距离比第一目标车辆离第一摄像头的距离大,此时应该将第一摄像头作为第一目标车辆的第一视频源设备。在一些实施例中,图像处理装置在第一尺寸小于第二尺寸的情况下,确定第一目标车辆仍处于第一摄像头的拍摄区域内。If the first size is smaller than the second size, it means that the distance between the first target vehicle and the second camera is greater than the distance between the first target vehicle and the first camera. At this time, the first camera should be used as the first video source of the first target vehicle equipment. In some embodiments, the image processing device determines that the first target vehicle is still within the shooting area of the first camera when the first size is smaller than the second size.
若第一尺寸等于第二尺寸,说明第一目标车辆离第二摄像头的距离与第一目标车辆离第一摄像头的距离相同,但由于第一目标车辆的当前第一视频源设备为第一摄像头,为使视频接力的显示效果更流畅,此时可仍将第一摄像头作为第一目标车辆的第一视频源设备。在一些实施例中,图像处理装置在第一尺寸等于第二尺寸的情况下,确定第一目标车辆仍处于第一摄像头的拍摄区域内。If the first size is equal to the second size, it means that the distance between the first target vehicle and the second camera is the same as the distance between the first target vehicle and the first camera, but since the current first video source device of the first target vehicle is the first camera , in order to make the display effect of the video relay more smooth, the first camera can still be used as the first video source device of the first target vehicle at this time. In some embodiments, the image processing device determines that the first target vehicle is still within the shooting area of the first camera when the first size is equal to the second size.
在步骤4和步骤5中,图像处理装置在差值大于时间差阈值的情况下,进一步依据第一尺寸和第二尺寸,判断第一目标车辆是否从第一摄像头的拍摄区域驶入第二摄像头的拍摄区域,可提高判断准确度,从而提升视频接力的效果。In step 4 and step 5, if the difference is greater than the time difference threshold, the image processing device further judges whether the first target vehicle enters the area of the second camera from the shooting area of the first camera based on the first size and the second size. The shooting area can improve the accuracy of judgment, thereby improving the effect of video relay.
作为一种可能的实施方式,图像处理装置还显示上述第一视频源设备的拍摄画面,这样可显示第一目标车辆的实时视频,达到可视化跟踪第一目标车辆的效果。在一些实施例中,图像处理装置与显示设备之间具有通信连接,图像处理装置通过该通信将第一视频源设备的拍摄画面显示于显示设备上。As a possible implementation manner, the image processing device also displays the shooting picture of the first video source device, so that the real-time video of the first target vehicle can be displayed, achieving the effect of visually tracking the first target vehicle. In some embodiments, there is a communication connection between the image processing device and the display device, through which the image processing device displays the captured picture of the first video source device on the display device.
作为一种可能的实施方式,第一摄像头和第二摄像头均部署在目标区域。本公开实施例中,目标区域可以是任意区域,例如,目标区域是学校,又例如,目标区域是工业园区。在一些实施例中,目标区域包括管理区域。第一摄像头和第二摄像头均部署在目标区域内,即第一摄像头的拍摄区域和第二摄像头的拍摄区域均位于目标区域内。As a possible implementation manner, both the first camera and the second camera are deployed in the target area. In the embodiment of the present disclosure, the target area may be any area, for example, the target area is a school, and for example, the target area is an industrial park. In some embodiments, the target area includes an administrative area. Both the first camera and the second camera are deployed in the target area, that is, both the shooting area of the first camera and the shooting area of the second camera are located in the target area.
图像处理装置还在确定上述第一目标车辆已离开上述目标区域的情况下,停止显示上述第一视频源设备的拍摄画面。由此可释放用于跟踪显示第一目标车辆的硬件资源,提高图像处理装置的硬件资源利用率,其中,该硬件资源包括:用于确定第一目标车辆的第一视频源设备的硬件资源和用于显示第一目标车辆的第一视频源设备的拍摄画面的硬件资源。The image processing device also stops displaying the shooting picture of the first video source device when it is determined that the first target vehicle has left the target area. This can release hardware resources for tracking and displaying the first target vehicle, and improve the utilization rate of hardware resources of the image processing device, wherein the hardware resources include: hardware resources for determining the first video source device of the first target vehicle and The hardware resource used for displaying the captured picture of the first video source device of the first target vehicle.
在该种实施方式中,图像处理装置通过第一摄像头和第二摄像头跟踪第一目标车辆在目标区域内的轨迹,并实时显示第一目标车辆在目标区域内的视频。在确定第一目标车辆已离开目标区域的情况下,确定无需继续跟踪第一目标车辆在目标区域内的轨迹,因此停止显示第一视频源设备的拍摄画面,以提高图像处理装置的硬件资源利用率。In this embodiment, the image processing device tracks the track of the first target vehicle in the target area through the first camera and the second camera, and displays the video of the first target vehicle in the target area in real time. When it is determined that the first target vehicle has left the target area, it is determined that there is no need to continue to track the track of the first target vehicle in the target area, so stop displaying the captured picture of the first video source device, so as to improve the utilization of hardware resources of the image processing device Rate.
在一些实施例中,停止显示第一视频源设备的拍摄画面为,停止显示第一视频源设备新采集到的拍摄画面,但将第一目标车辆离开目标区域的最后一帧图像作为第一跟踪显示区域的显示画面,其中,第一跟踪显示区域用于显示第一目标车辆在目标区域内的视频。例如,图像处理装置确定第一目标车辆驶出第二摄像头的拍摄区域后离开了目标区域,而第二摄像头拍摄到的最后一帧包括第一目标车辆的图像为图像a,那么图像处理装置将图像a作为第一跟踪显示区域的显示画面,即第一跟踪显示区域的显示画面在第一目标车辆离开目标区域后始终为图像a。In some embodiments, stopping displaying the shooting picture of the first video source device is to stop displaying the shooting picture newly collected by the first video source device, but take the last frame image of the first target vehicle leaving the target area as the first tracking A display screen of the display area, wherein the first tracking display area is used to display the video of the first target vehicle in the target area. For example, if the image processing device determines that the first target vehicle leaves the target area after driving out of the shooting area of the second camera, and the last frame captured by the second camera includes the image of the first target vehicle as image a, then the image processing device will Image a is used as the display screen of the first tracking display area, that is, the display screen of the first tracking display area is always image a after the first target vehicle leaves the target area.
在一种可能实现的方式中,接收到第一目标车辆已离开目标区域的指令的情况下,确定第一目标车辆已离开目标区域。该指令可以是用户通过输入组件向图像处理装置输入的,该指令也可以是终端向图像处理装置发送的。In a possible implementation manner, upon receiving an instruction that the first target vehicle has left the target area, it is determined that the first target vehicle has left the target area. The instruction may be input by the user to the image processing device through the input component, or the instruction may be sent by the terminal to the image processing device.
在另一种可能实现的方式中,图像处理装置在确定第一目标车辆从卡口摄像头的拍摄区域内消失,且在第一目标车辆从卡口摄像头的拍摄区域内消失之前第一目标车辆在目标区域内有轨迹记录的情况下,确定第一目标车辆已离开目标区域,其中,卡口摄像头包括部署于目标区域的出入口的摄像头。In another possible implementation manner, the image processing device determines that the first target vehicle disappears from the shooting area of the bayonet camera, and the first target vehicle disappears before the first target vehicle disappears from the shooting area of the bayonet camera. If there is a track record in the target area, it is determined that the first target vehicle has left the target area, wherein the bayonet camera includes a camera deployed at an entrance and exit of the target area.
在该种实施方式中,由于卡口摄像头部署在目标区域的出入口,当第一目标车辆从卡口摄像头的拍摄区域内消失时,说明第一目标车辆要么是已进入目标区域,要么是已离开目标区域。又由于在第一目标车辆从卡口摄像头的拍摄区域内消失之前第一目标车辆在目标区域内有轨迹记录,说明第一目标车辆已离开目标区域。因此,图像处理装置在该种情况下确定 第一目标车辆已离开目标区域。In this embodiment, since the bayonet camera is deployed at the entrance and exit of the target area, when the first target vehicle disappears from the shooting area of the bayonet camera, it means that the first target vehicle has either entered the target area or left target area. Also, since the first target vehicle has a track record in the target area before the first target vehicle disappears from the shooting area of the bayonet camera, it means that the first target vehicle has left the target area. Therefore, the image processing device determines in this case that the first target vehicle has left the target area.
作为一种可能的实施方式,第一视频源的拍摄画面显示于显示页面的第一显示区域,显示页面还包括第二显示区域,第二显示区域用于显示第二目标车辆的第二视频源设备的拍摄画面,第一目标车辆与第二目标车辆不同。在该种实施方式中,显示页面可同时显示第一目标车辆的实时视频和第二目标车辆的实时视频。As a possible implementation, the shooting picture of the first video source is displayed in the first display area of the display page, and the display page also includes a second display area, and the second display area is used to display the second video source of the second target vehicle In the shooting screen of the device, the first target vehicle is different from the second target vehicle. In this embodiment, the display page can simultaneously display the real-time video of the first target vehicle and the real-time video of the second target vehicle.
应理解,本公开实施例中的第一显示区域和第二显示区域仅为示例,不应理解为仅能在显示页面中同时显示两辆车的实时视频。在实际应用中,图像处理装置可在显示页面中同时显示m辆车的实施视频,其中,m为大于1的整数。It should be understood that the first display area and the second display area in the embodiment of the present disclosure are only examples, and should not be understood as only real-time videos of two vehicles can be displayed simultaneously on the display page. In practical applications, the image processing device may simultaneously display the implementation videos of m vehicles on the display page, where m is an integer greater than 1.
例如,在图3所示的显示页面中,包括四个不同的显示区域,分别为第一显示区域301、第二显示区域302、第三显示区域303和第四显示区域304,其中,不同显示区域分别用于显示不同车辆的实时视频。如,第一显示区域301用于显示车辆a的实时视频,第二显示区域302用于显示车辆b的实时视频,第三显示区域303用于显示车辆c的实时视频,第四显示区域304用于显示车辆d的实时视频。For example, in the display page shown in FIG. 3 , it includes four different display areas, namely the first display area 301, the second display area 302, the third display area 303 and the fourth display area 304, wherein different display areas Regions are used to display real-time video of different vehicles respectively. For example, the first display area 301 is used to display the real-time video of vehicle a, the second display area 302 is used to display the real-time video of vehicle b, the third display area 303 is used to display the real-time video of vehicle c, and the fourth display area 304 is used to display the real-time video of vehicle a. to display real-time video of vehicle d.
作为一种可能的实施方式,图像处理装置在确定第一目标车辆处于上述第一摄像头的拍摄区域内的情况下之前,还执行以下步骤:As a possible implementation manner, before the image processing device determines that the first target vehicle is within the shooting area of the above-mentioned first camera, the following steps are further performed:
步骤6、获取上述第一摄像头采集到的第二图像。Step 6. Obtain the second image captured by the above-mentioned first camera.
在一种可能实现的方式中,图像处理装置与第一摄像头之间存在通信连接,图像处理装置通过该通信连接获取第一摄像头采集到的第二图像。In a possible implementation manner, there is a communication connection between the image processing device and the first camera, and the image processing device acquires the second image captured by the first camera through the communication connection.
在另一种可能实现方式中,图像处理装置接收用户通过输入组件输入的第二图像。In another possible implementation manner, the image processing apparatus receives the second image input by the user through the input component.
在又一种可能实现方式中,图像处理装置接收终端发送的第二图像。In yet another possible implementation manner, the image processing apparatus receives the second image sent by the terminal.
在执行完步骤6后,图像处理装置在确定第二图像包括第一目标车辆的情况下,确定第一目标车辆处于上述第一摄像头的拍摄区域内。After step 6 is executed, the image processing device determines that the first target vehicle is within the shooting area of the first camera when it is determined that the second image includes the first target vehicle.
作为一种可能的实施方式,第二图像包括待识别车辆,图像处理装置在确定第二图像包括第一目标车辆的情况下之前,还执行以下步骤:As a possible implementation manner, the second image includes the vehicle to be identified, and the image processing device further performs the following steps before determining that the second image includes the first target vehicle:
步骤7、获取第一目标车辆的目标特征数据。Step 7. Obtain the target characteristic data of the first target vehicle.
在一些实施例中,第一目标车辆的目标特征数据携带第一目标车辆的身份信息,即通过将任意车辆的特征数据与目标特征数据进行比对,可确定该车辆与第一目标车辆是否相同。在一些实施例中,目标特征数据包括携带第一目标车辆的身份信息的特征向量。In some embodiments, the target characteristic data of the first target vehicle carries the identity information of the first target vehicle, that is, by comparing the characteristic data of any vehicle with the target characteristic data, it can be determined whether the vehicle is the same as the first target vehicle . In some embodiments, the target feature data includes a feature vector carrying identity information of the first target vehicle.
在一种可能实现的方式中,目标特征数据携带第一目标车辆的局部特征信息。例如,目标特征数据携带以下至少一种信息:车灯的特征信息、车标的特征信息、车窗的特征信息。In a possible implementation manner, the target feature data carries local feature information of the first target vehicle. For example, the target characteristic data carries at least one of the following information: characteristic information of vehicle lights, characteristic information of vehicle logos, and characteristic information of vehicle windows.
在另一种可能实现的方式中,目标特征数据携带第一目标车辆的全局特征信息,其中,全局特征信息包括第一目标车辆的整体外观特征信息。In another possible implementation manner, the target feature data carries global feature information of the first target vehicle, where the global feature information includes overall appearance feature information of the first target vehicle.
在又一种可能实现的方式中,目标特征数据既携带第一目标车辆的局部特征信息,又携带第一目标车辆的全局特征信息。In yet another possible implementation manner, the target feature data carries not only local feature information of the first target vehicle, but also global feature information of the first target vehicle.
在一种获取目标特征数据的实现方式中,图像处理装置接收用户通过输入组件输入的目标特征数据。In an implementation manner of acquiring target feature data, the image processing device receives target feature data input by a user through an input component.
在另一种获取目标特征数据的实现方式中,图像处理装置接收终端发送的目标特征数据。In another implementation manner of acquiring target feature data, the image processing apparatus receives target feature data sent by the terminal.
在执行完步骤7后,图像处理装置通过执行以下步骤确定第二图像包括第一目标车辆:After performing step 7, the image processing device determines that the second image includes the first target vehicle by performing the following steps:
步骤8、对上述第二图像进行特征提取处理,得到上述待识别车辆的第一特征数据。Step 8. Perform feature extraction processing on the second image to obtain the first feature data of the vehicle to be identified.
在一些实施例中,第一特征数据携带待识别车辆的身份信息,即通过将任意车辆的特征数据与第一特征数据进行比对,可确定该车辆与待识别车辆是否相同。在另外一些实施例中,第一特征数据包括携带待识别车辆的身份信息的特征向量。In some embodiments, the first feature data carries the identity information of the vehicle to be identified, that is, by comparing the feature data of any vehicle with the first feature data, it can be determined whether the vehicle is the same as the vehicle to be identified. In some other embodiments, the first feature data includes a feature vector carrying identity information of the vehicle to be identified.
在一种可能实现的方式中,第一特征数据携带待识别车辆的局部特征信息。例如,第一特征数据携带以下至少一种信息:车灯的特征信息、车标的特征信息、车窗的特征信息。In a possible implementation manner, the first feature data carries local feature information of the vehicle to be identified. For example, the first characteristic data carries at least one of the following information: characteristic information of vehicle lights, characteristic information of vehicle logos, and characteristic information of vehicle windows.
在另一种可能实现的方式中,第一特征数据携带待识别车辆的全局特征信息,其中,全局特征信息包括待识别车辆的整体外观特征信息。In another possible implementation manner, the first feature data carries global feature information of the vehicle to be identified, where the global feature information includes overall appearance feature information of the vehicle to be identified.
在又一种可能实现的方式中,第一特征数据既携带待识别车辆的局部特征信息,又携带待识别车辆的全局特征信息。In yet another possible implementation manner, the first feature data carries not only local feature information of the vehicle to be identified, but also global feature information of the vehicle to be identified.
本公开实施例中,特征提取处理用于提取出图像中的车辆的特征数据。在一种可能实现的方式中,图像处理装置通过对图像进行卷积处理,实现对图像的特征提取处理。In the embodiment of the present disclosure, the feature extraction process is used to extract feature data of the vehicle in the image. In a possible implementation manner, the image processing device implements feature extraction processing on the image by performing convolution processing on the image.
在另一种可能实现的方式中,对图像的特征提取处理通过卷积神经网络实现。通过将带有标注信息的图像作为训练数据,对卷积神经网络进行训练,使训练得到的卷积神经网络可完成对图像的特征提取处理。其中,训练数据的标注信息包括以下至少一种:图像中的车辆的局部特征信息、图像中的车辆的全局特征信息。In another possible implementation manner, the feature extraction processing of the image is implemented through a convolutional neural network. By using images with labeled information as training data, the convolutional neural network is trained, so that the trained convolutional neural network can complete the feature extraction process of the image. Wherein, the annotation information of the training data includes at least one of the following: local feature information of the vehicle in the image, and global feature information of the vehicle in the image.
步骤9、依据上述目标特征数据和上述第一特征数据之间的第一相似度,得到上述第一目标车辆和上述待识别车辆的比对结果。Step 9. Obtain a comparison result between the first target vehicle and the vehicle to be identified according to the first similarity between the target feature data and the first feature data.
在一些实施例中,第一相似度为目标特征数据和第一特征数据之间的相似度。比对结果包括第一目标车辆与待识别车辆相同,比对结果或包括第一目标车辆与待识别车辆不同。In some embodiments, the first similarity is the similarity between the target feature data and the first feature data. The comparison result includes that the first target vehicle is the same as the vehicle to be identified, and the comparison result may include that the first target vehicle is different from the vehicle to be identified.
在一种可能实现的方式中,图像处理装置在第一相似度大于特征比对阈值的情况下,确定比对结果包括第一目标车辆与待识别车辆相同;图像处理装置在第一相似度小于或等于特征比对阈值的情况下,确定比对结果包括第一目标车辆与待识别车辆不同。In a possible implementation manner, the image processing device determines that the comparison result includes that the first target vehicle is the same as the vehicle to be identified when the first similarity is greater than the feature comparison threshold; the image processing device determines that the first similarity is less than or equal to the feature comparison threshold, it is determined that the comparison result includes that the first target vehicle is different from the vehicle to be identified.
在另一种可能实现的方式中,图像处理装置确定第一相似度的平方得到平方相似度。在平方相似度大于特征比对阈值的情况下,确定比对结果包括第一目标车辆与待识别车辆相同;图像处理装置在平方相似度小于或等于特征比对阈值的情况下,确定比对结果包括第一目标车辆与待识别车辆不同。In another possible implementation manner, the image processing device determines the square of the first similarity to obtain the squared similarity. In the case where the square similarity is greater than the feature comparison threshold, determining the comparison result includes that the first target vehicle is the same as the vehicle to be identified; when the square similarity is less than or equal to the feature comparison threshold, the image processing device determines the comparison result It is included that the first target vehicle is different from the vehicle to be identified.
步骤10、在上述比对结果包括上述第一目标车辆和上述待识别车辆相同的情况下,确定上述第二图像包括上述第一目标车辆。Step 10. When the comparison result includes that the first target vehicle is the same as the vehicle to be identified, determine that the second image includes the first target vehicle.
在步骤7至步骤10中,图像处理装置通过对第一特征数据和目标特征数据进行比对,得到第一相似度,进而依据第一相似度确定待识别车辆是否为第一目标车辆,从而确定第二图像中是否包括第一目标车辆。In steps 7 to 10, the image processing device compares the first feature data with the target feature data to obtain the first similarity, and then determines whether the vehicle to be recognized is the first target vehicle according to the first similarity, thereby determining Whether the first target vehicle is included in the second image.
在一些实施例中,在比对结果包括第一目标车辆和待识别车辆不同的情况下,确定第二图像不包括第一目标车辆。In some embodiments, if the comparison result includes that the first target vehicle is different from the vehicle to be identified, it is determined that the second image does not include the first target vehicle.
作为一种可能的实施方式,图像处理装置在执行步骤9之前,还执行以下步骤:As a possible implementation manner, before performing step 9, the image processing device further performs the following steps:
步骤11、获取上述第一目标车辆的至少一个第一目标车辆属性。 Step 11. Obtain at least one first target vehicle attribute of the above-mentioned first target vehicle.
在一些实施例中,车辆属性(包括上述第一目标车辆属性和下文将要提及的第一目标车辆属性)包括以下至少一种:车辆类型、车身颜色、车辆品牌、车辆号码、车辆型号。In some embodiments, the vehicle attribute (including the above-mentioned first target vehicle attribute and the first target vehicle attribute to be mentioned below) includes at least one of the following: vehicle type, body color, vehicle brand, vehicle number, and vehicle model.
在一种可能实现的方式中,车辆类型包括:两厢轿车、三厢轿车、运动型多用途汽车(sport utility vehicle,SUV)、皮卡、卡车、公交车、泥头车、渣土车。In a possible implementation manner, the vehicle types include: a hatchback sedan, a sedan sedan, a sport utility vehicle (sport utility vehicle, SUV), a pickup, a truck, a bus, a dump truck, and a muck truck.
在一种可能实现的方式中,车身颜色包括:黑色、蓝色、灰色、白色、藏青色、黄色、红色、绿色、紫色。In a possible implementation manner, the body colors include: black, blue, gray, white, navy blue, yellow, red, green, and purple.
在一种可能实现的方式中,车辆品牌包括:奔驰、宝马、奥迪、大众、本田、丰田、日产、长城、比亚迪。In a possible implementation manner, the vehicle brands include: Mercedes-Benz, BMW, Audi, Volkswagen, Honda, Toyota, Nissan, Great Wall, and BYD.
本公开实施中,第一目标车辆属性为第一目标车辆的车辆属性。至少一个第一目标车辆属性可以是一个第一目标车辆属性,至少一个第一目标车辆属性也可以是两个或两个以上第一目标车辆属性。例如,至少一个第一目标车辆属性包括第一目标车辆的车身颜色。又例如,至少一个第一目标车辆属性包括第一目标车辆的车身颜色和第一目标车辆的车辆类型。In the implementation of the present disclosure, the first target vehicle attribute is the vehicle attribute of the first target vehicle. The at least one first target vehicle attribute may be one first target vehicle attribute, and the at least one first target vehicle attribute may also be two or more first target vehicle attributes. For example, the at least one first target vehicle attribute includes a body color of the first target vehicle. For another example, the at least one attribute of the first target vehicle includes the body color of the first target vehicle and the vehicle type of the first target vehicle.
在一种获取第一目标车辆的至少一个第一目标车辆属性的实现方式中,第一目标车辆的至少一个第一目标车辆属性存储于图像处理装置。图像处理装置通过从存储介质中读取第一目标车辆的至少一个第一目标车辆属性获取第一目标车辆的至少一个第一目标车辆属性。In an implementation manner of acquiring at least one first target vehicle attribute of a first target vehicle, the at least one first target vehicle attribute of the first target vehicle is stored in an image processing device. The image processing device acquires at least one first target vehicle attribute of the first target vehicle by reading at least one first target vehicle attribute of the first target vehicle from the storage medium.
在另一种获取第一目标车辆的至少一个第一目标车辆属性的实现方式中,图像处理装置接收用户通过输入组件输入的第一目标车辆的至少一个第一目标车辆属性。In another implementation manner of acquiring at least one first target vehicle attribute of a first target vehicle, the image processing device receives at least one first target vehicle attribute of the first target vehicle input by a user through an input component.
在又一种获取第一目标车辆的至少一个第一目标车辆属性的实现方式中,图像处理装置接收终端发送的第一目标车辆的至少一个第一目标车辆属性。In yet another implementation manner of acquiring at least one first target vehicle attribute of the first target vehicle, the image processing device receives the at least one first target vehicle attribute of the first target vehicle sent by the terminal.
步骤12、对上述第二图像进行车辆属性提取处理,得到上述待识别车俩的至少一个第一车辆属性。 Step 12. Perform vehicle attribute extraction processing on the second image to obtain at least one first vehicle attribute of the vehicle to be identified.
在一些实施例中,车辆属性提取处理用于提取出图像中的车辆属性。车辆属性提取处理可通过车辆属性提取模型实现,其中,车辆属性提取模型为用于进行提取车辆属性的计算机视觉模型。In some embodiments, a vehicle attribute extraction process is used to extract vehicle attributes in the image. The vehicle attribute extraction process can be realized by a vehicle attribute extraction model, wherein the vehicle attribute extraction model is a computer vision model for extracting vehicle attributes.
本公开实施例中,第一车辆属性为通过对第一图像进行车辆属性提取处理,得到的待识别车辆的车辆属性。至少一个第一车辆属性可以是一个第一车辆属性,至少一个第一车辆属性也可以是两个或两个以上第一车辆属性。例如,至少一个第一车辆属性包括待识别车辆的车身颜色。又例如,至少一个第一车辆属性包括待识别车辆的车身颜色和待识别车辆的车辆类型。In the embodiment of the present disclosure, the first vehicle attribute is the vehicle attribute of the vehicle to be recognized obtained by performing vehicle attribute extraction processing on the first image. The at least one first vehicle attribute may be one first vehicle attribute, and the at least one first vehicle attribute may also be two or more first vehicle attributes. For example, the at least one first vehicle attribute includes the body color of the vehicle to be identified. For another example, the at least one first vehicle attribute includes the body color of the vehicle to be identified and the vehicle type of the vehicle to be identified.
在执行完步骤11和步骤12后,图像处理装置在执行步骤9的过程中执行以下步骤:After performing step 11 and step 12, the image processing device performs the following steps in the process of performing step 9:
步骤13、依据上述第一相似度和第二相似度,得到上述第一目标车辆与上述待识别车辆的比对结果,上述第二相似度为上述至少一个第一目标车辆属性和上述至少一个第一车辆属性之间的相似度。 Step 13. Obtain a comparison result between the first target vehicle and the vehicle to be identified according to the first similarity and the second similarity. The second similarity is the at least one first target vehicle attribute and the at least one first target vehicle attribute. A similarity between vehicle attributes.
在一种可能实现的方式中,图像处理装置在第一相似度大于特征比对阈值,且第二相似度大于属性比对阈值的情况下,确定比对结果包括第一目标车辆与待识别车辆相同。否则,图像处理装置确定比对结果包括第一目标车辆与待识别车辆不同。In a possible implementation manner, the image processing device determines that the comparison result includes the first target vehicle and the vehicle to be identified when the first similarity is greater than the feature comparison threshold and the second similarity is greater than the attribute comparison threshold. same. Otherwise, the image processing device determines that the comparison result includes that the first target vehicle is different from the vehicle to be identified.
在该种实现方式中,第一相似度大于特征比对阈值,说明第一目标车辆的特征数据与待识别车辆的特征数据相似。第二相似度大于属性比对阈值,说明第一目标车辆的车辆属性与待识别车辆的车辆属性相似。因此,在该种情况下判断第一目标车辆与待识别车辆相同,可提高判断准确度。In this implementation manner, the first similarity degree is greater than the feature comparison threshold, indicating that the feature data of the first target vehicle is similar to the feature data of the vehicle to be identified. The second similarity is greater than the attribute comparison threshold, indicating that the vehicle attribute of the first target vehicle is similar to the vehicle attribute of the vehicle to be identified. Therefore, in this case, judging that the first target vehicle is the same as the vehicle to be recognized can improve the judgment accuracy.
在另一种可能实现的方式中,图像处理装置依据第一相似度和第二相似度得到第三相似度。在第三相似度大于相似度阈值的情况下,确定比对结果包括第一目标车辆与待识别车辆相同。在第三相似度小于或等于相似度阈值的情况下,确定比对结果包括第一目标车辆与待识别车辆不同。In another possible implementation manner, the image processing apparatus obtains the third similarity according to the first similarity and the second similarity. In a case where the third similarity is greater than the similarity threshold, it is determined that the comparison result includes that the first target vehicle is the same as the vehicle to be identified. In a case where the third similarity is less than or equal to the similarity threshold, it is determined that the comparison result includes that the first target vehicle is different from the vehicle to be identified.
假设第一相似度为s1,第二相似度为s2,第三相似度为s3。在一种可能实现的方式中,图像处理装置通过对第一相似度和第二相似度进行加权求和得到第三相似度。此时,s1、s2、s3满足下式:Suppose the first similarity is s1, the second similarity is s2, and the third similarity is s3. In a possible implementation manner, the image processing apparatus obtains the third similarity by weighting and summing the first similarity and the second similarity. At this time, s1, s2, and s3 satisfy the following formula:
s3=c1×s1+c2×s2…公式(1)s3=c1×s1+c2×s2…Formula (1)
其中,c1和c2均为小于或等于1的非负数,且c1+c2=1。Wherein, both c1 and c2 are non-negative numbers less than or equal to 1, and c1+c2=1.
在另一种可能实现的方式中,s1、s2、s3满足下式:In another possible implementation, s1, s2, and s3 satisfy the following formula:
s3=s1×s2…公式(2)s3=s1×s2...Formula (2)
在又一种可能实现的方式中,s1、s2、s3满足下式:In yet another possible implementation, s1, s2, and s3 satisfy the following formula:
s3=(s1×s2) 2…公式(3) s3=(s1×s2) 2 ...Formula (3)
在步骤11~步骤13中,图像处理装置依据第一相似度和第二相似度得到比对结果,既利用了特征数据所携带的信息,又利用了车辆属性所携带的信息,因此可提高比对结果的准确度。In steps 11 to 13, the image processing device obtains the comparison result according to the first similarity and the second similarity, which not only utilizes the information carried by the characteristic data, but also utilizes the information carried by the vehicle attribute, so the comparison result can be improved. accuracy of the results.
作为一种可能的实施方式,在第一摄像头部署于目标区域的情况下,图像处理装置在执行步骤7的过程中执行以下步骤:As a possible implementation manner, when the first camera is deployed in the target area, the image processing device performs the following steps in the process of executing step 7:
步骤14、获取待跟踪车辆数据库。Step 14, acquiring the vehicle database to be tracked.
在一些实施例中,待跟踪车辆数据库包括至少一辆待跟踪车辆的特征数据。例如,待跟踪车辆数据库包括待跟踪车辆a的特征数据和待跟踪车辆b的特征数据。In some embodiments, the database of vehicles to be tracked includes characteristic data of at least one vehicle to be tracked. For example, the database of vehicles to be tracked includes feature data of vehicle a to be tracked and feature data of vehicle b to be tracked.
在一些实施例中,至少一辆待跟踪车辆包括需要跟踪在目标区域内的轨迹的车辆。例如,目标区域为管理区域。为了目标区域的安全,对于任意一辆进入目标区域的车辆均需进行跟踪,此时,进入目标区域的车辆为待跟踪车辆。In some embodiments, the at least one vehicle to be tracked includes a vehicle whose trajectory is to be tracked within the target area. For example, the target area is the management area. For the safety of the target area, any vehicle entering the target area needs to be tracked. At this time, the vehicle entering the target area is the vehicle to be tracked.
在一些实施中,目标车辆可以是至少一辆待跟踪车辆中的任意一辆车,即目标车辆为需要跟踪在目标区域内的轨迹的车辆。In some implementations, the target vehicle may be any one of the at least one vehicle to be tracked, that is, the target vehicle is a vehicle that needs to track a trajectory within the target area.
在一种获取待跟踪车辆数据库的实现方式中,图像处理装置接收用户通过输入组件输入的待跟踪车辆数据库。In an implementation manner of acquiring a database of vehicles to be tracked, the image processing device receives the database of vehicles to be tracked input by a user through an input component.
在另一种获取待跟踪车辆数据库的实现方式中,图像处理装置接收终端发送的待跟踪车辆数据库。In another implementation manner of acquiring the database of vehicles to be tracked, the image processing device receives the database of vehicles to be tracked sent by the terminal.
步骤15、在获取上述第一摄像头采集到的上述第二图像的情况下,从上述待跟踪车辆数据库获取一个特征数据,作为上述目标特征数据。Step 15. In the case of acquiring the second image captured by the first camera, acquire a characteristic data from the database of the vehicle to be tracked as the characteristic data of the target.
第一摄像头部署在目标区域内,而第二图像由第一摄像头采集得到,并且第二图像包含待识别车辆。那么图像处理装置获取第一摄像头采集到的第二图像,说明待识别车辆已进入目标区域,因此需要确定待识别车辆的身份,即确定待识别车辆为至少一个辆待跟踪车辆中的哪一辆车。The first camera is deployed in the target area, and the second image is collected by the first camera, and the second image includes the vehicle to be identified. Then the image processing device obtains the second image collected by the first camera, indicating that the vehicle to be identified has entered the target area, so it is necessary to determine the identity of the vehicle to be identified, that is, to determine which of the at least one vehicle to be tracked is the vehicle to be identified car.
因此图像处理装置在获取第一摄像头采集到的第二图像的情况下,从待跟踪车辆数据库中获取一个特征数据,并将该特征数据作为目标特征数据。这样,即可通过将第一特征数据与目标特征数据进行比对,确定待识别车辆是否为目标车辆。Therefore, when the image processing device acquires the second image captured by the first camera, it acquires a feature data from the database of the vehicle to be tracked, and uses the feature data as target feature data. In this way, it can be determined whether the vehicle to be identified is the target vehicle by comparing the first characteristic data with the target characteristic data.
应理解,步骤15中的目标特征数据仅为示例,不应理解为图像处理装置仅从待跟踪车辆数据库中获取一辆待跟踪车辆的特征数据,并确定待识别车辆与至少一辆待跟踪车辆中的某一辆车是否相同。在实际应用中,图像处理装置可将第一特征数据分别与待跟踪车辆数据库中的每辆待跟踪车辆的特征数据进行比对,以确定待识别车辆的身份。It should be understood that the target feature data in step 15 is only an example, and it should not be understood that the image processing device only acquires feature data of a vehicle to be tracked from the vehicle to be tracked database, and determines the relationship between the vehicle to be identified and at least one vehicle to be tracked Is one of the cars in the same. In practical applications, the image processing device may compare the first characteristic data with the characteristic data of each vehicle to be tracked in the database of vehicles to be tracked, so as to determine the identity of the vehicle to be identified.
作为一种可能的实施方式,在比对结果包括第一目标车辆与待识别车辆相同的情况下,还执行以下步骤:获取目标区域的第五图像和第一摄像头在第五图像中的第一位置;依据第一位置,确定第一目标车辆在第五图像中的第二位置。As a possible implementation, when the comparison result includes that the first target vehicle is the same as the vehicle to be identified, the following steps are also performed: acquiring the fifth image of the target area and the first image of the first camera in the fifth image. Position: Determine a second position of the first target vehicle in the fifth image according to the first position.
比对结果包括第一目标车辆与待识别车辆相同,说明第一目标车辆已出现在第一摄像头的拍摄区域内。因此,可依据第一位置,确定第一目标车辆在第五图像中的位置,即第二位置。在一种可能实现的方式中,图像处理装置将第一位置作为第二位置。The comparison result includes that the first target vehicle is the same as the vehicle to be identified, indicating that the first target vehicle has appeared in the shooting area of the first camera. Therefore, the position of the first target vehicle in the fifth image, ie, the second position, can be determined according to the first position. In a possible implementation manner, the image processing apparatus uses the first location as the second location.
在一些实施例中,目标区域为地图缺失区域。地图缺失区域包括地图上缺失细节信息的区域,其中,细节信息包括以下至少一种:建筑物信息、道路信息。这样,通过确定第一目标车辆在第五图中的位置,可提高在目标区域中定位的准确度。In some embodiments, the target area is a map missing area. The missing area of the map includes an area missing detailed information on the map, wherein the detailed information includes at least one of the following: building information and road information. In this way, by determining the position of the first target vehicle in the fifth map, the accuracy of positioning in the target area can be improved.
在一些实施例中,在确定第二位置后,在第五图像中显示第二位置,即显示第一目标车辆在目标区域内的位置。In some embodiments, after the second position is determined, the second position is displayed in the fifth image, that is, the position of the first target vehicle within the target area is displayed.
在一些实施例中,图像处理装置在获得第一目标车辆在第五图像中的至少两个位置的情况下,依据至少两个位置确定第一目标车辆在第五图像中的轨迹,并对该轨迹进行显示。In some embodiments, when the image processing device obtains at least two positions of the first target vehicle in the fifth image, determine the track of the first target vehicle in the fifth image according to the at least two positions, and The track is displayed.
作为一种可能的实施方式,图像处理装置在执行步骤14的过程中执行以下步骤:As a possible implementation manner, the image processing device performs the following steps in the process of executing step 14:
步骤16、获取至少一张第四图像,上述至少一张第四图像包括上述至少一辆待跟踪车辆。 Step 16. Acquire at least one fourth image, where the at least one fourth image includes the at least one vehicle to be tracked.
在一种获取至少一张第四图像的实现方式中,图像处理装置接收用户通过输入组件输入的至少一张第四图像。In an implementation manner of acquiring at least one fourth image, the image processing apparatus receives at least one fourth image input by a user through an input component.
在另一种获取至少一张第四图像的实现方式中,图像处理装置接收终端发送的至少一张第四图像。In another implementation manner of acquiring at least one fourth image, the image processing apparatus receives at least one fourth image sent by the terminal.
在又一种获取至少一张第四图像的实现方式中,图像处理装置与至少一个卡口摄像头之间存在通信连接,其中,至少一个卡口摄像头包括部署在目标区域的出入口的摄像头。图像处理装置通过该通信连接获取至少一个卡口摄像头采集到的至少一张待确认图像,作为至少一张第四图像。In yet another implementation manner of acquiring at least one fourth image, there is a communication connection between the image processing device and at least one checkpoint camera, wherein the at least one checkpoint camera includes a camera deployed at an entrance and exit of the target area. The image processing device acquires at least one image to be confirmed captured by at least one bayonet camera as at least one fourth image through the communication connection.
在一些实施例中,图像处理装置在获取在待确认图像后,确定待确认图像中的车辆在目标区域内不存在轨迹记录的情况下,将待确认图像作为第四图像,由此得到至少一张第四图像。In some embodiments, after acquiring the image to be confirmed, the image processing device determines that the vehicle in the image to be confirmed does not have a track record in the target area, and uses the image to be confirmed as the fourth image, thereby obtaining at least one a fourth image.
例如,至少一张待确认图像包括图像a和图像b,其中图像a包括车辆A,图像b包括车辆B。若车辆A在目标区域内不存在轨迹记录,图像处理装置将图像a作为第四图像。若车辆B在目标区域内存在轨迹记录,图像处理装置不将图像b作为第四图像。此时,至少一张第四图像包括图像a。For example, at least one image to be confirmed includes image a and image b, wherein image a includes vehicle A, and image b includes vehicle B. If there is no track record of vehicle A in the target area, the image processing device uses image a as the fourth image. If the vehicle B has a track record in the target area, the image processing device does not use the image b as the fourth image. At this time, at least one fourth image includes image a.
步骤17、依据上述至少一张第四图像,得到上述待跟踪车辆数据库。 Step 17. Obtain the vehicle database to be tracked according to the at least one fourth image.
在一种可能实现的方式中,图像处理装置通过对至少一张第四图像进行结构化处理,得到待跟踪车辆数据库。In a possible implementation manner, the image processing device obtains the vehicle database to be tracked by performing structural processing on at least one fourth image.
在另一种可能实现的方式中,图像处理装置通过对至少一张第四图像分别进行特征提取处理,得到至少一辆待跟踪车辆的特征数据,得到待跟踪车辆数据库。In another possible implementation manner, the image processing device obtains feature data of at least one vehicle to be tracked by performing feature extraction processing on at least one fourth image, and obtains a database of vehicles to be tracked.
作为一种可能的实施方式,图像处理装置在执行步骤16的过程中执行以下步骤:As a possible implementation manner, the image processing device performs the following steps during the execution of step 16:
步骤18、获取至少一张第六图像。Step 18. Acquire at least one sixth image.
本公开实施例中,至少一张第六图像中的每一张图像均包括车辆。在一些实施例中,至少一张第六图像中的车辆为待确认车辆,即待确认车辆需要进一步确认是否需要跟踪在目标区域内的轨迹。In an embodiment of the present disclosure, each of the at least one sixth image includes a vehicle. In some embodiments, the vehicle in at least one sixth image is a vehicle to be confirmed, that is, the vehicle to be confirmed needs to be further confirmed whether it needs to track a trajectory within the target area.
在一种获取至少一张第六图像的实现方式中,图像处理装置与至少一个卡口摄像头之间存在通信连接,其中,至少一个卡口摄像头包括部署在目标区域的出入口的摄像头。图像处理装置通过该通信连接获取至少一个卡口摄像头采集到的至少一张待确认图像。图像处理装置在获取在待确认图像后,确定待确认图像中的车辆在目标区域内不存在轨迹记录的情况下,将待确认图像作为第六图像,由此得到至少一张第六图像。In an implementation manner of acquiring at least one sixth image, there is a communication connection between the image processing device and at least one checkpoint camera, wherein the at least one checkpoint camera includes a camera deployed at an entrance and exit of the target area. The image processing device acquires at least one image to be confirmed collected by at least one bayonet camera through the communication connection. After the image processing device acquires the image to be confirmed, if it is determined that the vehicle in the image to be confirmed does not have a track record in the target area, the image to be confirmed is used as the sixth image, thereby obtaining at least one sixth image.
例如,至少一张待确认图像包括图像a和图像b,其中图像a包括车辆A,图像b包括车辆B。若车辆A在目标区域内不存在轨迹记录,图像处理装置将图像a作为第六图像。若车辆B在目标区域内存在轨迹记录,图像处理装置不将图像b作为第六图像。此时,至少一张第六图像包括图像a。For example, at least one image to be confirmed includes image a and image b, wherein image a includes vehicle A, and image b includes vehicle B. If there is no track record of vehicle A in the target area, the image processing device uses image a as the sixth image. If the vehicle B has a track record in the target area, the image processing device does not use the image b as the sixth image. At this time, at least one sixth image includes image a.
步骤19、在检测到针对至少一张第六图像的删除指令的情况下,依据至少一张第六图像和删除指令得到至少一张第四图像。Step 19. Obtaining at least one fourth image according to the at least one sixth image and the deletion instruction when a deletion instruction for at least one sixth image is detected.
在一些实施例中,删除指令可以是用户向图像处理装置输入的。用户通过向图像处理装置输入该删除指令,可将至少一张第六图像中的至少一张图像删除,从而从至少一张第六图像所包括的至少一辆待确认车辆中确定至少一辆待跟踪车辆。In some embodiments, the deletion instruction may be input by the user to the image processing apparatus. By inputting the deletion instruction to the image processing device, the user can delete at least one image in the at least one sixth image, thereby determining at least one vehicle to be confirmed from the at least one vehicle to be confirmed included in the at least one sixth image. Track vehicles.
例如,至少一张第六图像包括图像a和图像b,其中,图像a包括待确认车辆A,图像b包括待确认车辆B。用户确认图像a模糊,若将依据图像a得到待跟踪车辆数据库,可能会影响待跟踪车辆数据库中的数据的准确度。因此,用户向图像处理装置输入删除图像b的删除指令。图像处理装置在检测到该删除指令的情况下,将至少一张第六图像中的图像b删除,得到至少一张第四图像。此时,至少一张第四图像包括图像a,至少一辆待跟踪车辆包括车辆A。For example, at least one sixth image includes image a and image b, wherein image a includes vehicle A to be confirmed, and image b includes vehicle B to be confirmed. The user confirms that the image a is blurred. If the vehicle database to be tracked is obtained based on the image a, the accuracy of the data in the vehicle database to be tracked may be affected. Therefore, the user inputs a delete instruction to delete the image b to the image processing device. When the image processing device detects the deletion instruction, delete the image b in the at least one sixth image to obtain at least one fourth image. At this time, at least one fourth image includes image a, and at least one vehicle to be tracked includes vehicle A.
作为一种可能的实施方式,图像处理装置在执行步骤19的过程中执行以下步骤:As a possible implementation manner, the image processing device performs the following steps in the process of executing step 19:
步骤20、依据删除指令删除至少一张第六图像中的图像,得到至少一张第七图像。Step 20. Delete at least one image in the sixth image according to the deletion instruction to obtain at least one seventh image.
本步骤的实现方式可参见步骤19的实现方式,换句话说,本步骤中的至少一张第七图像与步骤19中的至少一张第四图像对应,即在本步骤中,图像处理装置依据删除指令删除至少一张第六图像中的图像得到的不是至少一张第四图像,而是至少一张第七图像。此时,至少一张第七图像中的车辆均为待确认车辆,即至少一张第七图像包括至少一辆待确认车辆。For the implementation of this step, please refer to the implementation of step 19. In other words, at least one seventh image in this step corresponds to at least one fourth image in step 19, that is, in this step, the image processing device according to The deleting instruction deletes the image in the at least one sixth image to obtain not at least one fourth image but at least one seventh image. At this time, the vehicles in at least one seventh image are all vehicles to be confirmed, that is, at least one seventh image includes at least one vehicle to be confirmed.
步骤21、在检测到针对至少一张第七图像的确认跟踪指令的情况下,将确认跟踪指令所指示的至少一张第七图像作为至少一张第四图像。Step 21: In a case where a confirmation tracking instruction for at least one seventh image is detected, use the at least one seventh image indicated by the confirmation tracking instruction as at least one fourth image.
在一些实施例中,确认跟踪指令可以是用户向图像处理装置输入的。用户通过向图像处理装置输入确认跟踪指令,可从至少一张第七图像包括的至少一辆待确认车辆中确定至少一辆待跟踪车辆,进而从至少一张第七图像中确定至少一张第四图像。In some embodiments, the confirmation tracking instruction may be input by a user to the image processing device. The user can determine at least one vehicle to be tracked from at least one vehicle to be confirmed included in at least one seventh image by inputting a confirmation tracking instruction to the image processing device, and then determine at least one vehicle to be tracked from at least one seventh image. Four images.
例如,至少一张第七图像包括图像a和图像b,其中,图像a包括待确认车辆A,图像b包括待确认车辆B。用户确认待确认车辆B为目标区域内的工作人员的车辆,因此不需要对待确认车辆B进行跟踪。因此,用户向图像处理装置输入确认跟踪指令,以使图像处理装置将车辆A作为待跟踪车辆。图像处理装置在检测到该确认跟踪指令的情况下,将至少一张第七图像中的图像a作为至少一张第四图像。此时,至少一张第四图像包括图像a,至少一 辆待跟踪车辆包括车辆A。For example, at least one seventh image includes image a and image b, wherein image a includes vehicle A to be confirmed, and image b includes vehicle B to be confirmed. The user confirms that the vehicle B to be confirmed is the vehicle of the staff in the target area, so there is no need to track the vehicle B to be confirmed. Therefore, the user inputs a confirmation tracking instruction to the image processing device, so that the image processing device takes the vehicle A as the vehicle to be tracked. When the image processing device detects the confirmation tracking instruction, the image a in the at least one seventh image is used as the at least one fourth image. At this time, at least one fourth image includes image a, and at least one vehicle to be tracked includes vehicle A.
作为一种可能的实施方式,待跟踪车辆数据库中还包括至少一辆待跟踪车辆的至少一个第二车辆属性,至少一个第二车辆属性通过对至少一张第四图像进行车辆属性提取处理得到。As a possible implementation manner, the database of vehicles to be tracked further includes at least one second vehicle attribute of at least one vehicle to be tracked, and the at least one second vehicle attribute is obtained by performing vehicle attribute extraction processing on at least one fourth image.
在该种实施方式中,图像处理装置在执行步骤17的过程中执行以下步骤:In this implementation manner, the image processing device performs the following steps during the execution of step 17:
步骤22、依据上述至少一张第四图像,得到上述至少一辆待跟踪车辆的特征数据和上述至少一辆待跟踪车辆的至少一个第三车辆属性。 Step 22. According to the at least one fourth image, obtain the feature data of the at least one vehicle to be tracked and at least one third vehicle attribute of the at least one vehicle to be tracked.
图像处理装置依据步骤17所提供的实现方式,可依据至少一张第四图像得到至少一辆待跟踪车辆的特征数据。图像处理装置通过对至少一张第四图像进行车辆属性提取处理,可得到至少一辆待跟踪车辆的至少一个第三车辆属性。According to the implementation manner provided in step 17, the image processing device can obtain feature data of at least one vehicle to be tracked according to at least one fourth image. The image processing device can obtain at least one third vehicle attribute of at least one vehicle to be tracked by performing vehicle attribute extraction processing on at least one fourth image.
步骤23、在检测到针对上述至少一个第三属性的编辑指令的情况下,依据上述编辑指令对上述至少一个第三车辆属性进行编辑,得到上述至少一个第二车辆属性。 Step 23 , when an editing instruction for the at least one third attribute is detected, edit the at least one third vehicle attribute according to the editing instruction to obtain the at least one second vehicle attribute.
在一些实施例中,编辑指令可以是用户向图像处理装置输入的。用户通过向图像处理装置输入该编辑指令,可编辑至少一个第三车辆属性。In some embodiments, the editing instruction may be input by the user to the image processing device. The user can edit at least one third vehicle attribute by inputting the editing command to the image processing device.
例如,图像处理装置通过执行步骤22确定待跟踪车辆A的车身颜色为白色。但待跟踪车辆A的车身颜色实际为灰色。此时,用户可通过向图像处理装置输入编辑指令,将待跟踪车辆A的车身颜色修正为灰色。此时至少一个第二车辆属性包括待跟踪车辆A的车身颜色为灰色。For example, the image processing device determines that the body color of the vehicle A to be tracked is white by performing step 22 . However, the body color of the vehicle A to be tracked is actually gray. At this time, the user can modify the body color of the vehicle A to be tracked to gray by inputting an edit command to the image processing device. At this time, at least one second vehicle attribute includes that the body color of the vehicle A to be tracked is gray.
步骤24、依据上述至少一辆待跟踪车辆的特征数据和上述至少一个第二属性,得到上述待跟踪车辆数据库。Step 24: Obtain the vehicle database to be tracked according to the feature data of the at least one vehicle to be tracked and the at least one second attribute.
在一种可能实现的方式中,图像处理装置将至少一辆待跟踪车辆的特征数据和至少一个第二属性存储至待跟踪车辆数据库。In a possible implementation manner, the image processing device stores the feature data and at least one second attribute of at least one vehicle to be tracked in the vehicle to be tracked database.
基于步骤22至步骤24所提供的技术方案,用户可通过向图像处理装置输入编辑指令,修正待跟踪车辆的车辆属性,从而提高待跟踪车辆数据库中的数据的准确度。Based on the technical solutions provided in steps 22 to 24, the user can modify the vehicle attributes of the vehicle to be tracked by inputting editing instructions to the image processing device, thereby improving the accuracy of the data in the vehicle to be tracked database.
作为一种可能的实施方式,图像处理装置在执行步骤24之前,还执行以下步骤:As a possible implementation manner, before performing step 24, the image processing device further performs the following steps:
步骤25、对至少一张第七图像进行车辆检测处理,确定至少一辆待跟踪车辆在至少一张第七图像中的至少一个第三位置。Step 25: Perform vehicle detection processing on at least one seventh image, and determine at least one third position of at least one vehicle to be tracked in the at least one seventh image.
在一些实施例中,车辆检测处理用于检测车辆在图像中的位置。图像处理装置通过对每张第七图像分别进行车辆检测处理,确定每辆待跟踪车辆在图像中的位置,得到至少一个第三位置。In some embodiments, a vehicle detection process is used to detect the position of the vehicle in the image. The image processing device determines the position of each vehicle to be tracked in the image by performing vehicle detection processing on each seventh image, and obtains at least one third position.
例如,至少一张第七图像包括图像a和图像b。图像处理装置通过对图像a进行车辆检测处理,确定图像a中的车辆A在图像a中的位置,作为一个第三位置。图像处理装置通过对图像b进行车辆检测处理,确定图像b中的车辆B在图像b中的位置,作为一个第三位置。此时,至少一个第三位置包括车辆A在图像a中的位置和车辆B在图像b中的位置。For example, at least one seventh image includes image a and image b. The image processing device determines the position of the vehicle A in the image a in the image a as a third position by performing vehicle detection processing on the image a. The image processing device determines the position of the vehicle B in the image b as a third position by performing vehicle detection processing on the image b. At this time, at least one third position includes the position of vehicle A in image a and the position of vehicle B in image b.
步骤26、从至少一张第七图像中截取依据至少一个第三位置确定的至少一个像素区域,得到至少一张第八图像。Step 26: Intercept at least one pixel region determined according to at least one third position from at least one seventh image to obtain at least one eighth image.
在一种可能实现的方式中,图像处理装置依据第三位置,可确定包括待跟踪车辆的车辆检测框在图像中的位置,进而可将包括待跟踪车辆的车辆检测框所包含的像素区域作为第八图像。In a possible implementation manner, the image processing device can determine the position of the vehicle detection frame including the vehicle to be tracked in the image according to the third position, and then can use the pixel area included in the vehicle detection frame including the vehicle to be tracked as Eighth image.
例如,至少一个第三位置包括车辆A在图像a中的位置和车辆B在图像b中的位置。图像处理装置依据车辆A在图像a中的位置,确定车辆A的车辆检测框所包含的像素区域,并截取车辆A的车辆检测框所包含的像素区域作为图像c。图像处理装置依据车辆B在图像b中的位置,确定车辆B的车辆检测框所包含的像素区域,并截取车辆B的车辆检测框所包含的像素区域作为图像d。此时,至少一张第八图像包括图像c和图像d。For example, the at least one third position includes the position of vehicle A in image a and the position of vehicle B in image b. The image processing device determines the pixel area included in the vehicle detection frame of vehicle A according to the position of vehicle A in image a, and intercepts the pixel area included in the vehicle detection frame of vehicle A as image c. The image processing device determines the pixel area included in the vehicle detection frame of the vehicle B according to the position of the vehicle B in the image b, and intercepts the pixel area included in the vehicle detection frame of the vehicle B as the image d. At this time, at least one eighth image includes image c and image d.
在执行完步骤26后,图像处理装置在执行步骤24的过程中执行以下步骤:After performing step 26, the image processing device performs the following steps in the process of performing step 24:
步骤27、将至少一张第八图像、至少一辆待跟踪车辆的特征数据、至少一个第二车辆属性和至少一张第七图像存储至待跟踪车辆数据库。Step 27. Store at least one eighth image, feature data of at least one vehicle to be tracked, at least one second vehicle attribute and at least one seventh image in the vehicle to be tracked database.
作为一种可能的实施方式,图像处理装置还执行以下步骤:As a possible implementation manner, the image processing device also performs the following steps:
步骤28、获取检索条件。Step 28, obtaining retrieval conditions.
在一些实施例中,检索条件用于从待跟踪车辆数据库中检索待跟踪车辆的进入目标区域的记录。检索条件包括以下至少一种信息:时间要求、车身颜色、车辆类型、车辆型号、车牌号码。In some embodiments, the retrieval condition is used to retrieve the record of the vehicle to be tracked entering the target area from the vehicle to be tracked database. The retrieval condition includes at least one of the following information: time requirement, body color, vehicle type, vehicle model, license plate number.
在一种获取检索条件的实现方式中,图像处理装置接收用户通过输入组件输入的检索条件。In an implementation manner of obtaining retrieval conditions, the image processing apparatus receives retrieval conditions input by a user through an input component.
在另一种获取检索条件的实现方式中,图像处理装置接收终端发送的检索条件。In another implementation manner of acquiring retrieval conditions, the image processing apparatus receives the retrieval conditions sent by the terminal.
在执行完步骤28后,图像处理装置执行以下中的一个步骤:After performing step 28, the image processing device performs one of the following steps:
步骤29、使用检索条件检索待跟踪车辆数据库,得到与检索条件匹配的图像数据,图像数据包括以下中的至少一个:至少一张第七图像、至少一张第八图像。Step 29: Search the database of vehicles to be tracked by using the retrieval conditions to obtain image data matching the retrieval conditions, the image data includes at least one of the following: at least one seventh image, at least one eighth image.
在一种可能实现的方式中,检索条件包括时间要求,图像处理装置将采集时间满足时间要求的图像,作为与检索条件匹配的图像数据。In a possible implementation manner, the retrieval condition includes a time requirement, and the image processing device collects images whose time meets the time requirement as image data matching the retrieval condition.
例如,检索条件包括最近5天内进入目标区域的待跟踪车辆。图像处理装置将采集时间处于最近5天内的第七图像和采集时间在最近5天内的第八图像,作为与检索条件匹配的图像数据。For example, the retrieval condition includes vehicles to be tracked that have entered the target area within the last 5 days. The image processing device uses the seventh image whose collection time is within the last 5 days and the eighth image whose collection time is within the last 5 days as the image data matching the retrieval condition.
应理解,第八图像的采集时间与相应的第七图像的采集时间相同,例如,第八图像a通过截取第七图像b中的像素区域得到,那么第八图像a的采集时间与第七图像b的采集时间相同。It should be understood that the acquisition time of the eighth image is the same as the acquisition time of the corresponding seventh image, for example, the eighth image a is obtained by intercepting the pixel area in the seventh image b, then the acquisition time of the eighth image a is the same as that of the seventh image The acquisition time of b is the same.
在另一种可能实现的方式中,检索条件包括车辆属性,图像处理装置将所包含的待跟踪车辆的车辆属性与检索条件中的车辆属性匹配的图像,作为与检索条件匹配的图像数据。In another possible implementation manner, the retrieval condition includes a vehicle attribute, and the image processing device uses the included image matching the vehicle attribute of the vehicle to be tracked with the vehicle attribute in the retrieval condition as the image data matching the retrieval condition.
例如,检索条件包括车身颜色为红色的待跟踪车辆。图像处理装置将包含红色待跟踪车辆的第七图像和包含红色待跟踪车辆的第八图像,作为与检索条件匹配的图像数据。For example, the retrieval condition includes a vehicle to be tracked whose body color is red. The image processing device takes the seventh image containing the red vehicle to be tracked and the eighth image containing the red vehicle to be tracked as image data matching the retrieval condition.
步骤30、使用检索条件检索待跟踪车辆数据库,得到与检索条件匹配的至少一个第二车辆属性。Step 30: Search the database of vehicles to be tracked by using the retrieval conditions to obtain at least one second vehicle attribute matching the retrieval conditions.
在一种可能实现的方式中,检索条件包括时间要求,图像处理装置将采集时间满足时间要求的图像,作为与检索条件匹配的图像数据,并将与检索条件匹配的图像数据所包含的待跟踪车辆的至少一个第二车辆属性,作为与检索条件匹配的至少一个第二车辆属性。In a possible implementation, the retrieval condition includes a time requirement, and the image processing device takes the image whose acquisition time meets the time requirement as the image data matching the retrieval condition, and uses the image data that matches the retrieval condition to be tracked At least one second vehicle attribute of the vehicle is used as the at least one second vehicle attribute matching the retrieval condition.
例如,检索条件包括最近5天内进入目标区域的待跟踪车辆。图像处理装置将采集时间处于最近5天内的第七图像,作为与检索条件匹配的图像数据。将第七图像中的待跟踪车辆的至少一个第二车辆属性,作为与检索条件匹配的至少一个第二车辆属性。For example, the retrieval condition includes vehicles to be tracked that have entered the target area within the last 5 days. The image processing device takes the seventh image whose acquisition time is within the last 5 days as the image data matching the retrieval condition. Taking at least one second vehicle attribute of the vehicle to be tracked in the seventh image as the at least one second vehicle attribute matching the retrieval condition.
在一些实施例中,图像处理装置使用检索条件检索待跟踪车辆数据库,既可得到与检索条件匹配的图像数据,又可得到与检索条件匹配的至少一个第二车辆属性。In some embodiments, the image processing device searches the database of vehicles to be tracked using the retrieval conditions, and can obtain not only image data matching the retrieval conditions, but also at least one second vehicle attribute matching the retrieval conditions.
在一些实施例中,图像处理装置在得到与检索条件匹配的图像数据和与检索条件匹配的至少一个第二车辆属性后,可显示与相应的待跟踪车辆在目标区域内的轨迹。In some embodiments, after obtaining the image data matching the retrieval condition and at least one second vehicle attribute matching the retrieval condition, the image processing device may display the trajectory of the corresponding vehicle to be tracked within the target area.
作为一种可能的实施方式,图像处理装置在执行步骤6之前,还执行以下步骤:As a possible implementation manner, before performing step 6, the image processing device further performs the following steps:
步骤31、获取工作时间段。Step 31, obtaining the working time zone.
为提高第一摄像头的工作效率,减少第一摄像头的能耗,可使第一摄像头在规定时间段内采集图像。在一些实施例中,工作时间段即为第一摄像头按规定采集图像的时间段。In order to improve the working efficiency of the first camera and reduce the energy consumption of the first camera, the first camera can collect images within a specified time period. In some embodiments, the working time period is the time period during which the first camera collects images according to regulations.
在一种获取工作时间段的实现方式中,图像处理装置接收用户通过输入组件输入的工作时间段。In an implementation manner of acquiring the working time period, the image processing apparatus receives the working time period input by the user through the input component.
在另一种获取工作时间段的实现方式中,图像处理装置接收终端发送的工作时间段。In another implementation manner of acquiring the working time period, the image processing apparatus receives the working time period sent by the terminal.
步骤32、向第一摄像头发送车辆跟踪指令,车辆跟踪指令用于指示第一摄像头在工作时间段内采集图像。Step 32: Sending a vehicle tracking instruction to the first camera, where the vehicle tracking instruction is used to instruct the first camera to collect images within a working time period.
在一些实施例中,车辆跟踪指令用于指示第一摄像头在工作时间段内采集图像。图像处理装置通过执行步骤32,可使第一摄像头在工作时间段内采集图像,进而提高第一摄像头的工作效率,并减少第一摄像头的能耗。In some embodiments, the vehicle tracking instruction is used to instruct the first camera to collect images within a working time period. By executing step 32, the image processing device can enable the first camera to collect images during the working time period, thereby improving the working efficiency of the first camera and reducing the energy consumption of the first camera.
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的执行顺序应当以其功能和可能的内在逻辑确定。Those skilled in the art can understand that in the above-mentioned method of specific implementation, the writing order of each step does not imply a strict execution order and constitutes any limitation on the implementation process, and the execution order of each step should be based on its function and possible internal Logically OK.
上述详细阐述了本公开实施例的方法,下面提供了本公开实施例的装置。The method of the embodiment of the present disclosure has been described in detail above, and the device of the embodiment of the present disclosure is provided below.
请参阅图4,图4为本公开实施例提供的一种图像处理装置的结构示意图,该图像处理装置1包括:第一处理单元11、第二处理单元12。在一些实施例中,图像处理装置1还包括:获取单元13、确定单元14、显示单元15、提取单元16、第三处理单元17,其中:Please refer to FIG. 4 . FIG. 4 is a schematic structural diagram of an image processing device provided by an embodiment of the present disclosure. The image processing device 1 includes: a first processing unit 11 and a second processing unit 12 . In some embodiments, the image processing device 1 further includes: an acquisition unit 13, a determination unit 14, a display unit 15, an extraction unit 16, and a third processing unit 17, wherein:
第一处理单元11,配置为在确定第一目标车辆处于第一摄像头的拍摄区域内的情况下,确定所述第一目标车辆的第一视频源设备为所述第一摄像头;The first processing unit 11 is configured to determine that the first video source device of the first target vehicle is the first camera when it is determined that the first target vehicle is within the shooting area of the first camera;
第二处理单元12,配置为在确定所述第一目标车辆从所述第一摄像头的拍摄区域驶入第二摄像头的拍摄区域的情况下,将所述第一目标车辆的第一视频源设备由所述第一摄像头切换为所述第二摄像头,所述第一摄像头与所述第二摄像头不同。The second processing unit 12 is configured to send the first video source device of the first target vehicle to the Switching from the first camera to the second camera, where the first camera is different from the second camera.
结合本公开任一实施方式,所述图像处理装置还包括:获取单元13,配置为在所述在确定所述第一目标车辆从所述第一摄像头的拍摄区域驶入第二摄像头的拍摄区域的情况下之前,获取时间差阈值和至少两张第一图像,所述时间差阈值为正数,所述至少两张第一图像均包括所述第一目标车辆,且所述至少一张第一图像包括所述第一摄像头采集到的图像和所述第二摄像头采集到的图像;确定单元14,配置为确定第二图像的时间戳与第三图像的时间戳的差值,所述第二图像为所述至少两张第一图像中由所述第二摄像头采集到的时间戳最小的图像,所述第三图像为所述至少两张第一图像中由所述第一摄像头采集到的时间戳最小的图像;In combination with any embodiment of the present disclosure, the image processing device further includes: an acquisition unit 13 configured to, when determining that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera, Before the case of , acquire a time difference threshold and at least two first images, the time difference threshold is a positive number, both of the at least two first images include the first target vehicle, and the at least one first image Including the image collected by the first camera and the image collected by the second camera; the determination unit 14 is configured to determine the difference between the time stamp of the second image and the time stamp of the third image, the second image is the image with the smallest time stamp collected by the second camera in the at least two first images, and the third image is the time of the at least two first images collected by the first camera Poke the smallest image;
所述第二处理单元12,配置为在所述差值大于所述时间差阈值的情况下,确定所述第一目标车辆从所述第一摄像头的拍摄区域驶入所述第二摄像头的拍摄区域。The second processing unit 12 is configured to determine that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera when the difference is greater than the time difference threshold .
结合本公开任一实施方式,所述至少两张第一图像包括目标车辆图像集中时间戳最大的n张图像,所述目标车辆图像集中的图像均包括所述第一目标车辆,且所述目标车辆图像集中的图像均包括所述第一摄像头采集到的图像和所述第二摄像头采集到的图像,所述n为大于1的整数。In combination with any embodiment of the present disclosure, the at least two first images include n images with the largest time stamp in the target vehicle image set, the images in the target vehicle image set all include the first target vehicle, and the target The images in the vehicle image set include images captured by the first camera and images captured by the second camera, and the n is an integer greater than 1.
结合本公开任一实施方式,所述确定单元14,还配置为在所述差值大于所述时间差阈值的情况下之后,所述确定所述第一目标车辆从所述第一摄像头的拍摄区域驶入所述第二摄像头的拍摄区域之前,确定所述第一目标车辆在所述第二图像中的第一尺寸和所述第一目标车辆在所述第三图像中的第二尺寸;In combination with any embodiment of the present disclosure, the determining unit 14 is further configured to determine the shooting area of the first target vehicle from the first camera after the difference is greater than the time difference threshold Before entering the shooting area of the second camera, determine a first size of the first target vehicle in the second image and a second size of the first target vehicle in the third image;
所述第二处理单元12配置为在所述第一尺寸大于所述第二尺寸的情况下,确定所述第一目标车辆从所述第一摄像头的拍摄区域驶入所述第二摄像头的拍摄区域。The second processing unit 12 is configured to determine that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera when the first size is larger than the second size. area.
结合本公开任一实施方式,所述装置还包括:显示单元15,配置为显示所述第一视频源设备的拍摄画面。In combination with any implementation manner of the present disclosure, the device further includes: a display unit 15 configured to display a captured image of the first video source device.
结合本公开任一实施方式,所述第一摄像头和所述第二摄像头均部署在目标区域内;所述显示单元15,还配置为在确定所述第一目标车辆已离开所述目标区域的情况下,停止显示所述第一视频源设备的拍摄画面。In combination with any embodiment of the present disclosure, both the first camera and the second camera are deployed in the target area; the display unit 15 is further configured to determine that the first target vehicle has left the target area In this case, stop displaying the shooting picture of the first video source device.
结合本公开任一实施方式,所述第一视频源设备的拍摄画面显示于显示页面的第一显示区域,所述显示页面还包括第二显示区域,所述第二显示区域用于显示第二目标车辆的第二视频源设备的拍摄画面,所述第一目标车辆与所述第二目标车辆不同。In combination with any implementation manner of the present disclosure, the shooting picture of the first video source device is displayed in the first display area of the display page, and the display page further includes a second display area, and the second display area is used to display the second A shooting picture of a second video source device of a target vehicle, where the first target vehicle is different from the second target vehicle.
结合本公开任一实施方式,所述获取单元13,配置为在确定第一目标车辆处于所述第一摄像头的拍摄区域内的情况下之前,获取所述第一摄像头采集到的第二图像;In combination with any embodiment of the present disclosure, the acquiring unit 13 is configured to acquire the second image captured by the first camera before determining that the first target vehicle is within the shooting area of the first camera;
所述第一处理单元11配置为在确定所述第二图像包括所述第一目标车辆的情况下,确定所述第一目标车辆处于所述第一摄像头的拍摄区域内。The first processing unit 11 is configured to determine that the first target vehicle is within the shooting area of the first camera when it is determined that the second image includes the first target vehicle.
结合本公开任一实施方式,所述第二图像包括待识别车辆;所述获取单元13,还配置为:在确定所述第二图像包括所述第一目标车辆的情况下之前,获取所述第一目标车辆的目标特征数据;In combination with any embodiment of the present disclosure, the second image includes a vehicle to be identified; the acquiring unit 13 is further configured to: before determining that the second image includes the first target vehicle, acquire the Target characteristic data of the first target vehicle;
所述第一处理单元11配置为对所述第二图像进行特征提取处理,得到所述待识别车辆的第一特征数据;依据所述目标特征数据和所述第一特征数据之间的第一相似度,得到所述第一目标车辆和所述待识别车辆的比对结果;在所述比对结果包括所述第一目标车辆和所述待识别车辆相同的情况下,确定所述第二图像包括所述第一目标车辆。The first processing unit 11 is configured to perform feature extraction processing on the second image to obtain first feature data of the vehicle to be identified; according to the first feature data between the target feature data and the first feature data Similarity, obtain the comparison result of the first target vehicle and the vehicle to be identified; if the comparison result includes that the first target vehicle is the same as the vehicle to be identified, determine the second An image includes the first target vehicle.
结合本公开任一实施方式,所述获取单元13,还配置为:依据所述目标特征数据和所述第一特征数据之间的第一相似度,得到所述第一目标车辆和所述待识别车辆的比对结果之前,获取所述第一目标车辆的至少一个第一目标车辆属性;In combination with any embodiment of the present disclosure, the acquisition unit 13 is further configured to: obtain the first target vehicle and the target vehicle according to the first similarity between the target feature data and the first feature data. Before identifying the comparison result of the vehicle, at least one first target vehicle attribute of the first target vehicle is obtained;
所述图像处理装置还包括:提取单元16,配置为:对所述第二图像进行车辆属性提取处理,得到所述待识别车俩的至少一个第一车辆属性;The image processing device further includes: an extraction unit 16 configured to: perform vehicle attribute extraction processing on the second image to obtain at least one first vehicle attribute of the vehicle to be identified;
所述第一处理单元11,配置为:依据所述第一相似度和第二相似度,得到所述第一目标车辆与所述待识别车辆的比对结果,所述第二相似度为所述至少一个第一目标车辆属性和所述至少一个第一车辆属性之间的相似度。The first processing unit 11 is configured to: obtain a comparison result between the first target vehicle and the vehicle to be identified according to the first similarity and the second similarity, the second similarity being the The similarity between the at least one first target vehicle attribute and the at least one first vehicle attribute.
结合本公开任一实施方式,所述第一处理单元11,配置为:对所述第一相似度和所述第二相似度进行加权求和,得到第三相似度;在所述第三相似度大于相似度阈值的情况下,确定所述比对结果包括所述待识别车辆与所述目标车辆相同;在所述第三相似度小于或等于相似度阈值的情况下,确定所述比对结果包括所述待识别车辆与所述目标车辆不同。In combination with any embodiment of the present disclosure, the first processing unit 11 is configured to: perform weighted summation of the first similarity and the second similarity to obtain a third similarity; When the degree of similarity is greater than the similarity threshold, it is determined that the comparison result includes that the vehicle to be identified is the same as the target vehicle; when the third similarity is less than or equal to the similarity threshold, it is determined that the comparison The result includes that the vehicle to be identified is different from the target vehicle.
结合本公开任一实施方式,所述第一摄像头部署于目标区域;In combination with any implementation manner of the present disclosure, the first camera is deployed in the target area;
所述获取单元13,配置为:获取待跟踪车辆数据库,所述待跟踪车辆数据库包括至少一辆待跟踪车辆的特征数据,所述至少一辆待跟踪车辆包括需要跟踪在所述目标区域内的轨迹的车辆,且所述目标车辆为所述至少一辆待跟踪车辆中的任意一辆车;在获取所述第一摄像头采集到的所述第二图像的情况下,从所述待跟踪车辆数据库获取一个特征数据,作为所述目标特征数据。The acquisition unit 13 is configured to: acquire a database of vehicles to be tracked, the database of vehicles to be tracked includes characteristic data of at least one vehicle to be tracked, and the at least one vehicle to be tracked includes vehicles that need to be tracked in the target area track vehicle, and the target vehicle is any one of the at least one vehicle to be tracked; in the case of acquiring the second image collected by the first camera, from the vehicle to be tracked The database obtains a feature data as the target feature data.
结合本公开任一实施方式,所述获取单元13,配置为:获取至少一张第四图像,所述至少一张第四图像包括所述至少一辆待跟踪车辆;依据所述至少一张第四图像,得到所述待跟踪车辆数据库。In combination with any embodiment of the present disclosure, the acquisition unit 13 is configured to: acquire at least one fourth image, the at least one fourth image includes the at least one vehicle to be tracked; according to the at least one first Four images to obtain the vehicle database to be tracked.
结合本公开任一实施方式,所述获取单元13,配置为:获取至少一个卡口摄像头采集的所述至少一张第四图像,所述至少一个卡口摄像头均部署于所述目标区域的出入口。In combination with any embodiment of the present disclosure, the acquisition unit 13 is configured to: acquire the at least one fourth image captured by at least one checkpoint camera, and the at least one checkpoint camera is deployed at the entrance and exit of the target area .
结合本公开任一实施方式,所述比对结果包括所述第一目标车辆与所述待识别车辆相同,所述获取单元13,还配置为:获取所述目标区域的第五图像和所述第一摄像头在所述第五图像中的第一位置;所述图像处理装置还包括:第三处理单元17,还配置为:依据所述第一位置,确定所述第一目标车辆在所述第五图像中的第二位置。In combination with any embodiment of the present disclosure, the comparison result includes that the first target vehicle is the same as the vehicle to be identified, and the acquiring unit 13 is further configured to: acquire the fifth image of the target area and the The first position of the first camera in the fifth image; the image processing device further includes: a third processing unit 17, and is also configured to: according to the first position, determine that the first target vehicle is in the The second position in the fifth image.
在一些实施例中,本公开实施例提供的装置具有的功能或包括的模块可以用于执行上文方法实施例描述的方法,其实现可以参照上文方法实施例的描述。In some embodiments, the functions of the device provided by the embodiments of the present disclosure or the modules included therein can be used to execute the methods described in the above method embodiments, and the implementation can refer to the descriptions of the above method embodiments.
图5为本公开实施例提供的一种图像处理装置的硬件结构示意图。该图像处理装置2包括处理器21,存储器22,输入装置23,输出装置24。该处理器21、存储器22、输入装置23和输出装置24通过连接器相耦合,该连接器包括各类接口、传输线或总线等等,本公开实施例对此不作限定。应当理解,本公开的各个实施例中,耦合是指通过特定方式的相互联系,包括直接相连或者通过其他设备间接相连,例如可以通过各类接口、传输线、总线等相连。FIG. 5 is a schematic diagram of a hardware structure of an image processing device provided by an embodiment of the present disclosure. The image processing device 2 includes a processor 21 , a memory 22 , an input device 23 and an output device 24 . The processor 21 , the memory 22 , the input device 23 and the output device 24 are coupled through connectors, and the connectors include various interfaces, transmission lines or buses, etc., which are not limited in this embodiment of the present disclosure. It should be understood that in various embodiments of the present disclosure, coupling refers to interconnection in a specific manner, including direct connection or indirect connection through other devices, for example, connection through various interfaces, transmission lines, and buses.
处理器21可以是一个或多个图形处理器(graphics processing unit,GPU),在处理器21是一个GPU的情况下,该GPU可以是单核GPU,也可以是多核GPU。处理器21可以是多个GPU构成的处理器组,多个处理器之间通过一个或多个总线彼此耦合。该处理器还可以为其他类型的处理器等等,本公开实施例不作限定。The processor 21 may be one or more graphics processing units (graphics processing unit, GPU), and in the case where the processor 21 is a GPU, the GPU may be a single-core GPU or a multi-core GPU. The processor 21 may be a processor group composed of multiple GPUs, and the multiple processors are coupled to each other through one or more buses. The processor may also be other types of processors, etc., which are not limited in this embodiment of the present disclosure.
存储器22可用于存储计算机程序指令,以及用于执行本公开方案的程序代码在内的各类计算机程序代码。存储器包括但不限于是随机存储记忆体(random access memory,RAM)、只读存储器(read-only memory,ROM)、可擦除可编程只读存储器(erasable programmable read only memory,EPROM)、或便携式只读存储器(compact disc read-only memory,CD-ROM), 该存储器用于相关指令及数据。The memory 22 can be used to store computer program instructions and various computer program codes including program codes for implementing the solutions of the present disclosure. Memory includes but not limited to random access memory (random access memory, RAM), read-only memory (read-only memory, ROM), erasable programmable read-only memory (erasable programmable read only memory, EPROM), or portable Read-only memory (compact disc read-only memory, CD-ROM), which is used for related instructions and data.
输入装置23用于输入数据和/或信号,以及输出装置24用于输出数据和/或信号。输入装置23和输出装置24可以是独立的器件,也可以是一个整体的器件。The input device 23 is used for inputting data and/or signals and the output device 24 is used for outputting data and/or signals. The input device 23 and the output device 24 can be independent devices, or an integrated device.
可理解,本公开实施例中,存储器22不仅可用于存储相关指令,还可用于存储相关数据。It can be understood that in the embodiment of the present disclosure, the memory 22 may not only be used to store related instructions, but also be used to store related data.
可以理解的是,图5仅仅示出了一种图像处理装置的简化设计。在实际应用中,图像处理装置还可以分别包括必要的其他元件,包括但不限于任意数量的输入/输出装置、处理器、存储器等,而所有可以实现本公开实施例的图像处理装置都在本公开的保护范围之内。It can be understood that Fig. 5 only shows a simplified design of an image processing device. In practical applications, the image processing device may also include other necessary components, including but not limited to any number of input/output devices, processors, memories, etc., and all image processing devices that can implement the embodiments of the present disclosure are included in this within the scope of public protection.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本公开的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementation should not be considered beyond the scope of the present disclosure.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的工作过程,可以参考前述方法实施例中的对应过程。所属领域的技术人员还可以清楚地了解到,本公开各个实施例描述各有侧重,为描述的方便和简洁,相同或类似的部分在不同实施例中可能没有重复描述,因此,在某一实施例未描述或未详细描述的部分可以参见其他实施例的记载。Those skilled in the art can clearly understand that for the convenience and brevity of description, the working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment. Those skilled in the art can also clearly understand that the descriptions of each embodiment of the present disclosure have their own emphases. For convenience and brevity of description, the same or similar parts may not be repeatedly described in different embodiments. Therefore, in a certain implementation For the parts not described in the examples or not described in detail, please refer to the records of other examples.
在本公开所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本公开各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本公开实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包括一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,数字通用光盘(digital versatile disc,DVD))、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, all or part of the processes or functions according to the embodiments of the present disclosure will be generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in or transmitted via a computer-readable storage medium. The computer instructions can be sent from a website site, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) Another website site, computer, server or data center for transmission. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device including a server, a data center, and the like integrated with one or more available media. The available medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital versatile disc (digital versatile disc, DVD)), or a semiconductor medium (for example, a solid state disk (solid state disk, SSD) )wait.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:只读存储器(read-only memory,ROM)或随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments are realized. The processes can be completed by computer programs to instruct related hardware. The programs can be stored in computer-readable storage media. When the programs are executed , may include the processes of the foregoing method embodiments. The aforementioned storage medium includes: various media capable of storing program codes such as read-only memory (ROM) or random access memory (RAM), magnetic disk or optical disk.
工业实用性Industrial Applicability
本公开实施例中,图像处理方法包括:在确定第一目标车辆处于第一摄像头的拍摄区域内的情况下,确定所述第一目标车辆的第一视频源设备为所述第一摄像头;在确定所述第一目标车辆从所述第一摄像头的拍摄区域驶入第二摄像头的拍摄区域的情况下,将所述第一目标车辆的第一视频源设备由所述第一摄像头切换为所述第二摄像头,所述第一摄像头与所述第二摄像头不同。本公开实施例通过在确定所述第一目标车辆从所述第一摄像头的拍摄区域驶入第二摄像头的拍摄区域的情况下,将所述第一目标车辆的第一视频源设备由所述第一摄像头切换为所述第二摄像头,可提高确定的实时第一视频源设备的准确度,进而提升视频接力的效果。In the embodiment of the present disclosure, the image processing method includes: determining that the first target vehicle is in the shooting area of the first camera, determining that the first video source device of the first target vehicle is the first camera; When it is determined that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera, the first video source device of the first target vehicle is switched from the first camera to the shooting area of the second camera. The second camera, the first camera is different from the second camera. In the embodiment of the present disclosure, when it is determined that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera, the first video source device of the first target vehicle is transferred from the Switching the first camera to the second camera can improve the accuracy of the determined real-time first video source device, thereby improving the effect of video relay.

Claims (32)

  1. 一种图像处理方法,所述方法包括:An image processing method, the method comprising:
    在确定第一目标车辆处于第一摄像头的拍摄区域内的情况下,确定所述第一目标车辆的第一视频源设备为所述第一摄像头;When it is determined that the first target vehicle is in the shooting area of the first camera, it is determined that the first video source device of the first target vehicle is the first camera;
    在确定所述第一目标车辆从所述第一摄像头的拍摄区域驶入第二摄像头的拍摄区域的情况下,将所述第一目标车辆的第一视频源设备由所述第一摄像头切换为所述第二摄像头,所述第一摄像头与所述第二摄像头不同。When it is determined that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera, the first video source device of the first target vehicle is switched from the first camera to As for the second camera, the first camera is different from the second camera.
  2. 根据权利要求1所述的方法,其中,所述在确定所述第一目标车辆从所述第一摄像头的拍摄区域驶入第二摄像头的拍摄区域的情况下之前,所述方法还包括:The method according to claim 1, wherein, before determining that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera, the method further comprises:
    获取时间差阈值和至少两张第一图像,所述时间差阈值为正数,所述至少两张第一图像均包括所述第一目标车辆,且所述至少一张第一图像包括所述第一摄像头采集到的图像和所述第二摄像头采集到的图像;Acquire a time difference threshold and at least two first images, the time difference threshold is a positive number, the at least two first images both include the first target vehicle, and the at least one first image includes the first The image collected by the camera and the image collected by the second camera;
    确定第二图像的时间戳与第三图像的时间戳的差值,所述第二图像为所述至少两张第一图像中由所述第二摄像头采集到的时间戳最小的图像,所述第三图像为所述至少两张第一图像中由所述第一摄像头采集到的时间戳最小的图像;determining the difference between the time stamp of the second image and the time stamp of the third image, the second image being the image with the smallest time stamp collected by the second camera among the at least two first images, the The third image is an image with the smallest time stamp collected by the first camera among the at least two first images;
    所述确定所述第一目标车辆从所述第一摄像头的拍摄区域驶入第二摄像头的拍摄区域,包括:The determining that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera includes:
    在所述差值大于所述时间差阈值的情况下,确定所述第一目标车辆从所述第一摄像头的拍摄区域驶入所述第二摄像头的拍摄区域。If the difference is greater than the time difference threshold, it is determined that the first target vehicle has entered the shooting area of the second camera from the shooting area of the first camera.
  3. 根据权利要求2所述的方法,其中,所述至少两张第一图像包括目标车辆图像集中时间戳最大的n张图像,所述目标车辆图像集中的图像均包括所述第一目标车辆,且所述目标车辆图像集中的图像均包括所述第一摄像头采集到的图像和所述第二摄像头采集到的图像,所述n为大于1的整数。The method according to claim 2, wherein the at least two first images include n images with the largest time stamp in the target vehicle image set, and the images in the target vehicle image set all include the first target vehicle, and The images in the target vehicle image set all include images captured by the first camera and images captured by the second camera, and the n is an integer greater than 1.
  4. 根据权利要求2或3所述的方法,其中,所述在所述差值大于所述时间差阈值的情况下之后,所述确定所述第一目标车辆从所述第一摄像头的拍摄区域驶入所述第二摄像头的拍摄区域之前,所述方法还包括:The method according to claim 2 or 3, wherein after said difference is greater than said time difference threshold, said determining that said first target vehicle enters from the shooting area of said first camera Before the shooting area of the second camera, the method also includes:
    确定所述第一目标车辆在所述第二图像中的第一尺寸和所述第一目标车辆在所述第三图像中的第二尺寸;determining a first size of the first target vehicle in the second image and a second size of the first target vehicle in the third image;
    所述确定所述第一目标车辆从所述第一摄像头的拍摄区域驶入所述第二摄像头的拍摄区域,包括:The determining that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera includes:
    在所述第一尺寸大于所述第二尺寸的情况下,确定所述第一目标车辆从所述第一摄像头的拍摄区域驶入所述第二摄像头的拍摄区域。In a case where the first size is greater than the second size, it is determined that the first target vehicle enters the shooting area of the second camera from the shooting area of the first camera.
  5. 根据权利要求1至4中任意一项所述的方法,其中,所述方法还包括:显示所述第一视频源设备的拍摄画面。The method according to any one of claims 1 to 4, wherein the method further comprises: displaying a shooting picture of the first video source device.
  6. 根据权利要求5所述的方法,其中,所述第一摄像头和所述第二摄像头均部署在目标区域内;The method according to claim 5, wherein both the first camera and the second camera are deployed in a target area;
    所述方法还包括:在确定所述第一目标车辆已离开所述目标区域的情况下,停止显示所述第一视频源设备的拍摄画面。The method further includes: when it is determined that the first target vehicle has left the target area, stop displaying the shooting picture of the first video source device.
  7. 根据权利要求5或6所述的方法,其中,所述第一视频源设备的拍摄画面显示于显示页面的第一显示区域,所述显示页面还包括第二显示区域,所述第二显示区域用于显示第二目标车辆的第二视频源设备的拍摄画面,所述第一目标车辆与所述第二目标车辆不同。The method according to claim 5 or 6, wherein, the shooting picture of the first video source device is displayed in a first display area of a display page, and the display page further includes a second display area, and the second display area A shooting picture of a second video source device for displaying a second target vehicle, the first target vehicle is different from the second target vehicle.
  8. 根据权利要求1至7中任意一项所述的方法,其中,所述在确定第一目标车辆处于所述第一摄像头的拍摄区域内的情况下之前,所述方法还包括:The method according to any one of claims 1 to 7, wherein, before determining that the first target vehicle is in the shooting area of the first camera, the method further comprises:
    获取所述第一摄像头采集到的第二图像;acquiring a second image captured by the first camera;
    所述确定第一目标车辆处于所述第一摄像头的拍摄区域内,包括:The determining that the first target vehicle is in the shooting area of the first camera includes:
    在确定所述第二图像包括所述第一目标车辆的情况下,确定所述第一目标车辆处于所述第一摄像头的拍摄区域内。If it is determined that the second image includes the first target vehicle, it is determined that the first target vehicle is within a shooting area of the first camera.
  9. 根据权利要求8所述的方法,其中,所述第二图像包括待识别车辆,所述在确定所述第二图像包括所述第一目标车辆的情况下之前,所述方法还包括:The method according to claim 8, wherein the second image includes a vehicle to be identified, and before determining that the second image includes the first target vehicle, the method further comprises:
    获取所述第一目标车辆的目标特征数据;acquiring target characteristic data of the first target vehicle;
    所述确定所述第二图像包括所述第一目标车辆,包括:The determining that the second image includes the first target vehicle includes:
    对所述第二图像进行特征提取处理,得到所述待识别车辆的第一特征数据;performing feature extraction processing on the second image to obtain first feature data of the vehicle to be identified;
    依据所述目标特征数据和所述第一特征数据之间的第一相似度,得到所述第一目标车辆和所述待识别车辆的比对结果;Obtain a comparison result between the first target vehicle and the vehicle to be identified according to the first similarity between the target feature data and the first feature data;
    在所述比对结果包括所述第一目标车辆和所述待识别车辆相同的情况下,确定所述第二图像包括所述第一目标车辆。If the comparison result includes that the first target vehicle is the same as the vehicle to be identified, it is determined that the second image includes the first target vehicle.
  10. 根据权利要求9所述的方法,其中,所述依据所述目标特征数据和所述第一特征数据之间的第一相似度,得到所述第一目标车辆和所述待识别车辆的比对结果之前,所述方法还包括:The method according to claim 9, wherein, according to the first similarity between the target feature data and the first feature data, the comparison between the first target vehicle and the vehicle to be identified is obtained Before the result, the method also includes:
    获取所述第一目标车辆的至少一个第一目标车辆属性;obtaining at least one first target vehicle attribute of the first target vehicle;
    对所述第二图像进行车辆属性提取处理,得到所述待识别车俩的至少一个第一车辆属性;Carrying out vehicle attribute extraction processing on the second image to obtain at least one first vehicle attribute of the vehicle to be identified;
    所述依据所述目标特征数据和所述第一特征数据之间的第一相似度,得到所述第一目标车辆和所述待识别车辆的比对结果,包括:The obtaining the comparison result between the first target vehicle and the vehicle to be identified according to the first similarity between the target feature data and the first feature data includes:
    依据所述第一相似度和第二相似度,得到所述第一目标车辆与所述待识别车辆的比对结果,所述第二相似度为所述至少一个第一目标车辆属性和所述至少一个第一车辆属性之间的相似度。A comparison result between the first target vehicle and the vehicle to be identified is obtained according to the first similarity and the second similarity, the second similarity is the attribute of the at least one first target vehicle and the A degree of similarity between at least one first vehicle attribute.
  11. 根据权利要求10所述的方法,其中,所述依据所述第一相似度和第二相似度,得到所述第一目标车辆与所述待识别车辆的比对结果,包括:The method according to claim 10, wherein said obtaining a comparison result between the first target vehicle and the vehicle to be identified according to the first similarity and the second similarity comprises:
    对所述第一相似度和所述第二相似度进行加权求和,得到第三相似度;performing weighted summation on the first similarity and the second similarity to obtain a third similarity;
    在所述第三相似度大于相似度阈值的情况下,确定所述比对结果包括所述待识别车辆与所述目标车辆相同;In the case where the third similarity is greater than a similarity threshold, determining that the comparison result includes that the vehicle to be identified is the same as the target vehicle;
    在所述第三相似度小于或等于相似度阈值的情况下,确定所述比对结果包括所述待识别车辆与所述目标车辆不同。In a case where the third similarity is less than or equal to a similarity threshold, it is determined that the comparison result includes that the vehicle to be identified is different from the target vehicle.
  12. 根据权利要求9至11中任意一项所述的方法,其中,所述第一摄像头部署于目标区域;所述获取所述第一目标车辆的目标特征数据,包括:The method according to any one of claims 9 to 11, wherein the first camera is deployed in the target area; the acquisition of the target feature data of the first target vehicle includes:
    获取待跟踪车辆数据库,所述待跟踪车辆数据库包括至少一辆待跟踪车辆的特征数据,所述至少一辆待跟踪车辆包括需要跟踪在所述目标区域内的轨迹的车辆,且所述目标车辆为所述至少一辆待跟踪车辆中的任意一辆车;Obtaining a database of vehicles to be tracked, the database of vehicles to be tracked includes characteristic data of at least one vehicle to be tracked, the at least one vehicle to be tracked includes a vehicle that needs to track a trajectory in the target area, and the target vehicle is any one of the at least one vehicle to be tracked;
    在获取所述第一摄像头采集到的所述第二图像的情况下,从所述待跟踪车辆数据库获取一个特征数据,作为所述目标特征数据。In the case of acquiring the second image captured by the first camera, acquiring a piece of feature data from the database of the vehicle to be tracked as the target feature data.
  13. 根据权利要求12所述的方法,其中,所述获取待跟踪车辆数据库,包括:The method according to claim 12, wherein said obtaining the vehicle database to be tracked comprises:
    获取至少一张第四图像,所述至少一张第四图像包括所述至少一辆待跟踪车辆;acquiring at least one fourth image, the at least one fourth image including the at least one vehicle to be tracked;
    依据所述至少一张第四图像,得到所述待跟踪车辆数据库。Obtain the vehicle database to be tracked according to the at least one fourth image.
  14. 根据权利要求13所述的方法,其中,所述获取至少一张第四图像,包括:The method according to claim 13, wherein said acquiring at least one fourth image comprises:
    获取至少一个卡口摄像头采集的所述至少一张第四图像,所述至少一个卡口摄像头均部署于所述目标区域的出入口。The at least one fourth image captured by at least one checkpoint camera is acquired, and the at least one checkpoint camera is deployed at an entrance and exit of the target area.
  15. 根据权利要求12至14中任意一项所述的方法,其中,所述比对结果包括所述第一 目标车辆与所述待识别车辆相同,所述方法还包括:The method according to any one of claims 12 to 14, wherein the comparison result includes that the first target vehicle is identical to the vehicle to be identified, and the method further comprises:
    获取所述目标区域的第五图像和所述第一摄像头在所述第五图像中的第一位置;acquiring a fifth image of the target area and a first position of the first camera in the fifth image;
    依据所述第一位置,确定所述第一目标车辆在所述第五图像中的第二位置。A second position of the first target vehicle in the fifth image is determined based on the first position.
  16. 一种图像处理装置,所述装置包括:An image processing device, the device comprising:
    第一处理单元,配置为在确定第一目标车辆处于第一摄像头的拍摄区域内的情况下,确定所述第一目标车辆的第一视频源设备为所述第一摄像头;The first processing unit is configured to determine that the first video source device of the first target vehicle is the first camera when it is determined that the first target vehicle is within the shooting area of the first camera;
    第二处理单元,配置为在确定所述第一目标车辆从所述第一摄像头的拍摄区域驶入第二摄像头的拍摄区域的情况下,将所述第一目标车辆的第一视频源设备由所述第一摄像头切换为所述第二摄像头,所述第一摄像头与所述第二摄像头不同。The second processing unit is configured to send the first video source device of the first target vehicle from the first video source device of the first target vehicle to the The first camera is switched to the second camera, and the first camera is different from the second camera.
  17. 根据权利要求16所述的装置,其中,所述装置还包括:The apparatus of claim 16, wherein the apparatus further comprises:
    获取单元,配置为在所述在确定所述第一目标车辆从所述第一摄像头的拍摄区域驶入第二摄像头的拍摄区域的情况下之前,获取时间差阈值和至少两张第一图像,所述时间差阈值为正数,所述至少两张第一图像均包括所述第一目标车辆,且所述至少一张第一图像包括所述第一摄像头采集到的图像和所述第二摄像头采集到的图像;The acquiring unit is configured to acquire a time difference threshold and at least two first images before it is determined that the first target vehicle has driven from the shooting area of the first camera into the shooting area of the second camera, The time difference threshold is a positive number, the at least two first images both include the first target vehicle, and the at least one first image includes the image captured by the first camera and the image captured by the second camera. to the image;
    确定单元,配置为确定第二图像的时间戳与第三图像的时间戳的差值,所述第二图像为所述至少两张第一图像中由所述第二摄像头采集到的时间戳最小的图像,所述第三图像为所述至少两张第一图像中由所述第一摄像头采集到的时间戳最小的图像;The determining unit is configured to determine the difference between the time stamp of the second image and the time stamp of the third image, the second image being the smallest time stamp collected by the second camera among the at least two first images The image of the third image is the image with the smallest time stamp collected by the first camera among the at least two first images;
    所述第二处理单元,配置为:The second processing unit is configured to:
    在所述差值大于所述时间差阈值的情况下,确定所述第一目标车辆从所述第一摄像头的拍摄区域驶入所述第二摄像头的拍摄区域。If the difference is greater than the time difference threshold, it is determined that the first target vehicle has entered the shooting area of the second camera from the shooting area of the first camera.
  18. 根据权利要求17所述的装置,其中,所述至少两张第一图像包括目标车辆图像集中时间戳最大的n张图像,所述目标车辆图像集中的图像均包括所述第一目标车辆,且所述目标车辆图像集中的图像均包括所述第一摄像头采集到的图像和所述第二摄像头采集到的图像,所述n为大于1的整数。The device according to claim 17, wherein the at least two first images include n images with the largest time stamp in the target vehicle image set, and the images in the target vehicle image set all include the first target vehicle, and The images in the target vehicle image set all include images captured by the first camera and images captured by the second camera, and the n is an integer greater than 1.
  19. 根据权利要求16至18任一项所述的装置,其中,所述装置还包括:The device according to any one of claims 16 to 18, wherein the device further comprises:
    显示单元,配置为显示所述第一视频源设备的拍摄画面。The display unit is configured to display the shooting picture of the first video source device.
  20. 根据权利要求19所述的装置,其中,所述第一摄像头和所述第二摄像头均部署在目标区域内;The apparatus according to claim 19, wherein both the first camera and the second camera are deployed in a target area;
    所述显示单元,还配置为:在确定所述第一目标车辆已离开所述目标区域的情况下,停止显示所述第一视频源设备的拍摄画面。The display unit is further configured to: stop displaying the shooting picture of the first video source device when it is determined that the first target vehicle has left the target area.
  21. 根据权利要求19或20任一项所述的装置,其中,所述第一视频源设备的拍摄画面显示于显示页面的第一显示区域,所述显示页面还包括第二显示区域,所述第二显示区域用于显示第二目标车辆的第二视频源设备的拍摄画面,所述第一目标车辆与所述第二目标车辆不同。The device according to any one of claims 19 or 20, wherein the shooting picture of the first video source device is displayed in a first display area of a display page, and the display page further includes a second display area, the first The second display area is used for displaying a shooting picture of a second video source device of a second target vehicle, and the first target vehicle is different from the second target vehicle.
  22. 根据权利要求16至21任一项所述的装置,其中,所述装置还包括获取单元,配置为:在确定第一目标车辆处于所述第一摄像头的拍摄区域内的情况下之前,获取所述第一摄像头采集到的第二图像;The device according to any one of claims 16 to 21, wherein the device further includes an acquisition unit configured to: before determining that the first target vehicle is within the shooting area of the first camera, acquire the The second image collected by the first camera;
    所述第一处理单元配置为:The first processing unit is configured as:
    在确定所述第二图像包括所述第一目标车辆的情况下,确定所述第一目标车辆处于所述第一摄像头的拍摄区域内。If it is determined that the second image includes the first target vehicle, it is determined that the first target vehicle is within a shooting area of the first camera.
  23. 根据权利要求22所述的装置,其中,所述第二图像包括待识别车辆,所述获取单元,还配置为:在确定所述第二图像包括所述第一目标车辆的情况下之前,获取所述第一目标车辆的目标特征数据;The device according to claim 22, wherein the second image includes a vehicle to be identified, and the acquiring unit is further configured to: before determining that the second image includes the first target vehicle, acquire Target characteristic data of the first target vehicle;
    所述第一处理单元配置为:The first processing unit is configured as:
    对所述第二图像进行特征提取处理,得到所述待识别车辆的第一特征数据;performing feature extraction processing on the second image to obtain first feature data of the vehicle to be identified;
    依据所述目标特征数据和所述第一特征数据之间的第一相似度,得到所述第一目标车辆和所述待识别车辆的比对结果;Obtain a comparison result between the first target vehicle and the vehicle to be identified according to the first similarity between the target feature data and the first feature data;
    在所述比对结果包括所述第一目标车辆和所述待识别车辆相同的情况下,确定所述第二图像包括所述第一目标车辆。If the comparison result includes that the first target vehicle is the same as the vehicle to be identified, it is determined that the second image includes the first target vehicle.
  24. 根据权利要求23所述的装置,其中,所述获取单元,还配置为:依据所述目标特征数据和所述第一特征数据之间的第一相似度,得到所述第一目标车辆和所述待识别车辆的比对结果之前,获取所述第一目标车辆的至少一个第一目标车辆属性;The device according to claim 23, wherein the acquisition unit is further configured to: obtain the first target vehicle and the first target vehicle according to the first similarity between the target feature data and the first feature data. Before the comparison result of the vehicle to be identified, at least one first target vehicle attribute of the first target vehicle is obtained;
    所述装置还包括:提取单元,配置为对所述第二图像进行车辆属性提取处理,得到所述待识别车俩的至少一个第一车辆属性;The device further includes: an extraction unit configured to perform vehicle attribute extraction processing on the second image to obtain at least one first vehicle attribute of the vehicle to be identified;
    所述第一处理单元,配置为:The first processing unit is configured as:
    依据所述第一相似度和第二相似度,得到所述第一目标车辆与所述待识别车辆的比对结果,所述第二相似度为所述至少一个第一目标车辆属性和所述至少一个第一车辆属性之间的相似度。A comparison result between the first target vehicle and the vehicle to be identified is obtained according to the first similarity and the second similarity, the second similarity is the attribute of the at least one first target vehicle and the A degree of similarity between at least one first vehicle attribute.
  25. 根据权利要求24所述的装置,其中,所述第一处理单元配置为:The apparatus according to claim 24, wherein the first processing unit is configured to:
    对所述第一相似度和所述第二相似度进行加权求和,得到第三相似度;performing weighted summation on the first similarity and the second similarity to obtain a third similarity;
    在所述第三相似度大于相似度阈值的情况下,确定所述比对结果包括所述待识别车辆与所述目标车辆相同;In the case where the third similarity is greater than a similarity threshold, determining that the comparison result includes that the vehicle to be identified is the same as the target vehicle;
    在所述第三相似度小于或等于相似度阈值的情况下,确定所述比对结果包括所述待识别车辆与所述目标车辆不同。In a case where the third similarity is less than or equal to a similarity threshold, it is determined that the comparison result includes that the vehicle to be identified is different from the target vehicle.
  26. 根据权利要求23至25任一项所述的装置,其中,所述第一摄像头部署于目标区域;The device according to any one of claims 23 to 25, wherein the first camera is deployed in a target area;
    所述获取单元配置为:The acquisition unit is configured as:
    获取待跟踪车辆数据库,所述待跟踪车辆数据库包括至少一辆待跟踪车辆的特征数据,所述至少一辆待跟踪车辆包括需要跟踪在所述目标区域内的轨迹的车辆,且所述目标车辆为所述至少一辆待跟踪车辆中的任意一辆车;Obtaining a database of vehicles to be tracked, the database of vehicles to be tracked includes characteristic data of at least one vehicle to be tracked, the at least one vehicle to be tracked includes a vehicle that needs to track a trajectory in the target area, and the target vehicle is any one of the at least one vehicle to be tracked;
    在获取所述第一摄像头采集到的所述第二图像的情况下,从所述待跟踪车辆数据库获取一个特征数据,作为所述目标特征数据。In the case of acquiring the second image captured by the first camera, acquiring a piece of feature data from the database of the vehicle to be tracked as the target feature data.
  27. 根据权利要求26所述的装置,其中,所述获取单元,配置为:The device according to claim 26, wherein the acquiring unit is configured to:
    获取至少一张第四图像,所述至少一张第四图像包括所述至少一辆待跟踪车辆;acquiring at least one fourth image, the at least one fourth image including the at least one vehicle to be tracked;
    依据所述至少一张第四图像,得到所述待跟踪车辆数据库。Obtain the vehicle database to be tracked according to the at least one fourth image.
  28. 根据权利要求27所述的装置,其中,所述获取单元,配置为:The device according to claim 27, wherein the acquisition unit is configured to:
    获取至少一个卡口摄像头采集的所述至少一张第四图像,所述至少一个卡口摄像头均部署于所述目标区域的出入口。The at least one fourth image captured by at least one checkpoint camera is acquired, and the at least one checkpoint camera is deployed at an entrance and exit of the target area.
  29. 根据权利要求26至28任一项所述的装置,其中,所述比对结果包括所述第一目标车辆与所述待识别车辆相同,所述获取单元,还配置为:获取所述目标区域的第五图像和所述第一摄像头在所述第五图像中的第一位置;所述装置还包括:第三处理单元,还配置为依据所述第一位置,确定所述第一目标车辆在所述第五图像中的第二位置。The device according to any one of claims 26 to 28, wherein the comparison result includes that the first target vehicle is the same as the vehicle to be identified, and the acquisition unit is further configured to: acquire the target area The fifth image and the first position of the first camera in the fifth image; the device further includes: a third processing unit, further configured to determine the first target vehicle according to the first position at the second position in the fifth image.
  30. 一种电子设备,包括:处理器和存储器,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,在所述处理器执行所述计算机指令的情况下,所述电子设备执行如权利要求1至15中任意一项所述的方法。An electronic device, comprising: a processor and a memory, the memory is used to store computer program codes, the computer program codes include computer instructions, and when the processor executes the computer instructions, the electronic device executes A method as claimed in any one of claims 1 to 15.
  31. 一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序包括程序指令,在所述程序指令被处理器执行的情况下,使所述处理器执行权利要求1至15中任意一项所述的方法。A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is made to perform the claims The method described in any one of 1 to 15.
  32. 一种计算机程序产品,所述计算机程序产品包括计算机程序或指令,在所述计算机程序或指令在计算机上运行的情况下,使得所述计算机执行权利要求1至15中任意一项所述的方法。A computer program product comprising a computer program or instructions which, when run on a computer, causes the computer to perform the method according to any one of claims 1 to 15 .
PCT/CN2022/107671 2021-08-23 2022-07-25 Image processing method and apparatus, electronic device, computer-readable storage medium, and computer program product WO2023024787A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110971089.6 2021-08-23
CN202110971089.6A CN113705417B (en) 2021-08-23 2021-08-23 Image processing method and device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2023024787A1 true WO2023024787A1 (en) 2023-03-02

Family

ID=78654284

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/107671 WO2023024787A1 (en) 2021-08-23 2022-07-25 Image processing method and apparatus, electronic device, computer-readable storage medium, and computer program product

Country Status (2)

Country Link
CN (1) CN113705417B (en)
WO (1) WO2023024787A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117935173A (en) * 2024-03-21 2024-04-26 安徽蔚来智驾科技有限公司 Target vehicle identification method, field end server and readable storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113705417B (en) * 2021-08-23 2022-06-28 深圳市商汤科技有限公司 Image processing method and device, electronic equipment and computer readable storage medium
CN115103110B (en) * 2022-06-10 2023-07-04 慧之安信息技术股份有限公司 Household intelligent monitoring method based on edge calculation

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107730898A (en) * 2016-11-08 2018-02-23 北京奥斯达兴业科技有限公司 Parking lot illegal vehicle recognition methods and system
CN108198200A (en) * 2018-01-26 2018-06-22 福州大学 The online tracking of pedestrian is specified under across camera scene
CN109325967A (en) * 2018-09-14 2019-02-12 腾讯科技(深圳)有限公司 Method for tracking target, device, medium and equipment
CN111818313A (en) * 2020-08-28 2020-10-23 深圳市城市交通规划设计研究中心股份有限公司 Vehicle real-time tracking method and device based on monitoring video
CN113705417A (en) * 2021-08-23 2021-11-26 深圳市商汤科技有限公司 Image processing method and device, electronic equipment and computer readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107635188A (en) * 2017-09-08 2018-01-26 安徽四创电子股份有限公司 A kind of video frequency vehicle trace analysis method based on Docker platforms
CN110770084B (en) * 2019-08-05 2022-02-22 深圳市锐明技术股份有限公司 Vehicle monitoring system and vehicle monitoring method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107730898A (en) * 2016-11-08 2018-02-23 北京奥斯达兴业科技有限公司 Parking lot illegal vehicle recognition methods and system
CN108198200A (en) * 2018-01-26 2018-06-22 福州大学 The online tracking of pedestrian is specified under across camera scene
CN109325967A (en) * 2018-09-14 2019-02-12 腾讯科技(深圳)有限公司 Method for tracking target, device, medium and equipment
CN111818313A (en) * 2020-08-28 2020-10-23 深圳市城市交通规划设计研究中心股份有限公司 Vehicle real-time tracking method and device based on monitoring video
CN113705417A (en) * 2021-08-23 2021-11-26 深圳市商汤科技有限公司 Image processing method and device, electronic equipment and computer readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117935173A (en) * 2024-03-21 2024-04-26 安徽蔚来智驾科技有限公司 Target vehicle identification method, field end server and readable storage medium

Also Published As

Publication number Publication date
CN113705417A (en) 2021-11-26
CN113705417B (en) 2022-06-28

Similar Documents

Publication Publication Date Title
WO2023024787A1 (en) Image processing method and apparatus, electronic device, computer-readable storage medium, and computer program product
CN107292240B (en) Person finding method and system based on face and body recognition
AU2009243442B2 (en) Detection of abnormal behaviour in video objects
CN106060470B (en) Video monitoring method and system
WO2020155790A1 (en) Method and apparatus for extracting claim settlement information, and electronic device
CN111950368B (en) Freight vehicle monitoring method, device, electronic equipment and medium
WO2016013885A1 (en) Method for retrieving image and electronic device thereof
CN111581423B (en) Target retrieval method and device
EP3700180A1 (en) Video blocking region selection method and apparatus, electronic device, and system
KR102297217B1 (en) Method and apparatus for identifying object and object location equality between images
CN108563651B (en) Multi-video target searching method, device and equipment
US20220301317A1 (en) Method and device for constructing object motion trajectory, and computer storage medium
CN112905824A (en) Target vehicle tracking method and device, computer equipment and storage medium
CN109615904A (en) Parking management method, device, computer equipment and storage medium
US20210089784A1 (en) System and Method for Processing Video Data from Archive
WO2023024790A1 (en) Vehicle identification method and apparatus, electronic device, computer-readable storage medium and computer program product
CN205883437U (en) Video monitoring device
US11348254B2 (en) Visual search method, computer device, and storage medium
US20220198224A1 (en) Face recognition method, terminal device using the same, and computer readable storage medium
CN111428740A (en) Detection method and device for network-shot photo, computer equipment and storage medium
CN113470013A (en) Method and device for detecting moved article
CN112383751A (en) Monitoring video data processing method and device, terminal equipment and storage medium
CN108985197B (en) Automatic detection method for taxi driver smoking behavior based on multi-algorithm fusion
US20220084314A1 (en) Method for obtaining multi-dimensional information by picture-based integration and related device
CN116188846A (en) Equipment fault detection method and device based on vibration image

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: 22860133

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE