Hello people!
im a new using matlab for my image processing course and trying to do a point detection algorithm using laplacian kernel
and i have a problem understanding some parts of this simple code:
1: f = imread('pointDetection.jpg');
2: w=[-1,-1,-1;-1,8,-1;-1,-1,-1];
3: g=abs(imfilter(double(f),w));
4: T=max(g(:));
5: g=g>=T;
6: subplot(121),imshow(f),title('original image');
7: subplot(122),imshow(g),title('Result of point detection');
if the sum of product of applying the mask to a pixel larger than a particular threshold then this should be the point
my questions are (1 what does line 5 do
(2 when i run this code thses errors appear:
Error using images.internal.imageDisplayValidateParams>validateCData (line 119)
If input is logical (binary), it must be two-dimensional.
Error in images.internal.imageDisplayValidateParams (line 27)
common_args.CData = validateCData(common_args.CData,image_type);
Error in images.internal.imageDisplayParseInputs (line 78)
common_args = images.internal.imageDisplayValidateParams(common_args);
Error in imshow (line 246)
images.internal.imageDisplayParseInputs({'Parent','Border','Reduce'},preparsed_varargin{:});
Error in pointdetectionassignment (line 9)
subplot(122),imshow(g),title('Result of point detection');