CN115901804A - Method for visually detecting cable through multiple cameras - Google Patents

Method for visually detecting cable through multiple cameras Download PDF

Info

Publication number
CN115901804A
CN115901804A CN202310030146.XA CN202310030146A CN115901804A CN 115901804 A CN115901804 A CN 115901804A CN 202310030146 A CN202310030146 A CN 202310030146A CN 115901804 A CN115901804 A CN 115901804A
Authority
CN
China
Prior art keywords
cable
cameras
camera
size information
detected
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
Application number
CN202310030146.XA
Other languages
Chinese (zh)
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.)
Foshan Guangzhitong Electronic Technology Co ltd
Original Assignee
Foshan Guangzhitong Electronic Technology Co ltd
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 Foshan Guangzhitong Electronic Technology Co ltd filed Critical Foshan Guangzhitong Electronic Technology Co ltd
Priority to CN202310030146.XA priority Critical patent/CN115901804A/en
Publication of CN115901804A publication Critical patent/CN115901804A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention relates to the field of cable head preparation in power system construction, in particular to a method for visually detecting a cable by multiple cameras, which comprises the following steps: providing a plurality of cameras; selecting a detection target of the cable to be detected, wherein the detection target comprises surface scratches and size information of the cable to be detected; a shooting environment is built by combining a camera according to a detection target; capturing a target image of a detection target by using a camera; and acquiring the surface scratch and the size information of the cable to be detected through the target image. According to the invention, the size information and the surface scratches of the cable to be detected in the preparation of the cable head are subjected to machine vision detection through the plurality of cameras, so that a detailed scratch graphic diagram of the cable to be detected and accurate size information of the cable to be detected are obtained, a convenient and fast method with higher stability and accuracy is provided for the preparation construction link of the cable head, and meanwhile, the obtained size information has high precision and scratch detection rate, and a process data basis is provided for preparing the cable head with high quality.

Description

