Faster histogram then histcounts
5 views (last 30 days)
Show older comments
Does anyone know faster method, which create histogram data then histcounts? Function must include cases when some values are outside edges and when bins are empty.
0 Comments
Answers (1)
Image Analyst
on 23 Jan 2016
How many data points do you need, and how are you going to use the histogram counts? If you have lots of data (tens of millions of points) and just need to do something like figure out a threshold or skewness or something, then you could most likely get the same result by analyzing just a subsample of your data, like the first tenth of it or some fraction. Would that work for you?
6 Comments
Image Analyst
on 24 Jan 2016
You can use blockproc() to get the histogram if you want to move along and do it for rectangles that cover the entire picture. If you want just a few irregularly-shaped regions then you'll have to do it "manually" using mask(s) for those regions.
You might try subsampling in the time dimension. Usually a frame of video is highly correlated with the previous and next several frames because the scene doesn't change much. So you can just take every nth frame.
See Also
Categories
Find more on Data Distribution Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!