Creating a datasource from images taken from MJPEG/JPEG camera

Hy there...
I'm trying to create a JMF Processor from a datasource which should get images from an Video over IP camera (JPEG/MJPEG)...
I used as example: http://java.sun.com/products/java-media/jmf/2.1.1/solutions/JVidCap.html, but is seems that I don't do smth right...
Here are my datasource and my stream classes.
mJPEGDataSource.java
* To change this template, choose Tools | Templates
* and open the template in the editor.
package com.itmc.media.jmf;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.media.MediaLocator;
import javax.media.Time;
import javax.media.protocol.PushBufferDataSource;
import javax.media.protocol.PushBufferStream;
* @author [email protected]
* @urlexample: http://www.cs.odu.edu/~cs778/spring04/lectures/jmfsolutions/DataSource.java
* @urlexample: http://java.sun.com/products/java-media/jmf/2.1.1/solutions/ScreenGrabber.html
public class mJPEGDataSource extends PushBufferDataSource {
    private Logger logger = null;
    protected boolean started = false, connected = false;
    protected mJPEGStream[] streams = null;
    protected mJPEGStream stream = null;
    protected Time duration = DURATION_UNBOUNDED;
    protected Object[] controls = new Object[0];
    public Thread thread = null;
    public mJPEGDataSource() {
        logger = Logger.getAnonymousLogger();
        logger.setLevel(Level.INFO);
        logger.log(Level.INFO, "Createted mJPEGDataSource.");
    public mJPEGDataSource(MediaLocator locator) {
        this();
        streams = new mJPEGStream[1];
        stream = streams[0] = new mJPEGStream(locator, false);
        logger.log(Level.INFO, "Createted mJPEGDataSource from " + locator.toString() + ".");
    public mJPEGDataSource(MediaLocator locator, boolean usemjpeg) {
        this();
        streams = new mJPEGStream[1];
        stream = streams[0] = new mJPEGStream(locator, usemjpeg);
        logger.log(Level.INFO, "Createted mJPEGDataSource (" + (usemjpeg?"m":"") + "jpeg) from " + locator.toString() + ".");
    @Override
    public PushBufferStream[] getStreams() {
        if (streams == null) {
            streams = new mJPEGStream[1];
            stream = streams[0] = new mJPEGStream(getLocator(), true);
        return streams;
    @Override
    public String getContentType() {
        if (!connected) {
            logger.log(Level.WARNING, "DataSource is not connected yet.");
//            throw new UnsupportedOperationException("DataSource is not connected yet.");\
            return null;
        return "raw";
    @Override
    public void connect() throws IOException {
        connected = true;
        logger.log(Level.INFO, "mJPEGDataSource connected.");
    @Override
    public void disconnect() {
        try {
            if (started) stop();
        } catch (IOException e) {
            logger.log(Level.WARNING, null, e);
        connected = false;
        logger.log(Level.INFO, "mJPEGDataSource disconnected.");
    @Override
    public void start() throws IOException {
        if (!connected) {
            logger.log(Level.WARNING, "DataSource cannot start. It is not connected yet.");
//            throw new UnsupportedOperationException("DataSource cannot start. It is not connected yet.");
            return;
        logger.log(Level.INFO, "mJPEGDataSource started.");
        started = true;
        stream.start();
    @Override
    public void stop() throws IOException {
        if (!connected || !started) return;
        logger.log(Level.INFO, "mJPEGDataSource stoped.");
        started = false;
        stream.stop();
    @Override
    public Object getControl(String arg0) {
        return null;
    @Override
    public Object[] getControls() {
        return controls;
    @Override
    public Time getDuration() {
        return duration;
}and
mJPEGStream
* To change this template, choose Tools | Templates
* and open the template in the editor.
package com.itmc.media.jmf;
import com.itmc.media.frame.grabber.mjpegVioIPGrabber;
import java.awt.Dimension;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.ResourceBundle.Control;
import javax.media.Buffer;
import javax.media.Format;
import javax.media.MediaLocator;
import javax.media.format.RGBFormat;
import javax.media.format.VideoFormat;
import javax.media.protocol.BufferTransferHandler;
import javax.media.protocol.ContentDescriptor;
import javax.media.protocol.PushBufferStream;
* @author dr
public class mJPEGStream extends mjpegVioIPGrabber implements PushBufferStream, Runnable{
    protected ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW);
    protected RGBFormat rgbFormat = null;
    protected boolean mjpeg = false, running = false;
    protected BufferedImage image = null;
    protected Dimension size = new Dimension(320, 280);
    protected int maxDataLength, frameRate = 0x1f, seqNo = 0;
    protected int data[];
    protected Thread thread = null;
    protected Control controls[] = new Control[0];
    protected BufferTransferHandler transferHandler;
    public mJPEGStream(MediaLocator locator, boolean usemjpeg) {
        super(locator.toString(), null);
        this.mjpeg = usemjpeg;
        this.connect();
        this.disconnect();
        maxDataLength = size.width *  size.height * 3;
        rgbFormat = new RGBFormat(
                    size,
                    maxDataLength,
                    Format.intArray,
                    frameRate,
                    32,
                    0xFF0000, 0xFF00, 0xFF,
                    1,
                    size.width,
                    VideoFormat.FALSE,
                    Format.NOT_SPECIFIED
        data = new int[maxDataLength];
    public Format getFormat() {
        return rgbFormat;
    public void read(Buffer buffer) throws IOException {
        synchronized (this) {
            Object outdata = buffer.getData();
            if (outdata == null || outdata.getClass() != Format.intArray || ((int[])outdata).length < maxDataLength) {
                outdata = new int[maxDataLength];
                buffer.setData(outdata);
            buffer.setFormat(rgbFormat);
            buffer.setTimeStamp( (long)(seqNo * (1000 / frameRate) * 1000000) );
            this.connect();
            BufferedImage im = this.readJPEG();
            this.disconnect();
            im.getRGB(0, 0, size.width, size.height, (int[])outdata, 0, size.width);
            buffer.setSequenceNumber(seqNo);
            buffer.setLength(maxDataLength);
            buffer.setFlags(Buffer.FLAG_KEY_FRAME);
            buffer.setHeader(null);
            seqNo++;
    public void setTransferHandler(BufferTransferHandler handler) {
        synchronized(this) {
            transferHandler = handler;
            notifyAll();
    public ContentDescriptor getContentDescriptor() {
        return cd;
    public long getContentLength() {
        return LENGTH_UNKNOWN;
    public boolean endOfStream() {
        return false;
    public Object[] getControls() {
        throw new UnsupportedOperationException("Not supported yet.");
    public Object getControl(String arg0) {
        throw new UnsupportedOperationException("Not supported yet.");
    @Override
    public void run() {
        throw new UnsupportedOperationException("Not supported yet.");
    @Override
    public void start() {
        synchronized(this) {
            this.running = true;
            if (thread.isAlive()) return;
            thread = new Thread(this);
            thread.start();
    @Override
    public void stop() {
        synchronized (this) {
            this.running = false;
mjpegVioIPGrabber is a class written by me which till now worked perfectly.
I init the processor like this:
    public boolean open(Object source) {
        try {
            logger.log(Level.INFO, "Trying to create processor from " + source.getClass().getName() + ".");
            if (source instanceof String)
                p = Manager.createProcessor(new MediaLocator((String)source));
            else if (source instanceof MediaLocator)
                p = Manager.createProcessor((MediaLocator)source);
            else {
                //p = Manager.createProcessor();
                p = Manager.createProcessor((DataSource)source);
            if (p == null) {
                logger.log(Level.SEVERE, "Unsuported data type to create a Processor");
                return false;
        } catch (Exception e) {
            logger.log(Level.SEVERE, "Failed to create jmfProcessor from given datasource.");
            return false;
        logger.log(Level.INFO, "Processor created");
        p.addControllerListener(this);
        p.configure();
        if (!waitForState(p.Configured)) {
            logger.log(Level.SEVERE, "Failed to configure the processor.");
        p.setContentDescriptor(null);
        TrackControl tc[] = p.getTrackControls();
        if (tc == null) {
            logger.log(Level.WARNING, "Failed to obtain track controls from processor.");
            return false;
        if (this.codecs != null) {
            TrackControl videoTrack = null;
            for (int i = 0; i <  tc.length; i++) {
                if (tc.getFormat() instanceof VideoFormat) {
videoTrack = tc[i];
vf = (VideoFormat) videoTrack.getFormat();
break;
if (videoTrack == null) {
logger.log(Level.WARNING, "The input media does not contain a video track.");
return false;
try {
Codec codec[] = { null, null };
videoTrack.setCodecChain(codec);
} catch (UnsupportedPlugInException e) {
logger.log(Level.SEVERE, "The processor does not supprt efects: " + e.toString());
//return false;
p.prefetch();
if (!waitForState(p.Prefetched)) {
logger.log(Level.SEVERE, "Failed to realize the processor");
return false;
if ((vc = p.getVisualComponent()) == null) {
vc = null;
logger.log(Level.SEVERE, "Failed to get processor's Visual Component.");
return false;
if ((cc = p.getControlPanelComponent()) == null) {
cc = null;
logger.log(Level.WARNING, "Failed to get processor's Control Panel Component.");
p.start();
return true;
}and this is also working fine.
I don't get any errors, yet the code does absolutely nothing, and my loggers keep bugging me abut DataSource that is not connected.
+13.04.2008 23:54:33 com.itmc.media.jmf.mJPEGDataSource <init>+
+INFO: Createted mJPEGDataSource.+
+13.04.2008 23:54:33 com.itmc.media.jmf.mJPEGDataSource <init>+
+INFO: Createted mJPEGDataSource (mjpeg) from http://192.168.2.5/now.jpg?snap=spush.+
+13.04.2008 23:54:33 com.itmc.media.jmf.JmfProcessorViewer open+
+INFO: Trying to create processor from com.itmc.media.jmf.mJPEGDataSource.+
+13.04.2008 23:54:33 com.itmc.media.jmf.mJPEGDataSource getContentType+
+WARNING: DataSource is not connected yet.+
+13.04.2008 23:54:34 com.itmc.media.jmf.mJPEGDataSource getContentType+
+WARNING: DataSource is not connected yet.+
+13.04.2008 23:54:34 com.itmc.media.jmf.JmfProcessorViewer open+
+INFO: Processor created+
+13.04.2008 23:54:34 com.itmc.media.jmf.mJPEGDataSource start+
+WARNING: DataSource cannot start. It is not connected yet.+
+13.04.2008 23:54:34 com.itmc.media.jmf.mJPEGDataSource start+
+WARNING: DataSource cannot start. It is not connected yet.+
+13.04.2008 23:54:37 com.itmc.media.jmf.mJPEGDataSource start+
+WARNING: DataSource cannot start. It is not connected yet.+
Please help. I have to finish the project until this friday, and this is killing me. I have no ideea what's causing this.
I never used JMF until now, and all I did was based on examples.
If you can help please explain as if I were a little baby. Code example would be soooooo apreciated.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

OK... Forget what I've told you above.
After reading a little more and understanding some stuff, I managed to pull this out:
DataSource.java
* To change this template, choose Tools | Templates
* and open the template in the editor.
package com.itmc.media.protocl.http;
import javax.media.Time;
import javax.media.protocol.*;
import java.io.IOException;
import javax.media.MediaLocator;
* @author [email protected]
* (c) http://itmediaconnect.ro
public class DataSource extends PushBufferDataSource {
    protected Object [] controls = new Object[0];
    protected boolean started = false;
    protected String contentType = "raw";
    protected boolean connected = false;
    protected Time duration = DURATION_UNBOUNDED;
    protected HttpStream [] streams = null;
    protected HttpStream stream = null;
    public DataSource() {
    public DataSource(MediaLocator locator) {
        streams = new HttpStream[1];
        stream = streams[0] = new HttpStream(locator);
    public String getContentType() {
     if (!connected){
            System.err.println("Error: DataSource not connected");
            return null;
     return contentType;
    public void connect() throws IOException {
      if (connected)
            return;
      connected = true;
    public void disconnect() {
     try {
            if (started)
                stop();
        } catch (IOException e) {}
     connected = false;
    public void start() throws IOException {
     // we need to throw error if connect() has not been called
        if (!connected)
            throw new java.lang.Error("DataSource must be connected before it can be started");
        if (started)
            return;
     started = true;
     stream.start(true);
    public void stop() throws IOException {
     if ((!connected) || (!started))
         return;
     started = false;
     stream.start(false);
    public Object [] getControls() {
     return controls;
    public Object getControl(String controlType) {
     return null;
    public Time getDuration() {
     return duration;
    public PushBufferStream [] getStreams() {
     if (streams == null) {
         streams = new HttpStream[1];
         stream = streams[0] = new HttpStream(getLocator());
     return streams;
}and
HttpStream.java
* To change this template, choose Tools | Templates
* and open the template in the editor.
package com.itmc.media.protocl.http;
import com.itmc.media.VideoOverIP.mjpegGrabber;
import java.awt.*;
import java.awt.image.BufferedImage;
import javax.media.*;
import javax.media.format.*;
import javax.media.protocol.*;
import java.io.IOException;
* @author [email protected]
* (c) http://itmediaconnect.ro
public class HttpStream extends mjpegGrabber implements PushBufferStream, Runnable {
    protected ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW);
    protected int maxDataLength;
    protected int [] data;
    protected Dimension size;
    protected RGBFormat rgbFormat;
    protected boolean started;
    protected Thread thread;
    protected float frameRate = 7.0f;
    protected BufferTransferHandler transferHandler;
    protected Control [] controls = new Control[0];
    protected BufferedImage im = null;
    protected boolean mjpeg = false;
    public HttpStream(MediaLocator locator) {
        super(locator.toString());
        System.out.println(locator.toString());
        try {
            super.connect();
            im = super.readJPEG();
            super.disconnect();
        } catch(Exception e) {
        if (im == null) {
            try {
                super.connect();
                im = super.readMJPEG();
                mjpeg = true;
                super.disconnect();
            } catch(Exception e) {
     size = new Dimension(im.getWidth(), im.getHeight());
     maxDataLength = size.width * size.height * 3;
     rgbFormat = new RGBFormat(
            size, maxDataLength,
            Format.intArray,
            frameRate,
            32,
            0xFF0000, 0xFF00, 0xFF,
            1, size.width,
            VideoFormat.FALSE,
            Format.NOT_SPECIFIED
        System.out.println(rgbFormat.getFrameRate());
     // generate the data
     data = new int[maxDataLength];
     thread = new Thread(this, "Htmjpeg Grabber");
     * SourceStream
    public ContentDescriptor getContentDescriptor() {
     return cd;
    public long getContentLength() {
     return LENGTH_UNKNOWN;
    public boolean endOfStream() {
     return false;
     * PushBufferStream
    int seqNo = 0;
    public Format getFormat() {
     return rgbFormat;
    public void read(Buffer buffer) throws IOException {
     synchronized (this) {
            super.connect();
         Object outdata = buffer.getData();
         if (outdata == null || !(outdata.getClass() == Format.intArray) ||
          ((int[])outdata).length < maxDataLength) {
          outdata = new int[maxDataLength];
          buffer.setData(outdata);
         buffer.setFormat( rgbFormat );
         buffer.setTimeStamp( (long) (seqNo * (1000 / frameRate) * 1000000) );
         BufferedImage bi = mjpeg?super.readMJPEG():super.readJPEG();
         bi.getRGB(0, 0, size.width, size.height, (int[])outdata, 0, size.width);
         buffer.setSequenceNumber( seqNo );
         buffer.setLength(maxDataLength);
         buffer.setFlags(Buffer.FLAG_KEY_FRAME);
         buffer.setHeader( null );
         seqNo++;
            if (!mjpeg) super.disconnect();
    public void setTransferHandler(BufferTransferHandler transferHandler) {
     synchronized (this) {
         this.transferHandler = transferHandler;
         notifyAll();
    void start(boolean started) {
     synchronized ( this ) {
         this.started = started;
         if (started && !thread.isAlive()) {
          thread = new Thread(this);
          thread.start();
         notifyAll();
     * Runnable
    public void run() {
     while (started) {
         synchronized (this) {
          while (transferHandler == null && started) {
              try {
               wait(1000);
              } catch (InterruptedException ie) {
          } // while
         if (started && transferHandler != null) {
          transferHandler.transferData(this);
          try {
              Thread.currentThread().sleep( 10 );
          } catch (InterruptedException ise) {
     } // while (started)
    } // run
    // Controls
    public Object [] getControls() {
     return controls;
    public Object getControl(String controlType) {
       try {
          Class  cls = Class.forName(controlType);
          Object cs[] = getControls();
          for (int i = 0; i < cs.length; i++) {
             if (cls.isInstance(cs))
return cs[i];
return null;
} catch (Exception e) {   // no such controlType or such control
return null;
}I will not show you the grabber. I've seen a dousin of grabbers on this forum. What I can tell you is, that the two classes must be placed in a package named like this: name1.name2.name3......media.protocl.http (i.e. com.itmc.media.protocol.http).
To test it use: java JMStudio http://cameraaddress (i.e. java JMStudio http://192.168.2.5/now.jpg)
Reference:
+ http://www.onjava.com/pub/a/onjava/2002/12/23/jmf.html
+ http://java.sun.com/products/java-media/jmf/2.1.1/solutions/ScreenGrabber.html
I think this will be more than enough to solve all the problems you have in this type of matter.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • I would like to create a pop-up window appear from Labview Interface. In this window, I will have a slide control and an image taken from a camera. The main VI have to run while pop-up window is open. How can I do ?

    When I pushed a button, this pop-up window has to appear. There will be a slide control and a picture from a camera in this window. Is it possible to make appear this windows while main VI Interface continue to run ? How can I do this ? Thank you for your answers.
    Cyril.

    Here you go. This is simple example. Maybe not the best way, I am just
    beginner in LV and still not comfortable with data flow that much. I prefer
    events, so I would change this to use Event Structures.
    When you click on OK button on SliderMain, it opens Slider.vi. Now both
    windows are open and you can interact with both. Now if you click on OK
    again with Slider.vi open, you run into problems. Only thing I did was
    change VI properties of slider.vi, mainly window appearance.
    vishi
    "Cy" wrote in message
    news:[email protected]..
    > I would like to create a pop-up window appear from Labview Interface.
    > In this window, I will have a slide control and an image taken from a
    > camera. The main VI hav
    e to run while pop-up window is open. How can I
    > do ?
    >
    > When I pushed a button, this pop-up window has to appear. There will
    > be a slide control and a picture from a camera in this window. Is it
    > possible to make appear this windows while main VI Interface continue
    > to run ? How can I do this ? Thank you for your answers.
    > Cyril.
    [Attachment SliderMain.vi, see below]
    [Attachment Slider.vi, see below]
    Attachments:
    SliderMain.vi ‏16 KB
    Slider.vi ‏11 KB

  • I created an album from photos taken off three different cameras. I am sorting the photos manually and when I close iPhoto, the photos move back either by date or by camera import time. How can I keep the photos from moving around?

    I created an album from photos taken off three different cameras. I am sorting the photos manually and when I close iPhoto, the photos move back either by date or by camera import time. How can I keep the photos from moving around?

    Don't tell us, tell them
    http://www.apple.com/feedback/macosx.html is the place for feature requests and feedback

  • Warranty on the issue of purple spot in images taken from rear camera?

    My iPhone 5 have purple spot in images taken from rear camera. I just noticed the issue in my phone today.
    I researched online and some people also have the same issue and have their phone replaced in Apple shops.
    I don't have any receipt or store warranty card since it was just given to me as a gift in the Philippines last April 2013, I checked the warranty coverage status (https://selfsolve.apple.com/agreementWarrantyDynamic.do) and it still has repair and service coverage.
    Im now here in Dubai, and my question is that will Apple Premium Reseller shops here in Dubai honor the said warranty and have my iPhone repaired or replaced?

    Im now here in Dubai, and my question is that will Apple Premium Reseller shops here in Dubai honor the said warranty and have my iPhone repaired or replaced?
    No.
    The warranty for an iPhone purchased from an official source in the Philippines will be honored in the Philippines only.

  • Camera calibration with 2 planar object images taken from different distance

    I have a camera calibration object printed on paper and mounted on wall. It is planar object and 2 images taken of this object from 2 different distance. What should be the approach for calibration, both images are coplanar

    I have a camera calibration object printed on paper and mounted on wall. It is planar object and 2 images taken of this object from 2 different distance. What should be the approach for calibration, both images are coplanar

  • Can I remove files from "images removed from" dir?

    I have some duplicate files on my iMac, including some large videos in a "images removed from xxxxxxx" directory. Can I safely delete these?

    Yes, you can delete this additional "images removed from ...." vault, if you do not need this backup of older videos. It contains all photos/videos, that have been backed up in your vault, and have been removed, because they are no longer in your Aperture library. remove this vault only, if you do not want to keep this videos or have other backups of them.
    See Frank Caggiano's answer here:  Re: Folder labeled "Images Removed from Aperture Vault #1"
    But I am puzzled: Why are these vaults on your iMac? Are they on your system drive or on a second internal drive? Vaults are best kept on a drive different from the drive where the library is kept. Otherwise they will be of no use, if the drive should fail and needs to be restored.
    Regards
    Léonie

  • How do I switch from money taken from my card to taking it directly from my Checking Account.

    Please...how do I switch my payment to be taken from my checking account instead of my card. My card is being replaced since it was lost and I am wanting to make an Ebay purchase. I did this long ago but can't remember how.  Thank you!

    iTunes Store: How to redeem an iTunes Gift Card

  • Is Java ME capable to edge detect images taken from phone camera??

    I need help with creating a working edge detection method. At the moment as it stands I have the edge detection algorithim and have transformend it into code but I cannot see why it keeps returning a blue screen, Can Anyone tell me what I am doing wrong and how to fix it::
    public Image edgeDetect(Image colourImg){
              int width = colourImg.getWidth();
             int height = colourImg.getHeight();
             int[] imageDataX = new int[width* height];
             colourImg.getRGB(imageDataX, 0, width, 0, 0, width,height);
             Image greyImg = Image.createImage(width,height);
             Graphics g = greyImg.getGraphics();
             int[] soblex = {-1, 0, 1, -2, 0, 2, -1, 0, 1};
             int dooplex = 0;
             int dooplex1 = 0;
             int dooplex2 = 0;
             int doople = 0;
             int doople1 = 0;
             int doople2 = 0;
             int count = 0;
             int[] sobley = {1, 2, 1, 0, 0, 0, -1, -2, -1};
             int doopley = 0;
             int doopley1 = 0;
             int doopley2 = 0;
             int count2 = 0;
             for(int y=1; y<height-1;y++){
                 for(int x=1;x<width-1;x++){
                      if(doopley == 0 || doopley ==height-1){doople = 0;}
                      else if (dooplex == 0 || dooplex == height-1){doople = 0;}
                      for(int q = -1; q<=1; q++){
                           for(int r= -1; r<=1; r++){
                                int c = imageDataX[((q+y)*width+(x+r))];
                                int redx = (c&0x00FF0000)>>>16;
                                int d = imageDataX[((q+y)*width+(x+r))];
                                int bluex = (d&0x0000FF00)>>>8;
                                int e = imageDataX[((q+y)*width+(x+r))];
                                int greenx = e&0x000000FF;
                                dooplex +=  redx * soblex[count];
                                dooplex1+=  bluex * soblex[count];
                                dooplex2+=  greenx * soblex[count];
                                int f = imageDataX[((q+y)*width+(x+r))];
                                int redy = (f&0x00FF0000)>>>16;
                                int G = imageDataX[((q+y)*width+(x+r))];
                                int bluey = (G&0x0000FF00)>>>8;
                                int h = imageDataX[((q+y)*width+(x+r))];
                                int greeny = h&0x000000FF;
                                doopley += redy * sobley[count2];
                                doopley1+= greeny * sobley[count2];
                                doopley2+= bluey * sobley[count2];
                                count++;
                                count2++;
                      count= 0;
                      count2=0;
                      //MainMenu.append(" / " + doople);
                      //MainMenu.append(" / " + doople1);
                      //MainMenu.append(" / " + doople2 + "\n/*********/\n/********/");
                      doople = Math.abs(doopley)+ Math.abs(dooplex);
                      doople1 = Math.abs(doopley1)+ Math.abs(dooplex1);
                      doople2 =Math.abs(doopley2)+ Math.abs(dooplex2);
                      doople = (int)Math.sqrt(doople);
                      doople1= (int)Math.sqrt(doople1);
                      doople2 = (int)Math.sqrt(doople2);
                      //MainMenu.append(" / " + doople);
                      //MainMenu.append(" / " + doople1);
                      //MainMenu.append(" / " + doople2 + "\n/$$$$$$$$$/\n/$$$$$$$$/");
                      if(doople>=255)
                      {g.setColor(255&0x00ff0000<<16, 255&0x0000ff00<<8, 255&0x0000ff);
                      else if (doople<=0)
                      {g.setColor(0&0x00ff0000<<16, 0&0x0000ff00<<8, 0&0x0000ff);
                      else
                      {g.setColor(doople, doople1, doople2);
                      if(doople1>=255)
                      {g.setColor(255&0x00ff0000<<16, 255&0x0000ff00<<8, 255&0x0000ff);
                      else if (doople1<=0)
                      {g.setColor(0&0x00ff0000<<16, 0&0x0000ff00<<8, 0&0x0000ff);
                      else
                      {g.setColor(doople, doople1, doople2);
                      if(doople2>=255)
                      {g.setColor(255&0x00ff0000<<16, 255&0x0000ff00<<8, 255&0x0000ff);
                      else if (doople2<=0)
                      {g.setColor(0&0x00ff0000<<16, 0&0x0000ff00<<8, 0&0x0000ff);
                      else
                      {g.setColor(255&0x00ff0000<<16, 255&0x0000ff00<<8, 255&0x0000ff);
                      dooplex = 0;
                      dooplex1 = 0;
                      dooplex2 = 0;
                      doopley = 0;
                      doopley1 = 0;
                      doopley2 = 0;
                      doople = 0;
                      doople1 = 0;
                      doople2 = 0;
                      imageDataX[y*width+x] = g.getColor() & 0xFFFFFFFF;
             greyImg= Image.createRGBImage(imageDataX,width,height,false);
             return greyImg;
         }I think that the problem lies in the two areas where I take the RGB information from the pixel and try to put them back into an graphics that later get turned into an Image::
    g.setColor(255&0x00ff0000<<16, 255&0x0000ff00<<8, 255&0x0000ffand
    for(int q = -1; q<=1; q++){
                           for(int r= -1; r<=1; r++){
                                int c = imageDataX[((q+y)*width+(x+r))];
                                int redx = (c&0x00FF0000)>>>16;
                                int d = imageDataX[((q+y)*width+(x+r))];
                                int bluex = (d&0x0000FF00)>>>8;
                                int e = imageDataX[((q+y)*width+(x+r))];
                                int greenx = e&0x000000FF;
                                dooplex +=  redx * soblex[count];
                                dooplex1+=  bluex * soblex[count];
                                dooplex2+=  greenx * soblex[count];
                                int f = imageDataX[((q+y)*width+(x+r))];
                                int redy = (f&0x00FF0000)>>>16;
                                int G = imageDataX[((q+y)*width+(x+r))];
                                int bluey = (G&0x0000FF00)>>>8;
                                int h = imageDataX[((q+y)*width+(x+r))];
                                int greeny = h&0x000000FF;
                                doopley += redy * sobley[count2];
                                doopley1+= greeny * sobley[count2];
                                doopley2+= bluey * sobley[count2];
                                count++;
                                count2++;
                         }Thankyou in advance

    ...it keeps returning a blue screen...
                      if(doople>=255)
                      {g.setColor(255&0x00ff0000<<16, 255&0x0000ff00<<8, 255&0x0000ff);
                      else if (doople<=0)
                      {g.setColor(0&0x00ff0000<<16, 0&0x0000ff00<<8, 0&0x0000ff);
                      else
                      {g.setColor(doople, doople1, doople2);
                      if(doople1>=255)
                      {g.setColor(255&0x00ff0000<<16, 255&0x0000ff00<<8, 255&0x0000ff);
                      else if (doople1<=0)
                      {g.setColor(0&0x00ff0000<<16, 0&0x0000ff00<<8, 0&0x0000ff);
                      else
                      {g.setColor(doople, doople1, doople2);
                      if(doople2>=255)
                      {g.setColor(255&0x00ff0000<<16, 255&0x0000ff00<<8, 255&0x0000ff);
                      else if (doople2<=0)
                      {g.setColor(0&0x00ff0000<<16, 0&0x0000ff00<<8, 0&0x0000ff);
                      else
                      {g.setColor(255&0x00ff0000<<16, 255&0x0000ff00<<8, 255&0x0000ff);
    as far as I understand, above code is equivalent to:
                      if(doople>=255)
                      {g.setColor(0, 0, 0xff); // blue
                      else if (doople<=0)
                      {g.setColor(0, 0, 0xff); // blue
                      else
                      {g.setColor(doople, doople1, doople2);
                      // no matter what was above, color will be defined below:
                      if(doople1>=255)
                      {g.setColor(0, 0, 0xff); // blue
                      else if (doople1<=0)
                      {g.setColor(0, 0, 0xff); // blue
                      else
                      {g.setColor(doople, doople1, doople2);
                      // no matter what was above, color will be defined below:
                      if(doople2>=255)
                      {g.setColor(0, 0, 0xff); // blue
                      else if (doople2<=0)
                      {g.setColor(0, 0, 0xff); // blue
                      else
                      {g.setColor(0, 0, 0xff); // blue
    //......which in turn is equivalent to:
                            // no matter what was set above, color will be defined below...
                      if(doople2>=255)
                      {g.setColor(0, 0, 0xff); // blue
                      else if (doople2<=0)
                      {g.setColor(0, 0, 0xff); // blue
                      else
                      {g.setColor(0, 0, 0xff); // blue
    //......which finally becomes g.setColor(0, 0, 0xff); // blue

  • A7000 | The images taken from the front facing camera(FFS) (5MP) are mirrored. Is this an issue?

    Hello Team,
    I just took an image from the FFS off my new A7000 and i noticed that the images are mirrored. Is this a software issue?
    I even owned a A6000 but the images from that were proper.
    As far as i know mirrored image should be displayed while taking the picture but  proper un-mirrored image should be saved. 
    Please look into this issue.
    Here is an image(re-sized) i took from FFS which is reversed/mirrored.
    Admin note; picture >100K converted to link.  About posting pictures in the forums.

    Yes i have updated to the latest firmware S141. And yes i am using the default camera app but still the issue exists. Is this a software issue or is it a hardware issue? If its a software issue, then is it possible to fix through future firmware updates? Anyhow i'll take the phone to nearest service center. Can you give me the address for service center in Bangalore(India). Thank you for the reply.   

  • Can final cut pro be used to clean scratches from digital images taken from 8 mm film

    I had some 8 mm movies digitally transferred and are now into iMovie. The last batch was water damaged and had the vinegar syndrome problem. (See samples below). I also have a movie that is good quality but moves in and out because the film was bent or curled causing a distorted transfer to 16 mm film.
    I would like to clean off the scratches, debris and sharpen the images. I would like to recolorize some of them if possible. Any hope for this or do I wait a few years until the technology becomes available?
    Thanks
    Frank Abernathy
    [email protected]

    That's a very specialized task that FCP X (nor any other NLE) does out of the box. You'd need something like this- http://www.thepixelfarm.co.uk/product.php?productId=PFClean
    Or to be honest it's worth hiring a post house to do this sort of work. Some have automated systems that can run pretty affordable for surprisingly good work.

  • How do I remove "read-only" from images transferred from a PC so that I can add keywords?

    I switched to a Mac from a PC a year ago and have been using PSE 9 + Organizer with no problems.  I transferred all my images from the PC at that time.  Now, I want to transition to using Bridge and have been assigning keywords to the newer photos added after I started using the Mac.  I am unable to assign keywords to the earlier photos because Bridge says they are read-only.  I checked the Apple Get Info on the folders and they are read and write.  Any ideas?

    the Sharing and Permissions box on the bottom shows I have "custom" and "read & write" access for both pre- and post 9/2010 folders.  All others (nobody, staff, everyone) have read only.  Of course there is actually only me.
    Anne,
    It seems related to your OSX. I think you have created a new user account without adding a name (hence Nobody) but I'm a bit guessing in this department.
    The default user account folders like pictures and movies have the ability to set to 'custom'. With you as only user and administrator there should preferably only be one user account visible.  By default a newly created folder should show 3 options for sharing and permission. User (your name of the user account) Read and Write
    Staff: read only
    Everyone: Read only.
    I have tried deleting "nobody" and "staff" and changing Annie to read and write - all kinds of combinations.
    You can only edit users accounts in the system preferences / Accounts. In here is the option for you as administrator to delete and create users accounts. Here is where it is getting a bit difficult because we can't see your set up for the OSX. But if you have to change 'Annie' to read and write and assuming your user account name is Annie it should already have been on read and write. If you are logged in as 'nobody' this should have shown read and write to have access to change metadata.
    So you first have to study a bit about user accounts on a Mac and see if you have a correct install. It is not very difficult and you will gain profit from this knowledge.
    try the Apple.com support site, for a start here is a link to an article from the Apple Knowledge Base (kb) article about user accounts:
    http://support.apple.com/kb/HT3309
    Some images have been moved from the original folders so that could be a problem.
    Basically you should not have any problem with moving files to whatever folder you want or create on your user account (or to external Disk etc.)
    For a start you could create a new main folder in your user account Home folder and call this test or whatever you like except an already existing name. Of course also check if you have read and write permissions for it...
    Open Bridge, use the folder panel to select a folder with the problem files. Now scroll through the folder panel and click on the triangle in front of your home folder. This will open the list with nested folders while Bridge content window still keeps its focus on the problem files you first selected. Select a bunch of the problem files from the content panel and use drag and drop to move the files to the newly created folder. Just move the mouse on the folder name and release the files.
    If you hold the option (alt) key while dragging there will appear a + - sign and the files are copied to their new location, just use what you think is best for you.
    After this action has finished click with your mouse on the newly created folder name in the folder panel and now the files should show in the content panel (if correct also already cached). Check if you are able to change the metadata now.
    Most have tags from current and previous Photoshop Elements versions.
    That should not be a problem, some info will be readable by Bridge, others not. Some Bridge version even had their own Bridge versions.

  • Read image direct from file server

    hello, need to help me somebody.
    A like to create form , what read image direct from file server, without store in database.
    Please help me.

    Hi you may go through the below post to find what could be a better way to do that.
    http://forum.java.sun.com/thread.jspa?threadID=5163829
    REGARDS,
    RaHuL

  • HP Device Manager Issues - Unable to deploy images taken with a particular OS to a different OS

    Hi all,
    I have been trying to deploy an image taken from a HP T5565 (Thin Client) with the HP ThinPro 4 operating system, to a HP T5565 with the HP ThinPro 3 operating system. Does anyone know if this is possible?
    I am also having the same issue when deploying an image taken from a HP T610 - Thin Pro 4 thin clent, to a HP T610 - Thin Pro 3 Thin client.
    I take the image by right clicking on the thin client, clicking on 'Send Task', Imaging, then Capture Image.
    I deploy images in the same manner, but instead select the image from the Templates window. It works fine for Thin Clients running on the same OS.
    I would appreciate any assistance with this!
    Regards,
    Remo

    Remo,
    You will want to ask this on the HP Enterprise Business Community.
    You may need to re-register to post questions as it is a separate forum.
    Here is the section for Thin Clients and other Workstations.
    http://h30499.www3.hp.com/t5/Desktops-and-Workstations/ct-p/bsc-403
    Good luck.

  • Yellowish image taken with Lumia 920 Amber

    I've noticed this very recently.  I found that the pictures are yellowish. When I take a photo, it previews it for about 2 sec and then gets saved to Camera Roll. While the previewed image looks good and matches the view, the one getting saved is not the same. I noted that most photos I take are getting blurred and tinted with green and yellow inside Camera Roll. I don't know why this happens as the image looks perfectly on preview. At first, I thought it was a problem with Nokia Camera app but later found that the same happens for the default Camera app too.
    To prove this, I took screenshots of preview and made 3 side by side comparisons. They are given below and you can notice the change in colors and the sharpness between the preview and the original. And also the images taken using the front camera makes me a sick yellowish Simpson.
    These photos are in Auto Settings. 
    Attachments:
    sc1.jpg ‏33 KB
    sc3.jpg ‏42 KB
    sc5.jpg ‏50 KB

    Another images with screenshots
    Attachments:
    wp_ss_20130913_0004_zpse381f1c2.png ‏800 KB
    wp_ss_20130913_0005_zps5ab031ef.png ‏738 KB

  • "Date Created" incorrect in Finder after copying image files from CF reader

    Whenever I download image files (by drag and drop copying) from a CF card reader, the 'Date Created' info incorrectly defaults to 'Dec 31, 1903' in the List view of the Finder window.
    'Date Created' shows up blank in the File Info window, too. Correct file info does however show up in the copied Meta Data.
    I've only been able to transfer correct 'Date Created' info by using Image Capture, which is pretty annoying.
    I've tried several cameras, CF cards, USB & FW card readers, and Macs running both Panther and Tiger. Same problem all around. Interestingly, files copy without a problem onto a PC.
    I'm a photographer and I need to sort my images by 'Date Created' because I often shoot with two cameras and need to know the chronological order in which photos were taken.
    Ideas anybody?
    G5 Mac OS X (10.3.9)
    G5 Mac OS X (10.3.9)
    G5   Mac OS X (10.3.9)  

    stqn wrote:
    photorec ?
    Edit: I see that testdisk and photorec belong to the same package... Still it looks like it should be the right tool for the job; but I might be wrong as I never used it.
    Used it a couple of times, my daughter wiped photos from her mobiles memory card by accident .... Linux to the rescue
    Last edited by Mr Green (2010-12-21 11:01:01)

Maybe you are looking for