image processing - MATLAB MSER Feature detection not working -
image processing - MATLAB MSER Feature detection not working -
i using detectmserfeatures function in computer vision toolbox of matlab , have been running few errors. have black , white image reading in observe features of, want invert image before running feature detection or filtering reddish in image. therefore, either way have binary image trying utilize in detectmserfeatures. know not work, have tried several conversions usable format , none of them have seemed work. detectmserfeatures pick features if utilize rgb2gray on original image, not if seek convert it. here have tried far:
target1=imread('decal0.jpg'); target1bw=~im2bw(target1); target=uint8(target1bw); [m,n]=size(target); regionstarget = detectmserfeatures(target, 'maxareavariation',0.15,... 'thresholddelta',15, 'regionarearange',[10000 (m*n)/2]);
target1=imread('decal0.jpg'); target1bw=~im2bw(target1); target=im2double(target1bw); regionstarget = detectmserfeatures(target, 'maxareavariation',0.15,... 'thresholddelta',15, 'regionarearange',[10000 (m*n)/2]);
target1=imread('decal0.jpg'); target1bw=~im2bw(target1); target2=255*target1bw; [m,n]=size(target2); target3=zeros(m,n,3); target3(:,:,1)=target2; target3(:,:,2)=target2; target3(:,:,3)=target2; target3=uint8(target3); target=rgb2gray(target3); regionstarget = detectmserfeatures(target, 'maxareavariation',0.15,... 'thresholddelta',15, 'regionarearange',[10000 (m*n)/2]);
what have done incorrectly?
i brought question mathworks , bug in matlab. here response:
"we have detected bug in detectmserfeatures when handles binary images. workaround utilize regionprops observe regions binary images. then, mserregions can constructed follows:
props = regionprops(im2bw(newgraytarget),'pixellist'); pixlist = {} = 1:numel(props) pixlist = [pixlist; int32(props(i).pixellist)]; end r = mserregions(pixlist);
thanks help!
image-processing matlab matlab-cvst mser
Comments
Post a Comment