필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

doubt regards the program for the regionprops

조회 수: 1 (최근 30일)
ajith
ajith 2012년 11월 20일
마감: MATLAB Answer Bot 2021년 8월 20일
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

답변 (2개)

Image Analyst
Image Analyst 2012년 11월 21일
save(matFileName, D);
  댓글 수: 2
ajith
ajith 2012년 11월 21일
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 2012년 11월 21일
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 2012년 11월 21일
save('result.mat', D) %result.mat will be your database, with a single set of data in it.
  댓글 수: 22
ajith
ajith 2012년 11월 26일
sir right now i have a database toolbox how to perform the task
Image Analyst
Image Analyst 2012년 11월 26일
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.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by