필터 지우기
필터 지우기

How can I use wcodemat to re-scale an intensity/gray-scale image?

조회 수: 2 (최근 30일)
Akshra
Akshra 2016년 12월 7일
편집: Chaya N 2016년 12월 8일
I want to change my original intensity/gray-scale image into wcodemat for wavelet transform but problem is if i use
Y = wcodemat(X)
the image just turn into different shades of blue and this doesn't represent the original image(which is black and grey), I also cannot use
Y = wcodemat(X,NBCODES), because my image doesn't have map which is required for the NBCODES parameter.
How can I resolve this problem?

채택된 답변

Chaya N
Chaya N 2016년 12월 8일
편집: Chaya N 2016년 12월 8일
You could get a map of your original grayscale image X using the contrast function
cmap = contrast(X)
This would give you a map of size CurrentGrayMap-by-3 which you could use when plotting your scaled image
  댓글 수: 4
Akshra
Akshra 2016년 12월 8일
figure on the left is the original image and figure on the right is the re-scaled image using cmap.
Chaya N
Chaya N 2016년 12월 8일
편집: Chaya N 2016년 12월 8일
Can you post the relevant code here? When calling wcodemat, you may need to call with the same NBCODES value as the length of the current colormap. If this length is small compared to the number of distinct gray levels you require for a smoother looking scaled image, then it appears 'thresholded' or having excess contrast as in your figure on the right. I would suggest you manually try to obtain as large a map length as possible. For an 8-bit image, this is usually 255-by-3. For example, you could obtain a 255 length colormap from your original image and call wcodemat with the same NBCODES=255.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Denoising and Compression에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by