WO2023273154A1 - Image processing method and apparatus, and device, medium and program - Google Patents

Image processing method and apparatus, and device, medium and program Download PDF

Info

Publication number
WO2023273154A1
WO2023273154A1 PCT/CN2021/134883 CN2021134883W WO2023273154A1 WO 2023273154 A1 WO2023273154 A1 WO 2023273154A1 CN 2021134883 W CN2021134883 W CN 2021134883W WO 2023273154 A1 WO2023273154 A1 WO 2023273154A1
Authority
WO
WIPO (PCT)
Prior art keywords
track point
trajectory
target object
area
track
Prior art date
Application number
PCT/CN2021/134883
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 WO2023273154A1 publication Critical patent/WO2023273154A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • 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/10004Still image; Photographic image
    • G06T2207/10012Stereo images

Definitions

  • the present application relates to the technical field of image processing, and in particular to an image processing method, device, equipment, medium and program.
  • the trajectory of the target object is usually displayed, and relevant personnel can analyze the whereabouts of the target object and other information by observing the trajectory of the target object. Therefore, how to improve the display effect of the trajectory of the target object is of great significance.
  • Embodiments of the present application provide an image processing method, device, device, medium, and program.
  • An embodiment of the present application provides an image processing method, the method is executed by an electronic device, and the method includes:
  • a trajectory of the target object is displayed in the first three-dimensional model according to the at least one first trajectory point data.
  • the trajectory of the target object in the first three-dimensional model according to at least one first trajectory point data of the target object in the target scene, the trajectory of the target object in the target scene can be displayed more intuitively.
  • the displaying the trajectory of the target object in the first three-dimensional model according to the at least one first trajectory point data includes: according to the at least one first trajectory point data Determining at least one first trajectory point of the target object; determining a first three-dimensional area containing the at least one first trajectory point from the first three-dimensional model; displaying in the first three-dimensional model in a predetermined display manner the first three-dimensional area, and display the track of the target object in the first three-dimensional area. In this way, the display effect of the track of the target object can be improved.
  • the determining the first three-dimensional area containing the at least one first trajectory point from the first three-dimensional model includes: obtaining the size of the first three-dimensional area and the first three-dimensional area The shape of a three-dimensional area; determining the centroid of the at least one first trajectory point; using the centroid as the center of the first three-dimensional area, and according to the size of the first three-dimensional area and the first three-dimensional area A shape determines the first three-dimensional region from the first three-dimensional model. In this way, the first three-dimensional area can contain more trajectory points.
  • the at least one first track point includes a second track point, a third track point, a fourth track point, at least one fifth track point, the timestamp of the second track point,
  • the timestamp of the third trajectory point, the timestamp of the fourth trajectory point, and the timestamp of the at least one fifth trajectory point decrease in sequence
  • the determination of the centroid of the at least one first trajectory point includes : When the third trajectory point is located in the first region to be confirmed, determine the centroid of the first region to be confirmed as the centroid of the at least one first trajectory point, the first region to be confirmed is a polygon area, the vertices of the first area to be confirmed are the second track point, the fourth track point, and the at least one fifth track point; if the third track point is located outside the first area to be confirmed In this case, the centroid of the second area to be confirmed is determined as the centroid of the at least one first track point, the first area to be confirmed and the second area to be confirmed are both polygonal areas, and
  • the determining the at least one first track point of the target object according to the at least one first track point data includes: determining the maximum time stamp in the at least one first track point data
  • the n pieces of track point data are at least one valid track point data; the n is a positive integer; and at least one first track point of the target object is determined according to the at least one valid track point data. In this way, the amount of data processing can be reduced and the processing speed can be increased.
  • the acquiring at least one first track point data of the target object in the target scene includes: acquiring the At least two second track point data and a distance threshold of the target object in the target scene; determine the distance between adjacent track point data sets, and the adjacent track point data sets include two of the second track point data sets with adjacent time stamps.
  • the trajectory of the target object includes a first trajectory and a second trajectory
  • the first trajectory is a trajectory between the trajectory point with the mth largest timestamp and the trajectory point with the largest timestamp
  • the second track is a track other than the first track in the track of the target object
  • the display mode of the first track is different from the display mode of the second track
  • the m is equal to or greater than A positive integer of 2.
  • the first three-dimensional model includes a first floor and a second floor, the height of the first floor is different from the height of the second floor, and the trajectory of the target object is in the On the first floor, the method further includes: displaying the second floor in the first three-dimensional model when it is determined that the target object appears on the second floor. In this way, the display effect of the first floor can be improved.
  • the method of determining that the target object appears before the second floor further includes: acquiring a first image containing the target object; determining that the target object appears On the second floor, comprising: determining that the second image contains the target object by comparing the first image with a second image, the second image being collected by a camera on the second floor . In this way, the appearance position of the target object can be determined efficiently.
  • An embodiment of the present application provides an image processing device, the device comprising:
  • An acquisition unit configured to acquire a first three-dimensional model of a target scene and at least one first trajectory point data of a target object in the target scene;
  • a processing unit configured to display the trajectory of the target object in the first three-dimensional model according to the at least one first trajectory point data.
  • the processing unit includes: a first processing subunit configured to determine at least one first track point of the target object according to the at least one first track point data; the second processing A subunit configured to determine a first three-dimensional region containing the at least one first trajectory point from the first three-dimensional model; a third processing subunit configured to display in a predetermined display manner in the first three-dimensional model the first three-dimensional area, and display the track of the target object in the first three-dimensional area.
  • the second processing subunit is further configured to obtain the size of the first three-dimensional area and the shape of the first three-dimensional area; determine the centroid of the at least one first trajectory point ; taking the centroid as the center of the first three-dimensional area, and determining the first three-dimensional area from the first three-dimensional model according to the size of the first three-dimensional area and the shape of the first three-dimensional area.
  • the at least one first track point includes a second track point, a third track point, a fourth track point, at least one fifth track point, the timestamp of the second track point, The timestamp of the third trajectory point, the timestamp of the fourth trajectory point, and the timestamp of the at least one fifth trajectory point decrease in sequence;
  • the second processing subunit is further configured to When the three track points are located in the first area to be confirmed, the centroid of the first area to be confirmed is determined as the centroid of the at least one upper first track point, the first area to be confirmed is a polygonal area, the The vertices of the first area to be confirmed are the second track point, the fourth track point, and the at least one fifth track point; when the third track point is located outside the first area to be confirmed, determine The centroid of the second area to be confirmed is used as the centroid of the at least one first trajectory point, the first area to be confirmed and the second area to be confirmed are both polygonal areas, and the vertex of the first area
  • the first processing subunit is further configured to determine that the n track point data with the largest timestamp in the at least one first track point data are at least one valid track point data; n is a positive integer; at least one first track point of the target object is determined according to the at least one valid track point data.
  • the acquisition unit when the number of the first trajectory point data is greater than 1, includes: a first acquisition subunit configured to acquire the location of the target object in the target scene At least two second track point data and a distance threshold within the distance; determine the distance of the adjacent track point data set, the adjacent track point data set includes the two second track point data with adjacent time stamps; in the When the distance is less than the distance threshold, the old track point data is removed from the at least two second track point data to obtain the at least one first track point data, and the old track point data is the The second track point data with the smallest time stamp in the adjacent track point data sets; or using the at least two second track point data as the one or more first track point data.
  • the trajectory of the target object includes a first trajectory and a second trajectory
  • the first trajectory is a trajectory between the trajectory point with the mth largest timestamp and the trajectory point with the largest timestamp
  • the second track is a track other than the first track in the track of the target object, and the display mode of the first track is different from the display mode of the second track;
  • the m is equal to or greater than A positive integer of 2.
  • the first three-dimensional model includes a first floor and a second floor, the height of the first floor is different from the height of the second floor, and the trajectory of the target object is in the On the first floor, the device further includes: a display unit configured to display the second floor in the first three-dimensional model when it is determined that the target object appears on the second floor.
  • the determining that the target object appears before the second floor the acquiring unit is configured to acquire a first image containing the target object; the processing unit is further configured In order to determine that the second image includes the target object by comparing the first image with the second image, the second image is collected by a camera on the second floor.
  • An embodiment of the present application provides 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 image processing method described in any one of the above embodiments.
  • An embodiment of the present application provides another electronic device, including: a processor, a sending device, an input device, an output device, and a memory, the memory is used to store computer program codes, and the computer program codes include computer instructions.
  • the processor executes the computer instructions
  • the electronic device executes the image processing method described in any one of the above embodiments.
  • An embodiment of the present application provides a computer-readable storage medium, where 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 The processor executes the image processing method described in any one of the above embodiments.
  • An embodiment of the present application provides a computer program product, the computer program product includes a computer program or an instruction, and when the computer program or instruction is run on an electronic device, the electronic device is made to execute any of the above-mentioned embodiments The image processing method described.
  • Embodiments of the present application at least provide an image processing method, device, device, medium, and program. First, acquire a first three-dimensional model of a target scene and at least one first trajectory point data of a target object in the target scene; then, A trajectory of the target object is displayed in the first three-dimensional model according to the at least one first trajectory point data. In this way, the trajectory of the target object in the target scene can be intuitively displayed
  • FIG. 1 is a schematic flow diagram of an image processing method provided in an embodiment of the present application
  • FIG. 2 shows a schematic diagram of a system architecture to which the image processing method of the embodiment of the present application can be applied
  • FIG. 3 is a schematic diagram of a track point area of a target object provided in an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a track point area of a target object provided in an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a track point area of a target object provided in an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a trajectory between trajectory points provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of another trajectory between trajectory points provided by the embodiment of the present application.
  • FIG. 8 is another schematic diagram of a trajectory between trajectory points provided by the embodiment of the present application.
  • FIG. 9 is another schematic diagram of a trajectory between trajectory points provided by the embodiment of the present application.
  • FIG. 10 is a schematic diagram showing the first floor in the first three-dimensional model provided by the embodiment of the present application.
  • Fig. 11 is a schematic diagram showing the second floor in the first three-dimensional model provided by the embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of an image processing device provided by an embodiment of the present application.
  • FIG. 13 is a schematic diagram of a hardware structure of an image processing device provided by an embodiment of the present application.
  • 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.
  • the more intuitive display of structured information in the physical world in the digital world is of great value and significance to the actual business work of customers, and the multi-faceted information of personnel, ground and objects in buildings can be carried out in the 3D (3Dimension, 3D) digital world.
  • Digital twin Among them, the target trajectory is the most concerned aspect. Based on the analysis and extraction of the video information of the camera inside the building, combined with the internal road network information, the trajectory of the personnel target can be acquired and displayed in real time, combined with the 3D building model The rendering of the floor achieves the effect of dismantling the floor.
  • the execution subject of the embodiment of the present application is an image processing device, wherein the image processing device may be any electronic device capable of executing the technical solutions disclosed in the method embodiments of the present application.
  • 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 flowchart of an image processing method provided in an embodiment of the present application.
  • the target scene may be any scene.
  • the target scene is inside a building; for another example, the target scene is an underground parking lot; for another example, the target scene is a campus; for another example, the target scene is a scene in a shopping mall.
  • the three-dimensional model (including the first three-dimensional model and the second three-dimensional model to be mentioned below) can be a computer-aided design (Computer Aided Design, CAD) three-dimensional model, and the three-dimensional model can also be a three-dimensional convex hull, A 3D model can also be a 3D point cloud.
  • CAD Computer Aided Design
  • the target object may be any object.
  • the target object includes one of the following: people, vehicles, and robots.
  • the number of the first track point data may be one or greater than one.
  • the first track point data includes a location and a time stamp.
  • the position of the first track point data is a position in the coordinate system of the first three-dimensional model, that is, the position of the first track point data is a three-dimensional coordinate.
  • At least one first track point data of the target object includes first track point data a. If the first track point data a includes point A and time stamp t1. According to the first track point data, it can be determined that the target object appears at point A at t1.
  • the image processing device uses the 3D model of the target scene input by the user through the input component as the first 3D model.
  • the above-mentioned input components include: a keyboard, a mouse, a touch screen, a touch pad and an audio input device.
  • the image processing apparatus receives the 3D model of the target scene sent by the terminal as the first 3D model.
  • the above-mentioned terminal can be any of the following: mobile phone, computer, tablet computer, server.
  • the image processing device includes lidar.
  • the image processing device scans the target scene through the laser radar, and obtains a 3D model of the target scene as a first 3D model.
  • the image processing device receives the track point data input by the user through the input component, so as to obtain at least one first track point data of the target object in the target scene.
  • the image processing apparatus receives the track point data sent by the terminal to obtain at least one first track point data of the target object in the target scene.
  • the image processing device acquires at least one track point data to be converted and the coordinate conversion relationship of the target object in the global positioning system coordinate system; wherein, the coordinate conversion relationship is the coordinate system of the global positioning system and the first The conversion relationship between the coordinate systems of the 3D model.
  • the image processing device converts at least one trajectory point data to be converted of the target object in the global positioning system coordinate system into at least one first trajectory point data of the target object in the first three-dimensional model according to the coordinate transformation relationship, and obtains the target object in the first three-dimensional model. At least one first track point data in the target scene.
  • acquiring the first 3D model of the target scene and acquiring at least one first trajectory point data of the target object in the target scene may be performed separately, or may be performed simultaneously.
  • the image processing device sequentially connects the first trajectory point data of the target object in the target scene according to the size of the time stamp, obtains the trajectory of the target object in the first 3D model, and displays the trajectory in the first 3D model.
  • the first track point data of the target object includes: track point data a, track point data b, and track point data c; wherein, track point data a includes position A and timestamp t1, and track point data b includes position B and time Stamp t2, track point data c includes position C and time stamp t3.
  • the trajectory of the target object in the first three-dimensional model is that the target object appears at position A at t1, appears at position B at t2, and appears at position C at t3.
  • the image processing device displays the trajectory of the target object in the first three-dimensional model based on at least one first trajectory point data of the target object in the target scene, which can more intuitively display the trajectory of the target object in the target scene .
  • FIG. 2 shows a schematic diagram of a system architecture to which the image processing method of the embodiment of the present application can be applied; as shown in FIG. 2 , the system architecture includes: an acquisition terminal 201 , a network 202 and a determination terminal 203 .
  • the acquisition terminal 201 and the determination terminal 203 establish a communication connection through the network 202, and the acquisition terminal 201 reports at least one of the first three-dimensional model of the target scene and the target object in the target scene to the determination terminal 203 through the network 202.
  • the first track point data determining that the terminal 203 responds to the first three-dimensional model of the target scene and at least one first track point data of the target object in the target scene, and according to the at least one first track point data, in the first three-dimensional model Displays the trajectory of the target object. Finally, the determination terminal 203 uploads the track of the target object to the network 202 and sends it to the acquisition terminal 201 through the network 202 .
  • the acquisition terminal 201 may include an image acquisition device, and the determination terminal 203 may include a visual processing device or a remote server capable of processing visual information.
  • the network 202 may be connected in a wired or wireless manner. Wherein, when it is determined that the terminal 203 is a visual processing device, the acquisition terminal 201 can communicate with the visual processing device through a wired connection, such as performing data communication through a bus; Data exchange between the network and the remote server.
  • the acquisition terminal 201 may be a vision processing device with a video capture module, or a host with a camera.
  • the image processing method of the embodiment of the present disclosure may be executed by the acquisition terminal 201 , and the above-mentioned system architecture may not include the network 202 and the determination terminal 203 .
  • the image processing device may perform the following steps during the execution of step 102:
  • Step 1 Determine at least one first track point of the target object according to at least one first track point data.
  • the track point is a point where the target object has appeared in the target scene, and the track point has a time stamp.
  • the image processing device may determine the position of the track point according to the position in the first track point data, and determine the time stamp of the track point according to the time stamp in the first track point data.
  • the first track point data a includes point A and time stamp t1.
  • the track point determined according to the first track point data a is point A, and the time stamp of the track point is t1.
  • the image processing device can obtain a first trajectory point according to a first trajectory point data, and correspondingly, can obtain at least one first trajectory point according to at least one first trajectory point data.
  • Step 2 Determine a first three-dimensional area including at least one first trajectory point from the first three-dimensional model.
  • the area of the target scene may be large, in order to better display the track of the target object in the target scene, the area where the target object has appeared may be emphatically displayed. Therefore, before the track of the target object is displayed in the first 3D model, the area where the target object has appeared can be determined from the first 3D model.
  • the image processing device takes the area containing at least one first trajectory point of the target object as the area where the target object has appeared, and determines the at least one first trajectory containing the target object from the first three-dimensional model The area of points to get the first three-dimensional area.
  • Step 3 Displaying the first three-dimensional area in the first three-dimensional model according to a predetermined display manner, and displaying the trajectory of the target object in the first three-dimensional area.
  • the predetermined display mode is a display mode emphatically displaying the first three-dimensional region.
  • Highlighting the first three-dimensional area in the first three-dimensional model means that the display mode of the first three-dimensional area is different from that of the non-first three-dimensional area; wherein, the non-first three-dimensional area includes the first three-dimensional area in the first three-dimensional model except the first three-dimensional area outside the area.
  • the predetermined display manner includes one or more of the following: color highlighting, highlighting, and hovering.
  • the predetermined display manner includes color highlighting.
  • the image processing device converts the non-first three-dimensional area into a grayscale image, and retains the color of the first three-dimensional area, so as to highlight the first three-dimensional area.
  • the display effect of highlighting the first three-dimensional area in the first three-dimensional model is that the first three-dimensional area is a color image, and the non-first three-dimensional area is a black and white image.
  • the predetermined display manner includes highlight display.
  • the image processing device highlights the first three-dimensional area, so as to realize highlighting the first three-dimensional area.
  • the predetermined display manner includes floating display.
  • the first three-dimensional model includes a head-up display (Head Up Display, HUD) layer, and the image processing device determines a display area corresponding to the first three-dimensional area from the HUD layer as a floating display area. The image processing device displays the first three-dimensional area in the floating display area.
  • HUD Head Up Display
  • the image processing device displays the track of the target object in the first three-dimensional area while highlighting the first three-dimensional area, thereby improving the display effect of the track of the target object.
  • the image processing device may implement follow-up display of the target object by performing Step 1 to Step 3 .
  • the target object is Zhang San
  • the target scene is a shopping mall.
  • the image processing device can highlight Zhang San's trajectory in the mall according to Zhang San's real-time position in the mall by performing steps 1 to 3, so as to achieve the effect of following and displaying Zhang San's trajectory in the mall.
  • the image processing device performs the following steps during step 2:
  • Step 4 Obtain the size of the first three-dimensional area and the shape of the first three-dimensional area.
  • the size of the first three-dimensional region is used to determine the area of the first three-dimensional region.
  • the shape of the first three-dimensional area is a rectangle, and the size of the first three-dimensional area is a length of 100 pixel units and a width of 50 pixel units.
  • the first three-dimensional area is a rectangle with a length of 100 pixel units and a width of 50 pixel units. the area surrounded by.
  • the shape of the first three-dimensional area is a circle, and the size of the first three-dimensional area is a radius of 50 pixel units.
  • the first three-dimensional area is an area surrounded by a circle with a radius of 50 pixel units.
  • the shape of the first three-dimensional area is an isosceles trapezoid
  • the size of the first three-dimensional area is 50 pixel units for the upper base, 80 pixel units for the lower base, and 30 pixel units for the height.
  • the area is an area surrounded by an isosceles trapezoid with an upper base of 50 pixel units, a lower base of 80 pixel units, and a height of 30 pixel units.
  • the image processing device uses the size of the first three-dimensional area input by the user through the input component as the size of the first three-dimensional area.
  • the image processing apparatus receives the size of the first three-dimensional area sent by the terminal as the size of the first three-dimensional area.
  • the image processing device uses the shape of the first three-dimensional area input by the user through the input component as the shape of the first three-dimensional area.
  • the image processing apparatus receives the shape of the first three-dimensional area sent by the terminal as the shape of the first three-dimensional area.
  • Step 5 Determine the centroid of at least one first trajectory point of the target object.
  • determining the centroid of the track points of the target object may determine a concentration area of the track points of the target object.
  • the track point area of the target object shown in FIG. 3 is the same as the track point area of the target object shown in FIG. 4
  • the number of track points in FIG. 3 is the same as that in FIG. 4 .
  • the positions of the centroids of the track points in FIG. 3 and FIG. 4 are different.
  • the track points of the target object are distributed unevenly, but the centroid is in the concentration area of the track points, that is, the center of mass of the track points of the target object can determine the concentration area of the track points of the target object.
  • the image processing device determines the centroid of the trajectory point of the target object, and determines the coordinates of the centroid of the trajectory point of the target object in the coordinate system of the first three-dimensional model.
  • the image processing device determines a polygon surrounding the track points of the target object according to the track points of the target object, wherein vertices of the polygon are all track points of the target object.
  • the image processing device determines the centroid of the polygon as the centroid of the track point of the target object.
  • Step 6 Taking the centroid as the center of the first three-dimensional area, and determining the first three-dimensional area from the first three-dimensional model according to the size of the first three-dimensional area and the shape of the first three-dimensional area.
  • the center of the first three-dimensional area may be the geometric center of the first three-dimensional area. Since the area of the first three-dimensional region is determined by the size of the first three-dimensional region, if the size of the first three-dimensional region is limited, the area of the first three-dimensional region is also limited. When the area of the first three-dimensional region is limited, the image processing device may use the center of mass as the center of the first three-dimensional region, so that the first three-dimensional region may contain more trajectory points.
  • the centroid of the track point is in the concentrated area of the track point of the target object, and the image processing device uses the centroid as the center of the first three-dimensional area, so that the first three-dimensional area
  • the concentration area of the track points is closer to the target object, so that the first three-dimensional area contains more track points.
  • the shape of the first three-dimensional region is a rectangle.
  • the centroid area can be determined according to the area of the first three-dimensional area, and the centroid area now includes seven trajectory points (i.e., trajectory point A, trajectory point B, and trajectory point C , track point D, track point E, track point F, track point G). If the center of the track point area of the target object is taken as the center of the first three-dimensional area, the center area can be determined according to the area of the first three-dimensional area, and the center area includes one track point (ie track point F).
  • the center of mass is taken as the center of the first three-dimensional area
  • the first three-dimensional area contains 7 track points
  • the center of the track point area of the target object is taken as the first three-dimensional area
  • the center of the region, the first three-dimensional region contains 1 trajectory point.
  • taking the centroid as the center of the first three-dimensional area can make the first three-dimensional area contain more trajectory points.
  • the image processing device may determine the first three-dimensional area from the first three-dimensional model according to the center, the size of the first three-dimensional area, and the shape of the first three-dimensional area.
  • the image processing device further uses the first three-dimensional area as the first three-dimensional area, so that the first three-dimensional area includes more track points of the target object. In this way, the image processing device displays the track of the target object while displaying the first three-dimensional area, which can improve the display effect.
  • At least one first track point includes a second track point, a third track point, a fourth track point, and at least one fifth track point.
  • the time stamp of the second track point, the time stamp of the third track point, the time stamp of the fourth track point, and the time stamp of at least one upper fifth track point decrease in sequence.
  • At least one first track point includes: track point a, track point b, track point c, and track point d; wherein, the time stamp of track point a is earlier than the time stamp of track point b, and the time stamp of track point b is earlier The time stamp of track point d is earlier than the time stamp of track point c.
  • track point d is the second track point
  • track point c is the third track point
  • track point b is the fourth track point
  • track point a is the fifth track point, that is, the number of fifth track points is one.
  • At least one first trajectory point includes: trajectory point a, trajectory point b, trajectory point c, trajectory point d, and trajectory point e; wherein, the timestamp of trajectory point a is earlier than the timestamp of trajectory point b, and trajectory point b The timestamp of the trajectory point is earlier than the timestamp of the trajectory point c, the timestamp of the trajectory point d is earlier than the timestamp of the trajectory point c, and the timestamp of the trajectory point e is earlier than the timestamp of the trajectory point d.
  • track point e is the second track point
  • track point d is the third track point
  • track point c is the fourth track point
  • track point a and track point b are the fifth track point, that is, the fifth track point
  • the quantity is 2.
  • the image processing device performs the following steps during step 5:
  • Step 7 When the third trajectory point is located in the first region to be confirmed, determine the centroid of the first region to be confirmed as the centroid of at least one first trajectory point.
  • the first region to be confirmed is a polygonal region, and the first region to be confirmed is a polygonal region.
  • the vertices of the region are the second track point, the fourth track point, and at least one fifth track point.
  • the at least one first trajectory point is discontinuous in the time dimension, there is an error between the trajectory obtained according to the at least one first trajectory point and the actual trajectory of the target object.
  • the image processing device determines the position of trajectory point A and trajectory point B, according to the trajectory The trajectory obtained by point A and trajectory point B is line segment AB.
  • the area containing at least one first track point can be
  • the convex hull serves as at least one first trajectory point region.
  • track point A, track point B, track point C, track point D and track point E are at least one first track point, wherein the time stamp of track point A is earlier than the time of track point B
  • the time stamp of track point B is earlier than the time stamp of track point C
  • the time stamp of track point C is earlier than the time stamp of track point D
  • the time stamp of track point D is earlier than the time stamp of track point E.
  • the curve CD is the real trajectory of the target object moving from the trajectory point C to the trajectory point D.
  • the obtained track point area is a polygon ABCDE.
  • the curve CD is located outside the track point area, and if the centroid of the track point area is used as the centroid of at least one first track point, the accuracy of the centroid of at least one first track point will obviously be reduced.
  • the trajectory point area ABCE as shown in FIG. 8 can be obtained.
  • the track point area includes the curve CD, and if the centroid of the track point area is used as the centroid of the at least one first track point, the accuracy of the centroid of the at least one first track point can be improved.
  • the third track point is located in the first area to be confirmed, which means that the first area to be confirmed is a convex hull area including at least one first track point.
  • the image processing device uses the first area to be confirmed as the whereabouts area of the target object in the first three-dimensional model, which can improve the accuracy of the track area, and further improve the display accuracy of the track of the target object.
  • the image processing device further uses the centroid of the first region to be confirmed as the centroid of the at least one first trajectory point, which can improve the accuracy of the centroid of the at least one first trajectory point.
  • track point A and track point B are the fifth track point
  • track point C is the fourth track point
  • track point D is the third track point
  • track point E is the second track point.
  • the first area to be confirmed is the area enclosed by the polygon ABCE. Since the trajectory point D is located within the polygon ABCE, the image processing device takes the centroid of the polygon ABCE as the centroid of at least one first trajectory point.
  • track point A is the fifth track point
  • track point B is the fourth track point
  • track point C is the third track point
  • track point D is the second track point.
  • the first area to be confirmed is the area enclosed by the triangle ABD. Since the trajectory point C is located in the triangle ABD, the image processing device takes the centroid of the triangle ABD as the centroid of at least one first trajectory point.
  • Step 8 When the third trajectory point is located outside the first region to be confirmed, determine the centroid of the second region to be confirmed as the centroid of at least one first trajectory point, the first region to be confirmed and the second region to be confirmed are both In a polygonal area, the vertices of the first area to be confirmed are the second track point, the fourth track point, and at least one fifth track point, and the vertices of the second area to be confirmed are the second track point, the third track point, and the fourth track point , at least one fifth trajectory point.
  • the third track point is located outside the first area to be confirmed, indicating that some track points are located outside the first area to be confirmed.
  • the image processing device takes the second area to be confirmed as the trajectory area of the target object in the first three-dimensional model, and then uses the centroid of the second area to be confirmed as the centroid of at least one first trajectory point, which can improve at least one The accuracy of the centroid of the first trajectory point.
  • the second track point, the third track point, the fourth track point, and at least one fifth track point are all examples, wherein the second track point refers to the track point with the largest timestamp among the at least one first track point,
  • the third track point refers to the track point with the second largest time stamp among at least one first track point,
  • the fourth track point refers to the track point with the third largest time stamp among at least one first track point, and at least one fifth track point represents Refers to at least one track point of the first track point whose time stamp is smaller than the time stamp of the fourth track point.
  • the trajectory of the target object is in the state of real-time update, then if the connection mode between the trajectory point with the smallest timestamp and the trajectory point with the third largest timestamp has been determined, according to this implementation mode It is determined that the track point with the largest time stamp is connected to the track point with the second largest time stamp, or the track point with the largest time stamp is connected with the track point with the third largest time stamp, so as to determine the track area of the target object.
  • At t1 moment at least one first track point includes track point A, track point B, track point C and track point D shown in Figure 9, that is, at t1 moment, track point A is the fifth track point, track point B is the fourth track point, track point C is the third track point, and track point D is the second track point.
  • At time t1 at least one first track point area is the area surrounded by the triangle ABD in FIG. 9 .
  • track point A and track point B are both the fifth track point
  • track point C is the fourth track point
  • track point D is the third track point
  • track point E is the second track point.
  • the image processing device first determines whether the track point E is connected to the track point D or the track point C, and when it is determined that the track point E is connected to the track point C, the image processing device removes the connection between the track point C and the track point D. line, and then determine at least one first trajectory point area as the area enclosed by the polygon ABCE.
  • the image processing device may also perform the following steps during step 1:
  • Step 9 Determine the n track point data with the largest time stamp among the at least one first track point data as at least one valid track point data.
  • the image processing device selects n track point data with the largest time stamp from at least one first track point data as at least one valid track point data. Therefore, while ensuring the validity of the track point data of the target object (ie, the first track point data), the quantity of the track point data of the target object is reduced, thereby reducing the amount of data processing brought by processing the track point data of the target object .
  • n is a positive integer, and the value of n can be set according to actual requirements. For example, if the user wants to reduce the amount of data processing and increase the processing speed, the value of n can be set to a small value, such as setting the value of n to 80; the user wants to display more track point data of the target object, and the value of n can be set to a large value, such as The value of n is 200.
  • the image processing device determines the n track point data with the largest timestamp in at least one track point data, that is, determines the n first track point data closest to the target object, and takes the n first track point data as valid track point data, and obtains At least one valid track point data.
  • At least one first track point data includes track point data 1, track point data 2, track point data 3, track point data 4, and track point data 5, wherein the timestamp of track point data 1 is t1, the time stamp of track point data 2 is t2, the time stamp of track point data 3 is t3, the time stamp of track point data 4 is t4, and the time stamp of track point data 5 is t5. If t1 is earlier than t2, t2 is earlier than t3, t3 is earlier than t4, and t4 is earlier than t5, the valid track point data includes track point data 1, track point data 2 and track point data 3.
  • Step 10 Determine at least one first track point of the target object according to at least one valid track point data.
  • the image processing device can determine a valid track point according to the position and time stamp in the valid track point data.
  • the image processing device can determine at least one valid track point according to the position and time stamp in the at least one valid track point data. After obtaining at least one valid trajectory point, the image processing device uses the at least one valid trajectory point as at least one first trajectory point.
  • At least one valid track point data includes track point data 1, track point data 2 and track point data 3, track point data 1 includes position 1 and time stamp t1, track point data 2 includes position 2 and time stamp t2, track point Data 3 includes position 3 and time stamp t3.
  • the image processing device can obtain an effective trajectory point 1 according to the trajectory point data 1; wherein, the effective trajectory point 1 is that the target object appears at position 1 at t1.
  • the image processing device can obtain the effective trajectory point 2 according to the trajectory point data 2, wherein the effective trajectory point 2 is that the target object appears at the position 2 at t2.
  • the image processing device can obtain the effective trajectory point 3 according to the trajectory point data 3, wherein the effective trajectory point 3 is that the target object appears at the position 3 at t3.
  • the image processing device can reduce the amount of data processing and increase the processing speed.
  • the trajectory of the target object includes a first trajectory and a second trajectory
  • the first trajectory is the trajectory between the trajectory point with the mth largest timestamp and the trajectory point with the largest timestamp
  • the second trajectory is Among the tracks of the target object except the first track, the display mode of the first track is different from the display mode of the second track.
  • the first trajectory is a trajectory between the trajectory point with the mth largest timestamp and the trajectory point with the largest timestamp, that is, the first trajectory includes the m trajectory points with the largest timestamp in the trajectory of the target object.
  • m is a positive integer equal to or greater than 2.
  • the trajectory of the target object includes trajectory point 1, trajectory point 2, trajectory point 3, trajectory point 4, and trajectory point 5; wherein, the timestamp of trajectory point 1 is t1, and the timestamp of trajectory point 2 is t2, the time stamp of track point 3 is t3, the time stamp of track point 4 is t4, and the time stamp of track point 5 is t5.
  • t1 is earlier than t2, t2 is earlier than t3, t3 is earlier than t4, and t4 is earlier than t5, then the first track includes track point 1 and track point 2.
  • the image processing device distinguishes the first trajectory from the second trajectory by displaying the first trajectory and the second trajectory in different ways.
  • the display mode includes one of the following: color, whether the trajectory line is virtual or solid, and whether the trajectory line carries an arrow.
  • the image processing device displays the first trajectory in blue, and displays the second trajectory in red. In this way, the user can distinguish the first track from the second track by color, and then can determine that the moving direction of the target object is from the second track to the first track.
  • the image processing device displays the first trajectory as a solid line and displays the second trajectory as a dotted line. In this way, the user distinguishes the first trajectory from the second trajectory through the virtual reality of the trajectory lines, and then can determine the moving direction of the target object.
  • the image processing device displays the first trajectory with a line carrying an arrow, and the arrow points to the trajectory point with the largest time stamp, and displays the first trajectory as a line without an arrow.
  • the lines show the second locus. In this way, the user distinguishes the first trajectory from the second trajectory according to whether the trajectory line carries an arrow, and then can determine the moving direction of the target object.
  • the first three-dimensional model includes a first floor and a second floor, and the height of the first floor is different from that of the second floor.
  • the trajectory of the target object is within the first floor.
  • the first floor and the second floor are any two floors in the first three-dimensional model, and the heights of the first floor and the second floor are different, that is, the first floor and the second floor are two different floors .
  • the image processing device displays the trajectory of the target object in the first three-dimensional model, that is, the trajectory of the target object is displayed on the first floor, that is, the image processing device displays the trajectory of the target object
  • the first floor is displayed in the first 3D model.
  • the image processing device highlights the first three-dimensional area in the first floor, and displays the track of the target object in the first three-dimensional area.
  • the image processing device displays the first floor in the first three-dimensional model by hiding floors in the first three-dimensional model except the first floor.
  • the first three-dimensional model has five floors in total, and the first floor is the fourth floor in the first three-dimensional model.
  • the image processing device may hide the fifth floor in the first three-dimensional model, and then display the first floor while displaying the shape of the first three-dimensional model. Since the first floor is the fourth floor, the first floor, the second floor and the third floor will be covered when the first floor is displayed, so that when the first 3D model is displayed, the first floor, the second floor and the third floor The interference caused by the third floor to the display of the first floor, thereby improving the display effect of the first floor. In some embodiments of the present application, the display effect can be seen in FIG. 10 .
  • the image processing device also performs the following steps:
  • Step 11 in a case where it is determined that the target object appears on the second floor, display the second floor in the first three-dimensional model.
  • the image processing device should display the second floor in the first three-dimensional model in case the target object appears on the second floor.
  • the image processing device switches the displayed content in the first three-dimensional model from the first floor to the second floor when it is determined that the target object appears on the second floor.
  • the image processing device displays the first floor in the first three-dimensional model, and the image processing device switches the display content of the first three-dimensional model from the first floor to the second floor to display the content shown in Figure 11 .
  • the image processing device can improve the display effect of the trajectory of the target object by switching the display content in the first three-dimensional model from the first floor to the second floor.
  • the image processing device determines that the target object appears on the second floor when an instruction that the target object appears on the second floor is detected.
  • the user may input an instruction that the target object appears on the second floor to the image processing device through the input component, and the image processing device determines that the target object appears on the second floor when the instruction is detected.
  • the image processing device determines that the target object appears on the second floor when it is determined that the image captured by the camera on the second floor contains the target object.
  • the image processing device obtains the predicted trajectory of the target object according to the trajectory of the target object and the moving direction of the target object.
  • the image processing device determines that the target object appears on the second floor when it is determined according to the predicted trajectory that the target object appears on the second floor.
  • the image processing device determines that the target object appears on the second floor at time t2 according to the predicted trajectory, then the image processing device determines that the target object appears on the second floor at time t2, and then displays the second floor in the first three-dimensional model at time t2 .
  • the following steps are further performed:
  • Step 12 Acquire the first image containing the target object.
  • the target object may be any object.
  • the target object includes one of the following: a human body, a human face, and a vehicle.
  • the image processing apparatus acquires the first image containing the target object by receiving the user's input of the image containing the target object through the input component.
  • the image processing apparatus receives the image containing the target object sent by the terminal to obtain a first image containing the target object.
  • the image processing device is equipped with a camera.
  • the image processing device obtains a first image including the target object by shooting the target object using the camera.
  • the camera captures the target object to obtain an image containing the target object, and the image processing device obtains the first image containing the target object from the camera through the communication connection.
  • step 12 the image processing device determines that the target object appears on the second floor by performing the following steps:
  • Step 13 Determine that the second image contains the target object by comparing the first image with the second image, and the second image is collected by the camera on the second floor.
  • comparing the first image with the second image refers to comparing the similarity between the first image and the second image to determine whether the second image contains the target object.
  • the image processing device can determine whether the second image contains the target object by comparing the face of the first image with the second image;
  • the image processing device can determine whether the second image contains the target object by comparing the first image with the second image for the human body;
  • the image processing device can determine whether the second image contains the target object by comparing the first image with the second image for the vehicle.
  • the second image is an image collected by the camera on the second floor, if it is determined that the second image contains the target object, it is determined that the target object appears on the second floor.
  • the embodiment of the present application also provides an application scenario.
  • cameras are installed in more and more places.
  • relevant personnel need to find a target person, they can determine the trajectory of the target person based on the images collected by the surveillance camera.
  • the trajectory of the target person can be displayed in the scene. Based on the technical solutions provided by the embodiments of the present application, the trajectory of the target person can be displayed in the three-dimensional model of the building.
  • the relevant personnel want to track Zhang San's track in Building A, and the relevant personnel input Zhang San's face image to the server (ie, the image processing device).
  • the server further compares Zhang San's face image with the image captured by the camera in Building A in real time to determine whether Zhang San appears in Building A.
  • the server determines Zhang San's track point data in Building A according to the face comparison result.
  • the image processing device determines that image a contains Zhang San through the face comparison result, and image a is collected by camera b at time t1, then the image processing device can obtain a track point data according to image a, and the track point data includes Zhang San 3 appears at the position captured by camera b, and the time of appearance is t1.
  • the image processing device processes Zhang San's trajectory point data in Building A and the 3D model of Building A according to the technical solution provided by the embodiment of the present application, so as to display Zhang San's trajectory in the 3D model of Building A.
  • the image processing device may highlight the first three-dimensional area containing Zhang San's trajectory points in Building A based on the technical solution provided by the embodiment of the present application, and The trajectory of Zhang San is displayed in the first three-dimensional area.
  • the image processing device switches the floor displayed in the 3D model of building A from floor c to floor d.
  • the image processing device acquires at least one first track point data of the target object in the target scene by performing the following steps:
  • Step 14 acquiring at least two second track point data and a distance threshold of the target object in the target scene.
  • the number of the second trajectory point data may be 2 or greater than 2.
  • the second track point data includes a location and a time stamp.
  • the distance threshold is a positive number, and the value of the distance threshold can be set according to actual requirements.
  • Step 15 Determine the distance between adjacent track point data sets, where the adjacent track point data sets include two second track point data with adjacent time stamps.
  • the adjacent track point data set includes two second track point data with adjacent time stamps, and the distance between the adjacent track point data sets refers to the distance between the two track point data in the adjacent track point data set. distance.
  • At least two second track point data include: track point data a, track point data b, and track point data c, wherein the time stamp of track point data a is t1, the time stamp of track point data b is t2, and the track The timestamp of point data c is t3. If t1 is greater than t2, and t2 is greater than t3, the adjacent track point data set A and the adjacent track point data set B can be determined based on at least two second track point data, wherein the adjacent track point data set A includes track point data a and track point data b, the adjacent track point data set B includes track point data b and track point data c.
  • the position of track point data a is p1
  • the position of track point data b is p2
  • the position of track point data c is p3, and the distance between p1 and p2 is d1, and the distance between p2 and p3 is d2, then
  • the distance between the adjacent track point data set A is d1
  • the distance between the adjacent track point data set B is d2.
  • the second trajectory point data with a closer distance may be combined.
  • the image processing device realizes the merging of the second track point data with a shorter distance by deleting the second track point data with a smaller time stamp.
  • the image processing device judges whether the distance between adjacent track point data sets is relatively short based on the distance threshold, and then obtains more than one first track point data based on the judgment result and at least two first track point data. In some embodiments of the present application, the image processing device obtains more than one first track point data by performing one of steps 16 and 17:
  • Step 16 When the distance is less than the distance threshold, the old track point data is removed from at least two second track point data to obtain at least one first track point data, and the old track point data is the collection time of adjacent track point data. Poke the smallest second track point data.
  • Step 17 When the distance is less than the distance threshold, use at least two second track point data as more than one first track point data.
  • the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process.
  • the specific execution order of each step should be based on its function and possible
  • the inner logic is OK.
  • FIG. 12 is a schematic structural diagram of an image processing device provided by an embodiment of the present application.
  • the image processing device 1 includes: an acquisition unit 11 and a processing unit 12, wherein:
  • the acquisition unit 11 is configured to acquire a first three-dimensional model of a target scene and at least one first trajectory point data of a target object in the target scene;
  • the processing unit 12 is configured to display the trajectory of the target object in the first three-dimensional model according to the at least one first trajectory point data.
  • the processing unit 12 includes: a first processing subunit configured to determine at least one first track point of the target object according to the at least one first track point data;
  • the processing subunit is configured to determine from the first three-dimensional model a first three-dimensional area containing the at least one first trajectory point;
  • the third processing subunit is configured to display in a predetermined manner in the first three-dimensional model displaying the first three-dimensional area, and displaying the track of the target object in the first three-dimensional area;
  • the second processing subunit is further configured to obtain the size of the first three-dimensional area and the shape of the first three-dimensional area; determine the centroid of the at least one first trajectory point ; taking the centroid as the center of the first three-dimensional area, and determining the first three-dimensional area from the first three-dimensional model according to the size of the first three-dimensional area and the shape of the first three-dimensional area.
  • the at least one first track point includes a second track point, a third track point, a fourth track point, at least one fifth track point, the timestamp of the second track point, The timestamp of the third trajectory point, the timestamp of the fourth trajectory point, and the timestamp of the one or more fifth trajectory points decrease in sequence;
  • the second processing subunit is further configured to When the third trajectory point is located in the first area to be confirmed, the centroid of the first area to be confirmed is determined as the centroid of the at least one first trajectory point, and the first area to be confirmed is a polygonal area, so The apex of the first area to be confirmed is the second track point, the fourth track point, and the at least one fifth track point; when the third track point is located outside the first area to be confirmed, Determine the centroid of the second area to be confirmed as the centroid of the at least one first track point, the first area to be confirmed and the second area to be confirmed are polygonal areas, and the vertex of the first area to be confirmed
  • the first processing subunit is further configured to determine that the n track point data with the largest timestamp in the at least one first track point data are at least one valid track point data; n is a positive integer; at least one first track point of the target object is determined according to the at least one valid track point data.
  • the acquisition unit 11 when the number of the first trajectory point data is greater than 1, includes: a first acquisition subunit configured to acquire At least two second track point data and a distance threshold in the scene; determine the distance between adjacent track point data sets, and the adjacent track point data sets include two second track point data with adjacent time stamps; When the distance is less than the distance threshold, the old track point data is removed from the at least two second track point data to obtain the at least one first track point data, and the old track point data is all The second track point data with the smallest time stamp in the adjacent track point data sets; or the at least two second track point data as the one or more first track point data.
  • the trajectory of the target object includes a first trajectory and a second trajectory
  • the first trajectory is a trajectory between the trajectory point with the mth largest timestamp and the trajectory point with the largest timestamp
  • the second track is a track other than the first track in the track of the target object, and the display mode of the first track is different from the display mode of the second track;
  • the m is equal to or greater than A positive integer of 2.
  • the first three-dimensional model includes a first floor and a second floor, the height of the first floor is different from the height of the second floor, and the trajectory of the target object is in the On the first floor, the device further includes: a display unit configured to display the second floor in the first three-dimensional model when it is determined that the target object appears on the second floor.
  • the acquisition unit is further configured to acquire a first image containing the target object; the processing unit is further It is configured to determine that the second image contains the target object by comparing the first image with a second image, and the second image is collected by a camera on the second floor.
  • the image processing device displays the trajectory of the target object in the first three-dimensional model according to at least one first trajectory point data of the target object in the target scene, which can more intuitively display the trajectory of the target object in the target scene.
  • the functions or modules included in the apparatus provided in the embodiments of the present application can be used to execute the methods described in the above method embodiments, and the specific implementation can refer to the descriptions of the above method embodiments.
  • FIG. 13 is a schematic diagram of a hardware structure of an image processing device provided by an embodiment of the present application.
  • 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 application. It should be understood that in various embodiments of the present application, coupling refers to interconnection in a specific way, including direct connection or indirect connection through other devices, for example, connection through various interfaces, transmission lines, and buses.
  • the processor 21 can be one or more graphics processing units (Graphics Processing Unit, GPU), and in the case where the processor 21 is a GPU, the GPU can 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 application.
  • 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 application.
  • the memory includes but is 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 can be used not only to store relevant instructions, but also to store relevant data, for example, the memory 22 can be used to store the first three-dimensional model and at least one first trajectory point data obtained through the input device 23 , the embodiment of the present application does not limit the specific data stored in the memory.
  • FIG. 13 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 application are included in this within the scope of the application.
  • An embodiment of the present application provides an electronic device, including: a processor, a sending device, an input device, an output device, and a memory, the memory is used to store computer program codes, and the computer program codes include computer instructions.
  • the computer executes the computer instructions
  • the electronic device executes the image processing method as described in any one of the above embodiments.
  • An embodiment of the present application provides a computer-readable storage medium, where 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 The processor executes the image processing method described in any one of the above embodiments.
  • An embodiment of the present application provides a computer program product, the computer program product includes a computer program or an instruction, and when the computer program or instruction is run on an electronic device, the electronic device is made to execute any of the above-mentioned embodiments The image processing method described.
  • Embodiments of the present disclosure also provide another computer program product, including a computer-readable storage medium storing program codes, where instructions included in the program codes can be configured to execute the image processing method described in the above method embodiments.
  • 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 displayed 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 realize the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application 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.
  • 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 transmitted from a website site, computer, server or data center to 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 such as a server or a data center 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.
  • 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: ROM or RAM, a magnetic disk or an optical disk, and other various media that can store program codes.
  • the embodiment of the present application discloses an image processing method, device, equipment, medium and program.
  • the method is executed by an electronic device, and the method includes: acquiring a first three-dimensional model of a target scene and at least one first track point data of a target object in the target scene; according to the at least one first track point data, in The trajectory of the target object is displayed in the first three-dimensional model.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Multimedia (AREA)
  • Processing Or Creating Images (AREA)
  • Image Analysis (AREA)

