How to overlay color image over a grayscale image without IMAQ?

I would like to display a color image over a grayscale image; I would like the color image look translucent. How would I do this without using IMAQ functions? I am currently displaying my grayscale image using Intensity Graph.

> I would like to display a color image over a grayscale image; I would
> like the color image look translucent. How would I do this without
> using IMAQ functions? I am currently displaying my grayscale image
> using Intensity Graph.
Transparency and overlays are really just arithmetic on the images. It
is either done by the windowing system or by you. At the moment you
can't set transparency on LV controls. You can set it on LV floating
windows on some OSes, but then you will need to have the windows lined up.
A more direct approach is to lighten or darken the color image elements
based upon whether they will display over white, black, or a shade of
gray. If the images don't have the same size pixels, this will have a
first step of resampling th
e images so they do. Then combine the pixels
using the transparency you were going to apply to the color and the
shade of gray beneath it. I'm being vague here because there are lots
of physical models for combining colors.
If I look in my paint program I see about fifteen, so this is where you
get to make a choice and decide if black behind a red pixel is black, or
dark red. It all depends on whether these are two transparent
images(acetate sheets) backlit, or is it a transparency over a
nontransmitting media like paper. Anyway, if you can be more specific
about what you want, none of this is hard, typically just scaling the
int32s, adding, and some sort of normalization.
Greg McKaskle

