MATLAB Answers

How can i convert the first image(Red) like the second one(Black)?

1 view (last 30 days)
siet ece
siet ece on 1 Aug 2021
Commented: siet ece on 2 Aug 2021
  2 Comments
siet ece
siet ece on 1 Aug 2021
cover=imread('Lenna.png');
coverplane1=int32(cover(:,:,1));
for i=1:512
for j=1:511
PixelDiffOriginal(i,1:511)=coverplane1(i,j)-coverplane1(i,j+1);
end
end
[N1,edges1]=histcounts(PixelDiffOriginal);
edges1=edges1(2:end)-(edges1(2)-edges1(1))/2;
plot(edges1,N1);
%% i just tried to plot a graph(black graph) but i got the red graph, how can i obtain the black graph?

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 1 Aug 2021
Use plot() instead of stem().
  5 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by