Co-occurrence matrix

Co-occurrence matrix

A co-occurrence matrix or co-occurrence distribution (also referred to as : gray-level co-occurrence matrices GLCMs) is a matrix that is defined over an image to be the distribution of co-occurring pixel values (grayscale values, or colors) at a given offset. It is used as an approach to texture analysis with various applications especially in medical image analysis. == Method == Given a grey-level image I {\displaystyle I} , co-occurrence matrix computes how often pairs of pixels with a specific value and offset occur in the image. The offset, ( Δ x , Δ y ) {\displaystyle (\Delta x,\Delta y)} , is a position operator that can be applied to any pixel in the image (ignoring edge effects): for instance, ( 1 , 2 ) {\displaystyle (1,2)} could indicate "one down, two right". An image with p {\displaystyle p} different pixel values will produce a p × p {\displaystyle p\times p} co-occurrence matrix, for the given offset. The ( i , j ) th {\displaystyle (i,j)^{\text{th}}} value of the co-occurrence matrix gives the number of times in the image that the i th {\displaystyle i^{\text{th}}} and j th {\displaystyle j^{\text{th}}} pixel values occur in the relation given by the offset. For an image with p {\displaystyle p} different pixel values, the p × p {\displaystyle p\times p} co-occurrence matrix C is defined over an n × m {\displaystyle n\times m} image I {\displaystyle I} , parameterized by an offset ( Δ x , Δ y ) {\displaystyle (\Delta x,\Delta y)} , as: C Δ x , Δ y ( i , j ) = ∑ x = 1 n ∑ y = 1 m { 1 , if I ( x , y ) = i and I ( x + Δ x , y + Δ y ) = j 0 , otherwise {\displaystyle C_{\Delta x,\Delta y}(i,j)=\sum _{x=1}^{n}\sum _{y=1}^{m}{\begin{cases}1,&{\text{if }}I(x,y)=i{\text{ and }}I(x+\Delta x,y+\Delta y)=j\\0,&{\text{otherwise}}\end{cases}}} where: i {\displaystyle i} and j {\displaystyle j} are the pixel values; x {\displaystyle x} and y {\displaystyle y} are the spatial positions in the image I; the offsets ( Δ x , Δ y ) {\displaystyle (\Delta x,\Delta y)} define the spatial relation for which this matrix is calculated; and I ( x , y ) {\displaystyle I(x,y)} indicates the pixel value at pixel ( x , y ) {\displaystyle (x,y)} . The 'value' of the image originally referred to the grayscale value of the specified pixel, but could be anything, from a binary on/off value to 32-bit color and beyond. (Note that 32-bit color will yield a 232 × 232 co-occurrence matrix!) Co-occurrence matrices can also be parameterized in terms of a distance, d {\displaystyle d} , and an angle, θ {\displaystyle \theta } , instead of an offset ( Δ x , Δ y ) {\displaystyle (\Delta x,\Delta y)} . Any matrix or pair of matrices can be used to generate a co-occurrence matrix, though their most common application has been in measuring texture in images, so the typical definition, as above, assumes that the matrix is an image. It is also possible to define the matrix across two different images. Such a matrix can then be used for color mapping. == Aliases == Co-occurrence matrices are also referred to as: GLCMs (gray-level co-occurrence matrices) GLCHs (gray-level co-occurrence histograms) spatial dependence matrices == Application to image analysis == Whether considering the intensity or grayscale values of the image or various dimensions of color, the co-occurrence matrix can measure the texture of the image. Because co-occurrence matrices are typically large and sparse, various metrics of the matrix are often taken to get a more useful set of features. Features generated using this technique are usually called Haralick features, after Robert Haralick. Texture analysis is often concerned with detecting aspects of an image that are rotationally invariant. To approximate this, the co-occurrence matrices corresponding to the same relation, but rotated at various regular angles (e.g. 0, 45, 90, and 135 degrees), are often calculated and summed. Texture measures like the co-occurrence matrix, wavelet transforms, and model fitting have found application in medical image analysis in particular. == Other applications == Co-occurrence matrices are also used for words processing in natural language processing (NLP).

JDoodle

JDoodle is a cloud-based online integrated development environment and compiler platform that supports execution of source code in 70+ programming languages including Java, Python, C/C++, PHP, Ruby, Perl, HTML, and more. It provides zero‑setup code for compilation, execution, and sharing via a web browser interface. == Features == Provides real‑time collaboration and code embedding via shareable URLs and APIs Offers an integrated terminal interface supporting database engines such as MySQL and MongoDB. JDroid — AI‑assistant to generate code snippets, optimize code, and assist debugging. == Languages and frameworks supported ==

Aravind Joshi

Aravind Krishna Joshi (August 5, 1929 – December 31, 2017) was the Henry Salvatori Professor of Computer and Cognitive Science in the computer science department of the University of Pennsylvania. Joshi defined the tree-adjoining grammar formalism which is often used in computational linguistics and natural language processing. Joshi studied at Pune University and the Indian Institute of Science, where he was awarded a BE in electrical engineering and a DIISc in communication engineering respectively. Joshi's graduate work was done in the electrical engineering department at the University of Pennsylvania, and he was awarded his PhD in 1960. He became a professor at Penn and was the co-founder and co-director of the Institute for Research in Cognitive Science. == Awards and recognitions == Guggenheim fellow, 1971–72 Fellow of the Institute of Electrical and Electronics Engineers (IEEE), 1976 Best Paper Award at the National Conference on Artificial Intelligence, 1987 Founding Fellow of the American Association for Artificial Intelligence (AAAI), 1990 IJCAI Award for Research Excellence, 1997 Fellow of the Association for Computing Machinery, 1998 Elected to the National Academy of Engineering, 1999 First to be awarded the Association for Computational Linguistics Lifetime Achievement Award at the 40th anniversary meeting of the ACL, 2002 Awarded the Rumelhart Prize, 2003 Benjamin Franklin Medal in Computer and Cognitive Science, 2005 Doctor honoris causa of mathematical and physical sciences, Charles University in Prague, October 30, 2013 S.-Y. Kuroda Prize of the SIG Mathematics of Language of the ACL, 2013 === Awarded history === On April 21, 2005, Joshi was awarded the Franklin Institute's Benjamin Franklin Medal in Computer and Cognitive Science. The Franklin Institute citation states that he was awarded the medal "for his fundamental contributions to our understanding of how language is represented in the mind, and for developing techniques that enable computers to process efficiently the wide range of human languages. These advances have led to new methods for computer translation."

AI Paragraph Rewriters Reviews: What Actually Works in 2026

Looking for the best AI paragraph rewriter? An AI paragraph rewriter is software that uses machine learning to help you get more done — it can save you hours every week by automating repetitive work. Most options offer a generous free tier, with paid plans unlocking higher limits, faster processing, and team features. Whether you are a beginner or a pro, the right AI paragraph rewriter slots into your workflow and pays for itself fast. This guide breaks down the top picks, their pros and cons, and who each one is best for.

Conversational AI Platforms: Free vs Paid (2026)

Comparing the best conversational AI platform? An conversational AI platform is software that uses machine learning to help you get more done — it lowers the barrier so anyone can produce professional output. Privacy matters too: check whether your data trains the model and whether a no-log or enterprise tier is available. Whether you are a beginner or a pro, the right conversational AI platform slots into your workflow and pays for itself fast. Below we compare features, pricing, and real output so you can choose with confidence.

Free boundary condition

In image processing, the free boundary condition is the convention used when applying a convolution kernel to a digital image in which pixel locations that lie outside the image boundaries are interpreted as having a value of zero.[1] The question of what value to assign out-of-bounds pixels may arise, for instance, when applying a 3×3 kernel to the corner pixel in an image.

Top 10 AI Image Generators Compared (2026)

Curious about the best AI image generator? An AI image generator is software that uses machine learning to help you get more done — it combines speed, accuracy, and an interface that just works. Hands-on testing shows real-world results vary, so a short free trial is the smartest way to decide. Whether you are a beginner or a pro, the right AI image generator slots into your workflow and pays for itself fast. Read on for hands-on impressions, pricing tiers, and the standout features that matter.