Skip to content

sparse_blob2Dproperties

sparse_blob2Dproperties(v, i, j, labels, npk)

Categories: Peak labelling, Sparse

Description

fills the array results with properties of each labelled object described by v and labels (pixel values and blob) and positions i,j in the image. results are: results[ipk,s2D_1] = sum(1), number of pixels results[ipk,s2D_I] = sum (I), total intensity results[ipk,s2D_fI] = sum (fI), intensity weighted fast index results[ipk,s2D_sI] = sum (sI), intensity weighted slow index results[ipk,s2D_ffI] = sum (ffI), intensity weighted fast^2 index results[ipk,s2D_sfI] = sum (sfI), intensity weighted slowfast index results[ipk,s2D_ssI] = sum (ss*I), intensity weighted slow^2 index

Parameters

Name Description
i Rows (uint16).
j Cols (uint16).
labels Labels (int32).
npk Number of objects.
results Output (npk, 11).
v Values (float32).

Constraints

  • v.slow_axis == 0
  • v.format == 'f'
  • i.format == 'H' or i.itemsize == 2
  • j.format == 'H' or j.itemsize == 2
  • j.n == i.n
  • v.n == i.n
  • ( labels.format == 'i' or labels.format == 'l' )
  • labels.n == i.n
  • results.format == 'd'
  • results.shape[0] == npk
  • results.shape[1] == 11

Overloads

C function Condition
sparse_blob2Dproperties always

Built from commit 7ba8255fa8d680e1a1df79e67aee3873247ce69c (v0.4.5)