CN109242777B - Method for synthesizing complete image of inner bore of gun barrel - Google Patents
Method for synthesizing complete image of inner bore of gun barrel Download PDFInfo
- Publication number
- CN109242777B CN109242777B CN201811079622.2A CN201811079622A CN109242777B CN 109242777 B CN109242777 B CN 109242777B CN 201811079622 A CN201811079622 A CN 201811079622A CN 109242777 B CN109242777 B CN 109242777B
- Authority
- CN
- China
- Prior art keywords
- image
- pixel
- pixels
- circle
- circular area
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 9
- 230000002194 synthesizing effect Effects 0.000 title claims abstract description 8
- 239000003814 drug Substances 0.000 claims abstract description 6
- 230000007547 defect Effects 0.000 abstract description 9
- 238000001514 detection method Methods 0.000 abstract description 8
- 238000011156 evaluation Methods 0.000 abstract description 2
- 230000003287 optical effect Effects 0.000 description 2
- 241000251468 Actinopterygii Species 0.000 description 1
- RYGMFSIKBFXOCR-UHFFFAOYSA-N Copper Chemical compound [Cu] RYGMFSIKBFXOCR-UHFFFAOYSA-N 0.000 description 1
- 238000002679 ablation Methods 0.000 description 1
- 238000005299 abrasion Methods 0.000 description 1
- 238000007792 addition Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 229910052802 copper Inorganic materials 0.000 description 1
- 239000010949 copper Substances 0.000 description 1
- 238000005260 corrosion Methods 0.000 description 1
- 230000007797 corrosion Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 210000003128 head Anatomy 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000012549 training Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4038—Image mosaicing, e.g. composing plane images from plane sub-images
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/04—Context-preserving transformations, e.g. by using an importance map
- G06T3/047—Fisheye or wide-angle transformations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- 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/187—Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Quality & Reliability (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a method for synthesizing a complete image of an inner bore of a gun barrel.A walking device carrying a camera walks forwards along a spiral rifling at a uniform speed, and obtains each frame of video picture while walking; converting a circular area image in each frame of the video image into a rectangular image by a fisheye image expansion algorithm; intercepting pixels of a row on the rectangular image, which correspond to the outer circle close to the circular area image, to form a strip image to be spliced; splicing the bar-shaped images to be spliced obtained from each frame of video image together to form a complete inner bore plan; and removing part of the medicine chamber image in the bore plane image to obtain a final bore plane image. The invention can be detected and judged by a plurality of people according to the panoramic image processed by the computer, thereby eliminating the defects of high detection labor intensity, easy fatigue of human eyes, low working efficiency and the like; the detection result is less influenced by subjective factors, the defects are easy to find and judge, objective evaluation on the defects is facilitated, and then quality of the body pipe is facilitated to judge.
Description
Technical Field
The invention relates to the field of image processing, in particular to a method for synthesizing a complete image of an inner bore of a gun barrel, which is suitable for detecting flaws (such as copper hanging, plastic hanging, ablation, corrosion, line-off falling, abrasion, cracks and the like) of the inner bore of the gun barrel.
Background
In China, the detection of the surface quality defects of the bore of the small-bore artillery depends on the naked eye qualitative observation of a traditional optical bore sight for a long time, the detection cannot be quantitative, the accuracy is poor, the efficiency is low, and the detection result is influenced by the experience of inspectors.
The method carries the fish glasses head to carry out progressive scanning on the gun barrel through the robot, and expands and splices the scanned images into a complete inner bore panoramic image, so that the images can be conveniently analyzed.
Disclosure of Invention
The invention aims to overcome the defects in the prior art and provide a method for synthesizing a complete image of an inner bore of a gun barrel.
In order to achieve the purpose, the invention adopts the following technical measures:
the method for synthesizing the complete image of the inner bore of the gun barrel comprises the following steps:
step 1: a walking device carrying a camera walks forwards along the spiral rifling at a uniform speed, and each frame of video picture is obtained while walking;
step 2: converting a circular area image in each frame of the video image into a rectangular image by a fisheye image expansion algorithm;
and step 3: intercepting pixels of a row on the rectangular image, which correspond to the outer circle close to the circular area image, to form a strip image to be spliced;
and 4, step 4: splicing the to-be-spliced bar-shaped images obtained from each frame of video image together to form a complete inner bore plan;
and 5: and removing part of the medicine chamber image in the bore plane view to obtain a final bore plane view.
The fisheye image unfolding algorithm in step 2 as described above includes the following steps:
2.1, creating a rectangular image, wherein the length pixel size of the rectangular image is equal to the perimeter pixel size of the excircle of the circular area image, the height pixel size of the rectangular image is equal to the set radius pixel size, and the set radius pixel size is smaller than the radius pixel size of the excircle of the circular area image;
and 2.2, expanding the pixels on the pixel pickup circle which is concentric with the circular area image and filling the pixels on the rectangular image into the rows corresponding to the radius pixel size of the pixel pickup circle in sequence.
Step 2.2 as described above comprises the following steps:
in the case that the radius pixels of the pixel pickup circle are equal to the radius pixels of the outer circle of the circular area image, the pixels on the pixel pickup circle are directly and sequentially filled into the rows corresponding to the radius pixels of the pixel pickup circle on the rectangular image,
and under the condition that the radius pixel of the pixel pickup circle is smaller than the radius pixel of the excircle of the circular area image, performing difference operation on the pixels on the pixel pickup circle and expanding to obtain difference value filling pixels, and sequentially filling the difference value filling pixels into the rows corresponding to the radius pixel of the pixel pickup circle on the rectangular image.
The developed orientations on the pixel pickup circle as described above are the same.
The invention has the following beneficial effects for the prior art:
the inner chamber condition is not directly observed by human eyes through an ocular lens, the camera carries out wide-view-field all-around shooting on the inner chamber, the result can be stored, and quantitative measurement is carried out;
1. the panoramic image processed by the computer can be detected and judged by a plurality of people, so that the defects of high detection labor intensity, easy fatigue of human eyes, low working efficiency and the like are overcome;
2. the detection result is less influenced by subjective factors, the defects are easy to find and judge, objective evaluation on the defects is facilitated, and then quality of the body pipe is facilitated to judge.
Drawings
FIG. 1 is a schematic view of the exterior of a gun barrel;
FIG. 2 is a plan view of the complete bore;
FIG. 3 is a circular area image of a video frame;
FIG. 4 is a rectangular image;
FIG. 5 is a stitched bar image;
fig. 6 is a plan view of the final bore.
In the figure: 1-artillery barrel; 2-muzzle; 3-a medicine chamber; 4-rifling development part; 5-the medicine chamber unfolding part; 6-circular area image.
Detailed description of the invention
The present invention will be further described in detail below with reference to examples in order to facilitate understanding and practice of the invention by those of ordinary skill in the art, and it should be understood that the examples described herein are for illustration and explanation only and are not intended to limit the invention.
The method for synthesizing the complete image of the inner bore of the gun barrel comprises the following steps:
step 1: a walking device carrying a camera walks forwards along the spiral rifling at a uniform speed, each frame of video picture is obtained while walking, and preferably, the optical center line of the camera is collinear with the axis of the gun barrel; the walking device which is used for walking forwards along the spiral rifling and is provided with a camera is the existing device.
And 2, step: and (3) converting the circular area image (figure 3) in the video picture into a rectangular image by a fisheye image expansion algorithm for each frame of the taken video picture. The center of the circle of the circular area image is the position of the center point of the muzzle, and the centering of the center of the circle of the circular area image can be realized by adjusting the position of the camera on the walking device.
And (3) describing a fish-eye image unfolding algorithm in the step 2:
2.1, creating a rectangular image, wherein the length pixel size of the rectangular image is equal to the perimeter pixel size of the excircle of the circular area image, the height pixel size of the rectangular image is equal to the set radius pixel size, and the set radius pixel size is smaller than the radius pixel size of the excircle of the circular area image;
and 2.2, expanding the pixels on the pixel pickup circle which is concentric with the circular area image and filling the pixels on the rectangular image into the rows corresponding to the radius pixel size of the pixel pickup circle in sequence. The pixel size of each row of the rectangular image is equal to the perimeter pixel size of the outer circle of the circular area image.
And under the condition that the radius pixels of the pixel pickup circle are equal to the radius pixels of the outer circle of the circular area image, directly and sequentially filling the pixels on the pixel pickup circle into the rows corresponding to the radius pixels of the pixel pickup circle on the rectangular image.
And under the condition that the radius pixel of the pixel pickup circle is smaller than the radius pixel of the excircle of the circular area image, performing difference operation on the pixels on the pixel pickup circle and expanding to obtain difference value filling pixels, and sequentially filling the difference value filling pixels into the rows corresponding to the radius pixel of the pixel pickup circle on the rectangular image.
The pixel spread points on the pixel pick-up circle are located on the same radius on the circular area image.
The spread orientation on the pixel pickup circle is the same, preferably the spread orientation is the 12-point direction of the pixel pickup circle, and the spread orientation is the direction from the center of the pixel pickup circle to the first pixel spread on the pixel pickup circle.
And step 3: intercepting pixels of a row on the rectangular image, which correspond to an excircle close to the circular region image, to form a to-be-spliced strip image, wherein the pixels can be found through a fish-eye algorithm: the image reduction degree is lower when the image is closer to the center of the circle, and the reduction degree is higher when the image is closer to the outer edge. Therefore, only pixels in the rectangular image corresponding to the outer circle of the image close to the circular area are taken for stitching. Ensuring a higher degree of reduction as much as possible. Preferably, a row of pixels on the rectangular image corresponding to the excircle of the circular area image is intercepted to form a to-be-spliced strip image.
And 4, step 4: splicing the to-be-spliced bar-shaped images obtained from the video pictures of each frame together to form a complete inner bore plan (figure 2).
If the bar images to be spliced corresponding to the adjacent frames are the same, combining the bar images to be spliced into one bar image to be spliced;
if pixels of a rectangular image corresponding to a row close to the excircle of the circular region image are intercepted by the spliced strip-shaped image, pixel rows of adjacent frames corresponding to the strip-shaped image to be spliced are removed and combined into a complete bore plan view
And 5: and removing part of the medicine chamber image in the bore plane image to obtain a final bore plane image.
Imaging of rifling in the bore plane view is basically a straight line, the parts of the cartridge chamber image are all non-straight lines, and the parts of the cartridge chamber image in the bore plane view are removed through straight line feature matching in a straight line detection mode;
and training a classifier model from a large number of samples of the existing final bore plan by supervised learning by using a machine learning framework.
And identifying various defects of the rifling through a neural network on the final bore plan. The specific embodiments described herein are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments, or alternatives may be employed, by those skilled in the art, without departing from the spirit or ambit of the invention as defined in the appended claims.
Claims (1)
1. The method for synthesizing the complete image of the inner bore of the gun barrel is characterized by comprising the following steps of:
step 1: a walking device carrying a camera walks forwards along the spiral rifling at a uniform speed, and each frame of video picture is obtained while walking;
and 2, step: converting a circular area image in each frame of the video image into a rectangular image through a fisheye image unfolding algorithm, wherein the position of the center of a circle of the circular area image is the position of the center point of the muzzle;
and 3, step 3: intercepting pixels of a row on the rectangular image, which correspond to the outer circle close to the circular area image, to form a strip image to be spliced;
and 4, step 4: splicing the bar-shaped images to be spliced obtained from each frame of video image together to form a complete inner bore plan;
if the bar images to be spliced corresponding to the adjacent frames are the same, combining the bar images to be spliced into one bar image to be spliced;
if pixels of a rectangular image corresponding to a row close to the excircle of the circular area image are intercepted by the spliced strip-shaped image, pixel rows of adjacent frames corresponding to the strip-shaped image to be spliced are removed and combined into a complete bore plan;
and 5: removing partial image of the medicine chamber in the plan view of the bore to obtain the final plan view of the bore,
the fish-eye image unfolding algorithm in the step 2 comprises the following steps:
2.1, creating a rectangular image, wherein the length pixel size of the rectangular image is equal to the perimeter pixel size of the excircle of the circular area image, the height pixel size of the rectangular image is equal to the set radius pixel size, and the set radius pixel size is smaller than the radius pixel size of the excircle of the circular area image;
step 2.2, expanding the pixels on the pixel picking circle which is concentric with the circular area image and filling the pixels on the rectangular image into the rows corresponding to the radius pixel size of the pixel picking circle in sequence,
the step 2.2 comprises the following steps:
in the case that the radius pixels of the pixel pickup circle are equal to the radius pixels of the outer circle of the circular area image, the pixels on the pixel pickup circle are directly and sequentially filled into the rows corresponding to the radius pixels of the pixel pickup circle on the rectangular image,
under the condition that the radius pixel of the pixel picking circle is smaller than the radius pixel of the excircle of the circular area image, performing difference operation on the pixels on the pixel picking circle and expanding to obtain difference filling pixels, sequentially filling the difference filling pixels into a row corresponding to the radius pixel of the pixel picking circle on the rectangular image,
the spread directions on the pixel pick-up circle are the same.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811079622.2A CN109242777B (en) | 2018-09-17 | 2018-09-17 | Method for synthesizing complete image of inner bore of gun barrel |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811079622.2A CN109242777B (en) | 2018-09-17 | 2018-09-17 | Method for synthesizing complete image of inner bore of gun barrel |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109242777A CN109242777A (en) | 2019-01-18 |
CN109242777B true CN109242777B (en) | 2023-01-24 |
Family
ID=65059459
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811079622.2A Active CN109242777B (en) | 2018-09-17 | 2018-09-17 | Method for synthesizing complete image of inner bore of gun barrel |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109242777B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103247020A (en) * | 2012-02-03 | 2013-08-14 | 苏州科泽数字技术有限公司 | Fisheye image spread method based on radial characteristics |
CN103247024A (en) * | 2012-02-03 | 2013-08-14 | 苏州科泽数字技术有限公司 | 180-degree fisheye image spread method based on concentric algorithm and device |
CN105424724A (en) * | 2015-10-22 | 2016-03-23 | 汤一平 | Artillery inner bore defect detection device and method based on active panoramic vision |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6824059B2 (en) * | 2002-04-30 | 2004-11-30 | Hewlett-Packard Development Company, L.P. | Apparatus for capturing images and barcodes |
US8280113B2 (en) * | 2009-02-25 | 2012-10-02 | Light Prescriptions Innovators, Llc | Passive electro-optical tracker |
EP2459956B1 (en) * | 2009-07-31 | 2014-12-24 | Raytheon Company | Deployable fairing and method for reducing aerodynamic drag on a gun-launched artillery shell |
US10043263B1 (en) * | 2011-07-05 | 2018-08-07 | Bernard Fryshman | Mobile system for explosive device detection and instant active response |
US9234728B2 (en) * | 2013-11-08 | 2016-01-12 | Lonestar Inventions, L.P. | Rocket or artillery launched smart reconnaissance pod |
CN108050948B (en) * | 2017-11-24 | 2019-12-24 | 华中科技大学 | Small-caliber gun rifling measuring instrument and measuring method |
-
2018
- 2018-09-17 CN CN201811079622.2A patent/CN109242777B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103247020A (en) * | 2012-02-03 | 2013-08-14 | 苏州科泽数字技术有限公司 | Fisheye image spread method based on radial characteristics |
CN103247024A (en) * | 2012-02-03 | 2013-08-14 | 苏州科泽数字技术有限公司 | 180-degree fisheye image spread method based on concentric algorithm and device |
CN105424724A (en) * | 2015-10-22 | 2016-03-23 | 汤一平 | Artillery inner bore defect detection device and method based on active panoramic vision |
Also Published As
Publication number | Publication date |
---|---|
CN109242777A (en) | 2019-01-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108918539B (en) | Apparent disease detection device and method for tunnel structure | |
CN107471218B (en) | Binocular vision-based hand-eye coordination method for double-arm robot | |
CN107064160B (en) | Textile surface flaw detection method and system based on significance detection | |
CN113358654B (en) | Image acquisition and analysis system | |
CN116879308A (en) | Industrial machine vision system image processing method | |
CN1664568A (en) | Fruit quality detection system based on image information fusion technology | |
WO2023197341A1 (en) | Defect detection method for panoramic image of drainage pipeline inner wall, and image acquisition robot | |
CN113160162B (en) | Hole recognition method and device applied to workpiece and hole processing equipment | |
CN112884811A (en) | Photoelectric detection tracking method and system for unmanned aerial vehicle cluster | |
CN114113129B (en) | Lens micro defect recognition and grabbing system and method | |
CN109242777B (en) | Method for synthesizing complete image of inner bore of gun barrel | |
CN108490002B (en) | Method for detecting quality of microstructure prism lens | |
CN110736750A (en) | wheat scab detection method based on multi-angle field high-definition imaging | |
JP2016206071A (en) | Inspection device and inspection method | |
CN109003228B (en) | Dark field microscopic large-view-field automatic stitching imaging method | |
CN113674175A (en) | Underwater robot image enhancement method for detecting damage of cross-sea bridge structure | |
CN117214172A (en) | Method and device for detecting defects of inner wall of long barrel cylinder and storage medium | |
CN107330877B (en) | Method and system for adjusting offset of optical fiber display area | |
CN114663299A (en) | Training method and device suitable for image defogging model of underground coal mine | |
CN115100102A (en) | Coated lens defect detection method, device and equipment and readable storage medium | |
CN112257514B (en) | Infrared vision intelligent detection shooting method for equipment fault inspection | |
CN110838107B (en) | Method and device for intelligently detecting defects of 3C transparent component by variable-angle optical video | |
CN113063792A (en) | Visual inspection equipment and method for surface defects of main journal and crank pin of crankshaft | |
CN113099174A (en) | Multi-view camera and crawler with same | |
CN107860933B (en) | Digital image-based automatic detection method and device for fiber content in textile |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |