WO2019200837A1 - Method and system for measuring volume of parcel, and storage medium and mobile terminal - Google Patents
Method and system for measuring volume of parcel, and storage medium and mobile terminal Download PDFInfo
- Publication number
- WO2019200837A1 WO2019200837A1 PCT/CN2018/106796 CN2018106796W WO2019200837A1 WO 2019200837 A1 WO2019200837 A1 WO 2019200837A1 CN 2018106796 W CN2018106796 W CN 2018106796W WO 2019200837 A1 WO2019200837 A1 WO 2019200837A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- camera
- package
- corner point
- coordinates
- world
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/62—Analysis of geometric attributes of area, perimeter, diameter or volume
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
Definitions
- the invention relates to the field of computer vision, in particular to a method, a system, a storage medium and a mobile terminal for measuring a package volume.
- the billing method of the parcel to be tested includes the method of weight or volume, and the courier will charge the maximum value of the two. Furthermore, the volume size of the package to be tested and the like will follow the single number information entry system of the package to be tested, facilitating subsequent loading and inventory arrangements. Therefore, it is a necessary technique to quickly calculate the volume of the package to be tested.
- the invention patent of the application number CN20151088222.6 discloses a volume measurement method based on a depth camera and a system thereof.
- the patent acquires a depth map containing an object to be measured by a depth camera, and then separates the object from the depth image according to the depth information.
- the two-dimensional depth image coordinates of the object to be tested are converted into three-dimensional coordinates in the camera coordinate system according to the pre-calibrated camera parameters, and then the size of the object is calculated according to the three-dimensional coordinates of the object to be tested.
- This method has the following disadvantages: a. An additional depth camera is required, the depth camera is relatively expensive, and the cost of the courier terminal device (or mobile phone) is relatively low, and if the depth camera is fully configured, the cost is relatively large. b. The depth camera needs to be adapted and connected with the computing module (mobile terminal device such as mobile phone), and the implementation technology is troublesome. c. At present, most of the depth cameras adopt the structure light or TOF scheme. The structure light is easily interfered by strong light and cannot work outdoors. The accuracy of the TOF depth camera is inherently low, and the error is greater under the interference of outdoor strong light.
- the object of the present invention is to provide a method, a system, a storage medium and a mobile terminal for measuring a package volume, which realizes real-time and accurate measurement of the volume of the package to be tested by using a camera provided by a mobile terminal such as a mobile phone, and enriches the use scenario without adding additional Hardware facilities to save costs.
- the invention provides a method for measuring a package volume, which is used for measuring a volume of a package to be tested provided with a planar identifier, comprising the steps of: S100 collecting a target image by a camera of the mobile terminal; the target image comprising the planar identifier, An upper surface of the package to be tested of the planar identifier, and two side surfaces of the package to be tested adjacent to the upper surface; S200 performs image processing on the target image, thereby the target image Identifying the planar identifier; S300 performing image edge detection on the target image, thereby identifying a corner point of the package to be tested in the target image; S400 according to the planar identifier, a pre-acquired camera The inner parameter matrix and the corner point, the world coordinates of the corner point are calculated, so that the volume of the package to be tested is obtained according to the world coordinates of the corner point.
- the method includes the following steps: S010: calibrating the camera to obtain an internal reference matrix of the camera.
- the step S200 performs image processing on the target image, so that the identifying the planar identifier in the target image specifically includes the following steps: S210 performs binary segmentation on the target image, and from the segmented Extracting a contour from the binarized image; S220: selecting, according to the common feature of the pre-stored contour identifier, the contour contour having the common feature as the candidate contour; A front view of the candidate contour; S240, when the front view of the candidate contour is consistent with the pre-stored planar identifier template, identifying an image corresponding to the candidate contour as an image of the planar identifier.
- the plane identifier is a square
- the preset contour feature corresponding to the plane identifier pre-stored in the step S220 is a quadrangle
- the front view of the candidate contour obtained in the step S230 is specifically: S231 Reading the pixel coordinates of the four vertices of the candidate contour; S232 defining the pixel coordinates of the four vertices after the candidate contour is projectively transformed into a front view as four pre-stored front views of the planar identifier Pixel coordinates of the vertex; S233 substituting the pixel coordinates of the four vertices read above and the pixel coordinates of the defined four vertices into the plane projection transformation formula (1), respectively, and obtaining the projective transformation matrix M:
- X is the homogeneous pixel coordinate of the candidate silhouette vertex
- the non-homogeneous pixel coordinates are X' is the homogeneous coordinate of the vertex after the projective transformation
- its non-homogeneous pixel coordinates are X1, x2, and x3 are elements in X
- x1', x2', and x3' are elements in X'
- x and y are non-corresponding non-homogeneous pixel abscissas and ordinates
- u and v are projections respectively The transformed non-homogeneous pixel abscissa and ordinate
- S234 performs projective transformation on all pixels of the binarized image corresponding to the candidate contour according to the projective transformation matrix M, and obtains a front view corresponding to the region included in the candidate contour.
- the step S300 performs image edge detection on the target image, so that identifying a corner point of the package to be tested in the target image specifically includes the following steps: S310 performing edge detection processing on the target image to obtain An edge binary image; S320 searches for an edge line corresponding to the edge of the package to be tested from the edge binary image; S330 calculates a position of an intersection of any two edge lines of the edge line to obtain the package to be tested corner.
- S400 calculates world coordinates of the corner point according to the plane identifier, the internal parameter matrix of the pre-acquired camera, and the corner point, thereby obtaining the volume of the package to be tested according to the world coordinates of the corner point. Specifically include the steps:
- S410 calculating, according to the plane identifier and the pre-acquired internal reference matrix of the camera, an outer parameter matrix of a current field of view of the camera; the outer parameter matrix includes a rotation matrix and a translation vector;
- S420 acquiring, according to the pixel coordinates of the corner point in the pixel coordinate system, the world coordinates of the corner point in combination with the rotation matrix and the translation vector;
- S430 calculates a length, width, and height of the package to be tested according to the world coordinates of the corner point;
- S440 calculates the length and width of the volume into a volume formula to obtain the volume of the package to be tested.
- the step S410 calculates the rotation matrix and the translation vector of the current field of view of the camera according to the plane identifier and the internal parameter matrix of the camera acquired in advance, and specifically includes the following steps:
- S411 establishes a world coordinate system with the midpoint of the planar identifier as an origin
- S412 reading vertex pixel coordinates of each vertex of the planar identifier in a pixel coordinate system, and vertex world coordinates of each vertex in a world coordinate system;
- (u, v, 1) represents the homogeneous coordinates of the pixel coordinates of the target point in the pixel coordinate system of the camera, and (Xw, Yw, Zw, 1) indicates that the target point is in the The homogeneous coordinates of the world coordinates in the world coordinate system, (Xc, Yc, Zc) represents the camera coordinates of the target point in the camera coordinate system of the camera; fx represents the physical focal length F of the camera lens and the imager in the X-axis direction The product of the size of each unit, fy represents the product of the physical focal length F of the camera lens and the size of each unit of the imager in the y-axis direction, cx represents the offset of the center of the imager from the optical axis in the X-axis direction, and cy represents the imaging due to imaging.
- the center of the imager and the optical axis are offset in the Y-axis direction; R represents the rotation matrix of the world coordinate system to the camera coordinate system, and T
- the step S420 is performed according to the pixel coordinates of the corner point in the pixel coordinate system, and the world coordinates of the corner point are obtained by combining the rotation matrix and the translation vector.
- S421 reads the pixel coordinates of the corner point of the corner point in the pixel coordinate system of the camera
- the step S430 calculates the length, width, and height of the package to be tested according to the world coordinates of the corner point, and specifically includes the following steps:
- S431 reads the world coordinates corresponding to any four corner points; any one of the four corner points is a first corner point, and the remaining three corner points are respectively connected with the first corner point to generate a straight line Parallel to the XYZ axis of the world coordinate system, respectively;
- the world coordinates corresponding to the fourth corner point and the pixel coordinates of the corner point are combined with the internal parameter matrix of the pre-acquired camera, the rotation matrix of the current field of view of the camera, and the translation vector, and are obtained by substituting the formula (4).
- a height of the package to be tested; a line generated by the connection of the fourth corner point and the first corner point is parallel to a Z axis of the world coordinate system.
- the present invention also provides a measurement system for a package volume, which is used for measuring a volume of a package to be tested provided with a planar identifier, the measurement system of the package volume comprising: an image acquisition module, configured to pass through the mobile terminal The camera captures a target image; the target image includes the planar identifier, an upper surface of the package to be tested provided with the planar identifier, and two side surfaces of the package to be tested adjacent to the upper surface;
- An image recognition module configured to perform image processing on the target image acquired by the image acquisition module, thereby identifying the planar identifier in the target image
- An image processing module configured to perform image edge detection on the target image acquired by the image acquiring module, so as to identify a corner point of the package to be tested in the target image;
- a volume measuring module configured to calculate a world coordinate of the corner point according to the plane identifier recognized by the image recognition module, an internal parameter matrix of a pre-acquired camera, and the corner point, thereby, according to the corner point
- the world coordinates get the volume of the package to be tested.
- the measurement system of the package volume further includes: a calibration module, configured to calibrate the camera before acquiring the target image by the image acquisition module to obtain an internal parameter matrix of the camera.
- a calibration module configured to calibrate the camera before acquiring the target image by the image acquisition module to obtain an internal parameter matrix of the camera.
- the image recognition module includes: a binary segmentation sub-module for performing binary segmentation on the target image acquired by the extraction module; and an outline extraction sub-module for use in the segmented binarized image And extracting a profile; a storage submodule, configured to store a common feature of the outline corresponding to the planar identifier, the planar identifier template; and a determination processing submodule, configured to be configured according to the storage in the storage submodule a common feature of the contour corresponding to the planar identifier, and selecting, from the contour extracted by the shape extraction sub-module, an outline having the common feature as an alternative contour; and a front view obtaining sub-module for acquiring the preparation Selecting a front view of the contour; the identifying submodule, configured to identify, when the front view of the candidate contour is consistent with the planar identifier template prestored by the storage submodule, the image corresponding to the candidate contour is An image of a flat marker.
- the planar identifier is a square, and the common feature of the outline corresponding to the planar identifier stored by the storage sub-module is a quadrangle;
- the front view obtaining sub-module includes: a reading unit for reading Taking pixel coordinates of four vertices of the candidate contour; defining a unit for defining pixel coordinates of the four vertices after the candidate contour is subjected to projective transformation into a front view as a pre-existing front view of the planar identifier a pixel coordinate of the four vertices; a calculation unit for substituting the pixel coordinates of the four vertices read by the reading unit and the pixel coordinates of the four vertices defined by the defining unit into the following planar projective transformation formula ( 1), find the projective transformation matrix M:
- X is the homogeneous pixel coordinate of the candidate silhouette vertex
- the non-homogeneous pixel coordinates are X' is the homogeneous coordinate of the vertex after the projective transformation
- its non-homogeneous pixel coordinates are X1, x2, and x3 are elements in X
- x1', x2', and x3' are elements in X'
- x and y are non-corresponding non-homogeneous pixel abscissas and ordinates
- u and v are projections respectively The transformed non-homogeneous pixel abscissa and ordinate
- a transforming unit configured to perform a projective transformation on all pixels of the binarized image corresponding to the candidate contour according to the projective transformation matrix M obtained by the calculating unit, to obtain an area included in the candidate contour Corresponding front view.
- the image processing module includes: an edge detection sub-module, configured to perform edge detection processing on the target image acquired by the extraction module to obtain an edge binary image; and a line search sub-module for using the edge Searching for the edge line corresponding to the edge of the package to be tested in the edge binary image obtained by the detection sub-module; the corner point acquisition sub-module is configured to calculate any two edges of the edge line found by the line search sub-module The position of the intersection formed by the straight line obtains the corner point of the package to be tested.
- the volume measurement module includes: an outer parameter matrix acquisition submodule, configured to calculate an outer parameter matrix of a current field of view of the camera according to the plane identifier and an internal parameter matrix of the camera acquired in advance;
- the outer parameter matrix includes a rotation matrix and a translation vector;
- a corner coordinate acquisition submodule configured to acquire world coordinates of the corner point according to the pixel coordinates of the corner point in a pixel coordinate system, in combination with the rotation matrix and the translation vector;
- a length, width and height acquisition submodule configured to calculate a length, a width and a height of the package to be tested according to the world coordinates of the corner point
- a parcel volume acquisition sub-module configured to calculate the volume of the package to be tested by substituting the length, width, and height into a volume formula.
- the outer parameter matrix obtaining submodule comprises:
- a coordinate system determining unit configured to establish a world coordinate system with the midpoint of the planar identifier as an origin
- a vertex coordinate reading unit configured to read vertex pixel coordinates of each vertex of the planar identifier in a pixel coordinate system, and vertex world coordinates of each vertex in a world coordinate system;
- An arithmetic unit configured to substitute the vertex pixel coordinates, the vertex world coordinates, and the pre-acquired internal parameter matrix of the camera into the following formulas (2) and (3), respectively, and obtain the The rotation matrix and translation vector of the camera's current field of view:
- (u, v, 1) represents the homogeneous coordinates of the pixel coordinates of the target point in the pixel coordinate system of the camera, and (Xw, Yw, Zw, 1) indicates that the target point is in the The homogeneous coordinates of the world coordinates in the world coordinate system, (Xc, Yc, Zc) represents the camera coordinates of the target point in the camera coordinate system of the camera; fx represents the physical focal length F of the camera lens and the imager in the X-axis direction The product of the size of each unit, fy represents the product of the physical focal length F of the camera lens and the size of each unit of the imager in the y-axis direction, cx represents the offset of the center of the imager from the optical axis in the X-axis direction, and cy represents the imaging due to imaging.
- the center of the imager and the optical axis are offset in the Y-axis direction; R represents the rotation matrix of the world coordinate system to the camera coordinate system, and T
- the corner coordinate acquisition submodule comprises:
- a corner pixel coordinate acquiring unit configured to read pixel coordinates of the corner point in a pixel coordinate system of the camera
- a corner point world coordinate acquiring unit configured to substitute pixel coordinates of the corner point, an internal parameter matrix of the pre-acquired camera, and a rotation matrix and a translation vector of a current field of view of the camera into the formula (4)
- the world coordinates of the corner points wherein (u, v, 1) represents the homogeneous coordinates of the pixel coordinates of the corner points, and (Xw, Yw, Zw) is the world coordinate of the corner points, (Xw, Yw, Zw, 1) represents the homogeneous coordinates of the world coordinates of the corner points;
- the long and wide height acquisition submodule includes:
- a corner point world coordinate reading unit configured to read world coordinates corresponding to any four corner points; any one of the four corner points is a first corner point, and the remaining three corner points respectively correspond to the first A straight line generated by a pair of corner points is parallel to the XYZ axis of the world coordinate system, respectively;
- a length operation unit configured to substitute a world coordinate corresponding to the first corner point and a world coordinate corresponding to the second corner point into a coordinate two-point distance formula, and calculate a length of the package to be tested; the second corner point a line generated by the connection with the first corner point is parallel to the X axis of the world coordinate system;
- a width operation unit configured to substitute a world coordinate corresponding to the first corner point and a world coordinate corresponding to the third corner point into a coordinate two-point distance formula, and calculate a width of the package to be tested; the second corner point and a line generated by the first corner connection is parallel to a Y axis of the world coordinate system;
- a height operation unit configured to substitute the world coordinates corresponding to the fourth corner point and the pixel coordinates of the corner point, in combination with the pre-acquired internal parameter matrix of the camera, the rotation matrix of the current field of view of the camera, and the translation vector, and substitute the formula into the formula (4) Calculating a height of the package to be tested; a line generated by connecting the fourth corner point to the first corner point is parallel to a Z axis of the world coordinate system.
- the present invention provides a storage medium storing a plurality of instructions that are executed by one or more processors to implement the steps of the method of measuring a package volume of the present invention.
- the present disclosure provides a mobile terminal, including: a processor that implements each instruction; a storage medium that stores a plurality of instructions; wherein: the processor executes an instruction stored by the storage medium to implement a package volume of the present invention The steps of the measurement method.
- the method, system, storage medium and mobile terminal for measuring package volume provided by the invention can bring at least one of the following beneficial effects:
- the present invention provides a planar marker by placing a planar marker on the upper surface of each package to be tested, and then the camera collects a surface including the planar marker surface and any one or more of the surface of the package to be tested adjacent to the surface on which the planar marker is disposed.
- Video the target video is provided with a rotation translation between the world coordinate system, the pixel coordinate system and the camera coordinate system to obtain the length, width and height of the package to be tested, thereby calculating the volume of the package to be tested, which is performed by using the camera attached to the mobile terminal.
- the target video is collected, and the volume of the package to be tested can be measured in real time and accurately.
- the present invention uses the camera provided by the mobile terminal to acquire the target video, does not require a depth camera for acquisition, and does not require the depth camera to collect the package to be tested, and must be located directly above the package to be tested, so that no complicated arrangement is required, and The camera is protected from strong light and can work outdoors, enriching the use of the scene, eliminating the need for additional hardware and cost savings.
- FIG. 1 is a flow chart of an embodiment of a method for measuring a package volume of the present invention
- FIG. 2 is a flow chart showing another embodiment of a method for measuring a package volume according to the present invention.
- FIG. 3 is a flow chart showing another embodiment of a method for measuring a package volume according to the present invention.
- FIG. 4 is a flow chart showing another embodiment of a method for measuring a package volume according to the present invention.
- FIG. 5 is a schematic view showing a corner point of a package to be tested according to a method and system for measuring a package volume according to the present invention
- FIG. 6 is a schematic diagram of a world coordinate system with a midpoint of a planar marker as an origin of a method and system for measuring a package volume according to the present invention
- Figure 7 is a flow chart showing another embodiment of a method for measuring a package volume of the present invention.
- Figure 8 is a flow chart showing another embodiment of a method for measuring a package volume according to the present invention.
- FIG. 9 is a flow chart showing a volume measuring step of a package to be tested in another embodiment of a method for measuring a package volume according to the present invention.
- 10a is a schematic diagram of a calibration template of a Zhang Zhengyou plane calibration method in another embodiment of a method for measuring a package volume according to the present invention
- FIG. 10b is a schematic diagram showing the detected feature points in the Zhang Zhengyou plane calibration method in another embodiment of the method for measuring the package volume of the present invention.
- FIG. 11 is a schematic diagram of a camera measuring attitude in another embodiment of a method for measuring a package volume according to the present invention.
- Figure 12 is a front elevational view of the rotated quadrilateral profile in another embodiment of the method for measuring the package volume of the present invention.
- Figure 13 is a schematic structural view of an embodiment of a package volume measuring system of the present invention.
- Figure 14 is a schematic structural view of another embodiment of a package volume measuring system of the present invention.
- FIG. 15 is a schematic structural view of another embodiment of a package volume measuring system of the present invention.
- 16 is a schematic structural view of another embodiment of a package volume measuring system of the present invention.
- FIG. 17 is a schematic structural view of another embodiment of a package volume measuring system of the present invention.
- FIG. 18 is a schematic structural view of another embodiment of a package volume measuring system of the present invention.
- Figure 19 is a block diagram showing an embodiment of a mobile terminal for measuring the volume of the package of the present invention.
- This scheme is applicable to the volume measurement of a package to be tested having a rectangular shape such as a rectangular parallelepiped, a cube, or a regular quadrangular prism. For other complicated shapes and irregular shapes, the package cannot be measured. Since the parcels in the express logistics industry are generally rectangular-shaped cartons, wooden frames, etc., they are generally suitable for measuring the volume size of rectangular shaped parcels in the express logistics industry.
- a first embodiment of the present invention is a method for measuring a package volume, which is used to measure the volume of a package to be tested provided with a planar marker, including:
- S100 collects a target image by using a camera of the mobile terminal;
- the target image includes the plane identifier, an upper surface of the package to be tested provided with the plane identifier, and the package to be tested adjacent to the upper surface Two side surfaces;
- S400 calculates world coordinates of the corner point according to the plane identifier, the internal parameter matrix of the pre-acquired camera, and the corner point, so as to obtain the volume of the package to be tested according to the world coordinates of the corner point.
- the planar identifier refers to a pre-designed pattern having a specific geometric shape and encoding information, which is usually printed on a piece of paper.
- the target video can be collected by the front camera or the rear camera that is provided by the mobile terminal.
- the camera lens on the mobile terminal needs to be oriented obliquely above the surface of the planar identifier. It is convenient to collect the upper surface of the package to be tested with the planar identifier and any two side surfaces adjacent to the upper surface of the package to be tested provided with the planar identifier.
- the upper surface is not necessarily the upper surface away from the ground when the package to be tested is placed, but is defined as the surface that can be collected by any camera with a planar marker in the package to be tested when the target image is captured, ie If the planar identifier is disposed on the upper surface of the package to be tested having a rectangular parallelepiped shape away from the bottom surface, any two or more side surfaces can be obtained from the four side surfaces adjacent to the upper surface; The object is disposed on any one of the side surfaces of the rectangular package to be tested, and then any two or more side surfaces can be obtained from one upper surface and the remaining three side surfaces adjacent to the side surface.
- the shape of the package to be tested is a rectangular parallelepiped is exemplified, and other rectangular shaped packages to be tested are all within the scope of the present invention.
- the invention can collect video through the camera provided by the mobile terminal, perform image processing on the captured video to obtain a target image, and process the target image to obtain an image of the planar marker.
- the corner point of the package to be tested is calculated according to the plane identifier and the corner point and the internal reference matrix of the pre-acquired camera to obtain the world coordinates of the corner point of the package to be tested, and the volume of the package to be tested is calculated according to the world coordinates of the corner point.
- the invention uses the camera provided by the mobile terminal to collect the target video, does not need the depth camera to collect, and does not need the depth camera to collect the package to be tested, and must be located directly above the package to be tested, so no complicated arrangement is needed, which enriches Use the scenario, no need to add additional hardware facilities, and save costs.
- the present invention does not need to be equipped with a depth camera and a mobile terminal, and when measuring the volume of the user's package to be tested, not only the depth camera and the mobile terminal but also the depth camera and the mobile terminal are used.
- the invention adopts the camera and the processor provided by the mobile terminal, and has the advantages of low cost and low cost, simplifying the step of measuring the volume of the package to be tested, high measurement efficiency, and the volume of the package to be tested by the mobile terminal
- the built-in processor is automatically completed, the operation is simple, and the detection result is intuitive, reliable, and the measurement accuracy is high. Therefore, the invention can fully measure the volume of the package, is accurate and efficient, and does not need to install other hardware devices, is simple and convenient, and has high user experience.
- the method includes the following steps:
- S010 calibrates the camera to obtain an internal reference matrix of the camera.
- the embodiment is an optimized embodiment of the foregoing first embodiment.
- the main improvement is that the step S010 is added to calibrate the camera, that is, in this embodiment.
- the camera for collecting the target video needs to be calibrated.
- the internal reference matrix of the camera is obtained, that is, the camera is determined to be imaged.
- Geometric model. Camera calibration is the pre-preparation stage of the whole system. When a camera is selected for visual measurement, it must be calibrated to obtain the internal reference matrix composed of parameters such as distortion coefficient and focal length of the camera. In the subsequent implementation phase, the camera's internal reference matrix can be used for corresponding visual measurements and calculations.
- the calibration operation only needs to be performed once.
- the invention uses Zhang Zhengyou's checkerboard calibration method to calibrate the camera.
- the Zhang Zhengyou calibration method calculates the internal reference coefficient of the camera by using images acquired by different cameras relative to different angles of the chessboard, and finally obtains the internal reference matrix of the camera.
- the internal parameter matrix of the camera is obtained by the simultaneous equations.
- the internal parameter matrix of the camera is a 3x3 matrix K.
- the specific form is as follows:
- fx represents the product of the physical focal length F of the camera lens and the size of each unit of the imager in the X-axis direction
- fy represents the product of the physical focal length F of the camera lens and the size of each element of the imager in the y-axis direction
- cx represents the imager The offset of the center from the optical axis in the X-axis direction
- cy represents the offset in the Y-axis direction due to the center of the imager imager and the optical axis.
- a third embodiment of the present invention is an optimized embodiment of the first and second embodiments, as shown in FIG. 2, a method for measuring a package volume, which is used for measuring a package to be tested provided with a planar marker. Volume, including:
- S100 collects a target image by using a camera of the mobile terminal;
- the target image includes the plane identifier, an upper surface of the package to be tested provided with the plane identifier, and the package to be tested adjacent to the upper surface Two side surfaces;
- the step S200 performs image processing on the target image, so that the planar identifier is specifically included in the target image;
- S210 performs binary segmentation on the target image, and extracts a contour from the segmented binarized image
- S220 selecting, according to a common feature of the pre-stored contour identifiers of the plane identifiers, an outline contour having the common features as an alternative contour from the extracted contour contours;
- S400 calculates world coordinates of the corner point according to the plane identifier, the internal parameter matrix of the pre-acquired camera, and the corner point, so as to obtain the volume of the package to be tested according to the world coordinates of the corner point.
- this embodiment is an optimized embodiment of the foregoing first or second embodiment.
- the main improvement is that steps S210-S240 are added to how to The target image is processed to identify the screen plane identifier for further refinement.
- the target image is binary-divided, and the binary value is that the gray value of the pixel on the image is set to 0 or 255, that is, the entire image is presented with an obvious black-and-white visual effect, and the image has Different regions of special meaning are separated, and these regions do not intersect each other, and each region satisfies the consistency of a particular region.
- the image acquired by the camera can also be binary-divided using an adaptive threshold.
- planar identifier After performing the binary segmentation processing on the target image, it is necessary to identify the planar identifier, since the camera may be photographed differently from different angles (but both the planar marker and the surface including the planar marker and other surfaces can be captured). The target video, therefore, the planar identifier on the captured image video frame does not have to be the front view. Then, it is necessary to extract the planar marker photographed from various angles, and perform edge detection on the planar marker to obtain the common features of the contour of the planar marker, and then store the common feature in advance to facilitate the video capture. The planar identifier is identified after the frame.
- the contours of the divided images are extracted, and according to the common features of the contours of the planar identifiers, an alternative contour is found, and the contour is polygon-fitted. Discard those non-convex polygons and those that are not quadrilateral.
- some additional constraints can be used to eliminate quadrilateral contours that are not likely to be planar marker images, such as the quadrilateral side is significantly smaller than the remaining edges (the shape is relatively thin), the contour perimeter or area is too small, etc., and the rest An eligible contour is an alternative contour that the planar marker may correspond to.
- the next step is to obtain a front view of each candidate contour, that is, to change the candidate contour image area corresponding to the plane identifier into a front view, thereby further determining whether the candidate contour region is a plane identifier.
- the image corresponding to the object Specifically, by comparing the front view of each candidate contour with the pre-stored planar identifier template, when the alignment is consistent, it can be determined that the candidate contour is the shape of the planar identifier.
- the contour, the image corresponding to this alternative contour is the image of the planar marker, and thus the planar marker is identified.
- the shape of the planar marker may be a rectangle, a diamond or a square or the like.
- the planar identifier disposed on any surface of the package to be tested is a square, and the plane pre-stored in the common feature of the contour contour corresponding to the pre-stored planar identifier
- a common feature of the contour corresponding to the identifier is that the contour corresponding to the planar identifier is a quadrangle. If the set flat markers are different, the common features of the corresponding outlines will be different.
- a planar marker we should try to select a flat marker that is easy to identify and has obvious feature points. For example, a square has four vertices. Since the four sides of the square are the same, adding four vertices is more conducive to subsequent positioning operations, making the operation simpler.
- a fourth embodiment of the present invention is an optimized embodiment of the third embodiment, a method for measuring a package volume, which is used to measure the volume of a package to be tested provided with a planar marker, including :
- S100 collects a target image by using a camera of the mobile terminal;
- the target image includes the plane identifier, an upper surface of the package to be tested provided with the plane identifier, and the package to be tested adjacent to the upper surface Two side surfaces;
- the step S200 performs image processing on the target image, so that the planar identifier is specifically included in the target image;
- S210 performs binary segmentation on the target image, and extracts a contour from the segmented binarized image
- S220 selecting, according to a common feature of the pre-stored contour identifiers of the plane identifiers, an outline contour having the common features as an alternative contour from the extracted contour contours;
- the step S230 obtains a front view of the candidate contour, which is specifically:
- the pixel coordinates of the four vertices after the projective transformation into the front view are defined as the pixel coordinates of the pre-stored four vertices of the front view of the planar identifier;
- X is the homogeneous pixel coordinate of the candidate silhouette vertex
- the non-homogeneous pixel coordinates are X' is the homogeneous coordinate of the vertex after the projective transformation
- its non-homogeneous pixel coordinates are X1, x2, and x3 are elements in X
- x1', x2', and x3' are elements in X'
- x and y are non-corresponding non-homogeneous pixel abscissas and ordinates
- u and v are projections respectively The transformed non-homogeneous pixel abscissa and ordinate
- S234 performs projective transformation on all pixels of the binarized image corresponding to the candidate contour according to the projective transformation matrix M, and obtains a front view corresponding to the region included in the candidate contour.
- S240 when the front view of the candidate contour is consistent with the pre-stored planar identifier template, identifying an image corresponding to the candidate contour as an image of the planar identifier;
- S400 calculates world coordinates of the corner point according to the plane identifier, the internal parameter matrix of the pre-acquired camera, and the corner point, so as to obtain the volume of the package to be tested according to the world coordinates of the corner point.
- this embodiment is an optimized embodiment of the foregoing third embodiment. Compared with the foregoing third embodiment, the main improvement is that steps S231-S234 are added to face how to obtain an alternative contour.
- the figure is further refined.
- This embodiment continues the example in which the planar identifier in the above embodiment is square. Continuing to illustrate, according to the square characteristic of the square planar identifier, for example, we can define the four contours after the candidate contour is converted into the front view by the projective transformation.
- the pixel coordinates such as the four vertex pixel coordinates of the front view of the square planar identifier are (0, 0), (0, 100), (100, 100), (100, 0), then these four The vertex coordinates are used as the pixel coordinates of the four vertices of the quadrilateral candidate contour.
- the pixel coordinates of the original image of the quadrilateral candidate contour can be read from the image.
- the simultaneous equations can be used to solve the photography.
- Transforming matrix M by which all pixels of the quadrilateral candidate contour region can be subjected to projective transformation, and a front view corresponding to the region of the quadrilateral candidate contour can be obtained.
- the size of the front view image is 100 ⁇ 100.
- the front view is selected for comparison because the image of the planar marker photographed by the camera from various angles is different. If the camera is directly above the planar marker, the image of the planar marker is also a rectangle, if the camera is in the plane logo The object is diagonally above, then the image of the rectangular flat marker is an irregular quadrilateral.
- the purpose of obtaining the front view for comparison is that the front view of the planar marker is viewed from the top directly regardless of the angle from which the camera looks. The image, in this way, facilitates the identification of flat markers.
- the fifth embodiment of the present invention is an optimized embodiment of the first embodiment, the second embodiment, the third embodiment, or the fourth embodiment, and includes:
- S100 collects a target image by using a camera of the mobile terminal;
- the target image includes the plane identifier, an upper surface of the package to be tested provided with the plane identifier, and the package to be tested adjacent to the upper surface Two side surfaces;
- S400 calculates a world coordinate of the corner point according to the plane identifier, an internal parameter matrix of the pre-acquired camera, and the corner point, so as to obtain a volume of the package to be tested according to the world coordinate of the corner point;
- the S300 performs image edge detection on the target image, so that the corner point of the package to be tested is specifically included in the target image;
- S330 calculates a position of an intersection of any two edge lines in the edge line to obtain a corner point of the package to be tested.
- this embodiment is an optimized embodiment of any one of the foregoing first to fourth embodiments, and the present embodiment is mainly compared with any one of the foregoing first to fourth embodiments.
- the improvement is that the corner points of how to detect the package to be tested are further refined by steps S310-S330.
- edge detection processing is performed on the target image to obtain an edge binary image, and a Canny edge detection algorithm can be used, that is, a Gaussian filter is used to smooth the target image to detect a significant edge in the target image, and the first-order partial guide is limited.
- the difference is used to calculate the amplitude and direction of the gradient, the non-maximum suppression of the gradient amplitude is used, and the edge is detected and connected by the double threshold algorithm. Since the edge of the package to be tested is obviously contrasted with the background, the edge detection algorithm can highlight these The apparent edge of the object, the process will get a binary image containing the edge of the package to be tested in the image.
- the Hough transform can be used to detect the straight line to find all the existing lines from the edge binary image, and the Hough transform detects the edge binary image.
- the method of the existence of the straight line is that the equation of the straight line in the polar coordinate system is the following formula (5);
- ⁇ a series of calculations can be obtained.
- ⁇ according to the obtained ( ⁇ , ⁇ ), establish a two-dimensional array of accumulator cells, wherein the size of the cell is fixed, and if the corresponding ( ⁇ , ⁇ ) value falls within a certain unit, the accumulation of the cell
- the counter is incremented by one, and the corresponding unit whose final accumulator value exceeds a predefined threshold T is considered to represent a straight line.
- the Hough transform method for detecting straight lines has been discussed extensively and will not be discussed in depth here.
- the Hough transform detection line is also a preferred method. Other methods of detecting the line can be used to obtain an edge binary image containing the edge of the package to be tested in the image. For example, the Hough line detection algorithm finds a line in the edge binary image. . The Hough line detection algorithm finds lines based on obvious edges, and small or cluttered edges in binary images are automatically filtered out.
- step 3 select the point with the largest value in the Hough space, if the point is greater than the threshold, proceed to step 4, otherwise return to step 1;
- the edge line corresponding to the edge of the package to be tested can be detected. As shown in FIG. 5 and FIG. 6, the position of the intersection of any two edge lines in the edge line is calculated.
- the corner points A1, A2, A3, and A4 of the package to be tested may be obtained, and may also include other corner points A5, A6, and A7 of the package to be tested, but only A1, A2, and A3 are calculated based on the volume measurement efficiency of the package to be tested. , A4 can be.
- the calculation of the volume of the package to be tested is correct, you can use A3, A5, A6, A7 to calculate again, and compare the difference between the volume of the package to be tested calculated by A1, A2, A3, and A4. If it is less than the preset difference range, if any volume calculation value can be selected as the volume measurement value of the package to be tested, otherwise, the measurement package needs to be re-tested for video acquisition calculation.
- the invention adopts edge image acquisition, line detection, determination of candidate polygons and verification of candidate polygons, eliminating the cumbersome neural network training process and sliding operation, and directly detecting the edge line of the package to be tested in the target image, which is simpler and more intuitive. The detection efficiency is improved.
- a sixth embodiment of the present invention is an optimized embodiment of the first embodiment, the second embodiment, the third embodiment, or the fourth embodiment, including
- S100 collects a target image by using a camera of the mobile terminal;
- the target image includes the plane identifier, an upper surface of the package to be tested provided with the plane identifier, and the package to be tested adjacent to the upper surface Two side surfaces;
- S400 calculates a world coordinate of the corner point according to the plane identifier, an internal parameter matrix of the pre-acquired camera, and the corner point, so as to obtain a volume of the package to be tested according to the world coordinate of the corner point;
- the S400 calculates the world coordinates of the corner point according to the plane identifier, the internal parameter matrix of the camera acquired in advance, and the corner point, so as to obtain the volume of the package to be tested according to the world coordinate of the corner point.
- S410 calculating, according to the plane identifier and the pre-acquired internal reference matrix of the camera, an outer parameter matrix of a current field of view of the camera; the outer parameter matrix includes a rotation matrix and a translation vector;
- S420 acquiring, according to the pixel coordinates of the corner point in the pixel coordinate system, the world coordinates of the corner point in combination with the rotation matrix and the translation vector;
- S430 calculates a length, width, and height of the package to be tested according to the world coordinates of the corner point;
- S440 calculates the length and width of the volume into a volume formula to obtain the volume of the package to be tested.
- the step S410 is to calculate an outer parameter matrix of the current field of view of the camera according to the plane identifier and the internal parameter matrix of the camera obtained in advance;
- the outer parameter matrix includes a rotation matrix and a translation vector, and specifically includes steps As shown in Figure 8:
- S411 establishes a world coordinate system with the midpoint of the planar identifier as an origin
- S412 reading vertex pixel coordinates of each vertex of the planar identifier in a pixel coordinate system, and vertex world coordinates of each vertex in a world coordinate system;
- (u, v, 1) represents the homogeneous coordinates of the pixel coordinates of the target point in the pixel coordinate system of the camera, and (Xw, Yw, Zw, 1) indicates that the target point is in the The homogeneous coordinates of the world coordinates in the world coordinate system, (Xc, Yc, Zc) represents the camera coordinates of the target point in the camera coordinate system of the camera; fx represents the physical focal length F of the camera lens and the imager in the X-axis direction The product of the size of each unit, fy represents the product of the physical focal length F of the camera lens and the size of each unit of the imager in the y-axis direction, cx represents the offset of the center of the imager from the optical axis in the X-axis direction, and cy represents the imaging due to imaging.
- An offset of the center of the imager from the optical axis in the Y-axis direction; R represents a rotation matrix of the world coordinate system to the camera coordinate system,
- the Z-axis coordinates of the point on the plane where the plane identifier S is located Is 0. If the side length of the plane identifier S is P, the coordinates of the four vertex plane identifiers S coordinate system O1 are (-P/2, -P/2, 0), (P/2, -P/, respectively). 2,0), (P/2, P/2, 0), (-P/2, P/2, 0).
- the above equation can be written by a vertex pixel coordinate of the plane identifier S and its corresponding coordinate in the plane identifier coordinate system.
- Four equations can be written by the four vertices of the plane identifier S, and then through the direct linear transformation (DLT) algorithm of the equations, r1, r2, r3 and T are obtained.
- the rotation matrix R is an orthogonal matrix
- the column vectors r1, r2, and r3 are mutually orthogonal unit vectors.
- r3 can be obtained from the vector product of r1 and r2, thereby vertex pixel coordinates and vertices.
- the internal parameter matrix of the camera obtained in advance is substituted into the following formula (2) and formula (3), and the rotation matrix and translation of the current field of view of the camera can be calculated by combining formula (4). vector.
- the step S420 according to the pixel coordinates of the corner point in the pixel coordinate system, acquiring the world coordinates of the corner point in combination with the rotation matrix and the translation vector, specifically includes the steps, as shown in FIG. 8 :
- S421 reads the pixel coordinates of the corner point of the corner point in the pixel coordinate system of the camera
- the pixel coordinates (u1, v1) of the corner point A1 in the pixel coordinate system are known, and then substituted into the formula (4), since the internal reference matrix K of the camera is known, in addition, S411-S413 has obtained the rotation matrix R and the translation vector T, then the unknowns of the matrix equations are X w , Y w , Z c , and the world of the corner point A1 in the world coordinate system can be obtained by solving the matrix equations.
- the coordinates (X w1 , Y w1 , 0) can be similarly extracted according to the corresponding pixel coordinates (ui, vi) and i ⁇ N(i ⁇ 2) of the corner points A2, A3, and A4 in the pixel coordinate system.
- the respective corner points of the package to be tested correspond to world coordinates (X wi , Y wi , 0), i ⁇ N (i ⁇ 2) on the world coordinate system.
- the step S430 calculates the length, width, and height of the package to be tested according to the world coordinates of the corner point, and specifically includes the steps, as shown in FIG. 8 :
- S431 reads the world coordinates corresponding to any four corner points; any one of the four corner points is a first corner point, and the remaining three corner points are respectively connected with the first corner point to generate a straight line Parallel to the XYZ axis of the world coordinate system, respectively;
- the world coordinates corresponding to the fourth corner point and the pixel coordinates of the corner point are combined with the internal parameter matrix of the pre-acquired camera, the rotation matrix of the current field of view of the camera, and the translation vector, and are obtained by substituting the formula (4).
- a height of the package to be tested; a line generated by the connection of the fourth corner point and the first corner point is parallel to a Z axis of the world coordinate system.
- the world coordinates corresponding to any four corner points are first read, and any one of the four corner points read is used as the first corner point, and the remaining three corner points are respectively associated with the first corner.
- the straight lines generated by the two-two connection are respectively parallel to the XYZ axis of the world coordinate system, and the line generated by the connection of the second corner point and the first corner point is parallel to the X-axis of the world coordinate system, and the second corner point and the first corner point
- the line generated by the connection is parallel to the Y-axis of the world coordinate system, and the line formed by the connection of the fourth corner point and the first corner point is parallel to the Z-axis of the world coordinate system.
- the first corner point is A1
- the second corner point is A3
- the third corner point is A2
- the fourth corner point is A4. Then the world coordinates of the first corner point A1 are (X w1 , Y w1 , 0), the world coordinates of the second corner point A3 are (X w3 , Y w3 , 0), and the world coordinates of the third corner point A2 are (X w2 , Y w2 , 0), the world coordinate of the fourth corner A4 is (X w4 , Y w4 , 0),
- W
- the Z-axis coordinate of the corner point A4 is the height H
- X w4 or Y w4 into a value yields an unknown by solving the matrix equations.
- Zw is calculated by substituting Xw4 and Yw4 twice, and then the average value of the two is taken as the height H, thereby improving the accuracy and reliability of the measurement of the height of the package to be tested.
- corner points A5, A6, and A7 can be calculated in the world coordinate system according to the corresponding pixel coordinates (ui, vi) and i ⁇ N(i ⁇ 2) of the corner points A5, A6, and A7 in the pixel coordinate system.
- the volume of the package to be tested is calculated according to the corner points A3, A5, A6, A7, according to the corner points A3, A5, A6
- the length, width and height calculated by A7 are used to verify whether the calculated volume of the package to be tested is reliable, and will not be repeated again.
- the distance between the corner point A1 and the corner point A4 can also calculate the height of the package to be tested, that is:
- Camera calibration is the pre-preparation stage of the whole system.
- a camera When a camera is selected for visual measurement, it must be calibrated to obtain the internal reference matrix composed of parameters such as distortion coefficient and focal length of the camera.
- the camera's internal parameter matrix can be used for corresponding visual measurement and calculation, and the calibration operation only needs to be performed once.
- the invention uses Zhang Zhengyou's checkerboard calibration method to calibrate the camera.
- the Zhang Zhengyou calibration method calculates the internal reference coefficient of the camera by using images acquired by different cameras relative to different angles of the chessboard, and finally obtains the internal reference matrix of the camera.
- the internal parameter matrix of the camera is obtained by the simultaneous equations.
- the internal parameter matrix of the camera is a 3x3 matrix K.
- the specific form is as follows:
- fx represents the product of the physical focal length F of the camera lens and the size of each unit of the imager in the X-axis direction
- fy represents the product of the physical focal length F of the camera lens and the size of each element of the imager in the y-axis direction
- cx represents the imager The offset of the center from the optical axis in the X-axis direction
- cy represents the offset in the Y-axis direction due to the center of the imager imager and the optical axis.
- the plane marker S is placed on the upper surface of the package to be tested of the express measurement package size, and the center O1 of the plane marker S is taken as the origin of the world coordinate system. Since the thickness of the planar marker is negligible, the upper surface of the package is coplanar with the XY plane of the world coordinate system O1, and the package to be tested is a rectangular parallelepiped or a cube, and the height H direction of the package and the Z axis of the world coordinate system O1. The directions are parallel.
- the courier uses the camera of the handheld terminal (or mobile phone) carried by himself to be diagonally above the package to be tested, ensuring that the upper surface of the package to be tested (including the planar marker) and any two and The two side surfaces adjacent to the surface have a total of three surfaces.
- Plane marker identification This step is used to identify a specific plane identifier in the image and determine the four corner points of the plane identifier.
- the specific process is as follows: the image acquired by the camera is binary-divided by the adaptive threshold, and then A quadrilateral contour resembling a planar marker is extracted from the binary image, and the image is transformed into a square front view by projective transformation through four vertices of the quadrilateral contour. By analyzing the encoding in the front view image, the planar identifier corresponding to the quadrilateral image is finally determined.
- the process detects a quadrilateral contour that the planar marker in the image may correspond to.
- the image is binarized by the adaptive threshold method, and then the outline is extracted from the binary image obtained above. Polygon fitting the contours, discarding those non-convex polygons, and those that are not quadrilateral.
- Some additional constraints are used to eliminate quadrilateral contours that are not likely to be planar marker images, such as the quadrilateral side being significantly smaller than the remaining edges (the shape is relatively elongated), the contour perimeter or area being too small.
- the remaining eligible contours are the alternative contours that the planar marker may correspond to.
- the process is used to change the quadrilateral image area corresponding to the planar identifier into a square front view, thereby further determining whether the quadrilateral area is an image corresponding to the planar identifier.
- the four vertex pixel coordinates after the quadrilateral contour is converted into a front view by photographic transformation are (0, 0), (0, 100), (100, 100), (100, 0).
- the coordinates of the four vertex pixels of the quadrilateral contour are known in the original image, and the projective transformation matrix M is satisfied for each set of points:
- X is the homogeneous pixel coordinate of the candidate silhouette vertex
- the non-homogeneous pixel coordinates are X is the homogeneous coordinate of the vertex after the projective transformation
- its non-homogeneous pixel coordinates are X1, x2, and x3 are elements in X
- x1', x2', and x3' are elements in X'
- x and y are non-corresponding non-homogeneous pixel abscissas and ordinates
- u and v are projections respectively The transformed non-homogeneous pixel abscissa and ordinate
- the projective transformation matrix M can be solved by the simultaneous equations, and the projective transformation M can be performed on all the pixels of the original image to obtain a front view corresponding to the quadrilateral contour region, and the front view is a square plane.
- the marker image that is, the front view image size is 100 ⁇ 100.
- the image of the planar marker photographed by the camera from various angles is different, if the camera is directly above the marker, the image of the marker is also a rectangle; if the camera is obliquely viewed, the image of the rectangular planar marker is An irregular quadrilateral.
- the purpose of obtaining a front view in this step is that no matter which angle the camera looks from, the resulting front view is an image viewed from directly above. It facilitates the identification of subsequent planar markers, that is, the normalization of images.
- the front view image of the acquired planar marker is sequentially rotated by 90°, 180°, and 270° to finally obtain four images.
- the four images obtained above are respectively matched with the image templates of the planar markers.
- the quadrilateral contour corresponds to the planar identifier.
- the point Z-axis coordinate on the plane where the plane identifier S is located is 0. If the side length of the plane identifier S is 80 mm, the coordinates of the four vertex plane identifiers S coordinate system O1 are (-40, -40, 0), (40, -40, 0), (40, 40,0), (-40,40,0).
- (u, v, 1) represents the homogeneous coordinates of the pixel coordinates of the target point in the pixel coordinate system of the camera, and (Xw, Yw, Zw, 1) indicates that the target point is in the The homogeneous coordinates of the world coordinates in the world coordinate system, (Xc, Yc, Zc) represents the camera coordinates of the target point in the camera coordinate system of the camera; fx represents the physical focal length F of the camera lens and the imager in the X-axis direction The product of the size of each unit, fy represents the product of the physical focal length F of the camera lens and the size of each unit of the imager in the y-axis direction, cx represents the offset of the center of the imager from the optical axis in the X-axis direction, and cy represents the imaging due to imaging.
- the center of the imager and the optical axis are offset in the Y-axis direction; R represents the rotation matrix of the world coordinate system to the camera coordinate system, and T
- the above can be written by the vertex pixel coordinates of a vertex of the planar identifier S in the pixel coordinate system and the vertex world coordinates of the vertex in the world coordinate system, and the four vertices of the planar identifier S can be written out.
- the column vectors r1, r2, and r3 are mutually orthogonal unit vectors.
- the Hough line detection algorithm uses the Hough line detection algorithm to find the edge line in the edge binary image.
- the Hough line detection algorithm looks for edge lines based on distinct and long edges, and small or cluttered edges in the binary image are automatically filtered out. Since the edge of the package to be tested is relatively obvious and relatively long, the edge line corresponding to the edge of the package to be tested can be detected.
- the position of the intersection point of each edge line corresponding to the edge of the package to be tested is calculated, and the corner points A1, A2, A3, and A4 are obtained, and the corner point is the corner point corresponding to the package.
- the length L of the package to be tested corresponds to the corner point A1 on the upper surface of the package to be tested, and the distance corresponding to A3, and the width W of the package to be tested corresponds to It is the distance corresponding to the corner points A1 and A2 of the upper surface of the package to be tested.
- the coordinates (X w2 , Y w2 , 0), (X w3 , Y w3 , 0) of the corner points A2 and A3 in the world coordinate system can be obtained.
- the length L
- and the width W
- can be obtained by the two-point distance formula in the three-dimensional space as follows.
- the unknowns of the matrix equations are Z w , Z c . Obviously, simply substituting X w4 or Y w4 into a value yields an unknown by solving the matrix equations.
- Zw is calculated by substituting Xw4 and Yw4 twice, and then the average value of the two is taken as the height H, thereby improving the accuracy and reliability of the measurement of the height of the package to be tested.
- the invention utilizes the camera to accurately calculate the length, width and height of the package to be tested in real time in a complicated scene, and can work normally under outdoor strong light, and calculates the size information of the package under the premise of ensuring accuracy. Since the present invention utilizes a camera attached to the handheld terminal device (or mobile phone), it does not require an additional expensive device such as a depth camera, and the cost is saved. In addition, the courier handheld terminal device (or mobile phone) is integrated with a rear camera, and the camera that is provided by the mobile terminal can work normally under the outdoor strong light, so that the real-time calculation can be performed under the premise of ensuring accuracy. The length, width and height of the package are measured, so that the size information of the package to be tested is conveniently and quickly calculated.
- the present invention utilizes a camera on a handheld terminal device (or a mobile phone), there is no need to add extra expensive equipment, which saves cost.
- the user can also use the mobile terminal storing the instruction for measuring the package volume measurement method to verify the volume of the package to be tested estimated by the courier, thereby knowing the size information of the package and avoiding the courier overreporting the volume of the package to be tested. Charges generated, reducing unnecessary mailing costs.
- a package volume measuring system is applied to measure the volume of a package to be tested provided with a planar marker, including:
- the image acquisition module 1000 is configured to collect a target image by using a camera of the mobile terminal, where the target image includes the planar identifier, an upper surface of the package to be tested provided with the planar identifier, and the adjacent to the upper surface The two side surfaces of the package to be tested;
- the image recognition module 2000 is configured to perform image processing on the target image acquired by the image acquisition module 1000, thereby identifying the planar identifier in the target image;
- the image processing module 3000 is configured to perform image edge detection on the target image acquired by the image acquiring module 1000, so as to identify a corner point of the package to be tested in the target image;
- a volume measurement module 4000 configured to calculate a world coordinate of the corner point according to the plane identifier recognized by the image recognition module 2000, an internal parameter matrix of the camera acquired in advance, and the corner point, thereby The world coordinates of the point get the volume of the package to be tested.
- the embodiment is a system embodiment based on the same inventive concept. Since the principle of solving the problem of the package volume measurement system is similar to the measurement method of the package volume, the implementation of the system can be referred to the implementation of the measurement method of the package volume, and the repetition is performed. I won't go into details here.
- An eighth embodiment of the present invention is an optimized embodiment of the seventh embodiment, a measurement system for a package volume, which is used for measuring a volume of a package to be tested provided with a planar marker, preferably, a measurement of a package volume
- the system also includes:
- the calibration module 5000 is configured to calibrate the camera before the image acquisition module acquires the target image through the camera, and acquire an internal reference matrix of the camera.
- the embodiment is a system embodiment based on the same inventive concept. Since the principle of solving the problem of the package volume measurement system is similar to the measurement method of the package volume, the implementation of the system can be referred to the implementation of the measurement method of the package volume, and the repetition is performed. I won't go into details here.
- a ninth embodiment of the present invention is an optimized embodiment of the seventh or eighth embodiment, a measurement system for a package volume, which is used for measuring a package to be tested provided with a planar marker.
- the main improvement is that the image recognition module 2000 includes:
- a binary segmentation sub-module 2100 configured to perform binary segmentation on the target image acquired by the extraction module
- a shape extraction sub-module 2200 configured to extract a contour from the divided binarized image
- a storage sub-module 2300 configured to store a common feature of the outline of the plane identifier, and the plane identifier template
- a determination processing sub-module 2400 configured to select, according to the common features of the contours corresponding to the planar identifiers stored in the storage sub-module 2300, from the contours extracted by the shape extraction sub-module 2200 The contour of the feature is used as an alternative contour;
- a front view obtaining sub-module 2500 configured to obtain a front view of the candidate contour
- the identification sub-module 2600 is configured to: when the front view of the candidate profile is consistent with the planar identifier template pre-stored by the storage sub-module 2300, identify an image corresponding to the candidate profile as the planar identifier image.
- the embodiment is a system embodiment based on the same inventive concept. Since the principle of solving the problem of the package volume measurement system is similar to the measurement method of the package volume, the implementation of the system can be referred to the implementation of the measurement method of the package volume, and the repetition is performed. I won't go into details here.
- a tenth embodiment of the present invention is an optimized embodiment of the ninth embodiment, a measurement system for a package volume, which is used for measuring a volume of a package to be tested provided with a planar marker, mainly
- the improvement is that the planar identifier is a square, and the common feature of the outline corresponding to the planar identifier stored by the storage sub-module is a quadrangle;
- the front view obtaining submodule 2500 includes:
- a reading unit 2510 configured to read pixel coordinates of four vertices of the candidate contour
- a defining unit 2520 configured to define pixel coordinates of the four vertices after the candidate contour is subjected to projective transformation into a front view as pixel coordinates of four pre-existing front views of the planar identifier;
- the calculating unit 2530 is configured to substitute the pixel coordinates of the four vertices read by the reading unit 2510 and the pixel coordinates of the four vertices defined by the defining unit 2520 into the following planar projective transformation formula (1), and obtain the same Projective transformation matrix M:
- X is the homogeneous pixel coordinate of the candidate silhouette vertex
- the non-homogeneous pixel coordinates are X' is the homogeneous coordinate of the vertex after the projective transformation
- its non-homogeneous pixel coordinates are X1, x2, and x3 are elements in X
- x1', x2', and x3' are elements in X'
- x and y are non-corresponding non-homogeneous pixel abscissas and ordinates
- u and v are projections respectively The transformed non-homogeneous pixel abscissa and ordinate
- a transforming unit 2540 configured to perform a projective transformation on all pixels of the binarized image corresponding to the candidate contour according to the projective transformation matrix M obtained by the calculating unit 2530, to obtain the candidate contour inclusion
- the area corresponds to the front view.
- the embodiment is a system embodiment based on the same inventive concept. Since the principle of solving the problem of the package volume measurement system is similar to the measurement method of the package volume, the implementation of the system can be referred to the implementation of the measurement method of the package volume, and the repetition is performed. I won't go into details here.
- An eleventh embodiment of the present invention is an optimized embodiment of the seventh, eighth or tenth embodiment, a measurement system for a package volume, the main improvement being that the image processing module 3000 includes:
- the edge detection sub-module 3100 is configured to perform edge detection processing on the target image acquired by the extraction module to obtain an edge binary image
- a line search sub-module 3200 configured to search for an edge line corresponding to the edge of the package to be tested from the edge binary image obtained by the edge detection sub-module 3100;
- the corner point acquisition sub-module 3300 is configured to calculate a position of an intersection of any two edge lines of the edge line found by the line search sub-module 3200, to obtain a corner point of the package to be tested.
- the embodiment is a system embodiment based on the same inventive concept. Since the principle of solving the problem of the package volume measurement system is similar to the measurement method of the package volume, the implementation of the system can be referred to the implementation of the measurement method of the package volume, and the repetition is performed. I won't go into details here.
- a measurement system for a package volume is an optimized embodiment of any one of the seventh embodiment to the eleventh embodiment, mainly The improvement is that the volume measuring module 4000 comprises:
- An outer parameter matrix obtaining sub-module 4100 configured to calculate an outer parameter matrix of a current field of view of the camera according to the plane identifier and an internal parameter matrix of the camera acquired in advance; the outer parameter matrix includes a rotation matrix and a translation vector ;
- a corner coordinate acquisition sub-module 4200 configured to acquire world coordinates of the corner point according to the pixel coordinates of the corner point in the pixel coordinate system, in combination with the rotation matrix and the translation vector;
- a length and width acquisition sub-module 4300 configured to calculate a length, a width and a height of the package to be tested according to the world coordinates of the corner point;
- the package volume acquisition sub-module 4400 is configured to calculate the volume of the package to be tested by substituting the length, width, and height into a volume formula.
- the outer parameter matrix obtaining submodule 4100 includes:
- a coordinate system determining unit 4110 configured to establish a world coordinate system with the midpoint of the planar identifier as an origin;
- a vertex coordinate reading unit 4120 configured to read vertex pixel coordinates of each vertex of the plane identifier in a pixel coordinate system, and vertex world coordinates of each vertex in a world coordinate system;
- the operation unit 4130 is configured to substitute the vertex pixel coordinates, the vertex world coordinates, and the pre-acquired internal parameter matrix of the camera into the following formulas (2) and (3), respectively, and combine the formula (4) to obtain the The rotation matrix and translation vector of the current field of view of the camera:
- (u, v, 1) represents the homogeneous coordinates of the pixel coordinates of the target point in the pixel coordinate system of the camera, and (Xw, Yw, Zw, 1) indicates that the target point is in the The homogeneous coordinates of the world coordinates in the world coordinate system, (Xc, Yc, Zc) represents the camera coordinates of the target point in the camera coordinate system of the camera; fx represents the physical focal length F of the camera lens and the imager in the X-axis direction The product of the size of each unit, fy represents the product of the physical focal length F of the camera lens and the size of each unit of the imager in the y-axis direction, cx represents the offset of the center of the imager from the optical axis in the X-axis direction, and cy represents the imaging due to imaging.
- the center of the imager and the optical axis are offset in the Y-axis direction; R represents the rotation matrix of the world coordinate system to the camera coordinate system, and T
- the corner coordinate acquisition sub-module 4200 includes:
- a corner pixel coordinate acquiring unit 4210 configured to read pixel coordinates of the corner point in a pixel coordinate system of the camera
- a corner point world coordinate obtaining unit 4220 configured to substitute the pixel coordinates of the corner point, the pre-acquired internal parameter matrix of the camera, and the rotation matrix and the translation vector of the current field of view of the camera into the formula (4).
- the world coordinates of the corner points wherein (u, v, 1) represents the homogeneous coordinates of the pixel coordinates of the corner points, and (Xw, Yw, Zw) is the world coordinate of the corner points, (Xw, Yw) , Zw, 1) represents the homogeneous coordinates of the world coordinates of the corner points;
- the length, width, and height acquisition submodule 4300 includes:
- a corner point world coordinate reading unit 4310 configured to read world coordinates corresponding to any four corner points; any one of the four corner points is a first corner point, and the remaining three corner points are respectively associated with the The straight lines generated by the two corners of the first corner point are respectively parallel to the XYZ axis of the world coordinate system;
- a length operation unit 4320 configured to substitute a world coordinate corresponding to the first corner point and a world coordinate corresponding to the second corner point into a coordinate two-point distance formula, and calculate a length of the package to be tested; the second angle a line formed by connecting the point to the first corner point is parallel to an X axis of the world coordinate system;
- a width operation unit 4330 configured to substitute a world coordinate corresponding to the first corner point and a world coordinate corresponding to the third corner point into a coordinate two-point distance formula, and calculate a width of the package to be tested; the second corner point a line generated by the connection with the first corner point is parallel to the Y axis of the world coordinate system;
- a height operation unit 4340 configured to substitute the world coordinates corresponding to the fourth corner point and the pixel coordinates of the corner point with the internal parameter matrix of the pre-acquired camera, the rotation matrix of the current field of view of the camera, and the translation vector.
- Formula (4) calculates the height of the package to be tested; the line generated by the connection of the fourth corner point with the first corner point is parallel to the Z axis of the world coordinate system.
- the embodiment is a system embodiment based on the same inventive concept. Since the principle of solving the problem of the package volume measurement system is similar to the measurement method of the package volume, the implementation of the system can be referred to the implementation of the measurement method of the package volume, and the repetition is performed. I won't go into details here.
- a thirteenth embodiment of the present invention is a storage medium storing a plurality of instructions, the plurality of instructions being executed by one or more processors to implement the following steps:
- S100 collects a target video through a camera of the mobile terminal, and acquires a target image from the target video;
- the target image includes the plane identifier, a target to-be-measured package surface provided with the planar identifier, and the target a plurality of surfaces of the package to be tested adjacent to the surface of the package to be tested;
- S200 performs image processing on the target image to identify the planar identifier in the target image
- S400 calculates a corner point world coordinate on the package to be tested according to the plane identifier, the pre-acquired internal reference matrix, and the intersection point, so as to obtain the volume of the package to be tested according to the corner point world coordinate.
- the storage medium stores a plurality of instructions, and the plurality of instructions are executed by one or more processors to implement any of the present inventions.
- the steps of the embodiment of the method of measuring the package volume are executed by one or more processors to implement any of the present inventions.
- a mobile terminal includes: a processor that implements each instruction; a storage medium that stores a plurality of instructions; wherein: the processor executes an instruction stored by the storage medium to implement a package volume The steps of the measurement method.
- the mobile terminal includes: a memory 1001, one or more (only one shown) processor 1002, and a camera 1003. These components communicate with each other through one or more communication bus signal lines.
- FIG. 16 is merely illustrative and does not limit the structure of the mobile terminal.
- the mobile terminal may further include more or less components than those shown in FIG. 16, or have different functions from those shown in FIG. Device.
- the components shown in FIG. 16 can be implemented in hardware, software, or a combination thereof.
- the memory can be used to store software programs and modules, such as the method for measuring the package volume and the program instructions/modules corresponding to the system embodiment in the embodiment of the present invention, and the processor executes various software programs/modules by allowing the software programs/modules stored in the memory.
- Functional application and data processing that is, a method/system for measuring the above-described package volume.
- the memory can include high speed random access memory and can also include non-volatile memory such as one or more magnetic storage devices, flash memory or other non-volatile solid state memory.
- the storage medium may be a magnetic disk, an optical disk, a read only memory (ROM), a random access memory (RAM), or the like.
- the processor runs various software within the memory, commands various functions of the mobile terminal, and performs data processing.
- the camera is used to capture video, which is equivalent to the eyes of a mobile terminal, such as a CCD camera.
- the method and system for measuring the package volume, the storage medium and the mobile terminal belong to the same concept.
- the method for measuring the corresponding package volume can be executed by executing the instruction stored in the storage medium by the processor.
- the specific implementation process of the method provided in the above please refer to the previous embodiment of the measurement method of the package volume, and details are not described herein again.
- the storage medium is stored, for example, in a memory of the mobile terminal and executed by at least one processor in the mobile terminal, and may include a flow of a measurement method embodiment such as a package volume during execution.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Theoretical Computer Science (AREA)
- Geometry (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
Description
Claims (18)
- 一种包裹体积的测量方法,其特征在于,应用于测量设有平面标识物的待测包裹的体积,包括步骤:A method for measuring a package volume, which is characterized by being used for measuring a volume of a package to be tested provided with a planar marker, comprising the steps of:S100通过移动终端的摄像头采集目标图像;所述目标图像包括所述平面标识物、设有所述平面标识物的待测包裹的上表面、与所述上表面相邻的所述待测包裹的两个侧表面;S100 collects a target image by using a camera of the mobile terminal; the target image includes the plane identifier, an upper surface of the package to be tested provided with the plane identifier, and the package to be tested adjacent to the upper surface Two side surfaces;S200对所述目标图像进行图像处理,从而在所述目标图像中识别出所述平面标识物;S200 performing image processing on the target image, thereby identifying the planar identifier in the target image;S300对所述目标图像进行图像边缘检测,从而在所述目标图像中识别出所述待测包裹的角点;S300 performing image edge detection on the target image, thereby identifying a corner point of the package to be tested in the target image;S400根据所述平面标识物、预先获取的摄像头的内参矩阵和所述角点,计算所述角点的世界坐标,从而根据所述角点的世界坐标得到所述待测包裹的体积。S400 calculates world coordinates of the corner point according to the plane identifier, the internal parameter matrix of the pre-acquired camera, and the corner point, so as to obtain the volume of the package to be tested according to the world coordinates of the corner point.
- 根据权利要求1所述的包裹体积的测量方法,其特征在于,所述步骤S100通过移动终端的摄像头采集目标图像之前包括步骤:The method for measuring a package volume according to claim 1, wherein the step S100 comprises the steps of: before the target image is captured by the camera of the mobile terminal:S010对所述摄像头进行标定,获取所述摄像头的内参矩阵。S010 calibrates the camera to obtain an internal reference matrix of the camera.
- 根据权利要求1所述的包裹体积的测量方法,其特征在于,所述步骤S200对所述目标图像进行图像处理,从而在所述目标图像中识别出所述平面标识物具体包括步骤:The method for measuring a package volume according to claim 1, wherein the step S200 performs image processing on the target image, so that the identifying the planar identifier in the target image comprises the following steps:S210对所述目标图像进行二值分割,并从分割后的二值化图像中提取外形轮廓;S210 performs binary segmentation on the target image, and extracts a contour from the segmented binarized image;S220根据预存的所述平面标识物所对应的外形轮廓的共性特征,从提取的外形轮廓中选取具有所述共性特征的外形轮廓作为备选轮廓;S220: selecting, according to a common feature of the pre-stored contour identifiers of the plane identifiers, an outline contour having the common features as an alternative contour from the extracted contour contours;S230获取所述备选轮廓的正视图;S230 acquires a front view of the candidate contour;S240当所述备选轮廓的正视图与预存的所述平面标识物模板一致时,识别所述备选轮廓对应的图像为所述平面标识物的图像。S240: When the front view of the candidate contour is consistent with the pre-stored planar identifier template, the image corresponding to the candidate contour is identified as an image of the planar identifier.
- 根据权利要求3所述的包裹体积的测量方法,其特征在于,所述平面标识物为正方形,所述步骤S220中预存的所述平面标识物所对应的预设轮廓特征为四边形;The method for measuring a package volume according to claim 3, wherein the planar identifier is a square, and the preset contour feature corresponding to the planar identifier prestored in step S220 is a quadrangle;所述步骤S230获取所述备选轮廓的正视图具体为:The step S230 obtains a front view of the candidate contour, which is specifically:S231读取所述备选轮廓的四个顶点的像素坐标;S231 reading pixel coordinates of four vertices of the candidate contour;S232定义所述备选轮廓经过射影变换为正视图后的四个顶点的像素坐标为预存的所述平面标识物的正视图的四个顶点的像素坐标;S232, the pixel coordinates of the four vertices after the projective transformation into the front view are defined as the pixel coordinates of the pre-stored four vertices of the front view of the planar identifier;S233将上述读取的四个顶点的像素坐标,以及所述定义的四个顶点的像素坐标分别代入平面射影变换公式(1),求取射影变换矩阵M:S233 substituting the pixel coordinates of the four vertices read above and the pixel coordinates of the defined four vertices into the plane projective transformation formula (1), respectively, and obtaining the projective transformation matrix M:其中,X为备选轮廓顶点的齐次像素坐标,其非齐次像素坐标为 X′为射影变换后顶点的齐次坐标,其非齐次像素坐标为 x1、x2、x3为X中的元素,x1'、x2'、x3'为X'中的元素;x、y分别为非对应的非齐次像素横坐标、纵坐标;u、v分别为射影变换后的非齐次像素横坐标、纵坐标; Where X is the homogeneous pixel coordinate of the candidate silhouette vertex, and the non-homogeneous pixel coordinates are X' is the homogeneous coordinate of the vertex after the projective transformation, and its non-homogeneous pixel coordinates are X1, x2, and x3 are elements in X, x1', x2', and x3' are elements in X'; x and y are non-corresponding non-homogeneous pixel abscissas and ordinates; u and v are projections respectively The transformed non-homogeneous pixel abscissa and ordinate;S234根据所述射影变换矩阵M,对所述备选轮廓对应的二值化图像的所有像素都执行射影变换,获得所述备选轮廓包含的区域对应的正视图。S234 performs projective transformation on all pixels of the binarized image corresponding to the candidate contour according to the projective transformation matrix M, and obtains a front view corresponding to the region included in the candidate contour.
- 根据权利要求1-4任一项所述的包裹体积的测量方法,其特征在于,所述步骤S300对所述目标图像进行图像边缘检测,从而在所述目标图像中识别出所述待测包裹的角点具体包括步骤:The method for measuring a package volume according to any one of claims 1 to 4, wherein the step S300 performs image edge detection on the target image, thereby identifying the package to be tested in the target image. The corner points specifically include the steps:S310对所述目标图像进行边缘检测处理,得到边缘二值图像;S310 performing edge detection processing on the target image to obtain an edge binary image;S320从所述边缘二值图像中查找对应于待测包裹边缘的边缘直线;S320: searching for the edge line corresponding to the edge of the package to be tested from the edge binary image;S330计算所述边缘直线中任意两条边缘直线组成的交点的位置,得到所述待测包裹的角点。S330 calculates a position of an intersection of any two edge lines in the edge line to obtain a corner point of the package to be tested.
- 根据权利要求1-4任一项所述的包裹体积的测量方法,其特征在于,所述步骤S400根据所述平面标识物、预先获取的摄像头的内参矩阵和所述角点,计算所述角点的世界坐标,从而根据所述角点的世界坐标得到所述待测包裹的体积具体包括步骤:The method for measuring a package volume according to any one of claims 1 to 4, wherein the step S400 calculates the angle according to the plane identifier, the internal parameter matrix of the camera acquired in advance, and the corner point. The world coordinates of the point, so that the volume of the package to be tested is obtained according to the world coordinates of the corner point, specifically including the steps:S410根据所述平面标识物及预先获取的所述摄像头的内参矩阵,计算所述摄像头当前视场的外参矩阵;所述外参矩阵包括旋转矩阵和平移向量;S410: calculating, according to the plane identifier and the pre-acquired internal reference matrix of the camera, an outer parameter matrix of a current field of view of the camera; the outer parameter matrix includes a rotation matrix and a translation vector;S420根据所述角点在像素坐标系中的像素坐标,结合所述旋转矩阵和平移向量获取所述角点的世界坐标;S420: acquiring, according to the pixel coordinates of the corner point in the pixel coordinate system, the world coordinates of the corner point in combination with the rotation matrix and the translation vector;S430根据所述角点的世界坐标计算所述待测包裹的长宽高;S430 calculates a length, width, and height of the package to be tested according to the world coordinates of the corner point;S440将所述长宽高代入体积公式计算获取所述待测包裹的体积。S440 calculates the length and width of the volume into a volume formula to obtain the volume of the package to be tested.
- 根据权利要求6所述的包裹体积的测量方法,其特征在于,所述步骤S410根据所述平面标识物及预先获取的所述摄像头的内参矩阵,计算所述摄像头当前视场的旋转矩阵和平移向量具体包括步骤:The method for measuring a package volume according to claim 6, wherein the step S410 calculates a rotation matrix and a translation of the current field of view of the camera according to the plane identifier and the internal parameter matrix of the camera acquired in advance. The vector specifically includes the steps:S411以所述平面标识物的中点为原点建立世界坐标系;S411 establishes a world coordinate system with the midpoint of the planar identifier as an origin;S412读取所述平面标识物的各个顶点在像素坐标系中的顶点像素坐标,以及各个顶点在世界坐标系中的顶点世界坐标;S412: reading vertex pixel coordinates of each vertex of the planar identifier in a pixel coordinate system, and vertex world coordinates of each vertex in a world coordinate system;S413将所述顶点像素坐标、顶点世界坐标以及所述预先获取的所述摄像 头的内参矩阵分别代入下述公式(2)和公式(3),再结合公式(4)得到所述摄像头当前视场的旋转矩阵和平移向量:S413, substituting the vertex pixel coordinates, the vertex world coordinates, and the pre-acquired internal parameter matrix of the camera into the following formulas (2) and (3), respectively, and combining the formula (4) to obtain the current field of view of the camera. Rotation matrix and translation vector:其中,(u,v,1)表示所述平面标识物中所述目标点在摄像机的像素坐标系中像素坐标的齐次坐标,(Xw,Yw,Zw,1)表示所述目标点在所述世界坐标系中世界坐标的齐次坐标,(Xc,Yc,Zc)表示所述目标点在摄像机的相机坐标系中的相机坐标;fx表示摄像机透镜的物理焦距F与成像仪在X轴方向每个单元尺寸的乘积,fy表示摄像机透镜的物理焦距F与成像仪在y轴方向每个单元尺寸的乘积,cx表示成像仪中心与光轴在X轴方向上的偏移,cy表示由于成像仪成像仪中心与光轴在Y轴方向上的偏移;R表示世界坐标系到相机坐标系的旋转矩阵,T表示所述世界坐标系到所述相机坐标系的平移向量。Wherein (u, v, 1) represents the homogeneous coordinates of the pixel coordinates of the target point in the pixel coordinate system of the camera, and (Xw, Yw, Zw, 1) indicates that the target point is in the The homogeneous coordinates of the world coordinates in the world coordinate system, (Xc, Yc, Zc) represents the camera coordinates of the target point in the camera coordinate system of the camera; fx represents the physical focal length F of the camera lens and the imager in the X-axis direction The product of the size of each unit, fy represents the product of the physical focal length F of the camera lens and the size of each unit of the imager in the y-axis direction, cx represents the offset of the center of the imager from the optical axis in the X-axis direction, and cy represents the imaging due to imaging. The center of the imager and the optical axis are offset in the Y-axis direction; R represents the rotation matrix of the world coordinate system to the camera coordinate system, and T represents the translation vector of the world coordinate system to the camera coordinate system.
- 根据权利要求7所述的包裹体积的测量方法,其特征在于,所述步骤S420根据所述角点在像素坐标系中的像素坐标,结合所述旋转矩阵和平移向量获取所述角点的世界坐标具体包括步骤:The method for measuring a package volume according to claim 7, wherein the step S420 acquires the world of the corner points according to pixel coordinates of the corner point in a pixel coordinate system in combination with the rotation matrix and the translation vector. The coordinates specifically include the steps:S421读取所述角点在摄像机的像素坐标系中的角点的像素坐标;S421 reads the pixel coordinates of the corner point of the corner point in the pixel coordinate system of the camera;S422将所述角点的像素坐标、所述预先获取的摄像头的内参矩阵以及所述摄像头当前视场的旋转矩阵和平移向量代入所述公式(4)中得到所述角点的世界坐标;其中,(u,v,1)表示所述角点的像素坐标的齐次坐标,(Xw,Yw,Zw)是所述角点的世界坐标,(Xw,Yw,Zw,1)表示所述角点的世界坐标的齐次坐标;S422, substituting the pixel coordinates of the corner point, the pre-acquired internal parameter matrix of the camera, and the rotation matrix and the translation vector of the current field of view of the camera into the formula (4) to obtain the world coordinates of the corner point; (u, v, 1) represents the homogeneous coordinate of the pixel coordinates of the corner point, (Xw, Yw, Zw) is the world coordinate of the corner point, and (Xw, Yw, Zw, 1) represents the angle Homogeneous coordinates of the world coordinates of the point;所述步骤S430根据所述角点的世界坐标计算所述待测包裹的长宽高具体包括步骤:The step S430 calculates the length, width, and height of the package to be tested according to the world coordinates of the corner point, and specifically includes the following steps:S431读取任意四个角点对应的世界坐标;所述四个角点中任意一个角点为第一角点,且剩余三个角点分别与所述第一角点两两连接生成的直线分别平行于所述世界坐标系的XYZ轴;S431 reads the world coordinates corresponding to any four corner points; any one of the four corner points is a first corner point, and the remaining three corner points are respectively connected with the first corner point to generate a straight line Parallel to the XYZ axis of the world coordinate system, respectively;S432将所述第一角点对应的世界坐标,以及第二角点对应的世界坐标代入坐标两点距离公式,计算获得所述待测包裹的长度;所述第二角点与所述第一角点连接生成的直线平行于所述世界坐标系的X轴;S432: Substituting the world coordinates corresponding to the first corner point and the world coordinate corresponding to the second corner point into a coordinate two-point distance formula, and calculating a length of the package to be tested; the second corner point and the first The line generated by the corner point connection is parallel to the X axis of the world coordinate system;S433将所述第一角点对应的世界坐标,以及第三角点对应的世界坐标代入坐标两点距离公式,计算获得所述待测包裹的宽度;所述第二角点与所述第一角点连接生成的直线平行于所述世界坐标系的Y轴;S433: Substituting the world coordinates corresponding to the first corner point and the world coordinate corresponding to the third corner point into a coordinate two-point distance formula, and calculating a width of the package to be tested; the second corner point and the first corner The line generated by the point connection is parallel to the Y axis of the world coordinate system;S434将第四角点对应的世界坐标以及角点的像素坐标,结合所述预先获取的摄像头的内参矩阵、所述摄像头当前视场的旋转矩阵和平移向量,代入所述公式(4)计算获得所述待测包裹的高度;所述第四角点与所述第一角点连接生成的直线平行于所述世界坐标系的Z轴。S434, the world coordinates corresponding to the fourth corner point and the pixel coordinates of the corner point are combined with the internal parameter matrix of the pre-acquired camera, the rotation matrix of the current field of view of the camera, and the translation vector, and are obtained by substituting the formula (4). a height of the package to be tested; a line generated by the connection of the fourth corner point and the first corner point is parallel to a Z axis of the world coordinate system.
- 一种包裹体积的测量系统,其特征在于,应用于测量设有平面标识物的待测包裹的体积,所述包裹体积的测量系统包括:A package volume measuring system is characterized in that it is applied to measuring a volume of a package to be tested provided with a planar marker, the measurement system of the package volume comprising:图像获取模块,用于通过移动终端的摄像头采集目标图像;所述目标图像包括所述平面标识物、设有所述平面标识物的待测包裹的上表面和与上表 面相邻的所述待测包裹的两个侧表面;An image acquisition module, configured to acquire a target image by using a camera of the mobile terminal; the target image includes the plane identifier, an upper surface of the package to be tested provided with the planar identifier, and the to-before adjacent to the upper surface Measuring the two side surfaces of the package;图像识别模块,用于对所述图像获取模块获取的所述目标图像进行图像处理,从而在所述目标图像中识别出所述平面标识物;An image recognition module, configured to perform image processing on the target image acquired by the image acquisition module, thereby identifying the planar identifier in the target image;图像处理模块,用于对所述图像获取模块获取的所述目标图像进行图像边缘检测,从而在所述目标图像中识别出所述待测包裹的角点;An image processing module, configured to perform image edge detection on the target image acquired by the image acquiring module, so as to identify a corner point of the package to be tested in the target image;体积测量模块,用于根据所述图像识别模块识别出的所述平面标识物、预先获取的摄像头的内参矩阵和所述角点,计算所述角点的世界坐标,从而根据所述角点的世界坐标得到所述待测包裹的体积。a volume measuring module, configured to calculate a world coordinate of the corner point according to the plane identifier recognized by the image recognition module, an internal parameter matrix of a pre-acquired camera, and the corner point, thereby, according to the corner point The world coordinates get the volume of the package to be tested.
- 根据权利要求9所述的包裹体积的测量系统,其特征在于,还包括:The package volume measuring system according to claim 9, further comprising:标定模块,用于在所述图像获取模块通过所述摄像头采集目标图像之前,对所述摄像头进行标定,获取所述摄像头的内参矩阵。And a calibration module, configured to: after the image acquisition module acquires the target image by using the camera, perform calibration on the camera to obtain an internal parameter matrix of the camera.
- 根据权利要求9所述的包裹体积的测量系统,其特征在于,所述图像识别模块包括:The package volume measuring system according to claim 9, wherein the image recognition module comprises:二值分割子模块,用于对所述提取模块获取的所述目标图像进行二值分割;a binary segmentation submodule, configured to perform binary segmentation on the target image acquired by the extraction module;外形提取子模块,用于从分割后的二值化图像中提取外形轮廓;a shape extraction sub-module for extracting a contour from the segmented binarized image;存储子模块,用于存储所述平面标识物所对应的外形轮廓的共性特征、所述平面标识物模板;a storage submodule, configured to store a common feature of the outline corresponding to the planar identifier, and the planar identifier template;判断处理子模块,用于根据所述存储子模块中存储的所述平面标识物所对应的外形轮廓的共性特征,从所述外形提取子模块提取的外形轮廓中选取具有所述共性特征的外形轮廓作为备选轮廓;a judging processing module, configured to select, according to a common feature of the contour contour corresponding to the plane identifier stored in the storage submodule, an outer shape extracted from the outer shape extracting submodule The contour is used as an alternative contour;正视图获取子模块,用于获取所述备选轮廓的正视图;a front view obtaining submodule for obtaining a front view of the candidate contour;识别子模块,用于当所述备选轮廓的正视图与所述存储子模块预存的所述平面标识物模板一致时,识别所述备选轮廓对应的图像为所述平面标识物 的图像。And an identifying sub-module, configured to identify, when the front view of the candidate contour is consistent with the planar identifier template pre-stored by the storage sub-module, an image corresponding to the candidate contour as an image of the planar identifier.
- 根据权利要求11所述的包裹体积的测量系统,其特征在于,所述平面标识物为正方形,所述储存子模块储存的所述平面标识物所对应的外形轮廓的共性特征为四边形;The measurement system of the package volume according to claim 11, wherein the planar identifier is a square, and the common feature of the outline corresponding to the planar identifier stored by the storage sub-module is a quadrangle;所述正视图获取子模块包括:The front view obtaining submodule includes:读取单元,用于读取所述备选轮廓的四个顶点的像素坐标;a reading unit, configured to read pixel coordinates of four vertices of the candidate contour;定义单元,用于定义所述备选轮廓经过射影变换为正视图后的四个顶点的像素坐标为预存的所述平面标识物的正视图的四个顶点的像素坐标;a defining unit, configured to define pixel coordinates of the four vertices after the candidate contour is subjected to projective transformation into a front view as pixel coordinates of four pre-existing front views of the planar identifier;计算单元,用于将所述读取单元读取的四个顶点的像素坐标,以及所述定义单元定义的四个顶点的像素坐标分别代入下列平面射影变换公式(1),求取射影变换矩阵M:a calculating unit, configured to substitute the pixel coordinates of the four vertices read by the reading unit and the pixel coordinates of the four vertices defined by the defining unit into the following planar projective transformation formula (1), and obtain a projective transformation matrix M:其中,X为备选轮廓顶点的齐次像素坐标,其非齐次像素坐标为 X′为射影变换后顶点的齐次坐标,其非齐次像素坐标为 x1、x2、x3为X中的元素,x1'、x2'、x3'为X'中的元素;x、y分别为非对应的非齐次像素横坐标、纵坐标;u、v分别为射影变换后的非齐次像素横坐标、纵坐标; Where X is the homogeneous pixel coordinate of the candidate silhouette vertex, and the non-homogeneous pixel coordinates are X' is the homogeneous coordinate of the vertex after the projective transformation, and its non-homogeneous pixel coordinates are X1, x2, and x3 are elements in X, x1', x2', and x3' are elements in X'; x and y are non-corresponding non-homogeneous pixel abscissas and ordinates; u and v are projections respectively The transformed non-homogeneous pixel abscissa and ordinate;变换单元,用于根据所述计算单元求取得到的所述射影变换矩阵M,对所述备选轮廓对应的二值化图像的所有像素都执行射影变换,获得所述备选轮廓包含的区域对应的正视图。a transforming unit, configured to perform a projective transformation on all pixels of the binarized image corresponding to the candidate contour according to the projective transformation matrix M obtained by the calculating unit, to obtain an area included in the candidate contour Corresponding front view.
- 根据权利要求9-12任一项所述的包裹体积的测量系统,其特征在于,所述图像处理模块包括:The package volume measuring system according to any one of claims 9 to 12, wherein the image processing module comprises:边缘检测子模块,用于对所述提取模块获取的所述目标图像进行边缘检测处理,得到边缘二值图像;An edge detection sub-module, configured to perform edge detection processing on the target image acquired by the extraction module to obtain an edge binary image;直线查找子模块,用于从所述边缘检测子模块得到的所述边缘二值图像中查找对应于待测包裹边缘的边缘直线;a line search sub-module, configured to search for an edge line corresponding to the edge of the package to be tested from the edge binary image obtained by the edge detection sub-module;角点获取子模块,用于计算所述直线查找子模块查找到的所述边缘直线中任意两条边缘直线组成的交点的位置,得到所述待测包裹的角点。And a corner point obtaining sub-module, configured to calculate a position of an intersection of any two edge lines of the edge line found by the line search sub-module, to obtain a corner point of the package to be tested.
- 根据权利要求9所述的包裹体积的测量系统,其特征在于,所述体积测量模块包括:The package volume measuring system according to claim 9, wherein the volume measuring module comprises:外参矩阵获取子模块,用于根据所述平面标识物及预先获取的所述摄像头的内参矩阵,计算所述摄像头当前视场的外参矩阵;所述外参矩阵包括旋转矩阵和平移向量;An outer parameter matrix obtaining submodule, configured to calculate an outer parameter matrix of a current field of view of the camera according to the plane identifier and an internal parameter matrix of the camera obtained in advance; the outer parameter matrix includes a rotation matrix and a translation vector;角点坐标获取子模块,用于根据所述角点在像素坐标系中的像素坐标,结合所述旋转矩阵和平移向量获取所述角点的世界坐标;a corner coordinate acquisition submodule, configured to acquire world coordinates of the corner point according to the pixel coordinates of the corner point in a pixel coordinate system, in combination with the rotation matrix and the translation vector;长宽高获取子模块,用于根据所述角点的世界坐标计算所述待测包裹的长宽高;a length, width and height acquisition submodule, configured to calculate a length, a width and a height of the package to be tested according to the world coordinates of the corner point;包裹体积获取子模块,用于将所述长宽高代入体积公式计算获取所述待测包裹的体积。a parcel volume acquisition sub-module, configured to calculate the volume of the package to be tested by substituting the length, width, and height into a volume formula.
- 根据权利要求14所述的包裹体积的测量系统,其特征在于,所述外参矩阵获取子模块包括:The package volume measuring system according to claim 14, wherein the outer parameter matrix acquisition submodule comprises:坐标系确定单元,用于以所述平面标识物的中点为原点建立世界坐标系;a coordinate system determining unit configured to establish a world coordinate system with the midpoint of the planar identifier as an origin;顶点坐标读取单元,用于读取所述平面标识物的各个顶点在像素坐标系 中的顶点像素坐标,以及各个顶点在世界坐标系中的顶点世界坐标;a vertex coordinate reading unit, configured to read vertex pixel coordinates of each vertex of the planar identifier in a pixel coordinate system, and vertex world coordinates of each vertex in a world coordinate system;运算单元,用于将所述顶点像素坐标、顶点世界坐标以及所述预先获取的所述摄像头的内参矩阵分别代入下述公式(2)和公式(3),再结合公式(4)得到所述摄像头当前视场的旋转矩阵和平移向量:An arithmetic unit, configured to substitute the vertex pixel coordinates, the vertex world coordinates, and the pre-acquired internal parameter matrix of the camera into the following formulas (2) and (3), respectively, and obtain the The rotation matrix and translation vector of the camera's current field of view:其中,(u,v,1)表示所述平面标识物中所述目标点在摄像机的像素坐标系中像素坐标的齐次坐标,(Xw,Yw,Zw,1)表示所述目标点在所述世界坐标系中世界坐标的齐次坐标,(Xc,Yc,Zc)表示所述目标点在摄像机的相机坐标系中的相机坐标;fx表示摄像机透镜的物理焦距F与成像仪在X轴方向每个单元尺寸的乘积,fy表示摄像机透镜的物理焦距F与成像仪在y轴方向每个单元尺寸的乘积,cx表示成像仪中心与光轴在X轴方向上的偏移,cy表示由于成像仪成像仪中心与光轴在Y轴方向上的偏移;R表示世界坐标系到相机坐标系的旋转矩阵,T表示所述世界坐标系到所述相机坐标系的平移向量。Wherein (u, v, 1) represents the homogeneous coordinates of the pixel coordinates of the target point in the pixel coordinate system of the camera, and (Xw, Yw, Zw, 1) indicates that the target point is in the The homogeneous coordinates of the world coordinates in the world coordinate system, (Xc, Yc, Zc) represents the camera coordinates of the target point in the camera coordinate system of the camera; fx represents the physical focal length F of the camera lens and the imager in the X-axis direction The product of the size of each unit, fy represents the product of the physical focal length F of the camera lens and the size of each unit of the imager in the y-axis direction, cx represents the offset of the center of the imager from the optical axis in the X-axis direction, and cy represents the imaging due to imaging. The center of the imager and the optical axis are offset in the Y-axis direction; R represents the rotation matrix of the world coordinate system to the camera coordinate system, and T represents the translation vector of the world coordinate system to the camera coordinate system.
- 根据权利要求15所述的包裹体积的测量系统,其特征在于,所述角点坐标获取子模块包括:The package volume measuring system according to claim 15, wherein the corner coordinate acquisition submodule comprises:角点像素坐标获取单元,用于读取所述角点在摄像机的像素坐标系中的像素坐标;a corner pixel coordinate acquiring unit, configured to read pixel coordinates of the corner point in a pixel coordinate system of the camera;角点世界坐标获取单元,用于将所述角点的像素坐标、所述预先获取的摄像头的内参矩阵以及所述摄像头当前视场的旋转矩阵和平移向量代入所述公式(4)中得到所述角点的世界坐标;其中,(u,v,1)表示所述角点的像素坐标的齐次坐标,(Xw,Yw,Zw)是所述角点的世界坐标,(Xw,Yw,Zw,1)表示所述角点的世界坐标的齐次坐标;a corner point world coordinate acquiring unit, configured to substitute pixel coordinates of the corner point, an internal parameter matrix of the pre-acquired camera, and a rotation matrix and a translation vector of a current field of view of the camera into the formula (4) The world coordinates of the corner points; wherein (u, v, 1) represents the homogeneous coordinates of the pixel coordinates of the corner points, and (Xw, Yw, Zw) is the world coordinate of the corner points, (Xw, Yw, Zw, 1) represents the homogeneous coordinates of the world coordinates of the corner points;所述长宽高获取子模块包括:The long and wide height acquisition submodule includes:角点世界坐标读取单元,用于读取任意四个角点对应的世界坐标;所述四个角点中任意一个角点为第一角点,且剩余三个角点分别与所述第一角点两两连接生成的直线分别平行于所述世界坐标系的XYZ轴;a corner point world coordinate reading unit, configured to read world coordinates corresponding to any four corner points; any one of the four corner points is a first corner point, and the remaining three corner points respectively correspond to the first A straight line generated by a pair of corner points is parallel to the XYZ axis of the world coordinate system, respectively;长度运算单元,用于将所述第一角点对应的世界坐标,以及第二角点对应的世界坐标代入坐标两点距离公式,计算获得所述待测包裹的长度;所述第二角点与所述第一角点连接生成的直线平行于所述世界坐标系的X轴;a length operation unit, configured to substitute a world coordinate corresponding to the first corner point and a world coordinate corresponding to the second corner point into a coordinate two-point distance formula, and calculate a length of the package to be tested; the second corner point a line generated by the connection with the first corner point is parallel to the X axis of the world coordinate system;宽度运算单元,用于将所述第一角点对应的世界坐标,以及第三角点对应的世界坐标代入坐标两点距离公式,计算获得所述待测包裹的宽度;所述第二角点与所述第一角点连接生成的直线平行于所述世界坐标系的Y轴;a width operation unit, configured to substitute a world coordinate corresponding to the first corner point and a world coordinate corresponding to the third corner point into a coordinate two-point distance formula, and calculate a width of the package to be tested; the second corner point and a line generated by the first corner connection is parallel to a Y axis of the world coordinate system;高度运算单元,用于将第四角点对应的世界坐标以及角点的像素坐标,结合所述预先获取的摄像头的内参矩阵、所述摄像头当前视场的旋转矩阵和平移向量,代入所述公式(4)计算获得所述待测包裹的高度;所述第四角点与所述第一角点连接生成的直线平行于所述世界坐标系的Z轴。a height operation unit, configured to substitute the world coordinates corresponding to the fourth corner point and the pixel coordinates of the corner point, in combination with the pre-acquired internal parameter matrix of the camera, the rotation matrix of the current field of view of the camera, and the translation vector, and substitute the formula into the formula (4) Calculating a height of the package to be tested; a line generated by connecting the fourth corner point to the first corner point is parallel to a Z axis of the world coordinate system.
- 一种存储介质,其特征在于,所述存储介质存储有多条指令,所述多条指令被一个或者多个处理器执行,以实现权利要求1-8中任一项所述的包裹体积的测量方法的步骤。A storage medium, characterized in that the storage medium stores a plurality of instructions, the plurality of instructions being executed by one or more processors to implement the package volume of any one of claims 1-8 The steps of the measurement method.
- 一种移动终端,其特征在于,包括:A mobile terminal, comprising:处理器,实现各指令;a processor that implements each instruction;存储介质,存储多条指令;a storage medium that stores a plurality of instructions;其中:所述处理器执行所述存储介质存储的指令,以实现权利要求1-8任一项所述的包裹体积的测量方法的步骤。Wherein the processor executes the instructions stored in the storage medium to implement the steps of the method for measuring a package volume according to any one of claims 1-8.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810344830.4 | 2018-04-17 | ||
CN201810344830.4A CN108627092A (en) | 2018-04-17 | 2018-04-17 | A kind of measurement method, system, storage medium and the mobile terminal of package volume |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019200837A1 true WO2019200837A1 (en) | 2019-10-24 |
Family
ID=63705264
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/106796 WO2019200837A1 (en) | 2018-04-17 | 2018-09-20 | Method and system for measuring volume of parcel, and storage medium and mobile terminal |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108627092A (en) |
WO (1) | WO2019200837A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112254635A (en) * | 2020-09-23 | 2021-01-22 | 洛伦兹(北京)科技有限公司 | Volume measurement method, device and system |
Families Citing this family (38)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109448045B (en) * | 2018-10-23 | 2021-02-12 | 南京华捷艾米软件科技有限公司 | SLAM-based planar polygon measurement method and machine-readable storage medium |
CN109357637B (en) * | 2018-12-11 | 2021-12-10 | 长治学院 | Method for measuring curvature radius and thickness of plate rolling machine plate rolling based on depth camera |
CN109663744A (en) * | 2018-12-28 | 2019-04-23 | 北海绩迅电子科技有限公司 | A kind of weighing and locating, sorting control method, weighing sorter of print cartridge |
CN109767473B (en) * | 2018-12-30 | 2022-10-28 | 惠州华阳通用电子有限公司 | Panoramic parking device calibration method and device |
CN109754381B (en) * | 2019-01-03 | 2023-01-17 | 广东小天才科技有限公司 | Image processing method and system |
CN110006340B (en) * | 2019-03-26 | 2020-09-08 | 华为技术有限公司 | Object size measuring method and electronic equipment |
CN110006343B (en) | 2019-04-15 | 2021-02-12 | Oppo广东移动通信有限公司 | Method and device for measuring geometric parameters of object and terminal |
CN109949331B (en) * | 2019-04-17 | 2021-02-02 | 合肥泰禾智能科技集团股份有限公司 | Container edge detection method and device |
CN111915666A (en) * | 2019-05-07 | 2020-11-10 | 顺丰科技有限公司 | Volume measurement method and device based on mobile terminal |
CN111981975B (en) * | 2019-05-22 | 2022-03-08 | 顺丰科技有限公司 | Object volume measuring method, device, measuring equipment and storage medium |
CN110174056A (en) * | 2019-06-18 | 2019-08-27 | 上海商米科技集团股份有限公司 | A kind of object volume measurement method, device and mobile terminal |
CN112150533A (en) * | 2019-06-28 | 2020-12-29 | 顺丰科技有限公司 | Object volume calculation method, device, equipment and storage medium |
CN110363809B (en) * | 2019-07-11 | 2024-04-09 | 深圳前海微众银行股份有限公司 | Volume measurement method, volume measurement device, terminal and storage medium |
CN110349205B (en) * | 2019-07-22 | 2021-05-28 | 浙江光珀智能科技有限公司 | Method and device for measuring volume of object |
CN110490886B (en) * | 2019-07-31 | 2022-04-01 | 武汉大学 | Automatic correction method and system for certificate image under oblique viewing angle |
CN110673038B (en) * | 2019-09-29 | 2021-12-07 | 深圳大学 | Battery detection method, device and system |
CN110853080A (en) * | 2019-09-30 | 2020-02-28 | 广西慧云信息技术有限公司 | Method for measuring size of field fruit |
CN111126450B (en) * | 2019-11-29 | 2024-03-19 | 上海宇航系统工程研究所 | Modeling method and device for cuboid space vehicle based on nine-line configuration |
TWI709725B (en) * | 2019-12-03 | 2020-11-11 | 阿丹電子企業股份有限公司 | Volume measuring apparatus and volume measuring method for boxes |
CN112991429B (en) * | 2019-12-13 | 2024-08-20 | 顺丰科技有限公司 | Box volume measuring method, device, computer equipment and storage medium |
CN111197984A (en) * | 2020-01-15 | 2020-05-26 | 重庆邮电大学 | Vision-inertial motion estimation method based on environmental constraint |
CN111366075B (en) * | 2020-03-20 | 2021-09-14 | 北京国泰蓝盾科技有限公司 | High-precision online volume measurement system |
CN113449532B (en) * | 2020-03-25 | 2022-04-19 | 杭州海康机器人技术有限公司 | Method, device, computing equipment, logistics system and storage medium for detecting packages |
CN111504182B (en) * | 2020-04-10 | 2022-02-15 | 四川超影科技有限公司 | Object volume vision measurement method using two-dimensional code for auxiliary calibration |
CN111524180B (en) * | 2020-04-23 | 2023-06-27 | Oppo广东移动通信有限公司 | Object volume calculation method, device, electronic equipment and storage medium |
CN111882259A (en) * | 2020-05-13 | 2020-11-03 | 无锡北斗星通信息科技有限公司 | Express arrival signal timing trigger platform |
CN111667429B (en) * | 2020-06-06 | 2023-05-23 | 南京聚特机器人技术有限公司 | Target positioning correction method for inspection robot |
CN111696152B (en) * | 2020-06-12 | 2023-05-12 | 杭州海康机器人股份有限公司 | Method, device, computing equipment, system and storage medium for detecting package stack |
CN111814739B (en) * | 2020-07-27 | 2023-09-01 | 上海东普信息科技有限公司 | Method, device, equipment and storage medium for detecting express package volume |
CN111914856B (en) * | 2020-08-11 | 2023-05-05 | 上海柏楚电子科技股份有限公司 | Layout method, device and system for plate excess material, electronic equipment and storage medium |
CN114103039A (en) * | 2020-08-27 | 2022-03-01 | 常州星宇车灯股份有限公司 | Method and device for selecting optimal die drawing direction of plastic part |
CN112132163B (en) * | 2020-09-21 | 2024-04-02 | 杭州睿琪软件有限公司 | Method, system and computer readable storage medium for identifying object edges |
CN112683169A (en) * | 2020-12-17 | 2021-04-20 | 深圳依时货拉拉科技有限公司 | Object size measuring method, device, equipment and storage medium |
CN112802087A (en) * | 2021-02-04 | 2021-05-14 | 上海中通吉网络技术有限公司 | Method and device for detecting overall volume of deposit and electronic equipment |
CN113554667B (en) * | 2021-07-27 | 2023-12-12 | 上海海瞩智能科技有限公司 | Three-dimensional displacement detection method and device based on image recognition |
CN113923420B (en) * | 2021-11-18 | 2024-05-28 | 京东方科技集团股份有限公司 | Region adjustment method and device, camera and storage medium |
CN114549426A (en) * | 2022-01-27 | 2022-05-27 | 合肥富煌君达高科信息技术有限公司 | Tire bulge detection and analysis method and system |
CN118314191B (en) * | 2024-06-06 | 2024-10-11 | 无锡市方顺型钢科技有限公司 | Profile steel outline dimension accurate measurement method based on data analysis |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050154548A1 (en) * | 2003-10-31 | 2005-07-14 | Markus Basel | Method for calibration of a 3D measuring device |
CN103033132A (en) * | 2012-12-20 | 2013-04-10 | 中国科学院自动化研究所 | Plane measuring method and plane measuring device based on monocular vision |
CN103630074A (en) * | 2013-11-29 | 2014-03-12 | 北京京东尚科信息技术有限公司 | Method and device for measuring minimum package volume of object |
CN104778716A (en) * | 2015-05-05 | 2015-07-15 | 西安电子科技大学 | Truck carriage volume measurement method based on single image |
CN106524917A (en) * | 2016-12-09 | 2017-03-22 | 北京科技大学 | Volume measurement method for object on conveyor belt |
CN106767399A (en) * | 2016-11-11 | 2017-05-31 | 大连理工大学 | The non-contact measurement method of the logistics measurement of cargo found range based on binocular stereo vision and dot laser |
CN107766855A (en) * | 2017-10-25 | 2018-03-06 | 南京阿凡达机器人科技有限公司 | Chess piece localization method, system, storage medium and robot based on machine vision |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6189223B1 (en) * | 1997-03-11 | 2001-02-20 | Werner Haug | Device for measuring volume |
CN103996197A (en) * | 2014-05-30 | 2014-08-20 | 北京农业信息技术研究中心 | Character collecting method and system |
CN104537661A (en) * | 2014-12-26 | 2015-04-22 | 张长隆 | Monocular camera area measuring method and system |
CN106839975B (en) * | 2015-12-03 | 2019-08-30 | 杭州海康威视数字技术股份有限公司 | Volume measuring method and its system based on depth camera |
CN106052820A (en) * | 2016-06-03 | 2016-10-26 | 广州市中崎商业机器股份有限公司 | Logistic freight automatic calculating system and method |
CN106419923A (en) * | 2016-10-27 | 2017-02-22 | 南京阿凡达机器人科技有限公司 | Height measurement method based on monocular machine vision |
CN106779537A (en) * | 2016-11-30 | 2017-05-31 | 苏州金峰物流设备有限公司 | Transit depot wraps up bar code recognition of unloading |
CN107194973A (en) * | 2017-05-18 | 2017-09-22 | 西北工业大学 | A kind of method that space camera demarcation is carried out based on pseudorandomcode sphere |
-
2018
- 2018-04-17 CN CN201810344830.4A patent/CN108627092A/en active Pending
- 2018-09-20 WO PCT/CN2018/106796 patent/WO2019200837A1/en active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050154548A1 (en) * | 2003-10-31 | 2005-07-14 | Markus Basel | Method for calibration of a 3D measuring device |
CN103033132A (en) * | 2012-12-20 | 2013-04-10 | 中国科学院自动化研究所 | Plane measuring method and plane measuring device based on monocular vision |
CN103630074A (en) * | 2013-11-29 | 2014-03-12 | 北京京东尚科信息技术有限公司 | Method and device for measuring minimum package volume of object |
CN104778716A (en) * | 2015-05-05 | 2015-07-15 | 西安电子科技大学 | Truck carriage volume measurement method based on single image |
CN106767399A (en) * | 2016-11-11 | 2017-05-31 | 大连理工大学 | The non-contact measurement method of the logistics measurement of cargo found range based on binocular stereo vision and dot laser |
CN106524917A (en) * | 2016-12-09 | 2017-03-22 | 北京科技大学 | Volume measurement method for object on conveyor belt |
CN107766855A (en) * | 2017-10-25 | 2018-03-06 | 南京阿凡达机器人科技有限公司 | Chess piece localization method, system, storage medium and robot based on machine vision |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112254635A (en) * | 2020-09-23 | 2021-01-22 | 洛伦兹(北京)科技有限公司 | Volume measurement method, device and system |
CN112254635B (en) * | 2020-09-23 | 2022-06-28 | 洛伦兹(北京)科技有限公司 | Volume measurement method, device and system |
Also Published As
Publication number | Publication date |
---|---|
CN108627092A (en) | 2018-10-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019200837A1 (en) | Method and system for measuring volume of parcel, and storage medium and mobile terminal | |
CN107766855B (en) | Chessman positioning method and system based on machine vision, storage medium and robot | |
CN109285145B (en) | Multi-standing tree height measuring method based on smart phone | |
CN111091063B (en) | Living body detection method, device and system | |
CN111627075B (en) | Camera external parameter calibration method, system, terminal and medium based on aruco code | |
US11816829B1 (en) | Collaborative disparity decomposition | |
CN111307039A (en) | Object length identification method and device, terminal equipment and storage medium | |
US20150262346A1 (en) | Image processing apparatus, image processing method, and image processing program | |
KR20180105875A (en) | Camera calibration method using single image and apparatus therefor | |
TW201520508A (en) | System and method for interpolating points using contact probe | |
CN111415390A (en) | Positioning navigation method and device based on ground texture | |
Urban et al. | Finding a good feature detector-descriptor combination for the 2D keypoint-based registration of TLS point clouds | |
US9591301B2 (en) | Apparatus and method for calibrating a camera | |
WO2023273108A1 (en) | Monocular distance measurement method and apparatus, and intelligent apparatus | |
CN111681186A (en) | Image processing method and device, electronic equipment and readable storage medium | |
CN115690469A (en) | Binocular image matching method, device, equipment and storage medium | |
CN109949232A (en) | Measurement method, system, electronic equipment and medium of the image in conjunction with RTK | |
Sirmacek et al. | Accuracy assessment of building point clouds automatically generated from iphone images | |
CN111387987A (en) | Height measuring method, device, equipment and storage medium based on image recognition | |
CN112802114A (en) | Multi-vision sensor fusion device and method and electronic equipment | |
CN110458951B (en) | Modeling data acquisition method and related device for power grid pole tower | |
CN112102378A (en) | Image registration method and device, terminal equipment and computer readable storage medium | |
Ventura et al. | Structure and motion in urban environments using upright panoramas | |
CN109600598B (en) | Image processing method, image processing device and computer readable recording medium | |
CN110956664A (en) | Real-time camera position repositioning method for handheld three-dimensional scanning system |
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: 18915354 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18915354 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18915354 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22/04/2021) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18915354 Country of ref document: EP Kind code of ref document: A1 |