CN104330066B - Irregular object volume measurement method based on Freeman chain code detection - Google Patents

Irregular object volume measurement method based on Freeman chain code detection Download PDF

Info

Publication number
CN104330066B
CN104330066B CN201410562457.1A CN201410562457A CN104330066B CN 104330066 B CN104330066 B CN 104330066B CN 201410562457 A CN201410562457 A CN 201410562457A CN 104330066 B CN104330066 B CN 104330066B
Authority
CN
China
Prior art keywords
pixel
view
volume
chain code
layer
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.)
Active
Application number
CN201410562457.1A
Other languages
Chinese (zh)
Other versions
CN104330066A (en
Inventor
党宏社
张娜
王黎
解琛
吕钊
高赛赛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shaanxi University of Science and Technology
Original Assignee
Shaanxi University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shaanxi University of Science and Technology filed Critical Shaanxi University of Science and Technology
Priority to CN201410562457.1A priority Critical patent/CN104330066B/en
Publication of CN104330066A publication Critical patent/CN104330066A/en
Application granted granted Critical
Publication of CN104330066B publication Critical patent/CN104330066B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques

Abstract

The invention discloses an irregular object volume measurement method based on Freeman chain code detection. A system is calibrated so as to acquire a pixel equivalent of the system; three CCD cameras are used for respectively acquiring original images of a to-be-measured object in an over-looking direction, a left-looking direction and a right-looking direction, and maximal peripheral length image coordinate parameters of the to-be-measured object are acquired via the over-looking image; based on the over-looking maximal length pixel number, measurement ranges corresponding to the left-looking image and the right-looking image are divided, a shape from shading method is used for calculating the height of each pixel point of the left-looking image and the right-looking image, a Freeman chain code is used for carrying out boundary detection on the left-looking image and the right-looking image respectively, coordinates of the boundary point are calculated, a Green formula is used for calculating the area surrounded by the boundary, the volume of the first layer is obtained through product between the area and the minimal height value, and the volume of the entire object is finally acquired according to the position of secondary small height value pixel points. The invention provides an accurate non-contact volume measurement method, the measurement speed can be quickened, and the production efficiency is improved.

Description

A kind of irregularly shaped object volume measuring method based on freeman Chain Code Detection
Technical field
The present invention relates to a kind of method realizing irregularly shaped object cubing using digital image processing techniques, especially relate to And a kind of irregularly shaped object volume measuring method based on freeman Chain Code Detection.
Background technology
In the industrial production, some irregularly shaped objects are had to need to measure its volume, such as the on-line checking of industrial raw materials.With The development of e measurement technology, the measuring environment of irregularly shaped object is complicated and changeable, and its method is also constantly reformed.
Traditional irregularly shaped object volume measuring method is artificial its geometry of use tape measure although simple, easily OK, but object of observation need to be arranged, manual site measure poor in timeliness, precision not high it is difficult to realize non-contact measurement. And being based on computer vision measurement is, by binocular or multi-vision visual, irregularly shaped object is carried out with three-dimensionalreconstruction, then calculate reconstruct The volume of object.Binocular or multi-vision visual measurement are the image informations obtaining object from different perspectives, between multiple image to be found The characteristic point of coupling, Feature Points Matching is difficult point in image procossing it is also desirable to accurately fix relative between multiple cameras Position, also ensures that multiple cameras, in the synchronicity shooting and stability, control are difficult to, enter hence with multiple image Row volume calculates complex operation, computationally intensive, the problems such as be not suitable for dynamic scene.
Content of the invention
In order to overcome the shortcoming of above-mentioned prior art, it is an object of the invention to provide a kind of examined based on freeman chain code The irregularly shaped object volume measuring method surveyed, the height value of the pixel obtaining first with shape from shading, Ran Houyong Freeman Chain Code Detection obtains the coordinate figure on border, calculates, by coordinate figure, the area that boundary profile is surrounded, for realizing not The hard measurement of regular object volume, can accelerate measuring speed, improve production efficiency.
To achieve these goals, the technical solution used in the present invention is:
A kind of irregularly shaped object volume measuring method based on freeman Chain Code Detection, comprises the steps:
First, system is demarcated, obtain the pixel equivalent of system;
Secondly, object under test vertical view, left view, the right original graph regarding three directions are obtained respectively using three ccd photographic head Picture, and the maximum peripheral lengths image coordinate parameter of object under test is obtained by top view;
Then, using overlooking the measurement range that greatest length pixel count is corresponding to the view of foundation segmentation left and right, use light and shade Recover each pixel height that shape method calculates left and right view, with freeman chain code, border detection carried out respectively to left and right view, Calculate the coordinate of boundary point, calculate the area that surrounded of border using green formula, by area and each pixel highly in The product of minima obtain the volume of ground floor;
If each pixel highly in sub-minimum pixel in borderline region, with arbitrarily non-sub-minimum as starting point, pass through Freeman chain code traversal stops until traversing sub-minimum, then calculates the area of this layer that sub-minimum is located, and this area is taken advantage of With each pixel highly in the difference of sub-minimum and minima be the volume of the second layer;
If each pixel highly in sub-minimum pixel in borderline region, with the area of last layer deduct less than time The number of pixels of little value is multiplied by pixel equivalent value, obtains the area of current layer, thus calculating volume, by that analogy, obtains whole The volume of object.
Using Da-Jin algorithm Threshold segmentation, binary conversion treatment is carried out to top view, obtain the upper and lower vertex position of top view, take two Person's cross central line, is according to the measurement range corresponding to the view of segmentation left and right to overlook greatest length pixel count.
Calculate each pixel height ω of left view with shape from shading methodl={ h11,h12,…,h1k, right view each Pixel height ωr={ h21,h22,…,h2s, if number of plies p of left viewlNumber of plies p with right viewrInitial value be 1, algorithm ω in cyclic processl'=ωl-minωl, ωr'=ωr-minωr, ω in each cyclic processl', ωr' be deduct all The set of the pixel being computed, can look for every time each pixel highly in minima calculating this height value institute In the area of layer, ωl', ωr' remove all pixels calculating, indexed set λpl=1,2 ..., and k }-λql, λpr=1,2 ..., and s }-λqr, wherein, each picture that h expression shape from shading recovers The height value of vegetarian refreshments, k and s represents the number of all non-zero pixels values in the view of left and right respectively.
Obtain left view boundary coordinate (x with view border about freeman Chain Code Detectionli,ylj) and right view border seat Mark (xri,yrj), it is calculated, with green formula, the area that left view boundary point is surroundedSurrounded with right view boundary point AreaIf the minimum constructive height point of current layer is boundary point, Wherein nl is the number of left view boundary point, and nr is the number of right view boundary point;If each pixel highly in minimum point For the point in borderline region, thenml For in left view be less than this layer of each pixel highly in minima number of pixels, mr be right view in be less than this layer of each pixel The number of pixels of the minima in putting highly, e is pixel equivalent, i.e. actual size representated by unit pixel, and e=l/m, l are The geometric parameter of object under test, m is the pixel count representing its parameter.
Each layer of volume of left viewEach layer of volume of right view WithRepresent indexed set λ respectivelyplAnd λprThe height of corresponding pixel Degree,WithHeight value corresponding to the view last layer indexed set of expression left and right respectively, pl '=pl+1, pr '=pr+1, The value of pl, pr often calculates one-accumulate one, when When calculate stop, Left side volume beRight side volume beFinally give object volume v=vl+vr.
Compared with prior art, the present invention calculates the coordinate of all boundary points according to starting point coordinate and chain code meter, so Calculate the area in closing of the frontier region afterwards with green theorem, finally calculate each pixel with light and shade restoration methods (sfs) Height, the volume of irregularly shaped object is obtained with height by area.
Test result indicate that, according to the present invention the body to irregularly shaped object can be realized based on freeman Chain Code Detection Long-pending measurement, is one kind accurately contactless volume measuring method.Need in tomoscan multiple image is carried out at data Reason, this invention avoids the process of mass data;Calculating volume using Integral Thought is equally spaced to carry out volume to each layer Calculate, this invention when being spaced larger for height value improves calculating speed.If applying the present invention to field of industrial production, can With preferably solves the problems, such as industrial initial material volume cannot accurately, quick, non-cpntact measurement, reduce artificial operation, rush Enter industrial development, there is the very big market competitiveness.
Brief description
Fig. 1 is left view volume measuring method process chart of the present invention.
Specific embodiment
Describe embodiments of the present invention with reference to the accompanying drawings and examples in detail.
, using stone as measurand, as shown in Figure 1, right view is in the same manner, specifically real for left view handling process for the present invention Apply step as follows:
Step1, measured with object known to a geometric parameter l, obtain the pixel count m representing its parameter, then Obtain pixel equivalent e=l/m, the as actual size representated by unit pixel.
Step2, the top view by ccd photographic head acquisition determinand and left and right two width side view.
Step3, using Da-Jin algorithm Threshold segmentation, binary conversion treatment is carried out to top view.
Step4, obtain the upper and lower vertex position of top view, take both cross central lines, to overlook greatest length pixel count be According to the measurement range corresponding to the view of segmentation left and right.
Step5, according to shape from shading method, calculate the height ω of each pixel in the view of left and rightl={ h11, h12,…,h1k, ωr={ h21,h22,…,h2s, if the number of plies initial value of left and right view is pl=pr=1, algorithm cyclic process Middle ωll-minωl, ωrr-minωr, indexed set λpl= {1,2,…,k}-λql, λpr=1,2 ..., and s }-λ qr
Step6, obtain boundary coordinate (x with view border about freeman Chain Code Detectionli,ylj), (xri,yrj).
Step7, it is calculated the area that left and right view boundary point is surrounded with green formula, if the minimum constructive height of this layer Point is boundary point, thenNl, nr are the number of left and right boundary point; If each pixel highly in minimum point be borderline region in point, now, Ml, mr be less than this layer of each pixel highly in minima number of pixels.
Step8, each layer of volume of left and right view are respectively Pl=pl+1, pr=pr+1.
Step9, whenWhen calculate stop.Left side volume beRight side volume be
Step10, the volume of output object are v=vl+vr.

Claims (5)

1. a kind of irregularly shaped object volume measuring method based on freeman Chain Code Detection is it is characterised in that include following walking Rapid:
First, system is demarcated, obtain the pixel equivalent of system;
Secondly, object under test vertical view, left view, the right original image regarding three directions are obtained respectively using three ccd photographic head, and Obtain the maximum peripheral lengths image coordinate parameter of object under test by top view;
Then, using overlooking the measurement range that greatest length pixel count is corresponding to the view of foundation segmentation left and right, recovered with light and shade Shape method calculates each pixel height of left and right view, carries out border detection with freeman chain code respectively to left and right view, calculates Go out the coordinate of boundary point, calculate the area that surrounded of border using green formula, by area and each pixel highly in The product of little value obtains the volume of ground floor;
If each pixel highly in sub-minimum pixel in borderline region, with arbitrarily non-sub-minimum as starting point, pass through Freeman chain code traversal stops until traversing sub-minimum, then calculates the area of this layer that sub-minimum is located, and this area is taken advantage of With each pixel highly in the difference of sub-minimum and minima be the volume of the second layer;
If each pixel highly in sub-minimum pixel in borderline region, deducted less than sub-minimum with the area of last layer Number of pixels be multiplied by pixel equivalent value, obtaining the area of current layer, thus calculating volume, by that analogy, obtaining whole object Volume.
2. the irregularly shaped object volume measuring method based on freeman Chain Code Detection according to claim 1, its feature exists In binary conversion treatment being carried out to top view using Da-Jin algorithm Threshold segmentation, obtains the upper and lower vertex position of top view, take both horizontal Centrage, is according to the measurement range corresponding to the view of segmentation left and right to overlook greatest length pixel count.
3. the irregularly shaped object volume measuring method based on freeman Chain Code Detection according to claim 1, its feature exists In with each pixel height ω of shape from shading method calculating left viewl={ h11,h12,…,h1k, each pixel of right view Point height ωr={ h21,h22,…,h2s, if number of plies p of left viewlNumber of plies p with right viewrInitial value be 1, algorithm follows ω during ringl'=ωl-minωl, ωr'=ωr-minωr, ω in each cyclic processl', ωr' be deduct all The set of the pixel being computed, can look for every time each pixel highly in minima calculating this height value institute In the area of layer, ωl', ωr' remove all pixels calculating, indexed set λpl=1,2 ..., and k }-λql, λpr=1,2 ..., and s }-λqr, wherein, h expression light and shade is recovered The height value of each pixel that method is recovered, k and s represents the number of all non-zero pixels values in the view of left and right respectively.
4. the irregularly shaped object volume measuring method based on freeman Chain Code Detection according to claim 3, its feature exists In obtaining left view boundary coordinate (x with view border about freeman Chain Code Detectionli,ylj) and right view boundary coordinate (xri,yrj), it is calculated, with green formula, the area that left view boundary point is surroundedSurrounded with right view boundary point AreaIf the minimum constructive height point of current layer is boundary point, Wherein nl is the number of left view boundary point, and nr is the number of right view boundary point;If each pixel highly in minimum point For the point in borderline region, then Ml be left view in less than this layer of each pixel highly in minima number of pixels, mr be right view in be less than each picture of this layer Vegetarian refreshments highly in minima number of pixels, ε be pixel equivalent, i.e. actual size representated by unit pixel, ε=l/m, l For the geometric parameter of object under test, m is the pixel count representing its parameter.
5. the irregularly shaped object volume measuring method based on freeman Chain Code Detection according to claim 4, its feature exists In each layer of volume of left viewEach layer of volume of right view WithRepresent indexed set λ respectivelyplAnd λprThe height of corresponding pixel Degree,WithHeight value corresponding to the view last layer indexed set of expression left and right respectively, pl '=pl+1, pr '=pr+1, The value of pl, pr often calculates one-accumulate one, whenWhen calculate stop Only, left side volume isRight side volume beFinally give object volume v=vl+vr.
CN201410562457.1A 2014-10-21 2014-10-21 Irregular object volume measurement method based on Freeman chain code detection Active CN104330066B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410562457.1A CN104330066B (en) 2014-10-21 2014-10-21 Irregular object volume measurement method based on Freeman chain code detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410562457.1A CN104330066B (en) 2014-10-21 2014-10-21 Irregular object volume measurement method based on Freeman chain code detection

Publications (2)

Publication Number Publication Date
CN104330066A CN104330066A (en) 2015-02-04
CN104330066B true CN104330066B (en) 2017-02-01

Family

ID=52404836

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410562457.1A Active CN104330066B (en) 2014-10-21 2014-10-21 Irregular object volume measurement method based on Freeman chain code detection

Country Status (1)

Country Link
CN (1) CN104330066B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105944976A (en) * 2016-05-16 2016-09-21 陕西科技大学 Method and device for sorting massive gangue by using digital image processing technology
CN107958205B (en) * 2017-10-31 2021-11-16 贵州景浩科技有限公司 Shooting training intelligent management system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103278090A (en) * 2013-05-14 2013-09-04 陕西科技大学 Visual measurement method for volume of irregular object
CN103824224A (en) * 2014-02-26 2014-05-28 陕西科技大学 Fruit size grading method based on shape from shading

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100422370B1 (en) * 2000-12-27 2004-03-18 한국전자통신연구원 An Apparatus and Method to Measuring Dimensions of 3D Object on a Moving Conveyor
US6836562B2 (en) * 2001-04-09 2004-12-28 Mitsubishi Electric Research Laboratories, Inc. Method for determining the shape of objects directly from range images

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103278090A (en) * 2013-05-14 2013-09-04 陕西科技大学 Visual measurement method for volume of irregular object
CN103824224A (en) * 2014-02-26 2014-05-28 陕西科技大学 Fruit size grading method based on shape from shading

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种有效的基于Freeman链码的拐角检测法;张小莉等;《电子测量与仪器学报》;19990630;第13卷(第2期);第14-19页 *
基于freeman链码的图像中多个区域面积的计算方法;吴元敏;《计算机工程与应用》;20080731;第44卷(第15期);第199-201页 *

Also Published As

Publication number Publication date
CN104330066A (en) 2015-02-04

Similar Documents

Publication Publication Date Title
Alidoost et al. Comparison of UAS-based photogrammetry software for 3D point cloud generation: a survey over a historical site
CN103822581B (en) A kind of irregularly shaped object volume measuring method based on compressed sensing
CN103971409B (en) Measuring method for foot three-dimensional foot-type information and three-dimensional reconstruction model by means of RGB-D camera
CN104677305B (en) A kind of body surface three-dimensional method for reconstructing and system based on cross structure light
CN104501720B (en) Non-contact object size and range image measuring instrument
CN106969706A (en) Workpiece sensing and three-dimension measuring system and detection method based on binocular stereo vision
CN102032878B (en) Accurate on-line measurement method based on binocular stereo vision measurement system
CN106017325B (en) Improved non-contact optical measurement method for complex surface and irregular object volume
CN107945268A (en) A kind of high-precision three-dimensional method for reconstructing and system based on binary area-structure light
US20150022640A1 (en) Method and system for volume determination using a structure from motion algorithm
CN106225678A (en) Dynamic object based on 3D camera location and volume measuring method
CN102445165B (en) Stereo vision measurement method based on single-frame color coding grating
CN104408762A (en) Method for obtaining object image information and three-dimensional model by using monocular unit and two-dimensional platform
CN104075688A (en) Distance measurement method of binocular stereoscopic gazing monitoring system
CN103278090A (en) Visual measurement method for volume of irregular object
CN102982334B (en) The sparse disparities acquisition methods of based target edge feature and grey similarity
CN106981081A (en) A kind of degree of plainness for wall surface detection method based on extraction of depth information
CN108596975A (en) A kind of Stereo Matching Algorithm for weak texture region
CN105286871A (en) Video processing-based body height measurement method
CN105054936A (en) Height and weight rapid measuring method based on Kinect depth-of-field image
CN108665535A (en) A kind of three-dimensional structure method for reconstructing and system based on coding grating structured light
CN107796370B (en) Method and device for acquiring conversion parameters and mobile mapping system
CN103308000B (en) Based on the curve object measuring method of binocular vision
CN108805980A (en) A kind of horse body measurement system and data correcting method based on 3D
CN104330066B (en) Irregular object volume measurement method based on Freeman chain code detection

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant