6 ms·
Understanding image histograms with OpenCV
- pmoriarty 9y ago"We can easily extend what we've done for the 2D histogram to calculate 3D histogram... Unfortunately we cannot visualize this histogram." Why not? Couldn't you just create a 3D image?
- nerdponx 9y agoYou would only be able to see the outside "shell" of it.
- pmoriarty 9y agoThere 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.
- ascorbic 9y agoIt 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..."
- akx 9y agoHow about a 3D point cloud with dot size corresponding to intensity?
- Waterluvian 9y agoReally, it's just easier to visualise it differently. I think it's our failing as beings rather than of the visualization method. We just aren't made for it.
- Franciscouzo 9y agoSomething like this [0]? (Disclaimer, I made it) [0] https://franciscouzo.github.io/image_colors/ https://franciscouzo.github.io/image_colors/
- nerdponx 9y agoBut 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 http://www.ggobi.org/demos/tour.html
- mattip 9y agoTheir “3d histogram” is a 4d image
- platz 9y ago> 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.
- prestonh 9y agoIt shows correlations between colors. Consider two images, one with lots of purple and one with equal amounts of red and blue. Since the color purple is equal parts red and blue, we don't expect to see much difference in the one dimensional histograms between the red/blue image and the purple image. On the other hand, when we look at the 2D histogram we do find such a difference. The purple image's 2D histogram will have large values near the diaganol (red scales with blue). The red/purple image might have no correlation depending on the image, or could possibly be anti-correlated, with a diaganol as before, but with negative slope.
- joshvm 9y agoThere's a nice overview here: https://svi.nl/TwoChannelHistogram 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_histogram.html 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.