Live data from Hacker News

Understanding image histograms with OpenCV

lmcaraig.com

1–10 of 13 posts

Re: Understanding image histograms with OpenCV

#4
post #3

"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?

You would only be able to see the outside "shell" of it.

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.

Re: Understanding image histograms with OpenCV

#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.

Re: Understanding image histograms with OpenCV

#7
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.

It 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.

Re: Understanding image histograms with OpenCV

#8
post #3

Earlier quoted context omitted.

You would only be able to see the outside "shell" of it.

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..."

Re: Understanding image histograms with OpenCV

#9
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..."

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

Re: Understanding image histograms with OpenCV

#10
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?

Really, 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.
Post reply on HN