CN116452433A - Sobel filtering-based detection method for optical storage lattice reading - Google Patents

Sobel filtering-based detection method for optical storage lattice reading Download PDF

Info

Publication number
CN116452433A
CN116452433A CN202310227231.5A CN202310227231A CN116452433A CN 116452433 A CN116452433 A CN 116452433A CN 202310227231 A CN202310227231 A CN 202310227231A CN 116452433 A CN116452433 A CN 116452433A
Authority
CN
China
Prior art keywords
image
value
binary
sobel
axis
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
CN202310227231.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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN202310227231.5A priority Critical patent/CN116452433A/en
Publication of CN116452433A publication Critical patent/CN116452433A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • 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/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a detection method based on Sobel filtering for optical storage lattice reading. The method comprises the steps of calibrating a dot matrix image area, reinforcing the dot matrix image by a Sobel algorithm to obtain a Sobel edge enhancement image, preprocessing the Sobel edge enhancement image to obtain a secondary gray image, processing the secondary gray image to obtain a binary image, rotating the binary image to obtain a positive binary image, calibrating a communication area of the positive binary image to generate a plurality of communication areas, meshing the positive binary image according to the minimum connected rectangles of different communication areas, and finally obtaining image data in the positive binary image, thereby obtaining and recording data stored in a crystal to be tested. The invention uses a detection algorithm based on Sobel filtering, can overcome strong crosstalk between layers appearing in a deep lattice diagram, and improves the accuracy of lattice data reading.

Description

