CN106780585A - The computational methods of any gray level co-occurrence matrixes based on image rotation and application - Google Patents

The computational methods of any gray level co-occurrence matrixes based on image rotation and application Download PDF

Info

Publication number
CN106780585A
CN106780585A CN201611064726.7A CN201611064726A CN106780585A CN 106780585 A CN106780585 A CN 106780585A CN 201611064726 A CN201611064726 A CN 201611064726A CN 106780585 A CN106780585 A CN 106780585A
Authority
CN
China
Prior art keywords
image
glcm
relative position
computational methods
rectangular area
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.)
Granted
Application number
CN201611064726.7A
Other languages
Chinese (zh)
Other versions
CN106780585B (en
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.)
Second Institute of Oceanography SOA
Original Assignee
Second Institute of Oceanography SOA
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 Second Institute of Oceanography SOA filed Critical Second Institute of Oceanography SOA
Priority to CN201611064726.7A priority Critical patent/CN106780585B/en
Publication of CN106780585A publication Critical patent/CN106780585A/en
Application granted granted Critical
Publication of CN106780585B publication Critical patent/CN106780585B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

Computational methods and application the invention discloses a kind of any gray level co-occurrence matrixes based on image rotation, GLCM of the image on any relative direction and distance is calculated by image rotation, the calculating of GLCM is not limited to specific angle, distance etc. and is limited.So that applications of the GLCM in each field becomes more to facilitate, application space and the application effect of GLCM have been expanded.

Description

