can anyone explain this code? what is meant by imagesc?
Show older comments
for a = 1:size(video,4)
imagesc(video(:,:,:,a));
axis image off
drawnow;
end;
7 Comments
"image with scaled colors":
Note that your favorite internet search engine can find the MATLAB documentation just as easily as mine.
sai likhitha GOdina
on 27 Mar 2017
Image Analyst
on 27 Mar 2017
The code is explained in the answers below. Did you see them?
Adam
on 27 Mar 2017
I don't understand the relevance of your chosen tags so if you can't be bothered to give some helpful tags to guide people who might help you why do you expect other people to spend more time on your question than you do?!
doc for
doc size
doc imagesc
doc axis
doc drawnow
take you to help pages for the various parts of that code. Just saying 'I don't understand' is the lazy approach. What in particular do you not understand, having read the documentation?
sai likhitha GOdina
on 27 Mar 2017
@sai likhitha GOdina: Please do not post a question multiple times. Do you see my answer in your thread https://www.mathworks.com/matlabcentral/answers/332153-can-anyone-explain-this-code-this-code-is-related-to-my-project-crowd-density-estimation? It was a complete waste of time to type this, because Image Analyst has explained it already very good.
This is very basic Matlab code. Please read the Getting Started chapters of the documentation and https://matlabacademy.mathworks.com/ . It would not be efficient to explain the absolute basics in the forum, when there are very good tutorials available already.
Accepted Answer
More Answers (1)
Tom Pryke
on 27 Mar 2017
0 votes
Its displaying the data contained in the array 'video' to whatever the current figure or axes object is. The 4th dimension of video contains the number of frames and the others presumably contain the image data.
2 Comments
sai likhitha GOdina
on 27 Mar 2017
Guillaume
on 27 Mar 2017
You're asking extremely basic questions. Honestly, if you can't figure out for yourself what it means, you stand no chance of being able to write your own code.
Jan's provided a very good link in your identical question to the getting started tutorial. Grabbing a book on matlab from your favourite library would help as well.
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!