Steve on Image Processing

November 6th, 2007

From the archives: All about pixel colors

When I started this blog in early 2006, one of my first series of articles was called "All About Pixel Colors." These articles discussed how MATLAB associates matrix values with specific screen pixel colors. The series talked about the two fundamental image display models (indexed and truecolor); the scaled indexed image variation; using indexed scaling to program brightness/contrast controls; and the grayscale and binary image conventions in the Image Processing Toolbox.

This material might be useful for people who have started reading this blog since then, so I've used our new category archive pages to gather the material together. In the sidebar on the right, under Categories, click on "Pixel colors."

Or, if you prefer, you can look at my MATLAB Digest article that was based on the blog postings.

I am slowly making more use of categories in my blog. If you have category suggestions, please let me know.

4 Responses to “From the archives: All about pixel colors”

  1. wati replied on :

    how can i convert cm to pixels

  2. Steve replied on :

    Wati—Are you looking for an answer other than multiply by the number of pixels per cm?

  3. wati replied on :

    yes..

  4. Steve replied on :

    Wati—If you don’t give me any details at all about what you mean, then that’s the best answer I can give you.

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


Steve Eddins manages the Image & Geospatial development team at The MathWorks and coauthored Digital Image Processing Using MATLAB. He writes here about image processing concepts, algorithm implementations, and MATLAB.

  • murat: Hi Steve, I have an rgb image of a kind of cream and it contains some small black particles (black dots). In...
  • Steve: Ernest—Look at setting the FaceColor property. The code for setting that is shown on the page you asked...
  • Ernest Miller: Hi Steve, Understood. However, can you explain how to change the colors? Thanks, Ernest
  • Jan: Hi Steve Very useful code, yet what if I parts of my rotated+translated object are outside the original...
  • Steve: MoHDa—It might be possible. You’ll need to use one of the options that produces closed edge...
  • MoHDa: I have one question about the ROIPOLY: I have an image with stripes, I use the “edge” command for...
  • Steve: Shahn—My November 17, 2006 post shows you how to do it.
  • Steve: Kay-Uwe—Thanks for following up. I am planning to make it easier to use test directories in a package....
  • shahn: Hello Steve Instead of superimposing a star on the image to show the centroide. How would you superimpose a...
  • Kay-Uwe: Having TestSuite.fromPackag e() would be nice to have, but so far using simple “test” subdirs...

These postings are the author's and don't necessarily represent the opinions of The MathWorks.