CN116993675A - Method, device, equipment and medium for measuring axial angle of curved surface of isolation block - Google Patents

Method, device, equipment and medium for measuring axial angle of curved surface of isolation block Download PDF

Info

Publication number
CN116993675A
CN116993675A CN202310800368.5A CN202310800368A CN116993675A CN 116993675 A CN116993675 A CN 116993675A CN 202310800368 A CN202310800368 A CN 202310800368A CN 116993675 A CN116993675 A CN 116993675A
Authority
CN
China
Prior art keywords
image
curved surface
straight line
effective area
processing
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
CN202310800368.5A
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.)
Hangzhou AIMS Intelligent Technology Co Ltd
Original Assignee
Hangzhou AIMS Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou AIMS Intelligent Technology Co Ltd filed Critical Hangzhou AIMS Intelligent Technology Co Ltd
Priority to CN202310800368.5A priority Critical patent/CN116993675A/en
Publication of CN116993675A publication Critical patent/CN116993675A/en
Pending legal-status Critical Current

Links

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4007Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation
    • 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/13Edge detection
    • 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
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • 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/20092Interactive image processing based on input by user
    • G06T2207/20104Interactive definition of region of interest [ROI]
    • 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/20172Image enhancement details
    • G06T2207/20192Edge enhancement; Edge preservation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses a method, a device, equipment and a medium for measuring the axial angle of a curved surface of a spacer block, which are applied to the field of part angle measurement and comprise the following steps: acquiring a 3D depth image of a concave curved surface of the isolation block; carrying out gray level processing, type conversion and specification conversion on the depth image to obtain a preprocessed image; extracting the area of the preprocessed image to obtain an effective area containing the curved surface of the isolation block; measuring the boundary size of the effective area, and determining a longitudinal central axis according to the boundary size; screening the direction lines in the effective area to determine a target straight line; calculating the included angle between the target straight line and the longitudinal central axis to obtain the axial angle of the curved surface of the isolation block. Compared with manual detection, the automatic detection method based on the machine vision, which is a computer image processing technology, can greatly reduce the detection labor intensity of workers, has high detection precision and high speed, and can effectively ensure the qualification rate of products.

Description