The computational methods of any gray level co-occurrence matrixes based on image rotation and application
Technical field
The present invention relates to a kind of meter of GLCM (gray level co-occurrence matrixes, Gray-level co-occurrence matrix) Calculation method, more particularly to a kind of any gray level co-occurrence matrixes based on image rotation computational methods and application.
Background technology
GLCM is a kind of spatial correlation characteristic by gray scale describes the conventional analysis tool of texture.Texture can be from many Identified naturally by the vision of people in visible surface, and give people some special sensations, such as sense of direction, the cycle is felt and coarse Sense etc..Used as the inherent attribute of visible surface, texture is all very important research topic in various fields.Many is around texture Research work be all how preferably to extract the feature of texture objective description is carried out to it exploring, GLCM is wherein one Plant the statistical and analytical tool for growing up.
Traditional GLCM is substantially the gray value joint probability distribution of the pixel pair for meeting specific relative position relation.Should Matrix can by the pixel in image to being counted.From the matrix can with the second-order statisticses parameter of deduced image, These parameters characterize the different qualities of image texture respectively.There are some researches show the difference between texture and texture is greatly relied on Difference on the second-order statisticses of texture, therefore identification of the second-order statisticses parameter for image texture, classification as derived from GLCM All it is very important Deng for.It is general only to consider but tradition GLCM analyzing image textures are limited by image pixel positions GLCM (the usually horizontal direction of image, vertical direction and diagonal) on specific direction;Accordingly, it would be desirable to invent one kind The computational methods of GLCM of the image on any relative position can be calculated.
The content of the invention
For in the prior art, GLCM calculates the above-mentioned technical problem for existing to the present invention, there is provided one kind is based on image rotation Any gray level co-occurrence matrixes computational methods, for GLCM each field application facility is provided.
Another aspect of the present invention, also exemplarily provides the calculating of any gray level co-occurrence matrixes based on image rotation Two kinds of concrete applications of method.
In the present invention, " any gray level co-occurrence matrixes " refer to the gray level co-occurrence matrixes of any relative position.
Therefore, the present invention is adopted the following technical scheme that:
The computational methods of any gray level co-occurrence matrixes based on image rotation, comprise the following steps:
S1:Image is chosen, the corresponding relative positions of GLCM to be calculated, relative position relative direction and image water are set Square to angle theta and relative position two ends characterize apart from r;
S2:Image is rotated with-θ angles, then this is calculated from postrotational image with respect to position by formula (1) Put the GLCM of corresponding image (image before rotation):
WhereinExpression is rounded downwards;G(m,n;R, θ) represent rotation before image GLCM in m rows n-th row element Value, G ' (m, n;R ', θ ') represent in the GLCM of postrotational image or the rectangular area for containing postrotational image m rows the N row element value (from hereinafter it can be seen that:The GLCM of postrotational image is the rectangular area for containing postrotational image Matrix-block of 1st row of GLCM to the row of Nth row the 1st to Nth column), it can be calculated by formula (2);
Wherein " card " represents the element number in set;Represent the pixel set in rectangular area;F (x, y) is represented Position coordinates is the gray value at (x, y) place, and with the coordinate representation of rectangular co-ordinate, the coordinate system is with the figure before rotating for position here Picture horizontally and vertically as two axles of coordinate system;
Normalization factor Q ' (r ', θ ') is:
It can be with the number of the pixel pair in relative position (r ', θ ') coincidence in representing rectangular area;
, it is necessary to remove four angles of the rectangular area for containing postrotational image outside image in calculating process;This Can be realized by following simple mark:Without loss of generality, it is assumed that the tonal range in image is 1 to N, makes four angles The gray value in region is N+1, the GLCM of whole rectangular area is then calculated by formula (2) and (3), then postrotational image GLCM be the GLCM the 1st row to Nth row the 1st row to Nth column matrix-block.
The computational methods of any gray level co-occurrence matrixes based on image rotation of the invention, image is obtained by image rotation GLCM on any relative position, makes applications of the GLCM in each field become more to facilitate, and has expanded the application space of GLCM And application effect.
Another aspect of the present invention, also exemplarily provides the calculating of any gray level co-occurrence matrixes based on image rotation Two kinds of concrete applications of method:
Application of the computational methods of any gray level co-occurrence matrixes based on image rotation in symmetrical GLCM.
Application of the computational methods of any gray level co-occurrence matrixes based on image rotation in grain direction estimation.
Brief description of the drawings
Fig. 1 is schematic diagram of the invention;
Fig. 2 is the image of GLCM to be asked in the specific embodiment of the invention;
Fig. 3-1 to Fig. 3-2 is respectively the relative position being calculated by traditional GLCM computational methods and the method for the present inventionThe unit of distance is in the GLCM of corresponding image, wherein relative position:Pel spacing;
Fig. 4-1 to Fig. 4-2 is respectively the relative position being calculated by traditional GLCM computational methods and the method for the present invention The GLCM of (10,0 °) corresponding image, wherein the unit of distance is in relative position:Pel spacing;
Fig. 5-1 to Fig. 5-2 is respectively the relative position being calculated by traditional GLCM computational methods and the method for the present inventionThe unit of distance is in the GLCM of corresponding image, wherein relative position:Pel spacing;
Fig. 6-1 to Fig. 6-2 is respectively the relative position being calculated by traditional GLCM computational methods and the method for the present invention The GLCM of (10,90 °) corresponding image, wherein the unit of distance is in relative position:Pel spacing;
Fig. 7-1 to Fig. 7-4 relative positions (10 ,-67.5 °) that respectively method of the present invention is calculated, (10 ,- 22.5 °), (10,22.5 °), the GLCM of (10,67.5 °) corresponding image, wherein the unit of distance is in relative position:Pixel Spacing;
Fig. 8 is the schematic flow sheet using the fine evaluation method of grain direction comprising GLCM computational methods of the present invention.
Specific embodiment
In order that those skilled in the art more fully understand the present invention program, below in conjunction with the embodiment of the present invention Accompanying drawing, clear, complete description is carried out to the technical scheme in the embodiment of the present invention.
As shown in figure 1, the computational methods of any gray level co-occurrence matrixes based on image rotation, comprise the following steps:
S1:Image is chosen, the corresponding relative positions of GLCM to be calculated, relative position relative direction and image water are set Square to angle theta and relative position two ends characterize apart from r;
S2:Image is rotated with-θ angles, then this is calculated from postrotational image with respect to position by formula (1) Put the GLCM of corresponding image (image before rotation):
WhereinExpression is rounded downwards;G(m,n;R, θ) represent rotation before image GLCM in m rows n-th row element Value, G ' (m, n;R ', θ ') represent in the GLCM of postrotational image or the rectangular area for containing postrotational image m rows the N row element value (from hereinafter it can be seen that:The GLCM of postrotational image is the rectangular area for containing postrotational image Matrix-block of 1st row of GLCM to the row of Nth row the 1st to Nth column), it can be calculated by formula (2);
Wherein " card " represents the element number in set;Represent the pixel set in rectangular area;F (x, y) is represented Position coordinates is the gray value at (x, y) place, and with the coordinate representation of rectangular co-ordinate, the coordinate system is with the figure before rotating for position here Picture horizontally and vertically as two axles of coordinate system;
Normalization factor Q ' (r ', θ ') is:
It can be with the number of the pixel pair in relative position (r ', θ ') coincidence in representing rectangular area;
, it is necessary to remove four angles of the rectangular area for containing postrotational image outside image in calculating process;This Can be realized by following simple mark:Without loss of generality, it is assumed that the tonal range in image is 1 to N, makes four angles The gray value in region is N+1, the GLCM of whole rectangular area is then calculated by formula (2) and (3), then postrotational image GLCM be the GLCM the 1st row to Nth row the 1st row to Nth column matrix-block.
Principle of the invention is as follows:
Traditional GLCM computational methods are limited by image pixel positions, and can only calculate those can be with image pixel positions weight The corresponding GLCM of relative position of conjunction.This causes the GLCM of image, and analyze can only be in these specific relative positions (usually image Horizontal direction, vertical direction and two diagonally adjacent relative positions that can be overlapped with image pixel) on carry out, so as to limit The ability of the graphical analysis based on GLCM, fine estimation of such as grain direction etc. are made.
If it is intended to calculating matrix element G (m, the n of GLCM of the image on any relative position (r, θ);R, θ), we Image can be rotated with-θ angles, as shown in figure 1, after calculating the matrix element of the GLCM of postrotational image, then Obtained by the matrix element interpolation of the GLCM of postrotational image.By taking linear interpolation as an example, then relative position (r, θ) is corresponding The n-th column matrix of m rows element of the GLCM of the image before rotation just can be calculated by formula (1);But calculating , it is necessary to remove four angles of the rectangular area for containing postrotational image outside image in journey, Fig. 1 is seen.This can be by such as It is lower simply to mark to realize.Without loss of generality, it is assumed that the tonal range in image is 1 to N.We can make four angular zones Gray value be N+1, then by formula (2) and the GLCM of the whole rectangular area of (3) calculating, then postrotational image GLCM is matrix-block of the 1st row of the GLCM to the row of Nth row the 1st to Nth column.
The GLCM calculated examples that an image is described below are specifically described:
Fig. 2 is the image of GLCM to be asked;The side that traditional GLCM computational methods and the present invention are given is respectively adopted first Method calculates relative position(10,0°)、And the GLCM of (10,90 °) corresponding image, as a result in figure Be given in 3 to Fig. 6.These relative positions ((10,0°)、And (10,90 °)) can be and image What pixel overlapped, therefore the GLCM of their corresponding images can be obtained using traditional GLCM computational methods.From Fig. 3 to figure 6 Comparative result can see:In the relative position that these can overlap with image pixel, the method be given by the present invention is calculated The GLCM for obtaining, it is very consistent with the GLCM that traditional GLCM computational methods are obtained.Secondly, the method for being given using the present invention is calculated The GLCM of relative position (10, -67.5 °), (10, -22.5 °), (10,22.5 °) and (10,67.5 °) corresponding images, as a result Be given in Fig. 7-1 to Fig. 7-4.These relative positions can not overlap with image pixel, therefore traditional GLCM computational methods are Can not calculate the GLCM's of the corresponding image of these relative positions.
Embodiment 2:
The corresponding GLCM of any relative position obtained by the computational methods of the embodiment of the present invention 1, adds the matrix Transposition, then all matrix elements of matrix sum are obtained into symmetrical GLCM all divided by 2.
Embodiment 3:
The present invention can calculate GLCM of the image on any relative position, applications of the GLCM in each field is become more just Profit, has expanded application space and the application effect of GLCM.Grain direction is hereafter applied to finely as a example by estimation field by the present invention Illustrate.
A kind of fine evaluation method of grain direction based on GLCM, employs needed for the method for providing of the invention is calculated GLCM, as shown in figure 8, comprising the following steps:
Step one:Image is chosen, the direction of relative position and distance are divided at equal intervals respectively, direction is with angle, θ Represent, angular divisions scope is -90 ° to 90 °, wherein " angle " is between direction and image level direction in relative position Angle, " distance " is the spacing at relative position two ends, is represented with r;
It is corresponding that the computational methods provided by the present invention calculate these relative positions angularly with equidistant intervals GLCM;
Step 2:Without loss of generality, it is assumed that the tonal range of image is 1 to N;These etc. are calculated by formula (4) or (5) The Z (r, θ) of the corresponding GLCM of relative position of angle and equidistant intervals, obtain the image Z (r, θ) angularly and equidistantly Sow discord every distribution:
Wherein w (m, n) is that distance is passed between the position in a matrix of the matrix element on GLCM and diagonal of a matrix Increasing function;Obviously, larger matrix element is got near the diagonal for concentrating on GLCM, then the value of Z (r, θ) is just smaller;
If using (m-n)2As w (m, n), then formula (4) is just changed into:
This is contrast;
Step 3:Integration (summation) Z ' of calculating parameter Z:Z ' (θ) is calculated by formula (6);
Z ' (θ)=∫ Z (r, θ) dr formula (6)
In practical application, the form of the numerical integration (discrete summation) of Z ' (θ) can be used, for example
Wherein, L represents the number divided apart from r, rlRepresent l-th distance.
Step 4:Search Z ' (θ) more obvious minimum, determines grain direction:
Direction corresponding to the minimum of Z ' (θ) is the grain direction in image.There is fuctuation within a narrow range to rise and fall for Z ' (θ) dry Situation about disturbing, after smooth removal fuctuation within a narrow range fluctuating interference can be first carried out to Z ' (θ), searches again for its obvious minimum and determines Grain direction.
Certainly, specific technical problem is solved it is also possible to apply the invention to other technologies field, it is mentioned above to be applied to line Finely estimation is only one of concrete application of the invention in reason direction, is not intended to limit application field of the invention.In principle, it is all It is that the method calculating GLCM provided using the present invention belongs to protection scope of the present invention.

