CN110796654A - Guide wire detection method, device, equipment, tyre crane and medium - Google Patents

Guide wire detection method, device, equipment, tyre crane and medium Download PDF

Info

Publication number
CN110796654A
CN110796654A CN201911051038.0A CN201911051038A CN110796654A CN 110796654 A CN110796654 A CN 110796654A CN 201911051038 A CN201911051038 A CN 201911051038A CN 110796654 A CN110796654 A CN 110796654A
Authority
CN
China
Prior art keywords
target image
guide line
image
original image
guideline
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
CN201911051038.0A
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.)
Shanghai International Port (group) Ltd By Share Ltd East China Container Terminal Branch
Beijing Aerospace Automatic Control Research Institute
Original Assignee
Shanghai International Port (group) Ltd By Share Ltd East China Container Terminal Branch
Beijing Aerospace Automatic Control Research Institute
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 Shanghai International Port (group) Ltd By Share Ltd East China Container Terminal Branch, Beijing Aerospace Automatic Control Research Institute filed Critical Shanghai International Port (group) Ltd By Share Ltd East China Container Terminal Branch
Priority to CN201911051038.0A priority Critical patent/CN110796654A/en
Publication of CN110796654A publication Critical patent/CN110796654A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/001Industrial image inspection using an image reference approach
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20032Median filtering

Abstract

The embodiment of the application discloses a guide line detection method, a guide line detection device, a guide line detection equipment, a tyre crane and a medium. The method comprises the following steps: collecting an original image containing a guide line when the tire crane runs; performing image segmentation on the original image to extract a target image containing the guideline; and performing linear fitting on each pixel point in the target image to obtain a fitted guide line. According to the technical scheme of the embodiment of the application, the automatic identification of the guide line in the tire crane form process is realized through machine vision, so that a basis is provided for automatic deviation correction in the tire crane running process.

Description

