CN108627092A - A kind of measurement method, system, storage medium and the mobile terminal of package volume - Google Patents
A kind of measurement method, system, storage medium and the mobile terminal of package volume Download PDFInfo
- Publication number
- CN108627092A CN108627092A CN201810344830.4A CN201810344830A CN108627092A CN 108627092 A CN108627092 A CN 108627092A CN 201810344830 A CN201810344830 A CN 201810344830A CN 108627092 A CN108627092 A CN 108627092A
- Authority
- CN
- China
- Prior art keywords
- angle point
- package
- camera
- measured
- mark object
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
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
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
The present invention provides a kind of measurement method, system, storage medium and the mobile terminal of package volume, method includes:S100 acquires target image by the camera of mobile terminal;Target image includes two side surfaces of plane mark object, the upper surface of package to be measured equipped with plane mark object, the to be measured package adjacent with upper surface;S200 carries out image procossing to target image, to identify plane mark object in the target image;S300 carries out Image Edge-Detection to target image, to identify the angle point of package to be measured in the target image;S400 calculates the world coordinates of angle point according to plane mark object, the internal reference matrix and angle point of the camera obtained in advance, to obtain the volume of package to be measured according to the world coordinates of angle point.The present invention is real-time using the included camera of mobile terminal, accurately measures package volume to be measured, enriches usage scenario, is not required to newly-increased additional hardware facility, saves cost.
Description
Technical field
The present invention relates to computer vision field, espespecially a kind of measurement method, system, storage medium and the shifting of package volume
Dynamic terminal.
Background technology
Develop swift and violent today in delivery industry, there is a large amount of express delivery package to be measured to need to send by post.Express delivery package to be measured
Charging mode includes by weight or the mode of volume, courier can take the maximum value of the two to charge.Furthermore package to be measured
Volume size etc. can follow the odd numbers Message Entry System of the package to be measured, facilitate subsequent entrucking and stocking arrangement.So
Quickly calculating the volume of express delivery package to be measured becomes a kind of necessary technology.
Application No. is the patents of invention of CN20151088222.6 to disclose a kind of volume measuring method based on depth camera
And its system.The patent is obtained by depth camera includes the depth map of object under test, then according to depth information by the object
It is separated from depth image.According to the camera parameter demarcated in advance, the two-dimensional depth image coordinate of object under test is converted
For the three-dimensional coordinate under camera coordinates system, the size of the object is then calculated according to the three-dimensional coordinate of the object to be measured.
This method has the disadvantage that:A. additional fitting depth camera is needed, depth camera price is more expensive, express delivery terminal
The cost of equipment (or mobile phone) is relatively low, if all the upper depth camera cost of configuration is bigger.B. depth camera need with
Computing module (mobile terminal devices such as mobile phone) carries out adaptation connection, realizes Technical comparing trouble.C. current depth camera is most
Using structure light or the scheme of TOF, structure light is easily interfered by strong light, cannot be in outside work.And the precision of TOF depth cameras
It is natively relatively low, the error bigger under the interference of outdoor strong light.
Invention content
The object of the present invention is to provide a kind of measurement method, system, storage medium and the mobile terminals of package volume, realize
The camera carried using mobile terminals such as mobile phones in real time, accurately measure package volume to be measured, enrich usage scenario, need not be new
Hardware facility outside increment saves cost.
Technical solution provided by the invention is as follows:
The present invention provides a kind of measurement method of package volume, is applied to measure the package to be measured equipped with plane mark object
Volume, including step:S100 acquires target image by the camera of mobile terminal;The target image includes the plane mark
Know object, the upper surface of package to be measured equipped with the plane mark object, the to be measured package adjacent with the upper surface two
A side surface;S200 carries out image procossing to the target image, to identify the plane mark in the target image
Know object;S300 carries out Image Edge-Detection to the target image, to identify the packet to be measured in the target image
The angle point wrapped up in;S400 is according to the plane mark object, the internal reference matrix of the camera obtained in advance and the angle point, described in calculating
The world coordinates of angle point, to obtain the volume of the package to be measured according to the world coordinates of the angle point.
Preferably, include step before the step S100 acquires target image by the camera of mobile terminal:S010
The camera is demarcated, the internal reference matrix of the camera is obtained.
Preferably, the step S200 carries out image procossing to the target image, to know in the target image
Do not go out the plane mark object and specifically includes step:S210 carries out binary segmentation to the target image, and from two after segmentation
Appearance profile is extracted in value image;The general character of appearance profiles of the S220 corresponding to the plane mark object to prestore is special
Sign chooses the alternately profile of the appearance profile with the common feature from the appearance profile of extraction;Described in S230 is obtained
The front view of alternative profile;S240 when the front view of the alternative profile is consistent with the plane mark object template to prestore,
Identify that the corresponding image of the alternative profile is the image of the plane mark object.
Preferably, the plane mark object is square, and the plane mark object institute to prestore in the step S220 is right
The default contour feature answered is quadrangle;The front view that the step S230 obtains the alternative profile is specially:S231 is read
The pixel coordinate on four vertex of the alternative profile;S232 defines the alternative profile after projective transformation is front view
The pixel coordinate on four vertex is the pixel coordinate on four vertex of the front view of the plane mark object to prestore;S233 will be upper
The pixel coordinate for stating the pixel coordinate on four vertex of reading and four vertex of the definition substitutes into the change of plane projection respectively
Formula (1) is changed, projective transform matrix M is sought:
Wherein, X is the homogeneous pixel coordinate on alternative profile vertex, and nonhomogeneous pixel coordinate is
X ' is the homogeneous coordinates on vertex after projective transformation, and nonhomogeneous pixel coordinate is
S234 is according to the projective transform matrix M, all to all pixels of the corresponding binary image of the alternative profile
Projective transformation is executed, the corresponding front view in region that the alternative profile includes is obtained.
Preferably, the step S300 carries out Image Edge-Detection to the target image, in the target image
In identify that the angle point of the package to be measured specifically includes step:S310 carries out edge detection process to the target image, obtains
To edge binary images;S320 searches the edge line corresponding to package edge to be measured from the edge binary images;S330
The position for calculating the intersection point of arbitrary two edge lines composition in the edge line, obtains the angle point of the package to be measured.
Preferably, S400 is according to the plane mark object, the internal reference matrix of the camera obtained in advance and the angle point, meter
The world coordinates of the angle point is calculated, the volume to obtain the package to be measured according to the world coordinates of the angle point specifically includes
Step:
S410 calculates the camera according to the plane mark object and the internal reference matrix of the camera obtained in advance
The outer ginseng matrix of current field;The outer ginseng matrix includes spin matrix and translation vector;
Pixel coordinates of the S420 according to the angle point in pixel coordinate system, is obtained in conjunction with the spin matrix and translation vector
Take the world coordinates of the angle point;
S430 calculates the length, width and height of the package to be measured according to the world coordinates of the angle point;
The length, width and height are substituted into the volume that cubature formula calculates the acquisition package to be measured by S440.
Preferably, the step S410 is according to the plane mark object and the internal reference square of the camera obtained in advance
Battle array, it includes step to calculate the spin matrix of the camera current field and be translated towards measurer body:
S411 establishes world coordinate system using the midpoint of the plane mark object as origin;
S412 reads vertex pixel coordinate of each vertex of the plane mark object in pixel coordinate system and each
Vertex world coordinates of the vertex in world coordinate system;
S413 is by the vertex pixel coordinate, the internal reference of vertex world coordinates and the camera obtained in advance
Matrix substitutes into following formula (2) and formula (3) respectively, and the spin moment of the camera current field is obtained in conjunction with formula (4)
Battle array and translation vector:
Wherein, (u, v, 1) indicates target point pixel in the pixel coordinate system of video camera described in the plane mark object
The homogeneous coordinates of coordinate, (Xw, Yw, Zw, 1) indicate the homogeneous seat of target point world coordinates in the world coordinate system
Mark, (Xc, Yc, Zc) indicate camera coordinates of the target point in the camera coordinates system of video camera;Fx indicates camera lens
Physics focal length F and imager each unit size of X-direction product, fy indicate the physics focal length F of camera lens with
For imager in the product of each unit size in y-axis direction, cx indicates imager center and the offset of optical axis in the X-axis direction, cy
It indicates due to imager imager center and the offset of optical axis in the Y-axis direction;R indicates that world coordinate system arrives camera coordinates system
Spin matrix, T indicate the world coordinate system to the translation vector of the camera coordinates system.
Preferably, pixel coordinates of the step S420 according to the angle point in pixel coordinate system, in conjunction with the rotation
The world coordinates that matrix and translation vector obtain the angle point specifically includes step:
S421 reads the pixel coordinate of angle point of the angle point in the pixel coordinate system of video camera;
S422 is by the pixel coordinate of the angle point, the internal reference matrix of the camera obtained in advance and the camera
The spin matrix and translation vector of current field substitute into the formula (4) and obtain the world coordinates of the angle point;Wherein, (u,
V, 1) homogeneous coordinates of the pixel coordinate of the angle point are indicated, (Xw, Yw, Zw) is the world coordinates of the angle point, (Xw, Yw,
Zw, 1) homogeneous coordinates of the world coordinates of the angle point are indicated;
The length, width and height that the step S430 calculates the package to be measured according to the world coordinates of the angle point specifically include step
Suddenly:
S431 reads the corresponding world coordinates of any four angle point;Any one angle point is first jiao in four angle points
Point, and the straight line that remaining three angle points connect generation two-by-two with first angle point respectively is respectively parallel to the world coordinate system
XYZ axis;
The corresponding world coordinates of first angle point and the corresponding world coordinates of the second angle point are substituted into coordinate two by S432
Point range formula, calculates the length for obtaining the package to be measured;Second angle point connect the straight of generation with first angle point
Line is parallel to the X-axis of the world coordinate system;
The corresponding world coordinates of first angle point and the corresponding world coordinates of third angle point are substituted into coordinate two by S433
Point range formula, calculates the width for obtaining the package to be measured;Second angle point connect the straight of generation with first angle point
Line is parallel to the Y-axis of the world coordinate system;
S434 is by the corresponding world coordinates of fourth angle point and the pixel coordinate of angle point, in conjunction with the camera shooting obtained in advance
The internal reference matrix of head, the spin matrix and translation vector of the camera current field substitute into the formula (4) and calculate acquisition institute
State the height of package to be measured;The fourth angle point connect the straight line parallel generated with first angle point in the world coordinate system
Z axis.
Second aspect, the present invention also provides a kind of measuring systems of package volume, are applied to measure equipped with plane mark object
Package to be measured volume, it is described package volume measuring system include:Image collection module passes through the camera of mobile terminal
Acquire target image;The target image include the plane mark object, package to be measured equipped with the plane mark object it is upper
Two side surfaces on surface and the to be measured package adjacent with upper surface;
Picture recognition module carries out image procossing to the target image that described image acquisition module obtains, thus
The plane mark object is identified in the target image;
Image processing module carries out Image Edge-Detection to the target image that described image acquisition module obtains, from
And the angle point of the package to be measured is identified in the target image;
Cubing module, the plane mark object identified according to described image identification module, taking the photograph of obtaining in advance
Internal reference matrix as head and the angle point, calculate the world coordinates of the angle point, to be obtained according to the world coordinates of the angle point
To the volume of the package to be measured.
Preferably, the measuring system of the package volume further includes:Demarcating module demarcates the camera,
Obtain the internal reference matrix of the camera.
Preferably, described image identification module includes:Binary segmentation submodule, the mesh that the extraction module is obtained
Logo image carries out binary segmentation;Shape extracting sub-module extracts appearance profile from the binary image after segmentation;Store submodule
Block stores the common feature of the appearance profile corresponding to the plane mark object, the plane mark object template;Judge processing
Module, the common feature of the appearance profile corresponding to the plane mark object stored in the sub-module stored, from institute
It states and chooses the alternately profile of the appearance profile with the common feature in the appearance profile of shape extracting sub-module extraction;Just
View acquisition submodule obtains the front view of the alternative profile;Identify submodule, the front view when the alternative profile and institute
State the plane mark object template that sub-module stored prestores it is consistent when, the corresponding image of the identification alternative profile is described flat
The image of face marker.
Preferably, the plane mark object is square, and the plane mark object institute of the storage submodule storage is right
The common feature for the appearance profile answered is quadrangle;The front view acquisition submodule includes:Reading unit is read described alternative
The pixel coordinate on four vertex of profile;Definition unit defines four of the alternative profile after projective transformation is front view
The pixel coordinate on a vertex is the pixel coordinate on four vertex of the front view of the plane mark object to prestore;Computing unit,
The pixel on four vertex that the pixel coordinate on four vertex that the reading unit is read and the definition unit are defined is sat
Mark substitutes into following Projection Transformation On Plane formula (1) respectively, seeks projective transform matrix M:
Wherein, X is the homogeneous pixel coordinate on alternative profile vertex, and nonhomogeneous pixel coordinate is
X ' is the homogeneous coordinates on vertex after projective transformation, and nonhomogeneous pixel coordinate is
Converter unit, the projective transform matrix M sought according to the computing unit, to the alternative profile pair
The all pixels for the binary image answered are carried out projective transformation, and the region that the acquisition alternative profile includes is corresponding to be faced
Figure.
Preferably, described image processing module includes:Edge detection submodule, the mesh that the extraction module is obtained
Logo image carries out edge detection process, obtains edge binary images;Straight line searches submodule, is obtained from the edge detection submodule
To the edge binary images in search correspond to it is to be measured package edge edge line;Angle point acquisition submodule calculates institute
The position that straight line searches the intersection point of arbitrary two edge lines composition in the edge line that submodule is found is stated, institute is obtained
State the angle point of package to be measured.
Preferably, the cubing module includes:Outer ginseng matrix acquisition submodule, according to the plane mark object and in advance
The internal reference matrix of the camera first obtained calculates the outer ginseng matrix of the camera current field;The outer ginseng matrix packet
Include spin matrix and translation vector;
Angular coordinate acquisition submodule, according to pixel coordinate of the angle point in pixel coordinate system, in conjunction with the rotation
Matrix and translation vector obtain the world coordinates of the angle point;
Length, width and height acquisition submodule calculates the length, width and height of the package to be measured according to the world coordinates of the angle point;
Volume acquisition submodule is wrapped up, the length, width and height are substituted into the body that cubature formula calculates the acquisition package to be measured
Product.
Preferably, the outer ginseng matrix acquisition submodule includes:
Coordinate system determining unit establishes world coordinate system using the midpoint of the plane mark object as origin;
Apex coordinate reading unit reads vertex pixel of each vertex of the plane mark object in pixel coordinate system
The vertex world coordinates of coordinate and each vertex in world coordinate system;
Arithmetic element, by the vertex pixel coordinate, vertex world coordinates and the camera obtained in advance
Internal reference matrix substitute into following formula (2) and formula (3) respectively, obtain the camera current field in conjunction with formula (4)
Spin matrix and translation vector:
Wherein, (u, v, 1) indicates target point pixel in the pixel coordinate system of video camera described in the plane mark object
The homogeneous coordinates of coordinate, (Xw, Yw, Zw, 1) indicate the homogeneous seat of target point world coordinates in the world coordinate system
Mark, (Xc, Yc, Zc) indicate camera coordinates of the target point in the camera coordinates system of video camera;Fx indicates camera lens
Physics focal length F and imager each unit size of X-direction product, fy indicate the physics focal length F of camera lens with
For imager in the product of each unit size in y-axis direction, cx indicates imager center and the offset of optical axis in the X-axis direction, cy
It indicates due to imager imager center and the offset of optical axis in the Y-axis direction;R indicates that world coordinate system arrives camera coordinates system
Spin matrix, T indicate the world coordinate system to the translation vector of the camera coordinates system.
Preferably, the angular coordinate acquisition submodule includes:
Corner pixels coordinate acquiring unit reads pixel coordinate of the angle point in the pixel coordinate system of video camera;
Angle point world coordinates acquiring unit, by the pixel coordinate of the angle point, the internal reference of the camera obtained in advance
The spin matrix and translation vector of matrix and the camera current field substitute into the formula (4) and obtain the angle point
World coordinates;Wherein, (u, v, 1) indicates the homogeneous coordinates of the pixel coordinate of the angle point, and (Xw, Yw, Zw) is the angle point
World coordinates, (Xw, Yw, Zw, 1) indicate the homogeneous coordinates of the world coordinates of the angle point;
The length, width and height acquisition submodule includes:
Angle point world coordinates reading unit reads the corresponding world coordinates of any four angle point;Appoint in four angle points
One angle point of meaning is the first angle point, and the straight line that remaining three angle points connect generation two-by-two with first angle point respectively is put down respectively
Row is in the XYZ axis of the world coordinate system;
Length operation unit, by the corresponding world coordinates of first angle point and the corresponding world coordinates of the second angle point
2 range formulas of coordinate are substituted into, the length for obtaining the package to be measured is calculated;Second angle point connects with first angle point
The straight line parallel delivered a child is in the X-axis of the world coordinate system;
Width arithmetic element, by the corresponding world coordinates of first angle point and the corresponding world coordinates of third angle point
2 range formulas of coordinate are substituted into, the width for obtaining the package to be measured is calculated;Second angle point connects with first angle point
The straight line parallel delivered a child is in the Y-axis of the world coordinate system;
Height arithmetic element, by the corresponding world coordinates of fourth angle point and the pixel coordinate of angle point, in conjunction with described advance
The spin matrix and translation vector of the internal reference matrix of the camera of acquisition, the camera current field substitute into the formula (4)
Calculate the height for obtaining the package to be measured;The fourth angle point connect the straight line parallel generated with first angle point in described
The Z axis of world coordinate system.
The third aspect, the present invention provide a kind of storage medium, and the storage medium is stored with a plurality of instruction, a plurality of finger
Order is executed by one or more processor, to realize the step of present invention wraps up the measurement method of volume.
Fourth aspect, the present invention provide a kind of mobile terminal, including:Processor realizes each instruction;Storage medium, storage
A plurality of instruction;Wherein:The processor executes the instruction of the storage medium storage, to realize the measurement of present invention package volume
The step of method.
Measurement method, system, storage medium and the mobile terminal of a kind of package volume provided through the invention, being capable of band
Carry out following at least one advantageous effect:
1) present invention by the way that a plane mark object is arranged in the upper surface of each package to be measured, wrap by then camera acquisition
Include plane mark object surface and the mesh on any one or multiple to be measured package surfaces adjacent with plane mark object surface is equipped with
Video is marked, providing target video to the translation of the rotation between world coordinate system, pixel coordinate system and camera coordinates system is calculated
The length, width and height of package to be measured carry out to which the volume of package to be measured be calculated due to the use of the camera that mobile terminal carries
Target video is acquired, package volume to be measured can in real time, be accurately measured.
2) present invention is acquired target video using the camera that mobile terminal carries, and does not need depth camera and is adopted
Collection, and do not need when depth camera acquires package to be measured and must be positioned at the surface of package to be measured, therefore do not need complexity
Arrangement, and the camera is not interfered by strong light, can enrich usage scenario in outside work, need not be increased newly additional
Hardware facility saves cost..
Description of the drawings
Below by a manner of clearly understandable, preferred embodiment is described with reference to the drawings, to a kind of measurement of package volume
Method, system, storage medium and mobile terminal above-mentioned characteristic, technical characteristic, advantage and its realization method give furtherly
It is bright.
Fig. 1 is a kind of flow chart of one embodiment of the measurement method of package volume of the present invention;
Fig. 2 is a kind of flow chart of another embodiment of the measurement method of package volume of the present invention;
Fig. 3 is a kind of flow chart of another embodiment of the measurement method of package volume of the present invention;
Fig. 4 is a kind of flow chart of another embodiment of the measurement method of package volume of the present invention;
Fig. 5 is the angle point schematic diagram of a kind of measurement method of package volume of the present invention and the package to be measured of system;
Fig. 6 is a kind of measurement method for wrapping up volume and system of the invention using the midpoint of plane mark object as the generation of origin
The schematic diagram of boundary's coordinate system;
Fig. 7 is a kind of flow chart of another embodiment of the measurement method of package volume of the present invention;
Fig. 8 is a kind of flow chart of another embodiment of the measurement method of package volume of the present invention;
Fig. 9 is the cubing of the package to be measured in a kind of another embodiment of the measurement method of package volume of the present invention
The flow chart of step;
Figure 10 a are the plane reference sides Zhang Zhengyou in a kind of another embodiment of the measurement method of package volume of the present invention
The calibrating template schematic diagram of method;
Figure 10 b are the plane reference sides Zhang Zhengyou in a kind of another embodiment of the measurement method of package volume of the present invention
Characteristic point schematic diagram is detected in method;
Figure 11 is that the camera in a kind of another embodiment of the measurement method of package volume of the present invention measures posture
Schematic diagram;
Figure 12 is the postrotational quadrangular configuration in a kind of another embodiment of the measurement method of package volume of the present invention
Front view;
Figure 13 is a kind of structural schematic diagram of one embodiment of the measuring system of package volume of the present invention;
Figure 14 is a kind of structural schematic diagram of another embodiment of the measuring system of package volume of the present invention;
Figure 15 is a kind of structural schematic diagram of another embodiment of the measuring system of package volume of the present invention;
Figure 16 is a kind of structural schematic diagram of one embodiment of the mobile terminal of the measurement of package volume of the present invention.
Specific implementation mode
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, control is illustrated below
The specific implementation mode of the present invention.It should be evident that drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings
Attached drawing, and obtain other embodiments.
To make simplified form, part related to the present invention is only schematically shown in each figure, they are not represented
Its practical structures as product.In addition, so that simplified form is easy to understand, there is identical structure or function in some figures
Component only symbolically depicts one of those, or has only marked one of those.Herein, "one" is not only indicated
" only this ", can also indicate the situation of " more than one ".
This programme is suitable for the volume that shape is the packages to be measured of rectangular shapes such as cuboid, square or four-prism
It measures, the package of other complicated shapes, irregular shape is unable to measure.And since the package of current Express Logistics industry is general
All over for the carton of rectangular shape, yoke etc., therefore it is generally applicable to the volume of the package of the rectangular shape of Express Logistics industry
The measurement of size.
One embodiment of the present invention, as shown in Figure 1, a kind of measurement method of package volume, is equipped with applied to measurement
The volume of the package to be measured of plane mark object, including:
S100 acquires target image by the camera of mobile terminal;The target image include the plane mark object,
The upper surface of package to be measured equipped with the plane mark object, the to be measured package adjacent with the upper surface two side tables
Face;
S200 carries out image procossing to the target image, to identify the plane mark in the target image
Object;
S300 carries out Image Edge-Detection to the target image, described to be measured to be identified in the target image
The angle point of package;
S400 is according to the plane mark object, the internal reference matrix of the camera obtained in advance and the angle point, described in calculating
The world coordinates of angle point, to obtain the volume of the package to be measured according to the world coordinates of the angle point.
Specifically, in the present embodiment, plane mark object refers to that pre-designed having geometry in particular and encode is believed
The pattern of breath, is typically printed in above a piece of paper.The front camera or rear camera carried by mobile terminal
To be acquired target video, when being acquired target video using mobile terminal, need the camera shooting head mirror on mobile terminal
Head is convenient for superscribing the upper table equipped with plane mark object by be measured in this way towards the oblique upper on the surface for being set to plane mark object
Face is acquired with equipped with the adjacent any two side surface in the upper surface of package to be measured of plane mark object.Upper surface herein
Be away from the upper surface on ground when not necessarily package to be measured is placed, and be defined as camera when acquiring target image
It is to be measured package equipped with plane mark object any one camera can collected surface, if that is, by plane mark object be set to shape
Shape is the upper surface of the separate bottom surface of the package to be measured of cuboid, then can be obtained from four side surfaces adjacent with upper surface
Take any two or multiple side surfaces;If plane mark object to be set to any one side surface of the package to be measured of rectangle,
Any two or multiple side tables so can be obtained from a upper surface adjacent with side surface and remaining three side surfaces
Face.The shape for only enumerating package to be measured herein is the example of cuboid, and the package to be measured of other rectangular shapes is the present invention's
In protection domain.
The present invention in order to it is comprehensive, completely collect target image, can by mobile terminal carry camera into
Collected video is carried out image procossing and obtains target image, put down after target image is handled by row acquisition video
The angle point of the image of face marker and package to be measured, to according to plane mark object and angle point and the video camera obtained in advance
Internal reference matrix carries out the world coordinates that the angle point of package to be measured is calculated, and packet to be measured is calculated according to the world coordinates of angle point
The volume wrapped up in.The present invention due to the use of mobile terminal carry camera be acquired target video, do not need depth camera into
Row acquisition, and the surface that must be positioned at package to be measured when depth camera acquires package to be measured is not needed, therefore need not answer
Miscellaneous arrangement, enriches usage scenario, need not increase additional hardware facility newly, saves cost.In addition, the present invention need not incite somebody to action
Depth camera is installed and is adapted to connection with mobile terminal, when measuring the volume of package to be measured of user, not only to carry depth
Camera and mobile terminal, it is also necessary to connection is adapted in real time with mobile terminal progress to depth camera when in use, the present invention adopts
The camera and processor carried with mobile terminal, low cost while at low cost, simplify the step of package cubing to be measured
Suddenly, measurement efficiency is high, and since the volume of package to be measured is automatically performed by the processor that mobile terminal carries, easy to operate,
And testing result is intuitive, reliable, high certainty of measurement.Therefore, the volume for measuring package that the present invention can be full-automatic, it is accurate
Really efficiently, while without other hardware devices are installed, simple and convenient, user experience is high.
Second embodiment of the present invention includes step before S100 acquires target image by the camera of mobile terminal
Suddenly:
S010 demarcates the camera, obtains the internal reference matrix of the camera.
Specifically, the present embodiment is the optimal enforcement example of above-mentioned first embodiment, the present embodiment and above-mentioned first embodiment
It compares, main improve is, has increased step S010 newly to be demarcated to camera, i.e., using the above scheme in the present embodiment
Before the volume for measuring package to be measured, it is also necessary to being demarcated for the camera that acquires target video, specifically, logical
It crosses and the camera is demarcated, obtain the internal reference matrix of the camera, that is, determine the geometry mould of the camera imaging
Type.Camera calibration is the early-stage preparations stage of whole system, when select a camera carry out vision measurement must to its into
Rower is fixed, the internal reference matrix of the parameters such as distortion factor and focal length to obtain video camera composition.It, can in the subsequent execution stage
To use the internal reference matrix of the video camera to carry out corresponding vision measurement and calculating.Proving operation only needs to execute primary.
The present invention demarcates camera using the chessboard calibration method of Zhang Zhengyou, and Zhang Zhengyou standardizations are imaged by multiple
The image acquired when head is relative to chessboard different angle calculates the internal reference coefficient of camera, finally obtains the interior of camera
Join matrix.
The process of the plane reference method is as follows:
1. printing the template of sheet of planar calibration and pasting in one plane;
2. shooting several template images from different perspectives;
3. detecting the characteristic point in image;
4. according to characteristic point in world coordinate system coordinate position and its corresponding pixel coordinate in the picture, simultaneous equations
Group finds out the internal reference matrix of video camera, and the internal reference matrix of video camera is the matrix K of a 3x3, and specific form is as follows:
Wherein, fx indicates the product of physics focal length F and imager in each unit size of X-direction of camera lens,
Fy indicates that the product of physics focal length F and imager in each unit size in y-axis direction of camera lens, cx indicate in imager
The heart and the offset of optical axis in the X-axis direction, cy are indicated due to imager imager center and the offset of optical axis in the Y-axis direction.
The third embodiment of the present invention, is the optimal enforcement example of above-mentioned first, second embodiment, as shown in Fig. 2, a kind of
The measurement method of volume is wrapped up, is applied to measure the volume of the package to be measured equipped with plane mark object, including:
S100 acquires target image by the camera of mobile terminal;The target image include the plane mark object,
The upper surface of package to be measured equipped with the plane mark object, the to be measured package adjacent with the upper surface two side tables
Face;
The step S200 carries out image procossing to the target image, described to be identified in the target image
Plane mark object specifically includes;
S210 carries out binary segmentation to the target image, and extracts appearance profile from the binary image after segmentation;
The common feature of appearance profiles of the S220 corresponding to the plane mark object to prestore, from the shape wheel of extraction
The alternately profile of the appearance profile with the common feature is chosen in exterior feature;
S230 obtains the front view of the alternative profile;
For S240 when the front view of the alternative profile is consistent with the plane mark object template to prestore, identification is described standby
It is the image of the plane mark object to select the corresponding image of profile;
S300 carries out Image Edge-Detection to the target image, described to be measured to be identified in the target image
The angle point of package;
S400 is according to the plane mark object, the internal reference matrix of the camera obtained in advance and the angle point, described in calculating
The world coordinates of angle point, to obtain the volume of the package to be measured according to the world coordinates of the angle point.
Specifically, the present embodiment is the optimal enforcement example of above-mentioned first or second embodiments, the present embodiment and above-mentioned first
Or second embodiment is compared, main improve is, increased newly step S210-S240 come to how to target image handled from
And it identifies screen plane marker and has carried out further refinement explanation.The present embodiment carries out two-value point to the target image
It cuts, binary segmentation sets the gray value of the pixel on image to 0 or 255, that is, whole image is showed obviously
Black-white visual effect, and will be separated with the different zones of special connotation in image, these regions are mutually disjointed, Mei Gequ
Domain all meets the consistency of specific region.Two-value point can also be carried out to the image that camera obtains using adaptivity threshold value
It cuts.After carrying out binary segmentation processing to the target image, need to identify plane mark object, since camera may be from difference
Angle (but can take plane mark object and the surface including plane mark object and other surfaces) shooting has obtained difference
Target video, therefore, the appearance of the plane mark object not necessarily front view on the image/video frame of acquisition.So need
The plane mark object shot from all angles is first extracted, and edge detection is carried out to the plane mark object, obtains the plane
The common feature of the appearance profile of marker, then this common feature is stored in advance, convenient for right after acquiring video frame
The plane mark object is identified.Specifically, after carrying out binary segmentation to video frame images, each image after segmentation is extracted
Appearance profile finds out alternative appearance profile according to the common feature of plane mark object appearance profile, is carried out to profile more
The fitting of side shape, give up those non-convex polygons and those be not quadrangle profile.Further, it is also possible to use some volumes
Outer restrictive condition rejects the quadrangular configuration that those are unlikely to be plane mark object image, as quadrangle is significantly less than on one side
Remaining side (shape is taller and thinner), profile perimeter or area are too small etc., remaining qualified profile is plane mark
The possible corresponding alternative profile of object.For example, if the screen plane marker that we select is square, by edge
The common feature that can get its appearance profile after detection is quadrangle, then we are just accordingly, from the appearance profile extracted,
Those non-convex polygons are excluded, and are not the profiles etc. of quadrangle.After obtaining alternative profile, be exactly in next step obtain it is each
The front view of alternative profile, that is to say, that the possible corresponding alternative contour images region of plane mark object is become into front view, from
And further judge whether the alternative contour area is the corresponding image of plane mark object.Specifically, by each will alternatively take turns
Wide front view is compared with the pre-stored plane mark object template, can sentence under unanimous circumstances when having to compare
Break the appearance profile for that this alternative profile is plane mark object, and the corresponding image of this alternative profile is exactly plane mark object
Image, so far, plane mark object is identified.The shape of plane mark object can be rectangle, diamond shape or square
Etc. shape.
Preferably, on the basis of the above embodiments, the plane mark object on any one surface of package to be measured is arranged
It is square, the plane mark to prestore in the common feature of the appearance profile corresponding to the plane mark object to prestore
The common feature for knowing the appearance profile corresponding to object is that the appearance profile corresponding to the plane mark object is quadrangle.It is arranged
Plane mark object is different, then the common feature of corresponding appearance profile also can be different.We use up when choosing plane mark object
Amount selection is readily discernible, and the obvious plane mark object of characteristic point is preferred.Such as square, tool there are four vertex, due to
Four length of sides of square are consistent, in addition four vertex comparatively facilitate subsequent positions calculations so that operation is got up also more
Simply.
The 4th embodiment of the present invention, as shown in figure 3, being the optimal enforcement example of above-mentioned 3rd embodiment, a kind of package
The measurement method of volume is applied to measure the volume of the package to be measured equipped with plane mark object, including:
S100 acquires target image by the camera of mobile terminal;The target image include the plane mark object,
The upper surface of package to be measured equipped with the plane mark object, the to be measured package adjacent with the upper surface two side tables
Face;
The step S200 carries out image procossing to the target image, described to be identified in the target image
Plane mark object specifically includes;
S210 carries out binary segmentation to the target image, and extracts appearance profile from the binary image after segmentation;
The common feature of appearance profiles of the S220 corresponding to the plane mark object to prestore, from the shape wheel of extraction
The alternately profile of the appearance profile with the common feature is chosen in exterior feature;
S230 obtains the front view of the alternative profile;
For S240 when the front view of the alternative profile is consistent with the plane mark object template to prestore, identification is described standby
It is the image of the plane mark object to select the corresponding image of profile;
The front view that the step S230 obtains the alternative profile is specially:
S231 reads the pixel coordinate on four vertex of the alternative profile;
The pixel coordinate that S232 defines four vertex of the alternative profile after projective transformation is front view is to prestore
The plane mark object front view four vertex pixel coordinate;
S233 divides the pixel coordinate on four vertex of above-mentioned reading and the pixel coordinate on four vertex of the definition
Not Dai Ru Projection Transformation On Plane formula (1), seek projective transform matrix M:
Wherein, X is the homogeneous pixel coordinate on alternative profile vertex, and nonhomogeneous pixel coordinate is
X ' is the homogeneous coordinates on vertex after projective transformation, and nonhomogeneous pixel coordinate is
S234 is according to the projective transform matrix M, all to all pixels of the corresponding binary image of the alternative profile
Projective transformation is executed, the corresponding front view in region that the alternative profile includes is obtained.S240 is faced when the alternative profile
When scheming consistent with the plane mark object template to prestore, identify that the corresponding image of the alternative profile is the plane mark object
Image;
S300 carries out Image Edge-Detection to the target image, described to be measured to be identified in the target image
The angle point of package;
S400 is according to the plane mark object, the internal reference matrix of the camera obtained in advance and the angle point, described in calculating
The world coordinates of angle point, to obtain the volume of the package to be measured according to the world coordinates of the angle point.
Specifically, the present embodiment is the optimal enforcement example of above-mentioned 3rd embodiment, the present embodiment and above-mentioned 3rd embodiment
Compare, main improve is, increased newly step S231-S234 come to the front view for how acquiring alternative profile carried out into
Step refining explanation.The present embodiment continue the example that the plane mark object in above-described embodiment is square continue for example,
According to the square characteristic of square-shaped planar marker, be converted to by projective transformation for example, we can define alternative profile
The pixel coordinate on four vertex after front view, for example, square plane mark object front view four vertex pixel coordinates
Respectively (0,0), (0,100), (100,100), (100,0), then can be alternative as quadrangle using this four apex coordinates
The pixel coordinate on four vertex of profile, in addition, the pixel coordinate of the original image of the alternative profile of quadrangle can be read from image
Out, by four groups of vertex correspondence relationships, can Simultaneous Equations solve photography transformation matrix M, utilize projective transform matrix M
The all pixels of the alternative contour area of quadrangle can be carried out projective transformation, you can obtain the alternative profile of the quadrangle
The corresponding front view in region, the front view are 100 × 100 as size, you can obtain the region pair of the alternative profile of the quadrangle
Unanimously whether then the front view answered compares the front view with the plane mark object template to prestore, see, if consistent
Then illustrate that this quadrangular configuration is exactly the profile of the plane mark object, then plane mark object is just identified.Here
Selection front view is because the image for the plane mark object that camera is shot from all angles is different, if taken the photograph to compare
As head is in the surface of plane mark object, then the image of plane mark object is also a rectangle, if camera shooting is in plane mark
Know the oblique upper of object, then the image of rectangle plane marker is an irregular quadrilateral, obtains what front view was compared
Purpose is exactly, no matter camera, in terms of that angle, the front view of plane mark object is all a kind of figure to look down from surface
Picture, in this way, convenient for the identification of plane mark object.
The 5th embodiment of the present invention, as shown in figure 4, being above-mentioned first embodiment, second embodiment, 3rd embodiment
Or the optimal enforcement example of fourth embodiment, including:
S100 acquires target image by the camera of mobile terminal;The target image include the plane mark object,
The upper surface of package to be measured equipped with the plane mark object, the to be measured package adjacent with the upper surface two side tables
Face;
S200 carries out image procossing to the target image, to identify the plane mark in the target image
Object;
S300 carries out Image Edge-Detection to the target image, described to be measured to be identified in the target image
The angle point of package;
S400 is according to the plane mark object, the internal reference matrix of the camera obtained in advance and the angle point, described in calculating
The world coordinates of angle point, to obtain the volume of the package to be measured according to the world coordinates of the angle point;
The S300 carries out Image Edge-Detection to the target image, described to be identified in the target image
The angle point of package to be measured specifically includes;
S310 carries out edge detection process to the target image, obtains edge binary images;
S320 searches the edge line corresponding to package edge to be measured from the edge binary images;
S330 calculates the position of the intersection point of arbitrary two edge lines composition in the edge line, obtains the packet to be measured
The angle point wrapped up in.
Specifically, the present embodiment is the optimal enforcement of any one embodiment in above-mentioned first embodiment to fourth embodiment
Example, compared with any one embodiment in above-mentioned first embodiment to fourth embodiment, main improve is the present embodiment, passes through
Step S310-S330 to how to detect identifies that the angle point of package to be measured has carried out further refinement explanation.In the present embodiment,
Edge detection process is carried out to target image, obtains edge binary images, Canny edge detection algorithms can be used, that is, use height
This filter smoothing target image detects apparent edge in target image, and gradient is calculated with the finite difference of single order local derviation
Amplitude and direction carry out non-maxima suppression to gradient magnitude, are detected with dual threashold value-based algorithm and connect edge, due to package to be measured
Edge and background contrast it is apparent, so by edge detection algorithm, these apparent object edges can be protruded, the process meeting
Obtain including the bianry image at package edge to be measured in image.
Edge detection process is carried out to target image to obtain comprising after the edge binary images at package edge to be measured in image,
All existing straight lines, Hough transform detection can be found from edge binary images with the method that Hough transform detects straight line
The method of straight line present in edge binary images is that equation of the straight line under polar coordinate system is following equation (5);
ρ=xcos θ+ysin θ (5)
For some (xi, yi), sine curve ρ=xicos θ+yisin θ can be calculated, and for two-value
Change the point in edge image, different sine curves can be obtained, according to different θ, a series of ρ, root can be calculated
A two-dimensional accumulator element array is set up according to obtained (ρ, θ), the size of wherein unit is fixed, if corresponding
(ρ, θ) value is fallen in some unit, then the accumulator count of this unit adds one, and final accumulator value is more than one pre-defined
The corresponding unit of threshold value T think to represent straight line.The of the method for Hough transform detection straight line have discussion more, this
Place no longer thoroughly discusses.
It is a kind of preferred mode that Hough transform, which detects straight line also, and the method that other detection straight lines also can be selected obtains
The edge binary images to be measured for wrapping up edge in comprising image, such as Hough line detection algorithm are sought in edge binary images
Look for straight line.Hough line detection algorithm is based on apparent verge searching straight line, tiny or mixed and disorderly edge meeting in bianry image
Automatically it is filtered.
Hough line detection algorithm detection straight line is as follows:
1, a characteristic point in image, i.e. marginal point are randomly selected, if the point has been demarcated as being that a certain item is straight
Point on line, then continue a marginal point is randomly selected in remaining marginal point, until all marginal points all extract be over for
Only;
2, Hough transformation is carried out to the point, and is added up and is calculated;
3, the maximum point of value in hough space is chosen to carry out step 4 if the point is more than threshold value, otherwise return to
Step 1;
4, the maximum value obtained according to Hough transformation, from this point, along the direction displacement of straight line, to find straight line
Two endpoints;
5, the length for calculating straight line, if it is greater than some threshold value, then the straight line output for being considered as returns to step 1.
It is also long since the edge of package to be measured is obvious, so being capable of detecting when that package edge to be measured is corresponding
Edge line calculates the position of the intersection point of arbitrary two edge lines composition in edge line, is waited for as shown in Figure 5 and Figure 6
Angle point A1, A2, A3, the A4 for surveying package can also include other angle points A5, A6, the A7 of package to be measured, but be based on package to be measured
Cubing efficiency consider, A1, A2, A3, A4 is only calculated.Certainly, if in order to verify the volume of package to be measured
Whether calculating is correct, and A3, A5, A6, A7 can be used to be calculated again, compare and A1, A2, A3, A4 are calculated to be measured
Whether the difference between the volume of package is less than preset difference value range, is waited for if can choose any one volume calculated value and be used as
The volume measurement of package is surveyed, otherwise, needs to carry out video acquisition calculating to package to be measured again.The present invention passes through edge image
Acquisition, straight-line detection determine candidate polygon and are verified to candidate polygon, eliminate cumbersome neural network training process
And slide, directly the edge line of the package to be measured in target image is detected, more simple, intuitive, detection efficiency
It is improved.
The 6th embodiment of the present invention is as shown in Figure 7 and Figure 8 above-mentioned first embodiment, second embodiment, third
The optimal enforcement example of embodiment or fourth embodiment, including
S100 acquires target image by the camera of mobile terminal;The target image include the plane mark object,
The upper surface of package to be measured equipped with the plane mark object, the to be measured package adjacent with the upper surface two side tables
Face;
S200 carries out image procossing to the target image, to identify the plane mark in the target image
Object;
S300 carries out Image Edge-Detection to the target image, described to be measured to be identified in the target image
The angle point of package;
S400 is according to the plane mark object, the internal reference matrix of the camera obtained in advance and the angle point, described in calculating
The world coordinates of angle point, to obtain the volume of the package to be measured according to the world coordinates of the angle point;
The S400 is calculated according to the plane mark object, the internal reference matrix of the camera obtained in advance and the angle point
The world coordinates of the angle point, the volume to obtain the package to be measured according to the world coordinates of the angle point specifically include:
S410 calculates the camera according to the plane mark object and the internal reference matrix of the camera obtained in advance
The outer ginseng matrix of current field;The outer ginseng matrix includes spin matrix and translation vector;
Pixel coordinates of the S420 according to the angle point in pixel coordinate system, is obtained in conjunction with the spin matrix and translation vector
Take the world coordinates of the angle point;
S430 calculates the length, width and height of the package to be measured according to the world coordinates of the angle point;
The length, width and height are substituted into the volume that cubature formula calculates the acquisition package to be measured by S440.
Specifically, the step S410 is according to the plane mark object and the internal reference square of the camera obtained in advance
Battle array, calculates the outer ginseng matrix of the camera current field;The outer ginseng matrix includes spin matrix and is translated towards measurer body packet
Step is included, as shown in Figure 8:
S411 establishes world coordinate system using the midpoint of the plane mark object as origin;
S412 reads vertex pixel coordinate of each vertex of the plane mark object in pixel coordinate system and each
Vertex world coordinates of the vertex in world coordinate system;
S413 is by the vertex pixel coordinate, the internal reference of vertex world coordinates and the camera obtained in advance
Matrix substitutes into following formula (2) and formula (3) respectively, and the spin moment of the camera current field is obtained in conjunction with formula (4)
Battle array and translation vector:
Wherein, (u, v, 1) indicates target point pixel in the pixel coordinate system of video camera described in the plane mark object
The homogeneous coordinates of coordinate, (Xw, Yw, Zw, 1) indicate the homogeneous seat of target point world coordinates in the world coordinate system
Mark, (Xc, Yc, Zc) indicate camera coordinates of the target point in the camera coordinates system of video camera;Fx indicates camera lens
Physics focal length F and imager each unit size of X-direction product, fy indicate the physics focal length F of camera lens with
For imager in the product of each unit size in y-axis direction, cx indicates imager center and the offset of optical axis in the X-axis direction, cy
It indicates due to imager imager center and the offset of optical axis in the Y-axis direction;R indicates that world coordinate system arrives camera coordinates system
Spin matrix, T indicate the world coordinate system to the translation vector of the camera coordinates system;
For example, the center O1 for the face marker S that makes even is the origin of world coordinate system, which is also plane mark
The plane mark article coordinate system of object S, then the Z axis coordinate of the point in the plane where plane mark object S is all 0.If plane mark
The length of side for knowing object S is P, then the coordinate in its four vertex plane marker S coordinate systems O1 is respectively (- P/2 ,-P/2,0), (P/
2 ,-P/2,0), (P/2, P/2,0), (- P/2, P/2,0).
According to pinhole camera modeling, if coordinates of the point P under camera coordinates system is Pc=(Xc, Yc, Zc) in space,
Then its there are the relationships listed by formula (2) for pixel coordinate (u, v) in video camera imaging plane with the point, if P is in world coordinates
The lower coordinate of system is Pw=(Xw, Yw, Zw), then P points coordinate Pw and coordinate Pc under camera coordinates system under world coordinate system exists public
Transformational relation listed by formula (3), wherein the matrix R=(r1, r2, r3) of 3x3, matrix R are by world coordinate system to camera coordinates
The spin matrix of system, T are the translation vector by world coordinate system to camera coordinates system, and formula (2) and formula (3) are incorporated in one
It rises, you can obtain the conversion side of the point P coordinate Pw in world coordinate system and the pixel coordinate (u, v) on the corresponding plane of delineation
Journey (4), the central point due to selecting plane mark object S is that origin establishes world coordinate system, then for four of plane mark object S
All there is the corresponding equation of formula (4) in any vertex (Xw, Yw, 0) in vertex.Since four vertex are under world coordinate system
Z axis coordinate Zw=0, and matrix R=(r1, r2, r3), so formula (4) is simplified to obtain following equation (6):
Above by coordinate in a vertex pixel coordinate of plane mark object S and its corresponding plane mark article coordinate system
An equation can be written.Four equation groups can be written by four vertex correspondences of plane mark object S, then pass through equation group
Direct linear transformation (DLT) algorithm, so as to find out r1, r2, r3 and T.Wherein, spin matrix R is orthogonal matrix, column vector
R1, r2, r3 are mutually orthogonal unit vectors, and when finding out r1, r2, r3 can be obtained by the vector product of r1, r2, to vertex picture
In the case of plain coordinate and vertex world coordinates are known, the internal reference matrix of the camera obtained in advance is substituted into following public affairs respectively
Formula (2) and formula (3), the spin matrix and translation vector of camera current field can be calculated in conjunction with formula (4).
Specifically, pixel coordinates of the step S420 according to the angle point in pixel coordinate system, in conjunction with the rotation
The world coordinates that matrix and translation vector obtain the angle point specifically includes step, as shown in Figure 8:
S421 reads the pixel coordinate of angle point of the angle point in the pixel coordinate system of video camera;
S422 is by the pixel coordinate of the angle point, the internal reference matrix of the camera obtained in advance and the camera
The spin matrix and translation vector of current field substitute into the formula (4) and obtain the world coordinates of the angle point;Wherein, (u,
V, 1) homogeneous coordinates of the pixel coordinate of the angle point are indicated, (Xw, Yw, Zw) is the world coordinates of the angle point, (Xw, Yw,
Zw, 1) homogeneous coordinates of the world coordinates of the angle point are indicated;
As shown in Figure 5 and Figure 6, it is known that pixel coordinates (u1, v1) of the angle point A1 in pixel coordinate system is then substituted into public affairs
In formula (4), since the internal reference matrix K of video camera is it is known that in addition, having acquired spin matrix R by S411-S413 and being translated towards
T is measured, then the unknown quantity of the Matrix division is Xw、Yw、Zc, angle point A1 can be obtained in world coordinates by dematrix equation group
World coordinates (X under systemw1, Yw1, 0), similarly can also be according to angle point A2, the corresponding pixel of A3, A4 in pixel coordinate system
Coordinate (ui, vi), i ∈ N (i≤2) seek out the world of the correspondence of each angle point of package to be measured on world coordinate system respectively
Coordinate (Xwi, Ywi, 0), i ∈ N (i≤2).
The length, width and height that the specific step S430 calculates the package to be measured according to the world coordinates of the angle point are specific
Including step, as shown in Figure 8:
S431 reads the corresponding world coordinates of any four angle point;Any one angle point is first jiao in four angle points
Point, and the straight line that remaining three angle points connect generation two-by-two with first angle point respectively is respectively parallel to the world coordinate system
XYZ axis;
The corresponding world coordinates of first angle point and the corresponding world coordinates of the second angle point are substituted into coordinate two by S432
Point range formula, calculates the length for obtaining the package to be measured;Second angle point connect the straight of generation with first angle point
Line is parallel to the X-axis of the world coordinate system;
The corresponding world coordinates of first angle point and the corresponding world coordinates of third angle point are substituted into coordinate two by S433
Point range formula, calculates the width for obtaining the package to be measured;Second angle point connect the straight of generation with first angle point
Line is parallel to the Y-axis of the world coordinate system;
S434 is by the corresponding world coordinates of fourth angle point and the pixel coordinate of angle point, in conjunction with the camera shooting obtained in advance
The internal reference matrix of head, the spin matrix and translation vector of the camera current field substitute into the formula (4) and calculate acquisition institute
State the height of package to be measured;The fourth angle point connect the straight line parallel generated with first angle point in the world coordinate system
Z axis.
Specifically, the corresponding world coordinates of any four angle point is read in the present embodiment first, by four angle points of reading
In any one angle point as the first angle point, remaining three angle points connect two-by-two with the first angle point respectively generation straight line difference
It is parallel to the XYZ axis of the world coordinate system, the second angle point connect the straight line parallel generated with the first angle point in world coordinate system
X-axis, the second angle point connect the straight line parallel generated with the first angle point in the Y-axis of world coordinate system, fourth angle point and first jiao
The straight line parallel that point connection generates is in the Z axis of world coordinate system.Since each angle is calculated by step S421-S422
The world coordinates of point, as shown in fig. 5, it is assumed that the first angle point is A1, the second angle point is A3, and third angle point is A2, and fourth angle point is
A4, then the world coordinates of the first angle point A1 is (Xw1, Yw1, 0), the world coordinates of the second angle point A3 is (Xw3, Yw3, 0), third
The world coordinates of angle point A2 is (Xw2, Yw2, 0), the world coordinates of fourth angle point A4 is (Xw4, Yw4, 0),
The length L=of package to be measured can be acquired by 2 range formulas in following three dimensions | A1A3|, and wait for
Survey the width W=of package | A1A2|。
Due to straight line A1A4It is parallel with world coordinate system Z-direction, so the Z axis coordinate of angle point A4 is height H, angle point
The X axis coordinate and Y axis coordinate of A4 is identical as angle point A1, i.e. Xw4=Xw1, Yw4=Yw1.The pixels of known angle point A4 in the picture are sat
It marks (u4, v4), is then substituted into formula (4), since the internal reference matrix of video camera is it is known that pass through step S411-S413 steps
Spin matrix R and translation vector T is acquired, then the unknown quantity of the Matrix division is Zw、Zc.It obviously, only need to be by Xw4Or
Yw4Unknown quantity can be obtained by dematrix equation group by substituting into a value.Preferably, by turn twice respectively substitute into Xw4 and
Yw4 calculates Zw, then takes the average value of the two as height H, promotes the accuracy and reliability of package elevation carrection to be measured.It is logical
Length, width and height out calculated above are crossed, since package is cuboid or cube, can directly calculate the volume V of package
=L × W × H.Equally, can also be according to angle point A5, the corresponding pixel coordinate (ui, vi) of A6, A7 in pixel coordinate system, i
∈ N (i≤2) calculate separately to obtain the world coordinates of angle point A5, A6, A7 in world coordinate system, and angle point A5 is calculated herein,
After the corresponding world coordinate system of A6, A7, according to angle point A3, A5, A6, the volume of package to be measured is calculated in A7, will be according to angle point
Whether the volume that the length, width and height that A3, A5, A6, A7 are calculated are used to verify the package to be measured being calculated is reliable, does not exist again
It repeats one by one.
Further, since the straight line that angle point A1 and angle point A4 connections generate is parallel with world coordinate system Z-direction, so angle point
The height of package to be measured can also be calculated with angle point A4 distances by A1, i.e.,:
It is illustrated in the following, lifting an example, the cubing step of package to be measured is as shown in Figure 9:
S1, camera calibration:
Camera calibration is the early-stage preparations stage of whole system, must be right when selecting a camera to carry out vision measurement
It is demarcated, the internal reference matrix of the parameters such as distortion factor and focal length to obtain video camera composition.In subsequent execution rank
Section, can use the internal reference matrix of the video camera to carry out corresponding vision measurement and calculating, and proving operation only needs to execute primary.
The present invention demarcates camera using the chessboard calibration method of Zhang Zhengyou, and Zhang Zhengyou standardizations are imaged by multiple
The image acquired when head is relative to chessboard different angle calculates the internal reference coefficient of camera, finally obtains the interior of camera
Join matrix.
1. printing the template of sheet of planar calibration and pasting in one plane, schematic diagram is as shown in Figure 10 a;
2. shooting several template images from different perspectives;
3. detecting the characteristic point in image;Schematic diagram is as shown in fig. lob;
4. according to characteristic point in world coordinate system coordinate position and its corresponding pixel coordinate in the picture, simultaneous equations
Group finds out the internal reference matrix of video camera, and the internal reference matrix of video camera is the matrix K of a 3x3, and specific form is as follows:
Wherein, fx indicates the product of physics focal length F and imager in each unit size of X-direction of camera lens,
Fy indicates that the product of physics focal length F and imager in each unit size in y-axis direction of camera lens, cx indicate in imager
The heart and the offset of optical axis in the X-axis direction, cy are indicated due to imager imager center and the offset of optical axis in the Y-axis direction.
S2, video frame is obtained:
Plane mark object S is placed on the upper surface for the package to be measured that express delivery measures package dimensions, with plane mark object S
Center O1 as world coordinate system origin.Since the thickness of plane mark object can be ignored than relatively thin, then that wraps up is upper
Surface and the X-Y plane of world coordinate system O1 are coplanar, and package to be measured is cuboid or cube, the then directions height H wrapped up
It is parallel with the Z-direction of world coordinate system O1.
As shown in figure 11, courier is in package to be measured using the camera of self-contained handheld terminal (or mobile phone)
Oblique upper, guarantee to see the upper surface (including plane mark object) of package to be measured and any two it is adjacent with upper surface two
A side surface total of three surface.
S3, quadrangle detection:
Plane mark object identifies:The step determines plane mark for identifying specific plane mark object in the picture
Four angle points of object, detailed process are as follows:Binary segmentation is carried out to the image that camera obtains using adaptivity threshold value, then
Quadrangular configuration of the shape similar to plane mark object is extracted from bianry image, by four vertex of quadrangular configuration, by the figure
As converting the front view being square after projective transformation.By analyze front view picture in coding, finally determine this four
The corresponding plane mark object of side shape image.
1. quadrangular configuration detects
The process detects that plane mark object may corresponding quadrangular configuration in image.Utilize adaptivity threshold method pair
Image carries out binary segmentation, then extracts appearance profile from the bianry image obtained above.Polygon approach is carried out to profile,
Give up those non-convex polygons and those be not quadrangle profile.The restrictive condition that has used some additional is rejected
Those are unlikely to be the quadrangular configuration of plane mark object image, and as quadrangle is significantly less than remaining side on one side, (shape compares
It is tall and thin), profile perimeter or area are too small etc..Remaining qualified profile be plane mark object may be corresponding it is alternative
Profile.
2. obtaining the front view in quadrangular configuration region
The process is used to the possible corresponding quadrangular image region of plane mark object becoming the front view being square, to
Further judge whether the quadrilateral area is the corresponding image of plane mark object.Quadrangular configuration is defined by photography transformation to turn
It is respectively (0,0), (0,100), (100,100), (100,0) to be changed to four vertex pixel coordinates after front view.In original image
Four vertex pixel coordinates of middle quadrangular configuration for each group of point correspondence it is known that meet projective transform matrix M:
Wherein, X is the homogeneous pixel coordinate on alternative profile vertex, and nonhomogeneous pixel coordinate is
X is the homogeneous coordinates on vertex after projective transformation, and nonhomogeneous pixel coordinate is
By four groups of vertex correspondence relationships, can Simultaneous Equations solve projective transform matrix M, to all pictures of original image
Element is carried out projective transformation M, you can obtains the corresponding front view in quadrangular configuration region, the plane which is square
Mark object image, i.e. front view are 100 × 100 as size.
Because the image for the plane mark object that camera is shot from all angles is different, if camera is in mark
Know the surface of object, then the image of marker is also a rectangle;If camera is sideling seen, rectangle plane marker
Image is an irregular quadrilateral.The purpose of acquisition front view is exactly in this step:No matter camera in terms of which angle, obtains
To front view be all a kind of image to look down from surface.Convenient for the identification of subsequent plane mark object, i.e. image is returned
One changes.
S4, the identification of plane mark object:
As shown in figure 12, the front view picture of the plane mark object of acquisition is rotated by 90 ° successively, 180 °, 270 ° to most
Four width images are obtained eventually.The four width images obtained above are matched with the image template of plane mark object respectively.When with appoint
When one sub-picture successful match, the quadrangular configuration, that is, corresponding is the plane mark object.
S5:Calculate outer ginseng matrix (spin matrix R and translation vector T)
Calculate the spin moment using the midpoint of plane mark object S as the world coordinate system O1 of origin relative to camera coordinates system O2
Battle array R1 and translation vector T1:
Make even face marker S center O1 be world coordinate system origin, then in the plane where plane mark object S
Point Z axis coordinate is all 0.If the length of side of plane mark object S is 80mm, then in its four vertex plane marker S coordinate systems O1
Coordinate is respectively (- 40, -40,0), (40, -40,0), (40,40,0), (- 40,40,0).
According to pinhole camera modeling, if in space coordinates of the point P under camera coordinate system be Pc=(Xc, Yc,
Zc), then its there are following relationships for pixel coordinate (u, v) in video camera imaging plane with the point:
If P coordinates under world coordinate system are Pw=(Xw, Yw, Zw), then P points coordinate Pw and camera shooting under world coordinate system
There are following transformational relations by coordinate Pc under machine coordinate system:
Formula (2) and formula (3) are combined together, you can obtain coordinate Pws of the point P in world coordinate system with it is corresponding
The plane of delineation on pixel coordinate (u, v) relation equation:
By the vertex pixel coordinate, the internal reference matrix of vertex world coordinates and the camera obtained in advance
Substitute into following formula (2) and formula (3) respectively, in conjunction with formula (4) obtain the camera current field spin matrix and
Translation vector.
Wherein, (u, v, 1) indicates target point pixel in the pixel coordinate system of video camera described in the plane mark object
The homogeneous coordinates of coordinate, (Xw, Yw, Zw, 1) indicate the homogeneous seat of target point world coordinates in the world coordinate system
Mark, (Xc, Yc, Zc) indicate camera coordinates of the target point in the camera coordinates system of video camera;Fx indicates camera lens
Physics focal length F and imager each unit size of X-direction product, fy indicate the physics focal length F of camera lens with
For imager in the product of each unit size in y-axis direction, cx indicates imager center and the offset of optical axis in the X-axis direction, cy
It indicates due to imager imager center and the offset of optical axis in the Y-axis direction;R indicates that world coordinate system arrives camera coordinates system
Spin matrix, T indicate the world coordinate system to the translation vector of the camera coordinates system.
The coordinate system O1 of selected plane mark object S is world coordinate system Ow, then in four vertex of plane mark object S
Any vertex (Xw, Yw, 0), all there is the equation of formula (4).Due to Z axis coordinate Zw of four vertex under world coordinate system
=0, so formula (4) is simplified to obtain following equation (6):
Above by a vertex of plane mark object S, vertex pixel coordinate and its vertex exist in pixel coordinate system
An equation can be written in vertex world coordinates in world coordinate system, then four vertex correspondences of plane mark object S can be written
Four equation groups, by direct linear transformation (DLT) algorithm of equation group, so as to find out r1, r2, r3 and T.Wherein, spin moment
Battle array R=[r1r2r3] is orthogonal matrix, and column vector r1, r2, r3 are mutually orthogonal unit vectors, when finding out r1, r2, r3
It can be obtained by the vector product of r1, r2.
The Corner Detection of S6, package to be measured:
The each angle point for finding package to be measured in the target image reads the corresponding pixel coordinate of each angle point, subsequently makes
Length measurement is carried out with the corresponding pixel coordinate of each angle point.
1. using Canny edge detection algorithms on the image, apparent edge in detection image.Due to the side of package to be measured
Edge is apparent with background contrast, so by edge detection algorithm, can protrude these apparent object edges.The process can obtain
Including wrapping up the bianry image at edge in image.
2. finding edge line in edge binary images using Hough line detection algorithm.Hough line detection algorithm base
Tiny or mixed and disorderly edge can be filtered automatically in apparent and long verge searching edge line, bianry image.By
It is obvious in the edge of package to be measured, it is also long, so being capable of detecting when the corresponding edge line in the edge of package to be measured.
3. as shown in Figure 5 and Figure 6, calculating the position of the intersection point of the corresponding each edge line in package edge to be measured, angle is obtained
Point A1, A2, A3, A4, the angle point are to wrap up corresponding angle point.
S7, computational length and width:As shown in Figure 5 and Figure 6, the long L of package to be measured it is corresponding be package to be measured upper table
The corresponding distance of angle point A1, A3 on face, the angle point A1, A2 of the corresponding upper surfaces for being its package to be measured wide W of package to be measured
Corresponding distance.
The pixel coordinates (u1, v1) of known angle point A1 in the picture, then substituted into formula (5).Due to video camera
Internal reference matrix K is it is known that above step S411-S413 has acquired spin matrix R and translation vector T, then the Matrix division
Unknown quantity is Xw、Yw、Zc, coordinate (Xs of the angle point A1 under world coordinate system can be obtained by dematrix equation groupw1, Yw1, 0).
It similarly, can be in the hope of coordinate (Xs of the angle point A2 and A3 under world coordinate systemw2, Yw2, 0), (Xw3, Yw3, 0).Pass through
2 range formulas can acquire long L=in following three dimensions | A1A3| and width W=| A1A2|。
S8, computed altitude:As shown in Figure 5 and Figure 6, it is known that height H=| A1A4|, institute parallel with world coordinate system Z-direction
Z axis coordinate with angle point A4 is height H, and the X axis coordinate and Y axis coordinate of angle point A4 is identical as angle point A1, i.e. Xw4=Xw1, Yw4
=Yw1。
The pixel coordinates (u4, v4) of known angle point A4 in the picture, then substituted into formula (4), due to video camera
Internal reference matrix is it is known that above step has acquired spin matrix R and translation vector T, then the unknown quantity of the Matrix division is Zw、
Zc.It obviously, only need to be by Xw4Or Yw4Unknown quantity can be obtained by dematrix equation group by substituting into a value.Preferably, pass through wheel
Stream substitutes into Xw4 and Yw4 and calculates Zw respectively twice, then takes the average value of the two as height H, promotes package elevation carrection to be measured
Accuracy and reliability.
S9, volume is calculated:By length, width and height out calculated above, since package is cuboid or cube,
Volume V=L × W × H of package can directly be calculated.
S10, judge whether to exit;If it is not, return to step S2.
The present invention accurately calculates the length ruler of package to be measured using the camera in real time under complicated scene
It is very little, it can also be worked normally under outdoor strong light, the dimension information of package is calculated under the premise of ensureing precision.Due to this hair
It is bright that the camera carried on hand-held terminal device (or mobile phone) is utilized, do not need additional fitting depth camera etc. more
Expensive equipment, saves cost.In addition postposition camera shooting is natively integrated on courier's hand-held terminal device (or mobile phone)
Head, the camera carried using mobile terminal can also be worked normally under outdoor strong light, so as to ensure precision
Under the premise of calculate the length size of package to be measured in real time, to conveniently calculate the size letter of package to be measured
Breath.Since present invention utilizes cameras on hand-held terminal device (or mobile phone), it need not additionally increase expensive equipment, section
Cost is saved.In addition, user can also use the mobile terminal of instruction of the storage for measuring package volume measuring method to carry out
The volume of the package to be measured of verification courier's estimation avoids courier by package to be measured to understand itself package dimensions information
Volume more report and generate charge, reduce unnecessary mailing expense.
The 7th embodiment of the present invention, as shown in figure 13, a kind of measuring system of package volume is equipped with applied to measurement
The volume of the package to be measured of plane mark object, including:
Image collection module 1000 acquires target image by the camera of mobile terminal;The target image includes institute
State plane mark object, the upper surface of package to be measured equipped with the plane mark object and the to be measured package adjacent with upper surface
Two side surfaces;
Picture recognition module 2000 carries out at image the target image that described image acquisition module 1000 obtains
Reason, to identify the plane mark object in the target image;
Image processing module 3000 carries out image border to the target image that described image acquisition module 1000 obtains
Detection, to identify the angle point of the package to be measured in the target image;
Cubing module 4000, the plane mark object identified according to described image identification module 2000, in advance
The internal reference matrix and the angle point of the camera of acquisition, calculate the world coordinates of the angle point, to according to the generation of the angle point
Boundary's coordinate obtains the volume of the package to be measured.
Specifically, in the present embodiment, plane mark object refers to that pre-designed having geometry in particular and encode is believed
The pattern of breath, is typically printed in above a piece of paper.The front camera or rear camera carried by mobile terminal
To be acquired target video, when being acquired target video using mobile terminal, need the camera shooting head mirror on mobile terminal
Head is convenient for superscribing the upper table equipped with plane mark object by be measured in this way towards the oblique upper on the surface for being set to plane mark object
Face is acquired with equipped with the adjacent any two side surface in the upper surface of package to be measured of plane mark object.Upper surface herein
Be away from the upper surface on ground when not necessarily package to be measured is placed, and be defined as camera when acquiring target image
It is to be measured package equipped with plane mark object any one camera can collected surface, if that is, by plane mark object be set to shape
Shape is the upper surface of the separate bottom surface of the package to be measured of cuboid, then can be obtained from four side surfaces adjacent with upper surface
Take any two or multiple side surfaces;If plane mark object to be set to any one side surface of the package to be measured of rectangle,
Any two or multiple side tables so can be obtained from a upper surface adjacent with side surface and remaining three side surfaces
Face.The shape for only enumerating package to be measured herein is the example of cuboid, and the package to be measured of other rectangular shapes is the present invention's
In protection domain.
The present invention in order to it is comprehensive, completely collect target image, can by mobile terminal carry camera into
Collected video is carried out image procossing and obtains target image, put down after target image is handled by row acquisition video
The angle point of the image of face marker and package to be measured, to according to plane mark object and angle point and the video camera obtained in advance
Internal reference matrix carries out the world coordinates that the angle point of package to be measured is calculated, and packet to be measured is calculated according to the world coordinates of angle point
The volume wrapped up in.The present invention due to the use of mobile terminal carry camera be acquired target video, do not need depth camera into
Row acquisition, and the surface that must be positioned at package to be measured when depth camera acquires package to be measured is not needed, therefore need not answer
Miscellaneous arrangement, enriches usage scenario, need not increase additional hardware facility newly, saves cost.In addition, the present invention need not incite somebody to action
Depth camera is installed and is adapted to connection with mobile terminal, when measuring the volume of package to be measured of user, not only to carry depth
Camera and mobile terminal, it is also necessary to connection is adapted in real time with mobile terminal progress to depth camera when in use, the present invention adopts
The camera and processor carried with mobile terminal, low cost while at low cost, simplify the step of package cubing to be measured
Suddenly, measurement efficiency is high, and since the volume of package to be measured is automatically performed by the processor that mobile terminal carries, easy to operate,
And testing result is intuitive, reliable, high certainty of measurement.Therefore, the volume for measuring package that the present invention can be full-automatic, it is accurate
Really efficiently, while without other hardware devices are installed, simple and convenient, user experience is high.
The 8th embodiment of the present invention is as shown in figure 14 the optimal enforcement example of above-mentioned 7th embodiment, a kind of package
The measuring system of volume is applied to measure the volume of the package to be measured equipped with plane mark object, it is preferred that wrap up the measurement of volume
System further includes:
Demarcating module demarcates the camera, obtains the internal reference matrix of the camera.
Specifically, the present embodiment is the optimal enforcement example of above-mentioned 7th embodiment, the present embodiment and above-mentioned 7th embodiment
It compares, main improve is, has increased demarcating module newly to be demarcated to camera, i.e., using the above scheme in the present embodiment
Before the volume for measuring package to be measured, it is also necessary to by demarcating module to for acquiring the camera of target video into rower
It is fixed, specifically, by being demarcated to the camera, the internal reference matrix of the camera is obtained, that is, determines the camera
The geometrical model of imaging.Camera calibration is the early-stage preparations stage of whole system, and vision survey is carried out when selecting a camera
Amount must demarcate it, the internal reference matrix of the parameters such as distortion factor and focal length to obtain video camera composition.Follow-up
The execution stage, the internal reference matrix of the video camera can be used to carry out corresponding vision measurement and calculating.Proving operation only needs
It executes primary.
The chessboard calibration method that Zhang Zhengyou may be used in the demarcating module of the present invention demarcates camera, Zhang Zhengyou calibration
Method by multiple cameras relative to chessboard different angle when the image that acquires the internal reference coefficient of camera is calculated, finally
Obtain the internal reference matrix of camera.
The process of the plane reference method is as follows:
1. printing the template of sheet of planar calibration and pasting in one plane;
2. shooting several template images from different perspectives;
3. detecting the characteristic point in image;
4. according to characteristic point in world coordinate system coordinate position and its corresponding pixel coordinate in the picture, simultaneous equations
Group finds out the internal reference matrix of video camera, and the internal reference matrix of video camera is the matrix K of a 3x3, and specific form is as follows:
Wherein, fx indicates the product of physics focal length F and imager in each unit size of X-direction of camera lens,
Fy indicates that the product of physics focal length F and imager in each unit size in y-axis direction of camera lens, cx indicate in imager
The heart and the offset of optical axis in the X-axis direction, cy are indicated due to imager imager center and the offset of optical axis in the Y-axis direction.
The 9th embodiment of the present invention is as shown in figure 14 the optimal enforcement example of above-mentioned 7th or the 8th embodiment, one
The measuring system of kind package volume is applied to measure the volume of the package to be measured equipped with plane mark object, mainly improves and be, institute
Stating picture recognition module 2000 includes:
Binary segmentation submodule 2100 carries out binary segmentation to the target image that the extraction module obtains;
Shape extracting sub-module 2200 extracts appearance profile from the binary image after segmentation;
Sub-module stored 2300 stores the common feature of the appearance profile corresponding to the plane mark object, the plane
Marker template;
Processing submodule 2400 is judged, corresponding to the plane mark object stored in the sub-module stored 2300
Appearance profile common feature, from the shape extracting sub-module 2200 extract appearance profile in choose have the general character
The appearance profile of feature alternately profile;
Front view acquisition submodule 2500 obtains the front view of the alternative profile;
Identify submodule 2600, when front view and the sub-module stored 2300 of the alternative profile prestore it is described flat
When face marker template is consistent, identify that the corresponding image of the alternative profile is the image of the plane mark object.
Specifically, the present embodiment is the optimal enforcement example of above-mentioned 7th or the 8th embodiment, the present embodiment and the above-mentioned 7th
Or the 8th embodiment compare, main improve is how to be handled target image to identify screen plane marker
Further refinement explanation is carried out.The present embodiment carries out binary segmentation to the target image, and binary segmentation i.e. will be on image
The gray value of pixel is set as 0 or 255, that is, whole image is showed apparent black-white visual effect, and by image
In separated with the different zones of special connotation, these regions are mutually disjointed, and each region meets the consistent of specific region
Property.Binary segmentation can also be carried out to the image that camera obtains using adaptivity threshold value.Two are carried out to the target image
It after being worth dividing processing, needs to identify plane mark object, since camera (but can may take plane from different perspectives
Marker and the surface including plane mark object and other surfaces) shooting obtained different target videos, therefore, the figure of acquisition
As the appearance of the plane mark object not necessarily front view in video frame.It so needs first to extract to shoot from all angles
Plane mark object, and edge detection is carried out to the plane mark object, the general character for obtaining the appearance profile of the plane mark object is special
Sign, then this common feature is stored in advance, convenient for the plane mark object is identified after acquiring video frame.Specifically
, after carrying out binary segmentation to video frame images, the appearance profile of each image after extraction segmentation, according to plane mark beyond the region of objective existence
The common feature of shape profile finds out alternative appearance profile, carries out polygon approach to profile, it is non-convex polygon to give up those
Shape and those be not quadrangle profile.Further, it is also possible to using some additional restrictive conditions come reject those can not
Can be the quadrangular configuration of plane mark object image, if quadrangle is significantly less than remaining side (shape is taller and thinner) on one side, wheel
Wide perimeter or area are too small etc., and remaining qualified profile is the alternative profile that plane mark object may be corresponding.Than
Such as, if the screen plane marker that we select is square, its appearance profile is can get after edge detection
Common feature is quadrangle, then we just accordingly, from the appearance profile extracted, exclude those non-convex polygons, with
And not be quadrangle profile etc..After obtaining alternative profile, be exactly in next step obtain the front view of each alternative profile, that is,
Say becomes front view by the possible corresponding alternative contour images region of plane mark object, to further judge the alternative profile region
Whether domain is the corresponding image of plane mark object.Specifically, by the way that the front view of each alternative profile is somebody's turn to do with pre-stored
Plane mark object template is compared, and can judge that this alternative profile is plane under unanimous circumstances when having to compare
The appearance profile of marker, the corresponding image of this alternative profile are exactly the image of plane mark object, so far, plane mark object quilt
It identifies.The shape of plane mark object can be rectangle, diamond shape or square etc. shape.
Preferably, on the basis of the above embodiments, the plane mark object on any one surface of package to be measured is arranged
It is square, the plane mark to prestore in the common feature of the appearance profile corresponding to the plane mark object to prestore
The common feature for knowing the appearance profile corresponding to object is that the appearance profile corresponding to the plane mark object is quadrangle.It is arranged
Plane mark object is different, then the common feature of corresponding appearance profile also can be different.We use up when choosing plane mark object
Amount selection is readily discernible, and the obvious plane mark object of characteristic point is preferred.Such as square, tool there are four vertex, due to
Four length of sides of square are consistent, in addition four vertex comparatively facilitate subsequent positions calculations so that operation is got up also more
Simply.
The tenth embodiment of the present invention is as shown in figure 14 the optimal enforcement example of above-mentioned 9th embodiment, a kind of package
The measuring system of volume is applied to measure the volume of the package to be measured equipped with plane mark object, and main improve is, the plane
Marker is square, and the common feature of the appearance profile corresponding to the plane mark object of the storage submodule storage is
Quadrangle;
The front view acquisition submodule 2500 includes:
Reading unit 2510 reads the pixel coordinate on four vertex of the alternative profile;
Definition unit 2520, the pixel for defining four vertex of the alternative profile after projective transformation is front view are sat
It is designated as the pixel coordinate on four vertex of the front view of the plane mark object to prestore;
Computing unit 2530, the pixel coordinate on four vertex that the reading unit 2510 is read and the definition
The pixel coordinate on four vertex that unit 2520 defines substitutes into following Projection Transformation On Plane formula (1) respectively, seeks projective transformation
Matrix M:
Wherein, X is the homogeneous pixel coordinate on alternative profile vertex, and nonhomogeneous pixel coordinate is
X ' is the homogeneous coordinates on vertex after projective transformation, and nonhomogeneous pixel coordinate is
Converter unit 2540, the projective transform matrix M sought according to the computing unit 2530, to described standby
It selects all pixels of the corresponding binary image of profile to be carried out projective transformation, obtains the region that the alternative profile includes and correspond to
Front view.
Specifically, the present embodiment is the optimal enforcement example of above-mentioned 9th embodiment, the present embodiment and above-mentioned 9th embodiment
It compares, main improve is that the front view to how to acquire alternative profile has carried out further refinement explanation.The present embodiment
Continue the example that the plane mark object in above-described embodiment is square to continue for example, according to square-shaped planar marker
Square characteristic, for example, we can define the picture on four vertex of the alternative profile after projective transformation is converted to front view
Plain coordinate, for example, square plane mark object front view four vertex pixel coordinates be respectively (0,0), (0,100),
(100,100), (100,0), then can be using this four apex coordinates as the pixel on four vertex of the alternative profile of quadrangle
Coordinate passes through four groups of vertex correspondences in addition, the pixel coordinate of the original image of the alternative profile of quadrangle can be read out from image
Relationship, can Simultaneous Equations solve photography transformation matrix M, quadrangle can alternatively be taken turns using projective transform matrix M
The all pixels in wide region are carried out projective transformation, you can the corresponding front view in region of the alternative profile of the quadrangle is obtained, it should
Front view is 100 × 100 as size, you can obtains the corresponding front view in region of the alternative profile of the quadrangle, then should
Unanimously whether front view is compared with the plane mark object template to prestore, see, then illustrate this quadrangle wheel if consistent
Exterior feature is exactly the profile of the plane mark object, then plane mark object is just identified.Here select front view is to compare
Because the image for the plane mark object that camera is shot from all angles is different, if camera is in plane mark object
Surface, then the image of plane mark object is also a rectangle, if camera shooting in plane mark object oblique upper, square
The image of shape plane mark object is an irregular quadrilateral, obtains the purpose that front view is compared and is exactly, no matter camera
In terms of that angle, the front view of plane mark object is all a kind of image to look down from surface, in this way, being convenient for plane mark
The identification of object.
The tenth one embodiment of the present invention is as shown in figure 14 that the optimization of above-mentioned seven, the 8th or the tenth embodiment is real
Example, a kind of measuring system of package volume are applied, main improve is that described image processing module 3000 includes:
Edge detection submodule 3100 carries out edge detection process to the target image that the extraction module obtains,
Obtain edge binary images;
Straight line searches submodule 3200, is looked into from the edge binary images that the edge detection submodule 3100 obtains
Look for the edge line corresponding to package edge to be measured;
Angle point acquisition submodule 3300 calculates the straight line and searches in the edge line that submodule 3200 is found and appoints
The position of the intersection point of meaning two edge lines composition, obtains the angle point of the package to be measured.
Specifically, the present embodiment is the optimal enforcement example of any one embodiment of above-mentioned seven, the 8th or the tenth embodiment,
Compared with above-mentioned seven, the 8th or the tenth, main improve is the present embodiment, and the angle point of package to be measured is identified to how to detect
Further refinement explanation is carried out.In the present embodiment, edge detection process is carried out to target image, obtains edge binary images,
Canny edge detection algorithms can be used, i.e., detect apparent edge in target image with the smooth target image of Gaussian filter,
Amplitude and the direction that gradient is calculated with the finite difference of single order local derviation carry out non-maxima suppression to gradient magnitude, use dual threashold
Value-based algorithm detects and connection edge, since edge and the background contrast of package to be measured are apparent, so by edge detection algorithm, it can
With these prominent apparent object edges, which can obtain including the bianry image at package edge to be measured in image.
Edge detection process is carried out to target image to obtain comprising after the edge binary images at package edge to be measured in image,
All existing straight lines, Hough transform detection can be found from edge binary images with the method that Hough transform detects straight line
The method of straight line present in edge binary images is that equation of the straight line under polar coordinate system is following equation (5);
ρ=xcos θ+ysin θ (5)
For some (xi, yi), sine curve ρ=xicos θ+yisin θ can be calculated, and for two-value
Change the point in edge image, different sine curves can be obtained, according to different θ, a series of ρ, root can be calculated
A two-dimensional accumulator element array is set up according to obtained (ρ, θ), the size of wherein unit is fixed, if corresponding
(ρ, θ) value is fallen in some unit, then the accumulator count of this unit adds one, and final accumulator value is more than one pre-defined
The corresponding unit of threshold value T think to represent straight line.The of the method for Hough transform detection straight line have discussion more, this
Place no longer thoroughly discusses.
It is a kind of preferred mode that Hough transform, which detects straight line also, and the method that other detection straight lines also can be selected obtains
The edge binary images to be measured for wrapping up edge in comprising image, such as Hough line detection algorithm are sought in edge binary images
Look for straight line.Hough line detection algorithm is based on apparent verge searching straight line, tiny or mixed and disorderly edge meeting in bianry image
Automatically it is filtered.
Hough line detection algorithm detection straight line is as follows:
1, a characteristic point in image, i.e. marginal point are randomly selected, if the point has been demarcated as being that a certain item is straight
Point on line, then continue a marginal point is randomly selected in remaining marginal point, until all marginal points all extract be over for
Only;
2, Hough transformation is carried out to the point, and is added up and is calculated;
3, the maximum point of value in hough space is chosen to carry out step 4 if the point is more than threshold value, otherwise return to
Step 1;
4, the maximum value obtained according to Hough transformation, from this point, along the direction displacement of straight line, to find straight line
Two endpoints;
5, the length for calculating straight line, if it is greater than some threshold value, then the straight line output for being considered as returns to step 1.
It is also long since the edge of package to be measured is obvious, so being capable of detecting when that package edge to be measured is corresponding
Edge line calculates the position of the intersection point of arbitrary two edge lines composition in edge line, is waited for as shown in Figure 5 and Figure 6
Angle point A1, A2, A3, the A4 for surveying package can also include other angle points A5, A6, the A7 of package to be measured, but be based on package to be measured
Cubing efficiency consider, A1, A2, A3, A4 is only calculated.Certainly, if in order to verify the volume of package to be measured
Whether calculating is correct, and A3, A5, A6, A7 can be used to be calculated again, compare and A1, A2, A3, A4 are calculated to be measured
Whether the difference between the volume of package is less than preset difference value range, is waited for if can choose any one volume calculated value and be used as
The volume measurement of package is surveyed, otherwise, needs to carry out video acquisition calculating to package to be measured again.The present invention passes through edge image
Acquisition, straight-line detection determine candidate polygon and are verified to candidate polygon, eliminate cumbersome neural network training process
And slide, directly the edge line of the package to be measured in target image is detected, more simple, intuitive, detection efficiency
It is improved.
The 12nd embodiment of the present invention, as shown in Figure 14 and Figure 15, a kind of measuring system of package volume, is above-mentioned
The optimal enforcement example of any one embodiment in 7th embodiment to the 11st embodiment, main improve are that the volume is surveyed
Measuring module 4000 includes:
Outer ginseng matrix acquisition submodule 4100, according to the plane mark object and the internal reference of the camera obtained in advance
Matrix calculates the outer ginseng matrix of the camera current field;The outer ginseng matrix includes spin matrix and translation vector;
Angular coordinate acquisition submodule 4200, according to pixel coordinate of the angle point in pixel coordinate system, in conjunction with described
Spin matrix and translation vector obtain the world coordinates of the angle point;
Length, width and height acquisition submodule 4300 calculates the length, width and height of the package to be measured according to the world coordinates of the angle point;
Volume acquisition submodule 4400 is wrapped up, the length, width and height, which are substituted into cubature formula, calculates the acquisition package to be measured
Volume.
As shown in figure 15, the outer ginseng matrix acquisition submodule 4100 includes:
Coordinate system determining unit 4110 establishes world coordinate system using the midpoint of the plane mark object as origin;
Apex coordinate reading unit 4120 reads vertex of each vertex of the plane mark object in pixel coordinate system
The vertex world coordinates of pixel coordinate and each vertex in world coordinate system;
Arithmetic element 4130, by the vertex pixel coordinate, vertex world coordinates and it is described obtain in advance described in take the photograph
As the internal reference matrix of head substitutes into following formula (2) and formula (3) respectively, obtaining the camera in conjunction with formula (4) works as forward sight
The spin matrix and translation vector of field:
Wherein, (u, v, 1) indicates target point pixel in the pixel coordinate system of video camera described in the plane mark object
The homogeneous coordinates of coordinate, (Xw, Yw, Zw, 1) indicate the homogeneous seat of target point world coordinates in the world coordinate system
Mark, (Xc, Yc, Zc) indicate camera coordinates of the target point in the camera coordinates system of video camera;Fx indicates camera lens
Physics focal length F and imager each unit size of X-direction product, fy indicate the physics focal length F of camera lens with
For imager in the product of each unit size in y-axis direction, cx indicates imager center and the offset of optical axis in the X-axis direction, cy
It indicates due to imager imager center and the offset of optical axis in the Y-axis direction;R indicates that world coordinate system arrives camera coordinates system
Spin matrix, T indicate the world coordinate system to the translation vector of the camera coordinates system.
As shown in figure 15, the angular coordinate acquisition submodule 4200 includes:
Corner pixels coordinate acquiring unit 4210 reads pixel of the angle point in the pixel coordinate system of video camera and sits
Mark;
Angle point world coordinates acquiring unit 4220, by the pixel coordinate of the angle point, the camera obtained in advance
The spin matrix and translation vector of internal reference matrix and the camera current field substitute into the formula (4) and obtain the angle
The world coordinates of point;Wherein, (u, v, 1) indicates the homogeneous coordinates of the pixel coordinate of the angle point, and (Xw, Yw, Zw) is the angle
The world coordinates of point, (Xw, Yw, Zw, 1) indicate the homogeneous coordinates of the world coordinates of the angle point;
As shown in figure 15, the length, width and height acquisition submodule 4300 includes:
Angle point world coordinates reading unit 4310 reads the corresponding world coordinates of any four angle point;Four angle points
In any one angle point be the first angle point, and remaining three angle points connect the straight line point of generation two-by-two with first angle point respectively
It is not parallel to the XYZ axis of the world coordinate system;
Length operation unit 4320, by the corresponding world coordinates of first angle point and the corresponding world of the second angle point
Coordinate substitutes into 2 range formulas of coordinate, calculates the length for obtaining the package to be measured;Second angle point with described first jiao
The straight line parallel that point connection generates is in the X-axis of the world coordinate system;
Width arithmetic element 4330, by the corresponding world coordinates of first angle point and the corresponding world of third angle point
Coordinate substitutes into 2 range formulas of coordinate, calculates the width for obtaining the package to be measured;Second angle point with described first jiao
The straight line parallel that point connection generates is in the Y-axis of the world coordinate system;
Height arithmetic element 4340, by the corresponding world coordinates of fourth angle point and the pixel coordinate of angle point, in conjunction with described
The spin matrix and translation vector of the internal reference matrix of the camera obtained in advance, the camera current field, substitute into the public affairs
Formula (4) calculates the height for obtaining the package to be measured;The fourth angle point connect the straight line parallel generated with first angle point
In the Z axis of the world coordinate system.
For example, the center O1 for the face marker S that makes even is the origin of world coordinate system, which is also plane mark
The plane mark article coordinate system of object S, then the Z axis coordinate of the point in the plane where plane mark object S is all 0.If plane mark
The length of side for knowing object S is P, then the coordinate in its four vertex plane marker S coordinate systems O1 is respectively (- P/2 ,-P/2,0), (P/
2 ,-P/2,0), (P/2, P/2,0), (- P/2, P/2,0).
According to pinhole camera modeling, if coordinates of the point P under camera coordinates system is Pc=(Xc, Yc, Zc) in space,
Then its there are the relationships listed by formula (2) for pixel coordinate (u, v) in video camera imaging plane with the point, if P is in world coordinates
The lower coordinate of system is Pw=(Xw, Yw, Zw), then P points coordinate Pw and coordinate Pc under camera coordinates system under world coordinate system exists public
Transformational relation listed by formula (3), wherein the matrix R=(r1, r2, r3) of 3x3, matrix R are by world coordinate system to camera coordinates
The spin matrix of system, T are the translation vector by world coordinate system to camera coordinates system, and formula (2) and formula (3) are incorporated in one
It rises, you can obtain the conversion side of the point P coordinate Pw in world coordinate system and the pixel coordinate (u, v) on the corresponding plane of delineation
Journey (4), the central point due to selecting plane mark object S is that origin establishes world coordinate system, then for four of plane mark object S
All there is the corresponding equation of formula (4) in any vertex (Xw, Yw, 0) in vertex.Since four vertex are under world coordinate system
Z axis coordinate Zw=0, and matrix R=(r1, r2, r3), so formula (4) is simplified to obtain following equation (6):
Above by coordinate in a vertex pixel coordinate of plane mark object S and its corresponding plane mark article coordinate system
An equation can be written.Four equation groups can be written by four vertex correspondences of plane mark object S, then pass through equation group
Direct linear transformation (DLT) algorithm, so as to find out r1, r2, r3 and T.Wherein, spin matrix R is orthogonal matrix, column vector
R1, r2, r3 are mutually orthogonal unit vectors, and when finding out r1, r2, r3 can be obtained by the vector product of r1, r2, to vertex picture
In the case of plain coordinate and vertex world coordinates are known, the internal reference matrix of the camera obtained in advance is substituted into following public affairs respectively
Formula (2) and formula (3), the spin matrix and translation vector of camera current field can be calculated in conjunction with formula (4).
As shown in Figure 5 and Figure 6, it is known that pixel coordinates (u1, v1) of the angle point A1 in pixel coordinate system is then substituted into public affairs
In formula (4), since the internal reference matrix K of video camera is it is known that in addition, acquired spin matrix R and translation vector T, then the matrix
The unknown quantity of equation group is Xw、Yw、Zc, the worlds of the angle point A1 under world coordinate system can be obtained by dematrix equation group and sit
Mark (Xw1, Yw1, 0), similarly can also be according to angle point A2, the corresponding pixel coordinate (ui, vi) of A3, A4 in pixel coordinate system,
I ∈ N (i≤2) seek out world coordinates (X of the correspondence of each angle point of package to be measured on world coordinate system respectivelywi, Ywi,
0), (i≤2) i ∈ N.
Read the corresponding world coordinates of any four angle point first, using any one angle point in four angle points of reading as
First angle point, the straight line that remaining three angle points connect generation two-by-two with the first angle point respectively are respectively parallel to the world coordinates
The XYZ axis of system, the second angle point connect the straight line parallel generated with the first angle point in the X-axis of world coordinate system, the second angle point and the
For the straight line parallel that the connection of one angle point generates in the Y-axis of world coordinate system, it is flat that fourth angle point connect the straight line generated with the first angle point
Row is in the Z axis of world coordinate system.Since the world coordinates of each angle point, such as Fig. 5 being calculated by step S421-S422
It is shown, it is assumed that the first angle point is A1, and the second angle point is A3, and third angle point is A2, and fourth angle point is A4, then the first angle point A1
World coordinates is (Xw1, Yw1, 0), the world coordinates of the second angle point A3 is (Xw3, Yw3, 0), the world coordinates of third angle point A2 is
(Xw2, Yw2, 0), the world coordinates of fourth angle point A4 is (Xw4, Yw4, 0),
The length L=of package to be measured can be acquired by 2 range formulas in following three dimensions | A1A3|, and wait for
Survey the width W=of package | A1A2|。
Due to straight line A1A4It is parallel with world coordinate system Z-direction, so the Z axis coordinate of angle point A4 is height H, angle point
The X axis coordinate and Y axis coordinate of A4 is identical as angle point A1, i.e. Xw4=Xw1, Yw4=Yw1.The pixels of known angle point A4 in the picture are sat
It marks (u4, v4), is then substituted into formula (4), since the internal reference matrix of video camera is it is known that pass through step S411-S413 steps
Spin matrix R and translation vector T is acquired, then the unknown quantity of the Matrix division is Zw、Zc.It obviously, only need to be by Xw4Or
Yw4Unknown quantity can be obtained by dematrix equation group by substituting into a value.Preferably, by turn twice respectively substitute into Xw4 and
Yw4 calculates Zw, then takes the average value of the two as height H, promotes the accuracy and reliability of package elevation carrection to be measured.It is logical
Length, width and height out calculated above are crossed, since package is cuboid or cube, can directly calculate the volume V of package
=L × W × H.Equally, can also be according to angle point A5, the corresponding pixel coordinate (ui, vi) of A6, A7 in pixel coordinate system, i
∈ N (i≤2) calculate separately to obtain the world coordinates of angle point A5, A6, A7 in world coordinate system, and angle point A5 is calculated herein,
After the corresponding world coordinate system of A6, A7, according to angle point A3, A5, A6, the volume of package to be measured is calculated in A7, will be according to angle point
Whether the volume that the length, width and height that A3, A5, A6, A7 are calculated are used to verify the package to be measured being calculated is reliable, does not exist again
It repeats one by one.
Further, since the straight line that angle point A1 and angle point A4 connections generate is parallel with world coordinate system Z-direction, so angle point
The height of package to be measured can also be calculated with angle point A4 distances by A1, i.e.,:
Thirteenth embodiment of the invention, a kind of storage medium, the storage medium is stored with a plurality of instruction, described a plurality of
Instruction is executed by one or more processor, to realize following step:
S100 acquires target video by the camera of mobile terminal, and obtains target image from the target video;
The target image include the plane mark object, the package surface to be measured of the target equipped with the plane mark object and with the mesh
Mark several surfaces of the package adjacent package to be measured in surface to be measured;
S200 carries out image procossing to the target image, to identify the plane mark in the target image
Object;
S300 carries out Image Edge-Detection to the target image, described to be measured to be identified in the target image
The intersection point being wrapped on the target image;
S400 calculates the package to be measured according to the plane mark object, the internal reference matrix obtained in advance and the intersection point
On angle point world coordinates, to according to the angle point world coordinates obtain the volume of the package to be measured.
Preferably, on the basis of the above, another embodiment of storage medium of the present invention, the storage medium is stored with a plurality of
Instruction, a plurality of instruction are executed by one or more processor, to realize the survey of any package volume of the present invention
The step of measuring embodiment of the method.
The step of measurement method of package volume of the present invention, can be found in the embodiment of the method part of front, to reduce
It repeats, it is no longer superfluous herein to chat.
Fourteenth embodiment of the invention, a kind of mobile terminal, including:Processor realizes each instruction;Storage medium is deposited
Store up a plurality of instruction;Wherein:The processor executes the instruction of the storage medium storage, to realize the measurement method of package volume
The step of.
As shown in figure 16, mobile terminal includes:Memory 1001, one or more (one is only shown in figure) processors
1002, these components of camera 1003 are mutually communicated by one or more communication bus signal wire.
It is appreciated that structure shown in Figure 16 is only to illustrate, and it is not to cause to limit to the structure of mobile terminal, it is mobile
Terminal can also include more either less components or with the device different from shown in Figure 16 than shown in Figure 16.Figure 16
Shown in each component may be used hardware, software, or its combination realization.
Memory can be used for storing software program and module, such as the measurement method of the package volume in the embodiment of the present invention
And the corresponding program instruction/module of system embodiment, processor by allowing to be stored in software program/module in memory,
To perform various functions application and data processing, that is, realize measurement method/system of above-mentioned package volume.
Memory may include high speed random access memory, may also include nonvolatile memory, such as one or more magnetic
Storage device, flash memory or other non-volatile solid state memories.The storage medium can be magnetic disc, CD, read-only storage
Device (ROM, Read Only Memory), random access memory (RAM, Random Access Memory) etc..
The various functions and progress data of various softwares, instruction consistency mobile terminal in processor run memory
Processing.Camera is the equal of the eyes of mobile terminal for shooting video, such as using CCD camera etc..
In the embodiment of the present invention, the measurement method and system of volume are wrapped up, storage medium and mobile terminal belong to same structure
Think, on mobile terminals, the instruction stored in storage medium is executed by processor, the survey of corresponding package volume can be run
The method provided in amount embodiment of the method, specific implementation process refer to the measurement method embodiment of the package volume of front, this
Place repeats no more.
It should be noted that this field common test personnel are appreciated that realize the measurement of package volume of the embodiment of the present invention
All or part of flow of method is relevant hardware can be controlled by computer program to complete, and computer program can
It is stored in a computer read/write memory medium, such as stores in a memory in the mobile terminal, and by the mobile terminal
At least one processor executes, and may include the flow of the measurement method embodiment such as package volume in the process of implementation.
It should be noted that above-described embodiment can be freely combined as needed.The above is only the preferred of the present invention
Embodiment, it is noted that for those skilled in the art, in the premise for not departing from the principle of the invention
Under, several improvements and modifications can also be made, these improvements and modifications also should be regarded as protection scope of the present invention.
Claims (18)
1. a kind of measurement method of package volume, which is characterized in that be applied to measure the package to be measured equipped with plane mark object
Volume, including step:
S100 acquires target image by the camera of mobile terminal;The target image includes the plane mark object, is equipped with
The upper surface of the package to be measured of the plane mark object, the to be measured package adjacent with the upper surface two side surfaces;
S200 carries out image procossing to the target image, to identify the plane mark object in the target image;
S300 carries out Image Edge-Detection to the target image, to identify the package to be measured in the target image
Angle point;
S400 calculates the angle point according to the plane mark object, the internal reference matrix of the camera obtained in advance and the angle point
World coordinates, to according to the world coordinates of the angle point obtain the volume of the package to be measured.
2. the measurement method of package volume according to claim 1, which is characterized in that the step S100 passes through mobile whole
Include step before the camera acquisition target image at end:
S010 demarcates the camera, obtains the internal reference matrix of the camera.
3. the measurement method of package volume according to claim 1, which is characterized in that the step S200 is to the target
Image carries out image procossing, to identify that the plane mark object specifically includes step in the target image:
S210 carries out binary segmentation to the target image, and extracts appearance profile from the binary image after segmentation;
The common feature of appearance profiles of the S220 corresponding to the plane mark object to prestore, from the appearance profile of extraction
Choose the alternately profile of the appearance profile with the common feature;
S230 obtains the front view of the alternative profile;
S240 identifies the alternative wheel when the front view of the alternative profile is consistent with the plane mark object template to prestore
Wide corresponding image is the image of the plane mark object.
4. the measurement method of package volume according to claim 3, which is characterized in that the plane mark object is pros
Shape, the default contour feature corresponding to the plane mark object to prestore in the step S220 are quadrangle;
The front view that the step S230 obtains the alternative profile is specially:
S231 reads the pixel coordinate on four vertex of the alternative profile;
The pixel coordinate that S232 defines four vertex of the alternative profile after projective transformation is front view is the institute to prestore
State the pixel coordinate on four vertex of the front view of plane mark object;
S233 is by the pixel coordinate on four vertex of above-mentioned reading and the pixel coordinate on four vertex of the definition generation respectively
Enter Projection Transformation On Plane formula (1), seeks projective transform matrix M:
Wherein, X is the homogeneous pixel coordinate on alternative profile vertex, and nonhomogeneous pixel coordinate is X ' is
The homogeneous coordinates on vertex after projective transformation, nonhomogeneous pixel coordinate are
S234 is carried out all pixels of the corresponding binary image of the alternative profile according to the projective transform matrix M
Projective transformation obtains the corresponding front view in region that the alternative profile includes.
5. wrapping up the measurement method of volume according to claim 1-4 any one of them, which is characterized in that S300 pairs of the step
The target image carries out Image Edge-Detection, to identify that the angle point of the package to be measured is specific in the target image
Including step:
S310 carries out edge detection process to the target image, obtains edge binary images;
S320 searches the edge line corresponding to package edge to be measured from the edge binary images;
S330 calculates the position of the intersection point of arbitrary two edge lines composition in the edge line, obtains the package to be measured
Angle point.
6. wrapping up the measurement method of volume according to claim 1-4 any one of them, which is characterized in that the step S400 roots
According to the plane mark object, the internal reference matrix of the camera obtained in advance and the angle point, the world coordinates of the angle point is calculated,
Volume to obtain the package to be measured according to the world coordinates of the angle point specifically includes step:
It is current to calculate the camera according to the plane mark object and the internal reference matrix of the camera obtained in advance by S410
The outer ginseng matrix of visual field;The outer ginseng matrix includes spin matrix and translation vector;
Pixel coordinates of the S420 according to the angle point in pixel coordinate system obtains institute in conjunction with the spin matrix and translation vector
State the world coordinates of angle point;
S430 calculates the length, width and height of the package to be measured according to the world coordinates of the angle point;
The length, width and height are substituted into the volume that cubature formula calculates the acquisition package to be measured by S440.
7. the measurement method of package volume according to claim 6, which is characterized in that the step S410 is according to described flat
The internal reference matrix of face marker and the camera obtained in advance calculates the spin matrix peace of the camera current field
The amount of shifting to specifically includes step:
S411 establishes world coordinate system using the midpoint of the plane mark object as origin;
S412 reads vertex pixel coordinate and each vertex of each vertex of the plane mark object in pixel coordinate system
Vertex world coordinates in world coordinate system;
S413 is by the vertex pixel coordinate, the internal reference matrix of vertex world coordinates and the camera obtained in advance
Substitute into following formula (2) and formula (3) respectively, in conjunction with formula (4) obtain the camera current field spin matrix and
Translation vector:
Wherein, (u, v, 1) indicates target point pixel coordinate in the pixel coordinate system of video camera described in the plane mark object
Homogeneous coordinates, (Xw, Yw, Zw, 1) indicates the homogeneous coordinates of target point world coordinates in the world coordinate system,
(Xc, Yc, Zc) indicates camera coordinates of the target point in the camera coordinates system of video camera;Fx indicates the object of camera lens
Focal length F and imager are managed in the product of each unit size of X-direction, fy indicates physics focal length F and the imaging of camera lens
In the product of each unit size in y-axis direction, the expression imager centers cx and the offset of optical axis in the X-axis direction, cy are indicated instrument
Due to imager imager center and the offset of optical axis in the Y-axis direction;R indicates rotation of the world coordinate system to camera coordinates system
Matrix, T indicate the world coordinate system to the translation vector of the camera coordinates system.
8. the measurement method of package volume according to claim 7, which is characterized in that the step S420 is according to the angle
Pixel coordinate of the point in pixel coordinate system obtains the world coordinates tool of the angle point in conjunction with the spin matrix and translation vector
Body includes step:
S421 reads the pixel coordinate of angle point of the angle point in the pixel coordinate system of video camera;
S422 is current by the pixel coordinate of the angle point, the internal reference matrix of the camera obtained in advance and the camera
The spin matrix and translation vector of visual field substitute into the formula (4) and obtain the world coordinates of the angle point;Wherein, (u, v, 1)
Indicate the homogeneous coordinates of the pixel coordinate of the angle point, (Xw, Yw, Zw) is the world coordinates of the angle point, (Xw, Yw, Zw, 1)
Indicate the homogeneous coordinates of the world coordinates of the angle point;
The length, width and height that the step S430 calculates the package to be measured according to the world coordinates of the angle point specifically include step:
S431 reads the corresponding world coordinates of any four angle point;Any one angle point is the first angle point in four angle points,
And the straight line that remaining three angle points connect generation two-by-two with first angle point respectively is respectively parallel to the world coordinate system
XYZ axis;
S432 by the corresponding world coordinates of first angle point and the corresponding world coordinates of the second angle point substitute into 2 points of coordinate away from
From formula, the length for obtaining the package to be measured is calculated;It is flat that second angle point connect the straight line generated with first angle point
Row is in the X-axis of the world coordinate system;
S433 by the corresponding world coordinates of first angle point and the corresponding world coordinates of third angle point substitute into 2 points of coordinate away from
From formula, the width for obtaining the package to be measured is calculated;It is flat that second angle point connect the straight line generated with first angle point
Row is in the Y-axis of the world coordinate system;
S434 is by the corresponding world coordinates of fourth angle point and the pixel coordinate of angle point, in conjunction with the camera obtained in advance
The spin matrix and translation vector of internal reference matrix, the camera current field are substituted into and are waited for described in the formula (4) calculating acquisition
Survey the height of package;The fourth angle point connect the straight line parallel generated with first angle point in the Z of the world coordinate system
Axis.
9. a kind of measuring system of package volume, which is characterized in that be applied to measure the package to be measured equipped with plane mark object
Volume, the measuring system for wrapping up volume include:
Image collection module acquires target image by the camera of mobile terminal;The target image includes the plane mark
Know two sides of the upper surface and the to be measured package adjacent with upper surface of object, package to be measured equipped with the plane mark object
Surface;
Picture recognition module carries out image procossing, to described to the target image that described image acquisition module obtains
The plane mark object is identified in target image;
Image processing module carries out Image Edge-Detection to the target image that described image acquisition module obtains, thus
The angle point of the package to be measured is identified in the target image;
Cubing module, the plane mark object identified according to described image identification module, the camera obtained in advance
Internal reference matrix and the angle point, the world coordinates of the angle point is calculated, to according to the world coordinates of the angle point obtain institute
State the volume of package to be measured.
10. the measuring system of package volume according to claim 9, which is characterized in that further include:
Demarcating module demarcates the camera, obtains the internal reference matrix of the camera.
11. the measuring system of package volume according to claim 9, which is characterized in that described image identification module includes:
Binary segmentation submodule carries out binary segmentation to the target image that the extraction module obtains;
Shape extracting sub-module extracts appearance profile from the binary image after segmentation;
Sub-module stored stores the common feature of the appearance profile corresponding to the plane mark object, the plane mark object mould
Plate;
Judge processing submodule, the appearance profile corresponding to the plane mark object stored in the sub-module stored
Common feature chooses the appearance profile work with the common feature from the appearance profile that the shape extracting sub-module is extracted
For alternative profile;
Front view acquisition submodule obtains the front view of the alternative profile;
Submodule is identified, when the plane mark object template that front view and the sub-module stored of the alternative profile prestore
When consistent, identify that the corresponding image of the alternative profile is the image of the plane mark object.
12. the measuring system of package volume according to claim 11, which is characterized in that the plane mark object is pros
The common feature of shape, the appearance profile corresponding to the plane mark object that the storage submodule stores is quadrangle;
The front view acquisition submodule includes:
Reading unit reads the pixel coordinate on four vertex of the alternative profile;
Definition unit, the pixel coordinate for defining four vertex of the alternative profile after projective transformation is front view are to prestore
The plane mark object front view four vertex pixel coordinate;
Computing unit, four that the pixel coordinate on four vertex that the reading unit is read and the definition unit are defined
The pixel coordinate on a vertex substitutes into following Projection Transformation On Plane formula (1) respectively, seeks projective transform matrix M:
Wherein, X is the homogeneous pixel coordinate on alternative profile vertex, and nonhomogeneous pixel coordinate is X ' is
The homogeneous coordinates on vertex after projective transformation, nonhomogeneous pixel coordinate are
Converter unit, the projective transform matrix M sought according to the computing unit are corresponding to the alternative profile
The all pixels of binary image are carried out projective transformation, obtain the corresponding front view in region that the alternative profile includes.
13. wrapping up the measuring system of volume according to claim 9-12 any one of them, which is characterized in that described image processing
Module includes:
Edge detection submodule carries out edge detection process to the target image that the extraction module obtains, obtains edge
Bianry image;
Straight line searches submodule, is searched corresponding to be measured from the edge binary images that the edge detection submodule obtains
Wrap up the edge line at edge;
It is straight to calculate arbitrary two edges in the edge line that the straight line lookup submodule is found for angle point acquisition submodule
The position of the intersection point of line composition, obtains the angle point of the package to be measured.
14. the measuring system of package volume according to claim 9, which is characterized in that the cubing module includes:
Outer ginseng matrix acquisition submodule, according to the plane mark object and the internal reference matrix of the camera obtained in advance, meter
Calculate the outer ginseng matrix of the camera current field;The outer ginseng matrix includes spin matrix and translation vector;
Angular coordinate acquisition submodule, according to pixel coordinate of the angle point in pixel coordinate system, in conjunction with the spin matrix
The world coordinates of the angle point is obtained with translation vector;
Length, width and height acquisition submodule calculates the length, width and height of the package to be measured according to the world coordinates of the angle point;
Volume acquisition submodule is wrapped up, the length, width and height are substituted into the volume that cubature formula calculates the acquisition package to be measured.
15. the measuring system of package volume according to claim 14, which is characterized in that the outer ginseng matrix obtains submodule
Block includes:
Coordinate system determining unit establishes world coordinate system using the midpoint of the plane mark object as origin;
Apex coordinate reading unit reads vertex pixel of each vertex of the plane mark object in pixel coordinate system and sits
The vertex world coordinates of mark and each vertex in world coordinate system;
Arithmetic element, will be in the vertex pixel coordinate, vertex world coordinates and the camera obtained in advance
Ginseng matrix substitutes into following formula (2) and formula (3) respectively, and the rotation of the camera current field is obtained in conjunction with formula (4)
Matrix and translation vector:
Wherein, (u, v, 1) indicates target point pixel coordinate in the pixel coordinate system of video camera described in the plane mark object
Homogeneous coordinates, (Xw, Yw, Zw, 1) indicates the homogeneous coordinates of target point world coordinates in the world coordinate system,
(Xc, Yc, Zc) indicates camera coordinates of the target point in the camera coordinates system of video camera;Fx indicates the object of camera lens
Focal length F and imager are managed in the product of each unit size of X-direction, fy indicates physics focal length F and the imaging of camera lens
In the product of each unit size in y-axis direction, the expression imager centers cx and the offset of optical axis in the X-axis direction, cy are indicated instrument
Due to imager imager center and the offset of optical axis in the Y-axis direction;R indicates rotation of the world coordinate system to camera coordinates system
Matrix, T indicate the world coordinate system to the translation vector of the camera coordinates system.
16. the measuring system of package volume according to claim 15, which is characterized in that the angular coordinate obtains submodule
Block includes:
Corner pixels coordinate acquiring unit reads pixel coordinate of the angle point in the pixel coordinate system of video camera;
Angle point world coordinates acquiring unit, by the pixel coordinate of the angle point, the internal reference matrix of the camera obtained in advance
And the spin matrix and translation vector of the camera current field substitute into the formula (4) and obtain the world of the angle point
Coordinate;Wherein, (u, v, 1) indicates the homogeneous coordinates of the pixel coordinate of the angle point, and (Xw, Yw, Zw) is the world of the angle point
Coordinate, (Xw, Yw, Zw, 1) indicate the homogeneous coordinates of the world coordinates of the angle point;
The length, width and height acquisition submodule includes:
Angle point world coordinates reading unit reads the corresponding world coordinates of any four angle point;It is any one in four angle points
A angle point is the first angle point, and the straight line that remaining three angle points connect generation two-by-two with first angle point respectively is respectively parallel to
The XYZ axis of the world coordinate system;
Length operation unit substitutes into the corresponding world coordinates of first angle point and the corresponding world coordinates of the second angle point
2 range formulas of coordinate calculate the length for obtaining the package to be measured;Second angle point connect life with first angle point
At straight line parallel in the X-axis of the world coordinate system;
Width arithmetic element substitutes into the corresponding world coordinates of first angle point and the corresponding world coordinates of third angle point
2 range formulas of coordinate calculate the width for obtaining the package to be measured;Second angle point connect life with first angle point
At straight line parallel in the Y-axis of the world coordinate system;
Height arithmetic element, by the corresponding world coordinates of fourth angle point and the pixel coordinate of angle point, in conjunction with the advance acquisition
The internal reference matrix of camera, the camera current field spin matrix and translation vector, substitute into the formula (4) calculating
Obtain the height of the package to be measured;The fourth angle point connect the straight line parallel generated with first angle point in the world
The Z axis of coordinate system.
17. a kind of storage medium, which is characterized in that the storage medium is stored with a plurality of instruction, and a plurality of instruction is by one
Or multiple processors execute, the step of measurement method to realize the package volume described in any one of claim 1-8.
18. a kind of mobile terminal, which is characterized in that including:
Processor realizes each instruction;
Storage medium stores a plurality of instruction;
Wherein:The processor executes the instruction of the storage medium storage, to realize claim 1-8 any one of them packets
The step of wrapping up in the measurement method of volume.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
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 |
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 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
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 |
---|---|
CN108627092A true CN108627092A (en) | 2018-10-09 |
Family
ID=63705264
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810344830.4A Pending CN108627092A (en) | 2018-04-17 | 2018-04-17 | A kind of measurement method, system, storage medium and the mobile terminal of package volume |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108627092A (en) |
WO (1) | WO2019200837A1 (en) |
Cited By (36)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109357637A (en) * | 2018-12-11 | 2019-02-19 | 长治学院 | A kind of veneer reeling machine roll bending radius of curvature and method for measuring thickness based on depth camera |
CN109448045A (en) * | 2018-10-23 | 2019-03-08 | 南京华捷艾米软件科技有限公司 | Plane polygon object measuring method and machine readable storage medium based on SLAM |
CN109663744A (en) * | 2018-12-28 | 2019-04-23 | 北海绩迅电子科技有限公司 | A kind of weighing and locating, sorting control method, weighing sorter of print cartridge |
CN109754381A (en) * | 2019-01-03 | 2019-05-14 | 广东小天才科技有限公司 | A kind of image processing method and system |
CN109767473A (en) * | 2018-12-30 | 2019-05-17 | 惠州华阳通用电子有限公司 | A kind of panorama parking apparatus scaling method and device |
CN109949331A (en) * | 2019-04-17 | 2019-06-28 | 合肥泰禾光电科技股份有限公司 | Container edge detection method and device |
CN110006343A (en) * | 2019-04-15 | 2019-07-12 | Oppo广东移动通信有限公司 | Measurement method, device and the terminal of object geometric parameter |
CN110174056A (en) * | 2019-06-18 | 2019-08-27 | 上海商米科技集团股份有限公司 | A kind of object volume measurement method, device and mobile terminal |
CN110349205A (en) * | 2019-07-22 | 2019-10-18 | 杭州光珀智能科技有限公司 | A kind of measurement method and device of object volume |
CN110363809A (en) * | 2019-07-11 | 2019-10-22 | 深圳前海微众银行股份有限公司 | Volume measuring method, device, terminal and storage medium |
CN110490886A (en) * | 2019-07-31 | 2019-11-22 | 武汉大学 | A kind of method for automatically correcting and system for certificate image under oblique viewing angle |
CN110673038A (en) * | 2019-09-29 | 2020-01-10 | 深圳大学 | Battery detection method, device and system |
CN110853080A (en) * | 2019-09-30 | 2020-02-28 | 广西慧云信息技术有限公司 | Method for measuring size of field fruit |
CN111126450A (en) * | 2019-11-29 | 2020-05-08 | 上海宇航系统工程研究所 | Modeling method and device of cuboid spacecraft based on nine-line configuration |
CN111197984A (en) * | 2020-01-15 | 2020-05-26 | 重庆邮电大学 | Vision-inertial motion estimation method based on environmental constraint |
CN111366075A (en) * | 2020-03-20 | 2020-07-03 | 北京国泰蓝盾科技有限公司 | High-precision online volume measurement system |
CN111504182A (en) * | 2020-04-10 | 2020-08-07 | 四川超影科技有限公司 | Object volume vision measurement method using two-dimensional code for auxiliary calibration |
CN111524180A (en) * | 2020-04-23 | 2020-08-11 | Oppo广东移动通信有限公司 | Object volume calculation method and device, electronic equipment and storage medium |
CN111667429A (en) * | 2020-06-06 | 2020-09-15 | 南京聚特机器人技术有限公司 | Target positioning and correcting method for inspection robot |
CN111696152A (en) * | 2020-06-12 | 2020-09-22 | 杭州海康机器人技术有限公司 | Method, device, computing equipment, system and storage medium for detecting package stacking |
WO2020192484A1 (en) * | 2019-03-26 | 2020-10-01 | 华为技术有限公司 | Object size measurement method and electronic device |
CN111814739A (en) * | 2020-07-27 | 2020-10-23 | 上海东普信息科技有限公司 | Method, device and equipment for detecting express package volume and storage medium |
CN111882259A (en) * | 2020-05-13 | 2020-11-03 | 无锡北斗星通信息科技有限公司 | Express arrival signal timing trigger platform |
CN111915666A (en) * | 2019-05-07 | 2020-11-10 | 顺丰科技有限公司 | Volume measurement method and device based on mobile terminal |
CN111914856A (en) * | 2020-08-11 | 2020-11-10 | 上海柏楚电子科技股份有限公司 | Layout method, device and system for excess sheet material, electronic equipment and storage medium |
TWI709725B (en) * | 2019-12-03 | 2020-11-11 | 阿丹電子企業股份有限公司 | Volume measuring apparatus and volume measuring method for boxes |
CN111981975A (en) * | 2019-05-22 | 2020-11-24 | 顺丰科技有限公司 | Object volume measuring method, device, measuring equipment and storage medium |
CN112132163A (en) * | 2020-09-21 | 2020-12-25 | 杭州睿琪软件有限公司 | Method, system and computer readable storage medium for identifying edges of objects |
CN112150533A (en) * | 2019-06-28 | 2020-12-29 | 顺丰科技有限公司 | Object volume calculation method, device, equipment and storage medium |
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 |
CN112991429A (en) * | 2019-12-13 | 2021-06-18 | 顺丰科技有限公司 | Box volume measuring method and device, computer equipment and storage medium |
CN113449532A (en) * | 2020-03-25 | 2021-09-28 | 杭州海康机器人技术有限公司 | Method, device, computing equipment, logistics system and storage medium for detecting packages |
CN113554667A (en) * | 2021-07-27 | 2021-10-26 | 上海海瞩智能科技有限公司 | Three-dimensional displacement detection method and device based on image recognition |
CN113923420A (en) * | 2021-11-18 | 2022-01-11 | 京东方科技集团股份有限公司 | Area adjustment method and device, camera and storage medium |
CN114103039A (en) * | 2020-08-27 | 2022-03-01 | 常州星宇车灯股份有限公司 | Method and device for selecting optimal die drawing direction of plastic part |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112254635B (en) * | 2020-09-23 | 2022-06-28 | 洛伦兹(北京)科技有限公司 | Volume measurement method, device and system |
Citations (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 |
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 |
CN106839975A (en) * | 2015-12-03 | 2017-06-13 | 杭州海康威视数字技术股份有限公司 | Volume measuring method and its system based on depth camera |
CN107194973A (en) * | 2017-05-18 | 2017-09-22 | 西北工业大学 | A kind of method that space camera demarcation is carried out based on pseudorandomcode sphere |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE10350861A1 (en) * | 2003-10-31 | 2005-06-02 | Steinbichler Optotechnik Gmbh | Method for calibrating a 3D measuring device |
CN103033132B (en) * | 2012-12-20 | 2016-05-18 | 中国科学院自动化研究所 | Plane survey method and device based on monocular vision |
CN103630074B (en) * | 2013-11-29 | 2016-09-21 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus of Measuring Object minimum package volume |
CN104778716B (en) * | 2015-05-05 | 2018-03-13 | 西安电子科技大学 | Lorry compartment volume measuring method based on single image |
CN106767399B (en) * | 2016-11-11 | 2018-11-09 | 大连理工大学 | The non-contact measurement method of logistics goods volume based on binocular stereo vision and dot laser ranging |
CN106524917B (en) * | 2016-12-09 | 2019-01-11 | 北京科技大学 | Object volume measurement method on a kind of conveyer belt |
CN107766855B (en) * | 2017-10-25 | 2021-09-07 | 南京阿凡达机器人科技有限公司 | Chessman positioning method and system based on machine vision, storage medium and robot |
-
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 (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 |
CN106839975A (en) * | 2015-12-03 | 2017-06-13 | 杭州海康威视数字技术股份有限公司 | 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 |
Cited By (53)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109448045A (en) * | 2018-10-23 | 2019-03-08 | 南京华捷艾米软件科技有限公司 | Plane polygon object measuring method and machine readable storage medium based on SLAM |
CN109357637A (en) * | 2018-12-11 | 2019-02-19 | 长治学院 | A kind of veneer reeling machine roll bending radius of curvature and method for measuring thickness based on depth camera |
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 |
CN109767473A (en) * | 2018-12-30 | 2019-05-17 | 惠州华阳通用电子有限公司 | A kind of panorama parking apparatus scaling method and device |
CN109754381A (en) * | 2019-01-03 | 2019-05-14 | 广东小天才科技有限公司 | A kind of image processing method and system |
WO2020192484A1 (en) * | 2019-03-26 | 2020-10-01 | 华为技术有限公司 | Object size measurement method and electronic device |
CN110006343A (en) * | 2019-04-15 | 2019-07-12 | Oppo广东移动通信有限公司 | Measurement method, device and the terminal of object geometric parameter |
CN109949331A (en) * | 2019-04-17 | 2019-06-28 | 合肥泰禾光电科技股份有限公司 | Container edge detection method and device |
CN111915666A (en) * | 2019-05-07 | 2020-11-10 | 顺丰科技有限公司 | Volume measurement method and device based on mobile terminal |
CN111981975A (en) * | 2019-05-22 | 2020-11-24 | 顺丰科技有限公司 | 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 |
CN110363809A (en) * | 2019-07-11 | 2019-10-22 | 深圳前海微众银行股份有限公司 | Volume measuring method, device, terminal and storage medium |
CN110349205B (en) * | 2019-07-22 | 2021-05-28 | 浙江光珀智能科技有限公司 | Method and device for measuring volume of object |
CN110349205A (en) * | 2019-07-22 | 2019-10-18 | 杭州光珀智能科技有限公司 | A kind of measurement method and device of object volume |
CN110490886B (en) * | 2019-07-31 | 2022-04-01 | 武汉大学 | Automatic correction method and system for certificate image under oblique viewing angle |
CN110490886A (en) * | 2019-07-31 | 2019-11-22 | 武汉大学 | A kind of method for automatically correcting and system for certificate image under oblique viewing angle |
CN110673038B (en) * | 2019-09-29 | 2021-12-07 | 深圳大学 | Battery detection method, device and system |
CN110673038A (en) * | 2019-09-29 | 2020-01-10 | 深圳大学 | 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 |
CN111126450A (en) * | 2019-11-29 | 2020-05-08 | 上海宇航系统工程研究所 | Modeling method and device of cuboid spacecraft based on nine-line configuration |
TWI709725B (en) * | 2019-12-03 | 2020-11-11 | 阿丹電子企業股份有限公司 | Volume measuring apparatus and volume measuring method for boxes |
CN112902836B (en) * | 2019-12-03 | 2022-08-02 | 阿丹电子企业股份有限公司 | Volume measuring device and volume measuring method for box body |
CN112902836A (en) * | 2019-12-03 | 2021-06-04 | 阿丹电子企业股份有限公司 | Volume measuring device and volume measuring method for box body |
CN112991429A (en) * | 2019-12-13 | 2021-06-18 | 顺丰科技有限公司 | Box volume measuring method and 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 |
CN111366075A (en) * | 2020-03-20 | 2020-07-03 | 北京国泰蓝盾科技有限公司 | 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 |
CN113449532A (en) * | 2020-03-25 | 2021-09-28 | 杭州海康机器人技术有限公司 | Method, device, computing equipment, logistics system and storage medium for detecting packages |
CN111504182A (en) * | 2020-04-10 | 2020-08-07 | 四川超影科技有限公司 | Object volume vision measurement method using two-dimensional code for auxiliary calibration |
CN111524180A (en) * | 2020-04-23 | 2020-08-11 | Oppo广东移动通信有限公司 | Object volume calculation method and device, electronic equipment and storage medium |
CN111882259A (en) * | 2020-05-13 | 2020-11-03 | 无锡北斗星通信息科技有限公司 | Express arrival signal timing trigger platform |
CN111667429A (en) * | 2020-06-06 | 2020-09-15 | 南京聚特机器人技术有限公司 | Target positioning and correcting method for inspection robot |
CN111696152A (en) * | 2020-06-12 | 2020-09-22 | 杭州海康机器人技术有限公司 | Method, device, computing equipment, system and storage medium for detecting package stacking |
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 |
CN111814739A (en) * | 2020-07-27 | 2020-10-23 | 上海东普信息科技有限公司 | Method, device and equipment for detecting express package volume and storage medium |
CN111914856A (en) * | 2020-08-11 | 2020-11-10 | 上海柏楚电子科技股份有限公司 | Layout method, device and system for excess sheet material, electronic equipment and storage medium |
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 |
CN112132163A (en) * | 2020-09-21 | 2020-12-25 | 杭州睿琪软件有限公司 | Method, system and computer readable storage medium for identifying edges of objects |
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 |
CN113554667A (en) * | 2021-07-27 | 2021-10-26 | 上海海瞩智能科技有限公司 | Three-dimensional displacement detection method and device based on image recognition |
CN113923420A (en) * | 2021-11-18 | 2022-01-11 | 京东方科技集团股份有限公司 | Area adjustment method and device, camera and storage medium |
CN113923420B (en) * | 2021-11-18 | 2024-05-28 | 京东方科技集团股份有限公司 | Region adjustment method and device, camera and storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2019200837A1 (en) | 2019-10-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108627092A (en) | A kind of measurement method, system, storage medium and the mobile terminal of package volume | |
CN110568447B (en) | Visual positioning method, device and computer readable medium | |
US11816829B1 (en) | Collaborative disparity decomposition | |
US7046840B2 (en) | 3-D reconstruction engine | |
CN110956660B (en) | Positioning method, robot, and computer storage medium | |
CN100380393C (en) | Precise location method of QR code image symbol region at complex background | |
CN109544599B (en) | Three-dimensional point cloud registration method based on camera pose estimation | |
CN107274483A (en) | A kind of object dimensional model building method | |
CN109559349A (en) | A kind of method and apparatus for calibration | |
JPH1196374A (en) | Three-dimensional modeling device, three-dimensional modeling method and medium recorded with three-dimensional modeling program | |
CN108267097A (en) | Three-dimensional reconstruction method and device based on binocular three-dimensional scanning system | |
JP2011129082A (en) | Three-dimensional object recognition device and three-dimensional object recognition method | |
CN106991378B (en) | Depth-based face orientation detection method and device and electronic device | |
US20130272600A1 (en) | Range image pixel matching method | |
CN111307039A (en) | Object length identification method and device, terminal equipment and storage medium | |
CN108921895A (en) | A kind of sensor relative pose estimation method | |
CA3233222A1 (en) | Method, apparatus and device for photogrammetry, and storage medium | |
CN105844701A (en) | Sequential-image three-dimensional modeling method | |
CN110378971A (en) | A kind of detection method and device of image alignment precision, equipment, storage medium | |
CN110009673A (en) | Depth information detection method, device and electronic equipment | |
CN109145929A (en) | One kind being based on SIFT scale space characteristics information extraction method | |
CN110047061B (en) | Multi-angle multi-background image fusion method, device and medium | |
CN111145246B (en) | Foot type scanning method and system | |
CN112446926A (en) | Method and device for calibrating relative position of laser radar and multi-eye fisheye camera | |
CN106023723A (en) | Educational toy set and convex mirror imaging correction method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181009 |
|
RJ01 | Rejection of invention patent application after publication |