Method for visually detecting cable by multiple cameras
Technical Field
The invention relates to the field of preparation of cable heads in power system construction, in particular to a method for visually detecting cables by multiple cameras.
Background
In power system construction, the preparation of a cable head is an essential step. The preparation of the cable head is to strip out the required part in the complete cable, and then to grind and package the stripped cable part. In the manufacturing process of the high-quality cable head, the size of the stripped cable is required to be higher; meanwhile, in the process of packaging the sheath by the cable head, the appearance flaw of the cable is easy to cause flaw defect on the sheath of the cable in the sheath production line, and if the flaw cannot be directly detected and eliminated in production, the product quality of the cable is directly influenced, so that the appearance detection of the stripped cable is also an important step of quality control. However, in the current manufacturing process, for size detection, most of the size detection is finished by carrying out experience judgment on the size by experienced workers and combining simple tools matched by hands, so that great uncertainty is caused; meanwhile, in the prior art, the appearance of the cable is detected mainly by using a telecentric lens, constructing a structural light source aiming at the cable to be detected, projecting a specific coding pattern to the surface of an object by using a projector, acquiring surface texture by using a binocular imaging principle, and further extracting scratches by using the surface texture; or directly taking a picture, and checking the picture through human eyes and judging the scratch by combining hand touch and experience. In the prior art, there is no method for simultaneously acquiring the surface scratches and the size information of the cable to be detected through visual inspection in the cable head preparation process, so a method for visually inspecting the cable by using multiple cameras needs to acquire the surface scratches and the size information of the cable to be detected through visual inspection.
Disclosure of Invention
Aiming at the defects and deficiencies in the prior art and the requirements of practical engineering, the invention provides a method for visually detecting a cable by multiple cameras, which comprises the following steps: providing a plurality of cameras; selecting a detection target of a cable to be detected, wherein the detection target comprises surface scratches and size information of the cable to be detected; building a shooting environment by combining the camera according to the detection target; capturing a target image of the detection target by using the camera; and acquiring the surface scratch and the size information of the cable to be detected through the target image. According to the invention, the size information and the surface scratches of the cable to be detected in the preparation of the cable head are simultaneously subjected to machine vision detection through the plurality of cameras, and corresponding target image processing algorithms are selected respectively according to the size information and the surface scratches so as to obtain a detailed diagram of the scratches of the cable to be detected and accurate size information of the cable to be detected, so that a convenient and fast method with higher stability and accuracy is provided for the preparation and construction links of the cable head. The size information acquired by the method is high in precision and scratch detection rate, and a process data basis is provided for preparing a high-quality cable head.
Optionally, the method for constructing a shooting environment by combining the camera according to the detection target includes the following steps: when the detection target is a surface scratch, providing a plurality of flash lamps, and building a surface scratch shooting environment according to the surface scratch characteristics by combining the cameras and the flash lamps, wherein the plurality of flash lamps in the surface scratch shooting environment irradiate the cable to be detected at different angles, and the overall visual pictures of the plurality of cameras cover the whole surface of the cable to be detected; when the detection target is size information, a size information shooting environment is built by combining the cameras according to the size information characteristics, and the visual picture of each camera in the size information shooting environment comprises the same central and maximally displayed complete cable line image to be detected.
Optionally, when the detection target is a surface scratch, a surface scratch shooting environment is set up according to the surface scratch characteristic in combination with a camera, and the method comprises the following steps: providing a monochromatic background plate; setting a shooting background by using a monochromatic background plate; arranging a plurality of flash lamps around the camera, wherein the flash lamps respectively irradiate the whole surface of the cable to be tested which can be combined in the cable area to be tested; and adjusting the relative positions of the cameras according to the surface scratch characteristics, so that the overall visual pictures of the cameras cover the whole surface of the cable to be measured.
Optionally, when the detection target is size information, a size information shooting environment is established according to the size information characteristic and by combining a camera, including the following steps: providing a calibration tube of known diameter; taking the axis of the calibration pipe as a center, and adjusting the relative positions of the cameras to enable the cameras to be respectively aligned to the calibration pipe from different angles; distortion correction is carried out on each camera respectively to eliminate distortion errors of the cameras; using an image which is centered and maximally displays the complete calibration pipe as a reference image; adjusting shooting parameters of each camera so that a visual picture of the camera is consistent with the reference image to eliminate installation errors of the cameras; obtaining a proportionality coefficient of the camera according to the relative position of the calibration pipe and the camera, wherein the proportionality coefficient meets the following formula:
Figure 100002_DEST_PATH_IMAGE001
wherein s represents a scaling factor, p represents a diameter pixel width of the calibration pipe,
Figure 100002_DEST_PATH_IMAGE002
indicating the diameter of the calibration tube.
Optionally, the obtaining of the surface scratch of the cable to be tested through the target image includes the following steps: synthesizing a brightness-uniform planar graph by using a plurality of target images of the same area acquired in a surface scratch shooting environment; extracting a cable main body to be analyzed from the plan view, and cutting an area to be analyzed from the cable main body to be analyzed; carrying out gradient detection on the region to be analyzed by using a canny algorithm; extracting discontinuous edges in the region to be analyzed according to the gradient detection result to obtain a scratch map; fusing the scratch maps of a plurality of different irradiation areas to obtain an integral cable scratch map; through whole cable scratch picture acquires the surface scratch of the cable that awaits measuring.
Optionally, the obtaining the size information of the cable to be measured through the target image includes the following steps: building a target image relation model by using the cable diameter and the spatial position of the cable to be measured in the size information shooting environment; combining the target image by using the relational model to construct an overall observation error function of a plurality of cameras; obtaining the optimal estimated values of the cable diameter and the space position by solving the minimum value of the overall observation error function; and obtaining the cable length of the cable to be tested by using the optimal estimated value of the spatial position.
Optionally, the constructing a target image relationship model by using the cable diameter and the spatial position of the cable to be measured in the size information shooting environment includes the following steps: taking the section of a shooting environment for placing the size information of the calibration pipe as a reference surface; selecting any camera as a first camera; taking the axis of the calibration pipe as an origin, taking the center line of the visual field of the first camera as a longitudinal axis, and taking the direction vertical to the longitudinal axis as a transverse axis, and constructing a plane coordinate system in the reference plane; in the plane coordinate system, let the cable diameter be
Figure 100002_DEST_PATH_IMAGE003
Let the spatial position be
Figure 100002_DEST_PATH_IMAGE004
Wherein
Figure 100002_DEST_PATH_IMAGE005
Figure 100002_DEST_PATH_IMAGE006
coordinates relative to the origin in the planar coordinate system,
Figure 100002_DEST_PATH_IMAGE007
the distance of the first camera to the origin is represented; building a target image relation model through the cable diameter and the space position, wherein the relation model comprises the following formula:
Figure 100002_DEST_PATH_IMAGE008
wherein,
Figure 100002_DEST_PATH_IMAGE009
representing the pixel width of the estimated cable diameter,
Figure 100002_DEST_PATH_IMAGE010
indicating the estimated offset.
Optionally, the constructing an overall observation error function of the multiple cameras by using the relationship model and combining the target image includes the following steps: acquiring the actual cable diameter pixel width and the actual offset of the cable to be detected in the target image by using the target image acquired in the size information shooting environment; constructing a single observation error function by combining the actual cable diameter pixel width and the actual offset through the relation model; converting the spatial position into a spatial position when the view center lines of the other cameras are used as longitudinal axes according to the relative positions of the first camera and the other cameras; acquiring single observation error functions of the other cameras by using the space positions of the other cameras with the view center lines of the other cameras as longitudinal axes; and summarizing the single observation error functions of all the cameras to construct the overall observation error functions of the multiple cameras.
Optionally, the obtaining the optimal estimated values of the cable diameter and the spatial position by finding the minimum value of the overall observation error function includes the following steps: calculating the minimum value of the overall observation error function; taking the cable diameter and the space position corresponding to the minimum value as the optimal estimated values of the cable diameter and the space position, wherein the optimal estimated values of the cable diameter and the space position satisfy the following formula:
Figure 100002_DEST_PATH_IMAGE011
wherein D represents an optimal estimated value of the cable diameter,
Figure 100002_DEST_PATH_IMAGE012
an optimal estimate of the position in space is represented,
Figure 100002_DEST_PATH_IMAGE013
the overall observed error function is a function of,
Figure 100002_DEST_PATH_IMAGE014
represents the minimum value of the overall observation error function,
Figure 100002_DEST_PATH_IMAGE015
indicating the cable diameter and spatial position that minimizes the overall observation error function value shown.
Optionally, the obtaining the cable length of the cable to be tested by using the optimal estimation value of the spatial position includes the following steps: approximating the cable to be tested to be in a cylindrical shape; estimating the cable length of the cable to be detected through the proportional relation of the central points of the two ends of the cable to be detected, wherein the cable length meets the following formula:
Figure 100002_DEST_PATH_IMAGE016
wherein,
Figure 100002_DEST_PATH_IMAGE017
and
Figure 100002_DEST_PATH_IMAGE018
respectively representing the optimal estimated values of the spatial positions of the central points of the two ends of the cable to be measured,
Figure 100002_DEST_PATH_IMAGE019
representing the cable length, s the scaling factor,
Figure 100002_DEST_PATH_IMAGE020
indicating the length pixel width of the cable to be measured in the target image.
Drawings
FIG. 1 is a flow chart of a method for multi-camera visual inspection of cables in accordance with the present invention;
FIG. 2 is a schematic view of a cable to be tested according to the present invention;
FIG. 3 is a schematic structural diagram of a multi-camera cable vision inspection apparatus according to the present invention;
FIG. 4 is a flowchart of a method for obtaining surface scratches of a cable to be tested through a target image according to the present invention;
FIG. 5 is a schematic diagram of a scratch obtained by the Canny algorithm of the present invention;
FIG. 6 is a flowchart of a method for obtaining dimension information of a cable to be measured from a target image according to the present invention;
FIG. 7 is a first schematic diagram of a target image relationship model constructed according to the present invention;
FIG. 8 is a second schematic diagram of a target image relationship model constructed according to the present invention;
FIG. 9 is a schematic diagram of a target image of a cable under test placed at an incline according to the present invention.
Detailed Description
Specific embodiments of the present invention will be described in detail below, and it should be noted that the embodiments described herein are only for illustration and are not intended to limit the present invention. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, it will be apparent to one of ordinary skill in the art that: it is not necessary to employ these specific details to practice the present invention. In other instances, well-known circuits, software, or methods have not been described in detail so as not to obscure the present invention.
Throughout the specification, reference to "one embodiment," "an embodiment," "one example," or "an example" means: the particular features, structures, or characteristics described in connection with the embodiment or example are included in at least one embodiment of the invention. Thus, the appearances of the phrases "one embodiment," "an embodiment," "one example" or "an example" in various places throughout this specification are not necessarily all referring to the same embodiment or example. Furthermore, the particular features, structures, or characteristics may be combined in any suitable combination and/or sub-combination in one or more embodiments or examples. Further, those of ordinary skill in the art will appreciate that the illustrations provided herein are for illustrative purposes and are not necessarily drawn to scale.
Referring to fig. 1, in one embodiment, the present invention provides a method for visually inspecting cables by multiple cameras, comprising the following steps:
s1, providing a plurality of cameras.
In an alternative embodiment, step S1 provides 3 high definition cameras with pixels of 800 ten thousand. The definition of a subsequently acquired target image is guaranteed through the selection of the high-definition pixels, and data acquisition equipment with good performance is provided for the accuracy of the size information of the cable to be detected and the detectable rate of surface scratches. Specifically, the quantity of cameras needs to ensure that all the visual pictures gathered by the cameras can be combined into a complete curved surface of the cable to be detected, namely, the surfaces of the cables to be detected can all enter the visual detection pictures of the cameras through enough quantity of cameras and adjustment of relative positions among the cameras.
S2, selecting a detection target of the cable to be detected.
In the present invention, please refer to fig. 2, the present invention is directed to size information and surface scratches of an insulating layer at an end of a cable stripped for manufacturing a cable head, wherein the size information specifically includes a cable diameter and a cable length of the insulating layer. In fig. 2, jacket layers from left to right respectively represent a protective layer, a metal shield layer, a semiconductor layer, an insulating layer, and a core wire of a cable.
S3, building a shooting environment by combining the camera according to the detection target;
aiming at the two detection targets of the surface scratch and the size information in the step S2, the set up shooting environments can be the same shooting environment or different shooting environments. In this embodiment, the step S3 of building a shooting environment by combining the camera with the detection target includes the following steps: when the detection target is a surface scratch, providing a plurality of flash lamps, and building a surface scratch shooting environment according to the surface scratch characteristics by combining the cameras and the flash lamps, wherein the plurality of flash lamps in the surface scratch shooting environment irradiate the cable to be detected at different angles, and the overall visual pictures of the plurality of cameras cover the whole surface of the cable to be detected; when the detection target is size information, a size information shooting environment is built by combining the cameras according to the size information characteristics, and the visual picture of each camera in the size information shooting environment comprises the same central and maximally displayed complete cable line image to be detected.
In an optional embodiment, when the detection target is a surface scratch, a surface scratch shooting environment is set up according to the characteristics of the surface scratch and a camera, and the method includes the following steps: providing a monochrome background plate; setting a shooting background by using a monochromatic background plate; arranging a plurality of flash lamps around the camera, wherein the flash lamps respectively irradiate the whole surface of the cable to be tested which can be combined in the cable area to be tested; and adjusting the relative positions of the cameras according to the surface scratch characteristics, so that the overall visual pictures of the cameras cover the whole surface of the cable to be measured.
In yet another optional embodiment, when the detection target is size information, establishing a size information shooting environment according to size information characteristics and a camera, includes the following steps: providing a calibration tube of known diameter; taking the axis of the calibration pipe as a center, and adjusting the relative positions of the cameras to enable the cameras to be respectively aligned to the calibration pipe from different angles; distortion correction is carried out on each camera respectively to eliminate distortion errors of the cameras; using an image which is centered and maximally displays the complete calibration pipe as a reference image; adjusting shooting parameters of each camera so that a visual picture of the camera is consistent with the reference image to eliminate installation errors of the cameras; obtaining a proportionality coefficient of the camera according to the relative position of the calibration pipe and the camera, wherein the proportionality coefficient meets the following formula:
Figure 206341DEST_PATH_IMAGE001
wherein s represents a proportionality coefficientP denotes the diameter pixel width of the calibration pipe,
Figure 389061DEST_PATH_IMAGE002
indicating the diameter of the calibration tube.
In a specific embodiment, referring to fig. 3, the present invention further provides a multi-camera cable visual inspection apparatus, and the photographing environment in the multi-camera cable visual inspection apparatus provided by the present invention has characteristics of both the scratch detection photographing environment and the size information photographing environment. The device for visually detecting the cable by the aid of the multiple cameras comprises three cameras with 800 ten thousand pixels, the visual field center lines of every two adjacent cameras are 120 degrees, flash lamps 2 are arranged around each camera, the flash lamps 2 irradiate the surface of the cable to be detected at different angles, the areas, irradiated by the flash lamps 2, of the cable to be detected can be combined into the whole surface of the cable to be detected 5, a monochromatic background plate 3 and a light equalizing plate 4 are placed between every two cameras 1, the monochromatic background plate is a blue opaque background plate made of frosted materials, in actual engineering, the outer color of the cable to be detected 5 and the color of a winding adhesive tape are mainly yellow, red, black and other colors, therefore, the device selects the blue background plate by combining with actual engineering conditions, images of the cable to be detected 5 are more easily distinguished under the blue background, and feature extraction of subsequent images is facilitated. The cable 5 that awaits measuring is placed at the inside central authorities of this many cameras device, and three camera 1 is shot the cable that awaits measuring simultaneously, and flash light 2, monochromatic background board 3 and the cooperation of 4 all smooth boards simultaneously for a plurality of cameras can catch the clear target image in edge under a series of different illumination angles, and then usable these target images pass through technologies such as image fusion and acquire the even target image of illumination. Meanwhile, the target images under a plurality of shooting angles are obtained by a plurality of cameras, a data source of a total error function constructed by the target images and two variables of the cable diameter and the space position in the subsequent step is ensured, and the accuracy of the cable diameter and the space position estimated by the method is also ensured.
And S4, capturing a target image of the detection target by using the camera.
To in step S2 these two detection target of surface mar and size information, corresponding in step S3 has been set up surface mar and has shot environment and size information and shoot the environment, shoots the environment through surface mar and size information and shoots the environment and obtain corresponding target image respectively, is favorable to the follow-up basis the target image obtains the development of the surface mar of the cable that awaits measuring and size information work.
And S5, acquiring the surface scratch and the size information of the cable to be detected through the target image.
Referring to fig. 4, in an alternative embodiment, the step S5 of obtaining the surface scratch of the cable to be tested through the target image includes the following steps: and S51a, synthesizing a brightness-uniform plane graph by using a plurality of target images of the same area acquired under the surface scratch shooting environment. Because different flash lamps shine the cable angle of awaiting measuring different, consequently also inhomogeneous to the luminance of many target image ware in same irradiation region, consequently need synthesize the image of this irradiation region, in the target image of many different exposure promptly, the local contrast of analysis every image uses the better image of every image contrast, fuses into output image to promote the contrast, make the image more clear. Specifically, in the present embodiment, image synthesis is performed using the HDR synthesis method, and a planar view with uniform luminance is obtained. S52a, extracting a cable main body to be analyzed from the plan view, and cutting an area to be analyzed from the cable main body to be analyzed. In this embodiment, treat that the analysis area is the insulating layer, can utilize the chromaticity difference of insulating layer and other layers to carry out the image cutting, can promote whole functioning speed through reducing the analysis area, promote mar detection efficiency. S53a, carrying out gradient detection on the region to be analyzed by using a canny algorithm. The Canny algorithm is a method for searching image gray scale change, and the scratch of the cable is characterized by discontinuous color and brightness under specific illumination conditions due to uneven cable surface. The canny algorithm has obvious detection capability S54a on scratches with an analysis area in plane images acquired through different irradiation angles, and discontinuous edges in the area to be analyzed are extracted according to gradient detection results to obtain a scratch image. Referring to fig. 5, fig. 5 is a scratch pattern obtained by Canny algorithm, and the white area is the insulating layer, wherein the discontinuous lines on the insulating layer are the detected scratches. And S55a, fusing the scratch maps of the multiple different irradiation areas to obtain an overall cable scratch map. S56a, obtaining the surface scratch of the cable to be tested through the whole cable scratch graph. In the invention, the visual detection is rapidly carried out on the cable to be detected through the HDR synthesis method and the Canny algorithm from the step S51a to the step S56a, the scratch detection rate is high, and the stability is higher compared with the stability judged by manual experience.
Referring to fig. 6, in an optional embodiment, the step S5 of obtaining the size information of the cable to be tested through the target image includes the following steps: and S51b, building a target image relation model by using the cable diameter and the spatial position of the cable to be measured in the size information shooting environment. And S52b, combining the target image by using the relation model to construct an overall observation error function of a plurality of cameras. S53b, obtaining the optimal estimated value of the cable diameter and the space position by solving the minimum value of the overall observation error function. And S54b, obtaining the cable length of the cable to be measured by using the optimal estimated value of the spatial position.
Referring to fig. 3, 7 and 8, the step S51b of building a target image relationship model by using the cable diameter and the spatial position of the cable to be measured in the size information shooting environment includes the following steps: taking the section of a shooting environment for placing the size information of the calibration pipe as a reference surface; selecting any camera as a first camera; taking the axis of the calibration pipe as an origin
Figure DEST_PATH_IMAGE021
Constructing a plane coordinate system in the reference plane by taking the visual field central line of the first camera as a longitudinal axis and taking the direction vertical to the longitudinal axis as a transverse axis
Figure DEST_PATH_IMAGE022
(ii) a In the plane coordinate system
Figure 106481DEST_PATH_IMAGE022
Inner, the diameter of the cable is
Figure 32849DEST_PATH_IMAGE003
Let the spatial position be
Figure 237434DEST_PATH_IMAGE004
Wherein
Figure 325476DEST_PATH_IMAGE005
Figure 858088DEST_PATH_IMAGE006
coordinates relative to the origin in the planar coordinate system,
Figure 463513DEST_PATH_IMAGE007
the distance from the first camera to the origin is represented; building a target image relation model through the cable diameter and the space position, wherein the relation model comprises the following formula:
Figure 397971DEST_PATH_IMAGE008
wherein,
Figure 656914DEST_PATH_IMAGE009
representing the pixel width of the estimated cable diameter,
Figure 565571DEST_PATH_IMAGE010
indicating the estimated offset. As shown in fig. 7 and 8, in fig. 8, line a represents the center line of the target image, and line B represents the axial center line of the cable to be measured; estimating the width of the cable diameter pixel
Figure 568162DEST_PATH_IMAGE009
And estimate the offset
Figure 357126DEST_PATH_IMAGE010
Actual cable diameter pixel width that can correspond in the target image
Figure DEST_PATH_IMAGE023
And the actual offset
Figure DEST_PATH_IMAGE024
The step S52b of constructing an overall observation error function of the plurality of cameras by using the relationship model in combination with the target image includes the following steps: and acquiring the actual cable diameter pixel width and the actual offset of the cable to be measured in the target image by using the target image acquired in the size information shooting environment. And constructing a single observation error function by combining the actual cable diameter pixel width and the actual offset through the relation model, wherein the single observation error function meets the following formula:
Figure DEST_PATH_IMAGE025
wherein,
Figure 380446DEST_PATH_IMAGE009
representing the pixel width of the estimated cable diameter,
Figure 887651DEST_PATH_IMAGE010
indicating the amount of the estimated offset,
Figure 428353DEST_PATH_IMAGE023
representing the actual cable diameter pixel width,
Figure 337403DEST_PATH_IMAGE024
representing the actual offset. According to the relative position between the first camera and the rest cameras, the spatial position is converted into the spatial position when the view center lines of the rest cameras are used as longitudinal axes, and the spatial position corresponding to the ith camera meets the following formula:
Figure DEST_PATH_IMAGE026
wherein,
Figure DEST_PATH_IMAGE027
Figure DEST_PATH_IMAGE028
representing the spatial position corresponding to the first camera
Figure 767510DEST_PATH_IMAGE004
Figure DEST_PATH_IMAGE029
Figure DEST_PATH_IMAGE030
Indicates the total number of cameras,
Figure DEST_PATH_IMAGE031
the spatial position corresponding to the ith camera after coordinate transformation is shown,
Figure DEST_PATH_IMAGE032
represents a coordinate transformation matrix constructed by the relative position between the first camera and the ith camera,
Figure DEST_PATH_IMAGE033
is the included angle between the visual field central line of the first camera and the visual field central line of the ith camera. Acquiring single observation error functions of the other cameras by using the space positions of the other cameras with the view center lines of the other cameras as longitudinal axes; summarizing single observation error functions of all cameras, and constructing a total observation error function of a plurality of cameras, wherein the total observation error function meets the following formula:
Figure DEST_PATH_IMAGE034
wherein,
Figure 621065DEST_PATH_IMAGE029
Figure 231038DEST_PATH_IMAGE030
representing the total number of cameras.
The step S53b of obtaining the optimal estimated value of the cable diameter and the spatial position by calculating the minimum value of the total observation error function includes the following steps: calculating the minimum value of the overall observation error function; taking the cable diameter and the space position corresponding to the minimum value as the optimal estimated values of the cable diameter and the space position, wherein the optimal estimated values of the cable diameter and the space position satisfy the following formula:
Figure 869961DEST_PATH_IMAGE011
where D represents the optimal estimate of the cable diameter,
Figure 907187DEST_PATH_IMAGE012
an optimal estimate of the spatial position is represented,
Figure 388984DEST_PATH_IMAGE013
the overall observed error function is a function of,
Figure 160238DEST_PATH_IMAGE014
represents the minimum value of the overall observation error function,
Figure 778301DEST_PATH_IMAGE015
indicating the cable diameter and spatial position that minimizes the overall observation error function value shown. There are various methods for finding the minimum value of the overall error function mentioned in step S53b, and in this embodiment, the minimum value can be obtained by deriving the overall error function.
Referring to fig. 9, the step S54b of obtaining the cable length of the cable to be measured by using the optimal estimation value of the spatial position includes the following steps: approximating the cable to be tested to be in a cylindrical shape; estimating the cable length of the cable to be detected through the proportional relation of the central points of the two ends of the cable to be detected, wherein the cable length meets the following formula:
Figure 252008DEST_PATH_IMAGE016
wherein,
Figure 830888DEST_PATH_IMAGE017
and
Figure 517084DEST_PATH_IMAGE018
respectively representing the optimal estimated values of the spatial positions of the central points of the end surfaces (Pa and Pb) of the two ends of the cable to be measured in the target image,
Figure 255233DEST_PATH_IMAGE019
representing the cable length, s the scaling factor,
Figure 24475DEST_PATH_IMAGE020
representing the length pixel width of the cable under test in the target image.
According to the invention, the size information and the surface scratches of the cable to be detected in the preparation of the cable head are subjected to machine vision detection through the plurality of cameras, and corresponding image processing algorithms are selected respectively according to the size information and the surface scratches so as to obtain a detailed scratch diagram of the cable to be detected and accurate size information of the cable to be detected, so that a convenient and fast method with higher stability and accuracy is provided for the preparation construction link of the cable head. The size information acquired by the method is high in precision and scratch detection rate, and a process data basis is provided for preparing a high-quality cable head.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being covered by the appended claims and their equivalents.