Sobel filtering-based detection method for optical storage lattice reading
Technical Field
The invention belongs to the technical field of optical storage data reading, and particularly relates to a detection method based on Sobel filtering for optical storage lattice reading.
Background
The data reading method has very important application in the field of optical storage, directly influences the core parameters such as data reading speed, reading accuracy and the like in the optical storage technology, and is one of the core technologies of the optical storage technology. The optical storage technology is a technology of irradiating a medium with laser light, and causing physical and chemical changes to the medium by interaction between the laser light and the medium, thereby storing information. After the storage medium is irradiated by laser, certain properties (such as reflectivity, reflected light polarization direction and the like) of the medium are changed, different states of the properties of the medium are mapped into different storage data, and the reading of the storage data is realized by identifying the change of the properties of the storage unit.
The optical storage lattice is a three-dimensional multilayer lattice generated inside a storage medium by the interaction of a high-speed laser and the medium. After images of different levels are obtained through photographing, stored data are obtained through a detection method.
The difficulty encountered in reading the three-dimensional lattice data stored by light is that the obtained image can be subjected to crosstalk of light signals among larger layers at a deeper depth, the lattice image can become blurred, and meanwhile, the forms of the points are different at different depths, so that the detection method is difficult to read and access the data.
Disclosure of Invention
In order to overcome the problems encountered in the prior optical storage lattice data reading, the invention aims to design a detection method based on Sobel filtering for optical storage lattice reading. The method can effectively eliminate the strong inter-level crosstalk of the deep image, and enhances the accuracy of overall data reading.
The technical scheme of the invention is as follows:
the invention comprises the following steps:
step (1): dot matrix image area calibration
An original image of a crystal to be detected is obtained by using image obtaining equipment (namely a camera), and an image in a preset detection area is selected from the original image to be used as a dot matrix image img;
step (2): reinforcing the lattice image img by a Sobel (Sobel) algorithm to obtain a Sobel edge enhancement graph Sobel_img, and preprocessing the Sobel edge enhancement graph Sobel) img to obtain a secondary gray level graph;
step (3): performing threshold-variable binarization processing on the secondary gray level image Vmap' to obtain a binarized image bw;
step (4): rotation adjustment of binarized image bw
Respectively rotating the binary image bw and the sobel edge enhancement map sobel_img by taking the rotation angle theta as a rotation angle to respectively obtain a positive binary image bw2 'and a positive edge enhancement map sobel_img';
Step (5): communication area calibration of positive binary image bw2
Calibrating the connected areas of the positive binary image bw2' to generate a plurality of connected areas, and then meshing the positive binary image bw2' according to the minimum circumscribed rectangle of different connected areas to form a binary center unit temputbw ';
step (6): and obtaining image data in the positive binary image bw2 'according to the binary central unit temputbw', thereby obtaining data stored in the crystal to be detected, and further reading and recording the data of the optical storage lattice in the actual crystal slice.
The specific operation of the step (2) is as follows:
first, a filter map G is calculated according to the following formula:
wherein I represents a dot matrix image img;
then, the filter diagram G and the lattice image img are overlapped to obtain a Sobel edge enhancement diagram sobel) img, and the Sobel edge enhancement diagram sobel_img is converted into a single-channel image V by using the following formula mat
v=(r 2 +g 2 +b 2 ) 0.5
Wherein V represents a single channel image V mat R, g and b respectively represent the red r value, the green g value and the blue b value of each pixel point in the sobel edge enhancement graph sobel_img;
using single-channel images V mat Obtaining a primary gray level image Vmagray, performing an open operation on the primary gray level image Vmagray through a disc-shaped morphological structure element se to obtain a background image bg, wherein the radius of the morphological structure element se is 0.4 times of the number of pixels of the dot-matrix distance of the dot-matrix image img, subtracting the background image bg from the primary gray level image Vmagray to obtain a difference image, and performing contrast enhancement processing on the difference image to obtain a secondary gray level image Vmagray'.
The step (4) specifically comprises the following steps: selecting a minimum circumscribed rectangle containing all bright pixel points in the binary image bw as a calibration rectangle, wherein the bright pixel points are points with pixel point values of 1 in the binary image bw, two sides of the calibration rectangle are parallel to X, Y axes of a Cartesian coordinate system respectively, the image center of the binary image bw is taken as a rotation center, the binary image bw is rotated by taking the rotation angle theta as a rotation angle to obtain a calibration rectangle containing the minimum circumscribed rectangle containing all bright pixel points in the binary image bw after rotation as the rotation angle theta, the steps are repeated to rotate the binary image bw by different rotation angles theta to obtain calibration rectangles under different rotation angles theta, and the rotation angle theta when the area of the calibration rectangle is minimum is selected as the optimal rotation angle theta rot At an optimal rotation angle theta rot The binarized image bw and the sobel edge enhancement map sobel_img are rotated respectively, and the optimal rotation angle theta is used rot Taking the lower calibration rectangle as a boundary to intercept the rotated binary image bw and the Sobel edge enhancement image sobel_img respectively, and taking the new intercepted images as positive binary images respectivelyLike bw2 'and positive edge enhancement map sobel_img'.
The step (5) is specifically as follows:
firstly, taking a corner point of a right lower corner of a positive binary image bw2' as an origin, respectively establishing a Cartesian coordinate system for an X axis and a Y axis by taking two sides which pass through the origin and are respectively parallel to two boundaries of the positive binary image bw2', calibrating a communication area of the binary image bw ' to obtain i communication areas, selecting a minimum circumscribed rectangle of an i communication area labeli as a marked rectangle BoundBoxix of the communication area labeli, marking a sitting mark of the i marked rectangle BoundBoundBoxix as (Boundingxi, boundinggyi) at the left upper corner, respectively combining coordinates of all marked rectangles at the left upper corners on the X axis and the Y axis to form an X axis coordinate set Bounddingx and a Y axis coordinate set Bounddingy respectively:
Boundingx=[Boundingx1...Boundingxi...Boundingxn]
Boundingy=[Boundingy1...Boundingxi...Boundingyn]
rearranging elements in an X-axis coordinate set Boundgn X and a Y-axis coordinate set Boundgn Y according to a sequence from small to large to obtain an X-axis arrangement set sortx and a Y-axis arrangement set sorty respectively, classifying the X-axis arrangement set sortx and the Y-axis arrangement set sorty respectively to obtain an X-grid line set xseg and a Y-grid line set yseg respectively, establishing a plurality of vertical grid dividing lines by taking values of all elements in the X-grid line set xseg as transverse coordinates of each vertical grid dividing line respectively, establishing horizontal grid dividing lines by taking values of all elements in the Y-grid line set yseg as longitudinal coordinates of each horizontal grid dividing line respectively, and then utilizing all the vertical grid dividing lines and the horizontal grid dividing lines to grid divide a positive binary image bw2' to obtain a plurality of grid dividing units temp, wherein the vertical grid dividing lines and the horizontal dividing lines are respectively parallel to the Y-axis and the X-axis, and calculating offset of bright pixel areas in each grid dividing unit temp on the X-axis and the Y-axis offset of the X-axis offset dyx-axis dyads:
dx=bx-cx
dy=by-cy
Wherein cx and cy are respectively the abscissa (x-coordinate) and the ordinate (y-coordinate) of the center point of the single meshing unit temp, and bx and by are respectively the abscissa (x-coordinate) and the ordinate (y-coordinate) of the centroid of the bright pixel region in the meshing unit temp; the bright pixel area is an area where a pixel point with a pixel value of 1 in the grid division unit temp is located;
and finally, calculating the average value of X offset dx and Y offset dy of all bright pixel areas in the positive binary image bw2', respectively recording as X average offset and Y average offset, translating X average offset of all vertical grid dividing lines in the X axis direction to form a new vertical grid dividing line, translating Y average offset of the horizontal grid dividing line in the Y axis direction to form a new horizontal grid dividing line, and then carrying out grid division on the positive binary image bw2' and the positive edge enhancement image sobel_img ' by utilizing the new vertical grid dividing line and the horizontal grid dividing line to respectively obtain color grid dividing unit tempimg ' of a plurality of positive binary images bw2' and color grid dividing units tempimg ' of the positive edge enhancement image sobelimg ', and respectively taking out units in a preset range from the central parts of the binary grid dividing unit tembw ' and the color grid dividing unit tempimg ' as binary central units tempcutbw ' and color central units pcutg ', respectively.
The step (6) is specifically as follows:
determining the number count of bright pixels in a binary central unit temputbw ', wherein the bright pixel points represent pixel points with pixel values of 1, and calculating the mean, the brightness v and the chromatic aberration delta E of the binary central unit temputbw'.
v=max(r w ,g w ,b w )
Wherein r is w 、g w 、b w Respectively representAverage r-value, average g-value, average b-value, r of all bright pixel points in color center unit tempfummg' at the same position as the calculated binary center unit tempfutbw bg 、g bg 、b bg Respectively representing average r value, average g value and average b value of all dark pixel points in a color central unit temputimg 'at the same position with the calculated binary central unit temputbw', wherein the dark pixel points represent pixel points with the pixel value of 0, a represents the total number of the pixel points in the binary central unit temputbw, and max () represents a function for solving the maximum value;
the binary central unit temputbw' is then classified:
if the number of bright pixel points in the binary center unit temputbw ' is greater than 30% of the total number of pixels, and the color difference delta E of the binary center unit temputbw ' is greater than 1000, the mean value mean is greater than 50, and the brightness v is greater than 80, marking the binary center unit temputbw ' as a first center unit;
Otherwise, the binary center unit temputbw' is marked as a second center unit;
substituting all first central units into the model trained by the classification learner to generate a first model, substituting all second central units into the model trained by the classification learner to generate a second model, and calculating the vector product similarity between each binary central unit temputbw' and the first model and the second model respectively to serve as a first similarity 1_similarity and a second similarity 0_similarity respectively:
wherein vectemp is a vectorized form of a binary central unit temputbw', vec_model_1 and vec_model_0 are vectorized forms of a first model and a second model respectively, norm represents a 2-norm of a vector, and eps is floating point relative precision;
if the first similarity 1_similarity of the binary center unit temputbw 'is greater than the second similarity 0_similarity, the value of the binary center unit temputbw' is recorded as 1;
otherwise, the numerical value of the binary center unit temputbw' is recorded as 0;
the values of all binary center units temputbw' are recorded in a matrix form to form a final value matrix detinf, and the final value matrix detinf is utilized to realize reading and recording of optical storage data in a crystal to be detected in a 0-1 mode, so that the optical storage lattice in an actual crystal sheet is used for data reading and recording.
In the step (2), a single-channel image V is utilized mat The specific steps for obtaining the primary gray level diagram Vmap are as follows:
establishing a single channel image V mat A pixel point vector Vm of (a) and a gray pixel point vector Vmg of a primary gray map Vmatgray:
Vm=[vm 1 vm 2 vm 3 …vm j …vm m ]
Vmg=[vmg 1 vmg 2 vmg 3 …vmg j …vmg m ]
wherein vm is j For single channel image V mat The value of the j-th pixel point in (v), v mg j J represents the ordinal number of the pixel points, and m represents the number of the pixel points for the elements in the gray pixel point vector Vmg;
determining each element Vmg in the gray pixel point vector Vmg by using the pixel point vector Vm j Is a value of (1):
when vm is j When=min (Vm), vmg j Taking 0;
when vm is j When=max (Vm), vmg j 255 is taken;
when vm is j Not equal to min (Vm) and Vm j When not equal to max (Vm),
wherein, max () represents a maximum function, and min () represents a minimum function;
and then generating a primary gray level map Vmap by using the gray level pixel point vector Vmg, wherein each element in the gray level pixel point vector Vmg is the value of each pixel point in the primary gray level map Vmap.
The specific steps of classifying the X-axis array set sortx and the Y-axis array set sorty in the step (5) respectively are as follows:
step 51, performing a kth classification on all elements in the X-axis array set sortx:
if the value of an element in the X-axis array set sortx is in the range of [ xpole-xdispace/2, xpole+xdispace/2 ], dividing the element from the X-axis array set sortx to a category k;
If the value of an element in the X-axis arrangement collection sortx is not in the range of [ xpole-xdispace/2, xpole+xdispace/2 ], the element is not divided;
if all the elements in the X-axis array set sortx are divided, go to step 53;
wherein, xdisptance represents the average dot pitch pixel number among the dot matrixes of the positive binary image be2' in the X direction, k represents the ordinal number of element classification carried out by the X-axis arrangement set sortx, category k represents the set of divided elements when the kth classification is carried out, and the marking value xpole takes 1 when the 1 st classification is carried out;
step 52, establish X grid line set xseg= [ xseg1,..xseg k..xsegm ], calculate the average value of all elements in class k and assign the average value to the kth element xseg in X grid line set xseg, and reassign the flag value xpole: the flag value xpole=xsegk+xdstance, then the division number k is added with 1, and the step 51 is continued;
step 53: interpolation processing is carried out on the X grid line set xseg:
if the difference between two adjacent elements in the X grid line set xseg is multiple times than the xdstance, s new elements are inserted between the two adjacent elements on average to form a new X grid line set xseg, wherein s= { the difference between the two adjacent elements/xdstance } -1;
If the difference value of two adjacent elements in the X grid line set xseg is not an integer multiple of the xdistance, no difference value processing is carried out;
wherein { } represents a rounding operation;
step 54, classifying all elements in the Y-axis array set sort for the f-th time:
if the value of an element in the Y-axis array set source is within the range of [ ypole-ydispace/2, ypole+ydispace/2 ], dividing the element from the Y-axis array set source to a category f;
if the value of an element in the Y-axis array set source is not in the range of [ ypole-ydispersion/2, ypole+ydispersion/2 ], the element is not divided;
if all the elements in the Y-axis array set sort are divided, then go to step 56;
wherein ydispance represents the average dot pitch pixel number among the lattices of the positive binary image bw2' in the Y direction, f represents the ordinal number of element classification by the Y-axis arrangement set sort, category f represents the set of divided elements when the f-th classification is carried out, and the marking value ypole is 1 when the 1 st classification is carried out;
step 55, establishing a set of Y grid lines yseg= [ yseg1, ] ysegf, calculating the average value of all elements in the class f and assigning the average value to the f-th element ysegf in the Y grid line set ysegs, and reassigning the label value ypole: the flag ypole=ysegf+ydispance, then the division number f is added with 1, and the process proceeds to step 54;
Step 56: interpolation processing is carried out on the Y grid line set yseg:
if the difference between two adjacent elements in the Y grid line set yseg is multiple times than ydispance, t new elements are inserted between the two adjacent elements on average to form a new Y grid line set yseg, wherein t= { the difference between the two adjacent elements/ydispance } -1;
if the difference value of two adjacent elements in the Y grid line set yseg is not multiple times of the ydispersion, no difference value processing is carried out;
where { } represents a rounding operation.
The optical storage technology supported by the method has high stability, small volume, strong storage capacity and service life of thousands of years, is suitable for long-time safe storage of massive information, and is a preferable solution for archiving data, backing up data and other data needing long-term storage. Optical storage is suitable for managing sensitive data and backups. The data is protected from human faults, emergencies, natural disasters and other attack risks, such as public security government files, financial business files and the like. The optical storage device is in a state of no power consumption for more than 95% of the time, the optical storage medium hardly generates heat, the requirements on the ambient temperature and humidity are relatively low, and the storage medium and the device do not need to be replaced frequently in the data life cycle, so that the comprehensive energy consumption of data storage is reduced, and the construction requirement of a green data center is met.
The invention uses a detection algorithm based on Sobel filtering, can overcome strong crosstalk between layers appearing in a deep lattice diagram, and improves the accuracy of lattice data reading. And (3) inhibiting the background light intensity of the deep lattice diagram through Sobel filtering and two-dimensional filtering, increasing the contrast of the image, drawing lattice grids by using a connected region and classification method, and obtaining storage data by analyzing complex image features of single grids.
The beneficial effects of the invention are as follows:
1. by using Sobel color filtering and morphological processing, crosstalk in a deep lattice diagram is effectively overcome, and the accuracy of lattice data reading is improved.
2. And the camera is used for shooting the lattice surface, so that the surface reading of the optical storage lattice is supported, and the reading speed is improved.
3. In the detection process, a color image is used, and information reading of a multi-color lattice of multi-dimensional optical storage is supported, so that higher-capacity optical storage is supported.
Drawings
FIG. 1 is a flow chart of the steps of the detection of the present invention;
FIG. 2 is a truncated detection zone;
FIG. 3 is an image enhanced by the Sobel algorithm;
FIG. 4 is a thresholding binarization of a gray scale map;
FIG. 5 is a rotational fine adjustment of an image;
fig. 6 is a grid division of a detection image.
Detailed Description
The invention will be further described with reference to the drawings and examples.
The implementation process of the embodiment of the invention is as follows:
the invention comprises the following steps, as shown in fig. 1:
step (1): dot matrix image area calibration
Obtaining an original image of a crystal to be detected by using image obtaining equipment (i.e. a camera), and selecting an image in a preset detection area from the original image as a dot matrix image img, as shown in fig. 2;
step (2): reinforcing the lattice image img by a Sobel (Sobel) algorithm to obtain a Sobel edge enhancement graph Sobel_img, and preprocessing the Sobel edge enhancement graph Sobel_img to obtain a secondary gray level graph, as shown in FIG. 3;
step (3): performing threshold-variable binarization processing on the secondary gray level image Vmap' to obtain a binarized image bw;
as shown in fig. 4, the specific operation of performing the thresholding binarization processing on the secondary gray scale vmatrray' in step (3) is as follows: dividing the secondary gray level image Vmap' into a plurality of gray level subgraphs, carrying out automatic threshold binarization on each divided gray level subgraph, recombining the gray level subgraphs after automatic threshold binarization to generate a binarized image bw, and then processing according to the state of bright spots in the binarized image bw:
If the bright point is a solid point, performing expansion operation on the binary image bw to obtain a new image, and updating the new image with the latest binary image bw;
if the bright spots are hollow holes, filling holes in the binary image bw to obtain a new image, and updating the new image to obtain the binary image bw;
step (4): rotation adjustment of binarized image bw
As shown in fig. 5, the binarized image bw and the sobel edge enhancement map sobel_img are rotated with the rotation angle θ as a rotation angle, respectively, to obtain a positive binary image bw2 'and a positive edge enhancement map sobel_img', respectively;
step (5): communication area calibration of positive binary image bw2
Performing communication area calibration on the positive binary image bw2' by 8 communication to generate a plurality of communication areas, and then performing grid division on the positive binary image bw2' according to the minimum circumscribed rectangle of different communication areas to form a binary center unit tempceutbw ', as shown in fig. 6;
step (6): and obtaining image data in the positive binary image bw2 'according to the binary central unit temputbw', thereby obtaining data stored in the crystal to be detected, and further reading and recording the data of the optical storage lattice in the actual crystal slice.
The specific operation of the step (2) is as follows:
first, a filter map G is calculated according to the following formula:
wherein I represents a dot matrix image img;
and then superposing the filter diagram G and the lattice image img to obtain a Sobel edge enhancement diagram sobel_img, and converting the Sobel edge enhancement diagram sobel_img into a single-channel image Vmat by using the following formula:
v=(r 2 +g 2 +b 2 ) 0.5
wherein V represents a single channel image V mat R, g and b respectively represent r (red), g (green) and b (blue) values of each pixel point in the sobel edge enhancement map sobel_img;
using single-channel images V mat Obtaining a primary gray scale Vmatgy, and obtaining a primary gray scale Vmatg by a disk-shaped morphological structure element sePerforming open operation on ray to obtain a background image bg, subtracting the background image bg from the primary gray level image Vmatgray to obtain a difference image, and performing contrast enhancement processing on the difference image to obtain a secondary gray level image Vmatgray', wherein the radius of the morphological structural element se is 0.4 times of the number of pixels of the dot matrix image img.
The step (4) is specifically as follows: selecting a minimum circumscribed rectangle containing all bright pixel points in the binary image bw as a calibration rectangle, wherein the bright pixel points are points with pixel point values of 1 in the binary image bw, two sides of the calibration rectangle are parallel to X, Y axes of a Cartesian coordinate system respectively, namely, the calibration rectangle is a rectangle which is horizontally and vertically placed, two sides of the calibration rectangle are parallel to two sides of the binary image bw respectively, the image center of the binary image bw is taken as a rotation center, the binary image bw is rotated by taking a rotation angle theta as a rotation angle at the same time, the minimum circumscribed rectangle containing all bright pixel points in the binary image bw after rotation is taken as the calibration rectangle under the rotation angle theta, and repeating the steps to rotate the binary image bw by different rotation angles theta, theta E < -5,5 ]Obtaining calibration rectangles under different rotation angles theta, and selecting the rotation angle theta with the minimum area of the calibration rectangle as the optimal rotation angle theta rot At an optimal rotation angle theta rot The binarized image bw and the sobel edge enhancement map sobel_img are rotated respectively, and the optimal rotation angle theta is used rot And taking the lower calibration rectangle as a boundary to intercept the rotated binary image bw and the rotated sobel edge enhancement map sobel_img respectively, and taking the new intercepted image as a positive binary image bw2 'and a positive edge enhancement map sobel_img' respectively.
The step (5) comprises the following steps:
firstly, taking a corner point of a right lower corner of a positive binary image bw2' as an origin, respectively establishing a Cartesian coordinate system for an X axis and a Y axis by taking two sides which pass through the origin and are respectively parallel to two boundaries of the positive binary image bw2', calibrating a communication area of the binary image bw ' by 8 connectivity to obtain i communication areas, selecting a minimum circumscribed rectangle of an i communication area labeli as a marked rectangle boundingBoxi of the communication area labeli, marking a sitting mark of an upper left corner of the i marked rectangle boundingBoxi as (Boundingxi), boundingyi, respectively combining coordinates of the upper left corner of all marked rectangles on the X axis and the Y axis to form an X axis coordinate set Boundingx and a Y axis coordinate set Boundingy respectively:
Boundingx=[Boundingx1...Boundingxi...Boundingxn]
Boundingy=[Boundingy1...Boundingxi...Boundingyn]
That is, the set of all the connected regions is represented as label= [ LABEL1, LABEL2 i..label..label n ], the set of all the marked rectangles is represented as boundingbox= [ BoundingBox1,..boundingbox 1 i..boundingbox n ], the set of coordinates of the upper left corner of all the marked rectangles is represented as [ (Boundingx 1, boundingy 1.) (Boundingx, boundingyn) ], where i represents the ordinal number of the connected region, and n represents the total number of the connected regions;
the method comprises the steps of rearranging elements in an X-axis coordinate set Boundgn X and a Y-axis coordinate set Boundgn from left to right according to a sequence from small to large to obtain an X-axis arrangement set sortx and a Y-axis arrangement set sorty respectively, classifying the X-axis arrangement set sortx and the Y-axis arrangement set sorty respectively to obtain an X-grid line set xseg and a Y-grid line set yseg respectively, establishing a plurality of vertical grid dividing lines by taking values of all the elements in the X-grid line set xseg as transverse coordinates of all vertical grid dividing lines, establishing horizontal grid dividing lines by taking values of all the elements in the Y-grid line set yseg as longitudinal coordinates of all the horizontal grid dividing lines respectively, and then conducting grid division on a positive binary image bw2' by utilizing all the vertical grid dividing lines and the horizontal grid dividing lines to obtain a plurality of grid dividing units temp, respectively paralleling the vertical grid dividing lines and the horizontal grid dividing lines with the Y-axis, and calculating offset of bright pixel areas in the grid dividing units p on the X-axis and offset of the Y-axis in the Y-axis system:
dx=bx-cx
dy=by-cy
Wherein cx and cy are respectively the abscissa (x-coordinate) and the ordinate (y-coordinate) of the center point of the single meshing unit temp, and bx and by are respectively the abscissa (x-coordinate) and the ordinate (y-coordinate) of the centroid of the bright pixel region in the meshing unit temp; the bright pixel area is an area where a pixel point with a pixel value of 1 in the grid division unit temp is located;
finally, calculating the average value of X offset dx and Y offset dy of all bright pixel areas in the positive binary image bw2', respectively recording as X average offset and Y average offset, translating X average offset of all vertical grid dividing lines in the X axis direction to form a new vertical grid dividing line, translating Y average offset of the horizontal grid dividing line in the Y axis direction to form a new horizontal grid dividing line, and then carrying out grid division on the positive binary image bw2' and the positive edge enhancement image sobel_ing ' by utilizing the new vertical grid dividing line and the horizontal grid dividing line to respectively obtain color grid dividing units tempmmg ' of a plurality of positive binary images bw2' and color grid dividing units tempmmg ' of the positive edge enhancement image sobel_img ', and respectively taking out units in a preset range from the central parts of the binary grid dividing units tempbw ' and the color grid dividing units tempmmg ' as binary center units temutbw ' and color center units pctempmutg ';
In specific implementations, the binary center unit temputbw ' =tempbw ' (0.3×length:0.7×length,0.3×ylength:0.7×ylength), the color center unit temputimg ' =temping ' (0.3×length:0.7×length,0.3×ylength:0.7×ylength), where xlength and ylength are lengths of the binary grid dividing unit tempbw ' in the X direction and the Y direction, respectively;
the step (6) is specifically that,
determining the number count of bright pixels in the binary central unit temputbw ', wherein the bright pixels represent pixels with a pixel value of 1, and calculating the average mean, the brightness v and the color difference delta E of the binary central unit temputbw'.
v=max(r w ,g w ,b w )
Wherein r is w 、g w 、b w Respectively representing the average r value, the average g value, the average b value and the average r value of all bright pixel points in the color center unit tempcalmg' at the same position with the calculated binary center unit tempcalbw bg 、g bg 、b bg Respectively representing an r value average value, a g value average value and a b value average value of all dark pixel points in a color central unit temputimg 'at the same position with the calculated binary central unit temputbw', wherein the dark pixel points represent pixel points with pixel values of 0, a represents the total number of the pixel points in the binary central unit temputbw, and max () represents a function for solving a maximum value;
In addition, the chromaticity h and saturation s1 of each binary center unit temputbw' can also be calculated:
if max (r w ,g w ,b w )=min(r w ,g w ,b w ) H=0°;
if max (r w ,g w ,b w )=r w And g w <b w
Then
If max (r w ,g w ,b w )=r w And g w ≥b w
Then
If max (r w ,g w ,b w )=g w
Then
If max (r w ,g w ,b w )=b w
Then
If max (r w ,g w ,b w ) =0, s1=0;
if max (r w ,g w ,b w ) Not equal to 0, then
Wherein min () represents a minimum function
The binary central unit temputbw' is then classified:
if the number of bright pixel points in the binary center unit temputbw ' is greater than 30% of the total number of pixels, and the color difference delta E of the binary center unit temputbw ' is greater than 1000, the mean value mean is greater than 50, and the brightness v is greater than 80, marking the binary center unit temputbw ' as a first center unit;
otherwise, the binary center unit temputbw' is marked as a second center unit;
substituting all first central units into the model trained by the classification learner to generate a first model, substituting all second central units into the model trained by the classification learner to generate a second model, and calculating the vector product similarity between each binary central unit temputbw' and the first model and the second model respectively to serve as a first similarity 1_similarity and a second similarity 0_similarity respectively:
Wherein vectemp is a vectorized form of a binary central unit temputbw', vec_model_1 and vec_model_0 are vectorized forms of a first model and a second model respectively, norm represents a 2-norm of a vector, and eps is floating point relative precision;
if the first similarity 1_similarity of the binary center unit temputbw 'is greater than the second similarity 0_similarity, the value of the binary center unit temputbw' is recorded as 1;
otherwise, the numerical value of the binary center unit temp tbw' is recorded as 0;
the values of all binary center units temputbw' are recorded in a matrix form to form a final value matrix detinf, and the final value matrix detinf is utilized to realize reading and recording of optical storage data in a crystal to be detected in a 0-1 mode, so that the optical storage lattice in an actual crystal sheet is used for data reading and recording.
In step (2) single channel image V is used mat The specific steps for obtaining the primary gray level diagram Vmap are as follows:
establishing a single channel image V mat A pixel point vector Vm of (a) and a gray pixel point vector Vmg of a primary gray map Vmatgray:
Vm=[vm 1 vm 2 vm 3 …vm j …vm m ]
Vmg=[vmg 1 vmg 2 vmg 3 …vmg j …vmg m ]
wherein vm is j For single channel image V mat The value of the j-th pixel in (a), i.e. vm j Vmg, which is an element in the pixel point vector Vm j Is an element in the gray pixel point vector Vmg, namely a single-channel image V mat The value of the j-th pixel point in the list, j represents the ordinal number of the pixel point, and m represents the number of the pixel points;
determining each element Vmg in the gray pixel point vector Vmg by using the pixel point vector Vm j Is a value of (1):
when vm is j When=min (Vm), vmg j Taking 0;
when vm is j When=max (Vm), vmg j 255 is taken;
when vm is j Not equal to min (Vm) and Vm j When not equal to max (Vm),
vmg j take the value of
Wherein, max () represents a maximum function, and min () represents a minimum function;
and then generating a primary gray level map Vmap by using the gray level pixel point vector Vmg, wherein each element in the gray level pixel point vector Vmg is the value of each pixel point in the primary gray level map Vmap.
The specific steps of classifying the X-axis arrangement set sortx and the Y-axis arrangement set sorty in the step (5) are as follows:
step 51, performing a kth classification on all elements in the X-axis array set sortx:
if the value of an element in the X-axis array set sortx is in the range of [ xpole-xdispace/2, xpole+xdispace/2 ], dividing the element from the X-axis array set sortx to a category k;
if the value of an element in the X-axis arrangement collection sortx is not in the range of [ xpole-xdispace/2, xpole+xdispace/2 ], the element is not divided;
if all the elements in the X-axis array set sortx are divided, go to step 53;
Wherein, xdispance represents the average dot spacing pixel number between the lattices of the positive binary image bw2' in the X direction, k represents the ordinal number of element classification carried out by the X-axis arrangement set sortx, the initial value of k is 1, the category k represents the set of divided elements when the kth classification is carried out, and the marking value xpole takes 1 when the kth classification is carried out;
step 52, establish X grid line set xseg= [ xseg1,..xseg k..xsegm ], calculate the average value of all elements in class k and assign the average value to the kth element xseg in X grid line set xseg, and reassign the flag value xpole: the flag value xpole=xsegk+xdispance, then the division number k is added with 1, and the step 51 is continued, where m represents the total number of X-axis arrangement set sortx divisions;
step 53: interpolation processing is carried out on the X grid line set xseg:
if the difference between two adjacent elements in the X gridline set xseg is approximately an integer multiple of xdstance, s new elements are inserted between the two adjacent elements on average to form a new X gridline set xseg, wherein s= { the difference between the two adjacent elements/xdstance } -1;
if the difference value of two adjacent elements in the X grid line set xseg is not an integer which is approximate to the integer multiple of the xdistance, no difference value processing is carried out;
Wherein { } represents a rounding operation;
the approximate integer multiple takes the interval of plus or minus 0.3 of the integer multiple.
Step 54, classifying all elements in the Y-axis array set sort for the f-th time:
if the value of an element in the Y-axis array set source is within the range of [ ypole-ydispace/2, ypole+ydispace/2 ], dividing the element from the Y-axis array set source to a category f;
if the value of an element in the Y-axis array set source is not in the range of [ ypole-ydispersion/2, ypole+ydispersion/2 ], the element is not divided;
if all the elements in the Y-axis array set sort are divided, then go to step 56;
wherein ydispance represents the average dot spacing pixel number between the lattices of the positive binary image bw2' in the Y direction, f represents the ordinal number of element classification by the Y-axis arrangement set sort, the initial value of f is 1, the category f represents the set of divided elements when the f-th classification is carried out, and the marking value ypole takes 1 when the 1-th classification is carried out;
step 55, establishing a set of Y grid lines yseg= [ yseg1, ] ysegf, calculating the average value of all elements in the class f and assigning the average value to the f-th element ysegf in the Y grid line set ysegs, and reassigning the label value ypole: the flag value ypole=ysegf+ydispance, then the division number f is added with 1, and the step 54 is continued, q represents the total number of times the Y-axis arrangement set sort is divided;
Step 56: interpolation processing is carried out on the Y grid line set yseg:
if the difference between two adjacent elements in the Y grid line set yseg is approximately an integer multiple of ydispersion, t new elements are inserted between the two adjacent elements on average to form a new Y grid line set yseg, wherein t= { the difference between the two adjacent elements/ydispersion } -1;
if the difference value of two adjacent elements in the Y grid line set yseg is not approximately an integer multiple of the ydispersion, no difference value processing is carried out;
where { } represents a rounding operation.
The division mode of the Y-axis arrangement set sort is the same as that of the X-axis arrangement set sort.