Method, device, equipment and medium for measuring axial angle of curved surface of isolation block
Technical Field
The application relates to the field of part angle testing, in particular to a method, a device, equipment and a medium for measuring the axial angle of a curved surface of a spacer block.
Background
In the production of the isolation block of the nuclear power station, the isolation block is required to be perfectly attached to the raw material rod according to a fixed standard angle, and then the isolation block and the raw material rod are installed in a reactor after spot welding, and the isolation block and the raw material rod can be perfectly attached to each other according to the fixed standard angle, so that nuclear leakage is avoided, and safety is guaranteed. And when the joint angle (namely the curved axial angle) between the isolation block and the raw material rod is not in the fixed standard angle range, the isolation block and the raw material rod are installed in the reactor after spot welding, the joint is incomplete, and nuclear leakage is caused. Therefore, accurate measurement of the curved axial angle of the spacer is critical to avoid the occurrence of nuclear leakage.
In the current measuring method for the axial angle of the curved surface of the isolation block, some edge points of the curved surface of the isolation block are collected first, and the edge points are fitted to obtain the curved surface, so that the obtained curved surface has poor precision because of estimated values in the fitting process, and the axial angle calculated based on the curved surface is more inaccurate.
Disclosure of Invention
In view of the above, the application aims to provide a method, a device, equipment and a medium for measuring the axial angle of a curved surface of a spacer, which solve the problems of inaccurate measurement and low efficiency of the axial angle of the curved surface of the spacer in the prior art.
In order to solve the technical problems, the application provides a method for measuring the axial angle of a curved surface of a spacer, which comprises the following steps:
acquiring a 3D depth image of a concave curved surface of the isolation block;
performing gray level processing, type conversion and specification conversion on the depth image to obtain a preprocessed image;
extracting the area of the preprocessed image to obtain an effective area containing the curved surface of the isolation block;
measuring the boundary size of the effective area, and determining a longitudinal central axis according to the boundary size;
screening the direction lines in the effective area to determine a target straight line;
and calculating an included angle between the target straight line and the longitudinal central axis to obtain the axial angle of the curved surface of the isolation block.
Optionally, the performing gray scale processing, type conversion and specification conversion on the depth image to obtain a preprocessed image further includes:
carrying out gray level image on the depth image to obtain a gray level image;
and converting the gray level image from 16 bits to 8 bits, and performing stretching transformation processing and horizontal angle correction processing on the gray level image to obtain the preprocessed image.
Optionally, the performing area extraction on the preprocessed image to obtain an effective area includes:
performing region-of-interest processing on the preprocessed image to obtain an initial positioning region;
performing minimum circumscribed rectangle processing on the initial positioning area according to morphological characteristics of the isolation block to obtain rough boundary information;
accurately fitting the boundary by using a caliper method based on the rough boundary information to obtain two straight edges and two curved edges;
extending the two straight edges and the two curved edges to form a closed area; the enclosed area is the active area.
Optionally, the screening the directional lines in the effective area to determine a target straight line includes:
acquiring the direction line in the effective area;
screening the direction lines according to a preset angle and a preset length to obtain a target straight line group;
and screening the straight lines in the target straight line group according to preset conditions, and determining the target straight lines.
Optionally, the screening the lines in the target line group according to the preset condition, and determining the target line includes:
fitting and connecting straight lines in the target straight line group to obtain a fitting straight line;
and analyzing each fitting straight line according to the absolute angle information of the fitting straight line, and removing abnormal values by Gaussian filtering to obtain the target straight line.
Optionally, the acquiring the direction line of the effective area includes:
performing image enhancement image processing and image sharpening processing on the effective area to obtain a preprocessed image area;
extracting a directional line contour line of the effective area by adopting image enhancement processing and threshold segmentation processing, and discretizing;
fitting the discretized directional line contour lines to obtain the directional lines.
Optionally, the performing image enhancement image processing and image sharpening processing on the effective area includes:
performing image enhancement processing on the effective area by using a gray value scaling algorithm;
and carrying out image sharpening processing on the effective area by utilizing an edge detection algorithm.
The application also provides a device for measuring the axial angle of the curved surface of the isolation block, which comprises:
the image acquisition module is used for acquiring a 3D depth image of the concave curved surface of the isolation block;
the preprocessing module is used for carrying out gray level processing, type conversion and specification conversion on the depth image to obtain a preprocessed image;
the area extraction module is used for carrying out area extraction on the preprocessed image to obtain an effective area containing the curved surface of the isolation block;
the longitudinal central axis determining module is used for measuring the boundary size of the effective area and determining a longitudinal central axis according to the boundary size;
the target straight line determining module is used for screening the direction lines in the effective area and determining a target straight line;
and the calculation module is used for calculating the included angle between the target straight line and the longitudinal central axis to obtain the axial angle of the curved surface of the isolation block.
The application also provides a spacer block curved surface axial angle measuring device, which comprises:
a memory for storing a computer program;
and the processor is used for realizing the step of the method for measuring the axial angle of the curved surface of the isolation block when executing the computer program.
The application also provides a medium, wherein the medium is stored with a computer program, and the computer program realizes the steps of the method for measuring the axial angle of the curved surface of the isolation block when being executed by a processor.
Therefore, the 3D depth image of the concave curved surface of the isolation block is obtained; carrying out gray level processing, type conversion and specification conversion on the depth image to obtain a preprocessed image; extracting the area of the preprocessed image to obtain an effective area containing the curved surface of the isolation block; measuring the boundary size of the effective area, and determining a longitudinal central axis according to the boundary size; screening the direction lines in the effective area to determine a target straight line; calculating the included angle between the target straight line and the longitudinal central axis to obtain the axial angle of the curved surface of the isolation block. Compared with manual detection, the automatic detection method based on the machine vision, which is a computer image processing technology, can greatly reduce the detection labor intensity of workers, has high detection precision and high speed, and can effectively ensure the qualification rate of products.
In addition, the application also provides a device, equipment and medium for measuring the axial angle of the curved surface of the isolation block, which also have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for measuring axial angles of curved surfaces of spacer blocks according to an embodiment of the present application;
fig. 2 is a 3D depth image of an isolation block according to an embodiment of the present application;
FIG. 3 is an effect diagram after image preprocessing according to an embodiment of the present application;
FIG. 4 is a curved surface axial fit straight line diagram provided by an embodiment of the present application;
FIG. 5 is a graph showing the effect of Kirsch treatment according to the embodiment of the present application;
FIG. 6 is a graph of measurement results according to an embodiment of the present application;
FIG. 7 is a schematic structural diagram of a spacer curved surface axial angle measurement device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a spacer curved surface axial angle measurement device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, fig. 1 is a flowchart of a method for measuring an axial angle of a curved surface of an isolation block according to an embodiment of the present application. The method may include:
s101: and obtaining a 3D depth image of the concave curved surface of the isolation block.
The execution body of the embodiment is a terminal. The present embodiment is not limited to the terminal. For example, a dedicated terminal; or may also be a general purpose terminal. The specific type of spacer curved surface is not limited in this embodiment. For example, it may be a spacer curved surface conforming to a cylindrical surface; or the curved surface of the isolation block which is attached to the surface of the round table. The laminating in this embodiment is the laminating of isolation piece and cylinder or round platform according to fixed standard angle. Taking the curved surface of the isolation block attached to the cylindrical surface as an example, a 3D depth image of the isolation block is shown in fig. 2.
S102: and carrying out gray level processing, type conversion and specification conversion on the depth image to obtain a preprocessed image.
The present embodiment performs preprocessing on the depth image, including gradation processing, type conversion, and specification conversion, to obtain a preprocessed image.
Further, in order to ensure the effect of image processing and facilitate the later image extraction and processing, the foregoing performing gray scale processing, type conversion and specification conversion on the depth image to obtain a preprocessed image may include the following steps:
step 21: carrying out gray level image on the depth image to obtain a gray level image;
step 22: converting the gray level image from 16 bits to 8 bits, and performing stretching transformation processing and horizontal angle correction processing on the gray level image to obtain a preprocessed image.
The present embodiment is not limited to the order of type alignment and specification conversion. According to the embodiment, the whole image is stretched according to different longitudinal resolutions, the 16-bit gray image is converted into the 8-bit gray image, application of a subsequent image processing algorithm is facilitated, and four-corner gray information of the gray image is extracted to conduct levelness correction so as to obtain a preprocessed image.
S103: and extracting the area of the preprocessed image to obtain an effective area containing the curved surface of the isolation block.
The present embodiment performs region extraction based on the preprocessed image to obtain an effective region.
Further, in order to accurately extract the effective area, the area extracting the preprocessed image to obtain the effective area including the curved surface of the isolation block may include the following steps:
step 31: performing region-of-interest processing on the preprocessed image to obtain an initial positioning region;
step 32: performing minimum circumscribed rectangle processing on the initial positioning area according to morphological characteristics of the isolation block to obtain rough boundary information;
step 33: accurately fitting the boundary by using a caliper method based on rough boundary information to obtain two straight edges and two curved edges;
step 34: extending the two straight edges and the two curved edges to form a closed area; the enclosed area is the active area.
In the embodiment, the pre-treatment is performed in advance to perform the treatment of the ROI (Region of interest pooling, the pooling of the region of interest) to obtain the initial positioning region of the isolation block, the interference of other ineffective regions is reduced, the minimum external rectangular treatment is performed according to the morphological characteristics of the isolation block to obtain the rough boundary information, the rough boundary information is converted into matrix parameters, the boundary of the isolation block is precisely fitted by using a linear caliper and a circular caliper to obtain two straight lines and two curves respectively, the four lines are respectively prolonged to obtain the intersection points, and the accurate closed boundary, namely the effective region, is obtained by reconnecting and extracting. As shown in fig. 3, fig. 3 is an effect diagram after image preprocessing according to an embodiment of the present application.
S104: the boundary dimension of the active area is measured and the longitudinal central axis is determined from the boundary dimension.
In this embodiment, after the effective area is obtained, the boundary size of the effective area is measured, and the longitudinal central axis is determined according to the boundary size information of the effective area.
S105: and screening the direction lines in the effective area to determine a target straight line.
In this embodiment, there are numerous directional lines in the effective area, and the directional lines need to be screened to determine a target straight line.
Further, in order to determine the accuracy of the target straight line, the above-mentioned screening of the directional lines in the effective area, and the determination of the target straight line may include the following steps:
step 41: acquiring a direction line in an effective area;
step 42: screening the direction lines according to a preset angle and a preset length to obtain a target straight line group;
step 43: and screening the straight lines in the target straight line group according to preset conditions to determine the target straight line.
In this embodiment, a plurality of direction lines are initially screened by using a preset angle and a preset length to obtain a target straight line group. The preset angle and the preset length in this embodiment may be empirically set.
Further, in order to more accurately determine the target straight line, the foregoing screening the straight lines in the target straight line group according to the preset condition, and determining the target straight line may include the following steps, which may specifically include:
step 51: fitting and connecting straight lines in the target straight line group to obtain a fitting straight line;
step 52: and analyzing each fitting straight line according to the absolute angle information of the fitting straight line, and removing abnormal values by utilizing Gaussian filtering to obtain a target straight line.
In this embodiment, straight lines which can be directly connected in the target straight line group are subjected to fitting connection to obtain longer and clearer fitting straight lines, as shown in fig. 4, and fig. 4 is a curved surface axial fitting straight line diagram provided by the embodiment of the application. And acquiring and analyzing absolute angle information of each fitting straight line, and removing abnormal values by using a Gaussian filter algorithm to obtain a target straight line.
Further, for accuracy and definition of the direction line acquisition, the acquiring the direction line in the effective area may include the following steps:
step 61: performing image enhancement image processing and image sharpening processing on the effective area to obtain a preprocessed image area;
step 62: extracting a directional line contour line of an effective area by adopting image enhancement processing and threshold segmentation processing, and discretizing;
step 63: fitting the discretized directional line contour lines to obtain directional lines.
The present embodiment performs image enhancement and image sharpening processing on the effective area to highlight directional features, i.e., directional lines. The present embodiment is not limited to a specific image enhancement algorithm and image sharpening algorithm. And extracting a directional line contour line through image enhancement and threshold segmentation, discretizing, and fitting a straight line to obtain a directional line.
Further, in order to make the image clearer and the contrast stronger, further extracting useful information, the image enhancement image processing and the image sharpening processing for the effective area may include the following steps, which may specifically include:
step 71: image enhancement processing is carried out by utilizing the effective area of the gray value scaling algorithm;
step 72: and carrying out image sharpening processing on the effective area by utilizing an edge detection algorithm.
In the embodiment, the Kirsch algorithm (an edge detection algorithm) is adopted to sharpen the image, gradient key information is further extracted, the processed image can clearly display curved surface direction lines, as shown in fig. 5, and fig. 5 is an effect diagram after Kirsch processing provided by the embodiment of the application. And the image contrast is enhanced using a gray value scaling algorithm. The scaling factor Mult and the offset compensation value Add parameter in the gray value scaling algorithm are obtained by the following formula:
Add=-Mult×GMin;
wherein Mult is a scaling factor, GMin is a minimum gray value of the image, GMax is a maximum gray value of the image, and Add is an offset compensation value.
S106: calculating the included angle between the target straight line and the longitudinal central axis to obtain the axial angle of the curved surface of the isolation block.
According to the embodiment, the axial angle of the curved surface of the isolation block is obtained by calculating the included angle between the target straight line and the longitudinal central axis. The measurement results are shown in fig. 6, and fig. 6 is a measurement result diagram provided in the embodiment of the present application.
By applying the method for measuring the axial angle of the curved surface of the isolation block, provided by the embodiment of the application, the 3D depth image of the concave curved surface of the isolation block is obtained; carrying out gray level processing, type conversion and specification conversion on the depth image to obtain a preprocessed image; extracting the area of the preprocessed image to obtain an effective area containing the curved surface of the isolation block; measuring the boundary size of the effective area, and determining a longitudinal central axis according to the boundary size; screening the direction lines in the effective area to determine a target straight line; calculating the included angle between the target straight line and the longitudinal central axis to obtain the axial angle of the curved surface of the isolation block. Compared with manual detection, the method for automatically detecting the product by utilizing a computer image processing technology, namely machine vision, can greatly reduce the detection labor intensity of workers, has high detection precision and high speed, and can effectively ensure the qualification rate of the product; compared with a method for directly fitting a curved surface, the method has great advantages in operation speed and accuracy, has stronger robustness and can adapt to a plurality of changes in a complex environment. The gray level processing is carried out on the image, 16 bits are converted into 8 bits, the stretching and horizontal angle correction processing is carried out on the gray level image, and the accuracy of the obtained angle and the high efficiency of a later algorithm are ensured; the region of interest is utilized for initial positioning, and then a caliper method is utilized for accurately fitting the boundary, so that an accurate and reliable effective region is obtained while the length is prolonged; the primary screening is carried out according to the preset angle and length, and the secondary screening is carried out according to the preset condition, so that the accuracy of the target straight line is ensured; in addition, absolute angle information of the fitting straight line is utilized for analysis, abnormal values are removed through a Gaussian filtering algorithm, and accuracy of the target straight line is improved; and the image is subjected to image enhancement and sharpening, so that lines and useful information are fully embodied; and the gray value scaling algorithm and the edge detection algorithm are adopted for processing, so that the processing efficiency is improved.
The axial angle measuring device for the curved surface of the isolation block provided by the embodiment of the application is introduced below, and the axial angle measuring device for the curved surface of the isolation block and the axial angle measuring method for the curved surface of the isolation block described below can be correspondingly referred to each other.
Referring to fig. 7 specifically, fig. 7 is a schematic structural diagram of an axial angle measuring device for a curved surface of a spacer according to an embodiment of the present application, which may include:
the image acquisition module 100 is used for acquiring a 3D depth image of the concave curved surface of the isolation block;
the preprocessing module 200 is used for performing gray level processing, type conversion and specification conversion on the depth image to obtain a preprocessed image;
the region extraction module 300 is configured to perform region extraction on the preprocessed image to obtain an effective region including a curved surface of the isolation block;
a longitudinal central axis determining module 400, configured to measure a boundary dimension of the effective area, and determine a longitudinal central axis according to the boundary dimension;
the target straight line determining module 500 is configured to screen the direction lines in the effective area, and determine a target straight line;
the calculating module 600 is configured to calculate an included angle between the target straight line and the longitudinal central axis to obtain an axial angle of the curved surface of the spacer.
Based on the above embodiment, the image acquisition module 100 may include:
the gray level processing unit is used for carrying out gray level image on the depth image to obtain a gray level image;
and the transformation unit is used for converting the gray level image from 16 bits to 8 bits, and carrying out stretching transformation processing and horizontal angle correction processing on the gray level image to obtain the preprocessed image.
Based on the above embodiment, the region extraction module 300 may include:
the region-of-interest processing unit is used for processing the region-of-interest of the preprocessed image to obtain an initial positioning region;
the minimum external rectangle processing unit is used for carrying out minimum external rectangle processing on the initial positioning area according to the morphological characteristics of the isolation block to obtain rough boundary information;
the boundary fitting unit is used for precisely fitting the boundary by using a caliper method based on the rough boundary information to obtain two straight edges and two curved edges;
the extension unit is used for extending the two straight edges and the two curved edges to form a closed area; the enclosed area is the active area.
Based on the above embodiment, the target straight line determining module 500 may include:
the acquisition unit is used for acquiring the direction lines in the effective area;
the first screening unit is used for screening the direction lines according to a preset angle and a preset length to obtain a target straight line group;
and the second screening unit is used for screening the straight lines in the target straight line group according to preset conditions and determining the target straight lines.
Based on the above embodiment, the second screening unit may include:
the fitting connection subunit is used for fitting and connecting the straight lines in the target straight line group to obtain a fitting straight line;
and the fitting straight line analysis and anomaly filtering subunit is used for analyzing each fitting straight line according to the absolute angle information of the fitting straight line, and removing anomaly values by Gaussian filtering to obtain the target straight line.
Based on the above embodiment, the acquiring unit may include:
the image enhancement and sharpening processing subunit is used for carrying out image enhancement image processing and image sharpening processing on the effective area to obtain a preprocessed image area;
an extraction subunit, configured to extract and discretize a directional line contour line of the effective area by using image enhancement processing and threshold segmentation processing;
and the fitting subunit is used for fitting the discretized directional line contour lines to obtain the directional lines.
Based on the above embodiment, the image enhancement and sharpening processing subunit may include:
an image enhancement subunit, configured to perform image enhancement processing on the effective area by using a gray value scaling algorithm;
and the sharpening processing subunit is used for carrying out image sharpening processing on the effective area by utilizing an edge detection algorithm.
It should be noted that, the order of the modules and units in the spacer curved surface axial angle measuring device can be changed before and after the modules and units do not affect the logic.
The device for measuring the axial angle of the curved surface of the isolation block is used for acquiring the 3D depth image of the concave curved surface of the isolation block through the image acquisition module 100; the preprocessing module 200 is used for performing gray level processing, type conversion and specification conversion on the depth image to obtain a preprocessed image; the region extraction module 300 is configured to perform region extraction on the preprocessed image to obtain an effective region including a curved surface of the isolation block; a longitudinal central axis determining module 400, configured to measure a boundary dimension of the effective area, and determine a longitudinal central axis according to the boundary dimension; the target straight line determining module 500 is configured to screen the direction lines in the effective area, and determine a target straight line; the calculating module 600 is configured to calculate an included angle between the target straight line and the longitudinal central axis to obtain an axial angle of the curved surface of the spacer. Compared with manual detection, the device can greatly reduce the detection labor intensity of workers, has high detection precision and high speed, and can effectively ensure the qualification rate of products; compared with a method for directly fitting a curved surface, the method has great advantages in operation speed and accuracy, has stronger robustness and can adapt to a plurality of changes in a complex environment. The gray level processing is carried out on the image, 16 bits are converted into 8 bits, the stretching and horizontal angle correction processing is carried out on the gray level image, and the accuracy of the obtained angle and the high efficiency of a later algorithm are ensured; the region of interest is utilized for initial positioning, and then a caliper method is utilized for accurately fitting the boundary, so that an accurate and reliable effective region is obtained while the length is prolonged; the primary screening is carried out according to the preset angle and length, and the secondary screening is carried out according to the preset condition, so that the accuracy of the target straight line is ensured; in addition, absolute angle information of the fitting straight line is utilized for analysis, abnormal values are removed through a Gaussian filtering algorithm, and accuracy of the target straight line is improved; and the image is subjected to image enhancement and sharpening, so that lines and useful information are fully embodied; and the gray value scaling algorithm and the edge detection algorithm are adopted for processing, so that the processing efficiency is improved.
The axial angle measuring device for the curved surface of the isolation block provided by the embodiment of the application is introduced below, and the axial angle measuring device for the curved surface of the isolation block and the axial angle measuring method for the curved surface of the isolation block described below can be correspondingly referred to each other.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an axial angle measurement device for a curved surface of an isolation block according to an embodiment of the present application, which may include:
a memory 10 for storing a computer program;
and the processor 20 is used for executing a computer program to realize the method for measuring the axial angle of the curved surface of the isolation block.
The memory 10, the processor 20, and the communication interface 31 all communicate with each other via a communication bus 32.
In the embodiment of the present application, the memory 10 is used for storing one or more programs, the programs may include program codes, the program codes include computer operation instructions, and in the embodiment of the present application, the memory 10 may store programs for implementing the following functions:
acquiring a 3D depth image of a concave curved surface of the isolation block;
carrying out gray level processing, type conversion and specification conversion on the depth image to obtain a preprocessed image;
extracting the area of the preprocessed image to obtain an effective area containing the curved surface of the isolation block;
measuring the boundary size of the effective area, and determining a longitudinal central axis according to the boundary size;
screening the direction lines in the effective area to determine a target straight line;
calculating the included angle between the target straight line and the longitudinal central axis to obtain the axial angle of the curved surface of the isolation block.
In one possible implementation, the memory 10 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, and at least one application program required for functions, etc.; the storage data area may store data created during use.
In addition, memory 10 may include read only memory and random access memory and provide instructions and data to the processor. A portion of the memory may also include NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, where the operating instructions may include various operating instructions for performing various operations. The operating system may include various system programs for implementing various basic tasks as well as handling hardware-based tasks.
The processor 20 may be a central processing unit (Central Processing Unit, CPU), an asic, a dsp, a fpga or other programmable logic device, and the processor 20 may be a microprocessor or any conventional processor. The processor 20 may call a program stored in the memory 10.
The communication interface 31 may be an interface of a communication module for connecting with other devices or systems.
Of course, it should be noted that the structure shown in fig. 8 is not limited to the spacer curved surface axial angle measurement apparatus according to the embodiment of the present application, and the spacer curved surface axial angle measurement apparatus may include more or fewer components than those shown in fig. 8, or may be combined with some components in practical applications.
The following describes a medium provided by an embodiment of the present application, and a readable storage medium described below and a method for measuring an axial angle of a curved surface of a spacer described above may be referred to correspondingly.
The application also provides a medium, and the medium stores a computer program which realizes the steps of the method for measuring the axial angle of the curved surface of the isolation block when being executed by a processor.
The medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
Finally, it is further noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The method, the device, the equipment and the medium for measuring the axial angle of the curved surface of the isolation block are described in detail, and specific examples are applied to the principle and the implementation mode of the method, the device and the medium for measuring the axial angle of the curved surface of the isolation block, and the description of the examples is only used for helping to understand the method and the core idea of the method; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. The method for measuring the axial angle of the curved surface of the isolation block is characterized by comprising the following steps of:
acquiring a 3D depth image of a concave curved surface of the isolation block;
performing gray level processing, type conversion and specification conversion on the depth image to obtain a preprocessed image;
extracting the area of the preprocessed image to obtain an effective area containing the curved surface of the isolation block;
measuring the boundary size of the effective area, and determining a longitudinal central axis according to the boundary size;
screening the direction lines in the effective area to determine a target straight line;
and calculating an included angle between the target straight line and the longitudinal central axis to obtain the axial angle of the curved surface of the isolation block.
2. The method for measuring the axial angle of the curved surface of the spacer according to claim 1, wherein the performing gray scale processing, type conversion and specification conversion on the depth image to obtain a preprocessed image, further comprises:
carrying out gray level image on the depth image to obtain a gray level image;
and converting the gray level image from 16 bits to 8 bits, and performing stretching transformation processing and horizontal angle correction processing on the gray level image to obtain the preprocessed image.
3. The method for measuring the axial angle of the curved surface of the spacer according to claim 1, wherein the performing region extraction on the preprocessed image to obtain an effective region comprises:
performing region-of-interest processing on the preprocessed image to obtain an initial positioning region;
performing minimum circumscribed rectangle processing on the initial positioning area according to morphological characteristics of the isolation block to obtain rough boundary information;
accurately fitting the boundary by using a caliper method based on the rough boundary information to obtain two straight edges and two curved edges;
extending the two straight edges and the two curved edges to form a closed area; the enclosed area is the active area.
4. The method for measuring the axial angle of the curved surface of the spacer according to claim 1, wherein the step of screening the directional lines in the effective area to determine the target straight line comprises the steps of:
acquiring the direction line in the effective area;
screening the direction lines according to a preset angle and a preset length to obtain a target straight line group;
and screening the straight lines in the target straight line group according to preset conditions, and determining the target straight lines.
5. The method for measuring the axial angle of the curved surface of the spacer according to claim 4, wherein the step of screening the straight lines in the target straight line group according to the preset condition to determine the target straight line includes:
fitting and connecting straight lines in the target straight line group to obtain a fitting straight line;
and analyzing each fitting straight line according to the absolute angle information of the fitting straight line, and removing abnormal values by Gaussian filtering to obtain the target straight line.
6. The method for measuring an axial angle of a curved surface of a spacer according to claim 4, wherein the obtaining the directional line of the effective area includes:
performing image enhancement image processing and image sharpening processing on the effective area to obtain a preprocessed image area;
extracting a directional line contour line of the effective area by adopting image enhancement processing and threshold segmentation processing, and discretizing;
fitting the discretized directional line contour lines to obtain the directional lines.
7. The method for measuring the axial angle of the curved surface of the spacer according to claim 6, wherein the image enhancement image processing and the image sharpening processing are performed on the effective area, and the method comprises the steps of:
performing image enhancement processing on the effective area by using a gray value scaling algorithm;
and carrying out image sharpening processing on the effective area by utilizing an edge detection algorithm.
8. The utility model provides a spacer curved surface axial angle measuring device which characterized in that includes:
the image acquisition module is used for acquiring a 3D depth image of the concave curved surface of the isolation block;
the preprocessing module is used for carrying out gray level processing, type conversion and specification conversion on the depth image to obtain a preprocessed image;
the area extraction module is used for carrying out area extraction on the preprocessed image to obtain an effective area containing the curved surface of the isolation block;
the longitudinal central axis determining module is used for measuring the boundary size of the effective area and determining a longitudinal central axis according to the boundary size;
the target straight line determining module is used for screening the direction lines in the effective area and determining a target straight line;
and the calculation module is used for calculating the included angle between the target straight line and the longitudinal central axis to obtain the axial angle of the curved surface of the isolation block.
9. The utility model provides a spacer curved surface axial angle measuring equipment which characterized in that includes:
a memory for storing a computer program;
a processor for implementing the steps of the spacer curved surface axial angle measurement method according to any one of claims 1 to 7 when executing the computer program.
10. A medium having stored thereon a computer program which, when executed by a processor, implements the steps of the spacer curved surface axial angle measurement method according to any one of claims 1 to 7.
CN202310800368.5A 2023-07-03 2023-07-03 Method, device, equipment and medium for measuring axial angle of curved surface of isolation block Pending CN116993675A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310800368.5A CN116993675A (en) 2023-07-03 2023-07-03 Method, device, equipment and medium for measuring axial angle of curved surface of isolation block

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310800368.5A CN116993675A (en) 2023-07-03 2023-07-03 Method, device, equipment and medium for measuring axial angle of curved surface of isolation block

