WO2023029969A1 - 图像处理方法及装置、电子设备及计算机可读存储介质 - Google Patents

图像处理方法及装置、电子设备及计算机可读存储介质 Download PDF

Info

Publication number
WO2023029969A1
WO2023029969A1 PCT/CN2022/112538 CN2022112538W WO2023029969A1 WO 2023029969 A1 WO2023029969 A1 WO 2023029969A1 CN 2022112538 W CN2022112538 W CN 2022112538W WO 2023029969 A1 WO2023029969 A1 WO 2023029969A1
Authority
WO
WIPO (PCT)
Prior art keywords
coordinate system
image
point
pixel
processed
Prior art date
Application number
PCT/CN2022/112538
Other languages
English (en)
French (fr)
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 WO2023029969A1 publication Critical patent/WO2023029969A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/292Multi-camera tracking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30241Trajectory

Definitions

  • the present disclosure relates to the technical field of image processing, and in particular, to an image processing method and device, electronic equipment, and a computer-readable storage medium.
  • the conversion relationship between the pixel coordinate system and the world coordinate system of the image collected by the imaging device can be obtained, and then the conversion relationship and the pixel point
  • the coordinates in the pixel coordinate system of the image collected by the imaging device are used to obtain the coordinates of the object point corresponding to the pixel point in the world coordinate system.
  • the parameters of the imaging device need to be obtained through calibration of the imaging device, and the cost of manpower and time brought by the calibration of the imaging device is relatively high.
  • Embodiments of the present disclosure provide an image processing method and device, electronic equipment, and a computer-readable storage medium.
  • an image processing method comprising:
  • a first conversion relationship between the first pixel coordinate system of the first image to be processed and the world coordinate system is obtained.
  • an image processing device comprising:
  • the acquiring part is configured to acquire the first image to be processed and three-dimensional data of the target scene, the three-dimensional data including the three-dimensional coordinates of the target scene in the world coordinate system;
  • the matching processing part is configured to perform matching processing on the first image to be processed and the three-dimensional data to obtain at least one matching point pair;
  • the first processing part is configured to obtain a first conversion relationship between the first pixel coordinate system of the first image to be processed and the world coordinate system according to the at least one matching point pair.
  • the first image to be processed includes first pixels, and the image processing device further includes:
  • the second processing part is configured to obtain the three-dimensional coordinates of the first object point according to the first conversion relationship and the coordinates of the first pixel point in the first pixel coordinate system, and the first object point is The object point corresponding to the first pixel point.
  • an embodiment of the present disclosure provides an electronic device, including: a processor and a memory, the memory is configured to store computer program code, the computer program code includes computer instructions, and the processor executes the In the case of computer instructions, the electronic device executes the method according to the above first aspect and any possible implementation manner thereof.
  • an embodiment of the present disclosure provides another electronic device, including: a processor, a sending device, an input device, an output device, and a memory, the memory is configured to store computer program code, and the computer program code includes A computer instruction.
  • the processor executes the computer instruction
  • the electronic device executes the method in the above first aspect and any possible implementation manner thereof.
  • an embodiment of the present disclosure 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, In some cases, the processor is made to execute the method according to the above-mentioned first aspect and any possible implementation manner thereof.
  • an embodiment of the present disclosure 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 a computer, the computer executes the above-mentioned first A method in one aspect and any one of possible implementations thereof.
  • An embodiment of the present disclosure provides an image processing method, device, electronic device, and computer-readable storage medium; the method includes: acquiring the first image to be processed and three-dimensional data of the target scene, and the three-dimensional data includes the target scene in the world coordinate system The following three-dimensional coordinates; matching the first image to be processed and the three-dimensional data to obtain at least one matching point pair; according to at least one matching point pair, obtaining the distance between the first pixel coordinate system of the first image to be processed and the world coordinate system The first conversion relationship of .
  • At least one matching point pair between the image to be processed and the three-dimensional data is obtained through matching processing, and then the transformation relationship between the pixel coordinate system of the image to be processed and the world coordinate system is obtained according to the at least one matching point pair, so that The calculation of the coordinate transformation relationship is no longer affected by the change of the parameters of the imaging device, thereby reducing the labor cost and time cost of obtaining the conversion relationship between the pixel coordinate system and the world coordinate system by calibrating the imaging device, and improving the efficiency of image processing. efficiency.
  • FIG. 1 is a schematic diagram of a pixel coordinate system provided by an embodiment of the present disclosure
  • FIG. 2 is a first schematic flowchart of an image processing method provided by an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of a binocular image provided by an embodiment of the present disclosure.
  • FIG. 4 is a second schematic flow diagram of an image processing method provided by an embodiment of the present disclosure.
  • Fig. 5 is a schematic diagram of a bottom edge provided by an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of an image processing device provided by an embodiment of the present disclosure.
  • FIG. 7 is a schematic diagram of a hardware structure of an image processing device provided by an embodiment of the present disclosure.
  • At least one (item) means one or more
  • “multiple” means two or more
  • at least two (items) means two or three And three or more
  • "and/or” is used to describe the association relationship of associated objects, indicating that there can be three types of relationships, for example, "A and/or B” can mean: only A exists, only B exists, and A exists at the same time and B, where A and B can be singular or plural.
  • the character "/" can indicate that the contextual objects are an "or” relationship, which refers to any combination of these items, including any combination of single items (items) or plural items (items).
  • At least one item (piece) of a, b or c can mean: a, b, c, "a and b", “a and c", “b and c", or "a and b and c ", where a, b, c can be single or multiple.
  • an embodiment means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present disclosure.
  • the occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.
  • camera equipment In order to enhance the safety in the working, living or social environment, camera equipment will be installed in various areas for security protection based on video stream information. With the rapid increase in the number of cameras in public places, how to effectively determine the image containing the target object through massive video streams, and determine the position of the target object in the world coordinate system based on the information of the image, and the target object in the world coordinate system trajectory is of great significance.
  • the current technology determines that the image contains the target object, according to the coordinates of the target object in the pixel coordinate system of the image and the parameters of the camera (including the internal parameters of the camera and the external parameters of the camera), the coordinates of the target object in the world coordinate system are obtained. down position.
  • an embodiment of the present disclosure provides an image processing method to reduce labor costs and time costs caused by the conversion relationship between the obtained image pixel coordinate system and the world coordinate system, and improve image processing efficiency.
  • the abscissa of the pixel coordinate system is used to indicate the number of columns where the pixel points are located
  • the ordinate in the pixel coordinate system is used to indicate the number of rows where the pixel points are located.
  • the abscissa and ordinate are pixels.
  • the coordinates of pixel A11 in Fig. 1 are (1,1)
  • the coordinates of pixel A23 are (3,2)
  • the coordinates of pixel A42 are (2,4)
  • the coordinates of pixel A34 are (4 , 3).
  • the execution subject of the embodiments of the present disclosure is an image processing apparatus, where the image processing apparatus may be any electronic device capable of executing the technical solutions disclosed in the method embodiments of the present disclosure.
  • the image processing device may be one of the following: a mobile phone, a computer, a tablet computer, and a wearable smart device.
  • FIG. 2 is a schematic flowchart of an image processing method provided by an embodiment of the present disclosure.
  • 201 Acquire a first image to be processed and three-dimensional data of a target scene, where the three-dimensional data includes three-dimensional coordinates of the target scene in a world coordinate system.
  • the target scene may be any scene.
  • the target scene is a scene in a classroom; for another example, the target scene is a scene in a shopping mall; for another example, the target scene is an underground parking lot; for another example, the target scene is an outdoor sports field.
  • the first image to be processed of the target scene is an image obtained by shooting the target scene.
  • the target scene is a scene in a shopping mall.
  • the image obtained by shooting the inside of the shopping mall is the first image to be processed.
  • the target scene is an outdoor sports field.
  • the image obtained by photographing the stadium is the first image to be processed.
  • the image processing apparatus receives the first image to be processed input by the user through the input component to acquire the first image to be processed.
  • the above-mentioned input components include: a keyboard, a mouse, a touch screen, a touch pad, an audio input device, and the like.
  • the image processing apparatus receives the first image to be processed sent by the terminal and acquires the first image to be processed.
  • the above-mentioned terminal can be any of the following: mobile phone, computer, tablet computer, server.
  • the 3D data includes the 3D coordinates of the target scene in the world coordinate system.
  • the 3D data includes the 3D coordinates of any point in the target scene in the world coordinate system.
  • the three-dimensional data is a three-dimensional map.
  • the 3D data is a 3D model, for example, the 3D data may be a 3D point cloud; and for another example, the 3D data may be a 3D computer aided design (CAD) model.
  • CAD computer aided design
  • the image processing device includes a laser radar.
  • the image processing device scans the target scene through the laser radar to obtain three-dimensional data of the target scene.
  • the image processing device receives 3D data input by a user through an input component to acquire 3D data.
  • the image processing device receives 3D data sent by the terminal to acquire 3D data.
  • acquiring the first image to be processed and acquiring the three-dimensional data may be performed separately, or may be performed simultaneously.
  • the matching point pair includes a pixel point in the first image to be processed and a data point in the three-dimensional data, and the object point corresponding to the pixel point is the same as the object point corresponding to the data point.
  • the image processing device performs matching processing on the first image to be processed and the three-dimensional data through one of the following algorithms: a method for matching two-dimensional images and three-dimensional data (learned cross-domain descriptors, LCD) , Two-dimensional image and three-dimensional data matching network (2D3D-MatchNet).
  • At least one matching point pair means that the number of matching point pairs may be one, or the number of matching point pairs may be more than one. Optionally, the number of matching point pairs is equal to 6 or greater than 6.
  • the at least one matching point pair obtain a first conversion relationship between the first pixel coordinate system of the first image to be processed and the world coordinate system.
  • the first pixel coordinate system is the pixel coordinate system of the first image to be processed.
  • the coordinates of a pixel point in the first image to be processed in the first pixel coordinate system can be converted into the coordinates of an object point corresponding to the pixel point in the world coordinate system through the first conversion relationship.
  • the image processing device takes the first conversion relationship as the first unknown conversion relationship, and according to the coordinates of the pixels in a matching point pair in the first pixel coordinate system, the data of the matching point pair The relationship between the coordinates of the point in the world coordinate system and the first unknown transformation relationship is obtained to obtain a coordinate transformation equation.
  • the image processing device can obtain at least one coordinate transformation equation according to at least one matching point pair. By combining at least one equation, p can be calculated as the first conversion relationship. Optionally, the image processing device calculates p by performing singular value decomposition on a system of equations obtained by combining at least one equation.
  • the relevant personnel can obtain the relationship between the pixel coordinate system of the two-dimensional image and the world coordinate system based on the technical solution provided by this embodiment when constructing the three-dimensional data of the target scene and collecting the two-dimensional image of the target scene.
  • the conversion relationship, and then the coordinates of the object point corresponding to any pixel point in the two-dimensional image in the world coordinate system can be determined according to the conversion relationship.
  • the coordinates of the target object in the image captured by the camera can be used to determine the coordinates of the target object in the world coordinate system. Position, and then the trajectory of the target object in the world coordinate system can be obtained.
  • the displacement between the same-named points in the binocular image (hereinafter referred to as parallax displacement) can be determined, wherein the binocular image refers to two different imaging devices ( Hereinafter, it will be referred to as a binocular imaging device) to capture two images of the same object from different positions at the same time, and the same object point corresponds to the pixels in different images in the binocular image as points with the same name.
  • Figure 3 shows two images in the binocular image, where pixel A and pixel C have the same name as each other, and pixel B and pixel D have the same name as each other.
  • the binocular image includes the first image and the second image
  • the first intermediate conversion relationship between the pixel coordinate system of the first image and the world coordinate system can be determined, and the second The second intermediate conversion relationship between the pixel coordinate system of the second image and the world coordinate system.
  • the second coordinates of the object point b corresponding to the pixel point a in the world coordinate system are determined according to the first intermediate conversion relationship.
  • the parallax displacement between pixel point a and pixel point c is obtained.
  • the parallax displacement between any pair of points with the same name in the first image and the second image can be determined.
  • the parallax displacements of the first image and the second image are determined according to the parallax displacements between all points of the same name in the first image and the second image.
  • the image processing apparatus obtains at least one matching point pair by performing matching processing on the first image to be processed and the three-dimensional data. Furthermore, the conversion relationship (ie, the first conversion relationship) between the pixel coordinate system of the first image to be processed and the world coordinate system is obtained according to at least one matching point pair.
  • the first image to be processed includes first pixels, and the image processing device further performs the following steps:
  • the three-dimensional coordinates of the first object point refer to the coordinates of the first object point in the world coordinate system.
  • the coordinates of the first pixel point in the first pixel coordinate system are the coordinates of the drone in the first pixel coordinate system
  • the three-dimensional coordinates of the first object point are the coordinates of the drone in the world coordinate system .
  • the first pixel in this embodiment is only an example, and it should not be understood that the first image to be processed only includes one pixel, and only one pixel in the first image to be processed can be obtained according to the first conversion relationship
  • the first image to be processed may include s pixels, where s is a positive integer.
  • the image processing device can obtain the coordinates of one or more object points corresponding to one or more pixel points in the first image to be processed in the world coordinate system according to the first conversion relationship.
  • the foregoing target scene includes a first plane.
  • the first plane is any plane in the target scene.
  • the first plane may be the ground in the target scene; for another example, the first plane may be a desktop in the target scene; for another example, the first plane may be a wall in the target scene.
  • the image processing device also performs the following steps:
  • the image processing device receives the plane equation input by the user through the input component to obtain the equation of the first plane in the world coordinate system.
  • the image processing device receives the plane equation sent by the terminal to obtain the equation of the first plane in the world coordinate system.
  • the above-mentioned first plane in the world coordinate system and the above-mentioned at least one matching point pair obtain the second conversion relationship between the above-mentioned first pixel coordinate system and the projected coordinate system, and the plane where the above-mentioned projected coordinate system is located is the above-mentioned
  • the first plane the above-mentioned second conversion relationship characterizes the conversion relationship between the coordinates of the second pixel point and the coordinates of the first projection point
  • the above-mentioned second pixel point is a pixel point in the above-mentioned first image to be processed
  • the point is a projection point of the second object point on the first plane
  • the second object point is an object point corresponding to the second pixel point.
  • the second pixel is any pixel in the first image to be processed.
  • the second pixel point may be the same as the first pixel point, or the second pixel point may be different from the first pixel point.
  • the projection point of the object point corresponding to the pixel point in the first image to be processed on the first plane is called the pixel projection point.
  • the coordinates of the pixel projection point corresponding to any pixel point in the first image to be processed in the projected coordinate system can be obtained through the second conversion relationship, wherein the projected coordinate system is a plane coordinate system, and the location where the projected coordinate system is located The plane is the first plane.
  • the coordinates of a point in the first plane in the projected coordinate system can be used to represent the position of the point in the first plane.
  • the first image to be processed includes a pixel point a1 and a pixel point b1, wherein the object point corresponding to the pixel point a1 is the object point A1, the object point corresponding to the pixel point b1 is the object point B1, and the object point A1 is in the first
  • the projection point on the plane is the projection point c1
  • the projection point of the object point B1 on the first plane is the projection point d1.
  • the coordinates of the projection point c1 in the projection coordinate system can be obtained, and according to the second conversion relationship and the coordinates of the pixel point b1 in the first pixel coordinate system , the coordinates of the projected point d1 in the projected coordinate system can be obtained.
  • the origin of the projected coordinate system is point C1 on the ground
  • the positive direction of the horizontal axis of the projected coordinate system is due east
  • the positive direction of the vertical axis of the projected coordinate system is due south
  • the projected coordinate system The unit scale of the horizontal axis of the projected coordinate system represents one meter
  • the unit scale of the vertical axis of the projected coordinate system represents one meter.
  • the projected point d1 is in the due east direction of point C1, and the distance from C1 Point 6 meters.
  • the world coordinate system is oxyz, where o is the origin, ox is the horizontal axis, oy is the vertical axis, and oz is the vertical axis.
  • the image processing device obtains the first rotation relationship between the first plane and the reference plane according to the equation of the first plane in the world coordinate system and the world coordinate system, wherein the reference plane is one of the following: xoy plane, xoz plane, yoz plane.
  • the image processing device obtains a third conversion relationship between the pixel coordinate system and the reference plane based on at least one matching point pair, wherein the third conversion relationship represents the conversion relationship between the coordinates of the reference pixel point and the coordinates of the reference projection point, and the reference pixel
  • the point is a pixel point in the first image to be processed
  • the reference projection point is a projection point of the reference object point on the reference plane
  • the reference object point is an object point corresponding to the reference pixel point.
  • the image processing device multiplies the third conversion relationship by the first rotation relationship to obtain the second conversion relationship.
  • the image processing device obtains the second conversion relationship by performing step 401 and step 402, and then obtains the pixel projection point corresponding to any pixel in the first image to be processed in the projected coordinate system according to the second conversion relationship coordinates below.
  • the position of the pixel projection point can be determined from the two-dimensional map of the first plane.
  • the position of the first pixel point in the first pixel coordinate system is the coordinate of the person in the first pixel coordinate system.
  • the image processing device can obtain the position of the pixel projection point corresponding to the first pixel on the ground.
  • the projection point of the person on the ground can be displayed on the two-dimensional map of the ground.
  • the position of the first pixel point in the first pixel coordinate system is the coordinate of the drone in the first pixel coordinate system.
  • the image processing device can obtain the position of the pixel projection point corresponding to the first pixel on the ground. According to this position, the projection point of the drone on the ground can be displayed on the two-dimensional map of the ground.
  • the image viewing angle may be converted according to the second conversion relationship.
  • the image viewing angle is parallel to the ground.
  • the image angle of view of the first image to be processed is converted according to the second conversion relationship to obtain a converted image, and in the converted image, the image angle of view is perpendicular to the ground.
  • the first image to be processed is captured by a target imaging device.
  • the first image to be processed may be corrected according to the second conversion relationship, so as to correct the imaging distortion of the target imaging device.
  • the first plane includes any two coordinate axes of the world coordinate system.
  • the world coordinate system is oxyz. If the first plane includes the x-axis and the y-axis, then the first plane is the xoy plane; if the first plane includes the x-axis and the z-axis, then the first plane is the xoz plane; if the first plane includes the y-axis and the z-axis, then The first plane is the yoz plane.
  • step 402 can be implemented through steps 4021 to 4022, and the image processing device also performs the following steps:
  • step 203 For the implementation of this step, reference may be made to step 203, which will not be repeated here.
  • the image processing device obtains the second conversion by removing the third column under the first conversion relationship relation. For example, suppose the first conversion relation is Remove the third column of the first conversion relationship to get That is, the second conversion relationship.
  • the image processing device obtains the second conversion by removing the second column under the first conversion relationship relation. For example, suppose the first conversion relation is Remove the second column of the first conversion relationship to get That is, the second conversion relationship.
  • the image processing device obtains the second conversion by removing the first column under the first conversion relationship relation. For example, suppose the first conversion relation is Remove the first column of the first conversion relationship to get That is, the second conversion relationship.
  • the image processing device obtains the second conversion relationship by executing step 4021 and step 4022, which can reduce the amount of data processing and increase the processing speed.
  • the image processing device obtains the second conversion relationship by performing step 4022 . That is, the image processing apparatus executes step 201, step 202, step 203, and step 4022 in sequence to obtain the second conversion relationship.
  • the image processing device also performs the following steps:
  • the second image to be processed and the first image to be processed are acquired by the same imaging device, the second image to be processed includes a first plane and an object frame, and the object The frame contains the target object, and the pixel point area contained in the object frame includes the third pixel point.
  • the second image to be processed and the first image to be processed may be the same image, or may be different images collected by the same imaging device.
  • the first image to be processed is acquired by the camera on August 27, 2021
  • the second image to be processed is acquired by the camera on August 28, 2021.
  • the third pixel is any pixel in the pixel area included in the object frame.
  • the third pixel point may be the same as the first pixel point, the third pixel point may also be the same as the second pixel point, or the third pixel point may be different from both the first pixel point and the second pixel point.
  • the second image to be processed includes a pixel point a2, a pixel point b2, and a pixel point c2.
  • the first pixel point may be pixel point a2, the second pixel point may be pixel point b2, and the third pixel point may be pixel point c2.
  • the first pixel point and the second pixel point may be pixel point a2, and the third pixel point may be pixel point b2.
  • the first pixel point and the third pixel point may be pixel point a2, and the second pixel point may be pixel point b2.
  • the second pixel point and the third pixel point may be pixel point a2, and the first pixel point may be pixel point b2.
  • the first pixel point, the second pixel point and the third pixel point may all be the pixel point a2.
  • the image processing device also performs the following steps:
  • the conversion relationship between the pixel coordinate system and the projection coordinate system of the target image can be determined according to the second conversion relationship.
  • the target image is an image collected by a target imaging device
  • the target imaging device is an imaging device that collects a first image to be processed.
  • the image processing device can determine a fourth transformation relationship between the pixel coordinate system (ie, the second pixel coordinate system) and the projection coordinate system of the second image to be processed according to the second transformation relationship. According to the fourth conversion relationship and the coordinates of the third pixel point in the second pixel coordinate system, the coordinates of the second projected point in the projected coordinate system are obtained.
  • the target object is a person
  • the first plane is the ground
  • the projection point of the person on the ground is point A2 on the ground.
  • the projected coordinate system is the two-dimensional coordinate system of the plane where the ground is located.
  • the image processing device can determine the coordinates of point A2 in the projected coordinate system by executing step 502 .
  • the image processing device can obtain the second projected point according to the coordinates of the second projected point in the projected coordinate system position in the first plane.
  • the position of the second projection point in the first plane is referred to as the first position.
  • the first plane is the ground
  • the origin of the projected coordinate system is point A3 on the ground
  • the positive direction of the horizontal axis of the projected coordinate system is due east
  • the positive direction of the vertical axis of the projected coordinate system is due south
  • the projected coordinate system The unit scale of the horizontal axis of the projected coordinate system represents one meter
  • the unit scale of the vertical axis of the projected coordinate system represents one meter.
  • the projected point of the target object on the ground is in the south direction of point A3 and is 8 meters away from point A3.
  • the image processing device can determine the projection point of the target object on the first plane by executing steps 501 to 503 . That is, according to steps 501 to 503, the coordinates of the target object in the projected coordinate system can be determined according to the coordinates of the target object in the pixel coordinate system of the target image, that is, the position of the target object in the first plane can be determined.
  • the target object can be positioned according to the first conversion relationship and the target image.
  • the first plane is the ground on the second floor of the shopping mall
  • the target imaging device is the camera on the second floor.
  • the camera is used to shoot the second floor of the shopping mall to obtain the first image to be processed.
  • the first image to be processed and the three-dimensional data of the second floor of the shopping mall are processed to obtain the second conversion relationship between the pixel coordinate system and the projected coordinate system of the first image to be processed.
  • the image collected by the camera is used as the second image to be processed, and then the position of any object in the second image to be processed on the ground of the second floor can be determined according to the second conversion relationship and the second image to be processed Location. For example, when customer A appears within the shooting range of the camera, the camera captures an image including customer A as the second image to be processed, and then it can be determined that customer A is in the second image according to the second conversion relationship and the second image to be processed. Location on the ground floor.
  • the acquisition conditions for the target imaging device to acquire the first image to be processed are the same as the acquisition conditions for the target imaging device to acquire the second image to be processed.
  • Collection conditions include: collection location and shooting angle. Wherein, the collection position is the position when the target imaging device collects the image, and the shooting angle is the shooting angle when the target imaging device collects the image.
  • the target imaging device acquires the first image to be processed and the second image to be processed at a.
  • the collection condition includes a shooting angle
  • the shooting angle at which the target imaging device collects the first image to be processed is the same as the shooting angle at which the target imaging device collects the second image to be processed.
  • the first pixel coordinate system and the second pixel coordinate system can be made the same.
  • the same between the first pixel coordinate system and the second pixel coordinate system means that the conversion relationship between the first pixel coordinate system and the world coordinate system is the same as the conversion relationship between the second pixel coordinate system and the world coordinate system, that is, the first The conversion relationship between the two-pixel coordinate system and the world coordinate system is the first conversion relationship.
  • the conversion relationship between the first pixel coordinate system and the projected coordinate system is the same as the conversion relationship between the second pixel coordinate system and the projected coordinate system. Therefore, the image processing device may use the second conversion relationship as a conversion relationship between the second pixel coordinate system and the projected coordinate system.
  • the amount of data processing for determining the conversion relationship between the second pixel coordinate system and the projected coordinate system can be reduced, thereby reducing the amount of data processing for obtaining the first position.
  • the image processing device also performs the following steps:
  • the map of the first plane is a two-dimensional map.
  • the map of the first plane includes a two-dimensional CAD drawing of the first plane.
  • the image processing apparatus receives the map of the first plane input by the user through the input component to acquire the map of the first plane.
  • the image processing apparatus receives the map of the first plane sent by the terminal to acquire the map of the first plane.
  • the image processing device When the image processing device obtains the first position, it can determine the position of the target object in the map according to the first position (that is, the above-mentioned second position), and then realize the target object by displaying the second position of the target object in the map. Visualize the position in the first plane.
  • the image processing apparatus uses the first location as the second location.
  • the target scene is a warehouse where spare parts (such as screws, nuts, and wrenches) are placed, and there are multiple shelves in the warehouse.
  • the shelf a in the plurality of shelves has 3 storage layers in total.
  • the image processing device takes the image captured by the warehouse as the second image to be processed (the second image to be processed includes rack a), uses the three-dimensional point cloud of the warehouse as three-dimensional data, and stores the second layer of the rack a
  • the plane where it is located is taken as the first plane.
  • the conversion relationship between the pixel coordinate system and the projected coordinate system of the second image to be processed can be obtained, that is, the second conversion relationship, wherein the plane where the projected coordinate system is located is the first plane.
  • the image processing device can obtain the coordinates of the screw b in the pixel coordinate system of the second image to be processed and the second conversion relationship according to The coordinates of the second projected point in the projected coordinate system. Furthermore, the first position of the second projected point in the shelf on the second floor can be obtained according to the coordinates of the second projected point in the projected coordinate system.
  • the image processing device may acquire the map of the second-tier shelf, and use the position of the second projection point in the second-tier shelf as the position of the screw b in the second-tier shelf. According to the position of screw b in the second-tier shelf, screw b is displayed on the map of the second-tier shelf.
  • the image processing device also performs the following steps:
  • the timestamp at the third location is different from the timestamp at the second location.
  • the image processing apparatus receives a third position input by a user through an input component.
  • the image processing apparatus receives the third location sent by the terminal.
  • the image processing device uses the second position and the third position as two endpoints of the track respectively to determine the track of the target object on the map.
  • the image processing device determines the trajectories of the second position and the third position in the map as the trajectories of the target object.
  • the image processing device can realize the visual display of the trajectory of the target object in the first plane by displaying the trajectory of the target object on the map.
  • the object frame includes a person frame
  • the target object includes a target person
  • the first plane is a ground in the target scene.
  • the image processing device can determine the projection point of the target person on the ground, and then can display the position of the target person on the map on the ground.
  • Building A is a 20-story building.
  • the image processing device takes the image obtained by shooting the scene on the eighth floor as the second image to be processed, takes the three-dimensional point cloud of the scene on the eighth floor as the three-dimensional data, and takes the plane where the eighth floor is located as the first plane .
  • the conversion relationship between the pixel coordinate system and the projected coordinate system of the second image to be processed can be obtained, that is, the second conversion relationship.
  • the image processing device can obtain the coordinates of the second projected point in the projected coordinate system according to the coordinates of the target person in the pixel coordinate system of the second image to be processed and the second conversion relationship. Furthermore, the position of the second projected point in the eighth layer can be obtained according to the coordinates of the second projected point in the projected coordinate system.
  • the image processing device can obtain the map of the 8th layer, and according to the position of the second projected point in the 8th layer as the position of the target person in the 8th layer, and in the map of the 8th layer Shows the location of the target person. In this way, the indoor position of the target person can be displayed on the map.
  • the third pixel point is a pixel point on the lower bottom of the object frame, and the lower bottom is a side of the object frame that intersects with the first plane.
  • the image processing device when the third pixel point is a pixel point on the lower bottom edge of the object frame, according to the third pixel point in the pixel coordinate system of the second image to be processed
  • the following coordinates and the second conversion relationship obtain the coordinates of the second projected point in the projected coordinate system, which can improve the accuracy of the coordinates of the second projected point in the projected coordinate system.
  • the above-mentioned third pixel point is a pixel point on the lower bottom of the above-mentioned object frame, and the above-mentioned lower bottom is the horizontal side with the largest vertical coordinate, and the above-mentioned horizontal side is the pixel point in the above-mentioned object frame parallel to the above-mentioned The side of the horizontal axis of the second pixel coordinate system.
  • the object frame is a person frame, that is, the person frame includes pedestrians.
  • the lateral sides of the character frame include AB and CD. Since the ordinate of CD is larger than that of AB, CD is the bottom edge.
  • the third pixel point is a midpoint of the lower bottom edge.
  • the midpoint is the probability of the pixel point where the target object intersects the first plane, and other pixels (pixels on the bottom edge except the midpoint) are the probability that the target object intersects the first plane Intersecting pixels have a high probability.
  • the image processing device obtains the coordinates of the third pixel point in the second pixel coordinate system and the second conversion relationship to obtain the coordinates of the second projected point in the projected coordinate system.
  • the coordinates of the second projected point can improve the accuracy of the coordinates of the second projected point in the projected coordinate system.
  • the foregoing target scene is an indoor scene. Since the amount of data processing required to construct the 3D data of the indoor scene is smaller than the amount of data processing required to construct the outdoor scene, when the target scene is an indoor scene, constructing the 3D data of the target scene can reduce the amount of data processing.
  • the image processing device scans the target scene using lidar to obtain 3D data of the target scene, if the target scene is an indoor scene, the data processing amount can be reduced.
  • the embodiments of the present disclosure also provide several possible application scenarios.
  • Scenario 1 At present, in order to enhance the safety of work, life or social environment, camera equipment will be installed in various regional places to record security protection based on video stream information. With the rapid increase of the number of cameras in public places, how to effectively determine the image containing the target object through massive video streams, and determine the trajectory and other information of the target object based on the information of the image is of great significance.
  • the location of the target object and the track of the target object can be displayed on the map, so that relevant personnel can know the whereabouts information of the target object.
  • the staff in area A use the server as an image processing device, and establish a communication connection between the server and the cameras in area A.
  • the server acquires the image captured by camera B as the first image to be processed, and the server acquires the 3D model of the shooting scene of camera B as 3D data. Based on the technical solution provided by the embodiment, the server can obtain the first conversion relationship between the pixel coordinate system and the world coordinate system of the image captured by the B camera.
  • the server takes the ground in the shooting scene of the B camera as the first plane, and obtains the second conversion relationship between the pixel coordinate system and the projected coordinate system of the image captured by the B camera by performing step 402, wherein the plane where the projected coordinate system is located for the ground.
  • the plane where the ground is located is the xoy plane in the world coordinate system, and the server removes the third column in the first conversion relationship to obtain the second conversion relationship.
  • the staff in area A want to find Zhang San.
  • the staff in area A compared Zhang San's face image with the image collected by the camera in area A through the server, and determined that image C collected by camera B contained Zhang San.
  • the server obtains Zhang San's position on the ground according to the coordinates of Zhang San in the pixel coordinate system of the image C and the second conversion relationship. Furthermore, the position of Zhang San can be displayed on the map on the ground according to the position.
  • the server can obtain the coordinate system between the pixel coordinate system and the projected coordinate system of any image captured by any camera in area A. conversion relationship.
  • the server can then determine the location where Zhang San appeared in area A based on all the images containing Zhang San and the conversion relationship corresponding to the collected images containing Zhang San, and then can be displayed on the map of area A according to the collection time of the images containing Zhang San Display Zhang San's trajectory.
  • Scenario 2 There are many customers in a large shopping mall. How to determine the products that customers like and recommend them to customers is of great significance to increase the sales of products.
  • the customer's whereabouts in the mall can be determined, and then the commodities that the customer may like can be determined according to the whereabouts.
  • the staff of mall A use the server as an image processing device, and establish a communication connection between the server and the camera of mall A.
  • the server acquires the image captured by camera B as the first image to be processed, and the server acquires the 3D model of the scene shot by camera B as 3D data. Based on the technical solutions provided by the embodiments of the present disclosure, the server can obtain the first conversion relationship between the pixel coordinate system and the world coordinate system of the image captured by the B camera.
  • the server takes the ground in the shooting scene of the B camera as the first plane, and obtains the second conversion relationship between the pixel coordinate system and the projected coordinate system of the image captured by the B camera by performing step 402, wherein the plane where the projected coordinate system is located for the ground.
  • the plane where the ground is located is the xoy plane in the world coordinate system, and the server removes the third column in the first conversion relationship to obtain the second conversion relationship.
  • the staff of mall A wants to find Zhang San.
  • the staff of mall A compares Zhang San's face image with the image collected by the camera of mall A through the server, and determines that the image C collected by camera B includes Zhang San.
  • the server obtains Zhang San's position on the ground according to the coordinates of Zhang San in the pixel coordinate system of the image C and the second conversion relationship. Furthermore, the position of Zhang San can be displayed on the map on the ground according to the position.
  • the server can obtain the coordinate system between the pixel coordinate system and the projected coordinate system of any image captured by any camera in the shopping mall A. conversion relationship.
  • the server can then determine the location where Zhang San appeared in the A shopping mall according to all the images containing Zhang San and the conversion relationship corresponding to the collected images containing Zhang San, and then according to the collection time of the images containing Zhang San on the map of the A shopping mall Show Zhang San's whereabouts. It should be understood that the above-mentioned whereabouts include the location where Zhang San appears and the length of time Zhang San stays at the location.
  • the server can then obtain Zhang San's shopping preference according to Zhang San's whereabouts. For example, based on Zhang San's whereabouts, the server determines that Zhang San's stay in the sneaker zone is 1.5 hours, Zhang San's stay in the women's clothing zone is 3 minutes, and Zhang San's stay in the snacks zone is 0.5 hour. Since Zhang San stays the longest in the sports shoe zone, the server determines that Zhang San has the highest degree of interest in sports shoes. Correspondingly, the server determines that Zhang San is less interested in snacks than in sports shoes, and that Zhang San is not interested in women's clothing. In this way, when the server determines that Zhang San enters the A mall, the server can push information about sports shoes and snacks to Zhang San, wherein the amount of information about sports shoes is more than the amount of information about snacks.
  • 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. 6 is a schematic structural diagram of an image processing device provided by an embodiment of the present disclosure.
  • the image processing device 1 includes an acquisition part 11 , a matching processing part 12 and a first processing part 13 .
  • the image processing device 1 further includes a second processing part 14 . specific:
  • the acquisition part 11 is configured to acquire the first image to be processed and three-dimensional data of the target scene, the three-dimensional data including the three-dimensional coordinates of the target scene in the world coordinate system;
  • the matching processing part 12 is configured to perform matching processing on the first image to be processed and the three-dimensional data to obtain at least one matching point pair;
  • the first processing part 13 is configured to obtain a first conversion relationship between the first pixel coordinate system of the first image to be processed and the world coordinate system according to the at least one matching point pair.
  • the first image to be processed includes first pixels, and the image processing device further includes:
  • the second processing part 14 is configured to obtain the three-dimensional coordinates of the first object point according to the first conversion relationship and the coordinates of the first pixel point in the first pixel coordinate system, and the first object point is the object point corresponding to the first pixel point.
  • the target scene includes a first plane
  • the acquiring part 11 is further configured to acquire an equation of the first plane in the world coordinate system
  • the first processing part 13 is further configured to obtain a second conversion relationship between the first pixel coordinate system and a projected coordinate system according to the equation and the at least one matching point pair, and the projected coordinate system
  • the plane where it is located is the first plane
  • the second conversion relationship represents the conversion relationship between the coordinates of the second pixel point and the coordinates of the first projection point
  • the second pixel point is the first image to be processed
  • the pixel points in , the first projection point is the projection point of the second object point on the first plane, and the second object point is the object point corresponding to the second pixel point.
  • the first plane includes any two coordinate axes of the world coordinate system
  • the first processing part 13 is configured to:
  • At least one column of elements in the first conversion relationship is removed to obtain a second conversion relationship between the first pixel coordinate system and the projected coordinate system.
  • the acquisition part 11 is further configured to acquire a second image to be processed of the target scene, the second image to be processed and the first image to be processed are acquired by the same imaging device Obtained, the second image to be processed includes the first plane and an object frame, the object frame includes a target object, and the pixel point area included in the object frame includes a third pixel point;
  • the first processing part 13 is further configured to obtain the second projection point at The coordinates under the projected coordinate system, the second projected point is the projected point of the target object on the first plane;
  • the first processing part 13 is further configured to obtain the first position of the second projected point in the first plane according to the coordinates of the second projected point in the projected coordinate system.
  • the object frame includes a character frame
  • the target object includes a target character
  • the first plane is a ground in the target scene.
  • the third pixel point is a pixel point on a lower bottom of the object frame, and the lower bottom is a side of the object frame that intersects with the first plane.
  • the third pixel point is a midpoint of the lower bottom edge.
  • the acquiring part 11 is further configured to acquire a map of the first plane
  • the first processing part 13 is further configured to display a second location of the target object on the map according to the first location.
  • the acquisition part 11 is further configured to acquire a third position of the target object in the map, the third position being different from the second position;
  • the first processing part 13 is further configured to display the track of the target object on the map according to the second position and the third position.
  • the target scene is an indoor scene.
  • the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the methods described in the method embodiments above, and its specific implementation can refer to the description of the method embodiments above. For brevity, here No longer.
  • FIG. 7 is a schematic diagram of a hardware structure of an image processing device provided by an embodiment of the present disclosure.
  • the image processing device 2 includes a processor 21 , a memory 22 , an input device 23 and an output device 24 .
  • the processor 21 , the memory 22 , the input device 23 and the output device 24 are coupled through connectors, and the connectors include various interfaces, transmission lines or buses, etc., which are not limited in this embodiment of the present disclosure.
  • coupling refers to interconnection in a specific manner, including direct connection or indirect connection through other devices, for example, connection through various interfaces, transmission lines, and buses.
  • the processor 21 may be one or more graphics processing units (graphics processing unit, GPU), and in the case where the processor 21 is a GPU, the GPU may be a single-core GPU or a multi-core GPU.
  • the processor 21 may be a processor group composed of multiple GPUs, and the multiple processors are coupled to each other through one or more buses.
  • the processor may also be other types of processors, etc., which are not limited in this embodiment of the present disclosure.
  • the memory 22 can be used to store computer program instructions and various computer program codes including program codes for implementing the solutions of the present disclosure.
  • 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 images to be processed and three-dimensional data obtained through the input device 23, or the memory 22 can be used to store It can also be used to store the first conversion relationship obtained by the processor 21, etc., and the embodiment of the present disclosure does not limit the specific data stored in the memory.
  • FIG. 7 only shows a simplified design of an image processing device.
  • the image processing device may also include other necessary components, including but not limited to any number of input/output devices, processors, memories, etc., and all image processing devices that can implement the embodiments of the present disclosure are included in this within the scope of public protection.
  • the disclosed systems, devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • all or part of them may be implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, all or part of the processes or functions according to the embodiments of the present disclosure will be generated.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in or transmitted via a computer-readable storage medium.
  • the computer instructions can be sent from a website site, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) Another website site, computer, server or data center for transmission.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device 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.
  • a magnetic medium for example, a floppy disk, a hard disk, a magnetic tape
  • an optical medium for example, a digital versatile disc (digital versatile disc, DVD)
  • a semiconductor medium for example, a solid state disk (solid state disk, SSD)
  • the processes can be completed by computer programs to instruct related hardware.
  • the programs can be stored in computer-readable storage media.
  • When the programs are executed may include the processes of the foregoing method embodiments.
  • the aforementioned storage medium includes: various media capable of storing program codes such as read-only memory (ROM) or random access memory (RAM), magnetic disk or optical disk.
  • the image processing method, device, electronic device, and computer-readable storage medium provided by the embodiments of the present disclosure obtain at least one matching point pair between the image to be processed and the three-dimensional data through matching processing, and then obtain the to-be-processed point pair based on at least one matching point pair.
  • the calculation of parallax displacement in the binocular image, and related image processing such as planar projection can make the calculation of the coordinate transformation relationship no longer receive the parameters of the imaging device The impact of the change, thereby reducing the labor cost and time cost of obtaining the conversion relationship between the pixel coordinate system and the world coordinate system by calibrating the imaging device, and improving the efficiency of image processing.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Development Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Game Theory and Decision Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Multimedia (AREA)
  • Image Processing (AREA)

