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)

Similar Messages

  • Doubt , how to display ole objects in report builder

    Please tell me, how to display ole objects in report builder.
    I mean i wanted to print ole object in report, so how to do that.

    Just to clarify Lixia's response.
    In Reports 9i we have deprecated our OLE functionality. Reports created in prior versions that contain OLE objects should still run, but you will not be able to create new reports containing OLE objects.

  • How pinnacle can be used for streaming video for mac app?

    How pinnacle can be used for streaming video for mac app?

    Hi naturalfemale,
    As mentioned in the referring article, closed captioning content has to be specifically added/enabled to a video for closed captioning to function:
    Additional Information
    Not all videos include caption or subtitle tracks. Check the documentation for the video you are using to see if it includes these features.
    OS X: Using captioning features in Mavericks
    http://support.apple.com/kb/HT5910
    At the moment, I do not believe there is an option for universal captioning.
    Regards,
    - Brenden

  • How to display graphics larger than canvas size?

    How do I display graphics larger than canvas size in Java AWT?
    I tried setting the canvas size() to a value larger than my monitor size, and then adding scroll bars to the canvas, but the scroll bars and the canvas won't go beyond the monitor size in pixels, which is only 800, so the large graphic I try to display gets cut off at the bottom.
    How can I overcome this problem? Has anybody encounter a similar dilemma before?

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    public class AWTSizing
        public static void main(String[] args)
            LargeCanvas canvas = new LargeCanvas();
            ScrollPane scrollPane = new ScrollPane();
            scrollPane.add(canvas);
            Frame f = new Frame();
            f.addWindowListener(new WindowAdapter()
                public void windowClosing(WindowEvent e)
                    System.exit(0);
            f.add(scrollPane);
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    class LargeCanvas extends Canvas
        int w, h;
        final int PAD = 10;
        Rectangle r1, r2, r3;
        Rectangle[] rects;
        boolean firstTime;
        public LargeCanvas()
            w = 360;
            h = 360;
            firstTime = true;
        public void paint(Graphics g)
            super.paint(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            if(firstTime)
                initShapes();
            g2.setPaint(Color.red);
            g2.draw(r1);
            g2.draw(r2);
            g2.draw(r3);
        private void initShapes()
            r1 = new Rectangle(w/4, h/4, w/2, h*3/4);
            r2 = new Rectangle(w/2, h/2, w/2, h/2);
            r3 = new Rectangle(w*5/8, h/6, w*3/5, h*2/3);
            rects = new Rectangle[] { r1, r2, r3 };
            firstTime = false;
            invalidate();
            getScrollPane().validate();
        private ScrollPane getScrollPane()
            ScrollPane scrollPane = null;
            Component c = this;
            while((c = c.getParent()) != null)
                if(c instanceof ScrollPane)
                    scrollPane = (ScrollPane)c;
                    break;
            return scrollPane;
        public Dimension getPreferredSize()
            Dimension d = new Dimension(w, h);
            if(rects == null)                   // before calling initShapes
                return d;
            Rectangle r;
            for(int j = 0; j < rects.length; j++)
                r = rects[j];
                if(r.x + r.width + PAD > w)
                    d.width += r.x + r.width + PAD - w;
                if(r.y + r.height + PAD > h)
                    d.height += r.y + r.height + PAD - h;
            return d;
    }

  • How to display an object that links to another object

    I am trying to find out how display 2 objects (box's) in a frame and connect them with a line so if I move one box the line stays connected.
    Can anyone point point in the direction of any tutorials or example.
    Eventually I plan to change these box's to be a database table containing attributes and the link representing the fk.

    Eric_Davidson wrote:
    I am trying to find out how display 2 objects (box's) in a frame and connect them with a line so if I move one box the line stays connected.
    Can anyone point point in the direction of any tutorials or example.
    Eventually I plan to change these box's to be a database table containing attributes and the link representing the fk.Which part do you need help with? The drawing of the boxes, the handling of the GUI, the dragging, etc?
    Do you have any code started?

  • How to convert a Graphics object into a JPG image?

    I have this simple question about how to make a Graphics object into a JPG file...
    I just need the names of the classes or the packages ... I'll figure out the rest of the details...
    Thanks...

    Anyway this might come in handy
    JPEGUtils.java
    ============
    * Created on Jun 22, 2005 by @author Tom Jacobs
    package tjacobs.jpeg;
    import java.awt.Image;
    import java.awt.image.BufferedImage;
    import java.awt.image.RenderedImage;
    import java.io.BufferedInputStream;
    import java.io.BufferedOutputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import javax.imageio.ImageIO;
    import com.sun.image.codec.jpeg.JPEGCodec;
    import com.sun.image.codec.jpeg.JPEGEncodeParam;
    import com.sun.image.codec.jpeg.JPEGImageDecoder;
    import com.sun.image.codec.jpeg.JPEGImageEncoder;
    * Utilities for saving JPEGs and GIFs
    public class JPEGUtils {
         private JPEGUtils() {
              super();
         public static void saveJPEG(BufferedImage thumbImage, File file, double compression) throws IOException {
              BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file));
              saveJPEG(thumbImage, out, compression);
              out.flush();
              out.close();
         public static void saveJPEG(BufferedImage thumbImage, OutputStream out, double compression) throws IOException {
              JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
              JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(thumbImage);
              compression = Math.max(0, Math.min(compression, 100));
              param.setQuality((float)compression / 100.0f, false);
              encoder.setJPEGEncodeParam(param);
              encoder.encode(thumbImage);
         public static BufferedImage getJPEG(InputStream in) throws IOException {
              try {
                   JPEGImageDecoder decode = JPEGCodec.createJPEGDecoder(in);
                   BufferedImage im = decode.decodeAsBufferedImage();
                   return im;
              } finally {
                   in.close();
         public static BufferedImage getJPEG(File f) throws IOException {
              InputStream in = new BufferedInputStream(new FileInputStream(f));
              return getJPEG(in);
         public static void saveGif(RenderedImage image, File f) throws IOException {
              saveGif(image, new FileOutputStream(f));
         public static void saveGif(RenderedImage image, OutputStream out) throws IOException {
    //          Last time I checked, the J2SE 1.4.2 shipped with readers for gif, jpeg and png, but writers only for jpeg and png. If you haven't downloaded the whole JAI, and you want a writer for gif (as well as readers and writers for several other formats) download:
    //          http://java.sun.com/products/java-media/jai/downloads/download-iio.html
              ImageIO.write(image, "gif", out);
         public static void main(String[] args) {
              // TODO Auto-generated method stub
    }

  • How do I write objects over a SocketChannel?

    Using the regular Socket class we can pass objects over sockets like this.
    Socket s = new Socket("127.0.0.1", 80);
    ObjectOutputStream out = new ObjectOutputStream(s.getOutputStream());
    out.writeObject(new Object());
    Now, I've looked through the documentation on the new Channel classes and have only seen ways to pass bytes over the channel, not an entire object. Is there an easy way to pass an entire object over a channel? Am I just missing an appropriate wrapper that adds this functionality?
    Thanks,
    Dave

    This code will help you converting an Object to a byte[]:
    //Object to send MUST implement Serializable
    SerializedObject anObject = new SerializedObject();
    //byte[] needed to send
    byte[] aByteArray = null;
    //the conversion
    java.io.ByteArrayOutputStream aByteArrayOutputStream = new java.io.ByteArrayOutputStream();
    java.io.ObjectOutputStream aObjectOutputStream = new java.io.ObjectOutputStream(aByteArrayOutputStream);
    aObjectOutputStream.writeObject(anObject);
    aObjectOutputStream.close();
    aByteArray = aByteArrayOutputStream.toByteArray();
    //When you receive the Object you should reverse the conversion
    //byte[] reveived from InputStream
    byte[] aReceivedByteArray;
    //Expected Object
    SerializedObject theExpectedObject = null;
    //the conversion
    java.io.ByteArrayInputStream aByteArrayInputStream = new java.io.ByteArrayInputStream(aReceivedByteArray);
    java.io.ObjectInputStream aObjectInputStream = new java.io.ObjectInputStream(aByteArrayInputStream);
    theExpectedObject = aObjectInputStream.readObject();
    That's one way to do it.
    You should watch out with Serializable object when sending it to another OS or JRE-version.

  • How to display Values(Numbers) over every individual Towers in 3D Graph?

    Hi!
    PFA below. Its regarding the screen shot of 3D Graph.
    As we can see in the picture that the values are not accurate to view. So its better to display values(numbers) on top of each tower in 3D Graph.
    How to display that? Kindly suggest me any solution.
    With Regards,
    Yarnagula Sudhir.
    Message was edited by: Yarnagula Sudhir
    Message was edited by: Yarnagula Sudhir

    You do realize that this forum is for Adobe InDesign?

  • How to display the time length of video (current time/ total time) ?

    Hi,everyone. I would like to ask how to display the time length of the video which show only in system example: it show the current time and total time? using AS 3.0.
    It there any information or solution to solve it? .
    I appreciate it any of you able to answer it. ^^
    Thank you.

    Hi,
    Actually I have this requirement for MAC OS 10.5. With the code you provided, I got the output as "6289375". When I changed the URL to point to my file (file:///Users/VPKVL/Desktop/MyRecord/tempAudio.wav), I am getting the below mentioned Exception:
    Exception in thread "main" javax.sound.sampled.LineUnavailableException: Failed to allocate clip data: Requested buffer too large.
         at com.sun.media.sound.MixerClip.implOpen(MixerClip.java:561)
         at com.sun.media.sound.MixerClip.open(MixerClip.java:165)
         at com.sun.media.sound.MixerClip.open(MixerClip.java:256)
         at TestWavLength.main(TestWavLength.java:13)The "tempAudio.wav" file is created by using java sound API. I am using the SSB USB Headphone Set to record the audio with the following settings for AudioFormat object:
    AudioFormat audioFormat = new AudioFormat(
              AudioFormat.Encoding.PCM_SIGNED, // the audio encoding
                                                            // technique
              48000.0F,// sampleRate the number of samples per second
              16, // sampleSizeInBits the number of bits in each sample
              2, // channels the number of channels (1 for mono, 2 for
                            // stereo, and so on)
              4, // frameSize the number of bytes in each frame
              48000.0F,// frameRate the number of frames per second
              false); // bigEndian indicates whether the data for a single
                            // sample is stored in big-endian byte order
                            // (false means little-endian)Can you please suggest where I am going wrong ?

  • How to display two different parts of one image in two windows?

    hi everyone:) i need to display two different parts of one image in two windows. i have problem with displaying :/ because after creating windows there aren't any images :( i supose my initialization code of creating windows is incomplete, maybe i miss something or maybe there is some inconistency. graphics in java is not my strong position. complete code is below. can anybody help me?
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.io.*;
    import javax.imageio.*;
    import javax.swing.*;
    import java.util.*;
    class ImgFrame extends JFrame
           private BufferedImage img;
           ImgFrame(BufferedImage B_Img, int x, int y, int w, int h)
                   super("d");
                   img=new BufferedImage(w,h,BufferedImage.TYPE_INT_RGB);
                   img=B_Img.getSubimage(x, y, w, h);
           }//end ImgFrame construction
           public void paint(Graphics g)
                   Graphics2D g2D = (Graphics2D)g;
                   g.drawImage(img, 8, 8, null);
           }//end paint method
           public Dimension getPrefferedSize()
                   if(img==null)
                           return(new Dimension(100,100));
                   else
                           return(new Dimension(img.getWidth(null),img.getHeight(null)));
           }//end of GetPrefferedSize method
    }//end ImgFrame class
    public class TestGraph2D_03 extends Component
           static BufferedImage IMG;
           public static void Load()
                   try
                           IMG=ImageIO.read(new File("c:/test.bmp"));
                   catch(IOException ioe)
                           System.out.println("an exception: "+ioe);
                   }//end try catch
           }//end TestGraph2D_03 construction
           public static void main(String[] args)
                   Load();
                   ImgFrame F1 = new ImgFrame(IMG, 0, 0, 8, 8);
                   ImgFrame F2 = new ImgFrame(IMG, 8, 8, 8, 8);
                   F1.addWindowListener(new WindowAdapter()
                           public void windowClosing(WindowEvent e)
                                   System.exit(0);
                   F1.pack();
                   F1.setVisible(true);
                   F2.addWindowListener(new WindowAdapter()
                           public void windowClosing(WindowEvent e)
                                   System.exit(0);
                   F2.pack();
                   F2.setVisible(true);
           }//end of main method in TestGraph2D_01 class
    }//end of TestGraph2D_03 class

    Never override the paint(...) method of a Swing component.
    If you have a sub image then add the image to a JLabel and add the label to the GUI. No need for custom painting.

  • How to create encrypted HTTP Live Streaming Videos?

    Does Compressor4 have any features (or scripts that can be run post-compression) to create encrypted HTTP Live Streaming Videos?
    It works great for creating UNencrypted ones, but I need to make some encrypted ones also.

    I found it out: You have to use "New Batch From Template" and choose “HTTP Live Streaming". Then you have to create a new folder where the output goes to in the "Information" window. There is also a checkbox which instructs Compressor to create a "readme.html".
    Then a folder for every quality setting is created, where all the .ts files go to and the playlist files as well. Works like a charm, as soon as you found out how to do it.

  • How do you remove objects in a video?

    I've used content aware to remove a certain object in my video in photoshop cs6. It worked but when I move a couple of frames forward the object reappears.
    How do you use content aware in a video so that you can remove an object only once for the whole video?

    You have posted in the Keynote for Mac forum.  
    The forum for Keynote on the iPad is here:   Keynote iOS

  • How to display JFrame objects in a sequence

    Hello,
    I have several classes that extend JFrame each of which represent a GUI screen for an application. I would like to display these screens one after another. I am creating objects from these classes in another class, in the sequence I wish them to be displayed. The problem I am facing is that all the screens are being displayed at once. Please let me know how can I display these screens in the order that I want.
    Please forgive me if I am out of topic as this is my first message posting.
    Thanks,
    Kalyan

    Hello,
    Thanks a lot for your help. I will definitely try it.
    Thanks,
    Kalyan
    hi
    i'm assuming that at any one time there is only one
    JFrame, ie. one screen you describe is displayed at
    any one time and all others are not visible.
    try using CardLayout. CardLayout allows you to add
    multiple components to the layout yet displays only
    one component at a time in whatever order you wish.
    So, have only one JFrame and add the other screens
    perhaps as JPanel objects to the frame.
    check the API docs on CardLayout - its quite nifty.
    Takis

  • How to display graphic flush left in WebHelp

    In my WebHelp home page, I have a banner across the top which
    is a gif image. Ideally I'd like it to display across the full
    width of the page and flush to the left margin.
    I'm using the syntax <body TOPMARGIN=0 LEFTMARGIN=0
    MARGINHEIGHT=0 MARGINWIDTH=0>. This displays fine, ie. flush to
    the left, in the RoboHelp viewer (Ctrl+W) but when the project is
    generated, there is a gap to the left of the image when the page is
    viewed.
    Anyone know any workarounds? It's a cosmetic thing, but would
    be nice to resolve.

    Try this:
    REPORT z_ooalv_logo.
    ****DECLARATION FOR LOGO INSERT
    CONSTANTS: cntl_true TYPE i VALUE 1,
    cntl_false TYPE i VALUE 0.
    DATA:h_picture TYPE REF TO cl_gui_picture,
    h_pic_container TYPE REF TO cl_gui_custom_container.
    DATA: graphic_url(255),
    graphic_refresh(1),
    g_result LIKE cntl_true.
    DATA: BEGIN OF graphic_table OCCURS 0,
    line(255) TYPE x,
    END OF graphic_table.
    DATA: graphic_size TYPE i.
    CALL SCREEN 100.
    &amp;----
    *& Module PICTURE OUTPUT
    text
    MODULE picture OUTPUT.
    DATA: l_graphic_xstr TYPE xstring,
    l_graphic_conv TYPE i,
    l_graphic_offs TYPE i.
    CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
    EXPORTING
    p_object = 'GRAPHICS'
    p_name = 'EDS'"IMAGE NAME - Image name from SE78
    p_id = 'BMAP'
    p_btype = 'BCOL'
    RECEIVING
    p_bmp = l_graphic_xstr
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    graphic_size = XSTRLEN( l_graphic_xstr ).
    CHECK graphic_size > 0.
    l_graphic_conv = graphic_size.
    l_graphic_offs = 0.
    WHILE l_graphic_conv > 255.
    graphic_table-line = l_graphic_xstr+l_graphic_offs(255).
    APPEND graphic_table.
    l_graphic_offs = l_graphic_offs + 255.
    l_graphic_conv = l_graphic_conv - 255.
    ENDWHILE.
    graphic_table-line = l_graphic_xstr+l_graphic_offs(l_graphic_conv).
    APPEND graphic_table.
    CALL FUNCTION 'DP_CREATE_URL'
    EXPORTING
    type = 'image'
    subtype = cndp_sap_tab_unknown " 'X-UNKNOWN'
    size = graphic_size
    lifetime = cndp_lifetime_transaction "'T'
    TABLES
    data = graphic_table
    CHANGING
    url = graphic_url
    EXCEPTIONS
    dp_invalid_parameter = 1
    dp_error_put_table = 2
    dp_error_general = 3
    OTHERS = 4 .
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    EXIT.
    ENDIF.
    CREATE OBJECT h_pic_container
    EXPORTING container_name = 'LOGO'.
    CREATE OBJECT h_picture EXPORTING parent = h_pic_container.
    CALL METHOD h_picture->load_picture_from_url
    EXPORTING
    url = graphic_url
    IMPORTING
    RESULT = g_result.
    ENDMODULE. " PICTURE OUTPUT

  • How to initialize Graphics object without using paint method??

    This is a code to make sierpinski triangle using IFS.
    I am using a button called "Iterate" which calls funtion paint() .
    paint1() gets called from paint on pressing the button.
    I want to convert a square into Sierpinski triangle by iterations.
    I want to make a square first .If I put that code in paint() then it gets called everytime.
    so problem lines are: Graphics g;
    g.drawLine(0,0,99,0);
    g.drawLine(0,0,0,99);
    g.drawLine(0,99,99,99);
    g.drawLine(99,0,99,99);
    it gives error as object not initialised.
    rest of the working code is as follows.
    import java.applet.Applet;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class mys31 extends Applet implements ActionListener{
    String msg ="";
    Button iterate;
    int i,j;
    double [][]t;
    double [][]s;
    double []a;
    double []b;
    double []c;
    double []d;
    double []e;
    double []f;
    public void init() {
    t=new double[100][100];
    s=new double[100][100];
    a=new double[]{0.5,0.5,0.5};
    b=new double[]{0.0,0.0,0.0};
    c=new double[]{0.0,0.0,0.0};
    d=new double[]{0.5,0.5,0.5};
    e=new double[]{1.0,1.0,50.0};
    f=new double[]{1.0,50.0,50.0};
    for(i=0;i<100;i++)
    t[0]=1.0;
    t[0][i]=1.0;
    t[99][i]=1.0;
    t[i][99]=1.0;
    for(i=0;i<100;i++)
    for(j=0;j<100;j++)
    s[i][j]=0.0;
    iterate = new Button("Iterate");
    add(iterate);
    iterate.addActionListener(this);
    } // end init
    public void actionPerformed(ActionEvent ae){
    String str = ae.getActionCommand();
    if(str.equals("Iterate"))
    msg=" working";
    repaint();
    } //end of action Performed
    public void paint (Graphics g) {
    g.drawString(msg,200,200);
    paint1(g);
    } // end paint
    public void paint1(Graphics g)
    int j=0,i;
    for(i=0;i<100;i++)
    for(j=0;j<100;j++)
    if(t[i][j]==1)
    s[(int)(a[0]*i b[0]*j e[0])][(int)(c[0]*i + d[0]*j + f [0])]=1;
    s[(int)(a[1]*i b[1]*j e[1])][(int)(c[1]*i + d[1]*j + f [1])]=1;
    s[(int)(a[2]*i b[2]*j e[2])][(int)(c[2]*i + d[2]*j + f [2])]=1;
    g.setColor(Color.red);
    for(i=0;i<100;i++)
    for(j=0;j<100;j++)
    t[i][j]=s[i][j];
    s[i][j]=0.0;
    if(t[i][j]==1.0)
    g.drawLine(i,j,i,j);
    }//end paint1
    } // end class

    I don't see a question here.
    Anyway I would suggest using double buffering - drawing on a BufferedImage and drawing the BufferedImage inside paint.
    You will have to call repaint every iteration.

Maybe you are looking for