Guide wire detection method, device, equipment, tyre crane and medium
Technical Field
The embodiment of the application relates to the technical field of tyre cranes, in particular to a guide line detection method, a guide line detection device, a guide line detection equipment, a tyre crane and a medium.
Background
In the container lifting work, it is generally required that the tire crane travels in strict accordance with a predetermined guideline during traveling, for example, within two specified yellow traveling boundary lines.
In the prior art, a GPS differential positioning system, an infrared or photoelectric distance measuring device, and a photoelectric encoder error correction device are usually arranged to detect a position offset and an angle offset of a tire crane type process, and then perform offset correction on a running process of the tire crane according to the detected position offset and angle offset.
However, the prior art needs to additionally provide a large amount of hardware equipment, and the detection process of each hardware equipment is easily affected by the environment of the tire crane.
Disclosure of Invention
The application provides a guide line detection method, a device, equipment, a tire crane and a medium, which are used for automatically identifying a guide line according to the running process of the tire crane, thereby providing a basis for automatic deviation correction of the running process of the tire crane.
In a first aspect, an embodiment of the present application provides a guide line detection method, including:
collecting an original image containing a guide line when the tire crane runs;
performing image segmentation on the original image to extract a target image containing the guideline;
and performing linear fitting on each pixel point in the target image to obtain a fitted guide line.
In a second aspect, an embodiment of the present application further provides a guidewire detection device, including:
the original image acquisition module is used for acquiring an original image containing a guide line when the tire crane runs;
the target image extraction module is used for carrying out image segmentation on the original image so as to extract a target image containing the guide line;
and the guide line fitting module is used for performing linear fitting on each pixel point in the target image to obtain a fitted guide line.
In a third aspect, an embodiment of the present application further provides an electronic device, including:
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement a guideline detection method as provided in an embodiment of the first aspect.
In a fourth aspect, an embodiment of the present application further provides a tire crane, which includes a camera and the electronic device provided in the embodiment of the third aspect.
In a fifth aspect, this embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement a guideline detection method as provided in the embodiment of the first aspect.
According to the embodiment of the application, when the tire crane is in a form, an original image containing a guide line is collected; performing image segmentation on the original image to extract a target image containing guide lines; and performing linear fitting on each pixel point in the target image to obtain a fitted guide line. According to the technical scheme, the automatic identification of the guide line in the tire crane form process is realized through machine vision, so that a basis is provided for automatic deviation correction in the tire crane running process.
Drawings
Fig. 1 is a flowchart of a guideline detection method in one embodiment of the present application;
FIG. 2 is a flowchart of a guideline detection method in a second embodiment of the present application;
fig. 3 is a flowchart of a guideline detection method in a third embodiment of the present application;
fig. 4A is a block flow diagram of a guideline detection method in a fourth embodiment of the present application;
fig. 4B is a flowchart of a guideline detection method in a fourth embodiment of the present application;
fig. 4C is a schematic diagram of a target image before morphological processing is performed in the fourth embodiment of the present application;
fig. 4D is a schematic diagram of a target image after morphological processing in the fourth embodiment of the present application;
FIG. 4E is a schematic diagram of an original image acquired in the fourth embodiment of the present application;
FIG. 4F is a schematic diagram of a fitted guideline in the fourth embodiment of the present application;
fig. 5 is a structural view of a guide wire detecting device in a fifth embodiment of the present application;
fig. 6 is a block diagram of an electronic device in a sixth embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a guide line detection method in an embodiment of the present application, which is suitable for correcting a deviation of a tire crane during driving. The method is carried out by a guide line detection device, which is implemented by software and/or hardware and is specifically configured in an electronic device with certain data calculation capability, which can be integrated into a tire crane.
A guide line detection method as shown in fig. 1, comprising:
and S110, collecting an original image containing a guide line when the tire crane runs.
Optionally, during the running process of the tire crane, the camera arranged in the tire crane may be used to collect an original image of the guide line, and transmit the collected image to the electronic device, so as to perform subsequent processing on the electronic device. Or optionally, the camera built in the electronic device may be used to acquire an image of the guide line in the running process of the tire crane, so as to obtain an original image containing the guide line.
Wherein the guide line is a boundary line for guiding a travel path of the tire crane during the tire crane operation, and is usually coated on the ground. In order to improve the visibility of the guide wire, the guide wire is generally provided as a yellow guide band having a certain width.
For example, the running state of the tire crane can be detected in advance, and the acquisition of the original image can be completed when the tire crane runs. The running state of the tire crane is detected in advance and can be determined by acquiring the working state of an instrument panel of the tire crane, detecting the tire rotation condition of the tire crane and the like.
For example, the image acquisition control module can be triggered by a user, and after the image acquisition control module is triggered, the tire crane starts to run and simultaneously triggers the acquisition operation of the original image.
And S120, carrying out image segmentation on the original image so as to extract a target image containing the guide line.
Because the original image contains the guide line and the ground background image, in order to separate the image of the guide line from the ground background image, the embodiment of the application converts the original image into a binary image by using an image segmentation mode, thereby distinguishing the guide line from the ground background image and further extracting the target image containing the guide line.
Illustratively, the pixel value of each pixel point in the original image is compared with a set pixel threshold, the pixel value of the pixel point meeting the set pixel threshold is set to 255, and the pixel value of the pixel point not meeting the set pixel threshold is set to 0, so that the guideline in the original image is highlighted, and the effect of extracting the target image containing the guideline in the original image is achieved.
The set pixel threshold value can be determined empirically by a skilled person, or can be set by a number of experiments. Because the quality of the original image collected under different image collection environments is different, in order to enable the set pixel threshold to be adapted to different image collection environments, the determination of the set pixel threshold can be carried out through the pixel value of each pixel point in the original image.
S130, performing straight line fitting on each pixel point in the target image to obtain a fitted guide line.
Because the effective information contained in the target image is strongly associated with the guide line, the straight line can be directly fitted to each pixel point in the target image, and the fitted straight line is used as the detected guide line.
Illustratively, a pixel point with a pixel value of "255" in the target image may be formed into a highlight point set: { (x)1,y1),(x2,y2),…,(xn,yn) }; solving equations using partial least squares
Figure BDA0002255332750000051
Solving regression parameters a and b, and forming fitting equation according to the determined regression parameters
Figure BDA0002255332750000052
Fitting out a new set of points
Figure BDA0002255332750000053
And drawing a new point set on the original image, and fitting to form a guide line.
The fitted guide line may be used to determine a position deviation and an angle deviation between the tire crane and the actual guide line during the traveling of the tire crane, and correct the traveling tire crane based on the determined position deviation and angle deviation. Because the deviation rectifying process does not need to be provided with hardware equipment such as a GPS (global positioning system), infrared or photoelectric technology distance measuring equipment, a photoelectric encoder and the like, the deviation rectifying of the tire crane can be realized on the basis of no need of a large amount of hardware investment. In the application, the guide line is detected and identified in a machine vision mode, and reference is provided for deviation correction in the running process of the tire crane.
According to the embodiment of the application, when the tire crane is in a form, an original image containing a guide line is collected; performing image segmentation on the original image to extract a target image containing guide lines; and performing linear fitting on each pixel point in the target image to obtain a fitted guide line. According to the technical scheme, the automatic identification of the guide line in the tire crane form process is realized through machine vision, so that a basis is provided for automatic deviation correction in the tire crane running process.
Since the acquired original image of the guideline has a lot of noise information, such as environmental noise due to the influence of weather change, illumination condition, etc., mechanical noise due to a camera used for image acquisition, noise introduced by color degradation of the border line, etc., in order to improve the definition and accuracy of the extracted target image including the guideline, the original image may be subjected to image segmentation, and may be processed according to a third set mask, and the original image may be updated according to the processing result.
Illustratively, each pixel point in the original image may be used as a center, a third set mask is used to sort neighborhood pixels (generally odd number of pixels) of the mask according to the size of the pixel value, the sorted middle value is an output result, and the pixel points of the whole original image are traversed, thereby completing median filtering of the original image. The third setting mask can be set by a technician according to needs or empirical values, and can be determined through a large number of experiments. Illustratively, the original image may be median filtered using a circular mask. In general, the smaller the mask size, the less complex the computation. Exemplarily, a 3 × 3 circular mask may be employed as the third set mask.
Specifically, the original image is processed according to the following formula:
Figure BDA0002255332750000061
wherein f (x, y) is the original image, p (x, y) is the neighborhood space of the pixel point p (x, y) with respect to the third set mask, and m (x, y) is the updated original image.
It can be understood that when the median filtering is adopted for image preprocessing, the calculation complexity is low, noise signals such as salt-pepper noise, long-tail superposition noise and the like can be effectively filtered, and meanwhile, detailed information such as convenience can be well protected.
According to the embodiment of the application, the original image is processed according to the third set mask before the original image is subjected to image segmentation, and the original image is updated according to the processing result, so that noise information in the original image can be effectively filtered, edge details in the original image are retained, and a high-quality data source is provided for subsequent extraction of a target image, so that a foundation is laid for effective detection of a guide line, and the matching degree between the detected guide line and an actual guide line is improved.
Example two
Fig. 2 is a flowchart of a guideline detection method in the second embodiment of the present application, which is optimized and improved based on the technical solutions of the above embodiments.
Further, the operation "image segmentation is performed on the original image to extract a target image containing the guideline" refined "to determine a gray histogram of the original image; determining a segmentation threshold according to the statistical result of each gray value in the gray histogram; and performing image segmentation on the original image according to the segmentation threshold so as to extract a target image containing the guide line, so as to perfect an extraction mechanism of the target image.
A guide line detection method as shown in fig. 2, comprising:
s210, collecting an original image containing a guide line when the tire crane runs.
And S220, determining a gray level histogram of the original image.
And S230, determining a segmentation threshold according to the statistical result of each gray value in the gray histogram.
Exemplarily, the global gray mean and the global gray variance of the original image may be respectively determined according to the statistical result of each pixel point in the gray histogram; and determining the segmentation threshold according to the global gray mean and the global gray variance.
It can be understood that the gray histogram is a statistic of gray levels of pixel points in the original image, and therefore the global gray mean and the global gray variance of the original image can be determined according to different gray values and statistical results of different gray values.
Specifically, the following formula can be used to perform the global gray mean μ and the global gray variance σ2
Figure BDA0002255332750000081
Figure BDA0002255332750000082
Wherein HIST [ l ]]The gray value is a pixel point with a gray value of l, N (l) is the number of the pixel points with the gray value of l, w is the number of lines of the pixel points of the original image, and h is the number of columns of the pixel points of the original image; gminIs the minimum gray value; gmaxIs the maximum gray value.
Specifically, the segmentation threshold Th may be determined by the following formula:
Th=μ+k×σ;
where k is a constant other than 0. Where k can be set by the skilled person based on empirical values or determined by extensive and repeated experimentation. Illustratively, k takes any constant of 3-10.
It should be noted that, because there is a significant difference between the original images acquired under different image acquisition environments, the segmentation threshold is automatically determined by the gray value of each pixel point in the original image, so that the determined segmentation threshold can be adapted to the currently acquired original image and the image acquisition environment, and a guarantee is provided for accurate extraction of the subsequent target image.
And S240, carrying out image segmentation on the original image according to the segmentation threshold so as to extract a target image containing the guide line.
In this step, image segmentation is performed on the original image according to the segmentation threshold, a region of interest is determined, and a target image including a guide line is extracted. Specifically, for an original image containing two yellow guide lines, two yellow guide lines are extracted.
Specifically, the target image is extracted according to the following formula:
Figure BDA0002255332750000091
wherein, I1(x, y) is the target image, I0(x, y) is the original image, and Th is the segmentation threshold.
The original image is converted into a binarized target image in the above manner, so that the highlighted portion (pixel value of 255) in the target image corresponds to the guideline region, and the remaining portion corresponds to the ground background.
It is understood that, in order to reduce the amount of data operation in the subsequent straight line fitting, the ranges of x and y may be set to x e (r, w-r-1) and y e (r, h-r-1), respectively, and the data of the outermost r rows and r columns of the original image may be directly set to 0. Where r may be determined by the width of the guideline in the original image.
And S250, performing linear fitting on each pixel point in the target image to obtain a fitted guide line.
According to the method and the device, the target image extraction operation is refined into the gray level histogram of the determined original image, the segmentation threshold value is determined according to the statistical result of each gray level value in the gray level histogram, the original image is segmented according to the determined segmentation threshold value, so that the target image containing the guide line is extracted, when the image is segmented under different image acquisition conditions, the matching degree of the extracted target image and the actual guide line is ensured, and the matching degree between the guide line obtained by subsequent fitting and the actual guide line is improved.
EXAMPLE III
Fig. 3 is a flowchart of a guideline detection method in a third embodiment of the present application, and the present application performs optimization and improvement based on the technical solutions of the above embodiments.
Further, after "extracting the target image including the guideline", before "fitting each pixel point in the target image with a straight line to obtain a fitted guideline", adding "performing erosion transformation and/or dilation transformation on the target image based on a set mask, and updating the target image according to a transformation result" to improve a matching degree between the target image and an actual guideline.
A guide line detecting method as shown in fig. 3, comprising:
s310, collecting an original image containing a guide line when the tire crane runs.
And S320, carrying out image segmentation on the original image so as to extract a target image containing the guide line.
S330, carrying out corrosion transformation and/or expansion transformation on the target image based on the set mask, and updating the target image according to the transformation result.
It should be noted that, due to the influence of the usage environment of the tire crane, a situation that a leaf or other objects are blocked in the acquired original image may exist, so that the image of the guide line in the original image is incomplete, or due to the fact that the guide line is covered by a shadow part of a container carried by the tire crane under the irradiation of sunlight, or due to the influence of accumulated water in a rainy day on a part of pixel points in the acquired original image, so that more noise information of the extracted image and/or incomplete extracted image exist when the target image is extracted, so that the fitting effect of the subsequent guide line is affected.
In order to avoid the above situation, after the target image is extracted, erosion transform and/or dilation transform may be performed on the target image, and the target image may be updated according to the transform result, so as to fill in the void or broken portion in the binarized target image, and/or eliminate noise information.
Specifically, the corrosion transformation is implemented using the following formula:
Figure BDA0002255332750000101
specifically, the expansion transformation is implemented by the following formula:
Figure BDA0002255332750000102
where f is the original image, g is the set mask, Supp (g) is the support set of g.
The setting mask may be set by a technician as needed or an empirical value, or may be determined by a number of trial and error experiments.
For example, performing erosion transformation and/or dilation transformation on the target image based on a set mask, and updating the target image according to the transformation result, may be: performing morphological closed operation on the target image based on a first set mask, and updating the target image according to a closed operation result; and performing morphological open operation on the target image based on a second set mask, and updating the target image according to an open operation result.
Specifically, the morphological closing operation is performed on the target image according to the following formula:
Figure BDA0002255332750000111
wherein f is the target image and g is the first set mask. The first setting mask may be set by a technician according to needs or empirical values, and may be determined through a number of trial and error experiments.
It can be understood that concave portions in the target image that do not conform to the structure element morphology of the first set mask can be filled through the morphological closing operation, so that the mottle points or fracture regions in the image caused by object occlusion or color degradation of the guide lines can be effectively improved.
Specifically, the morphological opening operation is performed on the target image according to the following formula:
Figure BDA0002255332750000112
where f is the target image and g is the second set mask. The second setting mask may be set by a technician according to needs or empirical values, and may be determined through a number of trial and error experiments.
It can be understood that the convex part which is not matched with the structural element shape of the second setting mask in the target image can be removed through the shape opening operation, so that the noise influence can be effectively eliminated.
The first set mask and the second set mask may be the same or different. Typically, the first set mask and the second set mask are arranged as the same mask. For example, a square mask may be used. The mask size may be set by a skilled person based on empirical values or determined iteratively by a number of experiments, for example a mask size of 3 x 3 may be used.
It is understood that in order to ensure the fitting degree of the guiding line and the actual guiding line in the target image, the morphological closing operation is usually advanced to fill the cavity and connect the broken part, and then the morphological opening operation is adopted to eliminate the noise.
S340, performing straight line fitting on each pixel point in the target image to obtain a fitted guide line.
According to the embodiment of the application, after the target image containing the guide line is extracted, each pixel point in the target image is subjected to linear fitting to obtain the fitted guide line, the target image is subjected to corrosion transformation and/or expansion transformation based on the set mask, and is updated according to the transformation result, so that the cavities and the broken parts in the target image can be effectively filled, noise influence is eliminated, the degree of fit between the guide line and the actual guide line in the target image is improved, and the accuracy and stability of guide line detection are improved.
Example four
Fig. 4A and 4B are a flow chart of a guideline detection method and a flow chart of a detection method in a fourth embodiment of the present application, respectively, and the embodiment of the present application provides a preferred implementation manner based on the technical solutions of the above embodiments.
Referring to fig. 4A, when performing the guideline detection, the following five stages are divided: the image acquisition stage, the image preprocessing stage, the image segmentation stage, the morphology processing stage, and the line fitting stage are described in detail with reference to the flowchart of the guideline detection method shown in fig. 4B.
Specifically, in the image acquisition stage, the following steps are specifically adopted:
s411, when the tire crane runs, collecting an original image containing a guide line.
Specifically, in the image preprocessing stage, the following steps are specifically adopted:
s421, performing median filtering on the original image by using a circular mask to obtain a de-noised image;
wherein the circular mask has a size of 3 x 3. Specifically, the circular mask is:
Figure BDA0002255332750000121
typically, median filtering is performed using the following equation:
Figure BDA0002255332750000122
wherein f (x, y) is an original image, p (x, y) is a neighborhood space of the pixel point p (x, y) with respect to the third set mask, and m (x, y) is a denoised image.
By adopting a median filtering mode, the information such as the verification noise, the long-tail superposition noise and the like in the acquired original image can be effectively filtered, and meanwhile, the edge detail information is better protected.
Specifically, in the image segmentation stage, the following steps are specifically adopted:
and S431, determining a gray level histogram of the de-noised image, and determining a global gray level mean value and a global gray level variance according to the gray level histogram.
Typically, the global gray mean μ and global gray variance σ are determined using the following equations2
Figure BDA0002255332750000131
Figure BDA0002255332750000132
Wherein HIST [ l ]]The pixel points with the gray value of l, N (l) the number of the pixel points with the gray value of l, w the number of rows of the pixel points of the de-noised image, and h the number of columns of the pixel points of the de-noised image; gminIs the minimum gray value; gmaxIs the maximum gray value.
And S432, determining a segmentation threshold according to the global gray mean and the global gray variance.
Typically, the segmentation threshold Th is determined using the following formula:
Th=μ+k×σ;
where k is a constant other than 0. Where k can be set by the skilled person based on empirical values or determined by extensive and repeated experimentation. Illustratively, k takes any constant of 3-10.
And S433, carrying out image segmentation on the denoised image according to the segmentation threshold value, and extracting a target image containing a guide line.
Typically, the extraction of the target image is performed according to the following formula:
Figure BDA0002255332750000141
wherein, I1(x, y) is the target image, I0(x, y) is a denoised image, and Th is a segmentation threshold.
Specifically, in the morphological treatment stage, the following steps are specifically adopted:
and S441, performing morphological closing operation on the target image by adopting a square mask so as to fill the target image.
Typically, the morphological closing operation is performed on the target image according to the following formula:
Figure BDA0002255332750000142
wherein f is1Is a target image, g1Is a square mask, f2Is the filled target image.
Wherein the square mask size is 3 x 3. In particular, the square mask is
Figure BDA0002255332750000143
And S442, performing morphological opening operation on the filled target image by adopting a square mask to filter noise of the filled target image.
Typically, the morphological opening operation is performed on the target image according to the following formula:
Figure BDA0002255332750000144
wherein, g2Is a square mask, f3The target image after noise filtering.
Wherein the square mask size is 3 x 3. In particular, the square mask is
Filling a mottle point or a fracture area in an image caused by object occlusion or color degradation of a guide line through morphological closed operation; and then filtering noise information caused by accumulated water or container shadow through morphological open operation. Referring to fig. 4C and fig. 4D, compared before and after morphological processing, the processed image is clearer than the original image, the signal-to-noise ratio is higher, and the consistency is better.
Specifically, in the straight line fitting stage, the following steps are specifically adopted:
and S451, determining a highlight point set of the noise-filtered target image.
Combining the points with the pixel value of '255', namely the points with the pixel points of the guide line, in the filtered target image to form a highlight point set: { (x)1,y1),(x2,y2),…,(xn,yn)}。
And S452, determining regression parameters of the fitting equation by adopting a least square method, and determining the fitting equation according to the determined regression parameters.
Typically, regression parameters a and b are determined using the following formulas:
Figure BDA0002255332750000151
wherein the content of the first and second substances,
Figure BDA0002255332750000152
finally, the fitting equation is determined as:
Figure BDA0002255332750000153
and S453, fitting to determine a guide line according to the highlight point set and the fitting equation.
Set of highlight points { (x)1,y1),(x2,y2),…,(xn,yn) Inputting x values of abscissa of each pixel point in the equation into a fitting equation to obtain corresponding fitting ordinate coordinates
Figure BDA0002255332750000154
Obtain a new set of pointsAnd the new set of points is used as a guideline for detection.
As can be seen from the comparison between the original image and the detection result shown in fig. 4E and 4F, the fitted guideline has a high matching degree with the guideline in the original image, and the consistency is good.
EXAMPLE five
Fig. 5 is a structural diagram of a guide wire detecting device in a fifth embodiment of the present application, and the embodiment of the present application is applied to a case where a deviation of a tire crane during traveling is corrected. The device is realized by software and/or hardware and is specifically configured in electronic equipment with certain data computing capacity, and the electronic equipment can be integrated into the tire crane.
As shown in fig. 5, the wire detecting device for a tire crane includes: a raw image acquisition module 510, a target image extraction module 520, and a guideline fitting module 530. Wherein the content of the first and second substances,
an original image collecting module 510, configured to collect an original image including a guide line when the tire crane is running;
a target image extracting module 520, configured to perform image segmentation on the original image to extract a target image including the guideline;
and a guide line fitting module 530, configured to perform linear fitting on each pixel point in the target image to obtain a fitted guide line.
According to the embodiment of the application, when the tire crane is in a tire crane form, the original image acquisition module acquires the original image containing the guide line; performing image segmentation on the original image through a target image extraction module to extract a target image containing guide lines; and performing linear fitting on each pixel point in the target image through a guide line fitting module to obtain a fitted guide line. According to the technical scheme, the automatic identification of the guide line in the tire crane form process is realized through machine vision, so that a basis is provided for automatic deviation correction in the tire crane running process.
Further, the target image extraction module 520 includes:
a histogram determining unit for determining a gray level histogram of the original image;
a segmentation threshold determining unit, configured to determine a segmentation threshold according to a statistical result of each gray value in the gray histogram;
and the image segmentation unit is used for carrying out image segmentation on the original image according to the segmentation threshold so as to extract a target image containing the guide line.
Further, the segmentation threshold determination unit is specifically configured to:
respectively determining the global gray mean and the global gray variance of the original image according to the statistical result of each pixel point in the gray histogram;
and determining the segmentation threshold according to the global gray mean and the global gray variance.
Further, the apparatus also includes a corrosion expansion transformation module for:
after extracting the target image containing the guide line, performing linear fitting on each pixel point in the target image to obtain the fitted guide line, performing corrosion transformation and/or expansion transformation on the target image based on a set mask, and updating the target image according to a transformation result.
Further, a corrosion expansion transform module, comprising:
the closed operation unit is used for performing morphological closed operation on the target image based on a first set mask and updating the target image according to a closed operation result;
and the opening operation unit is used for performing morphological opening operation on the target image based on a second set mask and updating the target image according to an opening operation result.
Further, the apparatus further comprises a preprocessing module configured to:
and before the original image is subjected to image segmentation, processing the original image according to a third set mask, and updating the original image according to a processing result.
The guide line detection device can execute the guide line detection method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects for executing the guide line detection method.
EXAMPLE six
Fig. 6 is a block diagram of an electronic device in a sixth embodiment of the present application, where the electronic device includes: an input device 610, an output device 620, a processor 630, and a storage device 640.
The input device 610 is used for acquiring an original image containing a guide line when the tire crane runs;
an output device 620 for outputting at least one of the acquired original image, the extracted target image, and the fitted guideline;
one or more processors 630;
a storage device 640 for storing one or more programs.
In fig. 6, a processor 630 is taken as an example, the input device 610 in the electronic apparatus may be connected to the output device 620, the processor 630 and the storage device 640 through a bus or other means, and the processor 630 and the storage device 640 are also connected through a bus or other means, which is taken as an example in fig. 6.
In this embodiment, the processor 630 in the electronic device may control the input device 610 to capture an original image containing the guiding line while the tire crane is running; the original image may also be subjected to image segmentation to extract a target image containing the guideline; straight line fitting can be carried out on each pixel point in the target image to obtain a fitted guide line; the output device 620 may be further controlled to display at least one of the acquired original image, the extracted target image, and the fitted guideline.
The storage device 640 in the electronic device may be used as a computer-readable storage medium for storing one or more programs, which may be software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the guideline detection method in the embodiment of the present application (for example, the original image capturing module 510, the target image extracting module 520, and the guideline fitting module 530 shown in fig. 5). The processor 630 executes various functional applications and data processing of the electronic device by executing software programs, instructions and modules stored in the storage device 640, that is, implements the guideline detection method in the above-described method embodiment.
The storage device 640 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data and the like (the original image, the target image, the fitted guideline, and the like in the above-described embodiments). Further, the storage 640 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the storage device 640 may further include memory located remotely from the processor 630, which may be connected to a server over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
EXAMPLE seven
The embodiment of the present application further provides a tire crane, where the tire crane is provided with the electronic declaration shown in fig. 6, and further includes a camera, where the camera is configured to collect an original image including a guide line when the tire crane is in a driving state, and transmit the obtained original image to an electronic device in a wired and/or wireless manner, so that the electronic device extracts a target image and fits the guide line based on the original image.
Example eight
An eighth embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a guideline detection device, implements the guideline detection method provided in the embodiments of the present application, and the method includes: collecting an original image containing a guide line when the tire crane runs; performing image segmentation on the original image to extract a target image containing the guideline; and performing linear fitting on each pixel point in the target image to obtain a fitted guide line.
From the above description of the embodiments, it is obvious for those skilled in the art that the present application can be implemented by software and necessary general hardware, and certainly can be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods described in the embodiments of the present application.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims (10)

