What does sc in imagesc stand for?

4 次查看(过去 30 天)
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.

请先登录,再进行评论。


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 CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by