Home > Archive > Matlab > October 2006 > rgb2gray behaves differently in V6.5 and V7
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
rgb2gray behaves differently in V6.5 and V7
|
|
| Pinpress 2006-10-30, 7:42 pm |
| Hi all,
I used rgb2gay function to convert a uint8 RGB image into gray image.
Used both V6.5 and V7.3, and surprisingly found that they gray
images are definitely different. Anyone has the same experience, and
anyone can tell why? Thanks.
| |
| Steve Eddins 2006-10-31, 8:02 am |
| Pinpress wrote:
> Hi all,
>
> I used rgb2gay function to convert a uint8 RGB image into gray image.
> Used both V6.5 and V7.3, and surprisingly found that they gray
> images are definitely different. Anyone has the same experience, and
> anyone can tell why? Thanks.
In version 5 of the Image Processing Toolbox, rgb2gray was modified to
make it faster and take less memory. At the same time, a rounding
problem was corrected. For input images with integer data types, the
previous version of rgb2gray truncated fractional parts instead of
properly rounding them.
--
Steve Eddins
http://blogs.mathworks.com/steve
| |
| Pinpress 2006-10-31, 8:02 am |
| But it seems V6.5 generates a much smoother gray image, than in V7 ??
If there is a way to attach images, I can show you what I mean.
Steve Eddins wrote:
>
> In version 5 of the Image Processing Toolbox, rgb2gray was modified
> to
> make it faster and take less memory. At the same time, a rounding
> problem was corrected. For input images with integer data types,
> the
> previous version of rgb2gray truncated fractional parts instead of
> properly rounding them.
>
> --
> Steve Eddins
> <http://blogs.mathworks.com/steve>
>
| |
| Steve Eddins 2006-10-31, 8:02 am |
| Pinpress wrote:
> But it seems V6.5 generates a much smoother gray image, than in V7 ??
> If there is a way to attach images, I can show you what I mean.
Send me e-mail with your input and output images.
--
Steve Eddins
http://blogs.mathworks.com/steve
|
|
|
|
|