Can anyone combined these operations for a gray scale image?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Haseeb Hassan
el 24 de Abr. de 2018
Comentada: Haseeb Hassan
el 30 de Abr. de 2018
- Step1-A grayscale image--->DWT
- Step2-Grayscale Image--->Apply Canny Edge Detector
- Step3-Combined step2 & step1 to make a Defocus Image
6 comentarios
Haseeb Hassan
el 25 de Abr. de 2018
Editada: Image Analyst
el 26 de Abr. de 2018
KALYAN ACHARJYA
el 26 de Abr. de 2018
Just for comparison purpose only. I followed the steps as per your questions.
Respuesta aceptada
KALYAN ACHARJYA
el 24 de Abr. de 2018
%I tried as per your statement flow-here it is, but did not find any sense of defocus.
%Result is binary image.
lx=imread('1.jpg');
x=rgb2gray(lx);
[rows colm]=size(x);
%%Apply DWT
dwt_image=dwt2(x,'haar');
dwt_im2=imresize(dwt_image,[rows colm]);
gray_im=im2bw(dwt_im2);
%%Applying Canny Edge Detector
BW1=edge(x,'Canny');
result=and(gray_im,BW1);
%%Display
binaryImage=uint8(255 * result);
result1=[lx,cat(3, binaryImage, binaryImage, binaryImage)];
imshow(result1);
Más respuestas (0)
Ver también
Categorías
Más información sobre Image Analysis en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!