Claims (3)

1. the computational methods of any gray level co-occurrence matrixes based on image rotation, comprise the following steps:
S1:Image is chosen, the corresponding relative position of GLCM to be calculated, relative position relative direction and image level are set The angle theta in direction and relative position two ends characterize apart from r;
S2:Image is rotated with-θ angles, then the relative position pair is calculated from postrotational image by formula (1) The GLCM of the image answered:
WhereinExpression is rounded downwards;G(m,n;R, θ) represent rotation before image GLCM in m rows n-th row element value, G′(m,n;R ', θ ') represent the GLCM of postrotational image or the rectangular area for containing postrotational image in m rows n-th arrange Element value, it can be calculated by formula (2);
Wherein " card " represents the element number in set;Represent the pixel set in rectangular area;F (x, y) represents position Coordinate is the gray value at (x, y) place, and with the coordinate representation of rectangular co-ordinate, the coordinate system is with the image before rotating for position here Horizontally and vertically as two axles of coordinate system;
Normalization factor Q ' (r ', θ ') is:
It can be with the number of the pixel pair in relative position (r ', θ ') coincidence in representing rectangular area;
, it is necessary to remove four angles of the rectangular area for containing postrotational image outside image in calculating process;This can be with Realized by following simple mark:Without loss of generality, it is assumed that the tonal range in image is 1 to N, makes four angular zones Gray value be N+1, then by formula (2) and the GLCM of the whole rectangular area of (3) calculating, then postrotational image GLCM is matrix-block of the 1st row of the GLCM to the row of Nth row the 1st to Nth column.
2. application of the computational methods of any gray level co-occurrence matrixes based on image rotation in symmetrical GLCM.
3. application of the computational methods of any gray level co-occurrence matrixes based on image rotation in grain direction estimation.
CN201611064726.7A 2016-11-28 2016-11-28 The calculation method and application of any gray level co-occurrence matrixes based on image rotation Expired - Fee Related CN106780585B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611064726.7A CN106780585B (en) 2016-11-28 2016-11-28 The calculation method and application of any gray level co-occurrence matrixes based on image rotation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611064726.7A CN106780585B (en) 2016-11-28 2016-11-28 The calculation method and application of any gray level co-occurrence matrixes based on image rotation

