Up | Example 1 : arrlib matrix math | Example 2 : Two-dimentional geometry | Example 3 : Member functions | Example 4 : Setting sub matrices | Example 5 : Locating peaks in a list

 

  

 
Example 3 : Member functions

Note: these functions are present as a convenience only. All functions are also available globally.

Submatrix (member) functions

Extraction of sub matrices and sub vectors of any kind from a large matrix:

import arrlib as arr

m = arr.xyzfMat(10,10)

b = arr.box2i((1,1),(4,5))
subm1 = m.subMatr(b)

b = arr.box2i((0,0),(10,10))
subm2 = m.decimateMatr(b,2,3)

r = arr.uintVec(2)
c = arr.uintVec(2)
r[0]=2,r[1]=4
c[0]=3,c[1]=5
subm3 = m.indexedSubMatr(r,c)

rowvec = m.rowVec(3)
colvec = m.colVec(5)
ro = m.rotateMatr(1)

The parameter to rotateMatr is:

  • 0: no rotation
  • 1: 90 degrees counterclockwise
  • 2: 180 degrees counterclockwise
  • 3: 270 degrees counterclockwise

The subVec functions are similar, but in one dimension.

Tree (member) functions

See the introduction

Extraction (member) functions

See the introduction



Scorpion Vision Version XII : Build 646 - Date: 20170225
Scorpion Vision Software® is a registered trademark of Tordivel AS.
Copyright © 2000 - 2017 Tordivel AS.