Abstract

本公开公开了一种图像处理方法及装置、电子设备及计算机可读存储介质。该方法包括:获取目标场景的第一待处理图像和三维数据,所述三维数据包括所述目标场景在世界坐标系下的三维坐标;对所述第一待处理图像和所述三维数据进行匹配处理,得到至少一个匹配点对;依据所述至少一个匹配点对,得到所述第一待处理图像的第一像素坐标系与所述世界坐标系之间的第一转换关系。

Description

图像处理方法及装置、电子设备及计算机可读存储介质
相关申请的交叉引用
本公开基于申请号为202111013410.6、申请日为2021年8月31日、发明名称为“图像处理方法及装置、电子设备及计算机可读存储介质”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本公开作为参考。
技术领域
本公开涉及图像处理技术领域,尤其涉及一种图像处理方法及装置、电子设备及计算机可读存储介质。
背景技术
依据成像设备的参数(包括成像设备的内参和成像设备的外参),可得到成像设备采集到的图像的像素坐标系与世界坐标系之间的转换关系,进而可以据该转化关系和像素点在成像设备采集到的图像的像素坐标系中的坐标,得到该像素点所对应的物点在世界坐标系下的坐标。但成像设备的参数需要通过对成像设备进行标定得到,而对成像设备进行标定所带来的人力成本和时间成本较高。
发明内容
本公开实施例提供一种图像处理方法及装置、电子设备及计算机可读存储介质。
第一方面,提供了一种图像处理方法,所述方法包括:
获取目标场景的第一待处理图像和三维数据,所述三维数据包括所述目标场景在世界坐标系下的三维坐标;
对所述第一待处理图像和所述三维数据进行匹配处理,得到至少一个匹配点对;
依据所述至少一个匹配点对,得到所述第一待处理图像的第一像素坐标系与所述世界坐标系之间的第一转换关系。
第二方面,提供了一种图像处理装置,所述装置包括:
获取部分,被配置为获取目标场景的第一待处理图像和三维数据,所述三维数据包括所述目标场景在世界坐标系下的三维坐标;
匹配处理部分,被配置为对所述第一待处理图像和所述三维数据进行匹配处理,得到至少一个匹配点对;
第一处理部分,被配置为依据所述至少一个匹配点对,得到所述第一待处理图像的第一像素坐标系与所述世界坐标系之间的第一转换关系。
结合本公开任一实施方式,所述第一待处理图像包括第一像素点,所述图像处理装置还包括:
第二处理部分,被配置为依据所述第一转换关系和所述第一像素点在所述第一像素坐标系下的坐标,得到第一物点的三维坐标,所述第一物点为所述第一像素点所对应的物点。
第三方面,本公开实施例提供了一种电子设备,包括:处理器和存储器,所述存储器被配置为存储计算机程序代码,所述计算机程序代码包括计算机指令,在所述处理器执行所述计算机指令的情况下,所述电子设备执行如上述第一方面及其任意一种可能实现的方式的方法。
第四方面,本公开实施例了提供了另一种电子设备,包括:处理器、发送装置、输入装置、输出装置和存储器,所述存储器被配置为存储计算机程序代码,所述计算机程序代码包括计算机指令,在所述处理器执行所述计算机指令的情况下,所述电子设备执行如上述第一方面及其任意一种可能实现的方式的方法。
第五方面,本公开实施例了提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序包括程序指令,在所述程序指令被处理器执行的情况下,使所述处理器执行如上述第一方面及其任意一种可能实现的方式的方法。
第六方面,本公开实施例了提供了一种计算机程序产品,所述计算机程序产品包括计算机程序或指令,在所述计算机程序或指令在计算机上运行的情况下,使得所述计算机执行上 述第一方面及其任一种可能的实现方式的方法。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。
本公开实施例具有以下有益效果:
本公开实施例提供了一种图像处理方法、装置、电子设备和计算机可读存储介质;所述方法包括:获取目标场景的第一待处理图像和三维数据,三维数据包括目标场景在世界坐标系下的三维坐标;对第一待处理图像和三维数据进行匹配处理,得到至少一个匹配点对;依据至少一个匹配点对,得到第一待处理图像的第一像素坐标系与世界坐标系之间的第一转换关系。在上述方法中,通过匹配处理得到待处理图像和三维数据之间的至少一个匹配点对,进而根据至少一个匹配点对得到待处理图像的像素坐标系与世界坐标系之间的转换关系,使得坐标转换关系的计算不再收到成像设备参数变化的影响,从而减少了通过对成像设备进行标定,来得到像素坐标系与世界坐标系的转换关系的人力成本和时间成本,提高了图像处理的效率。
附图说明
为了更清楚地说明本公开实施例或背景技术中的技术方案,下面将对本公开实施例或背景技术中所需要使用的附图进行说明。
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。
图1为本公开实施例提供的一种像素坐标系示意图;
图2为本公开实施例提供的一种图像处理方法的流程示意图一;
图3为本公开实施例提供的一种双目图像示意图;
图4为本公开实施例提供的一种图像处理方法的流程示意图二;
图5为本公开实施例提供的一种下底边示意图;
图6为本公开实施例提供的一种图像处理装置的结构示意图;
图7为本公开实施例提供的一种图像处理装置的硬件结构示意图。
具体实施方式
为了使本技术领域的人员更好地理解本公开方案,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。
应当理解,在本公开中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上,“至少两个(项)”是指两个或三个及三个以上,“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“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。“以下至少一项(个)”或其类似表达。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本公开的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
为了增强工作、生活或者社会环境中的安全性,会在各个区域场所内安装摄像设备,以便根据视频流信息进行安全防护。随着公共场所内摄像头数量的快速增长,如何有效的通过海量视频流确定包含目标对象的图像,并根据该图像的信息确定目标对象在世界坐标系下的位置,以及目标对象在世界坐标系下的轨迹具有重要意义。
传统方法通常将采集包含目标对象的图像的摄像头在世界坐标系下的位置,作为目标对象在世界坐标系下的位置。但由于摄像头的拍摄不仅包含目标对象还包含其他物体,通过这种方法得到的目标对象在世界坐标系下的位置显然误差较大。
为降低误差,目前的技术在确定图像包含目标对象后,依据目标对象在图像的像素坐标系下的坐标和摄像头的参数(包括摄像头的内参和摄像头的外参),得到目标对象在世界坐标系下的位置。
这种方法虽然可以提高目标对象在世界坐标系下的位置的精度,但是摄像头的参数需要通过对摄像头进行标定得到,而在摄像头的使用过程中,摄像头的参数处于不断变换的状态。这就导致通过该种方法得到世界坐标系下的位置需要经常对摄像头进行标定,进而带来非常高的人力成本和时间成本。
基于此,本公开实施例提供了一种图像处理方法,以减少得到图像的像素坐标系与世界坐标系之间的转换关系所带来的人力成本和时间成本,提高图像处理的效率。
本公开实施例中的像素坐标系的横坐标用于表示像素点所在的列数,像素坐标系下的纵坐标用于表示像素点所在的行数。例如,在图1所示的图像中,以图像的左上角为坐标原点O、平行于图像的行的方向为X轴的方向、平行于图像的列的方向为Y轴的方向,构建像素坐标系为XOY。横坐标和纵坐标的单位均为像素点。例如,图1中的像素点A11的坐标为(1,1),像素点A23的坐标为(3,2),像素点A42的坐标为(2,4),像素点A34的坐标为(4,3)。
本公开实施例的执行主体为图像处理装置,其中,图像处理装置可以是任意一种可执行本公开方法实施例所公开的技术方案的电子设备。可选的,图像处理装置可以是以下中的一种:手机、计算机、平板电脑、可穿戴智能设备。
应理解,本公开方法实施例还可以通过处理器执行计算机程序代码的方式实现。下面结合本公开实施例中的附图对本公开实施例进行描述。请参阅图2,图2是本公开实施例提供的一种图像处理方法的流程示意图。
201、获取目标场景的第一待处理图像和三维数据,上述三维数据包括上述目标场景在世界坐标系下的三维坐标。
本公开实施例中,目标场景可以是任意场景。例如,目标场景是教室内的场景;又例如,目标场景是商场内的场景;再例如,目标场景是地下停车场;再例如,目标场景是露天运动场。
本公开实施例中,目标场景的第一待处理图像为对目标场景进行拍摄得到的图像。例如,假设目标场景是商场内的场景。通过对商场内进行拍摄得到的图像为第一待处理图像。又例如,目标场景是露天运动场。通过对露天运动场进行拍摄得到的图像为第一待处理图像。
在一种获取第一待处理图像的实现方式中,图像处理装置接收用户通过输入组件输入的第一待处理图像获取第一待处理图像。上述输入组件包括:键盘、鼠标、触控屏、触控板和音频输入器等。
在另一种获取第一待处理图像的实现方式中,图像处理装置接收终端发送的第一待处理图像获取第一待处理图像。上述终端可以是以下任意一种:手机、计算机、平板电脑、服务器。
本公开实施例中,三维数据包括目标场景在世界坐标系下的三维坐标,示例性地,三维数据包括目标场景中任意一个点在世界坐标系下的三维坐标。
在一种可能实现的方式中,三维数据是三维地图。在另一种可能实现的方式中,三维数据是三维模型,例如,三维数据可以是三维点云;又例如,三维数据可以是三维计算机辅助设计(computer aided design,CAD)模型。
在一种获取三维数据的实现方式中,图像处理装置包括激光雷达。图像处理装置通过激光雷达扫描目标场景,得到目标场景的三维数据。
在另一种获取三维数据的实现方式中,图像处理装置接收用户通过输入组件输入的三维数据获取三维数据。
在又一种获取三维数据的实现方式中,图像处理装置接收终端发送的三维数据获取三维数据。
应理解,在本公开实施例中,获取第一待处理图像和获取三维数据可以分开执行,也可以同时执行。
202、对上述第一待处理图像和上述三维数据进行匹配处理,得到至少一个匹配点对。
本公开实施例中,匹配点对包括第一待处理图像中的一个像素点和三维数据中的一个数据点,且该像素点所对应的物点与该数据点所对应的物点相同。
在一种可能实现的方式中,图像处理装置通过以下算法中的一个实现对第一待处理图像和三维数据进行匹配处理:二维图像与三维数据的匹配方法(learned cross-domain descriptors、 LCD)、二维图像与三维数据的匹配网络(2D3D-MatchNet)。
本公开实施例中,至少一个匹配点对指,匹配点对的数量可以是一个,匹配点对的数量也可以超过一个。可选的,匹配点对的数量等于6,或大于6。
203、依据上述至少一个匹配点对,得到上述第一待处理图像的第一像素坐标系与上述世界坐标系之间的第一转换关系。
本公开实施例中,第一像素坐标系为第一待处理图像的像素坐标系。通过第一转换关系可将第一待处理图像中的像素点在第一像素坐标系下的坐标转换为与该像素点对应的物点在世界坐标系下的坐标。
在一种可能实现的方式中,图像处理装置将第一转换关系取为第一未知转换关系,依据一个匹配点对中的像素点在第一像素坐标系下的坐标、该匹配点对中数据点在世界坐标系下的坐标以及第一未知转换关系之间的关系,得到一个坐标转换方程。
例如,假设第一未知转换关系为p,p为一个3*4的矩阵。匹配点对a包括像素点b和数据点c,其中,像素点b在第一像素坐标系下的坐标为(x1,y1),数据点c在世界坐标系下的坐标为(x2,y2,z1)。那么,(x1,y1)、(x2,y2,z1)、p满足下式:(x1,y1)×p=(x2,y2,z1)。
图像处理装置依据至少一个匹配点对可得到至少一个坐标转换方程。通过将至少一个方程联立,可计算得到p作为第一转换关系。可选的,图像处理装置通过对联立至少一个方程得到的方程组进行奇异值分解计算得到p。
在一个场景中,相关人员可在构建目标场景的三维数据并采集目标场景的二维图像的情况下,基于本实施例提供的技术方案,得到二维图像的像素坐标系与世界坐标系之间的转换关系,进而可依据该转换关系确定二维图像中任意一个像素点所对应的物点在世界坐标系下的坐标。
例如,为了增强工作、生活或者社会环境中的安全性,会在各个区域场所内安装摄像设备,以便根据视频流信息进行安全防护。随着公共场所内摄像头数量的快速增长,如何有效的通过海量视频流确定包含目标对象的图像,并根据该图像的信息确定目标对象在世界坐标系下的位置,以及目标对象在世界坐标系下的轨迹具有重要意义。
基于本实施提供的技术方案得到摄像头采集到的图像的像素坐标系与世界坐标系之间的转换关系后,可依据目标对象在摄像头采集到的图像中的坐标确定目标对象在世界坐标系下的位置,进而可得到目标对象在世界坐标系下的轨迹。
在另一个场景中,基于本实施例提供的技术方案,可确定双目图像中的同名点之间的位移(下文简称为视差位移),其中,双目图像指通过两个不同的成像设备(下文将称为双目成像设备)在同一时刻从不同位置对同一物体进行拍摄获得的两张图像,同一个物点对应双目图像中的不同图像中的像素点互为同名点。图3所示为双目图像中的两张图像,其中,像素点A与像素点C互为同名点,像素点B与像素点D互为同名点。
具体的,若双目图像包括第一图像和第二图像,基于本实施例提供的技术方案可确定第一图像的像素坐标系与世界坐标系之间的第一中间转换关系,并可确定第二图像的像素坐标系与世界坐标系之间的第二中间转换关系。获取像素点a在第一图像的像素坐标系中的第一坐标。依据第一中间转换关系确定与像素点a对应的物点b在世界坐标系下的第二坐标。依据第二坐标和第二中间转换关系确定像素点c在第二图像的像素坐标系下的第三坐标,其中,像素点c为第二图像中与物点b对应的像素点,即像素点a与像素点c互为同名点。依据第一坐标和第三坐标,得到像素点a与像素点c之间的视差位移。同理,可确定第一图像和第二图像中任一一对同名点之间的视差位移。在一些实施例中,依据第一图像和第二图像中所有同名点之间的视差位移确定第一图像和第二图像的视差位移。
本实施例中,图像处理装置通过对第一待处理图像和三维数据进行匹配处理,得到至少一个匹配点对。进而依据至少一个匹配点对得到第一待处理图像的像素坐标系与世界坐标系之间的转换关系(即第一转换关系)。
这样,即使采集第一待处理图像的摄像头的参数发生变化,也无需再对摄像头进行标定,从而可减少人力成本和时间成本。
作为一种可选的实施方式,上述第一待处理图像包括第一像素点,图像处理装置还执行以下步骤:
301、依据上述第一转换关系和上述第一像素点在上述第一像素坐标系下的坐标,得到第一物点的三维坐标,上述第一物点为上述第一像素点所对应的物点。
本步骤中,第一物点的三维坐标指第一物点在世界坐标系下的坐标。例如,假设第一像素点在第一像素坐标系下的坐标为无人机在第一像素坐标系下的坐标,那么第一物点的三维坐标为该无人机在世界坐标系下的坐标。
应理解,本实施方式中的第一像素点仅为示例,不应理解为第一待处理图像仅包括一个 像素点,以及仅可依据第一转换关系得到第一待处理图像中的一个像素点所对应的物点在世界坐标系下的坐标。在实际应用中,第一待处理图像可包括s个像素点,其中,s为正整数。图像处理装置可依据第一转换关系,得到第一待处理图像中的一个或一个以上像素点所对应的一个或一个以上物点在世界坐标系下的坐标。
作为一种可选的实施方式,上述目标场景包括第一平面。实施例中,第一平面为目标场景中的任意一个平面。例如,第一平面可以是目标场景中的地面;又例如,第一平面可以是目标场景中的桌面;再例如,第一平面可以是目标场景中的墙面。
在该种实施方式中,如图4所示,图像处理装置还执行以下步骤:
401、获取上述第一平面在上述世界坐标系下的方程。
在另一种获取第一平面在世界坐标系下的方程的实现方式中,图像处理装置接收用户通过输入组件输入的平面方程获取第一平面在世界坐标系下的方程。
在又一种获取第一平面在世界坐标系下的方程的实现方式中,图像处理装置接收终端发送的平面方程获取第一平面在世界坐标系下的方程。
402、依据上述第一平面在世界坐标系下的方程和上述至少一个匹配点对,得到上述第一像素坐标系与投影坐标系之间的第二转换关系,上述投影坐标系所在的平面为上述第一平面,上述第二转换关系表征第二像素点的坐标与第一投影点的坐标之间的转换关系,上述第二像素点为上述第一待处理图像中的像素点,上述第一投影点为第二物点在上述第一平面的投影点,上述第二物点为上述第二像素点所对应的物点。
本公开实施例中,第二像素点为第一待处理图像中的任意一个像素点。第二像素点与第一像素点可以相同,第二像素点也可以与第一像素点不同。
为表述方便,下文将第一待处理图像中的像素点所对应的物点在第一平面上的投影点称为像素投影点。
本步骤中,通过第二转换关系可得到第一待处理图像中任意一个像素点所对应的像素投影点在投影坐标系下的坐标,其中,投影坐标系为平面坐标系,投影坐标系所在的平面即为第一平面。第一平面中的点在投影坐标系下的坐标可用于表示该点在第一平面中的位置。
例如,第一待处理图像包括像素点a1和像素点b1,其中,像素点a1所对应的物点为物点A1,像素点b1所对应的物点为物点B1,物点A1在第一平面上的投影点为投影点c1,物点B1在第一平面上的投影点为投影点d1。依据第二转换关系和像素点a1在第一像素坐标系下的坐标,可得到投影点c1在投影坐标系下的坐标,依据第二转换关系和像素点b1在第一像素坐标系下的坐标,可得到投影点d1在投影坐标系下的坐标。
若第一平面为地面,投影坐标系的原点为地面上的C1点,投影坐标系的横轴的正方向为正东方向,投影坐标系的纵轴的正方向为正南方向,投影坐标系的横轴的单位刻度表示一米,投影坐标系的纵轴的单位刻度表示一米。
若投影点c1在投影坐标系下的坐标为(0,4),投影点d1在投影坐标系下的坐标为(6,0),那么投影点d1在C1点的正东方向,且距离C1点6米。
在一种可能实现的方式中,假设世界坐标系为oxyz,其中,o为原点,ox为横轴,oy为纵轴,oz为竖轴。图像处理装置依据第一平面在世界坐标系下的方程和世界坐标系,得到第一平面与参考平面之间的第一旋转关系,其中,参考平面为以下中的一个:xoy平面、xoz平面、yoz平面。
图像处理装置依据至少一个匹配点对得到像素坐标系到参考平面之间的第三转换关系,其中,第三转换关系表征参考像素点的坐标与参考投影点的坐标之间的转换关系,参考像素点为第一待处理图像中的像素点,参考投影点为参考物点在参考平面的投影点,参考物点为参考像素点所对应的物点。图像处理装置将第三转换关系与第一旋转关系相乘,可得到第二转换关系。
在一个场景中,图像处理装置通过执行步骤401和步骤402得到第二转换关系,进而可依据第二转换关系,得到第一待处理图像中任意一个像素点所对应的像素投影点在投影坐标系下的坐标。在一些实施例中,依据像素投影点在投影坐标系下的坐标,可从第一平面的二维地图中确定像素投影点的位置。
例如,假设第一平面为地面,第一像素点在第一像素坐标系下的位置为人在第一像素坐标系下的坐标。图像处理装置依据第一像素点在第一像素坐标系下的位置和第二转换关系,可得到第一像素点所对应的像素投影点在地面中的位置。依据该位置可在地面的二维地图上人在地面的投影点。
又例如,假设第一平面为地面,第一像素点在第一像素坐标系下的位置为无人机在第一像素坐标系下的坐标。图像处理装置依据第一像素点在第一像素坐标系下的位置和第二转换关系,可得到第一像素点所对应的像素投影点在地面中的位置。依据该位置,可在地面的二维地图上显示无人机在地面的投影点。
在另一个场景中,在第一平面为地面,且基于本公开实施例提供的技术方案得到第二转换关系的情况下,可依据第二转换关系转换图像视角。例如,在第一待处理图像中,图像视角与地面平行。依据第二转换关系对转换第一待处理图像的图像视角得到转换后的图像,在转换后的图像中,图像视角与地面垂直。
在又一个场景中,第一待处理图像由目标成像设备采集得到。在基于本公开实施例提供的技术方案得到第二转换关系的情况下,可依据第二转换关系对第一待处理图像进行校正,以校正目标成像设备的成像畸变。
作为一种可选的实施方式,第一平面包括世界坐标系的任意两个坐标轴。例如,世界坐标系为oxyz。若第一平面包括x轴和y轴,那么第一平面为xoy平面;若第一平面包括x轴和z轴,那么第一平面为xoz平面;若第一平面包括y轴和z轴,那么第一平面为yoz平面。
在该种实施方式,步骤402可以通过步骤4021至步骤4022实现,图像处理装置还执行以下步骤:
4021、依据上述至少一个匹配点对,得到上述第一待处理图像的第一像素坐标系与上述世界坐标系之间的第一转换关系。
本步骤的实现方式可参见步骤203,此处将不再赘述。
4022、去除上述第一转换关系中的至少一列元素,得到上述第一像素坐标系与上述投影坐标系之间的第二转换关系。
在一种可能实现的方式中,在第一平面包括x轴和y轴,即第一平面为xoy平面的情况下,图像处理装置通过将第一转换关系下的第三列去除得到第二转换关系。例如,假设第一转换关系为
Figure PCTCN2022112538-appb-000001
将第一转换关系的第三列去除得到
Figure PCTCN2022112538-appb-000002
即为第二转换关系。
在一种可能实现的方式中,在第一平面包括x轴和z轴,即第一平面为xoz平面的情况下,图像处理装置通过将第一转换关系下的第二列去除得到第二转换关系。例如,假设第一转换关系为
Figure PCTCN2022112538-appb-000003
将第一转换关系的第二列去除得到
Figure PCTCN2022112538-appb-000004
即为第二转换关系。
在一种可能实现的方式中,在第一平面包括y轴和z轴,即第一平面为yoz平面的情况下,图像处理装置通过将第一转换关系下的第一列去除得到第二转换关系。例如,假设第一转换关系为
Figure PCTCN2022112538-appb-000005
将第一转换关系的第一列去除得到
Figure PCTCN2022112538-appb-000006
即为第二转换关系。
图像处理装置通过执行步骤4021和步骤4022得到第二转换关系,可减少数据处理量,提高处理速度。
应理解,图像处理装置在第一平面包括世界坐标系的任意两个坐标轴,且图像处理装置通过执行步骤203得到第一转换关系的情况下,图像处理装置通过执行步骤4022得到第二转换关系。即图像处理装置依次执行步骤201、步骤202、步骤203、步骤4022得到第二转换关系。
作为一种可选的实施方式,图像处理装置还执行以下步骤:
501、获取所述目标场景的第二待处理图像,上述第二待处理图像与上述第一待处理图像由同一成像设备采集得到,上述第二待处理图像包括第一平面和对象框,上述对象框包含目标对象,上述对象框所包含的像素点区域包括第三像素点。
本公开实施例中,第二待处理图像与第一待处理图像可以是同一张图像,也可是同一成像设备采集到的不同图像。例如,第一待处理图像由摄像头在2021年8月27日采集得到,第二待处理图像由摄像头在2021年8月28日采集得到。
本公开实施例中,第三像素点为对象框所包含的像素点区域中的任意一个像素点。第三像素点可以与第一像素点相同,第三像素点也可以与第二像素点相同,第三像素点也可以与第一像素点、第二像素点均不同。
例如,第二待处理图像包括像素点a2、像素点b2和像素点c2。第一像素点可以是像素点a2,第二像素点可以是像素点b2,第三像素点可以是像素点c2。第一像素点和第二像素点可以是像素点a2,第三像素点可以是像素点b2。第一像素点和第三像素点可以是像素点a2, 第二像素点可以是像素点b2。第二像素点和第三像素点可以是像素点a2,第一像素点可以是像素点b2。第一像素点、第二像素点和第三像素点均可以是像素点a2。
在该种实施方式中,图像处理装置还执行以下步骤:
502、依据上述第二转换关系和上述第三像素点在第二待处理图像的第二像素坐标系下的坐标,得到第二投影点在上述投影坐标系下的坐标,上述第二投影点为上述目标对象在上述第一平面上的投影点。
因为第二转换关系表征第一像素坐标系与投影坐标系之间的转换关系,所以依据第二转换关系可确定目标图像的像素坐标系与投影坐标系之间的转换关系。本公开实施例中,目标图像为由目标成像设备采集到的图像,目标成像设备为采集第一待处理图像的成像设备。
因此,图像处理装置依据第二转换关系可确定第二待处理图像的像素坐标系(即第二像素坐标系)与投影坐标系之间的第四转换关系。依据第四转换关系和第三像素点在第二像素坐标系下的坐标,得到第二投影点在投影坐标系下的坐标。
例如,目标对象为人,第一平面为地面,人在地面上的投影点为地面上的A2点,此时投影坐标系为地面所在平面的二维坐标系。图像处理装置通过执行步骤502可确定A2点在投影坐标系中的坐标。
503、依据上述第二投影点在上述投影坐标系下的坐标,得到上述第二投影点在上述第一平面中的第一位置。
由于第一平面中的点在投影坐标系下的坐标,可用于表示该点在第一平面中的位置,图像处理装置依据第二投影点在投影坐标系下的坐标,可得到第二投影点在第一平面中的位置。本公开实施例中,将第二投影点在第一平面中的位置称为第一位置。
例如,第一平面为地面,投影坐标系的原点为地面上的A3点,投影坐标系的横轴的正方向为正东方向,投影坐标系的纵轴的正方向为正南方向,投影坐标系的横轴的单位刻度表示一米,投影坐标系的纵轴的单位刻度表示一米。
若第二投影点在投影坐标系下的坐标为(0,8),那么目标对象在地面上的投影点在A3点的正南方向,且距离A3点8米。
图像处理装置通过执行步骤501~步骤503,可确定目标对象在第一平面上的投影点。即依据步骤501~步骤503,可依据目标对象在目标图像的像素坐标系下的坐标,确定目标对象在投影坐标系下的坐标,即确定目标对象在第一平面中的位置。
这样,在基于前文所提供的技术方案得到第二转换关系后,即可依据第一转换关系和目标图像实现对目标对象的定位。例如,第一平面是商场二楼的地面,目标成像设备为二楼的摄像头。使用该摄像头对商场二楼进行拍摄得到第一待处理图像。利用前文所提供的技术方案,对第一待处理图像和商场二楼的三维数据进行处理,得到第一待处理图像的像素坐标系与投影坐标系之间的第二转换关系。
在得到第二转换关系后,将摄像头采集到的图像作为第二待处理图像,进而可依据第二转换关系和第二待处理图像,确定第二待处理图像中任意物体在二楼地面上的位置。如,在顾客A出现在摄像头的拍摄范围内的情况下,摄像头采集一张包括顾客A的图像作为第二待处理图像,进而可依据第二转换关系和第二待处理图像确定顾客A在二楼地面上的位置。
可选的,目标成像设备采集第一待处理图像的采集条件和目标成像设备采集第二待处理图像的采集条件相同。采集条件包括:采集位置和拍摄角度。其中,采集位置为目标成像设备采集图像时的位置,拍摄角度是目标成像设备采集图像时的拍摄角度。
例如,在采集条件包括采集位置的情况下,目标成像设备在a处采集得到第一待处理图像和第二待处理图像。在采集条件包括拍摄角度的情况下,目标成像设备采集第一待处理图像的拍摄角度与目标成像设备采集第二待处理图像的拍摄角度相同。
在目标成像设备采集第一待处理图像的采集条件和目标成像设备采集第二待处理图像的采集条件相同的情况下,可使第一像素坐标系与第二像素坐标系相同。其中,第一像素坐标系与第二像素坐标系相同指,第一像素坐标系与世界坐标系之间的转换关系,与第二像素坐标系与世界坐标系之间的转换关系相同,即第二像素坐标系与世界坐标系之间的转换关系为第一转换关系。
这样,第一像素坐标系与投影坐标系之间的转换关系,与第二像素坐标系与投影坐标系之间的转换关系相同。因此,图像处理装置可将第二转换关系作为第二像素坐标系与投影坐标系之间的转换关系。由此,可减少确定第二像素坐标系与投影坐标系之间的转换关系的数据处理量,进而减少得到第一位置的数据处理量。
作为一种可选的实施方式,图像处理装置还执行以下步骤:
601、获取第一平面的地图。
本公开实施例中,第一平面的地图为二维地图。可选的,第一平面的地图包括第一平面的二维CAD图。
在另一种获取第一平面的地图的实现方式中,图像处理装置接收用户通过输入组件输入的第一平面的地图获取第一平面的地图。
在又一种获取第一平面的地图的实现方式中,图像处理装置接收终端发送的第一平面的地图获取第一平面的地图。
602、依据上述第一位置,在地图中显示目标对象的第二位置。
图像处理装置在得到第一位置的情况下,依据第一位置可确定目标对象在地图中的位置(即上述第二位置),进而可通过在地图中显示目标对象的第二位置实现对目标对象在第一平面内的位置进行可视化显示。
在一种可能实现的方式中,图像处理装置将第一位置作为第二位置。
例如,目标场景为放置零配件(如螺钉、螺母、扳手)的仓库,仓库内有多个置物架。多个置物架中的置物架a共有3层置物层。图像处理装置将仓库进行拍摄得到的图像作为第二待处理图像(第二待处理图像包含置物架a),并将仓库的三维点云作为三维数据,并将置物架a的第二层置物层所在的平面作为第一平面。基于前文所提供的技术方案,可得到第二待处理图像的像素坐标系与投影坐标系之间的转换关系,即第二转换关系,其中,投影坐标系所在的平面为第一平面。
在目标对象为放置于置物架a的第二层置物层上的螺钉b的情况下,图像处理装置可依据螺钉b在第二待处理图像的像素坐标系下的坐标和第二转换关系,得到第二投影点在投影坐标系下的坐标。进而可依据第二投影点在投影坐标系下的坐标,得到第二投影点在第二层置物架中的第一位置。
在一些实施例中,图像处理装置可获取第二层置物架的地图,并将第二投影点在第二层置物架中的位置作为螺钉b在第二层置物架中的位置。依据螺钉b在第二层置物架中的位置,在第二层置物架的地图中显示螺钉b。
可选的,图像处理装置还执行以下步骤:
701、获取上述目标对象在上述地图中的第三位置,上述第三位置与上述第二位置不同。
可选的,第三位置的时间戳和第二位置的时间戳不同。在一种获取第三位置的实现方式中,图像处理装置接收用户通过输入组件输入的第三位置。
在另一种获取第三位置的实现方式中,图像处理装置接收终端发送的第三位置。
702、依据上述第二位置和第三位置,显示上述目标对象在上述地图中的轨迹。
在一种可能实现的方式中,图像处理装置在得到第二位置与第三位置的情况下,将第二位置和第三位置分别作为轨迹的两个端点,确定目标对象在地图中的轨迹。
在另一种可能实现的方式中,图像处理装置在地图中确定过第二位置和第三位置的轨迹作为目标对象的轨迹。
图像处理装置通过在地图中显示目标对象的轨迹,可实现对目标对象在第一平面内的轨迹进行可视化显示。
作为一种可选的实施方式,上述对象框包括人物框,上述目标对象包括目标人物,上述第一平面为上述目标场景中的地面。
在该种实施方式中,图像处理装置可确定目标人物在地面上的投影点,进而可在地面的地图上显示目标人物的位置。
例如,A大厦是一栋20层高的建筑物。图像处理装置将对第8层的场景进行拍摄得到的图像作为第二待处理图像,并将第8层的场景的三维点云作为三维数据,并将第8层的所在的平面作为第一平面。基于前文所提供的技术方案,可得到第二待处理图像的像素坐标系与投影坐标系之间的转换关系,即第二转换关系。
这样,图像处理装置可依据目标人物在第二待处理图像的像素坐标系下的坐标和第二转换关系,得到第二投影点在投影坐标系下的坐标。进而可依据第二投影点在投影坐标系下的坐标,得到第二投影点在第8层中的位置。
在一些实施例中,图像处理装置可获取第8层的地图,并依据将第二投影点在第8层中的位置作为目标人物在第8层中的位置,并在第8层的地图中显示目标人物的位置。由此实现在地图上显示目标人物在室内的位置。
作为一种可选的实施方式,第三像素点为对象框的下底边上的像素点,下底边为对象框中与第一平面相交的边。
在下底边与第一平面相交的情况下,图像处理装置在第三像素点为对象框的下底边上的像素点的情况下,依据第三像素点在第二待处理图像的像素坐标系下的坐标和第二转换关系得到第二投影点在投影坐标系下的坐标,可提高第二投影点在投影坐标系下的坐标的准确度。
作为一种可选的实施方式,上述第三像素点为上述对象框的下底边上的像素点,上述下底边为纵坐标最大的横边,上述横边为上述对象框中平行于上述第二像素坐标系的横轴的边。
例如,在图5所示的第一待处理图像中,对象框为人物框,即人物框包括行人。该人物 框的横边包括AB和CD。由于CD的纵坐标比AB的纵坐标大,CD为下底边。
作为一种可选的实施方式,上述第三像素点为上述下底边的中点。在对象框的下底边上,中点为目标对象与第一平面相交的像素点的概率,比其他像素点(下底边上除中点之外的像素点)为目标对象与第一平面相交的像素点的概率大。
因此,图像处理装置在第三像素点为下底边的中点的情况下,依据第三像素点在第二像素坐标系下的坐标和第二转换关系得到第二投影点在投影坐标系下的坐标,可提高第二投影点在投影坐标系下的坐标的准确度。
作为一种可选的实施方式,上述目标场景为室内场景。由于构建室内场景的三维数据所需的数据处理量比构建室外场景所需的数据处理量小,在目标场景为室内场景的情况下,构建目标场景的三维数据可减少数据处理量。
例如,在图像处理装置使用激光雷达对目标场景进行扫描得到目标场景的三维数据的情况下,若目标场景为室内场景,可减少数据处理量。
基于本公开实施例提供的技术方案,本公开实施例还提供了几种可能的应用场景。
场景1:目前,为了增强工作、生活或者社会环境中的安全性,会在各个区域场所内安装摄像设备,以便根据视频流信息进行安全防护的记录。随着公共场所内摄像头数量的快速增长,如何有效的通过海量视频流确定包含目标对象的图像,并根据该图像的信息确定目标对象的轨迹等信息具有重要意义。
基于本公开实施例提供的技术方案,可在地图上显示目标对象的位置以及目标对象的轨迹,以便相关人员获知目标对象的行踪信息。
具体的,A地区的工作人员将服务器作为图像处理装置,并在服务器与A地区的摄像头之间建立通信连接。
以A地区的B摄像头为例,服务器获取B摄像头采集到的图像作为第一待处理图像,服务器获取B摄像头的拍摄场景的三维模型作为三维数据。服务器基于实施例提供的技术方案,可得到B摄像头采集到的图像的像素坐标系与世界坐标系之间的第一转换关系。
服务器将B摄像头的拍摄场景中地面作为第一平面,并通过执行步骤402得到B摄像头采集到的图像的像素坐标系与投影坐标系之间的第二转换关系,其中,投影坐标系所在的平面为地面。具体的,地面所在的平面为世界坐标系中的xoy平面,服务器去除第一转换关系中的第三列得到第二转换关系。
现A地区的工作人员想要找寻张三。A地区的工作人员通过服务器将张三的人脸图像与A地区的摄像头采集到的图像进行人脸比对,确定B摄像头采集到的图像C中包含张三。
服务器依据张三在图像C的像素坐标系下的坐标和第二转换关系得到张三在地面上的位置。进而可依据该位置在地面的地图上显示张三的位置。
与得到B摄像头采集到的图像的像素坐标系与投影坐标系之间的转换关系的实现方式相同,服务器可得到A地区内任意一个摄像头采集到的图像的像素坐标系与投影坐标系之间的转换关系。服务器进而可依据所有包含张三的图像以及采集包含张三的图像所对应的转换关系确定张三在A地区出现过的位置,进而可依据包含张三的图像的采集时间在A地区的地图上显示张三的轨迹。
场景2:大型商场内的顾客众多,如何确定顾客心仪的商品,并向顾客推荐心仪的商品对提高商品的销售量具有非常重要的意义。
基于实施例提供的技术方案,可确定顾客在商场内的行踪,进而可依据该行踪确定顾客可能喜欢的商品。
具体的,A商场的工作人员将服务器作为图像处理装置,并在服务器与A商场的摄像头之间建立通信连接。
以A商场的B摄像头为例,服务器获取B摄像头采集到的图像作为第一待处理图像,服务器获取B摄像头的拍摄场景的三维模型作为三维数据。服务器基于本公开实施例提供的技术方案,可得到B摄像头采集到的图像的像素坐标系与世界坐标系之间的第一转换关系。
服务器将B摄像头的拍摄场景中地面作为第一平面,并通过执行步骤402得到B摄像头采集到的图像的像素坐标系与投影坐标系之间的第二转换关系,其中,投影坐标系所在的平面为地面。具体的,地面所在的平面为世界坐标系中的xoy平面,服务器去除第一转换关系中的第三列得到第二转换关系。
现A商场的工作人员想要找寻张三。A商场的工作人员通过服务器将张三的人脸图像与A商场的摄像头采集到的图像进行人脸比对,确定B摄像头采集到的图像C中包含张三。
服务器依据张三在图像C的像素坐标系下的坐标和第二转换关系得到张三在地面上的位置。进而可依据该位置在地面的地图上显示张三的位置。
与得到B摄像头采集到的图像的像素坐标系与投影坐标系之间的转换关系的实现方式相同,服务器可得到A商场内任意一个摄像头采集到的图像的像素坐标系与投影坐标系之间的 转换关系。服务器进而可依据所有包含张三的图像以及采集包含张三的图像所对应的转换关系确定张三在A商场出现过的位置,进而可依据包含张三的图像的采集时间在A商场的地图上显示张三的行踪。应理解,上述行踪包括张三出现的位置,以及张三在该位置的逗留时长。
服务器进而可依据张三的行踪得到张三的购物喜好。例如,服务器依据张三的行踪确定张三在运动鞋专区的逗留时长为1.5个小时,张三在女士服饰专区的逗留时长为3分钟,张三在零食专区的逗留时长为0.5个小时。由于张三在运动鞋专区的逗留时长最长,服务器确定张三对运动鞋的感兴趣程度最高。相应的,服务器确定张三对零食的感兴趣程度比对运动鞋的感兴趣程度低,以及张三对女士服饰不感兴趣。这样,服务器在确定张三进入A商场时,可向张三推送关于运动鞋的信息以及关于零食的信息,其中,关于运动鞋的信息数量比关于零食的信息数量多。
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
上述详细阐述了本公开实施例的方法,下面提供了本公开实施例的装置。
请参阅图6,图6为本公开实施例提供的一种图像处理装置的结构示意图,该图像处理装置1包括获取部分11、匹配处理部分12、第一处理部分13。可选的,图像处理装置1还包括第二处理部分14。具体的:
获取部分11,被配置为获取目标场景的第一待处理图像和三维数据,所述三维数据包括所述目标场景在世界坐标系下的三维坐标;
匹配处理部分12,被配置为对所述第一待处理图像和所述三维数据进行匹配处理,得到至少一个匹配点对;
第一处理部分13,被配置为依据所述至少一个匹配点对,得到所述第一待处理图像的第一像素坐标系与所述世界坐标系之间的第一转换关系。
结合本公开任一实施方式,所述第一待处理图像包括第一像素点,所述图像处理装置还包括:
第二处理部分14,被配置为依据所述第一转换关系和所述第一像素点在所述第一像素坐标系下的坐标,得到第一物点的三维坐标,所述第一物点为所述第一像素点所对应的物点。
结合本公开任一实施方式,所述目标场景包括第一平面,所述获取部分11,还被配置为获取所述第一平面在所述世界坐标系下的方程;
所述第一处理部分13,还被配置为依据所述方程和所述至少一个匹配点对,得到所述第一像素坐标系与投影坐标系之间的第二转换关系,所述投影坐标系所在的平面为所述第一平面,所述第二转换关系表征第二像素点的坐标与第一投影点的坐标之间的转换关系,所述第二像素点为所述第一待处理图像中的像素点,所述第一投影点为第二物点在所述第一平面的投影点,所述第二物点为所述第二像素点所对应的物点。
结合本公开任一实施方式,所述第一平面包括所述世界坐标系的任意两个坐标轴;
所述第一处理部分13,被配置为:
依据所述至少一个匹配点对,得到所述第一待处理图像的第一像素坐标系与所述世界坐标系之间的第一转换关系;
去除所述第一转换关系中的至少一列元素,得到所述第一像素坐标系与所述投影坐标系之间的第二转换关系。
结合本公开任一实施方式,所述获取部分11,还被配置为获取所述目标场景的第二待处理图像,所述第二待处理图像与所述第一待处理图像由同一成像设备采集得到,所述第二待处理图像包括所述第一平面和对象框,所述对象框包含目标对象,所述对象框所包含的像素点区域包括第三像素点;
所述第一处理部分13,还被配置为依据所述第二转换关系和所述第三像素点在所述第二待处理图像的第二像素坐标系下的坐标,得到第二投影点在所述投影坐标系下的坐标,所述第二投影点为所述目标对象在所述第一平面上的投影点;
所述第一处理部分13,还被配置为依据所述第二投影点在所述投影坐标系下的坐标,得到所述第二投影点在所述第一平面中的第一位置。
结合本公开任一实施方式,所述对象框包括人物框,所述目标对象包括目标人物,所述第一平面为所述目标场景中的地面。
结合本公开任一实施方式,所述第三像素点为所述对象框的下底边上的像素点,所述下底边为所述对象框中与所述第一平面相交的边。
结合本公开任一实施方式,所述第三像素点为所述下底边的中点。
结合本公开任一实施方式,所述获取部分11,还被配置为获取所述第一平面的地图;
所述第一处理部分13,还被配置为依据所述第一位置,在所述地图中显示所述目标对象 的第二位置。
结合本公开任一实施方式,所述获取部分11,还被配置为获取所述目标对象在所述地图中的第三位置,所述第三位置与所述第二位置不同;
所述第一处理部分13,还被配置为依据所述第二位置和所述第三位置,显示所述目标对象在所述地图中的轨迹。
结合本公开任一实施方式,所述目标场景为室内场景。
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。
图7为本公开实施例提供的一种图像处理装置的硬件结构示意图。该图像处理装置2包括处理器21,存储器22,输入装置23,输出装置24。该处理器21、存储器22、输入装置23和输出装置24通过连接器相耦合,该连接器包括各类接口、传输线或总线等等,本公开实施例对此不作限定。应当理解,本公开的各个实施例中,耦合是指通过特定方式的相互联系,包括直接相连或者通过其他设备间接相连,例如可以通过各类接口、传输线、总线等相连。
处理器21可以是一个或多个图形处理器(graphics processing unit,GPU),在处理器21是一个GPU的情况下,该GPU可以是单核GPU,也可以是多核GPU。可选的,处理器21可以是多个GPU构成的处理器组,多个处理器之间通过一个或多个总线彼此耦合。可选的,该处理器还可以为其他类型的处理器等等,本公开实施例不作限定。
存储器22可用于存储计算机程序指令,以及用于执行本公开方案的程序代码在内的各类计算机程序代码。可选地,存储器包括但不限于是随机存储记忆体(random access memory,RAM)、只读存储器(read-only memory,ROM)、可擦除可编程只读存储器(erasable programmable read only memory,EPROM)、或便携式只读存储器(compact disc read-only memory,CD-ROM),该存储器用于相关指令及数据。
输入装置23用于输入数据和/或信号,以及输出装置24用于输出数据和/或信号。输入装置23和输出装置24可以是独立的器件,也可以是一个整体的器件。
可理解,本公开实施例中,存储器22不仅可用于存储相关指令,还可用于存储相关数据,如该存储器22可用于存储通过输入装置23获取的待处理图像和三维数据,又或者该存储器22还可用于存储通过处理器21得到的第一转换关系等等,本公开实施例对于该存储器中具体所存储的数据不作限定。
可以理解的是,图7仅仅示出了一种图像处理装置的简化设计。在实际应用中,图像处理装置还可以分别包含必要的其他元件,包含但不限于任意数量的输入/输出装置、处理器、存储器等,而所有可以实现本公开实施例的图像处理装置都在本公开的保护范围之内。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本公开的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。所属领域的技术人员还可以清楚地了解到,本公开各个实施例描述各有侧重,为描述的方便和简洁,相同或类似的部分在不同实施例中可能没有赘述,因此,在某一实施例未描述或未详细描述的部分可以参见其他实施例的记载。
在本公开所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本公开各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包 括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本公开实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,数字通用光盘(digital versatile disc,DVD))、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:只读存储器(read-only memory,ROM)或随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可存储程序代码的介质。
工业实用性
本公开实施例提供的图像处理方法、装置、电子设备和计算机可读存储介质,通过匹配处理得到待处理图像和三维数据之间的至少一个匹配点对,进而根据至少一个匹配点对得到待处理图像的像素坐标系与世界坐标系之间的转换关系。在应用于目标对象在世界坐标系下的轨迹记录,以及双目图像中的视差位移计算,以及平面投影等相关图像处理的应用场景下,可以使得坐标转换关系的计算不再收到成像设备参数变化的影响,从而减少了通过对成像设备进行标定,来得到像素坐标系与世界坐标系的转换关系的人力成本和时间成本,提高了图像处理的效率。

