MACRO Language | getStatistics, point selection

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

MACRO Language | getStatistics, point selection

Rainer M. Engel
Happy 2nd of Advent.

I hope this isn't understood wrong when I bring forward two things in
one mail..


01: getStatistics
I use the >getStatistics()< function to measure different image aspects.
Is this also possible to get the median or modal i.e.?
One could go the detour doing a measure and by getting the values from a
results table but perhaps I simply missed something to do it directly.


02: point selection
Having done a feature detection with i.e. SIFT/MOPS I would want to
count the number of corresponding points found. How is this achieved?
One could run the measure function [run("Measure");] and work with
"nResults" but there might be a better solution to it.


Regards,
Rainer


--
Rainer M. Engel
www.scientific-media.de
Reply | Threaded
Open this post in threaded view
|

Re: MACRO Language | getStatistics, point selection

Norbert Vischer
Hi Rainer,

> 01: getStatistics
> I use the >getStatistics()< function to measure different image aspects. Is this also possible to get the median or modal i.e.?
> One could go the detour doing a measure and by getting the values from a results table but perhaps I simply missed something to do it directly.
>
>
> 02: point selection
> Having done a feature detection with i.e. SIFT/MOPS I would want to count the number of corresponding points found. How is this achieved?
> One could run the measure function [run("Measure");] and work with "nResults" but there might be a better solution to it.

1) Mode and Median can be retrieved like this:

run("Set Measurements...", "modal median");
List.setMeasurements();
print("Mode = ", List.getValue("Mode"));
print("Median = ", List.getValue("Median"));

2) Number of points in MultiPoint selection can be counted like this:

getSelectionCoordinates(xArr, yArr);
print(xArr.length);


Norbert Vischer
Reply | Threaded
Open this post in threaded view
|

Re: MACRO Language | getStatistics, point selection SOLVED

Rainer M. Engel
Hi Norbert..

Thank you very much for your answers.

Rainer


> Hi Rainer,
>
>> 01: getStatistics
>> I use the>getStatistics()<  function to measure different image aspects. Is this also possible to get the median or modal i.e.?
>> One could go the detour doing a measure and by getting the values from a results table but perhaps I simply missed something to do it directly.
>>
>>
>> 02: point selection
>> Having done a feature detection with i.e. SIFT/MOPS I would want to count the number of corresponding points found. How is this achieved?
>> One could run the measure function [run("Measure");] and work with "nResults" but there might be a better solution to it.
>
> 1) Mode and Median can be retrieved like this:
>
> run("Set Measurements...", "modal median");
> List.setMeasurements();
> print("Mode = ", List.getValue("Mode"));
> print("Median = ", List.getValue("Median"));
>
> 2) Number of points in MultiPoint selection can be counted like this:
>
> getSelectionCoordinates(xArr, yArr);
> print(xArr.length);
>
>
> Norbert Vischer
>