Abstract

Disclosed in the embodiments of the present application are an image processing method and apparatus, and a device, a medium and a program. The method is executed by an electronic device, and the method comprises: acquiring a first three-dimensional model of a target scene and at least one piece of first trajectory point data of a target object in the target scene; and displaying the trajectory of the target object in the first three-dimensional model according to the at least one piece of first trajectory point data. In this way, the trajectory of a target object in a target scene can be visually presented.

Description

图像处理方法、装置、设备、介质及程序Image processing method, device, equipment, medium and program
相关申请的交叉引用Cross References to Related Applications
本专利申请要求2021年06月29日提交的中国专利申请号为202110728309.2、申请人为西安商汤智能科技有限公司,申请名称为“图像处理方法及装置、电子设备及计算机可读存储介质”的优先权,该申请的全文以引用的方式并入本申请中。This patent application requires that the Chinese patent application number 202110728309.2 submitted on June 29, 2021, the applicant is Xi'an Shangtang Intelligent Technology Co., Ltd., and the application name is "image processing method and device, electronic equipment and computer readable storage medium" priority rights, the entirety of which is incorporated into this application by reference.
技术领域technical field
本申请涉及图像处理技术领域,尤其涉及一种图像处理方法、装置、设备、介质及程序。The present application relates to the technical field of image processing, and in particular to an image processing method, device, equipment, medium and program.
背景技术Background technique
在安防领域,通常会对目标对象的轨迹进行显示,相关人员进而可通过观察目标对象的轨迹分析目标对象的行踪等信息。因此如何提升目标对象的轨迹的显示效果具有非常重要的意义。In the field of security, the trajectory of the target object is usually displayed, and relevant personnel can analyze the whereabouts of the target object and other information by observing the trajectory of the target object. Therefore, how to improve the display effect of the trajectory of the target object is of great significance.
发明内容Contents of the invention
本申请实施例提供一种图像处理方法、装置、设备、介质及程序。Embodiments of the present application provide an image processing method, device, device, medium, and program.
本申请实施例提供了一种图像处理方法,所述方法由电子设备执行,所述方法包括:An embodiment of the present application provides an image processing method, the method is executed by an electronic device, and the method includes:
获取目标场景的第一三维模型和目标对象在所述目标场景内的至少一个第一轨迹点数据;Acquiring a first three-dimensional model of a target scene and at least one first trajectory point data of a target object in the target scene;
依据所述至少一个第一轨迹点数据,在所述第一三维模型内显示所述目标对象的轨迹。A trajectory of the target object is displayed in the first three-dimensional model according to the at least one first trajectory point data.
如此,依据目标对象在目标场景内的至少一个第一轨迹点数据,显示目标对象在第一三维模型中的轨迹,可更直观的展示目标对象在目标场景中的轨迹。In this way, by displaying the trajectory of the target object in the first three-dimensional model according to at least one first trajectory point data of the target object in the target scene, the trajectory of the target object in the target scene can be displayed more intuitively.
在本申请的一些实施例中,所述依据所述至少一个第一轨迹点数据,在所述第一三维模型内显示所述目标对象的轨迹,包括:依据所述至少一个第一轨迹点数据确定所述目标对象的至少一个第一轨迹点;从所述第一三维模型中确定包含所述至少一个第一轨迹点的第一三维区域;在所述第一三维模型内按预定显示方式显示所述第一三维区域,并在所述第一三维区域内显示所述目标对象的轨迹。如此,能够提升目标对象的轨迹的显示效果。In some embodiments of the present application, the displaying the trajectory of the target object in the first three-dimensional model according to the at least one first trajectory point data includes: according to the at least one first trajectory point data Determining at least one first trajectory point of the target object; determining a first three-dimensional area containing the at least one first trajectory point from the first three-dimensional model; displaying in the first three-dimensional model in a predetermined display manner the first three-dimensional area, and display the track of the target object in the first three-dimensional area. In this way, the display effect of the track of the target object can be improved.
在本申请的一些实施例中,所述从所述第一三维模型中确定包含所述至少一个第一轨迹点的第一三维区域,包括:获取所述第一三维区域的尺寸和所述第一三维区域的形状;确定所述至少一个第一轨迹点的质心;将所述质心作为所述第一三维区域的中心,并依据所述第一三维区域的尺寸和所述第一三维区域的形状从所述第一三维模型中确定所述第一三维区域。如此,能够使得第一三维区域包含更多轨迹点。In some embodiments of the present application, the determining the first three-dimensional area containing the at least one first trajectory point from the first three-dimensional model includes: obtaining the size of the first three-dimensional area and the first three-dimensional area The shape of a three-dimensional area; determining the centroid of the at least one first trajectory point; using the centroid as the center of the first three-dimensional area, and according to the size of the first three-dimensional area and the first three-dimensional area A shape determines the first three-dimensional region from the first three-dimensional model. In this way, the first three-dimensional area can contain more trajectory points.
在本申请的一些实施例中,所述至少一个第一轨迹点包括第二轨迹点、第三轨迹点、第四轨迹点、至少一个第五轨迹点,所述第二轨迹点的时间戳、所述第三轨迹点的时间戳、所述第四轨迹点的时间戳、所述至少一个第五轨迹点的时间戳依次减小;所述确定所述至少一个第一轨迹点的质心,包括:在所述第三轨迹点位于第一待确认区域内的情况下,确定所述第一待确认区域的质心作为所述至少一个第一轨迹点的质心,所述第一待确认区域为多边形区域,所述第一待确认区域的顶点为所述第二轨迹点、所述第四轨迹点、所述至少一个第五轨迹点;在所述第三轨迹点位于第一待确认区域外的情况下,确定第二待确认区域的质心作为所述至少一个第一轨迹点的质心,所述第一待确认区域和所述第二待确认区域均为多边形区域,所述第一待确认区域的顶点为所述第二轨迹点、所述第四轨迹点、所述至少一个第五轨迹点,所述第二待确认区域的顶点为所述第二轨迹点、所述第三轨迹点、所述第四轨迹点、所述至少一个第五轨迹点。如此,能够提高至少一个第一轨迹点的质心的准确度。In some embodiments of the present application, the at least one first track point includes a second track point, a third track point, a fourth track point, at least one fifth track point, the timestamp of the second track point, The timestamp of the third trajectory point, the timestamp of the fourth trajectory point, and the timestamp of the at least one fifth trajectory point decrease in sequence; the determination of the centroid of the at least one first trajectory point includes : When the third trajectory point is located in the first region to be confirmed, determine the centroid of the first region to be confirmed as the centroid of the at least one first trajectory point, the first region to be confirmed is a polygon area, the vertices of the first area to be confirmed are the second track point, the fourth track point, and the at least one fifth track point; if the third track point is located outside the first area to be confirmed In this case, the centroid of the second area to be confirmed is determined as the centroid of the at least one first track point, the first area to be confirmed and the second area to be confirmed are both polygonal areas, and the first area to be confirmed is The vertices of the second track point, the fourth track point, and the at least one fifth track point, the vertices of the second area to be confirmed are the second track point, the third track point, The fourth track point, the at least one fifth track point. In this way, the accuracy of the centroid of at least one first trajectory point can be improved.
在本申请的一些实施例中,所述依据所述至少一个第一轨迹点数据确定所述目标对象的至少一个第一轨迹点,包括:确定所述至少一个第一轨迹点数据中时间戳最大的n个轨迹点数据为至少一个有效轨迹点数据;所述n为正整数;依据所述至少一个有效轨迹点数据确定所述目标对象的至少一个第一轨迹点。如此,能够降低数据处理量,提高处理速度。In some embodiments of the present application, the determining the at least one first track point of the target object according to the at least one first track point data includes: determining the maximum time stamp in the at least one first track point data The n pieces of track point data are at least one valid track point data; the n is a positive integer; and at least one first track point of the target object is determined according to the at least one valid track point data. In this way, the amount of data processing can be reduced and the processing speed can be increased.
在本申请的一些实施例中,在所述第一轨迹点数据的数量大于1的情况下,所述获取目标对象在所述目标场景内的至少一个第一轨迹点数据,包括:获取所述目标对象在所述目标场景内的至少两个第二轨迹点数据和距离阈值;确定相邻轨迹点数据集的距离,所述相邻轨迹点数据集包括时间戳相邻的两个所述第二轨迹点数据;在所述距离小于所述距离阈值的情况下,将旧轨迹点数据从所述至少两个第二轨迹点数据中去除,得到所述至少一个第一轨迹点数据,所述旧轨迹点数据为所述相邻轨迹点数据集中时间戳最小的所述第二轨迹点数据;或将所述至少两个第二轨迹点数据作为所述一个以上第 一轨迹点数据。如此,能够减少数据处理量。In some embodiments of the present application, when the number of the first track point data is greater than 1, the acquiring at least one first track point data of the target object in the target scene includes: acquiring the At least two second track point data and a distance threshold of the target object in the target scene; determine the distance between adjacent track point data sets, and the adjacent track point data sets include two of the second track point data sets with adjacent time stamps. Two track point data; when the distance is less than the distance threshold, remove the old track point data from the at least two second track point data to obtain the at least one first track point data, the The old track point data is the second track point data with the smallest time stamp in the adjacent track point data set; or the at least two second track point data are used as the one or more first track point data. In this way, the amount of data processing can be reduced.
在本申请的一些实施例中,所述目标对象的轨迹包括第一轨迹和第二轨迹,所述第一轨迹为时间戳第m大的轨迹点与时间戳最大的轨迹点之间的轨迹,所述第二轨迹为所述目标对象的轨迹中除所述第一轨迹之外的轨迹,所述第一轨迹的显示方式与所述第二轨迹的显示方式不同;所述m为等于或大于2的正整数。如此,通过不同的显示方式第一轨迹和第二轨迹,以区分第一轨迹和第二轨迹,进而可确定目标对象的移动方向。In some embodiments of the present application, the trajectory of the target object includes a first trajectory and a second trajectory, the first trajectory is a trajectory between the trajectory point with the mth largest timestamp and the trajectory point with the largest timestamp, The second track is a track other than the first track in the track of the target object, and the display mode of the first track is different from the display mode of the second track; the m is equal to or greater than A positive integer of 2. In this way, the first trajectory and the second trajectory are displayed in different ways to distinguish the first trajectory from the second trajectory, and then the moving direction of the target object can be determined.
在本申请的一些实施例中,所述第一三维模型包括第一楼层和第二楼层,所述第一楼层的高度和所述第二楼层的高度不同,所述目标对象的轨迹处于所述第一楼层内,所述方法还包括:在确定所述目标对象出现在所述第二楼层的情况下,在所述第一三维模型内显示所述第二楼层。如此,能够提升第一楼层的显示效果。In some embodiments of the present application, the first three-dimensional model includes a first floor and a second floor, the height of the first floor is different from the height of the second floor, and the trajectory of the target object is in the On the first floor, the method further includes: displaying the second floor in the first three-dimensional model when it is determined that the target object appears on the second floor. In this way, the display effect of the first floor can be improved.
在本申请的一些实施例中,所述确定所述目标对象出现在所述第二楼层之前,所述方法还包括:获取包含所述目标对象的第一图像;所述确定所述目标对象出现在所述第二楼层,包括:通过将所述第一图像与第二图像进行比对确定所述第二图像包含所述目标对象,所述第二图像由所述第二楼层的摄像头采集得到。如此,能够高效地确定目标对象的出现位置。In some embodiments of the present application, the method of determining that the target object appears before the second floor further includes: acquiring a first image containing the target object; determining that the target object appears On the second floor, comprising: determining that the second image contains the target object by comparing the first image with a second image, the second image being collected by a camera on the second floor . In this way, the appearance position of the target object can be determined efficiently.
以下装置、电子设备等的效果描述参见上述图像处理方法的说明。For the effect description of the following devices, electronic equipment, etc., please refer to the description of the above-mentioned image processing method.
本申请实施例提供了一种图像处理装置,所述装置包括:An embodiment of the present application provides an image processing device, the device comprising:
获取单元,配置为获取目标场景的第一三维模型和目标对象在所述目标场景内的至少一个第一轨迹点数据;An acquisition unit configured to acquire a first three-dimensional model of a target scene and at least one first trajectory point data of a target object in the target scene;
处理单元,配置为依据所述至少一个第一轨迹点数据,在所述第一三维模型内显示所述目标对象的轨迹。A processing unit configured to display the trajectory of the target object in the first three-dimensional model according to the at least one first trajectory point data.
在本申请的一些实施例中,所述处理单元,包括:第一处理子单元,配置为依据所述至少一个第一轨迹点数据确定所述目标对象的至少一个第一轨迹点;第二处理子单元,配置为从所述第一三维模型中确定包含所述至少一个第一轨迹点的第一三维区域;第三处理子单元,配置为在所述第一三维模型内按预定显示方式显示所述第一三维区域,并在所述第一三维区域内显示所述目标对象的轨迹。In some embodiments of the present application, the processing unit includes: a first processing subunit configured to determine at least one first track point of the target object according to the at least one first track point data; the second processing A subunit configured to determine a first three-dimensional region containing the at least one first trajectory point from the first three-dimensional model; a third processing subunit configured to display in a predetermined display manner in the first three-dimensional model the first three-dimensional area, and display the track of the target object in the first three-dimensional area.
在本申请的一些实施例中,所述第二处理子单元,还配置为获取所述第一三维区域的尺寸和所述第一三维区域的形状;确定所述至少一个第一轨迹点的质心;将所述质心作为所述第一三维区域的中心,并依据所述第一三维区域的尺寸和所述第一三维区域的形状从所述第一三维模型中确定所述第一三维区域。In some embodiments of the present application, the second processing subunit is further configured to obtain the size of the first three-dimensional area and the shape of the first three-dimensional area; determine the centroid of the at least one first trajectory point ; taking the centroid as the center of the first three-dimensional area, and determining the first three-dimensional area from the first three-dimensional model according to the size of the first three-dimensional area and the shape of the first three-dimensional area.
在本申请的一些实施例中,所述至少一个第一轨迹点包括第二轨迹点、第三轨迹点、第四轨迹点、至少一个第五轨迹点,所述第二轨迹点的时间戳、所述第三轨迹点的时间戳、所述第四轨迹点的时间戳、所述至少一个第五轨迹点的时间戳依次减小;所述第二处理子单元,还配置为在所述第三轨迹点位于第一待确认区域内的情况下,确定所述第一待确认区域的质心作为所述至少一个上第一轨迹点的质心,所述第一待确认区域为多边形区域,所述第一待确认区域的顶点为所述第二轨迹点、所述第四轨迹点、所述至少一个第五轨迹点;在所述第三轨迹点位于第一待确认区域外的情况下,确定第二待确认区域的质心作为所述至少一个第一轨迹点的质心,所述第一待确认区域和所述第二待确认区域均为多边形区域,所述第一待确认区域的顶点为所述第二轨迹点、所述第四轨迹点、所述至少一个第五轨迹点,所述第二待确认区域的顶点为所述第二轨迹点、所述第三轨迹点、所述第四轨迹点、所述至少一个第五轨迹点。In some embodiments of the present application, the at least one first track point includes a second track point, a third track point, a fourth track point, at least one fifth track point, the timestamp of the second track point, The timestamp of the third trajectory point, the timestamp of the fourth trajectory point, and the timestamp of the at least one fifth trajectory point decrease in sequence; the second processing subunit is further configured to When the three track points are located in the first area to be confirmed, the centroid of the first area to be confirmed is determined as the centroid of the at least one upper first track point, the first area to be confirmed is a polygonal area, the The vertices of the first area to be confirmed are the second track point, the fourth track point, and the at least one fifth track point; when the third track point is located outside the first area to be confirmed, determine The centroid of the second area to be confirmed is used as the centroid of the at least one first trajectory point, the first area to be confirmed and the second area to be confirmed are both polygonal areas, and the vertex of the first area to be confirmed is the The second track point, the fourth track point, and the at least one fifth track point, the apex of the second area to be confirmed is the second track point, the third track point, the fourth track point trajectory points, the at least one fifth trajectory point.
在本申请的一些实施例中,所述第一处理子单元,还配置为确定所述至少一个第一轨迹点数据中时间戳最大的n个轨迹点数据为至少一个有效轨迹点数据;所述n为正整数;依据所述至少一个有效轨迹点数据确定所述目标对象的至少一个第一轨迹点。In some embodiments of the present application, the first processing subunit is further configured to determine that the n track point data with the largest timestamp in the at least one first track point data are at least one valid track point data; n is a positive integer; at least one first track point of the target object is determined according to the at least one valid track point data.
在本申请的一些实施例中,在所述第一轨迹点数据的数量大于1的情况下,所述获取单元,包括:第一获取子单元,配置为获取所述目标对象在所述目标场景内的至少两个第二轨迹点数据和距离阈值;确定相邻轨迹点数据集的距离,所述相邻轨迹点数据集包括时间戳相邻的两个所述第二轨迹点数据;在所述距离小于所述距离阈值的情况下,将旧轨迹点数据从所述至少两个第二轨迹点数据中去除,得到所述至少一个第一轨迹点数据,所述旧轨迹点数据为所述相邻轨迹点数据集中时间戳最小的所述第二轨迹点数据;或将所述至少两个第二轨迹点数据作为所述一个以上第一轨迹点数据。In some embodiments of the present application, when the number of the first trajectory point data is greater than 1, the acquisition unit includes: a first acquisition subunit configured to acquire the location of the target object in the target scene At least two second track point data and a distance threshold within the distance; determine the distance of the adjacent track point data set, the adjacent track point data set includes the two second track point data with adjacent time stamps; in the When the distance is less than the distance threshold, the old track point data is removed from the at least two second track point data to obtain the at least one first track point data, and the old track point data is the The second track point data with the smallest time stamp in the adjacent track point data sets; or using the at least two second track point data as the one or more first track point data.
在本申请的一些实施例中,所述目标对象的轨迹包括第一轨迹和第二轨迹,所述第一轨迹为时间戳第m大的轨迹点与时间戳最大的轨迹点之间的轨迹,所述第二轨迹为所述目标对象的轨迹中除所述第一轨迹之外的轨迹,所述第一轨迹的显示方式与所述第二轨迹的显示方式不同;所述m为等于或大于2的正整数。In some embodiments of the present application, the trajectory of the target object includes a first trajectory and a second trajectory, the first trajectory is a trajectory between the trajectory point with the mth largest timestamp and the trajectory point with the largest timestamp, The second track is a track other than the first track in the track of the target object, and the display mode of the first track is different from the display mode of the second track; the m is equal to or greater than A positive integer of 2.
在本申请的一些实施例中,所述第一三维模型包括第一楼层和第二楼层,所述第一楼层的高度和所述第二楼层的高度不同,所述目标对象的轨迹处于所述第一楼层内,所述装置,还包括:显示单元,配置为在确定所述目标对象出现在所述第二楼层的情况下,在所述第一三维模型内显示所述第二楼层。In some embodiments of the present application, the first three-dimensional model includes a first floor and a second floor, the height of the first floor is different from the height of the second floor, and the trajectory of the target object is in the On the first floor, the device further includes: a display unit configured to display the second floor in the first three-dimensional model when it is determined that the target object appears on the second floor.
在本申请的一些实施例中,所述确定所述目标对象出现在所述第二楼层之前,所述获取单元,配置为获取包含所述目标对象的第一图像;所述处理单元,还配置为通过将所述第一图像与第二图像进行比对确定所述第二图像包含所述目标对象,所述第二图像由所述第二楼层的摄像头采集得到。In some embodiments of the present application, the determining that the target object appears before the second floor, the acquiring unit is configured to acquire a first image containing the target object; the processing unit is further configured In order to determine that the second image includes the target object by comparing the first image with the second image, the second image is collected by a camera on the second floor.
本申请实施例提供了一种电子设备,包括:处理器和存储器,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,在所述处理器执行所述计算机指令的情况下,所述电子设备执行如上述任一实施例所述的图像处理方法。An embodiment of the present application provides 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 image processing method described in any one of the above embodiments.
本申请实施例提供了另一种电子设备,包括:处理器、发送装置、输入装置、输出装置和存储器,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,在所述处理器执行所述计算机指令的情况下,所述电子设备执行如上述任一实施例所述的图像处理方法。An embodiment of the present application provides another electronic device, including: a processor, a sending device, an input device, an output device, and a memory, the memory is used to store computer program codes, and the computer program codes include computer instructions. When the processor executes the computer instructions, the electronic device executes the image processing method described in any one of the above embodiments.
本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序包括程序指令,在所述程序指令被处理器执行的情况下,使所述处理器执行如上述任一实施例所述的图像处理方法。An embodiment of the present application provides a computer-readable storage medium, where 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 The processor executes the image processing method described in any one of the above embodiments.
本申请实施例提供了一种计算机程序产品,所述计算机程序产品包括计算机程序或指令,在所述计算机程序或指令在电子设备上运行的情况下,使得所述电子设备执行上述任一实施例所述的图像处理方法。An embodiment of the present application provides a computer program product, the computer program product includes a computer program or an instruction, and when the computer program or instruction is run on an electronic device, the electronic device is made to execute any of the above-mentioned embodiments The image processing method described.
本申请实施例至少提供一种图像处理方法、装置、设备、介质及程序,首先,获取目标场景的第一三维模型和目标对象在所述目标场景内的至少一个第一轨迹点数据;然后,依据所述至少一个第一轨迹点数据,在所述第一三维模型内显示所述目标对象的轨迹。如此,能够直观地展示目标对象在目标场景中的轨迹Embodiments of the present application at least provide an image processing method, device, device, medium, and program. First, acquire a first three-dimensional model of a target scene and at least one first trajectory point data of a target object in the target scene; then, A trajectory of the target object is displayed in the first three-dimensional model according to the at least one first trajectory point data. In this way, the trajectory of the target object in the target scene can be intuitively displayed
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本申请实施例。It should be understood that the above general description and the following detailed description are only exemplary and explanatory, rather than limiting the embodiment of the application.
附图说明Description of drawings
为了更清楚地说明本申请实施例或背景技术中的技术方案,下面将对本申请实施例或背景技术中所需要使用的附图进行说明。In order to more clearly illustrate the technical solutions in the embodiment of the present application or the background art, the following will describe the drawings that need to be used in the embodiment of the present application or the background art.
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本申请的实施例,并与说明书一起用于说明本申请的技术方案。The accompanying drawings here are incorporated into the specification and constitute a part of the specification. These drawings show embodiments consistent with the application, and are used together with the description to describe the technical solution of the application.
图1为本申请实施例提供的一种图像处理方法的流程示意图;FIG. 1 is a schematic flow diagram of an image processing method provided in an embodiment of the present application;
图2示出可以应用本申请实施例的图像处理方法的一种系统架构示意图;FIG. 2 shows a schematic diagram of a system architecture to which the image processing method of the embodiment of the present application can be applied;
图3为本申请实施例提供的一种目标对象的轨迹点区域示意图;FIG. 3 is a schematic diagram of a track point area of a target object provided in an embodiment of the present application;
图4为本申请实施例提供的一种目标对象的轨迹点区域示意图;FIG. 4 is a schematic diagram of a track point area of a target object provided in an embodiment of the present application;
图5为本申请实施例提供的一种目标对象的轨迹点区域示意图;FIG. 5 is a schematic diagram of a track point area of a target object provided in an embodiment of the present application;
图6为本申请实施例提供的一种轨迹点之间的轨迹示意图;FIG. 6 is a schematic diagram of a trajectory between trajectory points provided by an embodiment of the present application;
图7为本申请实施例提供的另一种轨迹点之间的轨迹示意图;FIG. 7 is a schematic diagram of another trajectory between trajectory points provided by the embodiment of the present application;
图8为本申请实施例提供的又一种轨迹点之间的轨迹示意图;FIG. 8 is another schematic diagram of a trajectory between trajectory points provided by the embodiment of the present application;
图9为本申请实施例提供的又一种轨迹点之间的轨迹示意图;FIG. 9 is another schematic diagram of a trajectory between trajectory points provided by the embodiment of the present application;
图10为本申请实施例提供的一种在第一三维模型中显示第一楼层的示意图;FIG. 10 is a schematic diagram showing the first floor in the first three-dimensional model provided by the embodiment of the present application;
图11为本申请实施例提供的一种在第一三维模型中显示第二楼层的示意图;Fig. 11 is a schematic diagram showing the second floor in the first three-dimensional model provided by the embodiment of the present application;
图12为本申请实施例提供的一种图像处理装置的结构示意图;FIG. 12 is a schematic structural diagram of an image processing device provided by an embodiment of the present application;
图13为本申请实施例提供的一种图像处理装置的硬件结构示意图。FIG. 13 is a schematic diagram of a hardware structure of an image processing device provided by an embodiment of the present application.
具体实施方式detailed description
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获 得的所有其他实施例,都属于本申请保护的范围。In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiment of the application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiment of the application. Obviously, the described embodiment is only It is a part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。The terms "first", "second" and the like in the specification and claims of the present application 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 comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, 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 application, "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 application. 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.
相关技术中,物理世界结构化信息在数字世界更直观的展现对于客户实际业务工作来说有非常重要的价值和意义,对楼宇中人事地物多方面信息在三维(3Dimension,3D)数字世界进行数字孪生;其中,目标轨迹是最为关注的方面,基于对楼宇内部摄像头的视频信息的分析和提取,结合内部的路网信息,实现对人员目标的轨迹进行实时获取和显示,并结合3D楼宇模型的渲染实现楼层拆解的效果。In related technologies, the more intuitive display of structured information in the physical world in the digital world is of great value and significance to the actual business work of customers, and the multi-faceted information of personnel, ground and objects in buildings can be carried out in the 3D (3Dimension, 3D) digital world. Digital twin; Among them, the target trajectory is the most concerned aspect. Based on the analysis and extraction of the video information of the camera inside the building, combined with the internal road network information, the trajectory of the personnel target can be acquired and displayed in real time, combined with the 3D building model The rendering of the floor achieves the effect of dismantling the floor.
本申请实施例的执行主体为图像处理装置,其中,图像处理装置可以是任意一种可执行本申请方法实施例所公开的技术方案的电子设备。在本申请的一些实施例中,图像处理装置可以是以下中的一种:手机、计算机、平板电脑、可穿戴智能设备。The execution subject of the embodiment of the present application is an image processing device, wherein the image processing device may be any electronic device capable of executing the technical solutions disclosed in the method embodiments of the present application. In some embodiments of the present application, the image processing device may be one of the following: a mobile phone, a computer, a tablet computer, and a wearable smart device.
应理解,本申请方法实施例还可以通过处理器执行计算机程序代码的方式实现。下面结合本申请实施例中的附图对本申请实施例进行描述。请参阅图1,图1是本申请实施例提供的一种图像处理方法的流程示意图。It should be understood that the method embodiments of the present application may also be implemented in a manner in which a processor executes computer program codes. Embodiments of the present application are described below with reference to the drawings in the embodiments of the present application. Please refer to FIG. 1 . FIG. 1 is a schematic flowchart of an image processing method provided in an embodiment of the present application.
101、获取目标场景的第一三维模型和目标对象在目标场景内的至少一个第一轨迹点数据。101. Acquire a first three-dimensional model of a target scene and at least one first track point data of a target object in the target scene.
本申请实施例中,目标场景可以是任意场景。例如,目标场景为楼宇内部;又例如,目标场景为地下停车场;再例如,目标场景为校园;再例如,目标场景是商场内的场景。In this embodiment of the present application, the target scene may be any scene. For example, the target scene is inside a building; for another example, the target scene is an underground parking lot; for another example, the target scene is a campus; for another example, the target scene is a scene in a shopping mall.
本申请实施例中,三维模型(包括第一三维模型,以及下文将要提及的第二三维模型)可以是计算机辅助设计(Computer Aided Design,CAD)三维模型,三维模型也可以是三维凸包,三维模型也可以是三维点云。In the embodiment of the present application, the three-dimensional model (including the first three-dimensional model and the second three-dimensional model to be mentioned below) can be a computer-aided design (Computer Aided Design, CAD) three-dimensional model, and the three-dimensional model can also be a three-dimensional convex hull, A 3D model can also be a 3D point cloud.
本申请实施例中,目标对象可以是任意物体。在本申请的一些实施例中,目标对象包括以下中的一个:人物、车辆、机器人。In this embodiment of the present application, the target object may be any object. In some embodiments of the present application, the target object includes one of the following: people, vehicles, and robots.
本申请实施例中,第一轨迹点数据的数量可以是1个,也可以大于1个。第一轨迹点数据包括位置和时间戳。第一轨迹点数据的位置为第一三维模型的坐标系下的位置,即第一轨迹点数据的位置为三维坐标。In this embodiment of the present application, the number of the first track point data may be one or greater than one. The first track point data includes a location and a time stamp. The position of the first track point data is a position in the coordinate system of the first three-dimensional model, that is, the position of the first track point data is a three-dimensional coordinate.
例如,目标对象的至少一个第一轨迹点数据包括第一轨迹点数据a。若第一轨迹点数据a包括A点和时间戳t1。依据第一轨迹点数据可确定目标对象在t1出现在A点。For example, at least one first track point data of the target object includes first track point data a. If the first track point data a includes point A and time stamp t1. According to the first track point data, it can be determined that the target object appears at point A at t1.
在本申请的一些实施例中,图像处理装置将用户通过输入组件输入的目标场景的三维模型作为第一三维模型。上述输入组件包括:键盘、鼠标、触控屏、触控板和音频输入器。In some embodiments of the present application, the image processing device uses the 3D model of the target scene input by the user through the input component as the first 3D model. The above-mentioned input components include: a keyboard, a mouse, a touch screen, a touch pad and an audio input device.
在本申请的一些实施例中,图像处理装置接收终端发送的目标场景的三维模型作为第一三维模 型。上述终端可以是以下任意一种:手机、计算机、平板电脑、服务器。In some embodiments of the present application, the image processing apparatus receives the 3D model of the target scene sent by the terminal as the first 3D model. The above-mentioned terminal can be any of the following: mobile phone, computer, tablet computer, server.
在本申请的一些实施例中,图像处理装置包括激光雷达。图像处理装置通过激光雷达扫描目标场景,得到目标场景的三维模型作为第一三维模型。In some embodiments of the present application, the image processing device includes lidar. The image processing device scans the target scene through the laser radar, and obtains a 3D model of the target scene as a first 3D model.
在本申请的一些实施例中,图像处理装置接收用户通过输入组件输入的轨迹点数据,以得到目标对象在目标场景内的至少一个第一轨迹点数据。In some embodiments of the present application, the image processing device receives the track point data input by the user through the input component, so as to obtain at least one first track point data of the target object in the target scene.
在本申请的一些实施例中,图像处理装置接收终端发送的轨迹点数据,以得到目标对象在目标场景内的至少一个第一轨迹点数据。In some embodiments of the present application, the image processing apparatus receives the track point data sent by the terminal to obtain at least one first track point data of the target object in the target scene.
在本申请的一些实施例中,图像处理装置获取目标对象在全球定位系统坐标系下的至少一个待转换轨迹点数据和坐标转换关系;其中,坐标转换关系为全球定位系统的坐标系与第一三维模型的坐标系之间的转换关系。图像处理装置依据坐标转换关系,将目标对象在全球定位系统坐标系下的至少一个待转换轨迹点数据转换为,目标对象在第一三维模型中的至少一个第一轨迹点数据,得到目标对象在目标场景内的至少一个第一轨迹点数据。In some embodiments of the present application, the image processing device acquires at least one track point data to be converted and the coordinate conversion relationship of the target object in the global positioning system coordinate system; wherein, the coordinate conversion relationship is the coordinate system of the global positioning system and the first The conversion relationship between the coordinate systems of the 3D model. The image processing device converts at least one trajectory point data to be converted of the target object in the global positioning system coordinate system into at least one first trajectory point data of the target object in the first three-dimensional model according to the coordinate transformation relationship, and obtains the target object in the first three-dimensional model. At least one first track point data in the target scene.
应理解,在本申请实施例中,获取目标场景的第一三维模型和获取目标对象在目标场景内的至少一个第一轨迹点数据可以分开执行,也可以同时执行。It should be understood that, in this embodiment of the present application, acquiring the first 3D model of the target scene and acquiring at least one first trajectory point data of the target object in the target scene may be performed separately, or may be performed simultaneously.
102、依据至少一个第一轨迹点数据,在第一三维模型内显示目标对象的轨迹。102. Display the trajectory of the target object in the first three-dimensional model according to at least one first trajectory point data.
图像处理装置按时间戳的大小依次将目标对象在目标场景内的第一轨迹点数据连接,得到目标对象在第一三维模型中的轨迹,并在第一三维模型中显示该轨迹。The image processing device sequentially connects the first trajectory point data of the target object in the target scene according to the size of the time stamp, obtains the trajectory of the target object in the first 3D model, and displays the trajectory in the first 3D model.
例如,目标对象的第一轨迹点数据包括:轨迹点数据a、轨迹点数据b、轨迹点数据c;其中,轨迹点数据a包括位置A和时间戳t1,轨迹点数据b包括位置B和时间戳t2,轨迹点数据c包括位置C和时间戳t3。For example, the first track point data of the target object includes: track point data a, track point data b, and track point data c; wherein, track point data a includes position A and timestamp t1, and track point data b includes position B and time Stamp t2, track point data c includes position C and time stamp t3.
若t1早于t2,t2早于t3,那么目标对象在第一三维模型内的轨迹为目标对象在t1出现在位置A,并在t2出现在位置B、在t3出现在位置C。If t1 is earlier than t2, and t2 is earlier than t3, then the trajectory of the target object in the first three-dimensional model is that the target object appears at position A at t1, appears at position B at t2, and appears at position C at t3.
本申请实施例中,图像处理装置依据目标对象在目标场景内的至少一个第一轨迹点数据,显示目标对象在第一三维模型中的轨迹,可更直观的展示目标对象在目标场景中的轨迹。In the embodiment of the present application, the image processing device displays the trajectory of the target object in the first three-dimensional model based on at least one first trajectory point data of the target object in the target scene, which can more intuitively display the trajectory of the target object in the target scene .
图2示出可以应用本申请实施例的图像处理方法的一种系统架构示意图;如图2所示,该系统架构中包括:获取终端201、网络202和确定终端203。为实现支撑一个示例性应用,获取终端201和确定终端203通过网络202建立通信连接,获取终端201通过网络202向确定终端203上报目标场景的第一三维模型和目标对象在目标场景内的至少一个第一轨迹点数据,确定终端203响应于目标场景的第一三维模型和目标对象在目标场景内的至少一个第一轨迹点数据,并依据至少一个第一轨迹点数据,在第一三维模型内显示目标对象的轨迹。最后,确定终端203将目标对象的轨迹上传至网络202,并通过网络202发送给获取终端201。FIG. 2 shows a schematic diagram of a system architecture to which the image processing method of the embodiment of the present application can be applied; as shown in FIG. 2 , the system architecture includes: an acquisition terminal 201 , a network 202 and a determination terminal 203 . In order to support an exemplary application, the acquisition terminal 201 and the determination terminal 203 establish a communication connection through the network 202, and the acquisition terminal 201 reports at least one of the first three-dimensional model of the target scene and the target object in the target scene to the determination terminal 203 through the network 202. The first track point data, determining that the terminal 203 responds to the first three-dimensional model of the target scene and at least one first track point data of the target object in the target scene, and according to the at least one first track point data, in the first three-dimensional model Displays the trajectory of the target object. Finally, the determination terminal 203 uploads the track of the target object to the network 202 and sends it to the acquisition terminal 201 through the network 202 .
作为示例,获取终端201可以包括图像采集设备,确定终端203可以包括具有视觉信息处理能力的视觉处理设备或远程服务器。网络202可以采用有线或无线连接方式。其中,当确定终端203为视觉处理设备时,获取终端201可以通过有线连接的方式与视觉处理设备通信连接,例如通过总线进行数据通信;当确定终端203为远程服务器时,获取终端201可以通过无线网络与远程服务器进行数据交互。As an example, the acquisition terminal 201 may include an image acquisition device, and the determination terminal 203 may include a visual processing device or a remote server capable of processing visual information. The network 202 may be connected in a wired or wireless manner. Wherein, when it is determined that the terminal 203 is a visual processing device, the acquisition terminal 201 can communicate with the visual processing device through a wired connection, such as performing data communication through a bus; Data exchange between the network and the remote server.
或者,在一些场景中,获取终端201可以是带有视频采集模组的视觉处理设备,可以是带有摄像头的主机。这时,本公开实施例的图像处理方法可以由获取终端201执行,上述系统架构可以不包含网络202和确定终端203。Or, in some scenarios, the acquisition terminal 201 may be a vision processing device with a video capture module, or a host with a camera. At this time, the image processing method of the embodiment of the present disclosure may be executed by the acquisition terminal 201 , and the above-mentioned system architecture may not include the network 202 and the determination terminal 203 .
在本申请的一些实施例中,图像处理装置在执行步骤102的过程中可以执行以下步骤:In some embodiments of the present application, the image processing device may perform the following steps during the execution of step 102:
步骤1、依据至少一个第一轨迹点数据确定目标对象的至少一个第一轨迹点。 Step 1. Determine at least one first track point of the target object according to at least one first track point data.
本申请实施例中,轨迹点为目标对象在目标场景内出现过的点,轨迹点具有时间戳。图像处理装置可依据第一轨迹点数据中的位置确定轨迹点的位置,并依据第一轨迹点数据中的时间戳确定轨迹点的时间戳。例如,第一轨迹点数据a包括A点和时间戳t1。此时,依据第一轨迹点数据a确定的轨迹点为A点,且该轨迹点的时间戳为t1。In the embodiment of the present application, the track point is a point where the target object has appeared in the target scene, and the track point has a time stamp. The image processing device may determine the position of the track point according to the position in the first track point data, and determine the time stamp of the track point according to the time stamp in the first track point data. For example, the first track point data a includes point A and time stamp t1. At this time, the track point determined according to the first track point data a is point A, and the time stamp of the track point is t1.
图像处理装置依据一个第一轨迹点数据可得到一个第一轨迹点,对应地,依据至少一个第一轨迹点数据可得到至少一个第一轨迹点。The image processing device can obtain a first trajectory point according to a first trajectory point data, and correspondingly, can obtain at least one first trajectory point according to at least one first trajectory point data.
步骤2、从第一三维模型中确定包含至少一个第一轨迹点的第一三维区域。 Step 2. Determine a first three-dimensional area including at least one first trajectory point from the first three-dimensional model.
由于目标场景的面积可能较大,为更好的显示目标对象在目标场景内的轨迹,可着重显示目标对象所出现过的区域。因此,在第一三维模型内显示目标对象的轨迹之前,可从第一三维模型中确定目标对象所出现过的区域。Since the area of the target scene may be large, in order to better display the track of the target object in the target scene, the area where the target object has appeared may be emphatically displayed. Therefore, before the track of the target object is displayed in the first 3D model, the area where the target object has appeared can be determined from the first 3D model.
在本申请的一些实施例中,图像处理装置将包含目标对象的至少一个第一轨迹点的区域作为目标对象出现过的区域,并从第一三维模型中确定包含目标对象的至少一个第一轨迹点的区域,得到第一三维区域。In some embodiments of the present application, the image processing device takes the area containing at least one first trajectory point of the target object as the area where the target object has appeared, and determines the at least one first trajectory containing the target object from the first three-dimensional model The area of points to get the first three-dimensional area.
步骤3、在第一三维模型内按预定显示方式显示第一三维区域,并在第一三维区域内显示目标对象的轨迹。Step 3: Displaying the first three-dimensional area in the first three-dimensional model according to a predetermined display manner, and displaying the trajectory of the target object in the first three-dimensional area.
本申请实施例中,预定显示方式即为着重显示第一三维区域的显示方式。在第一三维模型内突出显示第一三维区域,指第一三维区域的显示方式与非第一三维区域的显示方式不同;其中,非第一三维区域包括第一三维模型中除第一三维区域之外的区域。在本申请的一些实施例中,预定显示方式包括以下中的一种或一种以上:颜色突出显示、高亮显示、悬浮显示。In the embodiment of the present application, the predetermined display mode is a display mode emphatically displaying the first three-dimensional region. Highlighting the first three-dimensional area in the first three-dimensional model means that the display mode of the first three-dimensional area is different from that of the non-first three-dimensional area; wherein, the non-first three-dimensional area includes the first three-dimensional area in the first three-dimensional model except the first three-dimensional area outside the area. In some embodiments of the present application, the predetermined display manner includes one or more of the following: color highlighting, highlighting, and hovering.
在本申请的一些实施例中,预定显示方式包括颜色突出显示。图像处理装置将非第一三维区域转换为灰度图像,并保留第一三维区域的色彩,以实现突出显示第一三维区域。在第一三维模型内突出显示第一三维区域的显示效果即为,第一三维区域为彩色图像,非第一三维区域为黑白图像。In some embodiments of the present application, the predetermined display manner includes color highlighting. The image processing device converts the non-first three-dimensional area into a grayscale image, and retains the color of the first three-dimensional area, so as to highlight the first three-dimensional area. The display effect of highlighting the first three-dimensional area in the first three-dimensional model is that the first three-dimensional area is a color image, and the non-first three-dimensional area is a black and white image.
在本申请的一些实施例中,预定显示方式包括高亮显示。图像处理装置对第一三维区域进行高亮显示,以实现突出显示第一三维区域。In some embodiments of the present application, the predetermined display manner includes highlight display. The image processing device highlights the first three-dimensional area, so as to realize highlighting the first three-dimensional area.
在本申请的一些实施例中,预定显示方式包括悬浮显示。第一三维模型包括抬头显示(Head Up Display,HUD)层,图像处理装置从HUD层中确定与第一三维区域对应的显示区域,作为悬浮显示区域。图像处理装置在悬浮显示区域显示第一三维区域。In some embodiments of the present application, the predetermined display manner includes floating display. The first three-dimensional model includes a head-up display (Head Up Display, HUD) layer, and the image processing device determines a display area corresponding to the first three-dimensional area from the HUD layer as a floating display area. The image processing device displays the first three-dimensional area in the floating display area.
图像处理装置在突出显示第一三维区域的同时,在第一三维区域内显示目标对象的轨迹,由此提升目标对象的轨迹的显示效果。The image processing device displays the track of the target object in the first three-dimensional area while highlighting the first three-dimensional area, thereby improving the display effect of the track of the target object.
在本申请的一些实施例中,图像处理装置通过执行步骤1至步骤3可实现对目标对象的跟随显示。In some embodiments of the present application, the image processing device may implement follow-up display of the target object by performing Step 1 to Step 3 .
例如,目标对象为张三,目标场景为商场。图像处理装置通过执行步骤1至步骤3可依据张三在商场内的实时位置,突出显示张三在商场内的轨迹,以取得对张三在商场内的轨迹进行跟随显示的效果。For example, the target object is Zhang San, and the target scene is a shopping mall. The image processing device can highlight Zhang San's trajectory in the mall according to Zhang San's real-time position in the mall by performing steps 1 to 3, so as to achieve the effect of following and displaying Zhang San's trajectory in the mall.
在本申请的一些实施例中,图像处理装置在执行步骤2的过程中执行以下步骤:In some embodiments of the present application, the image processing device performs the following steps during step 2:
步骤4、获取第一三维区域的尺寸和第一三维区域的形状。Step 4. Obtain the size of the first three-dimensional area and the shape of the first three-dimensional area.
本申请实施例中,第一三维区域的尺寸用于确定第一三维区域的面积。In the embodiment of the present application, the size of the first three-dimensional region is used to determine the area of the first three-dimensional region.
例如,第一三维区域的形状为矩形,第一三维区域的尺寸为长100个像素单位、宽50个像素单位,此时第一三维区域为长100个像素单位、宽50个像素单位的矩形所包围的区域。For example, the shape of the first three-dimensional area is a rectangle, and the size of the first three-dimensional area is a length of 100 pixel units and a width of 50 pixel units. At this time, the first three-dimensional area is a rectangle with a length of 100 pixel units and a width of 50 pixel units. the area surrounded by.
又例如,第一三维区域的形状为圆形,第一三维区域的尺寸为半径50个像素单位,此时第一三维区域为半径为50个像素单位的圆所包围的区域。For another example, the shape of the first three-dimensional area is a circle, and the size of the first three-dimensional area is a radius of 50 pixel units. At this time, the first three-dimensional area is an area surrounded by a circle with a radius of 50 pixel units.
再例如,第一三维区域的形状为等腰梯形,第一三维区域尺寸为上底边为50个像素单位、下底边为80个像素单位、高为30个像素单位,此时第一三维区域为上底边为50个像素单位、下底边为80个像素单位、高为30个像素单位的等腰梯形所包围的区域。For another example, the shape of the first three-dimensional area is an isosceles trapezoid, the size of the first three-dimensional area is 50 pixel units for the upper base, 80 pixel units for the lower base, and 30 pixel units for the height. The area is an area surrounded by an isosceles trapezoid with an upper base of 50 pixel units, a lower base of 80 pixel units, and a height of 30 pixel units.
在本申请的一些实施例中,图像处理装置将用户通过输入组件输入的第一三维区域的尺寸作为第一三维区域的尺寸。In some embodiments of the present application, the image processing device uses the size of the first three-dimensional area input by the user through the input component as the size of the first three-dimensional area.
在本申请的一些实施例中,图像处理装置接收终端发送的第一三维区域的尺寸作为第一三维区域的尺寸。In some embodiments of the present application, the image processing apparatus receives the size of the first three-dimensional area sent by the terminal as the size of the first three-dimensional area.
在本申请的一些实施例中,图像处理装置将用户通过输入组件输入的第一三维区域的形状作为第一三维区域的形状。In some embodiments of the present application, the image processing device uses the shape of the first three-dimensional area input by the user through the input component as the shape of the first three-dimensional area.
在本申请的一些实施例中,图像处理装置接收终端发送的第一三维区域的形状作为第一三维区域的形状。In some embodiments of the present application, the image processing apparatus receives the shape of the first three-dimensional area sent by the terminal as the shape of the first three-dimensional area.
步骤5、确定目标对象的至少一个第一轨迹点的质心。Step 5. Determine the centroid of at least one first trajectory point of the target object.
由于目标对象的轨迹点的分布可能不均匀,确定目标对象的轨迹点的质心可确定目标对象的轨迹点的集中区域。Since the distribution of the track points of the target object may not be uniform, determining the centroid of the track points of the target object may determine a concentration area of the track points of the target object.
例如,图3所示的目标对象的轨迹点区域和图4所示的目标对象的轨迹点区域相同,且图3中的轨迹点的数量与图4中的轨迹点的数量相同。但由于图3中的轨迹点分布与图4中的轨迹点分布不同,在图3和图4中轨迹点的质心的位置不同。For example, the track point area of the target object shown in FIG. 3 is the same as the track point area of the target object shown in FIG. 4 , and the number of track points in FIG. 3 is the same as that in FIG. 4 . However, since the track point distribution in FIG. 3 is different from that in FIG. 4 , the positions of the centroids of the track points in FIG. 3 and FIG. 4 are different.
图3所示的目标对象的轨迹区域中,目标对象的轨迹点分布不均匀,但质心处于轨迹点的集中区域内,即目标对象的轨迹点的质心可确定目标对象的轨迹点的集中区域。In the track area of the target object shown in FIG. 3 , the track points of the target object are distributed unevenly, but the centroid is in the concentration area of the track points, that is, the center of mass of the track points of the target object can determine the concentration area of the track points of the target object.
本申请实施例中,图像处理装置确定目标对象的轨迹点的质心指,确定目标对象的轨迹点的质心在第一三维模型的坐标系下的坐标。In the embodiment of the present application, the image processing device determines the centroid of the trajectory point of the target object, and determines the coordinates of the centroid of the trajectory point of the target object in the coordinate system of the first three-dimensional model.
在本申请的一些实施例中,图像处理装置依据目标对象的轨迹点确定包围目标对象的轨迹点的多边形,其中,该多边形的顶点均为目标对象的轨迹点。图像处理装置确定该多边形的质心,作为目标对象的轨迹点的质心。In some embodiments of the present application, the image processing device determines a polygon surrounding the track points of the target object according to the track points of the target object, wherein vertices of the polygon are all track points of the target object. The image processing device determines the centroid of the polygon as the centroid of the track point of the target object.
步骤6、将质心作为第一三维区域的中心,并依据第一三维区域的尺寸和第一三维区域的形状从第一三维模型中确定第一三维区域。Step 6. Taking the centroid as the center of the first three-dimensional area, and determining the first three-dimensional area from the first three-dimensional model according to the size of the first three-dimensional area and the shape of the first three-dimensional area.
本申请实施例中,第一三维区域的中心可以是第一三维区域的几何中心。由于第一三维区域的面积由第一三维区域的尺寸确定,在第一三维区域的尺寸有限的情况下,第一三维区域的面积也是有限的。在第一三维区域的面积有限的情况下,图像处理装置将质心作为第一三维区域的中心,可使第一三维区域包含更多轨迹点。In this embodiment of the present application, the center of the first three-dimensional area may be the geometric center of the first three-dimensional area. Since the area of the first three-dimensional region is determined by the size of the first three-dimensional region, if the size of the first three-dimensional region is limited, the area of the first three-dimensional region is also limited. When the area of the first three-dimensional region is limited, the image processing device may use the center of mass as the center of the first three-dimensional region, so that the first three-dimensional region may contain more trajectory points.
例如,在图5所示的目标对象的轨迹点区域内,轨迹点的质心处于目标对象的轨迹点的集中区域内,图像处理装置将质心作为第一三维区域的中心,可使第一三维区域与目标对象的轨迹点的集中区域更接近,从而使第一三维区域包含更多轨迹点。For example, in the track point area of the target object shown in Figure 5, the centroid of the track point is in the concentrated area of the track point of the target object, and the image processing device uses the centroid as the center of the first three-dimensional area, so that the first three-dimensional area The concentration area of the track points is closer to the target object, so that the first three-dimensional area contains more track points.
在本申请的一些实施例中,假设第一三维区域的形状为矩形。在图5中,若将质心作为第一三维区域的中心,可依据第一三维区域的面积确定质心区域,此时质心区域包含7个轨迹点(即轨迹点A、轨迹点B、轨迹点C、轨迹点D、轨迹点E、轨迹点F、轨迹点G)。若将目标对象的轨迹点区域的中心作为第一三维区域的中心,可依据第一三维区域的面积确定中心区域,此时中心区域包含1个轨迹点(即轨迹点F)。In some embodiments of the present application, it is assumed that the shape of the first three-dimensional region is a rectangle. In Fig. 5, if the centroid is used as the center of the first three-dimensional area, the centroid area can be determined according to the area of the first three-dimensional area, and the centroid area now includes seven trajectory points (i.e., trajectory point A, trajectory point B, and trajectory point C , track point D, track point E, track point F, track point G). If the center of the track point area of the target object is taken as the center of the first three-dimensional area, the center area can be determined according to the area of the first three-dimensional area, and the center area includes one track point (ie track point F).
也就是说,在第一三维区域的面积确定的情况下,将质心作为第一三维区域的中心,第一三维区域包含7个轨迹点,而将目标对象的轨迹点区域的中心作为第一三维区域的中心,第一三维区域包含1个轨迹点。显然将质心作为第一三维区域的中心,可使第一三维区域包含更多的轨迹点。That is to say, when the area of the first three-dimensional area is determined, the center of mass is taken as the center of the first three-dimensional area, the first three-dimensional area contains 7 track points, and the center of the track point area of the target object is taken as the first three-dimensional area The center of the region, the first three-dimensional region contains 1 trajectory point. Obviously, taking the centroid as the center of the first three-dimensional area can make the first three-dimensional area contain more trajectory points.
在确定第一三维区域的中心后,图像处理装置依据中心、第一三维区域的尺寸和第一三维区域的形状,可从第一三维模型中确定第一三维区域。After determining the center of the first three-dimensional area, the image processing device may determine the first three-dimensional area from the first three-dimensional model according to the center, the size of the first three-dimensional area, and the shape of the first three-dimensional area.
图像处理装置进而将第一三维区域作为第一三维区域,可使第一三维区域包含更多目标对象的轨迹点。这样,图像处理装置在显示第一三维区域的同时显示目标对象的轨迹,可提高显示效果。The image processing device further uses the first three-dimensional area as the first three-dimensional area, so that the first three-dimensional area includes more track points of the target object. In this way, the image processing device displays the track of the target object while displaying the first three-dimensional area, which can improve the display effect.
在本申请的一些实施例中,至少一个第一轨迹点包括第二轨迹点、第三轨迹点、第四轨迹点、至少一个第五轨迹点。In some embodiments of the present application, at least one first track point includes a second track point, a third track point, a fourth track point, and at least one fifth track point.
在该种实施方式中,第二轨迹点的时间戳、第三轨迹点的时间戳、第四轨迹点的时间戳、至少一个上第五轨迹点的时间戳依次减小。In this implementation manner, the time stamp of the second track point, the time stamp of the third track point, the time stamp of the fourth track point, and the time stamp of at least one upper fifth track point decrease in sequence.
例如,至少一个第一轨迹点包括:轨迹点a、轨迹点b、轨迹点c、轨迹点d;其中,轨迹点a的时间戳早于轨迹点b的时间戳,轨迹点b的时间戳早于轨迹点c的时间戳,轨迹点d的时间戳早于轨迹点c的时间戳。此时,轨迹点d为第二轨迹点,轨迹点c为第三轨迹点,轨迹点b为第四轨迹点,轨迹点a为第五轨迹点,即第五轨迹点的数量为1。For example, at least one first track point includes: track point a, track point b, track point c, and track point d; wherein, the time stamp of track point a is earlier than the time stamp of track point b, and the time stamp of track point b is earlier The time stamp of track point d is earlier than the time stamp of track point c. At this time, track point d is the second track point, track point c is the third track point, track point b is the fourth track point, and track point a is the fifth track point, that is, the number of fifth track points is one.
例如,至少一个第一轨迹点包括:轨迹点a、轨迹点b、轨迹点c、轨迹点d、轨迹点e;其中, 轨迹点a的时间戳早于轨迹点b的时间戳,轨迹点b的时间戳早于轨迹点c的时间戳,轨迹点d的时间戳早于轨迹点c的时间戳,轨迹点e的时间戳早于轨迹点d的时间戳。此时,轨迹点e为第二轨迹点,轨迹点d为第三轨迹点,轨迹点c为第四轨迹点,轨迹点a和轨迹点b均为第五轨迹点,即第五轨迹点的数量为2。For example, at least one first trajectory point includes: trajectory point a, trajectory point b, trajectory point c, trajectory point d, and trajectory point e; wherein, the timestamp of trajectory point a is earlier than the timestamp of trajectory point b, and trajectory point b The timestamp of the trajectory point is earlier than the timestamp of the trajectory point c, the timestamp of the trajectory point d is earlier than the timestamp of the trajectory point c, and the timestamp of the trajectory point e is earlier than the timestamp of the trajectory point d. At this time, track point e is the second track point, track point d is the third track point, track point c is the fourth track point, track point a and track point b are the fifth track point, that is, the fifth track point The quantity is 2.
在该实施例中,图像处理装置在执行步骤5的过程中执行以下步骤:In this embodiment, the image processing device performs the following steps during step 5:
步骤7、在第三轨迹点位于第一待确认区域内的情况下,确定第一待确认区域的质心作为至少一个第一轨迹点的质心,第一待确认区域为多边形区域,第一待确认区域的顶点为第二轨迹点、第四轨迹点、至少一个第五轨迹点。Step 7. When the third trajectory point is located in the first region to be confirmed, determine the centroid of the first region to be confirmed as the centroid of at least one first trajectory point. The first region to be confirmed is a polygonal region, and the first region to be confirmed is a polygonal region. The vertices of the region are the second track point, the fourth track point, and at least one fifth track point.
由于至少一个第一轨迹点在时间维度上是不连续的,依据至少一个第一轨迹点得到的轨迹与目标对象的实际轨迹之间存在误差。例如,如图6所示,假设目标对象从轨迹点A移动至轨迹点B的真实轨迹为曲线AB,但图像处理装置在确定轨迹点A的位置和轨迹点B的位置的情况下,依据轨迹点A和轨迹点B得到的轨迹为线段AB。Since the at least one first trajectory point is discontinuous in the time dimension, there is an error between the trajectory obtained according to the at least one first trajectory point and the actual trajectory of the target object. For example, as shown in Figure 6, suppose the real trajectory of the target object moving from trajectory point A to trajectory point B is curve AB, but the image processing device determines the position of trajectory point A and trajectory point B, according to the trajectory The trajectory obtained by point A and trajectory point B is line segment AB.
因此,为使依据至少一个第一轨迹点确定的至少一个第一轨迹点区域包含更多目标对象的实际轨迹,提升对目标对象的轨迹的显示准确度,可将包含至少一个第一轨迹点的凸包作为至少一个第一轨迹点区域。Therefore, in order to make at least one first track point area determined based on at least one first track point contain more actual tracks of the target object and improve the display accuracy of the track of the target object, the area containing at least one first track point can be The convex hull serves as at least one first trajectory point region.
例如,在图7中,轨迹点A、轨迹点B、轨迹点C、轨迹点D和轨迹点E均为至少一个第一轨迹点,其中,轨迹点A的时间戳早于轨迹点B的时间戳,轨迹点B的时间戳早于轨迹点C的时间戳,轨迹点C的时间戳早于轨迹点D的时间戳,轨迹点D的时间戳早于轨迹点E的时间戳。曲线CD为目标对象从轨迹点C移动至轨迹点D的真实轨迹。For example, in Fig. 7, track point A, track point B, track point C, track point D and track point E are at least one first track point, wherein the time stamp of track point A is earlier than the time of track point B The time stamp of track point B is earlier than the time stamp of track point C, the time stamp of track point C is earlier than the time stamp of track point D, and the time stamp of track point D is earlier than the time stamp of track point E. The curve CD is the real trajectory of the target object moving from the trajectory point C to the trajectory point D.
若按轨迹点的时间戳从小到大的顺序依次将轨迹点连接,得到的轨迹点区域为多边形ABCDE。此时,曲线CD位于轨迹点区域外,若将轨迹点区域的质心作为至少一个第一轨迹点的质心,显然会降低至少一个第一轨迹点的质心的准确度。If the track points are connected in ascending order of the time stamps of the track points, the obtained track point area is a polygon ABCDE. At this time, the curve CD is located outside the track point area, and if the centroid of the track point area is used as the centroid of at least one first track point, the accuracy of the centroid of at least one first track point will obviously be reduced.
若依据至少一个第一轨迹点,确定包含至少一个第一轨迹点的凸包,可得到如图8所示的轨迹点区域ABCE。此时,轨迹点区域包含曲线CD,若将轨迹点区域的质心作为至少一个第一轨迹点的质心,可提高至少一个第一轨迹点的质心的准确度。If the convex hull including at least one first trajectory point is determined according to the at least one first trajectory point, the trajectory point area ABCE as shown in FIG. 8 can be obtained. At this time, the track point area includes the curve CD, and if the centroid of the track point area is used as the centroid of the at least one first track point, the accuracy of the centroid of the at least one first track point can be improved.
本申请实施例中,第三轨迹点位于第一待确认区域,说明第一待确认区域为包含至少一个第一轨迹点的凸包区域。此时,图像处理装置将第一待确认区域作为目标对象在第一三维模型内的行踪区域,可提高行踪区域的准确度,进而提升目标对象的轨迹的显示准确度。图像处理装置进而将第一待确认区域的质心作为至少一个第一轨迹点的质心,可提高至少一个第一轨迹点的质心的准确度。In the embodiment of the present application, the third track point is located in the first area to be confirmed, which means that the first area to be confirmed is a convex hull area including at least one first track point. At this time, the image processing device uses the first area to be confirmed as the whereabouts area of the target object in the first three-dimensional model, which can improve the accuracy of the track area, and further improve the display accuracy of the track of the target object. The image processing device further uses the centroid of the first region to be confirmed as the centroid of the at least one first trajectory point, which can improve the accuracy of the centroid of the at least one first trajectory point.
例如,在图8中,轨迹点A和轨迹点B均为第五轨迹点,轨迹点C为第四轨迹点,轨迹点D为第三轨迹点,轨迹点E为第二轨迹点。第一待确认区域为多边形ABCE所包围的区域。由于轨迹点D位于多边形ABCE内,图像处理装置将多边形ABCE的质心作为至少一个第一轨迹点的质心。For example, in FIG. 8 , track point A and track point B are the fifth track point, track point C is the fourth track point, track point D is the third track point, and track point E is the second track point. The first area to be confirmed is the area enclosed by the polygon ABCE. Since the trajectory point D is located within the polygon ABCE, the image processing device takes the centroid of the polygon ABCE as the centroid of at least one first trajectory point.
又例如,在图9中,轨迹点A为第五轨迹点,轨迹点B为第四轨迹点,轨迹点C为第三轨迹点,轨迹点D为第二轨迹点。第一待确认区域为三角形ABD所包围的区域。由于轨迹点C位于三角形ABD内,图像处理装置将三角形ABD的质心作为至少一个第一轨迹点的质心。For another example, in FIG. 9 , track point A is the fifth track point, track point B is the fourth track point, track point C is the third track point, and track point D is the second track point. The first area to be confirmed is the area enclosed by the triangle ABD. Since the trajectory point C is located in the triangle ABD, the image processing device takes the centroid of the triangle ABD as the centroid of at least one first trajectory point.
步骤8、在第三轨迹点位于第一待确认区域外的情况下,确定第二待确认区域的质心作为至少一个第一轨迹点的质心,第一待确认区域和第二待确认区域均为多边形区域,第一待确认区域的顶点为第二轨迹点、第四轨迹点、至少一个第五轨迹点,第二待确认区域的顶点为第二轨迹点、第三轨迹点、第四轨迹点、至少一个第五轨迹点。Step 8. When the third trajectory point is located outside the first region to be confirmed, determine the centroid of the second region to be confirmed as the centroid of at least one first trajectory point, the first region to be confirmed and the second region to be confirmed are both In a polygonal area, the vertices of the first area to be confirmed are the second track point, the fourth track point, and at least one fifth track point, and the vertices of the second area to be confirmed are the second track point, the third track point, and the fourth track point , at least one fifth trajectory point.
第三轨迹点位于第一待确认区域外,说明有轨迹点位于第一待确认区域外,此时若将第一待确认区域作为目标对象在第一三维模型内的轨迹区域具有较大的误差。因此,为降低误差图像处理装置将第二待确认区域作为目标对象在第一三维模型内的轨迹区域,进而将第二待确认区域的质心作为至少一个第一轨迹点的质心,可提高至少一个第一轨迹点的质心的准确度。The third track point is located outside the first area to be confirmed, indicating that some track points are located outside the first area to be confirmed. At this time, if the first area to be confirmed is used as the track area of the target object in the first three-dimensional model, there will be a large error . Therefore, in order to reduce the error, the image processing device takes the second area to be confirmed as the trajectory area of the target object in the first three-dimensional model, and then uses the centroid of the second area to be confirmed as the centroid of at least one first trajectory point, which can improve at least one The accuracy of the centroid of the first trajectory point.
应理解,第二轨迹点、第三轨迹点、第四轨迹点、至少一个第五轨迹点均为示例,其中,第二轨迹点代指至少一个第一轨迹点中时间戳最大的轨迹点,第三轨迹点代指至少一个第一轨迹点中时间戳 次大的轨迹点,第四轨迹点代指至少一个第一轨迹点中时间戳第三大的轨迹点,至少一个第五轨迹点代指至少一个第一轨迹点中时间戳比第四轨迹点的时间戳小的轨迹点。It should be understood that the second track point, the third track point, the fourth track point, and at least one fifth track point are all examples, wherein the second track point refers to the track point with the largest timestamp among the at least one first track point, The third track point refers to the track point with the second largest time stamp among at least one first track point, the fourth track point refers to the track point with the third largest time stamp among at least one first track point, and at least one fifth track point represents Refers to at least one track point of the first track point whose time stamp is smaller than the time stamp of the fourth track point.
在实际应用中,若目标对象的轨迹处于实时更新的状态,那么在已确定时间戳最小的轨迹点与时间戳第三大的轨迹点之间的连接方式的情况下,可依据该种实施方式确定时间戳最大的轨迹点与时间戳第二大的轨迹点相连,或时间戳最大的轨迹点与时间戳第三大的轨迹点相连,进而确定目标对象的轨迹区域。In practical applications, if the trajectory of the target object is in the state of real-time update, then if the connection mode between the trajectory point with the smallest timestamp and the trajectory point with the third largest timestamp has been determined, according to this implementation mode It is determined that the track point with the largest time stamp is connected to the track point with the second largest time stamp, or the track point with the largest time stamp is connected with the track point with the third largest time stamp, so as to determine the track area of the target object.
例如,在t1时刻,至少一个第一轨迹点包括图9所示的轨迹点A、轨迹点B、轨迹点C和轨迹点D,即在t1时刻,轨迹点A为第五轨迹点,轨迹点B为第四轨迹点,轨迹点C为第三轨迹点,轨迹点D为第二轨迹点。在t1时刻,至少一个第一轨迹点区域为图9中的三角形ABD所包围的区域。For example, at t1 moment, at least one first track point includes track point A, track point B, track point C and track point D shown in Figure 9, that is, at t1 moment, track point A is the fifth track point, track point B is the fourth track point, track point C is the third track point, and track point D is the second track point. At time t1, at least one first track point area is the area surrounded by the triangle ABD in FIG. 9 .
经过t2秒,在t2时刻,至少一个第一轨迹点新增图8中的轨迹点E。此时,轨迹点A和轨迹点B均为第五轨迹点,轨迹点C为第四轨迹点,轨迹点D为第三轨迹点,轨迹点E为第二轨迹点。图像处理装置首先确定轨迹点E是与轨迹点D相连还是与轨迹点C相连,在确定轨迹点E与轨迹点C相连的情况下,图像处理装置去除轨迹点C与轨迹点D之间的连线,进而确定至少一个第一轨迹点区域为多边形ABCE所包围的区域。After t2 seconds, at time t2, at least one first track point is added with track point E in FIG. 8 . At this time, track point A and track point B are both the fifth track point, track point C is the fourth track point, track point D is the third track point, and track point E is the second track point. The image processing device first determines whether the track point E is connected to the track point D or the track point C, and when it is determined that the track point E is connected to the track point C, the image processing device removes the connection between the track point C and the track point D. line, and then determine at least one first trajectory point area as the area enclosed by the polygon ABCE.
在本申请的一些实施例中,图像处理装置在执行步骤1的过程中还可以执行以下步骤:In some embodiments of the present application, the image processing device may also perform the following steps during step 1:
步骤9、确定至少一个第一轨迹点数据中时间戳最大的n个轨迹点数据为至少一个有效轨迹点数据。Step 9: Determine the n track point data with the largest time stamp among the at least one first track point data as at least one valid track point data.
由于第一轨迹点数据的数量可能较多,图像处理装置处理所有的第一轨迹点数据将带来较大的数据处理量。考虑到目标对象的轨迹点数据具有时效性,图像处理装置从至少一个第一轨迹点数据中选取时间戳最大的n个轨迹点数据作为至少一个有效轨迹点数据。由此在保证目标对象的轨迹点数据(即第一轨迹点数据)的有效性的同时,减少目标对象的轨迹点数据的数量,进而降低处理目标对象的轨迹点数据所带来的数据处理量。Since there may be a large amount of first track point data, the processing of all the first track point data by the image processing device will bring about a large amount of data processing. Considering that the track point data of the target object has timeliness, the image processing device selects n track point data with the largest time stamp from at least one first track point data as at least one valid track point data. Therefore, while ensuring the validity of the track point data of the target object (ie, the first track point data), the quantity of the track point data of the target object is reduced, thereby reducing the amount of data processing brought by processing the track point data of the target object .
本申请实施例中,n为正整数,n的取值可依据实际需求进行设置。例如,用户希望降低数据处理量,提高处理速度,可将n的值取小,如将n的取值为80;用户希望展示目标对象更多轨迹点数据,可将n的值取大,如n的取值为200。In the embodiment of the present application, n is a positive integer, and the value of n can be set according to actual requirements. For example, if the user wants to reduce the amount of data processing and increase the processing speed, the value of n can be set to a small value, such as setting the value of n to 80; the user wants to display more track point data of the target object, and the value of n can be set to a large value, such as The value of n is 200.
图像处理装置确定至少一个轨迹点数据中时间戳最大的n个轨迹点数据即确定目标对象最近的n个第一轨迹点数据,并将这n个第一轨迹点数据作为有效轨迹点数据,得到至少一个有效轨迹点数据。The image processing device determines the n track point data with the largest timestamp in at least one track point data, that is, determines the n first track point data closest to the target object, and takes the n first track point data as valid track point data, and obtains At least one valid track point data.
例如,假设n=3,至少一个第一轨迹点数据包括轨迹点数据1、轨迹点数据2、轨迹点数据3、轨迹点数据4、轨迹点数据5,其中,轨迹点数据1的时间戳为t1,轨迹点数据2的时间戳为t2,轨迹点数据3的时间戳为t3,轨迹点数据4的时间戳为t4,轨迹点数据5的时间戳为t5。若t1早于t2,t2早于t3,t3早于t4,t4早于t5,则有效轨迹点数据包括轨迹点数据1、轨迹点数据2和轨迹点数据3。For example, assuming n=3, at least one first track point data includes track point data 1, track point data 2, track point data 3, track point data 4, and track point data 5, wherein the timestamp of track point data 1 is t1, the time stamp of track point data 2 is t2, the time stamp of track point data 3 is t3, the time stamp of track point data 4 is t4, and the time stamp of track point data 5 is t5. If t1 is earlier than t2, t2 is earlier than t3, t3 is earlier than t4, and t4 is earlier than t5, the valid track point data includes track point data 1, track point data 2 and track point data 3.
步骤10、依据至少一个有效轨迹点数据确定目标对象的至少一个第一轨迹点。 Step 10. Determine at least one first track point of the target object according to at least one valid track point data.
图像处理装置依据一个有效轨迹点数据中的位置和时间戳,可确定一个有效轨迹点。图像处理装置依据至少一个有效轨迹点数据中的位置和时间戳,可确定至少一个有效轨迹点。在得到至少一个有效轨迹点后,图像处理装置将至少一个有效轨迹点作为至少一个第一轨迹点。The image processing device can determine a valid track point according to the position and time stamp in the valid track point data. The image processing device can determine at least one valid track point according to the position and time stamp in the at least one valid track point data. After obtaining at least one valid trajectory point, the image processing device uses the at least one valid trajectory point as at least one first trajectory point.
例如,至少一个有效轨迹点数据包括轨迹点数据1、轨迹点数据2和轨迹点数据3,轨迹点数据1包括位置1和时间戳t1,轨迹点数据2包括位置2和时间戳t2,轨迹点数据3包括位置3和时间戳t3。图像处理装置依据轨迹点数据1可得到有效轨迹点1;其中,有效轨迹点1为目标对象在t1出现在位置1。图像处理装置依据轨迹点数据2可得到有效轨迹点2,其中,有效轨迹点2为目标对象在t2出现在位置2。图像处理装置依据轨迹点数据3可得到有效轨迹点3,其中,有效轨迹点3为目标对象在t3出现在位置3。For example, at least one valid track point data includes track point data 1, track point data 2 and track point data 3, track point data 1 includes position 1 and time stamp t1, track point data 2 includes position 2 and time stamp t2, track point Data 3 includes position 3 and time stamp t3. The image processing device can obtain an effective trajectory point 1 according to the trajectory point data 1; wherein, the effective trajectory point 1 is that the target object appears at position 1 at t1. The image processing device can obtain the effective trajectory point 2 according to the trajectory point data 2, wherein the effective trajectory point 2 is that the target object appears at the position 2 at t2. The image processing device can obtain the effective trajectory point 3 according to the trajectory point data 3, wherein the effective trajectory point 3 is that the target object appears at the position 3 at t3.
图像处理装置通过执行步骤9和步骤10,可降低数据处理量,提高处理速度。By performing step 9 and step 10, the image processing device can reduce the amount of data processing and increase the processing speed.
在本申请的一些实施例中,目标对象的轨迹包括第一轨迹和第二轨迹,第一轨迹为时间戳第m大的轨迹点与时间戳最大的轨迹点之间的轨迹,第二轨迹为目标对象的轨迹中除第一轨迹之外的轨迹,第一轨迹的显示方式与第二轨迹的显示方式不同。In some embodiments of the present application, the trajectory of the target object includes a first trajectory and a second trajectory, the first trajectory is the trajectory between the trajectory point with the mth largest timestamp and the trajectory point with the largest timestamp, and the second trajectory is Among the tracks of the target object except the first track, the display mode of the first track is different from the display mode of the second track.
本申请实施例中,第一轨迹为时间戳第m大的轨迹点与时间戳最大的轨迹点之间的轨迹,即第一轨迹包括目标对象的轨迹中时间戳最大的m个轨迹点。In the embodiment of the present application, the first trajectory is a trajectory between the trajectory point with the mth largest timestamp and the trajectory point with the largest timestamp, that is, the first trajectory includes the m trajectory points with the largest timestamp in the trajectory of the target object.
在本申请的一些实施例中,m为等于或大于2的正整数。例如,假设m=2,目标对象的轨迹包括轨迹点1、轨迹点2、轨迹点3、轨迹点4、轨迹点5;其中,轨迹点1的时间戳为t1,轨迹点2的时间戳为t2,轨迹点3的时间戳为t3,轨迹点4的时间戳为t4,轨迹点5的时间戳为t5。若t1早于t2,t2早于t3,t3早于t4,t4早于t5,则第一轨迹包括轨迹点1和轨迹点2。In some embodiments of the present application, m is a positive integer equal to or greater than 2. For example, assuming m=2, the trajectory of the target object includes trajectory point 1, trajectory point 2, trajectory point 3, trajectory point 4, and trajectory point 5; wherein, the timestamp of trajectory point 1 is t1, and the timestamp of trajectory point 2 is t2, the time stamp of track point 3 is t3, the time stamp of track point 4 is t4, and the time stamp of track point 5 is t5. If t1 is earlier than t2, t2 is earlier than t3, t3 is earlier than t4, and t4 is earlier than t5, then the first track includes track point 1 and track point 2.
由于轨迹不具备方向信息,为方便用户区分目标对象的移动方向,图像处理装置通过不同的显示方式第一轨迹和第二轨迹,以区分第一轨迹和第二轨迹。Since the trajectory does not have direction information, in order to facilitate the user to distinguish the moving direction of the target object, the image processing device distinguishes the first trajectory from the second trajectory by displaying the first trajectory and the second trajectory in different ways.
在本申请的一些实施例中,显示方式包括以下中的一个:颜色、轨迹线条的虚实、轨迹线条是否携带箭头。In some embodiments of the present application, the display mode includes one of the following: color, whether the trajectory line is virtual or solid, and whether the trajectory line carries an arrow.
在本申请的一些实施例中,在显示方式包括颜色的情况下,图像处理装置以蓝色显示第一轨迹,并以红色显示第二轨迹。这样,用户通过颜色可区分第一轨迹和第二轨迹,进而可确定目标对象的移动方向为从第二轨迹至第一轨迹。In some embodiments of the present application, if the display manner includes color, the image processing device displays the first trajectory in blue, and displays the second trajectory in red. In this way, the user can distinguish the first track from the second track by color, and then can determine that the moving direction of the target object is from the second track to the first track.
在本申请的一些实施例中,在显示方式包括轨迹线条的虚实的情况下,图像处理装置以实线显示第一轨迹,并以虚线显示第二轨迹。这样,用户通过轨迹线条的虚实,区分第一轨迹和第二轨迹,进而可确定目标对象的移动方向。In some embodiments of the present application, when the display mode includes virtual and solid trajectory lines, the image processing device displays the first trajectory as a solid line and displays the second trajectory as a dotted line. In this way, the user distinguishes the first trajectory from the second trajectory through the virtual reality of the trajectory lines, and then can determine the moving direction of the target object.
在本申请的一些实施例中,在显示方式包括轨迹线条是否携带箭头的情况下,图像处理装置以携带箭头的线条显示第一轨迹,且箭头指向时间戳最大的轨迹点,并以不携带箭头的线条显示第二轨迹。这样,用户通过轨迹线条是否携带箭头,区分第一轨迹和第二轨迹,进而可确定目标对象的移动方向。In some embodiments of the present application, when the display method includes whether the trajectory line carries an arrow, the image processing device displays the first trajectory with a line carrying an arrow, and the arrow points to the trajectory point with the largest time stamp, and displays the first trajectory as a line without an arrow. The lines show the second locus. In this way, the user distinguishes the first trajectory from the second trajectory according to whether the trajectory line carries an arrow, and then can determine the moving direction of the target object.
在本申请的一些实施例中,第一三维模型包括第一楼层和第二楼层,第一楼层的高度和第二楼层的高度不同。目标对象的轨迹处于第一楼层内。In some embodiments of the present application, the first three-dimensional model includes a first floor and a second floor, and the height of the first floor is different from that of the second floor. The trajectory of the target object is within the first floor.
本申请实施例中,第一楼层和第二楼层为第一三维模型中的任意两层,且第一楼层和第二楼层的高度不同,即第一楼层和第二楼层为不同的两个楼层。In the embodiment of the present application, the first floor and the second floor are any two floors in the first three-dimensional model, and the heights of the first floor and the second floor are different, that is, the first floor and the second floor are two different floors .
在目标对象的轨迹处于第一楼层内的情况下,图像处理装置在第一三维模型内显示目标对象的轨迹,即在第一楼层内显示目标对象的轨迹,即图像处理装置在显示目标对象的轨迹时,在第一三维模型内显示第一楼层。如,图像处理装置在第一楼层内突出显示第一三维区域,并在第一三维区域内显示目标对象的轨迹。In the case that the trajectory of the target object is on the first floor, the image processing device displays the trajectory of the target object in the first three-dimensional model, that is, the trajectory of the target object is displayed on the first floor, that is, the image processing device displays the trajectory of the target object During trajectory, the first floor is displayed in the first 3D model. For example, the image processing device highlights the first three-dimensional area in the first floor, and displays the track of the target object in the first three-dimensional area.
在本申请的一些实施例中,图像处理装置通过将第一三维模型中除第一楼层之外的楼层隐藏,在第一三维模型中显示第一楼层。In some embodiments of the present application, the image processing device displays the first floor in the first three-dimensional model by hiding floors in the first three-dimensional model except the first floor.
例如,第一三维模型共有五层,第一楼层是第一三维模型中的第四层。图像处理装置可将第一三维模型中的第五层隐藏,进而在显示第一三维模型的外形的同时,显示第一楼层。由于第一楼层为第四层,在显示第一楼层时将遮挡住第一层、第二层和第三层,这样,可避免在显示第一三维模型时,第一层、第二层和第三层对第一楼层的显示所带来的干扰,从而提升第一楼层的显示效果。在本申请的一些实施例中,该显示效果可参见图10。For example, the first three-dimensional model has five floors in total, and the first floor is the fourth floor in the first three-dimensional model. The image processing device may hide the fifth floor in the first three-dimensional model, and then display the first floor while displaying the shape of the first three-dimensional model. Since the first floor is the fourth floor, the first floor, the second floor and the third floor will be covered when the first floor is displayed, so that when the first 3D model is displayed, the first floor, the second floor and the third floor The interference caused by the third floor to the display of the first floor, thereby improving the display effect of the first floor. In some embodiments of the present application, the display effect can be seen in FIG. 10 .
在本申请的一些实施例中,图像处理装置还执行以下步骤:In some embodiments of the present application, the image processing device also performs the following steps:
步骤11、在确定目标对象出现在第二楼层的情况下,在第一三维模型内显示第二楼层。Step 11, in a case where it is determined that the target object appears on the second floor, display the second floor in the first three-dimensional model.
为跟踪显示目标对象的轨迹,在目标对象出现在第二楼层的情况下,图像处理装置应在第一三维模型内显示第二楼层。在本申请的一些实施例中,图像处理装置在确定目标对象出现在第二楼层的情况下,将在第一三维模型内的显示内容由第一楼层切换为第二楼层。In order to track and display the trajectory of the target object, the image processing device should display the second floor in the first three-dimensional model in case the target object appears on the second floor. In some embodiments of the present application, the image processing device switches the displayed content in the first three-dimensional model from the first floor to the second floor when it is determined that the target object appears on the second floor.
例如,如图10所示,图像处理装置在第一三维模型中显示第一楼层,图像处理装置将第一三维模型的显示内容由第一楼层切换为第二楼层可显示图11所示的内容。For example, as shown in Figure 10, the image processing device displays the first floor in the first three-dimensional model, and the image processing device switches the display content of the first three-dimensional model from the first floor to the second floor to display the content shown in Figure 11 .
在本申请的一些实施例中,图像处理装置通过将第一三维模型内的显示内容由第一楼层切换为第二楼层,可提升目标对象的轨迹的显示效果。In some embodiments of the present application, the image processing device can improve the display effect of the trajectory of the target object by switching the display content in the first three-dimensional model from the first floor to the second floor.
在本申请的一些实施例中,图像处理装置在检测到目标对象出现在第二楼层的指令的情况下,确定目标对象出现在第二楼层。In some embodiments of the present application, the image processing device determines that the target object appears on the second floor when an instruction that the target object appears on the second floor is detected.
例如,用户可通过输入组件向图像处理装置输入目标对象出现在第二楼层的指令,图像处理装置在检测到该指令的情况下,确定目标对象出现在第二楼层。For example, the user may input an instruction that the target object appears on the second floor to the image processing device through the input component, and the image processing device determines that the target object appears on the second floor when the instruction is detected.
在本申请的一些实施例中,图像处理装置在确定第二楼层的摄像头所采集到的图像包含目标对象的情况下,确定目标对象出现在第二楼层。In some embodiments of the present application, the image processing device determines that the target object appears on the second floor when it is determined that the image captured by the camera on the second floor contains the target object.
在本申请的一些实施例中,图像处理装置依据目标对象的轨迹和目标对象的移动方向,得到目标对象的预测轨迹。图像处理装置在依据预测轨迹确定目标对象出现在第二楼层的情况下,确定目标对象出现在第二楼层。In some embodiments of the present application, the image processing device obtains the predicted trajectory of the target object according to the trajectory of the target object and the moving direction of the target object. The image processing device determines that the target object appears on the second floor when it is determined according to the predicted trajectory that the target object appears on the second floor.
例如,图像处理装置依据预测轨迹确定目标对象在t2时刻出现在第二楼层,那么图像处理装置确定目标对象在t2时刻出现在第二楼层,进而在t2时刻在第一三维模型内显示第二楼层。For example, the image processing device determines that the target object appears on the second floor at time t2 according to the predicted trajectory, then the image processing device determines that the target object appears on the second floor at time t2, and then displays the second floor in the first three-dimensional model at time t2 .
在本申请的一些实施例中,图像处理装置在确定目标对象出现在第二楼层之前,还执行以下步骤:In some embodiments of the present application, before the image processing device determines that the target object appears on the second floor, the following steps are further performed:
步骤12、获取包含目标对象的第一图像。 Step 12. Acquire the first image containing the target object.
本申请实施例中,目标对象可以是任意物体。在本申请的一些实施例中,目标对象包括以下中的一个:人体、人脸、车辆。In this embodiment of the present application, the target object may be any object. In some embodiments of the present application, the target object includes one of the following: a human body, a human face, and a vehicle.
在本申请的一些实施例中,图像处理装置接收用户通过输入组件输入包含目标对象的图像获取包含目标对象的第一图像。In some embodiments of the present application, the image processing apparatus acquires the first image containing the target object by receiving the user's input of the image containing the target object through the input component.
在本申请的一些实施例中,图像处理装置接收终端发送的包含目标对象的图像获取包含目标对象的第一图像。In some embodiments of the present application, the image processing apparatus receives the image containing the target object sent by the terminal to obtain a first image containing the target object.
在本申请的一些实施例中,图像处理装置装载有摄像头。图像处理装置使用摄像头通过对目标对象进行拍摄得到包含目标对象的第一图像。In some embodiments of the present application, the image processing device is equipped with a camera. The image processing device obtains a first image including the target object by shooting the target object using the camera.
在本申请的一些实施例中,图像处理装置与摄像头之间存在通信连接。摄像头通过对目标对象进行拍摄得到包含目标对象的图像,图像处理装置通过该通信连接从摄像头获取包含目标对象的第一图像。In some embodiments of the present application, there is a communication connection between the image processing device and the camera. The camera captures the target object to obtain an image containing the target object, and the image processing device obtains the first image containing the target object from the camera through the communication connection.
在执行完步骤12后,图像处理装置在通过执行以下步骤确定目标对象出现在第二楼层:After step 12 is executed, the image processing device determines that the target object appears on the second floor by performing the following steps:
步骤13、通过将第一图像与第二图像进行比对确定第二图像包含目标对象,第二图像由第二楼层的摄像头采集得到。Step 13. Determine that the second image contains the target object by comparing the first image with the second image, and the second image is collected by the camera on the second floor.
本申请实施例中,将第一图像与第二图像进行比对指,将第一图像与第二图像进行相似度比较,以确定第二图像中是否包含目标对象。In the embodiment of the present application, comparing the first image with the second image refers to comparing the similarity between the first image and the second image to determine whether the second image contains the target object.
在本申请的一些实施例中,在目标对象为人脸的情况下,图像处理装置通过将第一图像与第二图像进行人脸比对,可确定第二图像是否包含目标对象;In some embodiments of the present application, when the target object is a human face, the image processing device can determine whether the second image contains the target object by comparing the face of the first image with the second image;
在本申请的一些实施例中,在目标对象为人体的情况下,图像处理装置通过将第一图像与第二图像进行人体比对,可确定第二图像是否包含目标对象;In some embodiments of the present application, when the target object is a human body, the image processing device can determine whether the second image contains the target object by comparing the first image with the second image for the human body;
在本申请的一些实施例中,在目标对象为车辆的情况下,图像处理装置通过将第一图像与第二图像进行车辆比对,可确定第二图像是否包含目标对象。In some embodiments of the present application, when the target object is a vehicle, the image processing device can determine whether the second image contains the target object by comparing the first image with the second image for the vehicle.
由于第二图像为第二楼层中的摄像头采集得到的图像,在确定第二图像包含目标对象的情况下,确定目标对象出现在第二楼层。Since the second image is an image collected by the camera on the second floor, if it is determined that the second image contains the target object, it is determined that the target object appears on the second floor.
基于本申请实施例提供的技术方案,本申请实施例还提供了一种应用场景。Based on the technical solution provided by the embodiment of the present application, the embodiment of the present application also provides an application scenario.
为提高社会治安管理能力,维护良好社会治安环境,越来越多的地方布置了摄像头,相关人员在需要找寻目标人物时,可依据监控摄像头采集到的图像确定目标人物的轨迹。为方便用户查看目标人物的轨迹,可在场景中显示目标人物的轨迹。基于本申请实施例提供的技术方案,可在建筑物的三维模型中显示目标人物的轨迹。In order to improve social security management capabilities and maintain a good social security environment, cameras are installed in more and more places. When relevant personnel need to find a target person, they can determine the trajectory of the target person based on the images collected by the surveillance camera. In order to facilitate the user to view the trajectory of the target person, the trajectory of the target person can be displayed in the scene. Based on the technical solutions provided by the embodiments of the present application, the trajectory of the target person can be displayed in the three-dimensional model of the building.
例如,相关人员想要跟踪张三在A大厦内的轨迹,相关人员将张三的人脸图像输入至服务器(即图像处理装置)。服务器进而将张三的人脸图像与A大厦内的摄像头实时采集到的图像进行人脸比对,以确定张三是否出现在A大厦。服务器依据人脸比对结果确定张三在A大厦内的轨迹点数据。如,图像处理装置通过人脸比对结果确定图像a包含张三,而图像a由摄像头b在t1时间采集得到,那么图像处理装置可依据图像a得到一条轨迹点数据,该轨迹点数据包括张三出现在摄像头b所采的位置, 且出现的时间为t1。For example, the relevant personnel want to track Zhang San's track in Building A, and the relevant personnel input Zhang San's face image to the server (ie, the image processing device). The server further compares Zhang San's face image with the image captured by the camera in Building A in real time to determine whether Zhang San appears in Building A. The server determines Zhang San's track point data in Building A according to the face comparison result. For example, the image processing device determines that image a contains Zhang San through the face comparison result, and image a is collected by camera b at time t1, then the image processing device can obtain a track point data according to image a, and the track point data includes Zhang San 3 appears at the position captured by camera b, and the time of appearance is t1.
图像处理装置依据本申请实施例提供的技术方案对张三在A大厦内的轨迹点数据和A大厦的三维模型进行处理,以在A大厦的三维模型内显示张三的轨迹。The image processing device processes Zhang San's trajectory point data in Building A and the 3D model of Building A according to the technical solution provided by the embodiment of the present application, so as to display Zhang San's trajectory in the 3D model of Building A.
在本申请的一些实施例中,为实时获取张三的轨迹,图像处理装置可基于本申请实施例提供的技术方案,在A大厦内突出显示包含张三的轨迹点的第一三维区域,并在第一三维区域内显示张三的轨迹。In some embodiments of the present application, in order to obtain Zhang San's trajectory in real time, the image processing device may highlight the first three-dimensional area containing Zhang San's trajectory points in Building A based on the technical solution provided by the embodiment of the present application, and The trajectory of Zhang San is displayed in the first three-dimensional area.
在本申请的一些实施例中,图像处理装置在确定张三从A大厦的c层移动至d层时,将A大厦内的三维模型内所显示的楼层由c层切换为d层。In some embodiments of the present application, when it is determined that Zhang San moves from floor c to floor d of building A, the image processing device switches the floor displayed in the 3D model of building A from floor c to floor d.
在本申请的一些实施例中,在第一轨迹点数据的数量大于1的情况下,图像处理装置通过执行以下步骤获取目标对象在目标场景内的至少一个第一轨迹点数据:In some embodiments of the present application, when the number of first track point data is greater than 1, the image processing device acquires at least one first track point data of the target object in the target scene by performing the following steps:
步骤14、获取目标对象在目标场景内的至少两个第二轨迹点数据和距离阈值。Step 14, acquiring at least two second track point data and a distance threshold of the target object in the target scene.
本实施方式中,第二轨迹点数据的数量可以是2个,也可以大于2个。第二轨迹点数据包括位置和时间戳。距离阈值为正数,距离阈值的取值可依据实际需求进行设置。In this embodiment, the number of the second trajectory point data may be 2 or greater than 2. The second track point data includes a location and a time stamp. The distance threshold is a positive number, and the value of the distance threshold can be set according to actual requirements.
步骤15、确定相邻轨迹点数据集的距离,相邻轨迹点数据集包括时间戳相邻的两个第二轨迹点数据。Step 15. Determine the distance between adjacent track point data sets, where the adjacent track point data sets include two second track point data with adjacent time stamps.
本实施方式中,相邻轨迹点数据集包括时间戳相邻的两个第二轨迹点数据,相邻轨迹点数据集的距离指,相邻轨迹点数据集中的两个轨迹点数据之间的距离。In this embodiment, the adjacent track point data set includes two second track point data with adjacent time stamps, and the distance between the adjacent track point data sets refers to the distance between the two track point data in the adjacent track point data set. distance.
例如,至少两个第二轨迹点数据包括:轨迹点数据a、轨迹点数据b、轨迹点数据c,其中,轨迹点数据a的时间戳为t1,轨迹点数据b的时间戳为t2,轨迹点数据c的时间戳为t3。若t1大于t2,t2大于t3,则依据至少两个第二轨迹点数据可确定相邻轨迹点数据集A和相邻轨迹点数据集B,其中,相邻轨迹点数据集A包括轨迹点数据a和轨迹点数据b,相邻轨迹点数据集B包括轨迹点数据b和轨迹点数据c。For example, at least two second track point data include: track point data a, track point data b, and track point data c, wherein the time stamp of track point data a is t1, the time stamp of track point data b is t2, and the track The timestamp of point data c is t3. If t1 is greater than t2, and t2 is greater than t3, the adjacent track point data set A and the adjacent track point data set B can be determined based on at least two second track point data, wherein the adjacent track point data set A includes track point data a and track point data b, the adjacent track point data set B includes track point data b and track point data c.
若轨迹点数据a的位置为p1,轨迹点数据b的位置为p2,轨迹点数据c的位置为p3,且p1与p2之间的距离为d1,p2与p3之间的距离为d2,则相邻轨迹点数据集A的距离为d1,相邻轨迹点数据集B的距离为d2。If the position of track point data a is p1, the position of track point data b is p2, the position of track point data c is p3, and the distance between p1 and p2 is d1, and the distance between p2 and p3 is d2, then The distance between the adjacent track point data set A is d1, and the distance between the adjacent track point data set B is d2.
为减少图像处理装置的数据处理量,在对目标对象在场景内的至少一个第二轨迹点数据进行处理之前,可将距离较近的第二轨迹点数据合并。在本申请的一些实施例中,图像处理装置通过将时间戳小的第二轨迹点数据删除,实现对距离较近的第二轨迹点数据的合并。In order to reduce the data processing amount of the image processing device, before processing at least one second trajectory point data of the target object in the scene, the second trajectory point data with a closer distance may be combined. In some embodiments of the present application, the image processing device realizes the merging of the second track point data with a shorter distance by deleting the second track point data with a smaller time stamp.
在本实施方式中,图像处理装置以距离阈值为依据,判断相邻轨迹点数据集的距离是否较近,进而依据判断结果和至少两个第一轨迹点数据得到一个以上第一轨迹点数据。在本申请的一些实施例中,图像处理装置通过执行步骤16和步骤17中的一个步骤,得到一个以上第一轨迹点数据:In this embodiment, the image processing device judges whether the distance between adjacent track point data sets is relatively short based on the distance threshold, and then obtains more than one first track point data based on the judgment result and at least two first track point data. In some embodiments of the present application, the image processing device obtains more than one first track point data by performing one of steps 16 and 17:
步骤16、在距离小于距离阈值的情况下,将旧轨迹点数据从至少两个第二轨迹点数据中去除,得到至少一个第一轨迹点数据,旧轨迹点数据为相邻轨迹点数据集中时间戳最小的第二轨迹点数据。Step 16. When the distance is less than the distance threshold, the old track point data is removed from at least two second track point data to obtain at least one first track point data, and the old track point data is the collection time of adjacent track point data. Poke the smallest second track point data.
步骤17、在距离小于距离阈值的情况下,将至少两个第二轨迹点数据作为一个以上第一轨迹点数据。Step 17. When the distance is less than the distance threshold, use at least two second track point data as more than one first track point data.
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。Those skilled in the art can understand that in the above method of specific implementation, the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process. The specific execution order of each step should be based on its function and possible The inner logic is OK.
上述详细阐述了本申请实施例的方法,下面提供了本申请实施例的装置。The method of the embodiment of the present application has been described in detail above, and the device of the embodiment of the present application is provided below.
请参阅图12,图12为本申请实施例提供的一种图像处理装置的结构示意图,该图像处理装置1包括:获取单元11、处理单元12,其中:Please refer to FIG. 12. FIG. 12 is a schematic structural diagram of an image processing device provided by an embodiment of the present application. The image processing device 1 includes: an acquisition unit 11 and a processing unit 12, wherein:
获取单元11,配置为获取目标场景的第一三维模型和目标对象在所述目标场景内的至少一个第一轨迹点数据;The acquisition unit 11 is configured to acquire a first three-dimensional model of a target scene and at least one first trajectory point data of a target object in the target scene;
处理单元12,配置为依据所述至少一个第一轨迹点数据,在所述第一三维模型内显示所述目标对象的轨迹。The processing unit 12 is configured to display the trajectory of the target object in the first three-dimensional model according to the at least one first trajectory point data.
在本申请的一些实施例中,所述处理单元12,包括:第一处理子单元,配置为依据所述至少一 个第一轨迹点数据确定所述目标对象的至少一个第一轨迹点;第二处理子单元,配置为从所述第一三维模型中确定包含所述至少一个第一轨迹点的第一三维区域;第三处理子单元,配置为在所述第一三维模型内按预定显示方式显示所述第一三维区域,并在所述第一三维区域内显示所述目标对象的轨迹。In some embodiments of the present application, the processing unit 12 includes: a first processing subunit configured to determine at least one first track point of the target object according to the at least one first track point data; The processing subunit is configured to determine from the first three-dimensional model a first three-dimensional area containing the at least one first trajectory point; the third processing subunit is configured to display in a predetermined manner in the first three-dimensional model displaying the first three-dimensional area, and displaying the track of the target object in the first three-dimensional area;
在本申请的一些实施例中,所述第二处理子单元,还配置为获取所述第一三维区域的尺寸和所述第一三维区域的形状;确定所述至少一个第一轨迹点的质心;将所述质心作为所述第一三维区域的中心,并依据所述第一三维区域的尺寸和所述第一三维区域的形状从所述第一三维模型中确定所述第一三维区域。In some embodiments of the present application, the second processing subunit is further configured to obtain the size of the first three-dimensional area and the shape of the first three-dimensional area; determine the centroid of the at least one first trajectory point ; taking the centroid as the center of the first three-dimensional area, and determining the first three-dimensional area from the first three-dimensional model according to the size of the first three-dimensional area and the shape of the first three-dimensional area.
在本申请的一些实施例中,所述至少一个第一轨迹点包括第二轨迹点、第三轨迹点、第四轨迹点、至少一个第五轨迹点,所述第二轨迹点的时间戳、所述第三轨迹点的时间戳、所述第四轨迹点的时间戳、所述一个或一个以上第五轨迹点的时间戳依次减小;所述第二处理子单元,还配置为在所述第三轨迹点位于第一待确认区域内的情况下,确定所述第一待确认区域的质心作为所述至少一个第一轨迹点的质心,所述第一待确认区域为多边形区域,所述第一待确认区域的顶点为所述第二轨迹点、所述第四轨迹点、所述至少一个第五轨迹点;在所述第三轨迹点位于第一待确认区域外的情况下,确定第二待确认区域的质心作为所述至少一个第一轨迹点的质心,所述第一待确认区域和所述第二待确认区域均为多边形区域,所述第一待确认区域的顶点为所述第二轨迹点、所述第四轨迹点、所述至少一个第五轨迹点,所述第二待确认区域的顶点为所述第二轨迹点、所述第三轨迹点、所述第四轨迹点、所述至少一个第五轨迹点。In some embodiments of the present application, the at least one first track point includes a second track point, a third track point, a fourth track point, at least one fifth track point, the timestamp of the second track point, The timestamp of the third trajectory point, the timestamp of the fourth trajectory point, and the timestamp of the one or more fifth trajectory points decrease in sequence; the second processing subunit is further configured to When the third trajectory point is located in the first area to be confirmed, the centroid of the first area to be confirmed is determined as the centroid of the at least one first trajectory point, and the first area to be confirmed is a polygonal area, so The apex of the first area to be confirmed is the second track point, the fourth track point, and the at least one fifth track point; when the third track point is located outside the first area to be confirmed, Determine the centroid of the second area to be confirmed as the centroid of the at least one first track point, the first area to be confirmed and the second area to be confirmed are polygonal areas, and the vertex of the first area to be confirmed is The second track point, the fourth track point, and the at least one fifth track point, the vertices of the second area to be confirmed are the second track point, the third track point, the first Four trajectory points, the at least one fifth trajectory point.
在本申请的一些实施例中,所述第一处理子单元,还配置为确定所述至少一个第一轨迹点数据中时间戳最大的n个轨迹点数据为至少一个有效轨迹点数据;所述n为正整数;依据所述至少一个有效轨迹点数据确定所述目标对象的至少一个第一轨迹点。In some embodiments of the present application, the first processing subunit is further configured to determine that the n track point data with the largest timestamp in the at least one first track point data are at least one valid track point data; n is a positive integer; at least one first track point of the target object is determined according to the at least one valid track point data.
在本申请的一些实施例中,在所述第一轨迹点数据的数量大于1的情况下,所述获取单元11,包括:第一获取子单元,配置为获取所述目标对象在所述目标场景内的至少两个第二轨迹点数据和距离阈值;确定相邻轨迹点数据集的距离,所述相邻轨迹点数据集包括时间戳相邻的两个所述第二轨迹点数据;在所述距离小于所述距离阈值的情况下,将旧轨迹点数据从所述至少两个第二轨迹点数据中去除,得到所述至少一个第一轨迹点数据,所述旧轨迹点数据为所述相邻轨迹点数据集中时间戳最小的所述第二轨迹点数据;或将所述至少两个第二轨迹点数据作为所述一个以上第一轨迹点数据。In some embodiments of the present application, when the number of the first trajectory point data is greater than 1, the acquisition unit 11 includes: a first acquisition subunit configured to acquire At least two second track point data and a distance threshold in the scene; determine the distance between adjacent track point data sets, and the adjacent track point data sets include two second track point data with adjacent time stamps; When the distance is less than the distance threshold, the old track point data is removed from the at least two second track point data to obtain the at least one first track point data, and the old track point data is all The second track point data with the smallest time stamp in the adjacent track point data sets; or the at least two second track point data as the one or more first track point data.
在本申请的一些实施例中,所述目标对象的轨迹包括第一轨迹和第二轨迹,所述第一轨迹为时间戳第m大的轨迹点与时间戳最大的轨迹点之间的轨迹,所述第二轨迹为所述目标对象的轨迹中除所述第一轨迹之外的轨迹,所述第一轨迹的显示方式与所述第二轨迹的显示方式不同;所述m为等于或大于2的正整数。In some embodiments of the present application, the trajectory of the target object includes a first trajectory and a second trajectory, the first trajectory is a trajectory between the trajectory point with the mth largest timestamp and the trajectory point with the largest timestamp, The second track is a track other than the first track in the track of the target object, and the display mode of the first track is different from the display mode of the second track; the m is equal to or greater than A positive integer of 2.
在本申请的一些实施例中,所述第一三维模型包括第一楼层和第二楼层,所述第一楼层的高度和所述第二楼层的高度不同,所述目标对象的轨迹处于所述第一楼层内,所述装置,还包括:显示单元,配置为在确定所述目标对象出现在所述第二楼层的情况下,在所述第一三维模型内显示所述第二楼层。In some embodiments of the present application, the first three-dimensional model includes a first floor and a second floor, the height of the first floor is different from the height of the second floor, and the trajectory of the target object is in the On the first floor, the device further includes: a display unit configured to display the second floor in the first three-dimensional model when it is determined that the target object appears on the second floor.
在本申请的一些实施例中,所述确定所述目标对象出现在所述第二楼层之前,所述获取单元,还配置为获取包含所述目标对象的第一图像;所述处理单元,还配置为通过将所述第一图像与第二图像进行比对确定所述第二图像包含所述目标对象,所述第二图像由所述第二楼层的摄像头采集得到。In some embodiments of the present application, the determining that the target object appears before the second floor, the acquisition unit is further configured to acquire a first image containing the target object; the processing unit is further It is configured to determine that the second image contains the target object by comparing the first image with a second image, and the second image is collected by a camera on the second floor.
图像处理装置依据目标对象在目标场景内的至少一个第一轨迹点数据,显示目标对象在第一三维模型中的轨迹,可更直观的展示目标对象在目标场景中的轨迹。The image processing device displays the trajectory of the target object in the first three-dimensional model according to at least one first trajectory point data of the target object in the target scene, which can more intuitively display the trajectory of the target object in the target scene.
在一些实施例中,本申请实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述。In some embodiments, the functions or modules included in the apparatus provided in the embodiments of the present application can be used to execute the methods described in the above method embodiments, and the specific implementation can refer to the descriptions of the above method embodiments.
图13为本申请实施例提供的一种图像处理装置的硬件结构示意图。该图像处理装置2包括处理器21,存储器22,输入装置23,输出装置24。该处理器21、存储器22、输入装置23和输出装置24通过连接器相耦合,该连接器包括各类接口、传输线或总线等等,本申请实施例对此不作限定。 应当理解,本申请的各个实施例中,耦合是指通过特定方式的相互联系,包括直接相连或者通过其他设备间接相连,例如可以通过各类接口、传输线、总线等相连。FIG. 13 is a schematic diagram of a hardware structure of an image processing device provided by an embodiment of the present application. 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 application. It should be understood that in various embodiments of the present application, coupling refers to interconnection in a specific way, 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 can be one or more graphics processing units (Graphics Processing Unit, GPU), and in the case where the processor 21 is a GPU, the GPU can be a single-core GPU or a multi-core GPU. In some embodiments of the present application, 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. In some embodiments of the present application, the processor may also be other types of processors, etc., which are not limited in this embodiment of the present application.
存储器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 application. Optionally, the memory includes but is 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不仅可用于存储相关指令,还可用于存储相关数据,如该存储器22可用于存储通过输入装置23获取的第一三维模型和至少一个第一轨迹点数据,本申请实施例对于该存储器中具体所存储的数据不作限定。It can be understood that, in the embodiment of the present application, the memory 22 can be used not only to store relevant instructions, but also to store relevant data, for example, the memory 22 can be used to store the first three-dimensional model and at least one first trajectory point data obtained through the input device 23 , the embodiment of the present application does not limit the specific data stored in the memory.
可以理解的是,图13仅仅示出了一种图像处理装置的简化设计。在实际应用中,图像处理装置还可以分别包含必要的其他元件,包含但不限于任意数量的输入/输出装置、处理器、存储器等,而所有可以实现本申请实施例的图像处理装置都在本申请的保护范围之内。It can be understood that FIG. 13 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 application are included in this within the scope of the application.
本申请实施例提供了一种电子设备,包括:处理器、发送装置、输入装置、输出装置和存储器,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,在所述处理器执行所述计算机指令的情况下,所述电子设备执行如上述任一实施例所述的图像处理方法。An embodiment of the present application provides an electronic device, including: a processor, a sending device, an input device, an output device, and a memory, the memory is used to store computer program codes, and the computer program codes include computer instructions. When the computer executes the computer instructions, the electronic device executes the image processing method as described in any one of the above embodiments.
本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序包括程序指令,在所述程序指令被处理器执行的情况下,使所述处理器执行如上述任一实施例所述的图像处理方法。An embodiment of the present application provides a computer-readable storage medium, where 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 The processor executes the image processing method described in any one of the above embodiments.
本申请实施例提供了一种计算机程序产品,所述计算机程序产品包括计算机程序或指令,在所述计算机程序或指令在电子设备上运行的情况下,使得所述电子设备执行上述任一实施例所述的图像处理方法。An embodiment of the present application provides a computer program product, the computer program product includes a computer program or an instruction, and when the computer program or instruction is run on an electronic device, the electronic device is made to execute any of the above-mentioned embodiments The image processing method described.
本公开实施例还提供另一种计算机程序产品,包括存储了程序代码的计算机可读存储介质,所述程序代码包括的指令可配置为执行上述方法实施例中所述图像处理方法。Embodiments of the present disclosure also provide another computer program product, including a computer-readable storage medium storing program codes, where instructions included in the program codes can be configured to execute the image processing method described in the above method embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。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 use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。所属领域的技术人员还可以清楚地了解到,本申请各个实施例描述各有侧重,为描述的方便和简洁,相同或类似的部分在不同实施例中可能没有赘述,因此,在某一实施例未描述或未详细描述的部分可以参见其他实施例的记载。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here. Those skilled in the art can also clearly understand that the descriptions of each embodiment of the present application have their own emphases. For the convenience and brevity of description, the same or similar parts may not be repeated in different embodiments. Therefore, in a certain embodiment For parts not described or not described in detail, reference may be made to the descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, 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 displayed 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 realize the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application 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, the processes or functions according to the embodiments of the present application will be generated in whole or in part. 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 transmitted from a website site, computer, server or data center to 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 such as a server or a data center 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.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或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: ROM or RAM, a magnetic disk or an optical disk, and other various media that can store program codes.
工业实用性Industrial Applicability
本申请实施例公开了一种图像处理方法、装置、设备、介质及程序。所述方法由电子设备执行,该方法包括:获取目标场景的第一三维模型和目标对象在所述目标场景内的至少一个第一轨迹点数据;依据所述至少一个第一轨迹点数据,在所述第一三维模型内显示所述目标对象的轨迹。The embodiment of the present application discloses an image processing method, device, equipment, medium and program. The method is executed by an electronic device, and the method includes: acquiring a first three-dimensional model of a target scene and at least one first track point data of a target object in the target scene; according to the at least one first track point data, in The trajectory of the target object is displayed in the first three-dimensional model.

