how can i use the following code for histopathological oral cancer image here i attached the code and my image?
1 次查看(过去 30 天)
显示 更早的评论
d1 = double(imread('cameraman.tif'))./255; %# Load the image, scale from 0 to 1
subplot(2,2,1); imshow(d1); title('d1'); %# Plot the original image
d = edge(d1,'canny',.6); %# Perform Canny edge detection
subplot(2,2,2); imshow(d); title('d'); %# Plot the edges
ds = bwareaopen(d,40); %# Remove small edge objects
subplot(2,2,3); imshow(ds); title('ds'); %# Plot the remaining edges
iout = d1;
BW = ds;
iout(:,:,1) = iout; %# Initialize red color plane
iout(:,:,2) = iout(:,:,1); %# Initialize green color plane
iout(:,:,3) = iout(:,:,1); %# Initialize blue color plane
iout(:,:,2) = min(iout(:,:,2) + BW, 1.0); %# Add edges to green color plane
iout(:,:,3) = min(iout(:,:,3) + BW, 1.0); %# Add edges to blue color plane
subplot(2,2,4); imshow(iout); title('iout'); %# Plot the resulting image
2 个评论
Image Analyst
2017-2-8
Right, you wouldn't. It's not complete code and won't do what was mentioned in the subject line.
回答(1 个)
Image Analyst
2013-10-13
You can run ("use" as you put it) your code by clicking on the green triangle on the toolbar. (I seriously doubt that a simple edge detection will be any good though.) You did not attach your image.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Biotech and Pharmaceutical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!