Read the color image SpeedSignjpg into a Matlab Matrix using

Read the color image \"SpeedSign.jpg\" into a Matlab Matrix using the imread command Segment the image to extract the speed limit sign. While achieving this segmentation is no easy task, you have a lot of tools that you can use. Here are a few suggestions of things you may want to try. Remember that only some of them will be useful in your particular problem. You do NOT have to use all the tools in every problem. You are also encouraged to try other tools that are not listed below. a. Find the edges in the image using an operator or an algorithm of your choice. b. Find an edge defined object that matches your object of interest. c. Convert the image to the grayscale and perform an intensity based segmentation. d. Perform a color based segmentation. e. Once you have a segmented image, use the appropriate morphological operations to 1. 2. create an enhanced binary image. Use the binary image with the oniginal image to extract the object of interest. f.

Solution

These are commands for the operations that asked in this question

1)A = imread(\'SpeedSign.jpg\');

2)a)BW1 = edge(A,\'Canny\');

To find corners
2)b)corners = detectHarrisFeatures(A);
To plot corners
plot(corners.selectStrongest(50));

2)c)greyscale
rgb2gray(A);

2)d)he = imread(\'SpeedSign.jpg \');
cform = makecform(\'srgb2lab\'); lab_he = applycform(he,cform);
ab = double(lab_he(:,:,2:3)); nrows = size(ab,1); ncols = size(ab,2); ab = reshape(ab,nrows*ncols,2); nColors = 3; % repeat the clustering 3 times to avoid local minima [cluster_idx, cluster_center] = kmeans(ab,nColors,\'distance\',\'sqEuclidean\', ... \'Replicates\',3);
pixel_labels = reshape(cluster_idx,nrows,ncols); imshow(pixel_labels,[]), title(\'image\') ;
segmented_images = cell(1,3); rgb_label = repmat(pixel_labels,[1 1 3]); for k = 1:nColors color = he; color(rgb_label ~= k) = 0; segmented_images{k} = color; end imshow(segmented_images{1}), title(\'objects in cluster 1\');

2)e) binary image
BW = im2bw(A,map,0.4);

2)f)BW = imread(\'SpeedSign.jpg \');
Filter image using this command
BW2 = bwareafilt(BW,[40 50]);
Display original image and filtered image side by side
imshowpair(BW,BW2,\'montage\')

 Read the color image \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site