how can i use the following code for histopathological oral cancer image here i attached the code and my image?

1 view (last 30 days)
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

Answers (1)

Image Analyst
Image Analyst on 13 Oct 2013
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.

Categories

Find more on Biotech and Pharmaceutical in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!