1. A guide wire detecting method, comprising:
collecting an original image containing a guide line when the tire crane runs;
performing image segmentation on the original image to extract a target image containing the guideline;
and performing linear fitting on each pixel point in the target image to obtain a fitted guide line.
2. The method of claim 1, wherein image segmenting the original image to extract a target image containing the guideline comprises:
determining a gray level histogram of the original image;
determining a segmentation threshold according to the statistical result of each gray value in the gray histogram;
and performing image segmentation on the original image according to the segmentation threshold so as to extract a target image containing the guide line.
3. The method of claim 2, wherein determining a segmentation threshold based on the statistics of the gray scale values in the gray scale histogram comprises:
respectively determining the global gray mean and the global gray variance of the original image according to the statistical result of each pixel point in the gray histogram;
and determining the segmentation threshold according to the global gray mean and the global gray variance.
4. The method according to claim 2, wherein after extracting the target image including the guideline, before performing straight line fitting on each pixel point in the target image to obtain a fitted guideline, further comprising:
and carrying out erosion transformation and/or expansion transformation on the target image based on a set mask, and updating the target image according to a transformation result.
5. The method of claim 4, wherein performing erosion transformation and/or dilation transformation on the target image based on a set mask and updating the target image according to the transformation result comprises:
performing morphological closed operation on the target image based on a first set mask, and updating the target image according to a closed operation result;
and performing morphological open operation on the target image based on a second set mask, and updating the target image according to an open operation result.
6. The method according to any one of claims 1-5, further comprising, prior to image segmentation of the original image:
and processing the original image according to a third set mask, and updating the original image according to a processing result.
7. A guidewire detection device, comprising:
the original image acquisition module is used for acquiring an original image containing a guide line when the tire crane runs;
the target image extraction module is used for carrying out image segmentation on the original image so as to extract a target image containing the guide line;
and the guide line fitting module is used for performing linear fitting on each pixel point in the target image to obtain a fitted guide line.
8. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a guideline detection method as claimed in any one of claims 1-6.
9. A tire crane comprising the electronic device of claim 8 and a camera.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out a guideline detection method according to any one of claims 1-6.
CN201911051038.0A 2019-10-31 2019-10-31 Guide wire detection method, device, equipment, tyre crane and medium Pending CN110796654A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911051038.0A CN110796654A (en) 2019-10-31 2019-10-31 Guide wire detection method, device, equipment, tyre crane and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911051038.0A CN110796654A (en) 2019-10-31 2019-10-31 Guide wire detection method, device, equipment, tyre crane and medium

