MATLAB Answers

Trying to get matlab to edge detect in shadow area

5 views (last 30 days)
Hashil  Patel
Hashil Patel on 25 Feb 2016
Commented: Hashil Patel on 25 Feb 2016
I have an image that im working with on of a small PCB. Most of it is covered in good light but the bottom of it has a shaded area where im blocking the light. i cant seem to be able to get matlab to correct the image so it can detect the edges. what i want happening later on is to have matlab detect components and then identify them but i cant seem to get over this hurdle of adjusting the image so that the shaded area is corrected and then more suitable for matlab to detect the edges. the code below
f = rgb2gray(e);
k = imcomplement(f);
di = imdilate(k,B2);
er = imerode(k,B2);
morph = imsubtract (di,er);
imshow (morph)
this is my progress so far. i want to be able to make the right hand side of the PCB more visible. what could i possible do to get the results i require to move further??

  0 Comments

Sign in to comment.

Answers (1)

Kevin Claytor
Kevin Claytor on 25 Feb 2016
Have you taken a look at the non-uniform illumination tutorial? You'd probably want to cut the image down to just the circuit board and then apply the correction.

  1 Comment

Sign in to comment.

Sign in to answer this question.