How to save a Histogram files to excel or txt using a macro? [help]

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

How to save a Histogram files to excel or txt using a macro? [help]

Even Sckart
This post was updated on .
Hiho, first sorry for my poor english.
i try have this image and want to write a little makro which should help me to figur out how much pixels are black and how much of them are white in a little recancle.
This should happen with a histogram, i tryed to do this by the recorder. My problem is that the recorder didnt write down if i push the copy button on the historgam and then try to copy it to a txt or an excel file. When Imagej saved it the little rectangle should move on and on until the hole picture is svaed in datas from the histogramms, so i can go on in excel or so.


 This is the code i already have.

selectWindow("Bruchbild 1.jpg");
run("Make Binary");
run("Invert");
//setTool("rectangle");
n=0;
m=0;
x=1;
y=1;
do
{if (x<7)
                {makeRectangle(n, m, 120, 120);
                run("Histogram");
                n=(n+120);
                x=(x+1);}
               
else
                {selectWindow("Bruchbild 1.jpg");
                m=m+120;
                n=0;
                makeRectangle(n, m, 120, 120);
                run("Histogram");
                n=(n+120);
                x=(x+1);
                y=(y+1);}}
while (y>(10))
       

and this is the picture.





would be so great if someone can help me with this :) Thanks a lot
Reply | Threaded
Open this post in threaded view
|

Re: How to save a Histogram files to excel or txt using a macro? [help]

Even Sckart
could somebody please help me ?
wäre super wenn mir jemand helfen könnte
Reply | Threaded
Open this post in threaded view
|

Re: How to save a Histogram files to excel or txt using a macro? [help]

Even Sckart
In reply to this post by Even Sckart
really nobody??