Publications (1)

Publication Number Publication Date
CN110796654A true CN110796654A (en) 2020-02-14

Family

ID=69442349

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911051038.0A Pending CN110796654A (en) 2019-10-31 2019-10-31 Guide wire detection method, device, equipment, tyre crane and medium

Country Status (1)

Country Link
CN (1) CN110796654A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112330630A (en) * 2020-11-05 2021-02-05 北京格灵深瞳信息技术有限公司 Iron wire fracture identification method and electronic equipment
CN113408437A (en) * 2021-06-23 2021-09-17 南通大学 Alignment system and method for unmanned sweeper and garbage station
JP7358606B1 (en) 2022-12-19 2023-10-10 東芝エレベータ株式会社 elevator system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104502992A (en) * 2014-12-31 2015-04-08 中国人民解放军空军预警学院 Weak point target precisely positioning method and system based on space-time oversampling and scanning
CN109814600A (en) * 2019-03-12 2019-05-28 重庆大学 A kind of unmanned plane cable tunnel inspection flying method
CN110054089A (en) * 2019-04-29 2019-07-26 北京航天自动控制研究所 A kind of tyre crane machine vision system for automatically correcting and method for correcting error

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104502992A (en) * 2014-12-31 2015-04-08 中国人民解放军空军预警学院 Weak point target precisely positioning method and system based on space-time oversampling and scanning
CN109814600A (en) * 2019-03-12 2019-05-28 重庆大学 A kind of unmanned plane cable tunnel inspection flying method
CN110054089A (en) * 2019-04-29 2019-07-26 北京航天自动控制研究所 A kind of tyre crane machine vision system for automatically correcting and method for correcting error

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杨帆: "《数字图像处理与分析》", 31 May 2015, 北京航空航天大学出版社, pages: 198 - 204 *
陈旭: "全自动水草清理作业船视觉辅助导航技术研究", pages 3 - 4 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112330630A (en) * 2020-11-05 2021-02-05 北京格灵深瞳信息技术有限公司 Iron wire fracture identification method and electronic equipment
CN113408437A (en) * 2021-06-23 2021-09-17 南通大学 Alignment system and method for unmanned sweeper and garbage station
JP7358606B1 (en) 2022-12-19 2023-10-10 東芝エレベータ株式会社 elevator system

