-
Notifications
You must be signed in to change notification settings - Fork 60
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Tip: Generating CSV for multi-channel histograms #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Nice writeup! I've made a |
I have a problem using this
It gives me all zeros.
|
I'm using vips-8.6.4 in this image: https://hub.docker.com/r/felixbuenemann/vips-alpine |
Oh I made |
Hello @Nakilon, yes, |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
I wanted to generate a histogram as a CSV file for single and multi-channel images. The format I needed was each row represents an intensity, each column represents a channel. This differs from the standard VIPS histogram which is a single row with a column for each intensity value for a single channel only.
My initial approach was to take the histogram and iterate over each element of the histogram which worked great on RGBA (about 4.5 seconds) but for a 2-byte greyscale image, this took about 5 minutes.
The following runs in about 0.07 seconds for RGBA and about 5 seconds for the ushort:
There may well be a better way, but that worked for me :)
Oh, the only other thing I wish I could do is add column headers but I can live without them.
The text was updated successfully, but these errors were encountered: