필터 지우기
필터 지우기

Info

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

colors detection and display them

조회 수: 1 (최근 30일)
safa
safa 2013년 4월 29일
마감: MATLAB Answer Bot 2021년 8월 20일
How can i reduce number of colors in image (to 32 colors ) and display colors used in the picture in form one column ?

답변 (1개)

Walter Roberson
Walter Roberson 2013년 4월 29일
[newimage, newmap] = rgb2ind(existingimage, 32);
But it is not clear in your question whether you just want to display the unique colors (if so then display newmap) or if you want to display the indices (if so then display newimage).
I am also not sure what order you want to display the output in. The indices would be a two dimensional array, one index per pixel. You could reshape() that as a column, but will the user understand? The colormap would be an array with three columns (R, G, B), and displaying in one column does not strike me as being a good thing ?
  댓글 수: 1
safa
safa 2013년 4월 29일
actually, i want to do what is done in website in following website http://www.picstoknits.co.uk/ user can select picture and at the end ,out put is a colorbar, showing all colors used in picture.
anyway thank you for answer

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

Community Treasure Hunt

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

Start Hunting!

Translated by