Publications (2)

Publication Number Publication Date
CN106780585A true CN106780585A (en) 2017-05-31
CN106780585B CN106780585B (en) 2019-07-23

Family

ID=58902002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611064726.7A Expired - Fee Related CN106780585B (en) 2016-11-28 2016-11-28 The calculation method and application of any gray level co-occurrence matrixes based on image rotation

Country Status (1)

Country Link
CN (1) CN106780585B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1936919A (en) * 2005-09-23 2007-03-28 中国农业机械化科学研究院 Method for automatically identifying field weeds in crop seeding-stage using site and grain characteristic
CN101609555A (en) * 2009-07-27 2009-12-23 浙江工商大学 A kind of gray-scale template matching method based on gray level co-occurrence matrixes
CN102508110A (en) * 2011-10-10 2012-06-20 上海大学 Texture-based insulator fault diagnostic method
CN103198455A (en) * 2013-03-14 2013-07-10 哈尔滨工程大学 Image denoising method utilizing total variation minimization and gray scale co-occurrence matrixes
CN103605958A (en) * 2013-11-12 2014-02-26 北京工业大学 Living body human face detection method based on gray scale symbiosis matrixes and wavelet analysis
US20140337719A1 (en) * 2013-05-10 2014-11-13 Peking University Founder Group Co., Ltd. Apparatus And A Method For Logically Processing A Composite Graph In A Formatted Document
CN105760877A (en) * 2016-02-19 2016-07-13 天纺标检测科技有限公司 Wool and cashmere identification algorithm based on gray level co-occurrence matrix model

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1936919A (en) * 2005-09-23 2007-03-28 中国农业机械化科学研究院 Method for automatically identifying field weeds in crop seeding-stage using site and grain characteristic
CN101609555A (en) * 2009-07-27 2009-12-23 浙江工商大学 A kind of gray-scale template matching method based on gray level co-occurrence matrixes
CN102508110A (en) * 2011-10-10 2012-06-20 上海大学 Texture-based insulator fault diagnostic method
CN103198455A (en) * 2013-03-14 2013-07-10 哈尔滨工程大学 Image denoising method utilizing total variation minimization and gray scale co-occurrence matrixes
US20140337719A1 (en) * 2013-05-10 2014-11-13 Peking University Founder Group Co., Ltd. Apparatus And A Method For Logically Processing A Composite Graph In A Formatted Document
CN103605958A (en) * 2013-11-12 2014-02-26 北京工业大学 Living body human face detection method based on gray scale symbiosis matrixes and wavelet analysis
CN105760877A (en) * 2016-02-19 2016-07-13 天纺标检测科技有限公司 Wool and cashmere identification algorithm based on gray level co-occurrence matrix model

