I need to programe a thinning function without using toolbox. I can get thinning image with toolbox functions, the problem is that I can't use it.
Show older comments
I have use this comands for avoid the noise and to put the image in 2D
im = imread('Vstup.jpg');
im = rgb2grayscale(im);
im1 = medop(im);
im2 = uint8(im1);
im3 = im2>82 | im2<8;
With toolbox fuction I obtain this:
toolbox function solution:
f = imread('Vstup.jpg');
f = im2double(f);
f = rgb2grayscale(imread('Vstup.jpg'));
f = im2double(f);
h = fspecial('gaussian',4,6);
g = imfilter(f,h,'replicate');
g = im2bw(g,1.12*graythresh(g));
s = bwmorph(g,'skel',Inf);
figure,imshow(s);
(I need something similar to that, I only need the thinning function). The teacher say that I can use rot90 for eliminate the pixel and do the thinning function, but any help is good for me.
Thank you very much, Alejandro :)
5 Comments
Alejandro Martinez
on 4 Mar 2016
Edited: Walter Roberson
on 4 Mar 2016
Alejandro Martinez
on 4 Mar 2016
Edited: Walter Roberson
on 4 Mar 2016
Walter Roberson
on 4 Mar 2016
Please clarify what question you are asking.
It sounds like you might not be permitted to use something, but it is not clear what you are not permitted to use
Alejandro Martinez
on 4 Mar 2016
Edited: Walter Roberson
on 5 Mar 2016
Image Analyst
on 5 Mar 2016
I don't see how that code does any thinning at all. Thinning is a morphological function that erodes an image without breaking the blobs.
Anyway, if you can't use toolbox functions then it's probably also not allowed for us to just hand over alternate code for doing it that you can hand in either. So good luck.
Answers (1)
John BG
on 5 Mar 2016
0 votes
There is a MATLAB CENTRAL solution already available that apparently does the 'image thinning' you are after.
If you find this answer of any help solving this question, please click on the thumbs-up vote link,
thanks in advance
John
Categories
Find more on Computer Vision with Simulink in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!