Claims (7)

1. The Sobel filtering-based detection method for optical storage lattice reading is characterized by comprising the following steps of:
step (1): dot matrix image area calibration
Obtaining an original image of a crystal to be detected by using image obtaining equipment, and selecting an image in a preset detection area from the original image to be used as a dot matrix image img;
step (2): reinforcing the lattice image img by a Sobel algorithm to obtain a Sobel edge enhancement image Sobel_img, and preprocessing the Sobel edge enhancement image Sobel_img to obtain a secondary gray level image;
step (3): performing threshold-variable binarization processing on the secondary gray level image Vmap' to obtain a binarized image bw;
Step (4): rotation adjustment of binarized image bw
Respectively rotating the binary image bw and the sobel edge enhancement map sobel_img by taking the rotation angle theta as a rotation angle to respectively obtain a positive binary image bw2 'and a positive edge enhancement map sobel_img';
step (5): communication area calibration of positive binary image bw2
Calibrating the connected areas of the positive binary image bw2' to generate a plurality of connected areas, and then meshing the positive binary image bw2' according to the minimum circumscribed rectangle of different connected areas to form a binary center unit temputbw ';
step (6): and obtaining image data in the positive binary image bw2 'according to the binary central unit temputbw', thereby obtaining data stored in the crystal to be detected, and further reading and recording the data of the optical storage lattice in the actual crystal slice.
2. The method for detecting the optical storage lattice according to claim 1, wherein the method is based on Sobel filtering and is characterized in that:
the specific operation of the step (2) is as follows:
first, a filter map G is calculated according to the following formula:
wherein I represents a dot matrix image img;
then, the filter diagram G and the lattice image img are overlapped to obtain a Sobel edge enhancement diagram Sobel_img, and the Sobel edge enhancement diagram Sobel_img is converted into a single-channel image V by using the following formula mat
v=(r 2 +g 2 +b 2 ) 0.5
Wherein V represents a single channel image V mat R, g and b respectively represent the red r value, the green g value and the blue b value of each pixel point in the sobel edge enhancement graph sobel_img;
using single-channel images V mat Obtaining a primary gray level image Vmagray, performing an open operation on the primary gray level image Vmagray through a disc-shaped morphological structure element se to obtain a background image bg, wherein the radius of the morphological structure element se is 0.4 times of the number of pixels of the dot-matrix distance of the dot-matrix image img, subtracting the background image bg from the primary gray level image Vmagray to obtain a difference image, and performing contrast enhancement processing on the difference image to obtain a secondary gray level image Vmagray'.
3. The method for detecting the optical storage lattice according to claim 1, wherein the method is based on Sobel filtering and is characterized in that:
the step (4) specifically comprises the following steps: selecting a minimum circumscribed rectangle containing all bright pixel points in the binary image bw as a calibration rectangle, wherein the bright pixel points are points with pixel point values of 1 in the binary image bw, two sides of the calibration rectangle are parallel to X, Y axes of a Cartesian coordinate system respectively, the image center of the binary image bw is taken as a rotation center, the binary image bw is rotated by taking the rotation angle theta as a rotation angle to obtain a calibration rectangle containing the minimum circumscribed rectangle containing all bright pixel points in the binary image bw after rotation as the rotation angle theta, the steps are repeated to rotate the binary image bw by different rotation angles theta to obtain calibration rectangles under different rotation angles theta, and the rotation angle theta when the area of the calibration rectangle is minimum is selected as the optimal rotation angle theta rot At an optimal rotation angle theta rot The binarized image bw and the sobel edge enhancement map sobel_img are rotated respectively, and the optimal rotation angle theta is used rot And taking the lower calibration rectangle as a boundary to intercept the rotated binary image bw and the Sobel edge enhancement image sobel_img respectively, and taking the new intercepted image as a positive binary image bw2 'and a positive edge enhancement image sobel_img' respectively.
4. The method for detecting the optical storage lattice according to claim 1, wherein the method is based on Sobel filtering and is characterized in that:
the step (5) is specifically as follows:
firstly, taking a corner point of a right lower corner of a positive binary image bw2' as an origin, respectively establishing a Cartesian coordinate system for an X axis and a Y axis by taking two sides which pass through the origin and are respectively parallel to two boundaries of the positive binary image bw2', calibrating a communication area of the binary image bw ' to obtain i communication areas, selecting a minimum circumscribed rectangle of an i communication area labeli as a marked rectangle BoundBoxix of the communication area labeli, marking a sitting mark of the i marked rectangle BoundBoundBoxix as (Boundingxi, boundinggyi) at the left upper corner, respectively combining coordinates of all marked rectangles at the left upper corners on the X axis and the Y axis to form an X axis coordinate set Bounddingx and a Y axis coordinate set Bounddingy respectively:
Boundingx=[Boundingx1...Boundingxi...Boundingxn]
Boundingy=[Boundingy1...Boundingxi...Boundingyn]
Rearranging elements in an X-axis coordinate set Boundgn X and a Y-axis coordinate set Boundgn Y according to a sequence from small to large to obtain an X-axis arrangement set sortx and a Y-axis arrangement set sorty respectively, classifying the X-axis arrangement set sortx and the Y-axis arrangement set sorty respectively to obtain an X-grid line set xseg and a Y-grid line set yseg respectively, establishing a plurality of vertical grid dividing lines by taking values of all elements in the X-grid line set xseg as transverse coordinates of each vertical grid dividing line respectively, establishing horizontal grid dividing lines by taking values of all elements in the Y-grid line set yseg as longitudinal coordinates of each horizontal grid dividing line respectively, and then utilizing all the vertical grid dividing lines and the horizontal grid dividing lines to grid divide a positive binary image bw2' to obtain a plurality of grid dividing units temp, wherein the vertical grid dividing lines and the horizontal dividing lines are respectively parallel to the Y-axis and the X-axis, and calculating offset of bright pixel areas in each grid dividing unit temp on the X-axis and the Y-axis offset of the X-axis offset dyx-axis dyads:
dx=bx-cx
dy=by-cy
wherein cx and cy are respectively the abscissa and ordinate of the center point of a single grid division unit temp, and bx and by are respectively the abscissa and ordinate of the centroid of the bright pixel region in the grid division unit temp; the bright pixel area is an area where a pixel point with a pixel value of 1 in the grid division unit temp is located;
And finally, calculating the average value of X offset dx and Y offset dy of all bright pixel areas in the positive binary image bw2', respectively recording as X average offset and Y average offset, translating X average offset of all vertical grid dividing lines in the X axis direction to form a new vertical grid dividing line, translating Y average offset of the horizontal grid dividing line in the Y axis direction to form a new horizontal grid dividing line, and then carrying out grid division on the positive binary image bw2' and the positive edge enhancement image sobel_img ' by utilizing the new vertical grid dividing line and the horizontal grid dividing line to respectively obtain color grid dividing units tempimg ' of a plurality of positive binary images bw2' and color grid dividing units tempmmg ' of the positive edge enhancement image sobel_img ', and respectively taking out units in a preset range from the central parts of the binary grid dividing units tempbw ' and the color grid dividing units tempimg ' as binary central units pcutbw ' and color central units pctemimg ', respectively.
5. The method for detecting the optical storage lattice according to claim 1, wherein the method is based on Sobel filtering and is characterized in that:
the step (6) is specifically as follows:
determining the number count of bright pixels in a binary central unit temputbw ', wherein the bright pixel points represent pixel points with pixel values of 1, and calculating the mean, the brightness v and the chromatic aberration delta E of the binary central unit temputbw'.
v=max(r w ,g w ,b w )
Wherein r is w 、g w 、b w Respectively representing the average r value, the average g value, the average b value and the r of all bright pixel points in the color center unit tempcalmg' at the same position with the calculated binary center unit tempcalbw bg 、g bg 、b bg Respectively representing average r value, average g value and average b value of all dark pixel points in a color central unit temputimg ' at the same position with the calculated binary central unit temputbw ', wherein the dark pixel points represent pixel points with the pixel value of 0, a represents the total number of the pixel points in the binary central unit temputbw ', and max () represents the obtained mostA large value function;
the binary central unit temputbw' is then classified:
if the number of bright pixel points in the binary center unit temputbw ' is greater than 30% of the total number of pixels, and the color difference delta E of the binary center unit temputbw ' is greater than 1000, the mean value mean is greater than 50, and the brightness v is greater than 80, marking the binary center unit temputbw ' as a first center unit;
otherwise, the binary center unit temputbw' is marked as a second center unit;
substituting all first central units into the model trained by the classification learner to generate a first model, substituting all second central units into the model trained by the classification learner to generate a second model, and calculating the vector product similarity between each binary central unit temputbw' and the first model and the second model respectively to serve as a first similarity 1_similarity and a second similarity 0_similarity respectively:
Wherein vectemp is a vectorized form of a binary central unit temputbw', vec_model_1 and vec_model_0 are vectorized forms of a first model and a second model respectively, norm represents a 2-norm of a vector, and eps is floating point relative precision;
if the first similarity 1_similarity of the binary center unit temputbw 'is greater than the second similarity 0_similarity, the value of the binary center unit temputbw' is recorded as 1;
otherwise, the numerical value of the binary center unit temputbw' is recorded as 0;
the values of all binary center units temputbw' are recorded in a matrix form to form a final value matrix detinf, and the final value matrix detinf is utilized to realize reading and recording of optical storage data in a crystal to be detected in a 0-1 mode, so that the optical storage lattice in an actual crystal sheet is used for data reading and recording.
6. The method for detecting the optical storage lattice according to claim 2, wherein the method is based on Sobel filtering and is characterized in that:
in the step (2), a single-channel image V is utilized mat The specific steps for obtaining the primary gray level diagram Vmap are as follows:
establishing a single channel image V mat A pixel point vector Vm of (a) and a gray pixel point vector Vmg of a primary gray map Vmatgray:
Vm=[vm 1 vm 2 vm 3 ... vm j ...vm m ]
Vmg=[vmg 1 vmg 2 vmg 3 ...vmg j ...vmg m ]
Wherein vm is j For single channel image V mat The value of the j-th pixel point in (v), v mg j J represents the ordinal number of the pixel points, and m represents the number of the pixel points for the elements in the gray pixel point vector Vmg;
determining each element Vmg in the gray pixel point vector Vmg by using the pixel point vector Vm j Is a value of (1):
when vm is j When=min (Vm), vmg j Taking 0;
when vm is j When=max (Vm), vmg j 255 is taken;
when vm is j Not equal to min (Vm) and Vm j When not equal to max (Vm),
vmg j take the value of
Wherein, max () represents a maximum function, and min () represents a minimum function;
and then generating a primary gray level map Vmap by using the gray level pixel point vector Vmg, wherein each element in the gray level pixel point vector Vmg is the value of each pixel point in the primary gray level map Vmap.
7. The method for detecting the optical storage lattice according to claim 1, wherein the method is based on Sobel filtering and is characterized in that:
the specific steps of classifying the X-axis array set sortx and the Y-axis array set sorty in the step (5) respectively are as follows:
step 51, performing a kth classification on all elements in the X-axis array set sortx:
if the value of an element in the X-axis array set sortx is in the range of [ xpole-xdispace/2, xpole+xdispace/2 ], dividing the element from the X-axis array set sortx to a category k;
If the value of an element in the X-axis arrangement collection sortx is not in the range of [ xpole-xdispace/2, xpole+xdispace/2 ], the element is not divided;
if all the elements in the X-axis array set sortx are divided, go to step 53;
wherein, xdisptance represents the average dot pitch pixel number among the dot matrixes of the positive binary image bw2' in the X direction, k represents the ordinal number of element classification carried out by the X-axis arrangement set sortx, category k represents the set of divided elements when the kth classification is carried out, and the marking value xpole takes 1 when the 1 st classification is carried out;
step 52, establish X grid line set xseg= [ xseg1,..xseg k..xsegm ], calculate the average value of all elements in class k and assign the average value to the kth element xseg in X grid line set xseg, and reassign the flag value xpole: the flag value xpole=xsegk+xdstance, then the division number k is added with 1, and the step 51 is continued;
step 53: interpolation processing is carried out on the X grid line set xseg:
if the difference between two adjacent elements in the X grid line set xseg is multiple times than the xdstance, s new elements are inserted between the two adjacent elements on average to form a new X grid line set xseg, wherein s= { the difference between the two adjacent elements/xdstance } -1;
If the difference value of two adjacent elements in the X grid line set xseg is not an integer multiple of the xdistance, no difference value processing is carried out;
wherein { } represents a rounding operation;
step 54, classifying all elements in the Y-axis array set sort for the f-th time:
if the value of an element in the Y-axis array set source is within the range of [ ypole-ydispace/2, ypole+ydispace/2 ], dividing the element from the Y-axis array set source to a category f;
if the value of an element in the Y-axis array set source is not in the range of [ ypole-ydispersion/2, ypole+ydispersion/2 ], the element is not divided;
if all the elements in the Y-axis array set sort are divided, then go to step 56;
wherein ydispance represents the average dot pitch pixel number among the lattices of the positive binary image bw2' in the Y direction, f represents the ordinal number of element classification by the Y-axis arrangement set sort, category f represents the set of divided elements when the f-th classification is carried out, and the marking value ypole is 1 when the 1 st classification is carried out;
step 55, establishing a set of Y grid lines yseg= [ yseg1, ] ysegf, calculating the average value of all elements in the class f and assigning the average value to the f-th element ysegf in the Y grid line set ysegs, and reassigning the label value ypole: the flag ypole=ysegf+ydispance, then the division number f is added with 1, and the process proceeds to step 54;
Step 56: interpolation processing is carried out on the Y grid line set yseg:
if the difference between two adjacent elements in the Y grid line set yseg is multiple times than ydispance, t new elements are inserted between the two adjacent elements on average to form a new Y grid line set yseg, wherein t= { the difference between the two adjacent elements/ydispance } -1;
if the difference value of two adjacent elements in the Y grid line set yseg is not multiple times of the ydispersion, no difference value processing is carried out;
where { } represents a rounding operation.
CN202310227231.5A 2023-03-10 2023-03-10 Sobel filtering-based detection method for optical storage lattice reading Pending CN116452433A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310227231.5A CN116452433A (en) 2023-03-10 2023-03-10 Sobel filtering-based detection method for optical storage lattice reading

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310227231.5A CN116452433A (en) 2023-03-10 2023-03-10 Sobel filtering-based detection method for optical storage lattice reading

