MEDICAL-IMAGE-FILTER-CODE

버전 1.1.0 (218 Bytes) 작성자: Tobi Joshua Samuel
The code allows users to input a scanned medical image file (e.g. tif, .jpeg )
다운로드 수: 27
업데이트 날짜: 2023/9/1
This MATLAB script-file can applies several filters to a CT scan image of a patient to isolate and observe different tissues for lung cancer research. The program applies a 5x5 low pass filter, a 3x3 high pass filter, and a 3x3 edge detection filter to the original image. The filtered and unfiltered images are displayed in a figure with four subplots, including the original image, the smoothed image, the sharpened image, and the edge detection image. Additionally, an extra credit task is included, which removes pixels with intensities less than 200 and greater than 700 and displays the resulting image in a separate figure.
% Enter the Scanned Image File (e.g .tif,.jpeg)
image = imread('input'); % Please replace the 'input' with the image file.
% Display the original image
subplot(2, 2, 1);
imshow(image);
title('Original Image');
% Apply a 5X5 low pass filter to smoothen the image
Low_pass_filter = [1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;1,1,1,1,1]/5;
smoothed_image = conv2(Low_pass_filter, double(image));
% Display the smoothed image
subplot(2, 2, 2);
imshow(smoothed_image);
title('Smoothed Image');
% Apply a 3X3 high pass filter to sharpen the image
High_pass_filter = [-1,-1,-1;-1,9,-1;-1,-1,-1];
sharpened_image = conv2(smoothed_image, double(High_pass_filter));
% Display the sharpened image
subplot(2, 2, 3);
imshow(sharpened_image);
title('Sharpened Image');
% Apply an edge detection filter to detect the edges of the lungs
edge_detection_filter = [-1,-1,-1;-1,5,-1;-1,-1,-1];
edge_image = conv2(smoothed_image, double(edge_detection_filter));
% Display the edge detection image
subplot(2, 2, 4);
edge(edge_image);
title('Edge Detection Image');
% Display the color bar showing the intensity
colormap(gray);
colorbar;
% Remove pixels outside the range [200, 700]
removed_pixels_image = smoothed_image;
removed_pixels_image(removed_pixels_image < 200) = 0;
removed_pixels_image(removed_pixels_image > 700) = 0;
% Display the removed pixels image
figure;
imshow(removed_pixels_image);
title('Removed Pixels Image');
colormap(gray);
colorbar;

인용 양식

Tobi Joshua Samuel (2024). MEDICAL-IMAGE-FILTER-CODE (https://github.com/Tobi-joshua/MEDICAL-IMAGE-FILTER-MATLAB-CODE/releases/tag/1.1.0), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2023a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0

See release notes for this release on GitHub: https://github.com/Tobi-joshua/MEDICAL-IMAGE-FILTER-CODE/releases/tag/1.1.0

1.0.0

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.