Image Processing in MATLAB Tutorial 2 - Color Thresholding

preview_player
Показать описание
Image Processing in MATLAB Tutorial 2 - Color Thresholding

In this video, we learn how to filter out various objects based on color. As shown in the video, direct threshold on the color won't give us perfect values. So what we have to do is that apply a set of morphological operations after basic thresholding.

Code:
imshow(a);
red = a(:,:,1); green = a(:,:,2); blue = a(:,:,3);
imshow(red)
imshow(green)
imshow(blue)
d = impixel(a);
out = red (g) 180 & green (g) 150 & green (l) 254 & blue (l) 10;*
*(I've used (g), (l) instead of the greater than and less than symbols as they are not allowed in the description on YouTube videos)

imshow(out)
out2 = imfill(out,'holes');
imshow(out2)
out3 = bwmorph(out2,'erode');
imshow(out3)
imshow(out2)
out3 = bwmorph(out2,'dilate',1);
imshow(out3)
out4 = imfill(out3,'holes');
imshow(out4)
stats = regionprops(out4)
imshow(out4)
doc regionprops

By: Surya Penmetsa
Рекомендации по теме
Комментарии
Автор

Thank you sir for the most informative videos on image processing. This has helped me loads!!! Thanks again!

frankiemakavelli
Автор

The way you explained it is amazing man! I just love image processing now!

shantanusatpute
Автор

So nice, you helpme so much in my paper.

IvanAranda
Автор

such a great informations and thank you

hidayatnoradzmanhisham
Автор

Can you please tell me how can i segment the red color objects in matlab using color thresholding?
Thank you!!

snehaagrawal
Автор

Can you suggest any open source software to practice these concepts.

prashanthv
Автор

canu u pls tell me how to quantify a clour in a image, say brown, if we are not able to select all the brown spots in an image because there are hundreds of points of brown spots of different shades in the image

emu
Автор

after imresize, does the #pixels occupied by the object changed

shuzhenwei
Автор

Can you help me with the code of fuzzy logic implementation in matlab

adityasharan
Автор

thanks for the tutorial it was really helpful ...do you have any tutorial that explains region growing method using matlab .i am working on a tracking algorithm using frame difference method and i need a tutorial that explains region growing method in order to restore the complete moving object from the segmented area

islamtaha
Автор

hey! when i make a image variable by using imread and then i use code imshow then it do not give image, it gives a matrix as output.
How to resolve this.

harshitvarshney