The font is flipped in the up-down direction when the
statement set(iim2,'AlphaData',imAlphaData); is applied.
Anybody else get this problem. I am using 2007b on Windows
XP SP2?
Here is the code example that shows the problem:
% Create the background
% This example uses a blend of colors from left to right,
converted to a TrueColor image
% Use repmat to replicate the pattern in the matrix
% Use the "jet" colormap to specify the color space
bg = ind2rgb(repmat(1:64,64,1),jet(64));
% Create an image and its corresponding transparency data
% This example uses a random set of pixels to create a
TrueColor image
im = rand(100,100,3);
% Make the image fade in from left to right by designing its
alphadata
% Use repmat to replicate the pattern in the transparency fading
imAlphaData =
repmat(0:1/size(im,2):1-1/size(im,2),size(im,1),1);
% Display the images created in subplots
hf = figure('units','normalized','position',[.2 .2 .6 .6]);
ax1 = subplot(2,3,1);
ibg = image(bg);
axis off
title('Background')
ax2 = subplot(2,3,4);
iim = image(im);
axis off
title('Image without transparency yet')
% Now set up axes that overlay the background with the image
% Notice how the image is resized from specifying the spatial
% coordinates to locate it in the axes.
ax3 = subplot(2,3,[2:3, 5:6]);
ibg2 = image(bg);
axis off
hold on
% Overlay the image, and set the transparency previously
calculated
iim2 = image(im,'XData',[30 50],'YData',[10 30]);
set(iim2,'AlphaData',imAlphaData);
title(sprintf('Using transparency while overlaying
images:\nresult is multiple image objects.'))
I'm just starting to explore image overlaying and I've
found the same problem. Also using R2007b on XP SP 2.
Have you found out what's going on?
Thanks,
Tom
"Louis " <Louis.nospam@rogers.com> wrote in message
<fp27ce$92o$1@fred.mathworks.com>...
> Hi,
>
> I tried the first sample code example to superimpose
images
> as shown here:
>
> http://www.mathworks.com/support/solutions/data/1-
1AK7N.htm
>
> The font is flipped in the up-down direction when the
> statement set(iim2,'AlphaData',imAlphaData); is applied.
>
> Anybody else get this problem. I am using 2007b on Windows
> XP SP2?
>
> Here is the code example that shows the problem:
>
> % Create the background
> % This example uses a blend of colors from left to right,
> converted to a TrueColor image
> % Use repmat to replicate the pattern in the matrix
> % Use the "jet" colormap to specify the color space
> bg = ind2rgb(repmat(1:64,64,1),jet(64));
>
> % Create an image and its corresponding transparency data
> % This example uses a random set of pixels to create a
> TrueColor image
> im = rand(100,100,3);
> % Make the image fade in from left to right by designing
its
> alphadata
> % Use repmat to replicate the pattern in the transparency
fading
> imAlphaData =
> repmat(0:1/size(im,2):1-1/size(im,2),size(im,1),1);
>
> % Display the images created in subplots
> hf = figure('units','normalized','position',
[.2 .2 .6 .6]);
> ax1 = subplot(2,3,1);
> ibg = image(bg);
> axis off
> title('Background')
> ax2 = subplot(2,3,4);
> iim = image(im);
> axis off
> title('Image without transparency yet')
>
> % Now set up axes that overlay the background with the
image
> % Notice how the image is resized from specifying the
spatial
> % coordinates to locate it in the axes.
> ax3 = subplot(2,3,[2:3, 5:6]);
> ibg2 = image(bg);
> axis off
> hold on
> % Overlay the image, and set the transparency previously
> calculated
> iim2 = image(im,'XData',[30 50],'YData',[10 30]);
> set(iim2,'AlphaData',imAlphaData);
> title(sprintf('Using transparency while overlaying
> images:\nresult is multiple image objects.'))
>
"Tom Kopley" <tom_kopley@agilent.com> wrote in message
<g1270t$pad$1@fred.mathworks.com>...
> I'm just starting to explore image overlaying and I've
> found the same problem. Also using R2007b on XP SP 2.
>
> Have you found out what's going on?
I'm on R2007b w/ XP SP2 also. When I run the code I do not
see any flipped fonts. Are you referring to the title?
"helper " <spamless@nospam.com> wrote in message
<g12con$g8h$1@fred.mathworks.com>...
> "Tom Kopley" <tom_kopley@agilent.com> wrote in message
> <g1270t$pad$1@fred.mathworks.com>...
> > I'm just starting to explore image overlaying and I've
> > found the same problem. Also using R2007b on XP SP 2.
> >
> > Have you found out what's going on?
>
> I'm on R2007b w/ XP SP2 also. When I run the code I do
not
> see any flipped fonts. Are you referring to the title?
We've seen the same problem on both R2007b and R2008a on XP
SP2 also.
We suspect that the problem is related to the display driver
used. So far we've only seen the problem on machines with
an ATI Radeon X700 installed. We may have seen the problem
on a machine with ATI Radeo X1600, but the problem has since
disappeared there for some reason.
Anyone else with a clue as to what is going on?
Dave
"Tom K" <tom_kopley@agilent.com> wrote in message
<g1364i$3il$1@fred.mathworks.com>...
> Title and tick labels.
>
> Tom
>
> "helper " <spamless@nospam.com> wrote in message
> <g12con$g8h$1@fred.mathworks.com>...
> > "Tom Kopley" <tom_kopley@agilent.com> wrote in message
> > <g1270t$pad$1@fred.mathworks.com>...
> > > I'm just starting to explore image overlaying and I've
> > > found the same problem. Also using R2007b on XP SP 2.
> > >
> > > Have you found out what's going on?
> >
> > I'm on R2007b w/ XP SP2 also. When I run the code I do
> not
> > see any flipped fonts. Are you referring to the title?
>
Tags for this Thread
Add a New Tag:
Separated by commas
Ex.: root locus, bode
What are tags?
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.
Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central. Read the complete Disclaimer prior to use.