Claims (10)

1. A method for visually inspecting cables by multiple cameras is characterized by comprising the following steps:
providing a plurality of cameras;
selecting a detection target of a cable to be detected, wherein the detection target comprises surface scratches and size information of the cable to be detected;
building a shooting environment by combining the camera according to the detection target;
capturing a target image of the detection target by using the camera;
and acquiring the surface scratch and the size information of the cable to be detected through the target image.
2. The method for visually inspecting cables by using multiple cameras according to claim 1, wherein the step of building a shooting environment by combining the cameras according to the inspection targets comprises the following steps:
when the detection target is a surface scratch, providing a plurality of flash lamps, and building a surface scratch shooting environment according to the surface scratch characteristics by combining the cameras and the flash lamps, wherein the plurality of flash lamps in the surface scratch shooting environment irradiate the cable to be detected at different angles, and the overall visual pictures of the plurality of cameras cover the whole surface of the cable to be detected;
when the detection target is size information, a size information shooting environment is built by combining the cameras according to the size information characteristics, and a visual picture of each camera in the size information shooting environment comprises the same centered and maximally displayed complete cable line image to be detected.
3. The method for visually detecting the cable by the aid of the multiple cameras as claimed in claim 2, wherein when the detection target is surface scratches, a surface scratch shooting environment is set up by combining the cameras according to the characteristics of the surface scratches, and the method comprises the following steps:
providing a monochromatic background plate;
setting a shooting background by using a monochromatic background plate;
arranging a plurality of flash lamps around the camera, wherein the areas of the cables to be detected, which are respectively irradiated by each flash lamp, can be combined into the whole surface of the cable to be detected;
and adjusting the relative positions of the cameras according to the surface scratch characteristics, so that the overall visual pictures of the cameras cover the whole surface of the cable to be measured.
4. The method for the multi-camera visual inspection of the cable according to claim 2, wherein when the inspection target is size information, a size information photographing environment is established according to the size information characteristic in combination with the cameras, comprising the steps of:
providing a calibration tube of known diameter;
taking the axis of the calibration pipe as a center, and adjusting the relative positions of the cameras to enable the cameras to be respectively aligned to the calibration pipe from different angles;
respectively carrying out distortion correction on each camera to eliminate the distortion error of the camera;
using an image which is centered and maximally displays the complete calibration pipe as a reference image;
adjusting shooting parameters of each camera so that a visual picture of the camera is consistent with the reference image to eliminate installation errors of the cameras;
obtaining a proportionality coefficient of the camera according to the relative position of the calibration pipe and the camera, wherein the proportionality coefficient meets the following formula:
Figure DEST_PATH_IMAGE001
wherein s represents a scaling factor, p represents a diameter pixel width of the calibration pipe,
Figure DEST_PATH_IMAGE002
indicating the diameter of the calibration pipe.
5. The method for the multi-camera visual inspection of the cable according to claim 3, wherein the surface scratches of the cable to be inspected are obtained through the target image, comprising the following steps:
synthesizing a brightness-uniform planar graph by using a plurality of target images of the same area acquired in a surface scratch shooting environment;
extracting a cable main body to be analyzed from the plan view, and cutting an area to be analyzed from the cable main body to be analyzed;
carrying out gradient detection on the region to be analyzed by using a canny algorithm;
extracting discontinuous edges in the region to be analyzed according to the gradient detection result to obtain a scratch map;
fusing a plurality of scratch patterns of different irradiation areas to obtain an integral cable scratch pattern;
through whole cable scratch picture acquires the surface scratch of the cable that awaits measuring.
6. The method for the multi-camera visual inspection of the cable according to claim 4, wherein the obtaining of the size information of the cable to be inspected through the target image comprises the following steps:
building a target image relation model by using the cable diameter and the spatial position of the cable to be detected in the size information shooting environment;
combining the target image by using the relational model to construct an overall observation error function of a plurality of cameras;
obtaining the optimal estimated values of the cable diameter and the space position by solving the minimum value of the overall observation error function;
and obtaining the cable length of the cable to be tested by using the optimal estimated value of the spatial position.
7. The method for visually detecting cables by using multiple cameras as claimed in claim 6, wherein the method for building a target image relation model by using the cable diameter and the spatial position of the cable to be detected in the size information shooting environment comprises the following steps:
taking the section of a shooting environment for placing the size information of the calibration pipe as a reference surface;
selecting any camera as a first camera;
taking the axis of the calibration pipe as an origin, taking the visual field center line of the first camera as a longitudinal axis, and taking the direction perpendicular to the longitudinal axis as a transverse axis, and constructing a plane coordinate system in the reference plane;
in the plane coordinate system, let the cable diameter be
Figure DEST_PATH_IMAGE003
Let the spatial position be
Figure DEST_PATH_IMAGE004
Wherein
Figure DEST_PATH_IMAGE005
Figure DEST_PATH_IMAGE006
coordinates relative to the origin in the planar coordinate system,
Figure DEST_PATH_IMAGE007
the distance of the first camera to the origin is represented;
building a target image relation model through the cable diameter and the space position, wherein the relation model comprises the following formula:
Figure DEST_PATH_IMAGE008
wherein,
Figure DEST_PATH_IMAGE009
representing the pixel width of the estimated cable diameter,
Figure DEST_PATH_IMAGE010
indicating the estimated offset.
8. The method for multi-camera visual inspection of cables as claimed in claim 7, wherein said constructing an overall observation error function for a plurality of cameras using said relational model in combination with said target image, comprises the steps of:
acquiring the actual cable diameter pixel width and the actual offset of the cable to be detected in the target image by using the target image acquired in the size information shooting environment;
constructing a single observation error function by combining the actual cable diameter pixel width and the actual offset through the relation model;
converting the spatial position into a spatial position when the view center lines of the other cameras are used as longitudinal axes according to the relative positions of the first camera and the other cameras;
acquiring single observation error functions of the other cameras by using the space positions of the other cameras with the view center lines of the other cameras as longitudinal axes;
and summarizing the single observation error functions of all the cameras to construct the overall observation error functions of the multiple cameras.
9. The method for multi-camera visual inspection of cables as claimed in claim 8, wherein said obtaining optimal estimated values of cable diameter and spatial position by minimizing said overall observation error function comprises the steps of:
calculating the minimum value of the overall observation error function;
taking the cable diameter and the space position corresponding to the minimum value as the optimal estimated values of the cable diameter and the space position, wherein the optimal estimated values of the cable diameter and the space position meet the following formula:
Figure DEST_PATH_IMAGE011
where D represents the optimal estimate of the cable diameter,
Figure DEST_PATH_IMAGE012
representing spatial positionsThe optimal estimate of the position of the device,
Figure DEST_PATH_IMAGE013
the overall observed error function is a function of,
Figure DEST_PATH_IMAGE014
represents the minimum value of the overall observation error function,
Figure DEST_PATH_IMAGE015
indicating the cable diameter and spatial position that minimizes the overall observation error function value shown.
10. The method for multi-camera visual inspection of cables as claimed in claim 9, wherein said obtaining the cable length of the cable under test using the optimal estimated value of the spatial position comprises the steps of:
approximating the cable to be tested to be in a cylindrical shape;
estimating the cable length of the cable to be detected through the proportional relation of the central points of the two ends of the cable to be detected, wherein the cable length meets the following formula:
Figure DEST_PATH_IMAGE016
wherein,
Figure DEST_PATH_IMAGE017
and
Figure DEST_PATH_IMAGE018
respectively representing the optimal estimated values of the space positions of the central points of the two ends of the cable to be tested,
Figure DEST_PATH_IMAGE019
representing the cable length, s the scaling factor,
Figure DEST_PATH_IMAGE020
is shown inAnd the length pixel width of the cable to be measured in the target image.
CN202310030146.XA 2023-01-10 2023-01-10 Method for visually detecting cable through multiple cameras Pending CN115901804A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310030146.XA CN115901804A (en) 2023-01-10 2023-01-10 Method for visually detecting cable through multiple cameras

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310030146.XA CN115901804A (en) 2023-01-10 2023-01-10 Method for visually detecting cable through multiple cameras