Claims (21)

  1. 一种图像处理方法,所述方法由电子设备执行,所述方法包括:An image processing method, the method is executed by an electronic device, the method comprising:
    获取目标场景的第一三维模型和目标对象在所述目标场景内的至少一个第一轨迹点数据;Acquiring a first three-dimensional model of a target scene and at least one first trajectory point data of a target object in the target scene;
    依据所述至少一个第一轨迹点数据,在所述第一三维模型内显示所述目标对象的轨迹。A trajectory of the target object is displayed in the first three-dimensional model according to the at least one first trajectory point data.
  2. 根据权利要求1所述的方法,其中,所述依据所述至少一个第一轨迹点数据,在所述第一三维模型内显示所述目标对象的轨迹,包括:The method according to claim 1, wherein the displaying the trajectory of the target object in the first three-dimensional model according to the at least one first trajectory point data comprises:
    依据所述至少一个第一轨迹点数据确定所述目标对象的至少一个第一轨迹点;determining at least one first track point of the target object according to the at least one first track point data;
    从所述第一三维模型中确定包含所述至少一个第一轨迹点的第一三维区域;determining a first three-dimensional region containing the at least one first trajectory point from the first three-dimensional model;
    在所述第一三维模型内按预定显示方式显示所述第一三维区域,并在所述第一三维区域内显示所述目标对象的轨迹。The first three-dimensional area is displayed in a predetermined display manner in the first three-dimensional model, and the track of the target object is displayed in the first three-dimensional area.
  3. 根据权利要求2所述的方法,其中,所述从所述第一三维模型中确定包含所述至少一个第一轨迹点的第一三维区域,包括:The method according to claim 2, wherein said determining a first three-dimensional area containing said at least one first trajectory point from said first three-dimensional model comprises:
    获取所述第一三维区域的尺寸和所述第一三维区域的形状;Acquiring the size of the first three-dimensional area and the shape of the first three-dimensional area;
    确定所述至少一个第一轨迹点的质心;determining a centroid of the at least one first trajectory point;
    将所述质心作为所述第一三维区域的中心,并依据所述第一三维区域的尺寸和所述第一三维区域的形状从所述第一三维模型中确定所述第一三维区域。Taking the centroid as the center of the first three-dimensional area, and determining the first three-dimensional area from the first three-dimensional model according to the size of the first three-dimensional area and the shape of the first three-dimensional area.
  4. 根据权利要求3所述的方法,其中,所述至少一个第一轨迹点包括第二轨迹点、第三轨迹点、第四轨迹点、至少一个第五轨迹点,所述第二轨迹点的时间戳、所述第三轨迹点的时间戳、所述第四轨迹点的时间戳、所述至少一个第五轨迹点的时间戳依次减小;The method according to claim 3, wherein the at least one first track point includes a second track point, a third track point, a fourth track point, and at least one fifth track point, and the time of the second track point stamp, the timestamp of the third trajectory point, the timestamp of the fourth trajectory point, and the timestamp of the at least one fifth trajectory point decrease in turn;
    所述确定所述至少一个第一轨迹点的质心,包括:The determining the centroid of the at least one first trajectory point includes:
    在所述第三轨迹点位于第一待确认区域内的情况下,确定所述第一待确认区域的质心作为所述至少一个第一轨迹点的质心,所述第一待确认区域为多边形区域,所述第一待确认区域的顶点为所述第二轨迹点、所述第四轨迹点、所述至少一个第五轨迹点;In the case where the third track point is located in the first area to be confirmed, the centroid of the first area to be confirmed is determined as the centroid of the at least one first track point, and the first area to be confirmed is a polygonal area , the vertices of the first area to be confirmed are the second track point, the fourth track point, and the at least one fifth track point;
    在所述第三轨迹点位于第一待确认区域外的情况下,确定第二待确认区域的质心作为所述至少一个第一轨迹点的质心,所述第一待确认区域和所述第二待确认区域均为多边形区域,所述第一待确认区域的顶点为所述第二轨迹点、所述第四轨迹点、所述至少一个第五轨迹点,所述第二待确认区域的顶点为所述第二轨迹点、所述第三轨迹点、所述第四轨迹点、所述至少一个第五轨迹点。When the third track point is located outside the first area to be confirmed, determine the centroid of the second area to be confirmed as the center of mass of the at least one first track point, the first area to be confirmed and the second area to be confirmed The areas to be confirmed are all polygonal areas, the vertices of the first area to be confirmed are the second track point, the fourth track point, and the at least one fifth track point, and the vertices of the second area to be confirmed are are the second track point, the third track point, the fourth track point, and the at least one fifth track point.
  5. 根据权利要求2至4中任意一项所述的方法,其中,所述依据所述至少一个第一轨迹点数据确定所述目标对象的至少一个第一轨迹点,包括:The method according to any one of claims 2 to 4, wherein said determining at least one first track point of said target object according to said at least one first track point data comprises:
    确定所述至少一个第一轨迹点数据中时间戳最大的n个轨迹点数据为至少一个有效轨迹点数据;所述n为正整数;Determining the n track point data with the largest timestamp in the at least one first track point data as at least one valid track point data; the n is a positive integer;
    依据所述至少一个有效轨迹点数据确定所述目标对象的至少一个第一轨迹点。At least one first track point of the target object is determined according to the at least one valid track point data.
  6. 根据权利要求1至5中任意一项所述的方法,其中,在所述第一轨迹点数据的数量大于1的情况下,所述获取目标对象在所述目标场景内的至少一个第一轨迹点数据,包括:The method according to any one of claims 1 to 5, wherein, when the number of the first track point data is greater than 1, said acquiring at least one first track of the target object in the target scene point data, including:
    获取所述目标对象在所述目标场景内的至少两个第二轨迹点数据和距离阈值;Acquiring at least two second trajectory point data and a distance threshold of the target object in the target scene;
    确定相邻轨迹点数据集的距离,所述相邻轨迹点数据集包括时间戳相邻的两个所述第二轨迹点数据;determining the distance between adjacent track point data sets, the adjacent track point data sets including two of the second track point data with adjacent time stamps;
    在所述距离小于所述距离阈值的情况下,将旧轨迹点数据从所述至少两个第二轨迹点数据中去除,得到所述至少一个第一轨迹点数据,所述旧轨迹点数据为所述相邻轨迹点数据集中时间戳最小的所述第二轨迹点数据;或将所述至少两个第二轨迹点数据作为所述一个以上第一轨迹点数据。When the distance is less than the distance threshold, the old track point data is removed from the at least two second track point data to obtain the at least one first track point data, and the old track point data is The second track point data with the smallest time stamp in the adjacent track point data set; or the at least two second track point data as the one or more first track point data.
  7. 根据权利要求1至6中任意一项所述的方法,其中,所述目标对象的轨迹包括第一轨迹和第二轨迹,所述第一轨迹为时间戳第m大的轨迹点与时间戳最大的轨迹点之间的轨迹,所述第二轨迹为所述目标对象的轨迹中除所述第一轨迹之外的轨迹,所述第一轨迹的显示方式与所述第二轨迹的显示方式不同;所述m为等于或大于2的正整数。The method according to any one of claims 1 to 6, wherein the trajectory of the target object includes a first trajectory and a second trajectory, and the first trajectory is the trajectory point with the mth largest timestamp and the largest timestamp The trajectory between the trajectory points, the second trajectory is a trajectory other than the first trajectory in the trajectory of the target object, and the display method of the first trajectory is different from the display method of the second trajectory ; The m is a positive integer equal to or greater than 2.
  8. 根据权利要求1至7中任意一项所述的方法,其中,所述第一三维模型包括第一楼层和第二楼层,所述第一楼层的高度和所述第二楼层的高度不同,所述目标对象的轨迹处于所述第一楼层内,所述方法还包括:The method according to any one of claims 1 to 7, wherein the first three-dimensional model includes a first floor and a second floor, and the height of the first floor is different from the height of the second floor, so The track of the target object is in the first floor, the method also includes:
    在确定所述目标对象出现在所述第二楼层的情况下,在所述第一三维模型内显示所述第二楼层。In case it is determined that the target object is present on the second floor, the second floor is displayed in the first three-dimensional model.
  9. 根据权利要求8所述的方法,其中,所述确定所述目标对象出现在所述第二楼层之前,所述方法还包括:The method according to claim 8, wherein said determining that said target object appears before said second floor, said method further comprises:
    获取包含所述目标对象的第一图像;acquiring a first image containing the target object;
    所述确定所述目标对象出现在所述第二楼层,包括:The determining that the target object appears on the second floor includes:
    通过将所述第一图像与第二图像进行比对确定所述第二图像包含所述目标对象,所述第二图像由所述第二楼层的摄像头采集得到。It is determined that the second image contains the target object by comparing the first image with the second image, and the second image is collected by a camera on the second floor.
  10. 一种图像处理装置,所述装置包括:An image processing device, the device comprising:
    获取单元,配置为获取目标场景的第一三维模型和目标对象在所述目标场景内的至少一个第一轨迹点数据;An acquisition unit configured to acquire a first three-dimensional model of a target scene and at least one first trajectory point data of a target object in the target scene;
    处理单元,配置为依据所述至少一个第一轨迹点数据,在所述第一三维模型内显示所述目标对象的轨迹。A processing unit configured to display the trajectory of the target object in the first three-dimensional model according to the at least one first trajectory point data.
  11. 根据权利要求10所述的装置,其中,所述处理单元,包括:The device according to claim 10, wherein the processing unit comprises:
    第一处理子单元,配置为依据所述至少一个第一轨迹点数据确定所述目标对象的至少一个第一轨迹点;The first processing subunit is configured to determine at least one first track point of the target object according to the at least one first track point data;
    第二处理子单元,配置为从所述第一三维模型中确定包含所述至少一个第一轨迹点的第一三维区域;A second processing subunit configured to determine a first three-dimensional area containing the at least one first trajectory point from the first three-dimensional model;
    第三处理子单元,配置为在所述第一三维模型内按预定显示方式显示所述第一三维区域,并在所述第一三维区域内显示所述目标对象的轨迹。The third processing subunit is configured to display the first three-dimensional area in the first three-dimensional model in a predetermined display manner, and display the trajectory of the target object in the first three-dimensional area.
  12. 根据权利要求11所述的装置,其中,所述第二处理子单元,还配置为:The device according to claim 11, wherein the second processing subunit is further configured to:
    获取所述第一三维区域的尺寸和所述第一三维区域的形状;Acquiring the size of the first three-dimensional area and the shape of the first three-dimensional area;
    确定所述至少一个第一轨迹点的质心;determining a centroid of the at least one first trajectory point;
    将所述质心作为所述第一三维区域的中心,并依据所述第一三维区域的尺寸和所述第一三维区域的形状从所述第一三维模型中确定所述第一三维区域。Taking the centroid as the center of the first three-dimensional area, and determining the first three-dimensional area from the first three-dimensional model according to the size of the first three-dimensional area and the shape of the first three-dimensional area.
  13. 根据权利要求12所述的装置,其中,所述至少一个第一轨迹点包括第二轨迹点、第三轨迹点、第四轨迹点、至少一个第五轨迹点,所述第二轨迹点的时间戳、所述第三轨迹点的时间戳、所述第四轨迹点的时间戳、所述至少一个第五轨迹点的时间戳依次减小,所述第二处理子单元,还配置为:The device according to claim 12, wherein the at least one first track point includes a second track point, a third track point, a fourth track point, and at least one fifth track point, and the time of the second track point stamp, the timestamp of the third trajectory point, the timestamp of the fourth trajectory point, and the timestamp of the at least one fifth trajectory point decrease in sequence, and the second processing subunit is further configured to:
    在所述第三轨迹点位于第一待确认区域内的情况下,确定所述第一待确认区域的质心作为所述至少一个第一轨迹点的质心,所述第一待确认区域为多边形区域,所述第一待确认区域的顶点为所述第二轨迹点、所述第四轨迹点、所述至少一个第五轨迹点;In the case where the third track point is located in the first area to be confirmed, the centroid of the first area to be confirmed is determined as the centroid of the at least one first track point, and the first area to be confirmed is a polygonal area , the vertices of the first area to be confirmed are the second track point, the fourth track point, and the at least one fifth track point;
    在所述第三轨迹点位于第一待确认区域外的情况下,确定第二待确认区域的质心作为所述至少一个第一轨迹点的质心,所述第一待确认区域和所述第二待确认区域均为多边形区域,所述第一待确认区域的顶点为所述第二轨迹点、所述第四轨迹点、所述至少一个第五轨迹点,所述第二待确认区域的顶点为所述第二轨迹点、所述第三轨迹点、所述第四轨迹点、所述至少一个第五轨迹点。When the third track point is located outside the first area to be confirmed, determine the centroid of the second area to be confirmed as the center of mass of the at least one first track point, the first area to be confirmed and the second area to be confirmed The areas to be confirmed are all polygonal areas, the vertices of the first area to be confirmed are the second track point, the fourth track point, and the at least one fifth track point, and the vertices of the second area to be confirmed are are the second track point, the third track point, the fourth track point, and the at least one fifth track point.
  14. 根据权利要求11至13中任意一项所述的装置,其中,所述第一处理子单元,还配置为:The device according to any one of claims 11 to 13, wherein the first processing subunit is further configured to:
    确定所述至少一个第一轨迹点数据中时间戳最大的n个轨迹点数据为至少一个有效轨迹点数据;所述n为正整数;Determining the n track point data with the largest timestamp in the at least one first track point data as at least one valid track point data; the n is a positive integer;
    依据所述至少一个有效轨迹点数据确定所述目标对象的至少一个第一轨迹点。At least one first track point of the target object is determined according to the at least one valid track point data.
  15. 根据权利要求10至14中任意一项所述的装置,其中,在所述第一轨迹点数据的数量大于1的情况下,所述获取单元,包括:第一获取子单元,配置为:The device according to any one of claims 10 to 14, wherein, when the number of the first trajectory point data is greater than 1, the acquisition unit includes: a first acquisition subunit configured to:
    获取所述目标对象在所述目标场景内的至少两个第二轨迹点数据和距离阈值;Acquiring at least two second trajectory point data and a distance threshold of the target object in the target scene;
    确定相邻轨迹点数据集的距离,所述相邻轨迹点数据集包括时间戳相邻的两个所述第二轨迹点数据;determining the distance between adjacent track point data sets, the adjacent track point data sets including two of the second track point data with adjacent time stamps;
    在所述距离小于所述距离阈值的情况下,将旧轨迹点数据从所述至少两个第二轨迹点数据中去除,得到所述至少一个第一轨迹点数据,所述旧轨迹点数据为所述相邻轨迹点数据集中时间戳最小的所述第二轨迹点数据;或将所述至少两个第二轨迹点数据作为所述一个以上第一轨迹点数据。When the distance is less than the distance threshold, the old track point data is removed from the at least two second track point data to obtain the at least one first track point data, and the old track point data is The second track point data with the smallest time stamp in the adjacent track point data set; or the at least two second track point data as the one or more first track point data.
  16. 根据权利要求10至15中任意一项所述的装置,其中,所述目标对象的轨迹包括第一轨迹和第二轨迹,所述第一轨迹为时间戳第m大的轨迹点与时间戳最大的轨迹点之间的轨迹,所述第二轨迹为所述目标对象的轨迹中除所述第一轨迹之外的轨迹,所述第一轨迹的显示方式与所述第二轨迹的显示方式不同;所述m为等于或大于2的正整数。The device according to any one of claims 10 to 15, wherein the trajectory of the target object includes a first trajectory and a second trajectory, and the first trajectory is the trajectory point with the mth largest timestamp and the largest timestamp The trajectory between the trajectory points, the second trajectory is a trajectory other than the first trajectory in the trajectory of the target object, and the display method of the first trajectory is different from the display method of the second trajectory ; The m is a positive integer equal to or greater than 2.
  17. 根据权利要求10至16中任意一项所述的装置,其中,所述第一三维模型包括第一楼层和第二楼层,所述第一楼层的高度和所述第二楼层的高度不同,所述目标对象的轨迹处于所述第一楼层内, 所述装置,还包括:显示单元,配置为:The device according to any one of claims 10 to 16, wherein the first three-dimensional model includes a first floor and a second floor, and the height of the first floor is different from the height of the second floor, so The track of the target object is in the first floor, the device further includes: a display unit configured to:
    在确定所述目标对象出现在所述第二楼层的情况下,在所述第一三维模型内显示所述第二楼层。In case it is determined that the target object is present on the second floor, the second floor is displayed in the first three-dimensional model.
  18. 根据权利要求17所述的装置,其中,确定所述目标对象出现在所述第二楼层之前,所述获取单元,还配置为获取包含所述目标对象的第一图像;The device according to claim 17, wherein it is determined that the target object appears before the second floor, and the acquisition unit is further configured to acquire a first image containing the target object;
    所述处理单元,还配置为通过将所述第一图像与第二图像进行比对确定所述第二图像包含所述目标对象,所述第二图像由所述第二楼层的摄像头采集得到。The processing unit is further configured to determine that the second image contains the target object by comparing the first image with a second image, and the second image is collected by a camera on the second floor.
  19. 一种电子设备,包括:处理器和存储器,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,在所述处理器执行所述计算机指令的情况下,所述电子设备执行如权利要求1至9中任意一项所述的方法。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 9.
  20. 一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序包括程序指令,在所述程序指令被处理器执行的情况下,使所述处理器执行权利要求1至9中任意一项所述的方法。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 caused to perform the claims The method described in any one of 1 to 9.
  21. 一种计算机程序产品,所述计算机程序产品包括计算机程序或指令,在所述计算机程序或指令在电子设备上运行的情况下,使得所述电子设备执行如权利要求1至9中任意一项所述的方法。A computer program product, the computer program product comprising a computer program or an instruction, when the computer program or instruction is run on an electronic device, the electronic device is made to execute any one of claims 1 to 9 described method.
