Armand1 / Iznik

Iznik
0 stars 0 forks source link

shape descriptors #2

Open Armand1 opened 5 years ago

Armand1 commented 5 years ago

What shape descriptors should I use in motif classification?

My idea is that I should use the following:

"area" -- area in pixels
"bbox_area" --- an area
"convex_area" --- another area
"eccentricity"--The eccentricity is the ratio of the focal distance (distance between focal points) over the major axis length. essentially how much it deviates from being a circle.
"extent" -- Ratio of pixels in the region to pixels in the total bounding box. certainly useful.
"major_axis_length" --- self explanatory
"minor_axis_length" -- self explanatory
"perimeter"-- of object which approximates the contour as a line through the centers of border pixels using a 4-connectivity. Essentially diameter of an irregular object. "solidity" (convexity)--- of an image object is, area of the image object divided by area of its convex hull.Solidity is useful to quantify the amount and size of concavities in an object boundary. Holes are also often included. For example, it distinguishes a star from a circle, but doesn’t distinguish a triangle from a circle.

Do not use the following

"euler_number" Computed as number of objects (= 1) subtracted by number of holes (8-connectivity). Uninformative --- all are 1.
"bbox" -- position of the bounding box "centroid" -- position of the motif The equivalent\ diameter: diameter of a circle with the same area as the region. I don't think that's useful. "inertia_tensor" --- can't figure out what this means; have to unpack the values from the column
"inertia_tensor_eigvals" --- can't figure out what this means; have to unpack the values from the column
"local_centroid" -- looks like position of the motif "moments" --- don't know what these are
"moments_central"
"moments_hu"
"moments_normalized"
"orientation"

So the big ones that I do not use are the inertia tensor, its eigenvalues, and the moments and related features. Can you give me an intuitive explanation of them and whether or not I should use them in motif classification? If so, how? Do I just unpack the multiple values from the column, and use them as separate variables?

e.g., this from the moments of one motif: [[ 2.82300000e+03 7.80530000e+04 2.84926900e+06 1.21127213e+08]\n [ 8.89980000e+04 2.37381400e+06 8.26011320e+07 3.29363096e+09]\n [ 3.58217400e+06 9.31519700e+07 3.12168977e+09 1.18625885e+11]\n [ 1.62657006e+08 4.17095507e+09 1.36797626e+11 5.06000007e+12]]

sarslancs commented 5 years ago

I agree with what you listed under "use" and "not use".

Any chance on getting some results the ones under "use"?

For the "big ones" I am afraid I haven't used them either before. These features are actually coming directly out of the box, i.e. I run a function over an image and its mask, and collect the features. For instance intertia_tensor as far as I learned now represents the rotation of the object around its mass. So basically it is a 2x2 matrix. Moments are also useful in the geometrical space of the object (some vectors and matrices). However, I do not think they will be useful for clustering, because they are typically normalised by moving to the origin in the space, hence might be similar for different motifs.

I would say let's stick to the basic ones first and if they fail to separate motifs with different shapes, I will do a bit of research for more representative features. We can also use "feature layers" from the neural networks assuming that they should have learnt shapes during training.