Live data from Hacker News

Understanding image histograms with OpenCV

lmcaraig.com

11–13 of 13 posts

Re: Understanding image histograms with OpenCV

#11
post #5

> In the case of 2D histograms the resulting plot will have the pixel intensities of a channel on the X-axis, the pixel intensities of another channel on the Y-axis, and the frequency is given by the color of the plot. I'm still having a hard time understanding what exactly this represents and how to properly interpret it.

There's a nice overview here: https://svi.nl/TwoChannelHistogram

I don't know any professional photographers who use 2D histograms for editing, or whether you can actually plot them in Lightroom or Photoshop. However for scientific image processing it seems to be more useful.

OpenCV also has a tutorial: https://docs.opencv.org/3.3.1/dd/d0d/tutorial_py_2d_histogra...

But which of the 'coming chapters' it's referencing I have no idea.

Re: Understanding image histograms with OpenCV

#12
post #9
post #8

Earlier quoted context omitted.

It wouldn't be a 3D volume though. A 2D histogram is a 3D volume. A 3D histogram would require a 4D object, so it would be a case of "first build your hypercube..."

How about a 3D point cloud with dot size corresponding to intensity?

Something like this [0]? (Disclaimer, I made it)

[0] https://franciscouzo.github.io/image_colors/

Re: Understanding image histograms with OpenCV

#13
post #8

Earlier quoted context omitted.

There are visualization programs that will let you move through a 3D volume, slice by slice, as it were (along various axis). So this shouldn't be an issue.

It wouldn't be a 3D volume though. A 2D histogram is a 3D volume. A 3D histogram would require a 4D object, so it would be a case of "first build your hypercube..."

But in a 2D histogram you encode the 3rd dimension with color. So if you use color to encode the 4th dimension, you can take slices through the 3rd and get a decent sense of what's going on. That's how MRI scans work.

BTW there are tools for visualizing and "touring" these kinds of slices in arbitrarily high dimensions: http://www.ggobi.org/demos/tour.html

Post reply on HN