Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Contrast Streching, Extracting the Green im_double = im2double(im); im_contrast = histeq(im_double); im_green = im_contrast(:,:,2); %%Clear Border, Filtering The Image im_clear = imclearborder(im_green); im_bi = imbilatfilt(im_clear);

Contrast Streching, Extracting the Green im_double = im2double(im); im_contrast = histeq(im_double); im_green = im_contrast(:,:,2); %%Clear Border, Filtering The Image im_clear = imclearborder(im_green); im_bi = imbilatfilt(im_clear); im_med = medfilt2(im_bi); %%Binarize im_gray = graythresh(im_med); middleground = imbinarize(im_med, im_gray); middlegroundClean = bwareaopen(middleground,5); BWclean = bwareafilt(middlegroundClean, 1,'largest'); se = strel('disk' , 1); im_erode = imerode(BWclean , se); se = strel('disk' , 2); Image_segment = imdilate(im_erode , se); D = -bwdist(~Image_segment); Ld = watershed(D);

bw2 = Image_segment; bw2(Ld == 0) = 0;

mask = imextendedmin(D,2);

D2 = imimposemin(D,mask); Ld2 = watershed(D2); bw3 = Image_segment; bw3(Ld2 == 0) = 0; cc = bwconncomp(bw3); L = labelmatrix(cc); y = [\"shuffle\" , \"noshuffle\"]; rgb = label2rgb(L,'jet','k', y(randi(numel(y))));

What should I add in the code that the output looks like this




Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

An Introduction To Statistical Methods And Data Analysis

Authors: R. Lyman Ott, Micheal T. Longnecker

7th Edition

1305269470, 978-1305465527, 1305465520, 978-1305269477

More Books

Students also viewed these General Management questions

Question

what are some rights under the 6th?

Answered: 1 week ago