Also Published As

Publication number Publication date
CN106780585B (en) 2019-07-23

Similar Documents

Publication Publication Date Title
CN112560595B (en) River cross section flow calculation method based on river surface flow velocity
CN106780584B (en) The fine evaluation method of grain direction based on gray level co-occurrence matrixes
CN102122359B (en) Image registration method and device
CN104331876A (en) Line detection and image processing method and related devices thereof
CN106339707B (en) A kind of gauge pointer image-recognizing method based on symmetric characteristics
EP3273412A1 (en) Three-dimensional modelling method and device
CN110136114B (en) Wave surface height measuring method, terminal equipment and storage medium
CN111292336B (en) Omnidirectional image non-reference quality evaluation method based on segmented spherical projection format
CN108401565B (en) Remote sensing image registration method based on improved KAZE features and Pseudo-RANSAC algorithms
CN109558908A (en) A kind of determination method of given area optimal edge
CN106127261B (en) A kind of fast multiresolution gray level image template matching method
CN109993801A (en) A kind of caliberating device and scaling method for two-dimensional camera and three-dimension sensor
CN101216938B (en) An automatic positioning method of multi-sequence images
CN102708589A (en) Three-dimensional target multi-viewpoint view modeling method on basis of feature clustering
CN102682424A (en) Image amplification processing method based on edge direction difference
Wang et al. Fractal modelling of the microstructure property of quartz mylonite during deformation process
CN106780585A (en) The computational methods of any gray level co-occurrence matrixes based on image rotation and application
Štroner et al. Progressive dilution of point clouds considering the local relief for creation and storage of digital twins of cultural heritage
Chen et al. Research on pupil center location based on improved Hough transform and edge gradient algorithm
CN109829951B (en) Parallel equipotential detection method and device and automatic driving system
CN106780583A (en) The computational methods of any gray level co-occurrence matrixes based on matrix element interpolation and application
CN104156952B (en) A kind of image matching method for resisting deformation
CN108304649B (en) High-rise building deformation prediction method
CN102901697B (en) Porosity detection method for soil
CN106558075A (en) Computational methods and application based on any gray level co-occurrence matrixes of picture element interpolation

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 310007 No. 36 Baoluo North Road, Xihu District, Hangzhou City, Zhejiang Province

Applicant after: SECOND INSTITUTE OF OCEANOGRAPHY, MNR

Address before: 310012 No. 36 Baolu North Road, Xihu District, Hangzhou City, Zhejiang Province

Applicant before: THE SECOND INSTITUTE OF OCEANOGRAPHY, SOA

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190723