Similar Documents

Publication Publication Date Title
CN108776140B (en) Machine vision-based printed matter flaw detection method and system
CN101853333B (en) Method for picking marks in medical robot navigation positioning images
CN110232389B (en) Stereoscopic vision navigation method based on invariance of green crop feature extraction
CN110796654A (en) Guide wire detection method, device, equipment, tyre crane and medium
CN110415208B (en) Self-adaptive target detection method and device, equipment and storage medium thereof
CN104075965B (en) A kind of micro-image grain graininess measuring method based on watershed segmentation
CN107871319B (en) Method and device for detecting beam limiter area, X-ray system and storage medium
CN109509186B (en) Cerebral CT image-based ischemic stroke lesion detection method and device
EP4071665A1 (en) Character segmentation method and apparatus, and computer-readable storage medium
KR102587710B1 (en) Methods, computer program products, and computer readable media for generating masks for camera streams
AU2020103260A4 (en) Rice blast grading system and method
CN110991452A (en) Parking stall frame detection method, device, equipment and readable storage medium
CN112861654A (en) Famous tea picking point position information acquisition method based on machine vision
CN113484867B (en) Method for detecting density of fish shoal in closed space based on imaging sonar
CN114565608A (en) Endoscope Ai image identification method and system
CN114581658A (en) Target detection method and device based on computer vision
CN113781526A (en) Domestic animal count identification system
CN107239761B (en) Fruit tree branch pulling effect evaluation method based on skeleton angular point detection
CN110490872B (en) Foreign matter detection method and system for processing equipment
WO2024016632A1 (en) Bright spot location method, bright spot location apparatus, electronic device and storage medium
CN111695374B (en) Segmentation method, system, medium and device for zebra stripes in monitoring view angles
LU102950B1 (en) Tobacco plant counting method based on uav remote sensing technology and image processing technology
CN116030430A (en) Rail identification method, device, equipment and storage medium
CN113744200B (en) Camera dirt detection method, device and equipment
CN115690089A (en) Image enhancement preprocessing method and system for weak defect detection

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