필터 지우기
필터 지우기

Help with this problem on MATLAB filtering

조회 수: 1 (최근 30일)
Esther
Esther 2012년 9월 11일
Hi. I'm not sure of which filter to use. Could someone help me by explaining which filter I should use? I need to show the digits from the digital display in the image.

채택된 답변

Image Analyst
Image Analyst 2012년 9월 11일
There are some filters that may work, such as mean shift, anisotropic diffusion ( http://www.csse.uwa.edu.au/~pk/Research/MatlabFns/#anisodiff), or bilateral ( http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/MANDUCHI1/Bilateral_Filtering.html) You may also want to investigate noise reduction methods like non-local means and BM3D. However, your most promising solution right now is simply to get a better image. Get proper lighting and alignment of your camera. That is your biggest problem at the moment, and everyone knows it is so much easier to get good images to start with than to try to fix up poor quality images after they've been captured.
  댓글 수: 4
Esther
Esther 2012년 9월 11일
was this the code for Anisotropic diffusion? i had an error that says: i'f ndims(im)==3'
function diff = anisodiff(im, niter, kappa, lambda, option)
if ndims(im)==3 error('Anisodiff only operates on 2D grey-scale images'); end
im = double(im); [rows,cols] = size(im); diff = im;
for i = 1:niter % fprintf('\rIteration %d',i);
% Construct diffl which is the same as diff but % has an extra padding of zeros around it. diffl = zeros(rows+2, cols+2); diffl(2:rows+1, 2:cols+1) = diff; % North, South, East and West differences deltaN = diffl(1:rows,2:cols+1) - diff; deltaS = diffl(3:rows+2,2:cols+1) - diff; deltaE = diffl(2:rows+1,3:cols+2) - diff; deltaW = diffl(2:rows+1,1:cols) - diff; % Conduction if option == 1 cN = exp(-(deltaN/kappa).^2); cS = exp(-(deltaS/kappa).^2); cE = exp(-(deltaE/kappa).^2); cW = exp(-(deltaW/kappa).^2); elseif option == 2 cN = 1./(1 + (deltaN/kappa).^2); cS = 1./(1 + (deltaS/kappa).^2); cE = 1./(1 + (deltaE/kappa).^2); cW = 1./(1 + (deltaW/kappa).^2); end diff = diff + lambda*(cN.*deltaN + cS.*deltaS + cE.*deltaE + cW.*deltaW); % Uncomment the following to see a progression of images % subplot(ceil(sqrt(niterations)),ceil(sqrt(niterations)), i) % imagesc(diff), colormap(gray), axis image
end %fprintf('\n');
Image Analyst
Image Analyst 2012년 9월 11일
I don't know. If you got it from Peter's web site - the link I gave - then I guess it must be. Of course you may need to be adapt it slightly to your situation, but I've done it and it works for my images.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by