Do Identical Histograms Remain the Same After Applying a Smoothing Mask?

Click For Summary
SUMMARY

The discussion centers on the impact of applying a 3×3 smoothing mask to two texture images with identical histograms. Despite the images being different, the application of the smoothing filter alters the pixel values, leading to different resultant histograms. The participant concludes that the smoothing process affects more pixels in the second image due to its boundary characteristics. Additionally, the handling of edge pixels during filtering is addressed, with references to the options available in the scipy.ndimage library.

PREREQUISITES
  • Understanding of image processing concepts, specifically histogram analysis.
  • Familiarity with convolution operations and smoothing masks.
  • Knowledge of pixel intensity values and their representation in histograms.
  • Basic understanding of edge handling techniques in image filtering.
NEXT STEPS
  • Explore the scipy.ndimage library for various edge handling modes.
  • Learn about different types of smoothing filters and their effects on image histograms.
  • Investigate the mathematical principles behind convolution and its applications in image processing.
  • Study the impact of pixel boundary conditions on the results of image filtering.
USEFUL FOR

Image processing enthusiasts, computer vision researchers, and software developers working with image analysis and filtering techniques.

Master1022
Messages
590
Reaction score
116
Homework Statement
The two texture images shown below are quite different, but their histograms are identical. Both images have size 80 × 80, with black (0) and white (1) pixels. Suppose that both images are blurred with a 3×3 smoothing mask. Would the resultant histograms still be the same?
Relevant Equations
Filter
Hi,

I was just looking at some conceptual problems on the internet and wanted to check whether my thought process on this question was correct.

Question: The two texture images shown below are quite different, but their histograms are identical. Both images have size 80 × 80, with black (0) and white (1) pixels. Suppose that both images are blurred with a 3×3 smoothing mask. Would the resultant histograms still be the same?

Screen Shot 2021-01-07 at 5.59.19 PM.png


Attempt:
From what I understand, the smoothing mask will look like:
<br /> \frac{1}{9} \cdot \begin{pmatrix}<br /> 1 &amp; 1 &amp; 1 \\<br /> 1 &amp; 1 &amp; 1 \\<br /> 1 &amp; 1 &amp; 1 <br /> \end{pmatrix}

Initial observations:
- Each box has dimensions of 10 x 10
- Number of pixels involved in the boundary of (a) is less than that of (b)
- Thus smoothing will alter more pixels in (b)
- Therefore, the histograms will be different after the filter is applied

Side question: how does the filter get applied at the edge of the image? Does it just 'hang' off the edge?
The reason I ask is because when the filter is applied to image (b), when the center of the filter is near the corner of any white square, I think it would be possible to get an intensity value of \frac{4}{9}. The only way I can see this intensity value appearing in the histogram of filtered (a) is along some of the boundaries and edges if the filter is able to hang off the edge.

Thanks in advance for any help and guidance.
 
Physics news on Phys.org
I think your answer is correct. On your question of what happens at the edge, there are several options, and you need to decide what you want the code to do. For example, look at this link to scipy.ndimage. The 'mode' description lists several options for how to deal with the edge.
 
  • Like
Likes   Reactions: Master1022 and collinsmark
phyzguy said:
I think your answer is correct. On your question of what happens at the edge, there are several options, and you need to decide what you want the code to do. For example, look at this link to scipy.ndimage. The 'mode' description lists several options for how to deal with the edge.
Thank you very much!
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
7K
Replies
2
Views
710
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 48 ·
2
Replies
48
Views
12K
  • · Replies 175 ·
6
Replies
175
Views
27K
  • · Replies 67 ·
3
Replies
67
Views
15K
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K