How to remove all background noise due to inappropraite lighting from my pre-processed image and get better edge defination??
5 次查看(过去 30 天)
显示 更早的评论
I have done some process on image and got the edge defined but unable to remove background noise.
I have used laplacian, sobel operator, average filter and power law for getting better edge defination
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/336421/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/336430/image.png)
Are there any other methods for better edge defination and any way of removing background noise???
clc,clear
I=imread('warped_image.jpg');
aa=rgb2gray(I);
a=double(aa);
% Kernel for laplacian
kernel = [0,2,0; 2,-8,2; 0,2,0];
b = conv2(double(a), kernel, 'same');
c=b-a;
d=edge(a,'sobel');
% Kernel for smmothening by ave filter of 5*5
kernel1 = [1/9,1/9,1/9; 1/9,1/9,1/9; 1/9,1/9,1/9];
e = conv2(double(aa), kernel1, 'same');
f=c.*e;
g=a+f;
% transform law
[m,n]=size(a);
gamma=5;
cc=1;
for i=1:m
for j=1:n
h(i,j)=cc*(g(i,j)^gamma);
end
end
imshow(h)
Any suggestions will help??
Should I try removing my bacground while it is in RGB format??? and then do processing of image.
0 个评论
采纳的回答
J. Alex Lee
2020-7-25
try smoothing before you apply your edge detector, not after
same goes for your power law (gamma correction?)
alternatively/also try increasing the window size of your gradient/laplacian kernels
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!