Similar Messages

  • And again - how do I superimpose an image over a moving image?

    So I am beginning to work this all out...
    I have cropped an image using motion which is looking great, except that the image (which is someone's head) is square because I used 'crop' in motion, any ideas how to make the edges curved?
    The next step is working out how to keep the superimposed image over the head of the person in the video if they move? ie so it tracks the original image in movement?
    Thank you all for your help so far, I never expected help like this so quickly!

    Hard to follow you when you're creating new threads on the same topic...
    First of all - don't use Motion to crop - that's easily done in FCP - if you want to follow the edges of the head, use the Mask tool in Motion.
    Second, there's a video tutorial for using the tracking tools in Motion here:
    http://motionsmarts.com/
    Patrick

  • Re: How to display Graphical objects over streaming video images??

    Hi, have you figured this out yet and if so, what is the answer?

    There are not just several steps that are required but also you need a very fast CPU (or you have to work with very very small images),
    The basic approach is to put the WebCam (video) input into a Processor and to add your own implementation of a "javax.media.Effect" to the processor (let's call it Overlay3DEffect).
    Then you can:
    - transform the input Buffer to a java.awt.Image,
    - get the Java3D image to be overlayed
    - overlay the WebCam image with the relavent part of the Java3D image
    -convert the resulting Image back to the output Buffer
    The above processing has to be performed In the
    public void process(Buffer in, Buffer out)
    of your effect (Overlay3DEffect)

  • PLEASE HELP ME to put an image over a background image !!

    Hello,
    I need help on my AWT program. I have a map being displayed, and would like an image of a car (car.gif) to be displayed over the image of the map.
    So my question is: How do I make this map a background image, and put the picture of the car right over it. I need my map loaded all the time, and the picture of the car will be reloaded many times over the same map, so a class method to load this map would be perfect. Any help, code, or suggestions would be great. Thanks so much!
    Here is what I currently have for my map.
    import java.awt.*;
    import java.awt.event.*;
    public class MyImage extends Panel {
        private Image im = null;
        Graphics g;
        public void getMap(){
          im = Toolkit.getDefaultToolkit().getImage("C:\\test_map.gif");
             MediaTracker tracker = new MediaTracker(this);
             tracker.addImage(im,0);
             try {
                 tracker.waitForID(0);
             }catch (InterruptedException e){}
                 repaint();
       public void paint(Graphics g){
            this.g = g;
             if (im != null)     {
                g.drawImage(im,0,0,this.getWidth(),this.getHeight(),this);  //706,397
        }

    Look at this sample, the car will start when the button will be pressed, and stop on the next press.
    import java.awt.event.*;
    import java.awt.*;
    public class UsaTrip extends Frame 
         mapPanel map   = new mapPanel();
         Button   move  = new Button("Move");
         TheMover mover = null;
    public UsaTrip()
         addWindowListener(new WindowAdapter()
        {     public void windowClosing(WindowEvent ev)
              {     dispose();
                   System.exit(0);}});
         setBounds(10,10,500,400);
         setLayout(new BorderLayout());
         add(map,BorderLayout.CENTER);
         add(move,BorderLayout.SOUTH);
         move.addActionListener(new ActionListener()
         {     public void actionPerformed( ActionEvent e )
                   if (mover == null)
                        mover = new TheMover(map);     
                        move.setLabel("Stop");          
                   else
                        mover.end();
                        mover = null;     
                        move.setLabel("Move");          
         setVisible(true);
    public class TheMover extends Thread
         mapPanel map;
         boolean  go   = true;
         int      spin = 0;
    public TheMover(mapPanel m)
         map = m;
         start();
    public void end()
         go        = false;
    public synchronized void run()
         while (go)
              map.moveCar();
              try     {sleep(100);}
              catch(InterruptedException i){}
    public class mapPanel extends Panel
         Image map;
         Image car;
         int   x=10,y=30;   
    public mapPanel()
         map = getToolkit().getImage("usa.gif");
         car = getToolkit().getImage("home24.gif");
         MediaTracker tracker = new MediaTracker(this);
         tracker.addImage(map,0);
         tracker.addImage(car,0);
         try   {tracker.waitForID(0);}
         catch (InterruptedException e){}
    public void moveCar()
         repaint(x,y,25,25);
         x++;
         repaint(x,y,25,25);
    public void update(Graphics g)
         paint(g);
    public void paint(Graphics g)
         Rectangle r = g.getClipBounds();
         g.drawImage(map,r.x,r.y,r.x+r.width,r.y+r.height,
                              r.x,r.y,r.x+r.width,r.y+r.height,this);
         g.drawImage(car,x,y,this);
    public static void main(String[] args )
         new UsaTrip();
    Noah
    import java.awt.event.*;
    import java.awt.*;
    public class UsaTrip extends Frame
         mapPanel map = new mapPanel();
         Button move = new Button("Move");
         TheMover mover = null;
    public UsaTrip()
         addWindowListener(new WindowAdapter()
    {     public void windowClosing(WindowEvent ev)
              {     dispose();
                   System.exit(0);}});
         setBounds(10,10,500,400);
         setLayout(new BorderLayout());
         add(map,BorderLayout.CENTER);
         add(move,BorderLayout.SOUTH);
         move.addActionListener(new ActionListener()
         {     public void actionPerformed( ActionEvent e )
                   if (mover == null)
                        mover = new TheMover(map);     
                        move.setLabel("Stop");          
                   else
                        mover.end();
                        mover = null;     
                        move.setLabel("Move");          
         setVisible(true);
    public class TheMover extends Thread
         mapPanel map;
         boolean go = true;
         int spin = 0;
    public TheMover(mapPanel m)
         map = m;
         start();
    public void end()
         go = false;
    public synchronized void run()
         while (go)
              map.moveCar();
              try     {sleep(100);}
              catch(InterruptedException i){}
    public class mapPanel extends Panel
         Image map;
         Image car;
         int x=10,y=30;
    public mapPanel()
         map = getToolkit().getImage("usa.gif");
         car = getToolkit().getImage("home24.gif");
         MediaTracker tracker = new MediaTracker(this);
         tracker.addImage(map,0);
         tracker.addImage(car,0);
         try {tracker.waitForID(0);}
         catch (InterruptedException e){}
    public void moveCar()
         repaint(x,y,25,25);
         x++;
         repaint(x,y,25,25);
    public void update(Graphics g)
         paint(g);
    public void paint(Graphics g)
         Rectangle r = g.getClipBounds();
         g.drawImage(map,r.x,r.y,r.x+r.width,r.y+r.height,
                   r.x,r.y,r.x+r.width,r.y+r.height,this);
         g.drawImage(car,x,y,this);
    public static void main(String[] args )
         new UsaTrip();

  • How to overlay a gif onto a still image

    Hello, I am new to photoshop and I was wondering if it is possible to place a gif on top of an image? I saw a tutorial on YouTube explaining how to do it on cs5 but I can't find any tutorials for element. Thanks in advance to anyone that answers.

    Try this:
    Open picture B, the one you wish to select something from to add to another picture.
    Use one of the selection tools, e.g. selection brush, lasso tool, to select the object. You will see an outline ("marching ants") once the selection is complete
    Go to Edit menu>copy to copy the selection to the clipboard
    Open picture A, then go to Edit>paste
    Use the move tool to position object from picture B.
    In the layers palette you should see picture A as the background layer, and object B on a separate layer.

  • How can I color fill a sketched/scanned object without tracing it with vectors?

    Is it possible on illustrator or any other programs you know of?
    I've tried using the live paint bucket but it won't color in the sections the way I want. 
    It is a very complex sketch and it's going to take forever if I try to trace it all with vectors.

    This sounds like a job for Photoshop. It's a scan, and you don't want to turn it to vectors, so a vector program like Illustrator is not the best choice in this case.

  • DoEs AnYoNe KnOw HoW tO cOnVeRt GrAyScAlE ImAgEs To CoLoUr????

    Hi all,
    I 've got a simple image which has buildings,roads and grass areas. The image is currently in greyscale, and is basically a 400 by 700 text file full of interger values each representing a different land class - i.e. buildings have a value of 200, roads = 100 and grass areas = 60.
    does anyone know how to get the image from a grayscale image to a colour image?
    rob
    x

    argh... got confuse cos your subject.
    I 've got a simple image which has buildings,roads and grass areas. The image is currently in greyscale, and is basically a 400 by 700 text file full of interger values each representing a different land class - i.e. buildings have a value of 200, roads = 100 and grass areas = 60.this is not grayscale image rob. that file is data representation for your map, not color.
    sure you can convert it to color image, but you must define what color convertion do you like.
    DoEs ThIs SuBjEcT rElAtEd tO java?

  • How do I put a scale on an image display window?

    I am using a frame grabber and displaying an image. Is there any way I can put to left and bottom of the display like a axis or scale (I dont really know what to call it) that shows the pixel numbers along the x and y axis?

    The Intensity Graph is a 2D where the indices of the 2D array correspond to the X and Y positions and the element value is displayed as an intensity.  The color table used to display this intensity can be set by the user.  If your image is a grayscale image, then the pixel values are intensity values and the data can be displayed the same way in a Intensity Graph.  See attached.  You may have to find another image to use as your example.
    Randall Pursley
    Attachments:
    Compare Image to Intensity Graph.vi ‏77 KB

  • How to combine 3 grayscale image into a color image??

    I have 3 8bit grayscale images, and want to convert them into a color image.
    How can I do this?
    Thank you in advance!

    BufferedImage.getRGB and BufferedImage.setRGB.

  • How to lay one image over another?

    Hi, all:
    I'm trying to draw a square of a given color, and draw a circle of a given thickness and greyscale color. I want to lay the circle over the top of the square. Is that possible given the method below?
        public void draw (SimGraphics g) {
             g.drawBackground(backgroundColor); //background square with given rgb color.
              g.drawOvalBorder(stroke, diskGreyScale); //the overlaid circle with given thickness and greyscale color
        }drawBackground is of course undefined, because I don't exactly know HOW to draw a background for a square like this one. Normally, in my code I'm only calling one draw method. Here, I need to draw two things and put one on top of the other. How would I go about doing that?

    Peter__Lawrey wrote:
    Do you mean like this?
    public void paint(Graphics g) {
    Rectangle bounds = g.getClipBounds();
    g.fillRect(0,0,(int) bounds.getWidth(), (int) bounds.getHeight());
    g.fillOval(0,0,(int) bounds.getWidth(), (int) bounds.getHeight());
    Nope--I need something I can wrap in Graphics2D; the class I'm using (SimGraphics) is a wrapper for Graphics2D. I need (I think--though you can correct me on this) to use the draw methods from Graphics2D. Like this:
    public void makeMyImage (Graphics2D g) {
       g.drawFastRoundRect();
       h.drawOvalBorder();
       Graphics2D myImage = CompositeOrOverlayClassOfSomeFreakingKind(g, h);//g is bottom image; h is top image
    }That looks more like pseudocode, but you get the idea.

  • How to overlay images with tags?

    How can I overlay the small image (tag_smallimage) with the large image (tag_largeimage) ?
    with HTML is...
    <div style="position: absolute; z-index:100"><img src="yourimage1"></div>
    <div style="position: absolute; z-index:5000"><img src="yourimage2"></div>
    but how it works with tags?
    Thank you in advance!

    Well first off, your CSS is a little overkill.  You don't really need z-index at all since the image you want overlayed on top of the other image comes after the small image in the markup.  You can just set position:absolute and it will appear above your image by default. You'd want to use z-index if an element that comes before another element in the markup is required to be layered on top. Also, try to avoid inline styles unless you are doing an email campaign, in which case, inline styles are best practice since email clients rarely adhere to web standards.
    I'm assuming you are creating a web app and you've creted the "smallimage" and "largeimage" fields already for your web app. Here's the HTML:
    <div class="image-container">
         <div class="small-image">
              {tag_smallimage}
         </div>
         <div class="large-image">
              {tag_largeimage}
         </div>
    </div>
    And here's some CSS that you can put in your main stylesheet:
    .image-container { position: relative; }
    .large-image { position: absolute; top: 0; left: 0; }
    This should work for you but you might run into problems with the large images running on top of other image groups if you use this in multiple places on one page.  What is your goal for these images?  A hover effect so that the large image shows when you hover over the small one?

  • After turning an image black and white, how can I color in a certain area?

    After turning an image black and white, how can I color in a certain area?

    How did you change it? Did you make your B&W on a separate layer? If so, just erase the part of the layer you don't want, or add a layer mask and paint with black over the parts you want to hide.
    If not, then you can copy/paste the original photo (you will need to press ctrl+A/cmd+A to select all before you can copy) into the new image. From there it depends on the relative proportions of B&W. Arrange the two layers so the one with the most area that you want to keep is on top, and either mask out the rest or just erase it away.
    For future reference, an easier way to do this when starting from scratch is to use the smart brush. Choose a black and white conversion style, turn on the inverse checkbox and paint over the part you want in color. The rest of the photo turns black and white, leaving what you paint over in the original colors.

  • Hey, How do I populate my replace colors color library in illustrator? I tried to replace color on a traced/ vectorized image and when I selected and went to the color library CC said I need to use a valid username. I was already logged into my adobe acco

    Hey, How do I populate my replace colors color library in illustrator? I tried to replace color on a traced/ vectorized image and when I selected and went to the color library CC said I need to use a valid username. I was already logged into my adobe account.

    Can you please show a screenshot of what exactly you want to replace where?

  • Automated way to overlay one image over multiple images from a folder?

    I need to overlay a transparent image of a tablet over about 50 images from a folder - is there any automated way to do this? I can use either Photoshop or Illustrator
    Thanks
    Jamie

    Have you tried makig an aciton yet. Should not be too difficult since you want to to use the same image , you can copy once, and use paste during the action.
    Make sure when you run the action as a batch, that you choose your destination. As a folder is safest, so you do not write over your original file.

  • Updated to IOS 5.0.1 and now if I tap on a game icon instead of opening the game a grayish color comes over it and nothing happens. How can I get my games to work again?

    Updated to IOS 5.0.1 and now if I tap on a game icon instead of opening the game a grayish color comes over it and nothing happens. How can I get my games to work again?

    Purplehiddledog wrote:
    I do backup with iCloud.  I can't wait until the new iMac is available so that I can once again have my files in more than 1 location without needing to rely solely on the cloud. 
    I also rely on iTunes and my MacBook and Time Machine as well as backing up to iCloud. I know many users know have gone totally PC free, but I chose to use iCloud merely as my third backup.
    I assume that the restore would result in my ability to open Pages and Numbers and fix the problem with deleting apps, but this would also mean that if my Numbers documents still exist solely within the app and are just not on iCloud for some reason that they would be gone forever.  Is that right?
    In a word, yes. In a little more detail.... When you restore from an iCloud backup, you must erase the device and start all over again. There is no other way to access the backup in iCloud without erasing the device. Consequently, you are starting all over again. Therefore, it would also be my assumption that Pages and Numbers will work again and that the deleting apps issues would be fixed as well.
    If the documents are not in the backup, and you do not have a backup elsewhere, the documents could be gone forever.

Maybe you are looking for