PCT/CN2021/134883 2021-06-29 2021-12-01 Image processing method and apparatus, and device, medium and program WO2023273154A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110728309.2A CN113643320A (en) 2021-06-29 2021-06-29 Image processing method and device, electronic equipment and computer readable storage medium
CN202110728309.2 2021-06-29

Publications (1)

Publication Number Publication Date
WO2023273154A1 true WO2023273154A1 (en) 2023-01-05

Family

ID=78416321

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/134883 WO2023273154A1 (en) 2021-06-29 2021-12-01 Image processing method and apparatus, and device, medium and program

Country Status (2)

Country Link
CN (1) CN113643320A (en)
WO (1) WO2023273154A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113643320A (en) * 2021-06-29 2021-11-12 西安商汤智能科技有限公司 Image processing method and device, electronic equipment and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110208422A1 (en) * 2010-02-22 2011-08-25 Denso Corporation Trajectory display device
CN108257146A (en) * 2018-01-15 2018-07-06 新疆大学 Movement locus display methods and device
CN112434557A (en) * 2020-10-20 2021-03-02 深圳市华橙数字科技有限公司 Three-dimensional display method and device of motion trail, terminal and storage medium
CN113643320A (en) * 2021-06-29 2021-11-12 西安商汤智能科技有限公司 Image processing method and device, electronic equipment and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110208422A1 (en) * 2010-02-22 2011-08-25 Denso Corporation Trajectory display device
CN108257146A (en) * 2018-01-15 2018-07-06 新疆大学 Movement locus display methods and device
CN112434557A (en) * 2020-10-20 2021-03-02 深圳市华橙数字科技有限公司 Three-dimensional display method and device of motion trail, terminal and storage medium
CN113643320A (en) * 2021-06-29 2021-11-12 西安商汤智能科技有限公司 Image processing method and device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN113643320A (en) 2021-11-12