Publications (1)

Publication Number Publication Date
CN115901804A true CN115901804A (en) 2023-04-04

Family

ID=86486010

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310030146.XA Pending CN115901804A (en) 2023-01-10 2023-01-10 Method for visually detecting cable through multiple cameras

Country Status (1)

Country Link
CN (1) CN115901804A (en)

Similar Documents

Publication Publication Date Title
CN104713885B (en) A kind of structure light for pcb board on-line checking aids in binocular measuring method
US7272253B2 (en) Method for non-destructive inspection, apparatus thereof and digital camera system
CN103954213B (en) A kind of method of the measured drawing for analyzing part
US9292925B2 (en) Imaging system and control method thereof
CN106657983B (en) The parameter test method and device of panoramic camera
CN115810041B (en) Cable size detection method and system based on multi-camera vision
JP2012522997A (en) Surface shape measuring device, measuring device, and observation device
CN109862345B (en) Method and system for testing field angle
CN107133983A (en) Bundled round steel end face binocular vision system and space orientation and method of counting
CN110930382A (en) Point cloud splicing precision evaluation method and system based on calibration plate feature point extraction
CN112885289B (en) Display screen calibration method and device
CN114283203A (en) Calibration method and system of multi-camera system
CN109974618A (en) The overall calibration method of multisensor vision measurement system
JPH11211673A (en) Apparatus and method for evaluation of surface property
CN104697629B (en) Lighting environment measurement method based on image analysis
CN112396651B (en) Method for realizing equipment positioning through two-angle image
JP6402036B2 (en) Measuring method of area ratio
CN115901804A (en) Method for visually detecting cable through multiple cameras
CN113724194B (en) Engine endoscopic flame measurement system and image processing method
CN112767249B (en) Image unfolding and splicing method and system for surface defect detection of small pipe fitting
CN115326835A (en) Cylinder inner surface detection method, visualization method and detection system
JP2000009880A (en) Device and method for inspecting fuel assembly
CN108898585A (en) A kind of axial workpiece detection method and its device
CN113419909A (en) Display uniformity detection method and computer equipment
JP2004150908A (en) Nondestructive inspection method and system of the same

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