what does this code do?

if(ispc == 1)
[s, b] = dos('set NUMBER_OF_PROCESSORS');
num_CPUs = sscanf(b, '%*21c%d', [1, Inf]);
setenv('OMP_NUM_THREADS', num2str(num_CPUs));
% ASIFT command
command_ASIFT = 'demo_ASIFT';
command_ASIFT = [command_ASIFT ' ' file_img1_png ' ' file_img2_png ' ' ...
imgOutVert ' ' imgOutHori ' ' matchings ' ' keys1 ' ' keys2];
imshow('imgOutVert.jpg');
if (flag_resize == 0)
command_ASIFT = [command_ASIFT ' 0'];
end
command = command_ASIFT;
sir can u please explain this code? i couldn't able to understand what it does

4 Comments

Adam
Adam on 4 May 2017
Edited: Adam on 4 May 2017
It appears to just be a disjointed set of instructions that are doing a bunch of unconnected things.
The 3 lines at the top appear to have no relevance to the rest of the code and are related to setting an environment variable.
The next 3 lines concatenate what appears to be a bunch of image names (at a guess) which are then ignored by the imshow line which just hard-codes an image filename.
Then an if statement that tags a '0' on the end of the concatenated string that is not being used in this section of code anyway.
And finally a simple copy instruction for reasons that are also not obvious from this section of code.
The Matlab help is the best place to start in understanding code.
Things like [ ] syntax can be hard to search for specifically without knowing the names of the associated functions, but they are basic Matlab commands that are covered (I assume) from Matlab introductory tutorials.
sir i want to do matlab program uing ASIFT sir. can u provide me asift code in matlab. im doing project in image processing.
Adam
Adam on 4 May 2017
I have no idea what ASIFT is.
Prefer:
num_CPUs = getenv('NUMBER_OF_PROCESSORS');

Sign in to comment.

Answers (0)

Categories

Find more on Convert Image Type in Help Center and File Exchange

Asked:

on 4 May 2017

Commented:

Jan
on 4 May 2017

Community Treasure Hunt

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

Start Hunting!