Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to subtract image < double> from image<uint8>?

조회 수: 4 (최근 30일)
Samidha
Samidha 2013년 12월 26일
마감: Matt J 2013년 12월 26일
Hello, I have one CT image. and I have written code as-
I=imread('E:\ME IInd year\data base\ct data\download.jpg'); I1=imresize(o,[160 160]); a=rgb2gray(I); %original image
%find local max and min of image
p=imregionalmax(a); q=imregionalmin(a);
%max-min average
M=(p+q)/2;
%subtract averaged image from original image
Max=uint8(M); %converted from double to uint8
Z = imsubtract(a,Max); %original CT - averaged CT
in this code imshow(M) shows averaged image but when I convert them to uint8 and write imshow(Max) then gives black screen. so, subtraction result is same as original image this is my problem. Why this is happening?
  댓글 수: 1
Matt J
Matt J 2013년 12월 26일
Please use this toolbar button to put your code in a separate font from your text,
I'll re-open your post when you do.

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by