Similar Documents

Publication Publication Date Title
WO2021139408A1 (en) Method and apparatus for displaying special effect, and storage medium and electronic device
EP3961485A1 (en) Image processing method, apparatus and device, and storage medium
US20220319139A1 (en) Multi-endpoint mixed-reality meetings
CN105579946B (en) The shared status information generated by application is managed
US20220351390A1 (en) Method for generating motion capture data, electronic device and storage medium
EP2814000B1 (en) Image processing apparatus, image processing method, and program
US20140300542A1 (en) Portable device and method for providing non-contact interface
WO2010027193A2 (en) Spatially correlated rendering of three-dimensional content on display components having arbitrary positions
CN108596955B (en) Image detection method, image detection device and mobile terminal
EP4006847A1 (en) Virtual object processing method and apparatus, and storage medium and electronic device
KR102646977B1 (en) Display method and device based on augmented reality, and storage medium
JP2007080262A (en) System, method and program for supporting 3-d multi-camera video navigation
US10861169B2 (en) Method, storage medium and electronic device for generating environment model
JP2013164697A (en) Image processing device, image processing method, program and image processing system
WO2023273154A1 (en) Image processing method and apparatus, and device, medium and program
EP3956752B1 (en) Semantic-augmented artificial-reality experience
WO2024099068A1 (en) Image-based speed determination method and apparatus, and device and storage medium
WO2023273155A1 (en) Image processing method and apparatus, and electronic device, computer-readable storage medium and computer program product
WO2023005659A1 (en) Image processing method and apparatus, electronic device, computer-readable storage medium, computer program, and computer program product
CN109461203B (en) Gesture three-dimensional image generation method and device, computer equipment and storage medium
CN109857244B (en) Gesture recognition method and device, terminal equipment, storage medium and VR glasses
TWI735367B (en) Speed measurement method, electronic equipment and storage medium
JP6699406B2 (en) Information processing device, program, position information creation method, information processing system
CN114170366A (en) Three-dimensional reconstruction method based on dotted line feature fusion and electronic equipment
CN109005357B (en) Photographing method, photographing device and terminal equipment

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21948080

Country of ref document: EP

Kind code of ref document: A1