Publications (1)

Publication Number Publication Date
CN116452433A true CN116452433A (en) 2023-07-18

Family

ID=87131017

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310227231.5A Pending CN116452433A (en) 2023-03-10 2023-03-10 Sobel filtering-based detection method for optical storage lattice reading

Country Status (1)

Country Link
CN (1) CN116452433A (en)

Similar Documents

Publication Publication Date Title
US11836976B2 (en) Method for recognizing seawater polluted area based on high-resolution remote sensing image and device
Farid Exposing digital forgeries in scientific images
CN108121991B (en) Deep learning ship target detection method based on edge candidate region extraction
CN108596166A (en) A kind of container number identification method based on convolutional neural networks classification
CN110286126A (en) A kind of wafer surface defects subregion area detecting method of view-based access control model image
CN110288602B (en) Landslide extraction method, landslide extraction system and terminal
CN108765371A (en) The dividing method of unconventional cell in a kind of pathological section
CN105844602B (en) A kind of airborne LIDAR point cloud three-dimensional filtering method based on volume elements
CN103413141B (en) Ring illuminator and fusion recognition method utilizing ring illuminator illumination based on shape, grain and weight of tool
CN108596247A (en) A method of fusion radiation group and depth convolution feature carry out image classification
CN110288612B (en) Nameplate positioning and correcting method and device
CN108090459A (en) A kind of road traffic sign detection recognition methods suitable for vehicle-mounted vision system
CN109738450A (en) The detection method and device of keyboard of notebook computer
CN110399820A (en) A kind of margin of roads scenery visual identity analysis method
CN103162818A (en) Laser beam width evaluation method based on moment invariance
CN106228103B (en) A kind of recognition methods of bilayer code
CN106845314A (en) A kind of method for rapidly positioning of Quick Response Code
CN108288061A (en) A method of based on the quick positioning tilt texts in natural scene of MSER
Lee et al. A domain knowledge enhanced yield based deep learning classifier identifies perineural invasion in oral cavity squamous cell carcinoma
Gupta et al. Analytical global median filtering forensics based on moment histograms
CN116452433A (en) Sobel filtering-based detection method for optical storage lattice reading
Guo et al. Pathological detection of micro and fuzzy gastric cancer cells based on deep learning
Zhang et al. A YOLOv3‐Based Industrial Instrument Classification and Reading Recognition Method
Liu et al. Faster r-cnn based robust circulating tumor cells detection with improved sensitivity
CN109191452A (en) A kind of abdominal cavity CT image peritonaeum transfer automark method based on Active Learning

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
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Wang Ziquan

Inventor after: Zhang Bo

Inventor after: Wang Zhuo

Inventor after: Qiu Jianrong

Inventor before: Wang Ziquan

Inventor before: Zhang Bo

Inventor before: Wang Zhuo