Disclosure of Invention
The invention discloses a method for extracting parallel optical recording information, which aims to overcome the technical problems.
In order to achieve the above object, the technical scheme of the present invention is as follows:
a method for extracting parallel optical recording information comprises the following steps:
S1, acquiring preliminary center coordinates of strong information points in a standard dot matrix information medium according to the radius of the information points of the standard dot matrix information medium, wherein the standard dot matrix information medium is expressed as an information point matrix of M rows and N columns, and M and N are both odd numbers;
S2, acquiring an average value of the sum of the preliminary center coordinates of two adjacent strong information points in M rows on the quasi-lattice information medium, wherein M is 1,3, so as to acquire the average value of the sum of the differences of all rows on the standard lattice information medium, further acquire the radius of the accurate information point;
S3, acquiring the center coordinates of weak information points of the standard dot matrix information medium according to the accurate center coordinates of the strong information points of the standard dot matrix information medium, and acquiring an energy matrix of the standard dot matrix information medium according to the radius of the accurate information points;
S4, replacing element values of odd rows in an energy matrix of the standard dot matrix information medium with 0, replacing element values of odd columns in even rows in the energy matrix of the standard dot matrix information medium with 0, obtaining a zero matrix to obtain an average value A of elements in the zero matrix, and dividing the average value A of the elements in the zero matrix by non-0 elements in the zero matrix to obtain an intermediate matrix;
S5, reassigning non-0 elements in the intermediate matrix according to the intermediate matrix to obtain an initial first AGC matrix of the standard lattice information medium;
s6, multiplying the energy matrix of the standard dot matrix information medium by the initial first AGC matrix to obtain a first correction matrix, and obtaining a first characteristic value according to the minimum value of an element corresponding to the position of a strong information point in the standard dot matrix information medium and the maximum value of an element corresponding to the position of a weak information point in the standard dot matrix information medium in the first correction matrix;
s7, based on the accurate center coordinates of the strong information points and the center coordinates of the weak information points on the standard dot matrix information medium, acquiring an energy matrix of the medium without the recording points according to the radius of the accurate information points;
S8, acquiring an intermediate matrix without recording points based on the energy matrix of the medium without recording points so as to acquire an initial second AGC matrix without recording points, multiplying the first correction matrix by the initial second AGC matrix to acquire a second correction matrix, and further acquiring a second characteristic value according to the second correction matrix;
S9, acquiring a final AGC matrix according to the first characteristic value and the second characteristic value;
And S10, acquiring an information point matrix of the information point medium to be subjected to information extraction based on a difference threshold algorithm according to the final AGC matrix, the accurate center coordinates of the strong information points, the center coordinates of the weak information points and the radius of the accurate information points so as to extract the optical record information in the information point medium to be subjected to information extraction.
Further, in the step S1, the following formula is adopted for obtaining the preliminary center coordinates of the strong information points in the standard dot matrix information medium:
Wherein X m,n represents the preliminary central abscissa of the strong information point on the standard dot matrix information medium, Y m,n represents the preliminary central ordinate of the strong information point on the standard dot matrix information medium, m is the row index in the information point matrix, n is the column index in the information point matrix; Representing the first of standard lattice information media Line 1And R is the radius of the information point on the standard dot matrix information medium.
Further, in the step S2, the method for obtaining the accurate center coordinates of the strong information points of the standard dot matrix information medium is as follows:
S21, obtaining an average value of a sum of preliminary center coordinates of two adjacent strong information points in M rows of M, m=1, 3 on a standard dot matrix information medium, wherein the formula is as follows:
Wherein P m is the average value of the sum of the preliminary center coordinates of the two adjacent strong information points in the m-th row on the standard dot matrix information medium, X m,1,Ym,1 is the preliminary center coordinates of the strong information points in the m-th row and the 1-th column on the standard dot matrix information medium, X m,1 is the preliminary center abscissa of the strong information points in the m-th row and the 1-th column on the standard dot matrix information medium, Y m,1 is the preliminary center abscissa of the strong information points in the m-th row and the 1-th column on the standard dot matrix information medium;
s22, obtaining an average value of the sum of differences of all rows on the standard dot matrix information medium:
wherein P is the average value of the sum of the differences of all rows on the standard dot matrix information medium;
S23, obtaining accurate center coordinates of the strong information points according to the average value of the difference values of all rows on the standard dot matrix information medium, wherein the method comprises the following steps:
S231, acquiring a distance between the initial center coordinates of the strong information points and the initial center coordinates of the strong information points as the center Is a pixel region of (a);
s232, acquiring pixel values of all pixels of the pixel area to acquire the maximum pixel value of the pixels of the pixel area;
S233, obtaining pixel points with pixel values larger than the set threshold value percentage of the pixel values and the maximum pixel value of the pixel points in the pixel point area to form a sub-pixel point area, wherein the median of the abscissa of the pixel points in the sub-pixel point area is the accurate center abscissa of the strong information point, and the median of the ordinate of the pixel points in the sub-pixel point area is the accurate center ordinate of the strong information point.
Further, in the step S3, the method for acquiring the center coordinates of the weak information points of the standard dot matrix information medium is as follows:
in standard dot matrix information media, M, m=1, 3.,. The centrum of weak information points in the M rows is acquired as follows:
In standard dot matrix information media, M, m=2, 4,.. n=1, 3..the centralisation of weak information points in N columns is obtained as follows:
In standard dot matrix information media, M, m=2, 4,.. n=2, 4..the centralisation of weak information points in column N-1 is obtained as follows:
further, in S5, the method for reassigning non-0 elements in the intermediate matrix is as follows:
Reassigning non-zero elements in row 1 of the intermediate matrix uses the formula:
AGC1,1=AGC1,2=ZJ2,2
AGC1,N=AGC1,N-1=ZJ2,N-1
Reassigning non-zero elements in row M-1 of the intermediate matrix using the formula:
AGCm,1=AGCm,2,m=2,4,...,M-1
AGCm,N=AGCm,N-1,m=2,4,...,M-1;n=3,5,...,N-2
reassigning non-zero elements in row M-2 of the intermediate matrix using the formula:
reassigning non-zero elements in the M-th row of the intermediate matrix uses the following formula:
AGCM,1=AGCM,2=AGCM-1,2
AGCM,N-1=AGCM,N=AGCM-1,N-1
Where AGC m,n represents the value of the mth row and nth column in the initial first AGC matrix of the standard lattice information medium and ZJ 2,2 represents the value of the 2 nd row and 2 nd column in the intermediate matrix.
Further, in S6, the first characteristic value is an absolute value of a difference between a minimum value of an element corresponding to a position of a strong information point in the standard dot matrix information medium and a maximum value of an element corresponding to a position of a weak information point in the standard dot matrix information medium.
Further, in S9, the method for obtaining the final AGC matrix is as follows:
if the first characteristic value is larger than the second characteristic value, the final AGC matrix is an initial first AGC matrix;
If the first characteristic value is smaller than the second characteristic value, the final AGC matrix is the initial first AGC matrix multiplied by the initial second AGC matrix.
Further, in S10, the method for obtaining the information dot matrix of the information dot medium to be extracted is as follows:
S101, acquiring an energy matrix of an information point medium to be subjected to information extraction according to the accurate center coordinates of the strong information points, the center coordinates of the weak information points and the radius of the accurate information points;
S102, multiplying the energy matrix of the information point medium to be subjected to information extraction by the final AGC matrix to obtain a correction matrix of the information point medium to be subjected to information extraction;
And S103, according to the correction matrix of the information point medium to be subjected to information extraction, acquiring the information point matrix of the information point medium to be subjected to information extraction so as to realize extraction of the optical record information in the information point medium to be subjected to information extraction.
Further, in S103, the formula used for obtaining the information dot matrix of the information dot medium to be extracted is as follows:
The 1 st row of values in the information point matrix of the information point medium to be subjected to information extraction are obtained as follows:
wherein the value of row M-1 in the information dot matrix of the information dot medium to be information extracted is acquired as follows:
The value of the M-th row in the information point matrix of the information point medium to be subjected to information extraction is obtained as follows:
Wherein, A value representing the 1 st row 1 st column of the information dot medium to be subjected to information extraction; Values representing row 1 and column 1 in a correction matrix of an information point medium to be subjected to information extraction; A value representing an mth row and an nth column of the information dot medium to be subjected to information extraction; Values representing the nth row and nth column in the correction matrix of the information point medium to be information extracted.
The method has the advantages that the method is used for extracting parallel optical recording information, accurate center coordinates of strong information points in a standard dot matrix information medium are obtained through the radius of the information points of the standard dot matrix information medium, the accurate radius of the information points is obtained, the center coordinates of weak information points are calculated, accordingly, an energy matrix of the standard dot matrix information medium is obtained, non-0 elements in the intermediate matrix are reassigned to obtain an initial first AGC matrix after the intermediate matrix is obtained according to the energy matrix of the standard dot matrix information medium, the energy matrix is multiplied with the first AGC matrix to obtain a first correction matrix, a first characteristic value is obtained according to the first correction matrix, then a second AGC matrix and a second characteristic value based on the medium without the recording points are obtained, finally a final AGC matrix is obtained, and the accurate center coordinates of the strong information points, the center coordinates of the weak information points and the radius of the accurate information points are combined, and the random optical recording information in the medium can be extracted based on a difference threshold algorithm. The invention can accurately determine the information point position by calculating the accurate center coordinates of the strong information point and the weak information point in the information medium under the condition of uneven light energy and uneven recording point intensity and size deviation, and can effectively solve the problem that adjacent light recording information is interfered with each other by processing the energy matrix of the standard lattice information medium and reassigning the non-zero element in the intermediate matrix and realize the accurate extraction of the light recording information by combining the final AGC matrix acquired by the non-information recording medium.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
This embodiment describes a method of extracting parallel optical recorded information, as shown in figure 1,
S1, acquiring preliminary center coordinates of strong information points in a standard dot matrix information medium according to the radius of the information points of the standard dot matrix information medium, wherein the standard dot matrix information medium is expressed as an information point matrix of M rows and N columns, and M and N are both odd numbers;
Specifically, the information medium for recording is a low-threshold photoreactive material. The recording method includes coding light according to the requirement, and the light with coded information makes the material react correspondingly to form recorded information. The standard dot matrix information medium is formed by encoding light 1010, the recording dot-free medium is not encoded with light, and the aim of the embodiment is to extract information on the information dot medium to be extracted by randomly encoding light.
The information dots in the information medium in this embodiment are represented in a matrix form, the information medium can be regarded as an information dot matrix, wherein the information dots include strong information dots and weak information dots, the strong information dots and the weak information dots alternate in sequence in odd rows in the information dot matrix, and elements of a first column of a first row of the information dot matrix are strong information dots, and in even rows of the information dot matrix are weak information dots, and the total number of rows and columns in the information dot matrix is odd, as shown in fig. 2, black dots in the drawing represent strong information dots, gray dots between the black dots represent weak information dots, and each information dot includes a plurality of pixel dots represented in a row and column form. The information dot radius R of a standard dot matrix information medium is known, which is essentially the number of R pixel dots on the information medium.
Preferably, the equation used to obtain the preliminary center coordinates of the strong information points in the standard dot matrix information medium is as follows:
Wherein X m,n represents the preliminary central abscissa of the strong information point on the standard dot matrix information medium, Y m,n represents the preliminary central ordinate of the strong information point on the standard dot matrix information medium, m is the row index in the information point matrix, n is the column index in the information point matrix; Representing the first of standard lattice information media Line 1R is the radius of the information point on the standard dot matrix information medium, which is the length of R pixel points on the standard dot matrix information medium;
Specifically, the strong information points in the embodiment are the elements of the odd columns in the odd rows and the elements of the even columns in the odd rows and all the elements of the even rows in the information point matrix, which are weak information points.
S2, acquiring an average value of the sum of the preliminary central coordinates of two adjacent strong information points in M rows according to the preliminary central coordinates of the strong information points, so as to acquire an average value of the sum of the differences of all rows on a standard lattice information medium, further acquire the radius of an accurate information point, and further acquire the accurate central coordinates of the strong information points of the standard lattice information medium;
preferably, the method for obtaining the exact center coordinates of the strong information points of the standard dot matrix information medium is as follows:
S21, obtaining an average value of the sum of the preliminary center coordinates of two adjacent strong information points in the M rows, wherein m=1, 3, & gt, on a standard dot matrix information medium, and calculating the coordinate difference value of each adjacent strong information point according to the preliminary center coordinates to form N-1 groups of difference data, wherein the formula is as follows:
Wherein P m is the average value of the sum of the preliminary center coordinates of the two adjacent strong information points in the m-th row on the standard dot matrix information medium, X m,1,Ym,1 is the preliminary center coordinates of the strong information points in the m-th row and the 1-th column on the standard dot matrix information medium, X m,1 is the preliminary center abscissa of the strong information points in the m-th row and the 1-th column on the standard dot matrix information medium, Y m,1 is the preliminary center abscissa of the strong information points in the m-th row and the 1-th column on the standard dot matrix information medium;
s22, obtaining the average value of the sum of the differences of all rows on the standard dot matrix information medium, wherein the obtained result is the accurate distance between two strong information points, and the radius of the accurate information points can be obtained
Wherein P is the average value of the sum of the differences of all rows on the standard dot matrix information medium;
S23, obtaining accurate center coordinates of the strong information points according to the average value of the difference values of all rows on the standard dot matrix information medium, wherein the method comprises the following steps:
S231, acquiring a distance between the initial center coordinates of the strong information points and the initial center coordinates of the strong information points as the center Is a pixel region of (a);
s232, acquiring pixel values of all pixels of the pixel area to acquire the maximum pixel value of the pixels of the pixel area;
S233, obtaining pixel points with pixel values larger than the set threshold value percentage of the pixel values and the maximum pixel value of the pixel points in the pixel point area to form a sub-pixel point area, wherein the median of the abscissa of the pixel points in the sub-pixel point area is the accurate center abscissa of the strong information point, and the median of the ordinate of the pixel points in the sub-pixel point area is the accurate center ordinate of the strong information point.
The set threshold percentage of the pixel value may be set according to a specific situation, where the threshold percentage of the pixel value set in this embodiment is 95%, that is, a pixel point with a maximum pixel value of the pixel points greater than 95% x the pixel point area is selected, so as to form a sub-pixel point area.
S3, acquiring the center coordinates of weak information points of the standard dot matrix information medium according to the accurate center coordinates of the strong information points of the standard dot matrix information medium, and acquiring an energy matrix of the standard dot matrix information medium according to the radius of the accurate information points;
Preferably, the method for acquiring the center coordinates of the weak information points of the standard dot matrix information medium comprises the following steps:
in standard dot matrix information media, M, m=1, 3.,. The centrum of weak information points in the M rows is acquired as follows:
Specifically, in the standard dot matrix information medium, the weak information points in the odd-numbered rows are all located in the even-numbered columns of the row, and the center coordinates of the weak information points are calculated by the accurate center coordinates of two strong information points adjacent to the weak information points in the row.
In standard dot matrix information media, M, m=2, 4,.. n=1, 3..the centralisation of weak information points in N columns is obtained as follows:
In standard dot matrix information media, M, m=2, 4,.. n=2, 4..the centralisation of weak information points in column N-1 is obtained as follows:
Specifically, in the standard dot matrix information medium, the even rows are weak information points, wherein the center coordinates of the weak information points in the odd columns in the even rows are calculated by passing through the precise center coordinates of the two strong information points adjacent to the weak information points in the even columns, and the center coordinates of the weak information points in the even columns are calculated by passing through the center coordinates of the two weak information points adjacent to the weak information points in the even columns.
Specifically, in the energy matrix of the standard dot matrix information medium of this embodiment, in the odd rows of the matrix, the energy mean value of the strong information dots and the energy mean value of the weak information dots are alternately arranged in turn, and in the even rows, all the information dots are weak information dots, as shown in fig. 2, where the energy mean value is that the center coordinates (including the precise center coordinates of the strong information dots and the center coordinates of the weak information dots) of the information dots in the standard dot matrix are taken as the center, and the radius of the precise information dots on the standard dot matrix information medium is taken as the average value of the pixel values of all the pixel dots in the area covered by the radius, that is, the average value of the pixel values of all the pixel dots in the information dot area.
S4, replacing element values of odd rows in an energy matrix of the standard dot matrix information medium with 0, replacing element values of odd columns in even rows in the energy matrix of the standard dot matrix information medium with 0, obtaining a zero matrix to obtain an average value A of elements in the zero matrix, and dividing the average value A of the elements in the zero matrix by non-0 elements in the zero matrix to obtain an intermediate matrix;
specifically, the number of elements in rows and columns in the energy matrix of the standard dot matrix information medium is an odd number, wherein the size of the zero point matrix is the same as that of the energy matrix of the standard dot matrix information medium, the elements in even rows and even columns in the zero point matrix are the same as those in the energy matrix of the standard dot matrix information medium, and other elements in the zero point matrix are formed by replacing other elements in the energy matrix of the standard dot matrix information medium with 0. The mean value A of the non-zero elements in the zero matrix is calculated, and is also the mean value of all the elements in the zero matrix.
Specifically, in this embodiment, the mean value a of the non-zero elements in the zero matrix is divided by the non-zero elements in the zero matrix to obtain an intermediate matrix, where the representation form of the intermediate matrix is as follows:
S5, reassigning non-0 elements in the intermediate matrix according to the intermediate matrix to obtain an initial first AGC matrix of the standard lattice information medium;
specifically, an initial first AGC matrix is obtained.
Preferably, the method for reassigning non-0 elements in the intermediate matrix is as follows:
Reassigning non-zero elements in row 1 of the intermediate matrix uses the formula:
AGC1,1=AGC1,2=ZJ2,2
AGC1,N=AGC1,N-1=ZJ2,N-1
Reassigning non-zero elements in row M-1 of the intermediate matrix using the formula:
AGCm,1=AGCm,2,m=2,4,...,M-1
AGCm,N=AGCm,N-1,m=2,4,...,M-1;n=3,5,...,N-2
reassigning non-zero elements in row M-2 of the intermediate matrix using the formula:
reassigning non-zero elements in the M-th row of the intermediate matrix uses the following formula:
AGCM,1=AGCM,2=AGCM-1,2
AGCM,N-1=AGCM,N=AGCM-1,N-1
Where AGC m,n represents the value of the mth row and nth column in the initial first AGC matrix of the standard lattice information medium and ZJ 2,2 represents the value of the 2 nd row and 2 nd column in the intermediate matrix.
S6, multiplying the energy matrix of the standard dot matrix information medium by the initial first AGC matrix to obtain a first correction matrix, and obtaining a first characteristic value according to the minimum value of an element corresponding to the position of a strong information point in the standard dot matrix information medium and the maximum value of an element corresponding to the position of a weak information point in the standard dot matrix information medium in the first correction matrix;
preferably, the first characteristic value is an absolute value of a difference between a minimum value of an element corresponding to a position of a strong information point in the standard dot matrix information medium and a maximum value of an element corresponding to a position of a weak information point in the standard dot matrix information medium.
S7, based on the accurate center coordinates of the strong information points and the center coordinates of the weak information points on the standard dot matrix information medium, acquiring an energy matrix of the medium without the recording points according to the radius of the accurate information points;
Specifically, according to the accurate center coordinates of the strong information points on the standard dot matrix information medium, the center coordinates of the weak information points and the average value of the difference values of all rows on the standard dot matrix information medium, namely the determined radius of the accurate information points, the positions corresponding to the center coordinates of the information points and the center coordinates of the weak information points in the non-recording-point medium are obtained in the non-recording-point medium, and then the energy matrix of the non-recording-point medium is determined according to the radius of the accurate information points;
S8, acquiring an intermediate matrix without recording points based on the energy matrix of the medium without recording points so as to acquire an initial second AGC matrix without recording points, multiplying the first correction matrix by the initial second AGC matrix to acquire a second correction matrix, and further acquiring a second characteristic value according to the second correction matrix;
Specifically, based on the energy matrix of the medium without recording points, S4 and S5 are repeatedly executed to obtain an initial second AGC matrix of the medium without recording points, wherein the method adopted for obtaining the second characteristic value according to the second correction matrix is the same as the method adopted for obtaining the first characteristic value according to the first correction matrix. The recording-spot-free medium of this embodiment is shown in fig. 3.
S9, acquiring a final AGC matrix according to the first characteristic value and the second characteristic value;
Preferably, the method of obtaining the final AGC matrix is as follows:
if the first characteristic value is larger than the second characteristic value, the final AGC matrix is an initial first AGC matrix;
if the first characteristic value is smaller than the second characteristic value, the final AGC matrix is the initial first AGC matrix multiplied by the initial second AGC matrix;
Specifically, when the first characteristic value is equal to the second characteristic value, the image data of the recording information medium is recognized as problem data based on the common knowledge of a person of ordinary skill in the art, and thus this embodiment will not be discussed. The standard dot matrix information medium processed in the present embodiment is based on an image of the standard dot matrix information medium.
And S10, acquiring an information point matrix of the information point medium to be subjected to information extraction based on a difference threshold algorithm according to the final AGC matrix, the accurate center coordinates of the strong information points, the center coordinates of the weak information points and the radius of the accurate information points so as to extract the optical record information in the information point medium to be subjected to information extraction.
Preferably, the method for acquiring the information point matrix of the information point medium to be subjected to information extraction is as follows:
S101, acquiring an energy matrix of an information point medium to be subjected to information extraction according to the accurate center coordinates of the strong information points, the center coordinates of the weak information points and the radius of the accurate information points;
Specifically, the center coordinates of the strong information points and the if information points on the information point medium to be extracted are corresponding to the center coordinates of the strong information points and the if information points on the standard dot matrix information medium, and the average value of all pixel point pixels in the range of each information point on the information point medium to be extracted is calculated according to the radius of the accurate information point, so that the average value is used as the element corresponding to the information point in the energy matrix of the information point medium to be extracted.
S102, multiplying the energy matrix of the information point medium to be subjected to information extraction by the final AGC matrix to obtain a correction matrix of the information point medium to be subjected to information extraction;
And S103, according to the correction matrix of the information point medium to be subjected to information extraction, acquiring the information point matrix of the information point medium to be subjected to information extraction so as to realize extraction of the optical record information in the information point medium to be subjected to information extraction.
In S103, the formula adopted for obtaining the information point matrix of the information point medium to be extracted is as follows:
The 1 st row of values in the information point matrix of the information point medium to be subjected to information extraction are obtained as follows:
wherein the value of row M-1 in the information dot matrix of the information dot medium to be information extracted is acquired as follows:
The value of the M-th row in the information point matrix of the information point medium to be subjected to information extraction is obtained as follows:
Wherein, A value representing the 1 st row 1 st column of the information dot medium to be subjected to information extraction; Values representing row 1 and column 1 in a correction matrix of an information point medium to be subjected to information extraction; A value representing an mth row and an nth column of the information dot medium to be subjected to information extraction; Values representing the nth row and nth column in the correction matrix of the information point medium to be information extracted.
Up to this point, the information dot matrix of the information dot medium to be subjected to information extraction is obtained, whereby information extraction of the information dot medium to be subjected to information extraction is realized.
According to the extraction method of parallel optical recording information, under the condition of uneven optical energy, the accurate center coordinates of strong information points and weak information points in an information medium are calculated, under the condition of uneven intensity and size deviation of recorded points, the positions of the information points are accurately determined, meanwhile, the energy matrix of a standard lattice information medium is processed, non-zero elements in an intermediate matrix are reassigned, the problem that adjacent optical recording information is interfered with each other is effectively solved, and the accurate extraction of the optical recording information is realized by combining a final AGC matrix obtained by an information-free recording medium.
It should be noted that the above embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the above embodiments, it should be understood by those skilled in the art that the technical solution described in the above embodiments may be modified or some or all of the technical features may be equivalently replaced, and these modifications or substitutions do not make the essence of the corresponding technical solution deviate from the scope of the technical solution of the embodiments of the present invention.