필터 지우기
필터 지우기

deconvoluting z stack multichannel tif image (3D volumetric image)

조회 수: 8 (최근 30일)
Chanille
Chanille 2023년 3월 17일
편집: Chanille 2023년 3월 17일
Hello, I have been having trouble deconvoluting my image in matlab:
% Load multi-channel color Z stack image
img = imread('ZStack1.tif');
% Define the parameters for the deconvolution algorithm
numIterations = 20; % Number of iterations
PSF = fspecial('gaussian', 7, 1); % Point spread function
background = 'none'; % Background handling method
noiseModel = 'poisson'; % Noise model
% Preallocate deconvolved image
deconvolvedImg = zeros(size(img), class(img));
% Deconvolve each color channel separately
for i = 1:size(img, 3)
% Extract the ith color channel
channel = img(:,:,i);
% Deconvolve the channel
% = deconvlucy(channel, PSF, numIterations, [], background, noiseModel, 'edge', 'same');
deconvolvedChannel = deconvlucy(channel, PSF, numIterations, [], background, noiseModel, 'edge', 'same');
% Store the deconvolved channel in the output image
deconvolvedImg(:,:,i) = deconvolvedChannel;
end
% Display the original and deconvolved images side by side
figure;
montage({img, deconvolvedImg}, 'Size', [1 2]);
title('Original (left) and deconvolved (right) image');
When it works it does not convolute, I think the issue is mainly that it doesn't read into matlab as a multidimensional multichannel (z stacked image) any suggestions to correct this? Thanks!

답변 (0개)

카테고리

Help CenterFile Exchange에서 Biomedical Imaging에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by