Effacer les filtres
Effacer les filtres

How to use niblack file exchange?

2 vues (au cours des 30 derniers jours)
yasmin ismail
yasmin ismail le 11 Juil 2023
Commenté : yasmin ismail le 11 Juil 2023
I am biginner in using matlab and am trying to use niblack file exchange, I downloaded successfully and access to it by matlab but when I run it , its not working , so can help me to let it work with attach image
https://www.mathworks.com/matlabcentral/fileexchange/40849-niblack-local-thresholding

Réponses (1)

Cris LaPierre
Cris LaPierre le 11 Juil 2023
This is not something creating by MathWorks. The only information I could find is in the help of each function.
%NIBLACK local thresholding.
% BW = NIBLACK(IMAGE) performs local thresholding of a two-dimensional
% array IMAGE with Niblack method.
%
% BW = NIBLACK(IMAGE, [M N], K, OFFSET, PADDING) performs local
% thresholding with M-by-N neighbourhood (default is 3-by-3). The default
% value for K is -0.2. The default value of OFFSET is 0, which
% coresponds to the original Niblack implementation. To deal with border
% pixels the image is padded with one of PADARRAY options (default is
% 'replicate').
%
% Example
% -------
% imshow(niblack(imread('eight.tif'), [25 25], -0.2, 10));
%
% See also PADARRAY, RGB2GRAY.
% Contributed by Jan Motl (jan@motl.us)
% $Revision: 1.0 $ $Date: 2013/03/09 16:58:01 $
function image=averagefilter(image, varargin)
%AVERAGEFILTER 2-D mean filtering.
% B = AVERAGEFILTER(A) performs mean filtering of two dimensional
% matrix A with integral image method. Each output pixel contains
% the mean value of the 3-by-3 neighborhood around the corresponding
% pixel in the input image.
%
% B = AVERAGEFILTER(A, [M N]) filters matrix A with M-by-N neighborhood.
% M defines vertical window size and N defines horizontal window size.
%
% B = AVERAGEFILTER(A, [M N], PADDING) filters matrix A with the
% predefinned padding. By default the matrix is padded with zeros to
% be compatible with IMFILTER. But then the borders may appear distorted.
% To deal with border distortion the PADDING parameter can be either
% set to a scalar or a string:
% 'circular' Pads with circular repetition of elements.
% 'replicate' Repeats border elements of matrix A.
% 'symmetric' Pads array with mirror reflections of itself.
%
% Comparison
% ----------
% There are different ways how to perform mean filtering in MATLAB.
% An effective way for small neighborhoods is to use IMFILTER:
%
% I = imread('eight.tif');
% meanFilter = fspecial('average', [3 3]);
% J = imfilter(I, meanFilter);
% figure, imshow(I), figure, imshow(J)
%
% However, IMFILTER slows down with the increasing size of the
% neighborhood while AVERAGEFILTER processing time remains constant.
% And once one of the neighborhood dimensions is over 21 pixels,
% AVERAGEFILTER is faster. Anyway, both IMFILTER and AVERAGEFILTER give
% the same results.
%
% Remarks
% -------
% The output matrix type is the same as of the input matrix A.
% If either dimesion of the neighborhood is even, the dimension is
% rounded down to the closest odd value.
%
% Example
% -------
% I = imread('eight.tif');
% J = averagefilter(I, [3 3]);
% figure, imshow(I), figure, imshow(J)
%
% See also IMFILTER, FSPECIAL, PADARRAY.
% Contributed by Jan Motl (jan@motl.us)
% $Revision: 1.2 $ $Date: 2013/02/13 16:58:01 $
Not sure what you are trying t do, but based on your image, you may be interested in the Introduction to Image Processing course on Coursera created by MathWorks. You can enroll for free, and one of the course examples is images of cracks in concrete.
  3 commentaires
Cris LaPierre
Cris LaPierre le 11 Juil 2023
See the help text pasted above. That is all the information we have on how to use this function. You might try posting a question to the author on the File Exchange submission page's Discussion page (last tab).
yasmin ismail
yasmin ismail le 11 Juil 2023
@Cris LaPierre i had already sent to discussion page but no answer

Connectez-vous pour commenter.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by