필터 지우기
필터 지우기

PIXEL VALUE NORMALIZATION 0 and 1

조회 수: 2 (최근 30일)
Serife Kaba
Serife Kaba 2021년 12월 20일
편집: Serife Kaba 2021년 12월 21일
Dear Sir/Madam,
I have DICOM images taken from the angiography device and I labeled my images using Adobe Photoshop, then painted the background with black and the part I labeled with white.
I exported the labelled images in png format from photoshop.
However, the images appearing in black and white are in RGB format, although I converted the image to binary with the MATLAB program, all numbers appear as 2 in the pixel range.
How can I make 0 and 1 pixel interval for binary images ? I would be grateful if you can help me
Best regards
Şerife Kaba
  댓글 수: 2
Matt J
Matt J 2021년 12월 20일
I suggest attaching the RGB image so that we can demonstrate.
Serife Kaba
Serife Kaba 2021년 12월 21일
Thank you so much . I attached the image below which taken from photoshop (RGB image )
Best regards

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2021년 12월 21일
Although you posted a PNG image, we can tell that at some point the image had been saved in jpeg format, which has resulted in some boundary pixels being blurred.
IM47 = imread('IM-0001-0047.png');
BW47 = imbinarize(rgb2gray(IM47));
Now BW47 will be the binary labels that you need.
  댓글 수: 1
Serife Kaba
Serife Kaba 2021년 12월 21일
편집: Serife Kaba 2021년 12월 21일
Dear Walter,
Thank you so much 🙏
Best regards

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

yanqi liu
yanqi liu 2021년 12월 21일
yes,sir,may be the image file save be Photoshop get rgb format,so we read it to logical,such as 0 and 1 value
may be use
im2uint8(your_logical_label_matrix)
make the value to 255(white)、0(black)
and use
classNames = ["target","background"];
labelIDs = [255 0];
to generate pixelLabelDatastore
  댓글 수: 1
Serife Kaba
Serife Kaba 2021년 12월 21일
Thank you for your answer , i will check

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by