CN117173185B - Method and device for detecting area of rolled plate, storage medium and computer equipment - Google Patents

Method and device for detecting area of rolled plate, storage medium and computer equipment Download PDF

Info

Publication number
CN117173185B
CN117173185B CN202311453302.XA CN202311453302A CN117173185B CN 117173185 B CN117173185 B CN 117173185B CN 202311453302 A CN202311453302 A CN 202311453302A CN 117173185 B CN117173185 B CN 117173185B
Authority
CN
China
Prior art keywords
image
plate
brightness
determining
contour line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311453302.XA
Other languages
Chinese (zh)
Other versions
CN117173185A (en
Inventor
矫志杰
高士闻
朗冠宇
何纯玉
赵忠
吴志强
Original Assignee
东北大学
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 东北大学 filed Critical 东北大学
Priority to CN202311453302.XA priority Critical patent/CN117173185B/en
Publication of CN117173185A publication Critical patent/CN117173185A/en
Application granted granted Critical
Publication of CN117173185B publication Critical patent/CN117173185B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a method and a device for detecting the area of a rolled plate, a storage medium and computer equipment, which belong to the technical field of rolled image analysis and mainly solve the problem that the area error of the plate determined by adopting a fixed threshold in the prior art is large, and comprise the following steps: acquiring an image of a plate to be detected containing edge information of a rolled plate; evaluating the brightness of the plate image to be detected to obtain a brightness evaluation result; if the brightness evaluation result does not meet the brightness requirement, obtaining a target brightness plate image meeting the brightness requirement by adopting image enhancement processing; if the brightness evaluation result meets the brightness requirement, determining the panel image to be detected as a target brightness panel image; extracting a contour line of a target brightness plate image, and determining an adaptive threshold corresponding to the plate image to be detected based on a contour line pixel value; and carrying out self-adaptive binarization processing on the image of the plate to be detected based on the self-adaptive threshold value, and determining a target area of the rolled plate based on the self-adaptive binarization processing result.

Description

Method and device for detecting area of rolled plate, storage medium and computer equipment
Technical Field
The invention relates to the technical field of rolling image analysis, in particular to a method and a device for detecting the area of a rolled plate, a storage medium and computer equipment.
Background
With the rapid development of transformation upgrading and intelligent technology in the steel industry, the machine vision technology has been applied to rolling process production such as automatic shearing systems, plane shape control technology and real-time monitoring of sickle bends due to the characteristics of non-contact, high efficiency and high automation. Particularly in the plane shape control process of the medium plate, the head and tail end photographs of the steel plate shot by a camera arranged behind the rolling mill are subjected to image processing, so that the traditional manual head and tail end cutting area measurement can be replaced, the efficiency and the accuracy are improved, and a large amount of actual data can be provided for intelligent analysis of the rear end.
At present, when image processing is carried out on a medium plate in rolling, a threshold value set by manual experience is adopted to extract pixel points of a steel plate area as an interested area, and pixel points of a non-steel plate area are removed to serve as a non-interested area, so that a foundation is laid for the next step of contour recognition of the steel plate. However, in the process of collecting images of rolled steel plates, the picked images are affected due to the fact that the temperatures of the steel plates in different passes are different, the brightness of workshop light is different, dust and electromagnetic interference are caused, and the like. And the fixed threshold set by manual experience is adopted to perform threshold processing on all the acquired steel plate images, so that the steel plate area of each image cannot be accurately extracted, and the follow-up work such as contour recognition processing and the like is inevitably influenced.
Disclosure of Invention
In view of the above, the present invention provides a method and apparatus for detecting the area of a rolled plate, a storage medium, and a computer device, and is mainly aimed at solving the problem of large error of the area of the plate determined by adopting a fixed threshold in the prior art.
According to an aspect of the present invention, there is provided a region detection method of a rolled plate, comprising:
acquiring an image of a plate to be detected, wherein the image of the plate to be detected contains edge information of a rolled plate;
evaluating the brightness of the plate image to be detected to obtain a brightness evaluation result;
if the brightness evaluation result does not meet the brightness requirement, determining the plate image to be monitored as a plate image to be enhanced, and performing image enhancement processing on the plate image to be enhanced to obtain a target brightness plate image meeting the brightness requirement; if the brightness evaluation result meets the brightness requirement, directly determining the plate image to be detected as the target brightness plate image;
extracting a contour line of the target brightness plate image, and determining an adaptive threshold corresponding to the plate image to be detected based on a contour line pixel value;
and carrying out self-adaptive binarization processing on the image of the plate to be detected based on the self-adaptive threshold value, and determining a target area of the rolled plate based on a self-adaptive binarization processing result.
Further, the evaluating the brightness of the board image to be detected, and obtaining the brightness evaluation result includes:
calculating the pixel average value of all pixel points of the plate image to be detected;
comparing the pixel average value with a brightness evaluation threshold value, and if the pixel average value is smaller than the brightness evaluation threshold value, determining that the brightness evaluation result does not meet the brightness requirement; and if the pixel average value is greater than or equal to the brightness evaluation threshold value, determining the brightness evaluation result as meeting the brightness requirement.
Further, before the evaluation of the brightness of the sheet material image to be detected, the method further includes:
and denoising the plate image to be detected based on the pixel value of each pixel point in the plate image to be detected to obtain a denoised image, so that brightness evaluation is performed based on the denoised image.
Further, the extracting the contour line of the target brightness plate image and determining the adaptive threshold corresponding to the plate image to be detected based on the contour line pixel value includes:
screening the edge information of the target brightness plate image through a Canny edge detection algorithm to obtain a target pixel point containing the edge information;
Performing continuity detection on the target pixel point, and determining a continuous contour line which contains the most target pixel point based on a continuity detection result;
and acquiring contour line coordinate values of all pixel points on the contour line, determining contour line pixel values from the plate image to be detected based on the contour line coordinate values, and determining the self-adaptive threshold corresponding to the plate image to be detected based on the contour line pixel values.
Further, the performing continuity detection on the target pixel point, and determining, based on a result of the continuity detection, a contour line that includes the target pixel point and is continuous and the largest includes:
setting a continuity detection area, and arbitrarily acquiring one target pixel point as a central pixel point of the continuity detection area;
detecting in a residual area around the central pixel point, and if the residual area contains other target pixel points, confirming the other target pixel points and the central pixel point as continuous pixel points;
and determining a plurality of contour lines to be determined based on the continuous pixel points, and determining the contour line to be determined with the largest number of pixel points as the contour line of the target brightness plate image.
Further, the determining a contour line pixel value from the to-be-detected plate image based on the contour line coordinate value, and determining the adaptive threshold based on the contour line pixel value includes:
determining a contour line pixel point corresponding to the contour line coordinate value from the plate image to be detected, and determining a pixel value on the contour line pixel point as the contour line pixel value;
randomly acquiring a target contour line pixel value from the contour line pixel values, and determining the target contour line pixel value as the adaptive threshold value; or alternatively, the first and second heat exchangers may be,
averaging all the contour line pixel values to obtain an average contour line pixel value; and determining the average contour pixel value as the adaptive threshold.
Further, the performing adaptive binarization processing on the image of the plate to be detected based on the adaptive threshold value, and determining the target area of the rolled plate based on the adaptive binarization processing result includes:
acquiring all pixel values to be processed in the plate image to be detected, and comparing the pixel values with the adaptive threshold;
if the pixel value to be processed is smaller than the self-adaptive threshold value, determining the corresponding pixel value to be processed as 0;
If the pixel value to be processed is greater than or equal to the self-adaptive threshold value, determining the corresponding pixel value to be processed as 255;
and determining a white area obtained after the self-adaptive binarization processing in the image of the plate to be detected as a target area of the rolled plate.
According to another aspect of the present invention, there is provided a region detecting apparatus for rolled sheet material, comprising:
the acquisition module is used for acquiring an image of the plate to be detected, wherein the image of the plate to be detected contains edge information of the rolled plate;
the brightness evaluation module is used for evaluating the brightness of the plate image to be detected to obtain a brightness evaluation result;
the enhancement processing module is used for determining the plate image to be enhanced as the plate image to be enhanced if the brightness evaluation result does not meet the brightness requirement, and carrying out image enhancement processing on the plate image to be enhanced to obtain a target brightness plate image meeting the brightness requirement; if the brightness evaluation result meets the brightness requirement, directly determining the plate image to be detected as the target brightness plate image;
the threshold value determining module is used for extracting the contour line of the target brightness plate image and determining an adaptive threshold value corresponding to the plate image to be detected based on the contour line pixel value;
And the region determining module is used for carrying out self-adaptive binarization processing on the image of the plate to be detected based on the self-adaptive threshold value and determining a target region of the rolled plate based on a self-adaptive binarization processing result.
Further, the brightness evaluation module is further configured to:
calculating the pixel average value of all pixel points of the plate image to be detected;
comparing the pixel average value with a brightness evaluation threshold value, and if the pixel average value is smaller than the brightness evaluation threshold value, determining that the brightness evaluation result does not meet the brightness requirement; and if the pixel average value is greater than or equal to the brightness evaluation threshold value, determining the brightness evaluation result as meeting the brightness requirement.
Further, the device further comprises a denoising module, which is used for denoising the plate image to be detected based on the pixel value of each pixel point in the plate image to be detected to obtain a denoised image, so that brightness evaluation is performed based on the denoised image.
Further, the threshold determining module includes:
the information screening unit is used for screening the edge information of the target brightness plate image through a Canny edge detection algorithm to obtain target pixel points containing the edge information;
The continuity detection unit is used for carrying out continuity detection on the target pixel points and determining the most continuous contour lines containing the target pixel points based on the continuity detection result;
the threshold value determining unit is used for obtaining the contour line coordinate values of all pixel points on the contour line, determining contour line pixel values from the plate image to be detected based on the contour line coordinate values, and determining the self-adaptive threshold value corresponding to the plate image to be detected based on the contour line pixel values.
Further, the continuity detecting unit is further configured to:
setting a continuity detection area, and arbitrarily acquiring one target pixel point as a central pixel point of the continuity detection area;
detecting in a residual area around the central pixel point, and if the residual area contains other target pixel points, confirming the other target pixel points and the central pixel point as continuous pixel points;
and determining a plurality of contour lines to be determined based on the continuous pixel points, and determining the contour line to be determined with the largest number of pixel points as the contour line of the target brightness plate image.
Further, the threshold determining unit is further configured to:
Determining a contour line pixel point corresponding to the contour line coordinate value from the plate image to be detected, and determining a pixel value on the contour line pixel point as the contour line pixel value;
randomly acquiring a target contour line pixel value from the contour line pixel values, and determining the target contour line pixel value as the adaptive threshold value; or alternatively, the first and second heat exchangers may be,
averaging all the contour line pixel values to obtain an average contour line pixel value; and determining the average contour pixel value as the adaptive threshold.
Further, the area determining module is further configured to:
acquiring all pixel values to be processed in the plate image to be detected, and comparing the pixel values with the adaptive threshold;
if the pixel value to be processed is smaller than the self-adaptive threshold value, determining the corresponding pixel value to be processed as 0;
if the pixel value to be processed is greater than or equal to the self-adaptive threshold value, determining the corresponding pixel value to be processed as 255;
and determining a white area obtained after the self-adaptive binarization processing in the image of the plate to be detected as a target area of the rolled plate.
According to still another aspect of the present invention, there is provided a storage medium having stored therein at least one executable instruction for causing a processor to perform operations corresponding to the region detection method of rolled sheet material as described above.
According to another aspect of the present invention, there is provided a computer device comprising a processor, a memory, a communication interface and a communication bus, said processor, said memory and said communication interface completing communication with each other via said communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the area detection method of the rolled plate.
By means of the technical scheme, the technical scheme provided by the embodiment of the invention has at least the following advantages:
compared with the prior art, the method and the device for detecting the area of the rolled plate, provided by the invention, have the advantages that the image of the plate to be detected is obtained, and the image of the plate to be detected contains the edge information of the rolled plate; evaluating the brightness of the plate image to be detected to obtain a brightness evaluation result; if the brightness evaluation result does not meet the brightness requirement, determining the panel image to be monitored as the panel image to be enhanced; performing image enhancement processing on the plate image to be enhanced to obtain a target brightness plate image meeting the brightness requirement; if the brightness evaluation result meets the brightness requirement, directly determining the plate image to be detected as the target brightness plate image; extracting a contour line of the target brightness plate image, and determining an adaptive threshold corresponding to the plate image to be detected based on a contour line pixel value; and carrying out self-adaptive binarization processing on the image of the plate to be detected based on the self-adaptive threshold value, and determining a target area of the rolled plate based on a self-adaptive binarization processing result, thereby realizing area detection on images of the rolled plate with different brightness. The method adopts the self-adaptive threshold value to divide the area, avoids the problem that the area cannot be divided or the error is large when the threshold value is fixed to divide the area, and improves the automation degree and the operability of the area division of the rolled plate.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
fig. 1 is a schematic flow chart of a method for detecting a region of a rolled plate according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of another method for detecting the area of a rolled plate according to an embodiment of the present invention;
fig. 3 shows a gray scale map of head end images acquired by three different rolled steel plates according to an embodiment of the present invention;
FIG. 4 is a flow chart of another method for detecting the area of a rolled sheet according to an embodiment of the present invention;
Fig. 5 shows a schematic diagram of a target pixel point containing edge information obtained by screening processing by a Canny edge detection algorithm according to an embodiment of the present invention;
fig. 6 is a schematic flow chart of a method for detecting a region of a rolled plate according to an embodiment of the present invention;
FIG. 7 shows a binarized image provided by an embodiment of the present invention;
fig. 8 is a schematic structural view showing a region detecting apparatus for rolled sheet according to an embodiment of the present invention;
fig. 9 shows a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The embodiment of the invention provides a method for detecting the area of a rolled plate, as shown in fig. 1, which comprises the following steps:
101. acquiring an image of a plate to be detected, wherein the image of the plate to be detected contains edge information of a rolled plate;
In the embodiment of the invention, the current execution end obtains the image of the plate to be detected, wherein the image of the plate to be detected contains edge information of the rolled plate, for example, a photograph taken by the head end of the medium steel plate contains the head end edge information of the medium steel plate, a photograph taken by the tail end of the medium steel plate contains the tail end edge information of the medium steel plate, and the like.
102. Evaluating the brightness of the plate image to be detected to obtain a brightness evaluation result;
in the embodiment of the invention, the actual temperature of the steel plate with fewer rolling passes is higher in the rolling process, and the acquired image of the steel plate is brighter; the actual temperature of the steel plate with more rolling passes is lower, and the acquired image of the steel plate is darker. Therefore, the current execution end needs to evaluate the brightness of the plate image to be detected to obtain a brightness evaluation result, wherein the brightness evaluation result comprises two types of brightness requirements and brightness requirements which are not met.
103. If the brightness evaluation result does not meet the brightness requirement, determining the plate image to be monitored as a plate image to be enhanced, and performing image enhancement processing on the plate image to be enhanced to obtain a target brightness plate image meeting the brightness requirement; if the brightness evaluation result meets the brightness requirement, directly determining the plate image to be detected as the target brightness plate image;
In the embodiment of the invention, the current execution terminal determines the image of the plate to be detected which does not meet the brightness requirement based on the brightness evaluation result, then image enhancement processing is needed, and the image of the plate to be detected which does not meet the brightness requirement is determined as the image of the plate to be enhanced. If the brightness of the plate image to be detected meets the brightness requirement, image enhancement processing is not needed, the plate image to be detected is directly determined to be the target brightness plate image, and the operations such as contour extraction are carried out in step 104. The current execution end performs image enhancement processing on the plate image to be enhanced to obtain a target brightness plate image meeting the brightness requirement. In the embodiment of the invention, the image enhancement processing can be performed by using a Gamma image enhancement processing method, and the Gamma image enhancement is characterized in that the pixel points with lower gray level can be rapidly increased, and the pixel points with higher gray level have small change so as to increase the gradient value of the pixel value of the steel plate area and the pixel value of the background area. Therefore, the darker steel plate image can be obviously improved without causing new interference.
104. Extracting a contour line of the target brightness plate image, and determining an adaptive threshold corresponding to the plate image to be detected based on a contour line pixel value;
In the embodiment of the invention, because the shot plate image to be detected comprises a plate part and a background part, the current execution end needs to detect according to the edges of the two parts, extract the contour line of the plate image with target brightness, and then determine the self-adaptive threshold value corresponding to the plate image to be detected based on the contour line. The self-adaptive threshold represents a threshold which changes according to the change of the contour line, so that the optimal threshold of the post-binarization processing can be effectively found, and the degree of automation is high.
105. And carrying out binarization processing on the image of the plate to be detected based on the self-adaptive threshold value, and determining a target area of the rolled plate based on a binarization processing result.
In the embodiment of the invention, the current execution end carries out binarization processing on the plate image to be detected based on the self-adaptive threshold value corresponding to the plate image to be detected, wherein the binarization processing is used for representing an image processing process of converting each pixel in the image into black and white. The image after binarization processing is simplified, and the current execution end is easy to detect the region. The current executing end determines the target area of the rolled plate based on the binarization processing result, for example, after the current executing end obtains the binarization processing image of black and white, the black area is determined as the background area, and the white area is determined as the target area of the rolled plate.
Further, as a refinement and expansion of the specific implementation manner of the foregoing embodiment, in order to quickly and accurately determine an image of a plate to be reinforced, another method for detecting an area of a rolled plate is provided, where the method further defines the step of "evaluating brightness of the image of the plate to be detected to obtain a brightness evaluation result", as shown in fig. 2, including:
201. calculating the pixel average value of all pixel points of the plate image to be detected;
in the embodiment of the invention, the current execution end acquires the pixel values of all pixel points on the plate image to be detected, and calculates the pixel average value. After the gray-scale processing, as shown in fig. 3, wherein (a) is the panel image P1 to be detected after the gray-scale processing, (b) is the panel image P2 to be detected after the gray-scale processing, and (c) is the panel image P3 to be detected after the gray-scale processing. After the pixel values of all the pixel points on the three images (a), (b) and (c) are averaged, the average values of the obtained pixels are shown in the following table 1:
table 1 brightness evaluation table
202. Comparing the pixel average value with a brightness evaluation threshold value, and if the pixel average value is smaller than the brightness evaluation threshold value, determining that the brightness evaluation result does not meet the brightness requirement; and if the pixel average value is greater than or equal to the brightness evaluation threshold value, determining the brightness evaluation result as meeting the brightness requirement.
In the embodiment of the invention, the current execution end compares the pixel average value with the preset brightness evaluation threshold value, if the pixel average value is smaller than the preset brightness evaluation threshold value, the corresponding plate image to be detected is determined as the plate image to be enhanced, and if the pixel average value is larger than or equal to the preset brightness evaluation threshold value, the contour extraction and other operations are directly carried out on the plate image to be detected. If the preset brightness evaluation threshold is 50 in the embodiment of the present invention, the brightness of the legends P1, P2, and P3 in table 1 is evaluated based on the brightness evaluation threshold 50, wherein if the average value of the pixels of P1 and P2 is greater than 50, the pixels of P1 and P2 meet the brightness requirement, and the next step is directly performed to extract the contour line without performing image enhancement processing; if the average value of the pixels of the P3 is smaller than 50, the P3 does not meet the brightness requirement, and image enhancement processing is required, and the to-be-detected plate image P3 is determined as the to-be-enhanced plate image.
It should be noted that, the collected image of the board to be detected may be affected by surface pollutants such as dust and water stain when the brightness is evaluated, so as to reduce the evaluation result of the brightness of the image of the board to be detected. Before the step of evaluating the brightness of the board image to be detected, the embodiment of the invention further comprises the following steps: denoising the plate image to be detected based on pixel values of all pixel points in the plate image to be detected to obtain a denoised image, so that brightness evaluation is performed based on the denoised image. For example, pixel values of all pixel points of the plate image to be detected are traversed, and pixel points with pixel values smaller than 10 are removed.
Further, as a refinement and expansion of the above embodiment, in order to set different thresholds for different images and improve accuracy of plate area division, another method for detecting an area of a rolled plate is provided, which further defines the steps of "extracting a contour line of the target brightness plate image and determining an adaptive threshold corresponding to the plate image to be detected based on the contour line", as shown in fig. 4, including:
301. screening the edge information of the target brightness plate image through a Canny edge detection algorithm to obtain a target pixel point containing the edge information;
in the embodiment of the invention, the current execution end screens the edge information of the target brightness plate image through a Canny edge detection algorithm to obtain the target pixel point containing the edge information. The Canny edge detection algorithm comprises the following five steps: 1. gaussian filtering; 2. calculating the gradient size and gradient direction of the image; 3. non-maximum suppression; 4. double threshold screening edges; 5. and (5) connecting edges. In the embodiment of the invention, the Canny edge detection algorithm is adopted to carry out edge detection on P1 and P2 and P3 subjected to image enhancement processing, the double threshold values of the Canny edge detection are set to 67 and 32, and the obtained detection result is shown in fig. 5, wherein (a) is P1 subjected to edge information screening by adopting the Canny edge detection algorithm, (b) is P2 subjected to edge information screening by adopting the Canny edge detection algorithm, and (c) is P3 subjected to edge information screening by adopting the Canny edge detection algorithm. The white bright spots in fig. 5 are target pixel points containing edge information obtained through screening processing of a Canny edge detection algorithm.
302. Performing continuity detection on the target pixel point, and determining a continuous contour line which contains the most target pixel point based on a continuity detection result;
in the embodiment of the invention, a current execution end carries out continuity detection on a target pixel point, and a continuity detection area is firstly set, for example, 9 pixel point areas in a nine-grid form are set as the continuity detection area, and the current execution end randomly acquires one target pixel point as a central pixel point of the continuity detection area; then, detecting in the residual area around the central pixel point, and if the residual area contains other target pixel points, confirming the other target pixel points and the central pixel point as continuous pixel points; by traversing all the pixel points through the method, determining a plurality of contour lines to be determined based on continuous pixel points, wherein the contour lines are not contour lines of the steel plate, and the current execution end also needs to determine the contour line to be determined with the largest number of pixel points as the contour line of the target brightness plate image.
303. And acquiring all pixel points on the contour line, determining contour line pixel values from the plate image to be detected based on the contour line coordinate values, and determining the self-adaptive threshold corresponding to the plate image to be detected based on the contour line pixel values.
In the embodiment of the invention, the current execution end acquires the coordinate values of the contour lines of all the pixel points on the contour lines, and the corresponding coordinates of the contour lines in the plate image to be detected can be determined through the coordinate values of the contour lines as the coordinates of each pixel point of the target brightness plate image after the image enhancement processing and the original plate image to be detected are not changed. And determining a contour line pixel point corresponding to the contour line coordinate value from the plate image to be detected, and determining a pixel value on the contour line pixel point as a contour line pixel value. The current execution end determines an adaptive threshold corresponding to the plate image to be detected based on the contour line pixel values, for example, randomly acquiring a target contour line pixel value from the contour line pixel values, and determining the target contour line pixel value as the adaptive threshold of the corresponding image; or, averaging all the contour line pixel values to obtain an average contour line pixel value, and determining the average contour line pixel value as an adaptive threshold value of the corresponding plate image to be detected. In the embodiment of the present invention, a target contour line pixel value randomly acquired from contour line pixel values extracted from a to-be-detected plate image P1, a to-be-detected plate image P2, and a to-be-detected plate image P3 is determined as an adaptive threshold, as shown in table 2:
Table 2 adaptive threshold
As shown in table 2, each sheet image to be detected corresponds to an adaptive threshold, and since the threshold is no longer fixed, the adaptive threshold determined is optimal for each sheet image to be detected.
Further, as a refinement and expansion of the specific implementation manner of the foregoing embodiment, in order to make the edge of the area more clear, and facilitate operations such as automatic shearing processing or calculating a breakage rate in a later period, another method for detecting an area of a rolled plate is provided, which further defines the steps of "performing adaptive binarization processing on the image of the plate to be detected based on the adaptive threshold value, and determining the target area of the rolled plate based on the result of the adaptive binarization processing", as shown in fig. 6, including:
401. acquiring all pixel values to be processed in the plate image to be detected, and comparing the pixel values with the adaptive threshold;
402. if the pixel value to be processed is smaller than the self-adaptive threshold value, determining the corresponding pixel value to be processed as 0;
403. if the pixel value to be processed is greater than or equal to the self-adaptive threshold value, determining the corresponding pixel value to be processed as 255;
404. And determining a white area obtained after the self-adaptive binarization processing in the image of the plate to be detected as a target area of the rolled plate.
In the embodiment of the invention, a current execution end acquires all pixel values to be processed in the plate image to be detected, and compares the acquired pixel values to be processed with the self-adaptive threshold value. If the pixel value to be processed is smaller than the adaptive threshold value, determining the corresponding pixel value to be processed as 0 (namely binarizing the pixel value to be processed into black); if the pixel value to be processed is greater than or equal to the adaptive threshold, the corresponding pixel value to be processed is determined to be 255 (i.e., binarized to white). In the embodiment of the present invention, the images obtained by binarizing the image P1 of the board to be detected, the image P2 of the board to be detected, and the image P3 of the board to be detected are shown in fig. 7. After the binarization processing is completed, the current execution end determines a white area obtained after the self-adaptive binarization processing in the plate image to be detected as a target area of the rolled plate.
Compared with the prior art, the method for detecting the area of the rolled plate comprises the steps of obtaining the image of the plate to be detected, wherein the image of the plate to be detected contains the edge information of the rolled plate; evaluating the brightness of the plate image to be detected to obtain a brightness evaluation result; if the brightness evaluation result does not meet the brightness requirement, determining the panel image to be monitored as the panel image to be enhanced; performing image enhancement processing on the plate image to be enhanced to obtain a target brightness plate image meeting the brightness requirement; if the brightness evaluation result meets the brightness requirement, directly determining the plate image to be detected as the target brightness plate image; extracting a contour line of the target brightness plate image, and determining an adaptive threshold corresponding to the plate image to be detected based on a contour line pixel value; and carrying out self-adaptive binarization processing on the image of the plate to be detected based on the self-adaptive threshold value, and determining a target area of the rolled plate based on a self-adaptive binarization processing result, thereby realizing area detection on images of the rolled plate with different brightness. The method adopts the self-adaptive threshold value to divide the area, avoids the problem that the area cannot be divided or the error is large when the threshold value is fixed to divide the area, and improves the automation degree and the operability of the area division of the rolled plate.
As an implementation of the method shown in fig. 1, an embodiment of the present invention provides a device for detecting a region of a rolled plate, as shown in fig. 8, where the device includes:
the obtaining module 51 is configured to obtain an image of a plate to be detected, where the image of the plate to be detected includes edge information of a rolled plate;
the brightness evaluation module 52 is configured to evaluate brightness of the to-be-detected board image to obtain a brightness evaluation result;
the enhancement processing module 53 is configured to determine the to-be-monitored panel image as a to-be-enhanced panel image if the brightness evaluation result does not meet the brightness requirement, and perform image enhancement processing on the to-be-enhanced panel image to obtain a target brightness panel image that meets the brightness requirement; if the brightness evaluation result meets the brightness requirement, directly determining the plate image to be detected as the target brightness plate image;
a threshold determining module 54, configured to extract a contour line of the target brightness panel image, and determine an adaptive threshold corresponding to the panel image to be detected based on a contour line pixel value;
the area determining module 55 is configured to perform adaptive binarization processing on the image of the sheet to be detected based on the adaptive threshold, and determine a target area of the rolled sheet based on a result of the adaptive binarization processing.
Further, the brightness evaluation module 52 is further configured to:
calculating the pixel average value of all pixel points of the plate image to be detected;
comparing the pixel average value with a brightness evaluation threshold value, and if the pixel average value is smaller than the brightness evaluation threshold value, determining that the brightness evaluation result does not meet the brightness requirement; and if the pixel average value is greater than or equal to the brightness evaluation threshold value, determining the brightness evaluation result as meeting the brightness requirement.
Further, the device further comprises a denoising module, which is used for denoising the plate image to be detected based on the pixel value of each pixel point in the plate image to be detected to obtain a denoised image, so that brightness evaluation is performed based on the denoised image.
Further, the threshold determining module 54 includes:
the information screening unit is used for screening the edge information of the target brightness plate image through a Canny edge detection algorithm to obtain target pixel points containing the edge information;
the continuity detection unit is used for carrying out continuity detection on the target pixel points and determining the most continuous contour lines containing the target pixel points based on the continuity detection result;
The threshold value determining unit is used for obtaining the contour line coordinate values of all pixel points on the contour line, determining contour line pixel values from the plate image to be detected based on the contour line coordinate values, and determining the self-adaptive threshold value corresponding to the plate image to be detected based on the contour line pixel values.
Further, the continuity detecting unit is further configured to:
setting a continuity detection area, and arbitrarily acquiring one target pixel point as a central pixel point of the continuity detection area;
detecting in a residual area around the central pixel point, and if the residual area contains other target pixel points, confirming the other target pixel points and the central pixel point as continuous pixel points;
and determining a plurality of contour lines to be determined based on the continuous pixel points, and determining the contour line to be determined with the largest number of pixel points as the contour line of the target brightness plate image.
Further, the threshold determining unit is further configured to:
determining a contour line pixel point corresponding to the contour line coordinate value from the plate image to be detected, and determining a pixel value on the contour line pixel point as the contour line pixel value;
Randomly acquiring a target contour line pixel value from the contour line pixel values, and determining the target contour line pixel value as the adaptive threshold value; or alternatively, the first and second heat exchangers may be,
averaging all the contour line pixel values to obtain an average contour line pixel value; and determining the average contour pixel value as the adaptive threshold.
Further, the area determining module 55 is further configured to:
acquiring all pixel values to be processed in the plate image to be detected, and comparing the pixel values with the adaptive threshold;
if the pixel value to be processed is smaller than the self-adaptive threshold value, determining the corresponding pixel value to be processed as 0;
if the pixel value to be processed is greater than or equal to the self-adaptive threshold value, determining the corresponding pixel value to be processed as 255;
and determining a white area obtained after the self-adaptive binarization processing in the image of the plate to be detected as a target area of the rolled plate.
Compared with the prior art, the area detection device for the rolled plate provided by the embodiment of the invention has the advantages that the image of the plate to be detected is obtained, and the image of the plate to be detected contains the edge information of the rolled plate; evaluating the brightness of the plate image to be detected to obtain a brightness evaluation result; if the brightness evaluation result does not meet the brightness requirement, determining the panel image to be monitored as the panel image to be enhanced; performing image enhancement processing on the plate image to be enhanced to obtain a target brightness plate image meeting the brightness requirement; if the brightness evaluation result meets the brightness requirement, directly determining the plate image to be detected as the target brightness plate image; extracting a contour line of the target brightness plate image, and determining an adaptive threshold corresponding to the plate image to be detected based on a contour line pixel value; and carrying out self-adaptive binarization processing on the image of the plate to be detected based on the self-adaptive threshold value, and determining a target area of the rolled plate based on a self-adaptive binarization processing result, thereby realizing area detection on images of the rolled plate with different brightness. The method adopts the self-adaptive threshold value to divide the area, avoids the problem that the area cannot be divided or the error is large when the threshold value is fixed to divide the area, and improves the automation degree and the operability of the area division of the rolled plate.
According to an embodiment of the present invention, there is provided a storage medium storing at least one executable instruction for performing the region detection method of a rolled sheet in any of the above-described method embodiments.
Fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present invention, and the specific embodiment of the present invention is not limited to the specific implementation of the computer device.
As shown in fig. 9, the computer device may include: a processor 602, a communication interface (Communications Interface), a memory 606, and a communication bus 608.
Wherein: processor 602, communication interface 604, and memory 606 perform communication with each other via communication bus 608.
Communication interface 604 is used to communicate with network elements of other devices, such as clients or other servers.
The processor 602 is configured to execute the program 610, and may specifically perform the relevant steps of the method for detecting the area of the rolled sheet.
In particular, program 610 may include program code including computer-operating instructions.
The processor 602 may be a central processing unit CPU or a specific integrated circuit ASIC (Application Specific Integrated Circuit) or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in the computer device may be the same type of processor, such as one or more CPUs; but may also be different types of processors such as one or more CPUs and one or more ASICs.
A memory 606 for storing a program 610. The memory 606 may comprise high-speed RAM memory or may further comprise non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 610 may be specifically operable to cause the processor 602 to:
acquiring an image of a plate to be detected, wherein the image of the plate to be detected contains edge information of a rolled plate;
evaluating the brightness of the plate image to be detected to obtain a brightness evaluation result;
if the brightness evaluation result does not meet the brightness requirement, determining the plate image to be monitored as a plate image to be enhanced, and performing image enhancement processing on the plate image to be enhanced to obtain a target brightness plate image meeting the brightness requirement; if the brightness evaluation result meets the brightness requirement, directly determining the plate image to be detected as the target brightness plate image;
extracting a contour line of the target brightness plate image, and determining an adaptive threshold corresponding to the plate image to be detected based on a contour line pixel value;
and carrying out self-adaptive binarization processing on the image of the plate to be detected based on the self-adaptive threshold value, and determining a target area of the rolled plate based on a self-adaptive binarization processing result.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for detecting a region of a rolled sheet, comprising:
Acquiring an image of a plate to be detected, wherein the image of the plate to be detected contains edge information of a rolled plate;
evaluating the brightness of the plate image to be detected to obtain a brightness evaluation result;
if the brightness evaluation result does not meet the brightness requirement, determining the plate image to be detected as a plate image to be enhanced, and performing image enhancement processing on the plate image to be enhanced to obtain a target brightness plate image meeting the brightness requirement; if the brightness evaluation result meets the brightness requirement, directly determining the plate image to be detected as the target brightness plate image;
extracting a contour line of the target brightness plate image, and determining an adaptive threshold corresponding to the plate image to be detected based on a contour line pixel value;
and carrying out self-adaptive binarization processing on the image of the plate to be detected based on the self-adaptive threshold value, and determining a target area of the rolled plate based on a self-adaptive binarization processing result.
2. The method of claim 1, wherein the evaluating the brightness of the sheet image to be inspected to obtain a brightness evaluation result comprises:
calculating the pixel average value of all pixel points of the plate image to be detected;
Comparing the pixel average value with a brightness evaluation threshold value, and if the pixel average value is smaller than the brightness evaluation threshold value, determining that the brightness evaluation result does not meet the brightness requirement; and if the pixel average value is greater than or equal to the brightness evaluation threshold value, determining the brightness evaluation result as meeting the brightness requirement.
3. The method of claim 1, wherein prior to said evaluating the brightness of the sheet material image to be inspected, the method further comprises:
and denoising the plate image to be detected based on the pixel value of each pixel point in the plate image to be detected to obtain a denoised image, so that brightness evaluation is performed based on the denoised image.
4. The method of claim 1, wherein the extracting the contour line of the target brightness panel image and determining the adaptive threshold corresponding to the panel image to be detected based on contour line pixel values comprises:
screening the edge information of the target brightness plate image through a Canny edge detection algorithm to obtain a target pixel point containing the edge information;
performing continuity detection on the target pixel point, and determining a continuous contour line which contains the most target pixel point based on a continuity detection result;
And acquiring contour line coordinate values of all pixel points on the contour line, determining contour line pixel values from the plate image to be detected based on the contour line coordinate values, and determining the self-adaptive threshold corresponding to the plate image to be detected based on the contour line pixel values.
5. The method of claim 4, wherein the performing continuity detection on the target pixel point and determining a most continuous contour line including the target pixel point based on a continuity detection result comprises:
setting a continuity detection area, and arbitrarily acquiring one target pixel point as a central pixel point of the continuity detection area;
detecting in a residual area around the central pixel point, and if the residual area contains other target pixel points, confirming the other target pixel points and the central pixel point as continuous pixel points;
and determining a plurality of contour lines to be determined based on the continuous pixel points, and determining the contour line to be determined with the largest number of pixel points as the contour line of the target brightness plate image.
6. The method of claim 4, wherein determining contour line pixel values from the sheet material image to be detected based on the contour line coordinate values and determining the adaptive threshold corresponding to the sheet material image to be detected based on the contour line pixel values comprises:
Determining a contour line pixel point corresponding to the contour line coordinate value from the plate image to be detected, and determining a pixel value on the contour line pixel point as the contour line pixel value;
randomly acquiring a target contour line pixel value from the contour line pixel values, and determining the target contour line pixel value as the adaptive threshold value; or alternatively, the first and second heat exchangers may be,
averaging all the contour line pixel values to obtain an average contour line pixel value; and determining the average contour pixel value as the adaptive threshold.
7. The method according to any one of claims 1 to 6, wherein the performing adaptive binarization processing on the image of the sheet to be detected based on the adaptive threshold, and determining the target area of the rolled sheet based on the adaptive binarization processing result includes:
acquiring all pixel values to be processed in the plate image to be detected, and comparing the pixel values with the adaptive threshold;
if the pixel value to be processed is smaller than the self-adaptive threshold value, determining the corresponding pixel value to be processed as 0;
if the pixel value to be processed is greater than or equal to the self-adaptive threshold value, determining the corresponding pixel value to be processed as 255;
And determining a white area obtained after the self-adaptive binarization processing in the image of the plate to be detected as a target area of the rolled plate.
8. An area detecting apparatus for a rolled sheet, comprising:
the acquisition module is used for acquiring an image of the plate to be detected, wherein the image of the plate to be detected contains edge information of the rolled plate;
the brightness evaluation module is used for evaluating the brightness of the plate image to be detected to obtain a brightness evaluation result;
the enhancement processing module is used for determining the plate image to be enhanced as the plate image to be enhanced if the brightness evaluation result does not meet the brightness requirement, and carrying out image enhancement processing on the plate image to be enhanced to obtain a target brightness plate image meeting the brightness requirement; if the brightness evaluation result meets the brightness requirement, directly determining the plate image to be detected as the target brightness plate image;
the threshold value determining module is used for extracting the contour line of the target brightness plate image and determining an adaptive threshold value corresponding to the plate image to be detected based on the contour line pixel value;
and the region determining module is used for carrying out self-adaptive binarization processing on the image of the plate to be detected based on the self-adaptive threshold value and determining a target region of the rolled plate based on a self-adaptive binarization processing result.
9. A storage medium having stored therein at least one executable instruction for performing operations corresponding to the method for detecting the area of a rolled sheet according to any one of claims 1 to 7.
10. A computer device comprising a processor, a memory, a communication interface, and a communication bus, said processor, said memory, and said communication interface completing communication with each other via said communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the method for detecting the area of the rolled plate according to any one of claims 1 to 7.
CN202311453302.XA 2023-11-03 2023-11-03 Method and device for detecting area of rolled plate, storage medium and computer equipment Active CN117173185B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311453302.XA CN117173185B (en) 2023-11-03 2023-11-03 Method and device for detecting area of rolled plate, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311453302.XA CN117173185B (en) 2023-11-03 2023-11-03 Method and device for detecting area of rolled plate, storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN117173185A CN117173185A (en) 2023-12-05
CN117173185B true CN117173185B (en) 2024-01-19

Family

ID=88938015

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311453302.XA Active CN117173185B (en) 2023-11-03 2023-11-03 Method and device for detecting area of rolled plate, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN117173185B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102385753A (en) * 2011-11-17 2012-03-21 江苏大学 Illumination-classification-based adaptive image segmentation method
CN102541063A (en) * 2012-03-26 2012-07-04 重庆邮电大学 Line tracking control method and line tracking control device for micro intelligent automobiles
CN112419207A (en) * 2020-11-17 2021-02-26 苏宁金融科技(南京)有限公司 Image correction method, device and system
CN113688811A (en) * 2021-10-26 2021-11-23 北京美摄网络科技有限公司 Image processing method, image processing device, electronic equipment and storage medium
WO2023029467A1 (en) * 2021-08-31 2023-03-09 上海商汤智能科技有限公司 Method and apparatus for vehicle light detection, electronic device, and storage medium
WO2023179122A1 (en) * 2022-03-23 2023-09-28 广东利元亨智能装备股份有限公司 Defect detection method and apparatus, electronic device, and readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2293247B1 (en) * 2009-07-29 2012-09-05 Harman Becker Automotive Systems GmbH Edge detection with adaptive threshold
KR101929560B1 (en) * 2013-01-29 2019-03-14 삼성전자주식회사 Method and apparatus for detecting edge in image
CN104077773A (en) * 2014-06-23 2014-10-01 北京京东方视讯科技有限公司 Image edge detection method, and image target identification method and device
CN112330688A (en) * 2020-11-02 2021-02-05 腾讯科技(深圳)有限公司 Image processing method and device based on artificial intelligence and computer equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102385753A (en) * 2011-11-17 2012-03-21 江苏大学 Illumination-classification-based adaptive image segmentation method
CN102541063A (en) * 2012-03-26 2012-07-04 重庆邮电大学 Line tracking control method and line tracking control device for micro intelligent automobiles
CN112419207A (en) * 2020-11-17 2021-02-26 苏宁金融科技(南京)有限公司 Image correction method, device and system
WO2023029467A1 (en) * 2021-08-31 2023-03-09 上海商汤智能科技有限公司 Method and apparatus for vehicle light detection, electronic device, and storage medium
CN113688811A (en) * 2021-10-26 2021-11-23 北京美摄网络科技有限公司 Image processing method, image processing device, electronic equipment and storage medium
WO2023179122A1 (en) * 2022-03-23 2023-09-28 广东利元亨智能装备股份有限公司 Defect detection method and apparatus, electronic device, and readable storage medium

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
Object detection in underwater image by detecting edges using adaptive thresholding;Akshita Saini etc.;IEEE Xplore;全文 *
中厚板轧制过程高精度智能化控制系统的研发进展与应用;矫志杰等;轧钢;第39卷(第06期);全文 *
基于目标边缘的图像二值化方法研究;郑浩等;计量技术(第04期);全文 *
基于视觉的卡钳毛刺检测和定位方法研究;韩进宇;吴超群;;数字制造科学(第04期);全文 *
视频序列中运动目标检测算法;胡晓辉;关山;;计算机工程与应用(第16期);全文 *

Also Published As

Publication number Publication date
CN117173185A (en) 2023-12-05

Similar Documents

Publication Publication Date Title
CN114937055B (en) Image self-adaptive segmentation method and system based on artificial intelligence
CN110163219B (en) Target detection method based on image edge recognition
EP3176751B1 (en) Information processing device, information processing method, computer-readable recording medium, and inspection system
CN111008961B (en) Transmission line equipment defect detection method and system, equipment and medium thereof
CN112419298B (en) Bolt node plate rust detection method, device, equipment and storage medium
CN111489337B (en) Automatic optical detection pseudo defect removal method and system
CN109472788B (en) Method for detecting flaw on surface of airplane rivet
CN111221996B (en) Instrument screen vision detection method and system
CN110276759B (en) Mobile phone screen bad line defect diagnosis method based on machine vision
CN118154605B (en) Textile AI flaw detection method, system and equipment
CN113766209A (en) Camera offset processing method and device
CN117152165B (en) Photosensitive chip defect detection method and device, storage medium and electronic equipment
CN113012157A (en) Visual detection method and system for equipment defects
CN113362238A (en) Test image processing method and device, electronic equipment and storage medium
CN116128873A (en) Bearing retainer detection method, device and medium based on image recognition
CN113971681A (en) Edge detection method for belt conveyor in complex environment
CN116071272A (en) Image correction method and device, electronic equipment and storage medium thereof
CN114723728A (en) Method and system for detecting CD line defects of silk screen of glass cover plate of mobile phone camera
CN112950594B (en) Method, device and storage medium for detecting surface defects of product
CN115719326A (en) PCB defect detection method and device
CN106530292B (en) A kind of steel strip surface defect image Fast Identification Method based on line scan camera
CN117173185B (en) Method and device for detecting area of rolled plate, storage medium and computer equipment
CN110634124A (en) Method and equipment for area detection
CN111935480B (en) Detection method for image acquisition device and related device
JP7469740B2 (en) Belt inspection system and belt inspection program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant