Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hi, I am trying to use a histogram as a means to measure image uniformity. To do this I first down sample the raw image to a binned version (this is the tabled data in the worksheet). I then partition this downsampled image into a histogram and use this for a calculation. As my images can have a widely differing intensity profiles, I want to keep the number of bins fixed rather than bin with an absolute value of intensity. I thus normalise the bin.
The whole worksheet is extremely slow
Is there anything I can do to speed it up.
Thanks
Jason
BTW, I have finally converted to mathcad 15!
Solved! Go to Solution.
Jason,
does the attached do something like what you want?
The histogram function requires that you either provide the number of bins for equal spacing (which is what I think you want) or a vector of bin end points (nbins+1 points). I think all you need to do is defined nbins:=20 and the define P:=histogram(nbins,Z), etc.
Stuart
Message was edited by: Stuart_Bruff - worksheet corrected to create P1 from Z1 rather than Z
Could you please post the worksheet in an earlier format as well? M11 preferably, M13 if not.
Stuart
Jason,
I've just opened your worksheet and the first thing I notice is that you actually calculate 800+ bins for the histograms P & P1 at the start of the collapsed area rather than the 20 the text states ... I'm not sure that you are caculating the correct thing, looking at .
Stuart
Jason,
does the attached do something like what you want?
The histogram function requires that you either provide the number of bins for equal spacing (which is what I think you want) or a vector of bin end points (nbins+1 points). I think all you need to do is defined nbins:=20 and the define P:=histogram(nbins,Z), etc.
Stuart
Message was edited by: Stuart_Bruff - worksheet corrected to create P1 from Z1 rather than Z
Stuart, Thanks for pointing out my error. Its much faster now I am calculating the correct numbe rof bins.
Jason