Claims (15)

  1. 一种图像处理方法,其中,所述方法包括:
    获取目标场景的第一待处理图像和三维数据,所述三维数据包括所述目标场景在世界坐标系下的三维坐标;
    对所述第一待处理图像和所述三维数据进行匹配处理,得到至少一个匹配点对;
    依据所述至少一个匹配点对,得到所述第一待处理图像的第一像素坐标系与所述世界坐标系之间的第一转换关系。
  2. 根据权利要求1所述的方法,其中,所述第一待处理图像包括第一像素点,所述方法还包括:
    依据所述第一转换关系和所述第一像素点在所述第一像素坐标系下的坐标,得到第一物点的三维坐标,所述第一物点为所述第一像素点所对应的物点。
  3. 根据权利要求1或2所述的方法,其中,所述目标场景包括第一平面,所述方法还包括:
    获取所述第一平面在所述世界坐标系下的方程;
    依据所述方程和所述至少一个匹配点对,得到所述第一像素坐标系与投影坐标系之间的第二转换关系,所述投影坐标系所在的平面为所述第一平面,所述第二转换关系表征第二像素点的坐标与第一投影点的坐标之间的转换关系,所述第二像素点为所述第一待处理图像中的像素点,所述第一投影点为第二物点在所述第一平面的投影点,所述第二物点为所述第二像素点所对应的物点。
  4. 根据权利要求3所述的方法,其中,所述第一平面包括所述世界坐标系的任意两个坐标轴;
    所述依据所述方程和所述至少一个匹配点对,得到所述第一像素坐标系与投影坐标系之间的第二转换关系,包括:
    依据所述至少一个匹配点对,得到所述第一待处理图像的第一像素坐标系与所述世界坐标系之间的第一转换关系;
    去除所述第一转换关系中的至少一列元素,得到所述第一像素坐标系与所述投影坐标系之间的第二转换关系。
  5. 根据权利要求3或4所述的方法,其中,所述方法还包括:
    获取所述目标场景的第二待处理图像,所述第二待处理图像与所述第一待处理图像由同一成像设备采集得到,所述第二待处理图像包括所述第一平面和对象框,所述对象框包含目标对象,所述对象框所包含的像素点区域包括第三像素点;
    依据所述第二转换关系和所述第三像素点在所述第二待处理图像的第二像素坐标系下的坐标,得到第二投影点在所述投影坐标系下的坐标,所述第二投影点为所述目标对象在所述第一平面上的投影点;
    依据所述第二投影点在所述投影坐标系下的坐标,得到所述第二投影点在所述第一平面中的第一位置。
  6. 根据权利要求5所述的方法,其中,所述对象框包括人物框,所述目标对象包括目标人物,所述第一平面为所述目标场景中的地面。
  7. 根据权利要求5或6所述的方法,其中,所述第三像素点为所述对象框的下底边上的像素点,所述下底边为所述对象框中与所述第一平面相交的边。
  8. 根据权利要求7所述的方法,其中,所述第三像素点为所述下底边的中点。
  9. 根据权利要求5至8中任意一项所述的方法,其中,所述方法还包括:
    获取所述第一平面的地图;
    依据所述第一位置,在所述地图中显示所述目标对象的第二位置。
  10. 根据权利要求9所述的方法,其中,所述方法还包括:
    获取所述目标对象在所述地图中的第三位置,所述第三位置与所述第二位置不同;
    依据所述第二位置和所述第三位置,显示所述目标对象在所述地图中的轨迹。
  11. 根据权利要求1至10任意一项所述的方法,其中,所述目标场景为室内场景。
  12. 一种图像处理装置,其中,所述装置包括:
    获取单元,用于获取目标场景的第一待处理图像和三维数据,所述三维数据包括所述目标场景在世界坐标系下的三维坐标;
    匹配处理部分,被配置为对所述第一待处理图像和所述三维数据进行匹配处理,得到至 少一个匹配点对;
    第一处理部分,被配置为依据所述至少一个匹配点对,得到所述第一待处理图像的第一像素坐标系与所述世界坐标系之间的第一转换关系。
  13. 一种电子设备,其中,包括:处理器和存储器,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,在所述处理器执行所述计算机指令的情况下,所述电子设备执行如权利要求1至11中任意一项所述的方法。
  14. 一种计算机可读存储介质,其中,所述计算机可读存储介质中存储有计算机程序,所述计算机程序包括程序指令,在所述程序指令被处理器执行的情况下,使所述处理器执行权利要求1至11中任意一项所述的方法。
  15. 一种计算机程序,所述计算机程序产品包括计算机程序或指令,在所述计算机程序或指令在计算机上运行的情况下,所述计算机执行权利要求1至11任一项所述的方法。