Publications (1)

Publication Number Publication Date
CN116993675A true CN116993675A (en) 2023-11-03

Family

ID=88531058

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310800368.5A Pending CN116993675A (en) 2023-07-03 2023-07-03 Method, device, equipment and medium for measuring axial angle of curved surface of isolation block

Country Status (1)

Country Link
CN (1) CN116993675A (en)

Similar Documents

Publication Publication Date Title
WO2019134252A1 (en) Method and device for automated portrayal and accurate measurement of width of structural crack
CN107341802B (en) Corner sub-pixel positioning method based on curvature and gray scale compounding
CN111336990A (en) Tunnel section convergence rapid analysis method and device
CN117237368B (en) Bridge crack detection method and system
CN103455813A (en) Method for facula center positioning of CCD image measurement system
CN111723821A (en) Detection and identification method and device for power plant instrument image
CN106447684A (en) Industrial CT image weak edge dimension measuring method
CN107742291A (en) A kind of the defects of photovoltaic glass detection method and device
CN102496161A (en) Method for extracting contour of image of printed circuit board (PCB)
CN105258647B (en) A kind of visible detection method of automobile lock riveting point
CN111047588A (en) Imaging measurement method for size of shaft type small part
CN114693633A (en) Welding defect detection method, device and system
CN112308872A (en) Image edge detection method based on multi-scale Gabor first-order derivative
CN115482211A (en) Tunnel overbreak and underexcavation detection method and device, electronic equipment and storage medium
CN103455985A (en) Road crack enhancement method based on Hessian structural analysis
CN109556542B (en) CT size measurement method for complex lattice hollow structure
CN104732530A (en) Image edge detection method
CN113763279A (en) Accurate correction processing method for image with rectangular frame
CN107492093B (en) bearing abnormity detection method based on image processing
CN113947583A (en) Weld joint nondestructive testing method based on deep learning two-dimensional time sequence image
CN111539951B (en) Visual detection method for outline size of ceramic grinding wheel head
CN108550142A (en) A kind of tooth hole inspection method and hole inspection and device
CN116993675A (en) Method, device, equipment and medium for measuring axial angle of curved surface of isolation block
CN111336991A (en) Tunnel ellipticity analysis method, device and system based on laser point cloud
CN116309376A (en) Method, device, equipment and storage medium for measuring inner diameter and outer diameter of ppr pipeline

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