imagej / imagej-ops

ImageJ Ops: "Write once, run anywhere" image processing
https://imagej.net/libs/imagej-ops
BSD 2-Clause "Simplified" License
88 stars 42 forks source link

Repeated computation of co-occurrence matrix in haralick features #634

Open MaximLippeveld opened 3 years ago

MaximLippeveld commented 3 years ago

Hi,

A question on haralick features.

All haralick features call the getCooccurenceMatrix function on the input image. If I want to compute N different haralick features on an image, the same co-occurrence matrix is computed N times. Unfortunately, the computation of this matrix is often the most intensive part of the feature computation. Ideally, this matrix would be precomputed once per image.

Perhaps this can be solved by overloading the compute function, adding a signature that takes a final double[][] matrix? I am not sure in what interface or class this signature should be defined, however. Or maybe there is a better way :slightly_smiling_face: