필터 지우기
필터 지우기

How can I get the correct output using the Auto threshold imagej Plugin?

조회 수: 2 (최근 30일)
Alaa
Alaa 2016년 2월 28일
댓글: Walter Roberson 2016년 2월 29일
Hi every one, I have tried the following code, where I read an image from a directory and use ImageJ Auto Threshold plugin to segment my image. Any one can do that easily using imagej program as follow:
1- Open an image.
2- Then Go to : image->Adjust->Auto Threshold.
3- From methods drop list: Select the mean method.
4- Pick the white object on the black background.
My problem is I can't call this plugin correctly from Matlab. My Matlab code as follows:
javaaddpath 'C:\Program Files\MATLAB\R2013b\java\mij.jar'
javaaddpath 'C:\Program Files\MATLAB\R2013b\java\ij.jar'
MIJ.start
MIJ.run('Open...', 'path=[E:\\sun\\Endothelium Project\\Endothelium Code\\MIJ Code\\ENDOTHELIAL IMAGES\\12.bmp]');
MIJ.run('Threshold...','setAutoThreshold=mean');
MIJ.run('setOption=BlackBackground');
MIJ.run('Convert to Mask');
SegmentedImage = (VorImage);
figure, imshow(SegmentedImage);
Thank you in advance.
  댓글 수: 1
Walter Roberson
Walter Roberson 2016년 2월 29일
Your line
SegmentedImage = (VorImage);
is suspicious. If you are attempting to retrieve data from MIJ then you would need a reference to MIJ there. For example it might look something like
SegmentedImage = MIJ.VorImage;

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by