Note that there are some explanatory texts on larger screens.

plurals
  1. POMATLAB: Alpha blend 2 images with different dimensioned matrices
    primarykey
    data
    text
    <p>I'm trying to alpha blend a couple of images, but I'm running into a few problems. I'm kind of developing somebody else's code, so I apologize in advance for possibly not making sense, but I'll be as clear as possible.</p> <p>Originally we made two different plots containing 1 image in each. For the first image, the plot is made by creating the figure and then doing the following:</p> <pre><code>%part of initializing the figure Fig.figim=image(double(zeros(RGBparam.height, RGBparam.width,3))); ... %later we have a loop, then we do: set(Fig.figim, 'CData', imresize(RGBparam.image,[RGBparam.height, RGBparam.width]); </code></pre> <p>where the size of the image <code>(RGBparam.image)</code> is <code>720x1280x3</code></p> <p>For the second image, we do the exact same initilization of the image (except 1 part which I'll put below) and do the following:</p> <pre><code>%the only different in initialization of the figure Fig.figim=imagesc(double(zeros(RGBparam.height, RGBparam.width))); ... %and here is the same loop again set(Fig.figim, 'cdata', outImage) </code></pre> <p>where the size of the image <code>(outImage)</code> is <code>720x1280</code>. <strong>Notice the difference between the dimensions...one is a 2-D matrix and another is a 3-D matrix</strong> (although note, it's still a 2-D image, it just has those 3 extra dimensions for the RGB colors). I guess I just don't know how to deal with this when I go about alpha blending. I'm guessing I'm going to want to combine the images <strong>before</strong> plotting them, alpha blending before and then just plotting the final figure. I don't know how to go about this though, since for my first image it's 3-D and includes the RGB channels, where my second figure does not! Any help giving the next steps in the process of alpha blending these two images, and then plotting them would be great. Thanks!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload