Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

doubt regards the program for the regionprops

1 visualizzazione (ultimi 30 giorni)
ajith
ajith il 20 Nov 2012
Chiuso: MATLAB Answer Bot il 20 Ago 2021
sir I done these following steps
function area()
originalImage = imread('result.png');
binaryImage = originalImage<140;
labeledImage = bwlabel(binaryImage, 8);
D=regionprops(labeledImage,'all');
end
i need to save all regionprops values like area, perimeter,etc... to the database how its been done and what is procedure for save all that values in database

Risposte (2)

Image Analyst
Image Analyst il 21 Nov 2012
save(matFileName, D);
  2 Commenti
ajith
ajith il 21 Nov 2012
when i execute the save('result.mat',D)
shows the error
save('data.mat', D)
??? Error using ==>
save Argument must contain a string.
how to resolve it sir
Image Analyst
Image Analyst il 21 Nov 2012
Oh, I forgot. For some reason, save() wants the variables enclosed in single quotes, so they're strings with the name of the variable rather than the variable itself. I don't know why - it shouldn't be necessary in my opinion - but, for whatever reason, that's the way they do it. So just do this:
save(matFileName, 'D');

Walter Roberson
Walter Roberson il 21 Nov 2012
save('result.mat', D) %result.mat will be your database, with a single set of data in it.
  22 Commenti
ajith
ajith il 26 Nov 2012
sir right now i have a database toolbox how to perform the task
Image Analyst
Image Analyst il 26 Nov 2012
You didn't answer his question: "What is it that you plan to do with the data once you have it in a database?" Plus, there is always example code that comes with toolboxes that explains how to do it. Have you gone through all the examples yet? They should teach you.

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by