フィルターのクリア

Converting r g b triplets into a single physical quantity

3 ビュー (過去 30 日間)
Souvik Mukherjee
Souvik Mukherjee 2017 年 11 月 8 日
編集済み: Image Analyst 2017 年 11 月 24 日
I used
tst1=imread('tst.png');
[x, map]= rgb2ind(tst1,55);
x2=im2double(x,'indexed');
Thus each element in the matrix x2 contains a value from 0 to 55 which represents the row in the 55 x 3 matrix map and contains the r,g,b triplet value.
My question is how do I now convert x2 into a matrix where the rgb triplet values will represent pressure values ranging from 1500 to 7000 psi? Can't use imadjust as I don't have license for that. Any other workarounds?
Thanks.
Souvik
  1 件のコメント
Gayatri Menon
Gayatri Menon 2017 年 11 月 24 日
How will the pressure value related to x2 matrix?Are you looking for a linear mapping between x2 and the pressure value?

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2017 年 11 月 24 日
編集済み: Image Analyst 2017 年 11 月 24 日
Doesn't tst1 already have that info? Just do
pressureImage = (7000-1500) * mat2gray(tst1) + 1500;
By the way, if you're using im2double() successfully, then you have the Image Processing Toolbox and could use imadjust() if you want.

Community Treasure Hunt

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

Start Hunting!

Translated by