PCT/CN2022/112538 2021-08-31 2022-08-15 图像处理方法及装置、电子设备及计算机可读存储介质 WO2023029969A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111013410.6A CN113706609A (zh) 2021-08-31 2021-08-31 图像处理方法及装置、电子设备及计算机可读存储介质
CN202111013410.6 2021-08-31

Publications (1)

Publication Number Publication Date
WO2023029969A1 true WO2023029969A1 (zh) 2023-03-09

Family

ID=78658100

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/112538 WO2023029969A1 (zh) 2021-08-31 2022-08-15 图像处理方法及装置、电子设备及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN113706609A (zh)
WO (1) WO2023029969A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116625385A (zh) * 2023-07-25 2023-08-22 高德软件有限公司 路网匹配方法、高精地图构建方法、装置及设备

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113706609A (zh) * 2021-08-31 2021-11-26 深圳市商汤科技有限公司 图像处理方法及装置、电子设备及计算机可读存储介质
CN116091475A (zh) * 2023-02-17 2023-05-09 七海行(深圳)科技有限公司 一种喷洒效果的确认方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170221226A1 (en) * 2014-11-04 2017-08-03 SZ DJI Technology Co., Ltd. Camera calibration
CN111223053A (zh) * 2019-11-18 2020-06-02 北京邮电大学 基于深度图像的数据增强方法
CN111899307A (zh) * 2020-07-30 2020-11-06 浙江大学 一种空间标定方法、电子设备及存储介质
CN113706609A (zh) * 2021-08-31 2021-11-26 深圳市商汤科技有限公司 图像处理方法及装置、电子设备及计算机可读存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170221226A1 (en) * 2014-11-04 2017-08-03 SZ DJI Technology Co., Ltd. Camera calibration
CN111223053A (zh) * 2019-11-18 2020-06-02 北京邮电大学 基于深度图像的数据增强方法
CN111899307A (zh) * 2020-07-30 2020-11-06 浙江大学 一种空间标定方法、电子设备及存储介质
CN113706609A (zh) * 2021-08-31 2021-11-26 深圳市商汤科技有限公司 图像处理方法及装置、电子设备及计算机可读存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116625385A (zh) * 2023-07-25 2023-08-22 高德软件有限公司 路网匹配方法、高精地图构建方法、装置及设备
CN116625385B (zh) * 2023-07-25 2024-01-26 高德软件有限公司 路网匹配方法、高精地图构建方法、装置及设备

