Sophie

Sophie

distrib > * > 2010.0 > * > by-pkgid > 0c1f9463f03451b5503f0c33beb88a98 > files > 457

gap-system-4.4.12-5mdv2010.0.x86_64.rpm

<Chapter><Heading> Topological Data Analysis</Heading>

<Table Align="|l|" >

<Row>
<Item>
<Index>ReadImageFile</Index>
<C> ReadImageFile("file.png",n)</C>


<P/>
Inputs an image file ("file.png", "file.eps", "file.bmp" etc)  
and an integer <M>n</M>
between 0 and 765. 
It returns a 1/0 integer matrix representing a black/white version of the image determined by the threshold <M>n</M>. 
</Item>
</Row>

<Row>
<Item>
<Index>WriteImageFile</Index>
<C> WriteImageFile(A,"filename","ext")</C>


<P/>
Inputs a 1/0 matrix A, and a filename followed by its extension 
(e.g. "myfile" followed by "png"). A black/white image is saved to the file.

</Item>
</Row>

<Row>
<Item>
<Index>ViewMatrix</Index>
<C> ViewMatrix(A)</C>
<C> ViewMatrix(A,"mozilla");</C>


<P/>
Inputs a 1/0 matrix A, and command such as "mozilla" for viewing image files.
A black/white image is displayed. 
</Item>
</Row>

<Row>
<Item>
<Index>BettiNumbersOfMatrix</Index>
<C> BettiNumbersOfMatrix(A)</C>


<P/>
Inputs a 1/0 integer matrix <M>A</M> 
representing a black/white version of an image. It returns a list 
<M>[b0,b1]</M> where <M>b0</M> is the 
zeroth betti number of the black image space, and <M>b1</M> is the first betti number. All higher betti numbers will be zero as the space is <M>2</M>-dimensional.
</Item>
</Row>

<Row>
<Item>
<Index>MatrixToChainComplex</Index>
<C> MatrixToChainComplex(A)</C>


<P/>
Inputs a  1/0 integer matrix <M>A</M>
representing a black/white version of an image
and returns the cellular chain complex of the black image space (in characteristic 0).

</Item>
</Row>

<Row>
<Item>
<Index>ContractMatrix</Index>
<C> ContractMatrix(A)</C>


<P/>
Inputs a  1/0 integer matrix <M>A</M> representing a black/white
version of an image
and modifies <M>A</M> so that it represents a homotopy equivalent 
image space hopefully with fewer black cells. Black cells are removed from the image to produce a homotopy equivalent image from which no further black cell can be removed without changing the homotopy type. The function returns 
true if it succeeds in reducing the number of cells of the original image; otherwise it 
returns false.

</Item>
</Row>

<Row>
<Item>
<Index>BoundaryOfMatrix</Index>
<C> BoundaryOfMatrix(A)</C>


<P/>
Inputs a  1/0 integer matrix <M>A</M> representing a black/white
version of an image. It returns a matrix 
 representing the boundary of the black image.

</Item>
</Row>

<Row>
<Item>
<Index>SingularityMatrix</Index>
<C> SingularityMatrix(A)</C>


<P/>
Inputs a  1/0 integer matrix <M>A</M> representing a black/white
version of an image. It returns a matrix
 representing the set of points where the boundary of the black image is not differentiable. (The method for deciding differentiability at a point is crude/discrete and prone to errors.) The zeroth betti number of the set of points is a measure of the number of "corners" in the boundary of the image.

 </Item>
 </Row>
 


<Row>
<Item>
<Index>ThickenedMatrix</Index>
<C> ThickenedMatrix(A)</C>
<C> ThickenedMatrix(A,n)</C>


<P/>
Inputs a  1/0 integer matrix <M>A</M> 
 and returns a 1/0 matrix <M>B</M>. If an entry in <M>A</M> is equal to 1 then the corresponding entry in <M>B</M> and all eight neighbouring entries in <M>B</M> are equal to 1.
<P/> If a positive integer <M>n</M> is input as a second argument then the thickening process is repeated <M>n</M> times.

</Item>
</Row>

<Row>
<Item>
<Index>ComplementedMatrix</Index>
<C> ComplementedMatrix(A)</C>


<P/>
Inputs a  1/0 integer matrix <M>A</M>
 and returns a 1/0 matrix <M>B</M>. An entry in <M>B</M> is equal to 1 precisely when  the corresponding entry in <M>A</M>  equals 0.

 </Item>
 </Row>


</Table>
</Chapter>