Pixel value difference histogram of two images

2 views (last 30 days)
Suppose I have two matrices for cover and stego images. I want to draw the pixel value difference histogram as shown in the above figure. I am facing problem in setting edges. I need the x-label as [-20 -15 -10 -5 0 5 10 15 20] as shown in the above figure. I could not able to show the Legents as the above figure. Please help me.....
edges = [-20 -5:0:5 20];
histogram(cover,edges,'DisplayStyle','stairs');
hold on;
histogram(stego,edges,'DisplayStyle','stairs');
legend('Cover Image');
legend('Stego Image');

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!