Also Published As

Publication number Publication date
CN113706609A (zh) 2021-11-26

Similar Documents

Publication Publication Date Title
WO2023029969A1 (zh) 图像处理方法及装置、电子设备及计算机可读存储介质
US10529086B2 (en) Three-dimensional (3D) reconstructions of dynamic scenes using a reconfigurable hybrid imaging system
US7554575B2 (en) Fast imaging system calibration
CN113240769B (zh) 空间链接关系识别方法及装置、存储介质
WO2021018214A1 (zh) 虚拟对象处理方法及装置、存储介质和电子设备
CN114329747B (zh) 一种面向建筑数字孪生的虚实实体坐标映射方法及系统
US10438405B2 (en) Detection of planar surfaces for use in scene modeling of a captured scene
JP7043601B2 (ja) 環境モデルを生成するための方法および装置ならびに記憶媒体
TWI779801B (zh) 測溫方法、電子設備及電腦可讀儲存介質
JP7277548B2 (ja) サンプル画像生成方法、装置及び電子機器
KR102566300B1 (ko) 실내 측위 방법, 장치, 장비 및 저장 매체
WO2022237026A1 (zh) 平面信息检测方法及系统
EP4220547A1 (en) Method and apparatus for determining heat data of global region, and storage medium
JP2018010599A (ja) 情報処理装置、パノラマ画像表示方法、パノラマ画像表示プログラム
CN112733641A (zh) 物体尺寸测量方法、装置、设备及存储介质
CN112634366B (zh) 位置信息的生成方法、相关装置及计算机程序产品
CN111091117B (zh) 用于二维全景图像的目标检测方法、装置、设备、介质
CN111161138B (zh) 用于二维全景图像的目标检测方法、装置、设备、介质
TWI570664B (zh) The expansion of real-world information processing methods, the expansion of real processing modules, Data integration method and data integration module
WO2023273155A1 (zh) 图像处理方法及装置、电子设备、计算机可读存储介质及计算机程序产品
WO2022198822A1 (zh) 摄像头朝向标定方法、装置、设备、存储介质及程序
TWI735367B (zh) 測速方法、電子設備及儲存介質
CN111178300B (zh) 目标检测方法、装置、设备、介质
CA3102860C (en) Photography-based 3d modeling system and method, and automatic 3d modeling apparatus and method
CN117994332A (zh) 位姿确定方法及装置、计算机可读存储介质和电子设备

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE