Boost/Enhance white pixels
10 views (last 30 days)
Sourav Bairagya on 16 Sep 2019
First, you can binarize the image and then use ‘bwmorph’ function to thicken the white lines present in the image.
Format of usage is as follows: bwmorph(img, ‘thicken’, n)
Here, ‘n’ is the number of times to perform the operations. You can control the thickening by controlling this parameter.
After thickening if you like to connect the unconnected pixels, then you can use ‘bwmorph(img, ‘bridge’)’ and then can use ‘imdilate’ function to enhance the connected line.
a=imbinarize(a); % First binarize the given image
b=bwmorph(a,'thicken',1); % Use bwmorph to thicken the white line
b=bwmorph(b,'bridge'); % Use this to connect the pixels
se = strel('line',10,180); % Structuring element for dilation
b = imdilate(b,se); % Dilates the image
Hope this will help you.
For further information about ‘bwmorph’ function you can follow this link.https://www.mathworks.com/help/images/ref/bwmorph.html?s_tid=doc_ta