image contrast brightness adjust

Hi all
i want try open multiple images using implay. but want to change contrast first. Below is my code, but still error. anyone can help me.
P = zeros(512, 512, 313);
for K = 1 : 313
petname = sprintf('TRANSA001_CT%03d.dcm', K);
P(:,:,K) = dicomread(petname);
end
Out(:,:,K) = imadjust(P(:,:,K));
implay(Out, [-182 292]);

9 comentarios

KSSV
KSSV el 14 de Mzo. de 2018
What error you facing? Show us the error and error line.
mohd akmal masud
mohd akmal masud el 14 de Mzo. de 2018
Operands to the and && operators must be convertible to logical scalar values.
Error in uiscopes.ScopeCLI/checkSource (line 92) if ~isnumeric(fps) isnan(fps) isinf(fps) ~isreal(fps)
Error in matlabshared.scopes.UnifiedScope (line 105) checkSource( hScopeCfg.ScopeCLI );
Error in uiscopes/new (line 22) hScope = matlabshared.scopes.UnifiedScope(hScopeCfg, varargin{:});
Error in implay (line 60) obj = uiscopes.new(hScopeCfg);
Error in JDT (line 7) implay(Out, [-182 292]);
KSSV
KSSV el 14 de Mzo. de 2018
problem is at implay..I think imadjust is working fine.
mohd akmal masud
mohd akmal masud el 14 de Mzo. de 2018
i know. do you have idea?
KSSV
KSSV el 14 de Mzo. de 2018
What is class and size of out ?
simply try:
implay(Out)
mohd akmal masud
mohd akmal masud el 14 de Mzo. de 2018
what is out
Name Size Bytes Class Attributes
C2 512x512 524288 int16
if true
% code
end
KSSV
KSSV el 14 de Mzo. de 2018
implay(Out, [-182 292]);
What is Out class?
Name Size Bytes Class Attributes
Out 512x512 524288 int16

Iniciar sesión para comentar.

 Respuesta aceptada

DGM
DGM el 9 de Abr. de 2023

0 votos

The second argument to implay() is the framerate in FPS. It's a scalar. I have no idea why you're passing it a vector including negative values, but that won't work.

Más respuestas (0)

Preguntada:

el 14 de Mzo. de 2018

Respondida:

DGM
el 9 de Abr. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by