How to transform double to unit8

조회 수: 4 (최근 30일)
Sivakumar Rajagopal
Sivakumar Rajagopal 2020년 4월 3일
댓글: Sivakumar Rajagopal 2020년 4월 3일
for i = 1:1:291 %go through rows
for j = 1:1:240 %columns
img_heq(i, j) = T(img(i,j));
end
end
ERROR: Variable img_heq must be of data type uint8. It is currently of type double.
How to recity the varibale error problem.

채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2020년 4월 3일
  댓글 수: 1
Sivakumar Rajagopal
Sivakumar Rajagopal 2020년 4월 3일
for i = 1:1:291 %go through rows
for j = 1:1:240 %columns
img_heq(i, j) = T(img(i,j));
img_heq=im2uint8(img_heq(i,j));
end
end
Error: Variable img_heq must be of size [291 240]. It is currently of size [1 1]. Check where the variable is assigned a value.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by