Convert color to value
이전 댓글 표시
Hello everyone. I have a jpg image with blue to red color corresponding to different value. There is also a colorbar showing each colorscale correspond to a value. Is there a simple way to convert this color image into matrix? Thanks a lot.
채택된 답변
추가 답변 (2개)
Image Analyst
2017년 11월 30일
1 개 추천
See my attached demo where I used the colormap in a thermal image to convert that into a grayscale temperature image.
Stephen23
2017년 11월 30일
0 개 추천
댓글 수: 2
Jos (10584)
2017년 11월 30일
+1 Hopefully it is indeed that simple ...
Image Analyst
2017년 11월 30일
That's the gist of it, but it's not that simple unless you already have the colormap. In many cases, the user does not and has only some kind of screenshot. My solution also uses rgb2ind() but also does the hard part of figuring out how to obtain the colormap.
카테고리
도움말 센터 및 File Exchange에서 Color and Styling에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!