What does sc in imagesc stand for?

4 ビュー (過去 30 日間)
David Katz
David Katz 2023 年 3 月 26 日
回答済み: Image Analyst 2023 年 3 月 27 日
Pretty much the title question. Thank you.

回答 (2 件)

the cyclist
the cyclist 2023 年 3 月 26 日
編集済み: the cyclist 2023 年 3 月 26 日
scaled colors
doc imagesc
  8 件のコメント
DGM
DGM 2023 年 3 月 27 日
編集済み: DGM 2023 年 3 月 27 日
Does it really matter whether those two letters mean "scaled" or "scaled color" or "scaled cdata"?
Or is it more important what all three of those names suggest? All three describe the behavior of the function -- specifically how it differs from the behavior of image(). Imagesc() is basically a simple wrapper for image() which adds the convenience of setting the 'CDataMapping' property to 'scaled'. It offers a few related conveniences, but that's the main one that most people would use when calling it with no extra arguments. Doing this:
imagesc(myimage)
is (basically) the same as
image(myimage,'cdatamapping','scaled') % default is 'direct'
I don't know if that was even part of the curiosity, but I'll just throw that out there anyway.
I will add one thought. Imagesc() really looks like the type of thing you'd write after you found yourself doing something simple way too often. So if you're going to write a simple convenience tool, what's the likelihood the name you'd use is in some way an abbreviated reference to the options you want to avoid typing again?
I could be wrong. I don't know what the earliest versions of these two functions looked like.
Walter Roberson
Walter Roberson 2023 年 3 月 27 日
By the way,
edit imagesc

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


Image Analyst
Image Analyst 2023 年 3 月 27 日
Well I always thought it meant scaled since it works for gray scale and I don't use the word "color" for gray levels. And it is consistent with the sc in soundsc() vs sound() function where it means scaled (since sounds don't have visible colors).
However the help says this:
imagesc
Display image with scaled colors
imagesc(C) displays the data in array C as an image that uses the full range of colors in the colormap. Each element of C specifies the color for one pixel of the image.
So I guess it's somewhat ambiguous whether the c is from "scaled", or if it's from "colors".

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by