Can anyone combined these operations for a gray scale image?
조회 수: 3 (최근 30일)
이전 댓글 표시
- Step1-A grayscale image--->DWT
- Step2-Grayscale Image--->Apply Canny Edge Detector
- Step3-Combined step2 & step1 to make a Defocus Image
댓글 수: 6
KALYAN ACHARJYA
2018년 4월 26일
Just for comparison purpose only. I followed the steps as per your questions.
채택된 답변
KALYAN ACHARJYA
2018년 4월 24일
%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);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/187846/image.jpeg)
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!