MATLAB: detect continuous grayscale vertical stripes

The attached image has periodic vertical stripes random along the x axis and varying along the y axis in intensity.
Any suggestions on how to find them?
Ideally, I would like to detect them with the output of a binary image showing stripes (I think it will look like a barcode).

Thanks!

enter image description here

+4
source share
2 answers

Photon : .
, , , :

, -, "DC" , "" , sum, .

:

img = im2double( imread('http://i.stack.imgur.com/SqZrf.jpg') ); %// read the image

, "DC" , , :

dc_est = imfilter(img, ones(1,31)/31, 'symmetric' ); 

" ", :

global_thr = 0.025;
mask = ones(size(img,1),1)*(mean(img-dc_est,1)>global_thr);
figure; imshow(mask);

heres ( , ):
enter image description here

"DC" , dc_est :

enter image description here


, : I. , . , . -, . , . : (SIAM 2015). .

+10

:

I=imread('lines.jpg');
I=double(I)*(1.0/255.0);
J=filter2([-1 0 1;-1 0 1;-1 0 1],I);
s=sum(J);

1D- .

Initial processing result

.

+10

Source: https://habr.com/ru/post/1623031/


All Articles