How to compare the angles of pixels of an image in different noises? I am working on a project that needs the angles of pixels of images. I have found the way to do it in matlab for a clean image. Now, I need to add different amounts of additive white Gaussian noise to the image and I need to see whether the code works well and I also need to find out how the angles change when the amount of additive noise is decreased or increased. I used hist() function in matlab to see the angle vlaues but it is very difficult to compare in this way. For example in the case of peppers test image:

The following is the histogram of angles that I obtained using matlab:

I really appreciate it if someone could please help me to find a better way to
visually represent the angles values in order to find out whether the code works fine for different amount of noise. These are part of values for the angles of edge pixels of peppers:

 A: Your question is still a bit unclear, but I am going to try to fill in the gaps and make a suggestion. First, here is what I believe you are trying to ask:
You have performed an edge detection on an image, and have a set of pixels identified as 'edge' pixels. For each of those pixels, you have a gradient vector, which makes some angle $\theta$ from horizontal. Now you want to test the robustness of your algorithm to additive noise in the image by running the same calculation on the image with noise added to it, and comparing the value of the angle you got for each pixel. Is this a correct interpretation of your question?
If so, here is a suggestion. Assign each pixel in the entire image the angle $-180\lt\theta\leq 180$ calculated for the edge it is part of. For pixels not part of an edge, assign them a fake angle outside of your range of actual angles, like 200 degrees, so that you can identify them easily on a plot. Let $\theta_n^{(1)}$ and $\theta_n^{(2)}$ be the angle of the $n^{th}$ pixel in the first and second images, respectively. The integer $n$ runs through every pixel of your image (say, the flattened array). Then make a scatter plot of $\theta^{(2)}$ vs  $\theta^{(1)}$. Make sure that each $n$ refers to the same pixel in each image.
If your algorithm were completely insensitive to noise and you got exactly the same angles for every pixel in the two images, the points in the scatter plot would fall on a diagonal line running through the origin, with unit slope. The extent to which the points deviate from this line will give you a visualization of how different your answers are for the two calculations.
